CN104753873A - Content service providing method, device and system - Google Patents
Content service providing method, device and system Download PDFInfo
- Publication number
- CN104753873A CN104753873A CN201310745720.6A CN201310745720A CN104753873A CN 104753873 A CN104753873 A CN 104753873A CN 201310745720 A CN201310745720 A CN 201310745720A CN 104753873 A CN104753873 A CN 104753873A
- Authority
- CN
- China
- Prior art keywords
- node
- content
- content fragment
- target node
- autonomous domain
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 239000012634 fragment Substances 0.000 claims abstract description 235
- 238000003860 storage Methods 0.000 claims description 45
- 238000010586 diagram Methods 0.000 description 14
- 238000005516 engineering process Methods 0.000 description 9
- 238000013467 fragmentation Methods 0.000 description 8
- 238000006062 fragmentation reaction Methods 0.000 description 8
- 238000004590 computer program Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 238000012545 processing Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000009826 distribution Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 235000008694 Humulus lupulus Nutrition 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000005304 joining Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
本发明公开了一种提供内容服务的方法、装置和系统,用以解决现有技术中当大量节点退出P2P系统时存在的P2P系统无法提供稳定可靠的服务的问题。该方法包括:当对等网络P2P节点在自身所在的P2P自治域内查找不到内容分片所在的目标节点时,向所述P2P自治域对应的云目录服务器发送内容分片查找请求;接收所述云目录服务器反馈的所述内容分片所在的目标节点的信息;向所述目标节点的信息指示的目标节点发送内容服务请求,以获取所述内容分片。
The invention discloses a method, device and system for providing content services, which are used to solve the problem in the prior art that the P2P system cannot provide stable and reliable services when a large number of nodes withdraw from the P2P system. The method includes: when the peer-to-peer network P2P node cannot find the target node where the content fragment is located in the P2P autonomous domain where it is located, sending a content fragment search request to the cloud directory server corresponding to the P2P autonomous domain; receiving the The information of the target node where the content fragment is fed back by the cloud directory server; sending a content service request to the target node indicated by the information of the target node, so as to acquire the content fragment.
Description
技术领域technical field
本发明涉及通信技术领域,尤其涉及一种提供内容服务的方法、装置和系统。The present invention relates to the field of communication technology, in particular to a method, device and system for providing content services.
背景技术Background technique
近年来,包括内容下载和视频点播等的内容服务得到了高速发展,存储容量达到几百上千太(T)字节,用户也达到了千万级别,对等网络(Peer to Peer,简称P2P)作为一种网络存储分发技术被广泛应用于内容服务中。P2P是一种新的通信模式,其不同于传统的客户端和服务器结构(Client/Server),在Client/Server结构下,由服务器集中提供内容服务,用户的请求必须通过服务器完成,当用户的请求增多时,系统就会出现瓶颈。而在P2P系统中,用户之间可以直接通信、共享资源和协同工作,共同承担服务使用者和服务提供者两个角色,充分利用了每个节点的资源和网络带宽,减少了网络拥塞状况,使资源的利用率显著提高。In recent years, content services including content download and video-on-demand have developed rapidly, storage capacity has reached hundreds of thousands of terabytes (T) bytes, and users have reached tens of millions. Peer-to-Peer (P2P for short) ) as a network storage distribution technology is widely used in content services. P2P is a new communication mode, which is different from the traditional client and server structure (Client/Server). Under the Client/Server structure, the server provides content services centrally. The user's request must be completed through the server. When the user's When the number of requests increases, the system will become a bottleneck. In the P2P system, users can communicate directly, share resources and work together, and share the two roles of service users and service providers, making full use of the resources and network bandwidth of each node, reducing network congestion, Significantly improve resource utilization.
虽然P2P这种去中心化的机构具有上述优势,但是由于P2P系统中的节点的加入和退出具有很大的随机性,导致P2P系统在提供内容服务时的稳定性和可靠性比较差。Although a decentralized organization such as P2P has the above-mentioned advantages, due to the great randomness of joining and exiting nodes in the P2P system, the stability and reliability of the P2P system in providing content services are relatively poor.
发明内容Contents of the invention
本发明实施例提供一种提供内容服务的方法、装置和系统,用以解决现有技术中存在的P2P系统无法提供稳定可靠的内容服务的问题。Embodiments of the present invention provide a method, device and system for providing content services to solve the problem that the P2P system in the prior art cannot provide stable and reliable content services.
本发明实施例采用以下技术方案:Embodiments of the present invention adopt the following technical solutions:
一种提供内容服务的方法,包括:A method of providing content services, comprising:
当对等网络P2P节点在自身所在的P2P自治域内查找不到内容分片所在的目标节点时,向所述P2P自治域对应的云目录服务器发送内容分片查找请求;When the peer-to-peer network P2P node cannot find the target node where the content fragment is located in the P2P autonomous domain where it is located, it sends a content fragment search request to the cloud directory server corresponding to the P2P autonomous domain;
接收所述云目录服务器反馈的所述内容分片所在的目标节点的信息;receiving the information of the target node where the content fragment is located fed back by the cloud directory server;
向所述目标节点的信息指示的目标节点发送内容服务请求,以获取所述内容分片。Sending a content service request to the target node indicated by the information of the target node, so as to obtain the content fragment.
其中,所述目标节点的信息指示的目标节点为:Wherein, the target node indicated by the information of the target node is:
所述P2P自治域中的P2P节点,或者所述P2P自治域外的数据节点。A P2P node in the P2P autonomous domain, or a data node outside the P2P autonomous domain.
其中,当所述P2P节点在自身所在的P2P自治域内查找不到内容分片所在的目标节点时,向所述云目录服务器发送内容分片查找请求,具体包括:Wherein, when the P2P node cannot find the target node where the content fragment is located in the P2P autonomous domain where it is located, it sends a content fragment search request to the cloud directory server, specifically including:
当所述P2P节点在预先设置的时间或跳数内没有在自身所在的P2P自治域内查找到内容分片所在的目标节点时,向所述云目录服务器发送内容分片查找请求。When the P2P node fails to find the target node where the content fragment is located in the P2P autonomous domain where it is located within the preset time or hop count, it sends a content fragment search request to the cloud directory server.
进一步的,所述方法还包括:Further, the method also includes:
所述P2P节点将从所述目标节点收到的内容分片进行存储;并The P2P node stores the content fragments received from the target node; and
将自身与所述内容分片的对应关系发送给所述云目录服务器,以便所述云目录服务器能够根据所述对应关系对预先保存的内容分片存储信息进行更新。Send the corresponding relationship between itself and the content segment to the cloud directory server, so that the cloud directory server can update the pre-saved storage information of the content segment according to the corresponding relationship.
一种提供内容服务的方法,包括:A method of providing content services, comprising:
云目录服务器接收P2P节点发送的内容分片查找请求;所述P2P节点在所述云目录服务器对应的P2P自治域中;The cloud directory server receives the content fragment search request sent by the P2P node; the P2P node is in the P2P autonomous domain corresponding to the cloud directory server;
云目录服务器确定所述内容分片查找请求所请求的内容分片所在的目标节点;并The cloud directory server determines the target node where the content fragment requested by the content fragment lookup request is located; and
将确定出的目标节点的信息发送给所述P2P节点,使所述P2P节点能够从确定出的目标节点的信息指示的目标节点中获取内容分片。Sending the determined information of the target node to the P2P node, so that the P2P node can obtain content fragments from the target node indicated by the determined information of the target node.
其中,云目录服务器确定所述内容分片查找请求所请求的内容分片所在的目标节点,具体包括:Wherein, the cloud directory server determines the target node where the content fragment requested by the content fragment search request is located, specifically including:
云目录服务器根据预先保存的内容分片存储信息,在所述P2P自治域中查找所述内容分片所在的P2P节点;所述内容分片存储信息中包含内容分片与P2P节点的对应关系;The cloud directory server searches the P2P node where the content fragment is located in the P2P autonomous domain according to the pre-saved content fragment storage information; the content fragment storage information includes the corresponding relationship between the content fragment and the P2P node;
当在所述P2P自治域中查找到所述内容分片所在的P2P节点时,将查找到的P2P节点确定为所述目标节点;When finding the P2P node where the content fragment is located in the P2P autonomous domain, determining the found P2P node as the target node;
当在所述P2P自治域中没有查找到所述内容分片所在的P2P节点时,将所述内容分片查找请求发送给内容管理服务器,由所述内容管理服务器查找所述内容分片所在的数据节点;并When the P2P node where the content fragment is located is not found in the P2P autonomous domain, the content fragment search request is sent to the content management server, and the content management server searches for the content fragment where the data nodes; and
将所述内容管理服务器查找到的数据节点确定为所述目标节点。The data node found by the content management server is determined as the target node.
进一步的,所述方法还包括:Further, the method also includes:
接收所述P2P节点发送的所述P2P节点与所述内容分片的对应关系;receiving the correspondence between the P2P node and the content fragment sent by the P2P node;
根据所述对应关系对预先保存的内容分片存储信息进行更新。The pre-saved content segment storage information is updated according to the corresponding relationship.
一种P2P节点,包括:A P2P node, including:
内容分片查找请求发送单元,用于当对等网络P2P节点在自身所在的P2P自治域内查找不到内容分片所在的目标节点时,向所述P2P自治域对应的云目录服务器发送内容分片查找请求;A content fragment search request sending unit, used to send content fragments to the cloud directory server corresponding to the P2P autonomous domain when the peer-to-peer network P2P node cannot find the target node where the content fragments are located in the P2P autonomous domain where it is located find request;
接收单元,用于接收所述云目录服务器反馈的所述内容分片所在的目标节点的信息;a receiving unit, configured to receive the information of the target node where the content fragment is fed back by the cloud directory server;
内容服务请求发送单元,用于向接收单元接收到的所述目标节点的信息指示的目标节点发送内容服务请求,以获取所述内容分片。The content service request sending unit is configured to send a content service request to the target node indicated by the information of the target node received by the receiving unit, so as to obtain the content fragment.
其中,所述目标节点的信息指示的目标节点为:Wherein, the target node indicated by the information of the target node is:
所述P2P自治域中的P2P节点,或者所述P2P自治域外的数据节点。A P2P node in the P2P autonomous domain, or a data node outside the P2P autonomous domain.
其中,所述内容分片查找请求发送单元,具体用于:Wherein, the content fragment search request sending unit is specifically used for:
当所述P2P节点在预先设置的时间或跳数内没有在自身所在的P2P自治域内查找到内容分片所在的目标节点时,向所述云目录服务器发送内容分片查找请求。When the P2P node fails to find the target node where the content fragment is located in the P2P autonomous domain where it is located within the preset time or hop count, it sends a content fragment search request to the cloud directory server.
进一步的,所述P2P节点还包括:Further, the P2P node also includes:
存储单元,用于将从所述目标节点收到的内容分片进行存储;a storage unit, configured to store content fragments received from the target node;
对应关系发送单元,用于将自身与所述内容分片的对应关系发送给所述云目录服务器,以便所述云目录服务器能够根据所述对应关系对预先保存的内容分片存储信息进行更新。The correspondence sending unit is configured to send the correspondence between itself and the content segment to the cloud directory server, so that the cloud directory server can update the pre-saved storage information of the content segment according to the correspondence.
一种云目录服务器,包括:A cloud directory server comprising:
内容分片查找请求接收单元,用于接收P2P节点发送的内容分片查找请求;所述P2P节点在所述云目录服务器对应的P2P自治域中;A content fragment search request receiving unit, configured to receive a content fragment search request sent by a P2P node; the P2P node is in the P2P autonomous domain corresponding to the cloud directory server;
目标节点确定单元,用于确定内容分片查找请求接收单元接收的所述内容分片查找请求所请求的内容分片所在的目标节点;a target node determination unit, configured to determine the target node where the content segment requested by the content segment search request received by the content segment search request receiving unit is located;
信息发送单元,用于将目标节点确定单元确定出的目标节点的信息发送给所述P2P节点,使所述P2P节点能够从确定出的目标节点的信息指示的目标节点中获取内容分片。An information sending unit, configured to send the information of the target node determined by the target node determining unit to the P2P node, so that the P2P node can acquire content fragments from the target node indicated by the determined information of the target node.
其中,所述目标节点确定单元,具体包括:Wherein, the target node determination unit specifically includes:
查找模块,用于根据预先保存的内容分片存储信息,在所述P2P自治域中查找所述内容分片所在的P2P节点;所述内容分片存储信息中包含内容分片与P2P节点的对应关系;A search module, configured to search the P2P node where the content fragment is located in the P2P autonomous domain according to the pre-saved content fragment storage information; the content fragment storage information includes the correspondence between the content fragment and the P2P node relation;
目标节点第一确定模块,用于当查找模块在所述P2P自治域中查找到所述内容分片所在的P2P节点时,将查找到的P2P节点确定为所述目标节点;A target node first determination module, configured to determine the found P2P node as the target node when the search module finds the P2P node where the content fragment is located in the P2P autonomous domain;
目标节点第二确定模块,用于当查找模块在所述P2P自治域中没有查找到所述内容分片所在的P2P节点时,将所述内容分片查找请求发送给内容管理服务器,由所述内容管理服务器查找所述内容分片所在的数据节点;并将所述内容管理服务器查找到的数据节点确定为所述目标节点。The second determination module of the target node is used to send the content fragment search request to the content management server when the search module does not find the P2P node where the content fragment is located in the P2P autonomous domain, and the The content management server searches for the data node where the content fragment is located; and determines the data node found by the content management server as the target node.
进一步的,所述云目录服务器还包括:Further, the cloud directory server also includes:
对应关系接收单元,用于接收所述P2P节点发送的所述P2P节点与所述内容分片的对应关系;a corresponding relationship receiving unit, configured to receive the corresponding relationship between the P2P node and the content fragment sent by the P2P node;
更新单元,用于根据对应关系接收单元接收的所述对应关系对预先保存的内容分片存储信息进行更新。An updating unit, configured to update the pre-saved content segment storage information according to the correspondence received by the correspondence receiving unit.
一种提供内容服务的系统,包括:至少一个P2P自治域和与每个P2P自治域分别对应的云目录服务器,且每个P2P自治域中包含多个P2P节点,其中:A system for providing content services, comprising: at least one P2P autonomous domain and a cloud directory server corresponding to each P2P autonomous domain, and each P2P autonomous domain contains multiple P2P nodes, wherein:
所述P2P节点,用于当在自身所在的P2P自治域内查找不到内容分片所在的目标节点时,向自身所在的P2P自治域对应的云目录服务器发送内容分片查找请求;接收所述云目录服务器反馈的所述内容分片所在的目标节点的信息;向所述目标节点的信息指示的目标节点发送内容服务请求,以获取所述内容分片;The P2P node is used to send a content fragment search request to the cloud directory server corresponding to the P2P autonomous domain where it is located when the target node where the content fragment is located cannot be found in the P2P autonomous domain where it is located; receive the cloud The information of the target node where the content fragment is fed back by the directory server; sending a content service request to the target node indicated by the information of the target node to obtain the content fragment;
所述云目录服务器,用于接收所述P2P节点发送的内容分片查找请求;确定所述内容分片查找请求所请求的内容分片所在的目标节点;并将确定出的目标节点的信息发送给所述P2P节点。The cloud directory server is configured to receive the content fragment search request sent by the P2P node; determine the target node where the content fragment requested by the content fragment search request is located; and send the determined information of the target node to the P2P node.
进一步的,所述系统还包括:内容管理服务器和数据节点;则Further, the system also includes: a content management server and a data node; then
所述云目录服务器,具体用于:The cloud directory server is specifically used for:
根据预先保存的内容分片存储信息,在所述P2P自治域中查找所述内容分片所在的P2P节点;所述内容分片存储信息中包含内容分片与P2P节点的对应关系;当在所述P2P自治域中查找到所述内容分片所在的P2P节点时,将查找到的P2P节点确定为所述目标节点;当在所述P2P自治域中没有查找到所述内容分片所在的P2P节点时,将所述内容分片查找请求发送给内容管理服务器,由所述内容管理服务器查找所述内容分片所在的数据节点;并将所述内容管理服务器查找到的数据节点确定为所述目标节点。According to the pre-saved content fragment storage information, search the P2P node where the content fragment is located in the P2P autonomous domain; the content fragment storage information includes the corresponding relationship between the content fragment and the P2P node; when in the P2P autonomous domain When the P2P node where the content fragment is located is found in the P2P autonomous domain, the P2P node found is determined as the target node; when the P2P node where the content fragment is located is not found in the P2P autonomous domain node, the content fragment search request is sent to the content management server, and the content management server searches for the data node where the content fragment is located; and the data node found by the content management server is determined as the target node.
本发明实施例的有益效果如下:The beneficial effects of the embodiments of the present invention are as follows:
本发明实施例中,当P2P节点在自身所在的P2P自治域内查找不到内容分片所在的目标节点时,向P2P自治域对应的云目录服务器发送内容分片查找请求,并根据云目录服务器反馈的目标节点的信息来获取内容服务,与现有技术相比,即使P2P自治域中出现P2P节点随机加入和随机退出的情况,也能通过云目录服务器使P2P自治域内的P2P节点获得内容服务,从而避免了现有技术中存在的P2P系统无法提供稳定可靠的内容服务的问题。In the embodiment of the present invention, when the P2P node cannot find the target node where the content fragment is located in the P2P autonomous domain where it is located, it sends a content fragment search request to the cloud directory server corresponding to the P2P autonomous domain, and according to the cloud directory server feedback Compared with the existing technology, even if P2P nodes randomly join and exit randomly in the P2P autonomous domain, P2P nodes in the P2P autonomous domain can obtain content services through the cloud directory server. Therefore, the problem that the P2P system in the prior art cannot provide stable and reliable content services is avoided.
附图说明Description of drawings
图1为本发明实施例提供了一种提供内容服务的方法的实现流程图;FIG. 1 provides an implementation flowchart of a method for providing content services according to an embodiment of the present invention;
图2为本发明实施例中提供的一种基于云目录服务器的提供内容服务的方法的实现流程图;FIG. 2 is an implementation flow chart of a method for providing content services based on a cloud directory server provided in an embodiment of the present invention;
图3为在实际应用中用于实现上述方法的系统的总体架构图;Fig. 3 is the overall architecture diagram of the system for realizing above-mentioned method in practical application;
图4为基于上述系统的内容发布流程图;Fig. 4 is a flow chart of publishing content based on the above-mentioned system;
图5为基于上述系统的提供内容服务流程图;FIG. 5 is a flow chart of providing content services based on the above-mentioned system;
图6为本发明实施例提供了一种P2P节点的结构示意图;FIG. 6 provides a schematic structural diagram of a P2P node according to an embodiment of the present invention;
图7为本发明实施例提供了一种云目录服务器的结构示意图;FIG. 7 provides a schematic structural diagram of a cloud directory server according to an embodiment of the present invention;
图8为本发明实施例提供了一种提供内容服务的系统的结构示意图。FIG. 8 is a schematic structural diagram of a system for providing content services according to an embodiment of the present invention.
具体实施方式Detailed ways
为了解决现有技术中当大量节点退出P2P系统时存在的P2P系统无法提供稳定可靠的服务的问题,本发明实施例中提供了一种提供内容服务的方案。该技术方案中,当P2P节点在自身所在的P2P自治域内查找不到内容分片所在的目标节点时,向P2P自治域对应的云目录服务器发送内容分片查找请求,并根据云目录服务器反馈的目标节点的信息来获取内容服务,与现有技术相比,即使P2P自治域中出现P2P节点随机加入和随机退出的情况,也能通过云目录服务器使P2P自治域内的P2P节点获得内容服务,从而避免了现有技术中存在的P2P系统无法提供稳定可靠的内容服务的问题。In order to solve the problem in the prior art that the P2P system cannot provide stable and reliable services when a large number of nodes withdraw from the P2P system, an embodiment of the present invention provides a solution for providing content services. In this technical solution, when the P2P node cannot find the target node where the content fragment is located in the P2P autonomous domain where it is located, it sends a content fragment search request to the cloud directory server corresponding to the P2P autonomous domain, and according to the feedback from the cloud directory server Compared with the existing technology, even if P2P nodes randomly join and exit randomly in the P2P autonomous domain, the P2P nodes in the P2P autonomous domain can obtain content services through the cloud directory server, thereby The problem that the P2P system in the prior art cannot provide stable and reliable content services is avoided.
以下结合说明书附图对本发明的实施例进行说明,应当理解,此处所描述的实施例仅用于说明和解释本发明,并不用于限制本发明。并且在不冲突的情况下,本说明中的实施例及实施例的特征可以互相结合。The embodiments of the present invention will be described below in conjunction with the accompanying drawings. It should be understood that the embodiments described here are only used to illustrate and explain the present invention, and are not intended to limit the present invention. And in the case of no conflict, the embodiments and the features of the embodiments in this description can be combined with each other.
本发明实施例提供了一种提供内容服务的方法,如图1所示,为该方法的实现流程图,具体包括下述步骤:The embodiment of the present invention provides a method for providing content services, as shown in FIG. 1 , which is a flow chart for the implementation of the method, specifically including the following steps:
步骤11,当P2P节点在自身所在的P2P自治域内查找不到内容分片所在的目标节点时,向自身所在的P2P自治域对应的云目录服务器发送内容分片查找请求;Step 11, when the P2P node cannot find the target node where the content fragment is located in the P2P autonomous domain where it is located, send a content fragment search request to the cloud directory server corresponding to the P2P autonomous domain where it is located;
该步骤中,当P2P节点需要内容服务时,首先向自身所在的P2P自治域发送内容分片查找请求,可以按照现有的分布式哈希表(Distributed Hash Table,DHT)查找方式进行查找,当没有查找到内容分片所在的目标节点时,再向自身所在的P2P自治域对应的云目录服务器发送内容分片查找请求。In this step, when a P2P node needs content services, it first sends a search request for content fragmentation to the P2P autonomous domain where it is located. It can be searched according to the existing distributed hash table (Distributed Hash Table, DHT) search method. When When the target node where the content fragment is located is not found, it sends a content fragment search request to the cloud directory server corresponding to the P2P autonomous domain where it is located.
当P2P自治域中的P2P节点的数量比较多时,如果每一个P2P节点都要查找一遍,会需要比较长的查找时间,因此为了减少不必要的查找时间,当在预先设置的时间或者跳数内没有在自身所在的P2P自治域内查找到内容分片所在的目标节点时,便向自身所在的P2P自治域对应的云目录服务器发送内容分片查找请求。When the number of P2P nodes in the P2P autonomous domain is relatively large, if each P2P node needs to be searched once, it will take a relatively long search time. Therefore, in order to reduce unnecessary search time, when within the preset time or the number of hops When the target node where the content fragment is located is not found in the P2P autonomous domain where it is located, it sends a content fragment search request to the cloud directory server corresponding to the P2P autonomous domain where it is located.
步骤12,接收云目录服务器反馈的内容分片所在的目标节点的信息;Step 12, receiving the information of the target node where the content fragment is fed back by the cloud directory server;
本发明实施例中,云目录服务器是本发明实施例与现有的P2P系统相比新增的功能模块,该云目录服务器部署在云(服务器端的特定用语,将用户不可见、需要远程访问进行数据交换的部分称之为云)中,并且按照云的按需服务和可伸缩性的特点,当云目录服务器的负载过大时,按照云计算中提供的自动扩展方案,可以自动创建新的云目录服务器以及与新的云目录服务器对应的新的P2P自治域,并将负载过大的云目录服务器对应的P2P自治域中的部分P2P节点转移到新的P2P自治域中。In the embodiment of the present invention, the cloud directory server is a new functional module compared with the existing P2P system in the embodiment of the present invention. The data exchange part is called the cloud), and according to the on-demand service and scalability characteristics of the cloud, when the load of the cloud directory server is too large, according to the automatic expansion scheme provided in the cloud computing, a new one can be automatically created cloud directory server and a new P2P autonomous domain corresponding to the new cloud directory server, and transfer some P2P nodes in the P2P autonomous domain corresponding to the cloud directory server with excessive load to the new P2P autonomous domain.
在该步骤中,云目录服务器反馈的目标节点的信息指示的目标节点可以是P2P自治域中的P2P节点,也可以是P2P自治域之外的云中的数据节点。In this step, the target node indicated by the target node information fed back by the cloud directory server may be a P2P node in the P2P autonomous domain, or a data node in the cloud outside the P2P autonomous domain.
具体的,在云目录服务器中保存有对应的P2P自治域内的内容分片存储信息,该内容分片存储信息中包含内容分片和P2P节点之间的对应关系,因此可以快速查找到内容分片查找请求所请求的内容分片所在的P2P节点。Specifically, the content fragmentation storage information in the corresponding P2P autonomous domain is stored in the cloud directory server, and the content fragmentation storage information includes the corresponding relationship between the content fragmentation and the P2P node, so the content fragmentation can be quickly found Find the P2P node where the requested content fragment is located.
但是当云目录服务器根据内容分片存储信息也没有查找到相应的P2P节点,比如存储内容分片查找请求所请求的内容分片的P2P节点已退出该P2P自治域的情况时,根据云的特定,该云目录服务器可以将该内容分片查找请求发送给云中的内容管理服务器,由内容管理服务器从云中的数据节点中查找,并将查找到的数据节点的信息返回给云目录服务器,云目录服务器再将查找到的数据节点的信息反馈给P2P节点。However, when the cloud directory server does not find the corresponding P2P node according to the content fragment storage information, for example, when the P2P node storing the content fragment requested by the content fragment search request has left the P2P autonomous domain, according to the specific cloud , the cloud directory server can send the content fragment search request to the content management server in the cloud, and the content management server searches from the data nodes in the cloud, and returns the information of the found data nodes to the cloud directory server, The cloud directory server feeds back the information of the found data nodes to the P2P node.
步骤13,向目标节点的信息指示的目标节点发送内容服务请求,以获取内容分片。Step 13, sending a content service request to the target node indicated by the information of the target node, so as to obtain content fragments.
当P2P节点向目标节点发送内容服务请求,并收到目标节点提供的内容分片时,为了使该P2P自治域内的其它P2P节点后续可以方便的查找到该内容分片,本发明实施例还可以进一步包括:When the P2P node sends a content service request to the target node and receives the content fragment provided by the target node, in order to make other P2P nodes in the P2P autonomous domain find the content fragment conveniently, the embodiment of the present invention can also Further includes:
步骤14,P2P节点将从目标节点收到的内容分片进行存储;Step 14, the P2P node stores the content fragments received from the target node;
步骤15,P2P节点将自身和上述内容分片的对应关系发送给云目录服务器,以便云目录服务器能够根据该对应关系对预先保存的内容分片存储信息进行更新。Step 15, the P2P node sends the corresponding relationship between itself and the above-mentioned content fragments to the cloud directory server, so that the cloud directory server can update the pre-saved storage information of the content fragments according to the corresponding relationship.
下面以云目录服务器作为执行主体,对本发明实施例中提供的上述方法进行说明。The above-mentioned method provided in the embodiment of the present invention will be described below with the cloud directory server as the execution subject.
如图2所示,为本发明实施例中提供的一种基于云目录服务器的提供内容服务的方法的实现流程图。该方法包括下述步骤:As shown in FIG. 2 , it is an implementation flowchart of a method for providing content services based on a cloud directory server provided in an embodiment of the present invention. The method comprises the steps of:
步骤21,云目录服务器接收P2P节点发送的内容分片查找请求;Step 21, the cloud directory server receives the content fragment search request sent by the P2P node;
其中,该P2P节点在云目录服务器对应的P2P自治域中。Wherein, the P2P node is in the P2P autonomous domain corresponding to the cloud directory server.
步骤22,云目录服务器确定内容分片查找请求所请求的内容分片所在的目标节点;Step 22, the cloud directory server determines the target node where the content fragment requested by the content fragment search request is located;
具体的,该步骤可以包括:Specifically, this step may include:
云目录服务器根据预先保存的内容分片存储信息,在P2P自治域中查找内容分片查找所请求的内容分片所在的P2P节点;其中,内容分片存储信息中包含内容分片与P2P节点的对应关系;According to the pre-saved content fragment storage information, the cloud directory server searches the content fragment in the P2P autonomous domain to find the P2P node where the requested content fragment is located; wherein, the content fragment storage information includes the content fragment and the P2P node. Correspondence;
当在P2P自治域中查找到内容分片查找所请求的内容分片所在的P2P节点时,将查找到的P2P节点确定为目标节点;When finding the P2P node where the requested content fragment is located in the P2P autonomous domain, determine the found P2P node as the target node;
当在P2P自治域中没有查找到内容分片查找所请求的内容分片所在的P2P节点时,将该内容分片查找请求发送给内容管理服务器,由内容管理服务器查找该内容分片所在的数据节点,并将内容管理服务器查找到的数据节点确定为目标节点。When the P2P node where the content fragment requested by the content fragment search is not found in the P2P autonomous domain, the content fragment search request is sent to the content management server, and the content management server searches for the data where the content fragment is located. node, and determine the data node found by the content management server as the target node.
步骤23,云目录服务器将确定出的目标节点的信息发送给P2P节点,使P2P节点能够从确定出的目标节点的信息指示的目标节点上获取内容分片。In step 23, the cloud directory server sends the determined information of the target node to the P2P node, so that the P2P node can acquire content fragments from the target node indicated by the determined information of the target node.
为了使该P2P自治域内的其它P2P节点后续可以方便的查找到该内容分片,本发明实施例还可以进一步包括:In order to enable other P2P nodes in the P2P autonomous domain to find the content fragments conveniently, the embodiments of the present invention may further include:
步骤24,云目录服务器接收P2P节点发送的P2P节点与内容分片的对应关系;Step 24, the cloud directory server receives the corresponding relationship between the P2P node and the content fragment sent by the P2P node;
步骤25,云目录服务器根据上述对应关系对预先保存的内容分片存储信息进行更新。Step 25, the cloud directory server updates the pre-saved content segment storage information according to the above correspondence.
本发明实施例中,当P2P节点在自身所在的P2P自治域内查找不到内容分片所在的目标节点时,向P2P自治域对应的云目录服务器发送内容分片查找请求,并根据云目录服务器反馈的目标节点的信息来获取内容服务,与现有技术相比,即使P2P自治域中的P2P节点大量退出,也能通过云目录服务器使P2P自治域内的P2P节点获得内容服务,从而解决了现有技术中当大量节点退出P2P系统时存在的P2P系统无法提供稳定可靠的服务的问题。In the embodiment of the present invention, when the P2P node cannot find the target node where the content fragment is located in the P2P autonomous domain where it is located, it sends a content fragment search request to the cloud directory server corresponding to the P2P autonomous domain, and according to the cloud directory server feedback Compared with the existing technology, even if a large number of P2P nodes in the P2P autonomous domain exit, the P2P nodes in the P2P autonomous domain can obtain content services through the cloud directory server, thereby solving the existing In technology, when a large number of nodes withdraw from the P2P system, there is a problem that the P2P system cannot provide stable and reliable services.
下面针对上述方法在实际应用中的具体实现过程进行详细说明。The specific implementation process of the above method in practical application will be described in detail below.
如图3所示,为在实际应用中用于实现上述方法的系统的总体架构图。该系统分为两大部分,一部分在云中,包括内容管理服务器、数据节点和云目录服务器等;另一部分在P2P自治域(Z1,Z2,…,Zn)中,包括多个P2P节点,该系统的架构详细介绍如下:As shown in FIG. 3 , it is an overall architecture diagram of a system for implementing the above method in practical applications. The system is divided into two parts, one part is in the cloud, including content management server, data node and cloud directory server, etc.; the other part is in the P2P autonomous domain (Z1, Z2, ..., Zn), including multiple P2P nodes, the The system architecture is described in detail as follows:
1、至少一个P2P自治域。每个P2P自治域内可以包含连接到网络上的不同类型的P2P节点,比如个人计算机、笔记本电脑、平板电脑和手机等。这些P2P节点可以是胖客户端,也可以是瘦客户端,根据配置不同以及用户的意愿,在作为服务提供者时,提供的资源情况不同。P2P自治域可以根据用户的兴趣、关注和朋友圈等组成。其中,P2P自治域内的P2P节点按照P2P系统的网络拓扑结构连接。1. At least one P2P autonomous domain. Each P2P autonomous domain can contain different types of P2P nodes connected to the network, such as personal computers, notebook computers, tablet computers, and mobile phones. These P2P nodes can be fat clients or thin clients, and according to different configurations and user wishes, when serving as service providers, the resources they provide are different. The P2P autonomous domain can be formed according to the user's interests, concerns and circle of friends. Wherein, the P2P nodes in the P2P autonomous domain are connected according to the network topology of the P2P system.
2、云目录服务器。每个P2P自治域对应一个云目录服务器。云目录服务器部署在云中,并且按照云的按需服务和可伸缩性的特点,当云目录服务器的负载(可以包括内存和网络带宽等)过大时,按照云计算中提供的自动扩展方案,可以自动创建新的云目录服务器以及与新的云目录服务器对应的新的P2P自治域,并将负载过大的云目录服务器对应的P2P自治域中的部分P2P节点转移到新的P2P自治域中;而当云目录服务器对应的P2P自治域中的P2P节点小于预先设置的数量时,会降低该P2P自治域的自服务性能,大量的内容分片都需要从数据节点来请求,增加了云目录服务器和数据节点的负载,因此可将该P2P自治域和其他P2P自治域合并。2. Cloud directory server. Each P2P autonomous domain corresponds to a cloud directory server. The cloud directory server is deployed in the cloud, and according to the on-demand service and scalability characteristics of the cloud, when the load of the cloud directory server (including memory and network bandwidth, etc.) is too large, according to the automatic expansion scheme provided in cloud computing , can automatically create a new cloud directory server and a new P2P autonomous domain corresponding to the new cloud directory server, and transfer some P2P nodes in the P2P autonomous domain corresponding to the cloud directory server with an excessive load to the new P2P autonomous domain Medium; and when the number of P2P nodes in the P2P autonomous domain corresponding to the cloud directory server is less than the preset number, the self-service performance of the P2P autonomous domain will be reduced, and a large number of content fragments need to be requested from the data nodes, increasing the cloud The load of the directory server and the data node, so the P2P autonomous domain can be merged with other P2P autonomous domains.
3、内容管理服务器和数据节点。内容管理服务器记录管理文件系统所有的元数据,以及内容分片当前所在的数据节点的位置。数据节点把内容分片保存在本地硬盘上,为保证可靠性,每个内容分片会被复制到多个数据节点上。当内容源发布某一内容时,将内容发布请求发送到内容管理服务器,内容管理服务器负责分配内容分片的标识ID以及针对每个内容分片而指定数据节点,之后,内容源向每个数据节点上传对应的内容分片,上传结束后,数据节点向内容管理服务器汇报已保存内容分片。3. Content management server and data nodes. The content management server records and manages all the metadata of the file system, as well as the location of the data node where the content fragment currently resides. The data node saves the content fragments on the local hard disk. To ensure reliability, each content fragment will be copied to multiple data nodes. When a content source publishes a certain content, the content release request is sent to the content management server, and the content management server is responsible for assigning the identification ID of the content fragment and specifying a data node for each content fragment. After that, the content source sends each data The node uploads the corresponding content fragments, and after the upload is completed, the data node reports the saved content fragments to the content management server.
4、P2P自治域和云环境。P2P节点向自身所在的P2P自治域发起某一内容分片查找请求,当在P2P自治域内找不到该内容分片时,云目录服务器向内容管理服务器发送该内容分片查找请求,内容管理服务器将该内容分片所在的数据节点的信息返回给云目录服务器,云目录服务器将该信息返回发送内容分片查找请求的P2P节点,该P2P节点向该信息指示的数据节点发送内容服务请求,得到内容分片后,将该内容分片存在本地硬盘。当某一内容分片在云中请求次数达到一定数量,可能造成其所在数据节点出现瓶颈时,根据云的可伸缩特性,可添加新的数据节点存储该内容分片并提供内容服务;而当P2P自治域内的自服务性能较好时,数据节点收到的内容服务请求较少时,可以相应的删除负载过小的数据节点,以充分利用每个数据节点的资源,减少资源浪费。4. P2P autonomous domain and cloud environment. The P2P node initiates a content fragment search request to the P2P autonomous domain where it is located. When the content fragment cannot be found in the P2P autonomous domain, the cloud directory server sends the content fragment search request to the content management server, and the content management server The information of the data node where the content fragment is located is returned to the cloud directory server, and the cloud directory server returns the information to the P2P node that sends the content fragment search request, and the P2P node sends a content service request to the data node indicated by the information, and obtains After the content is fragmented, store the content fragments on the local hard disk. When the number of requests for a content fragment in the cloud reaches a certain number, which may cause a bottleneck in the data node where it is located, according to the scalability characteristics of the cloud, a new data node can be added to store the content fragment and provide content services; and when When the self-service performance in the P2P autonomous domain is good and the data nodes receive fewer content service requests, the data nodes with too small load can be deleted accordingly to make full use of the resources of each data node and reduce resource waste.
如图4所示,为基于上述系统的内容发布流程图。该过程的具体实现过程如下:As shown in FIG. 4 , it is a flow chart of publishing content based on the above system. The specific implementation process of this process is as follows:
步骤41,当内容源发布某一内容时,向内容管理服务器发送内容分布请求;Step 41, when the content source publishes a certain content, send a content distribution request to the content management server;
步骤42,内容管理服务器将内容分片的标识ID以及针对每个内容分片而指定的数据节点返回给内容源;Step 42, the content management server returns the identification ID of the content fragment and the data node specified for each content fragment to the content source;
步骤43,内容源向指定的数据节点写入相应的内容分片;Step 43, the content source writes the corresponding content fragment to the specified data node;
步骤44,指定的数据节点和备份的数据节点按照流水线的方式传送内容分片,实现备份;Step 44, the designated data node and the backup data node transmit content fragments in a pipelined manner to realize backup;
步骤45,保存有内容分片的数据节点向内容管理服务器反馈已保存内容分片;Step 45, the data node storing the content fragments feeds back the stored content fragments to the content management server;
步骤46,内容分片全部传输完毕后,内容管理服务器向web服务器发布内容,使用户可以通过web服务器查看系统可提供的内容服务。Step 46, after all the content fragments are transmitted, the content management server publishes the content to the web server, so that the user can view the content services that the system can provide through the web server.
如图5所示,为基于上述系统的提供内容服务流程图。该过程的具体实现过程如下:As shown in FIG. 5 , it is a flow chart of providing content services based on the above system. The specific implementation process of this process is as follows:
步骤51,P2P节点向自身所在的P2P自治域发送内容分片查找请求,在预先设置的跳数或时间内,没有查找到内容分片所在的目标节点时,向P2P自治域对应的云目录服务器发送内容分片查找请求;Step 51, the P2P node sends a content fragment search request to the P2P autonomous domain where it is located, and when the target node where the content fragment is located is not found within the preset hop count or time, it sends a request to the cloud directory server corresponding to the P2P autonomous domain Send a content shard lookup request;
步骤52,云目录服务器根据预先保存的内容分片存储信息,在P2P自治域中查找该内容分片所在的P2P节点;当查找到时,执行步骤59,否则继续执行步骤53;Step 52, the cloud directory server searches the P2P node where the content fragment is located in the P2P autonomous domain according to the pre-saved content fragment storage information; when found, execute step 59, otherwise continue to execute step 53;
步骤53,将内容分片查找请求发送给内容管理服务器;Step 53, sending the content segment search request to the content management server;
步骤54,内容管理服务器确定该内容分片所在的目标数据节点,并将确定出的目标数据节点的信息给云目录服务器;Step 54, the content management server determines the target data node where the content fragment is located, and sends the determined information of the target data node to the cloud directory server;
步骤55,云目录服务器将该信息发送给发出内容分片查询请求的P2P节点;Step 55, the cloud directory server sends the information to the P2P node that sends the query request for content fragmentation;
步骤56,该P2P节点向该信息指示的目标数据节点发起内容服务请求;Step 56, the P2P node initiates a content service request to the target data node indicated by the information;
步骤57,目标数据节点将内容分片发送给该P2P节点;Step 57, the target data node sends the content fragment to the P2P node;
步骤58,该P2P节点接收到内容分片后,将该内容分片存储在本地,继续执行步骤512;Step 58, after receiving the content fragment, the P2P node stores the content fragment locally, and continues to execute step 512;
步骤59,云目录服务器将内容分片所在的目标P2P节点的信息发送给发出内容分片查询请求的P2P节点;Step 59, the cloud directory server sends the information of the target P2P node where the content fragment is located to the P2P node that sends the content fragment query request;
步骤510,该P2P节点向该信息指示的目标P2P节点发起内容服务请求;Step 510, the P2P node initiates a content service request to the target P2P node indicated by the information;
步骤511,目标P2P节点将内容分片发送给该P2P节点;Step 511, the target P2P node sends the content fragment to the P2P node;
步骤512,该P2P节点向其所在P2P自治域的云目录服务器汇报该内容分片存储信息。Step 512, the P2P node reports the content segment storage information to the cloud directory server in the P2P autonomous domain where it is located.
本发明实施例中,当P2P节点在自身所在的P2P自治域内查找不到内容分片所在的目标节点时,向P2P自治域对应的云目录服务器发送内容分片查找请求,并根据云目录服务器反馈的目标节点的信息来获取内容服务,与现有技术相比,即使P2P自治域中的P2P节点大量退出,也能通过云目录服务器使P2P自治域内的P2P节点获得内容服务,从而解决了现有技术中当大量节点退出P2P系统时存在的P2P系统无法提供稳定可靠的服务的问题。In the embodiment of the present invention, when the P2P node cannot find the target node where the content fragment is located in the P2P autonomous domain where it is located, it sends a content fragment search request to the cloud directory server corresponding to the P2P autonomous domain, and according to the cloud directory server feedback Compared with the existing technology, even if a large number of P2P nodes in the P2P autonomous domain exit, the P2P nodes in the P2P autonomous domain can obtain content services through the cloud directory server, thereby solving the existing In technology, when a large number of nodes withdraw from the P2P system, there is a problem that the P2P system cannot provide stable and reliable services.
同时,本发明实施例提供的上述方案与P2P系统相比,还具有内容服务的控制管理能力。通过对存储于云中的资源的管理,对云服务提供商,通常是一些大型企业进行监督,更容易对内容的版权和纯粹性进行管理。一些大众化的公共内容资源也可以通过云服务中的共享实现。At the same time, compared with the P2P system, the above solution provided by the embodiment of the present invention also has the ability to control and manage content services. Through the management of resources stored in the cloud, cloud service providers, usually some large enterprises, are supervised, making it easier to manage the copyright and purity of content. Some popular public content resources can also be realized through sharing in cloud services.
本发明实施例提供的上述方案与云计算相比,能够提供内容的分布存储,利用P2P去中心化和自服务的特点,将资源分布存储到各个P2P节点上,而不是集中存储在云中的数据节点,有效利用客户端资源,减少云中的数据节点资源和网络带宽的瓶颈。Compared with cloud computing, the above solution provided by the embodiment of the present invention can provide distributed storage of content, utilize the characteristics of P2P decentralization and self-service, and distribute and store resources on each P2P node instead of centralized storage in the cloud Data nodes effectively utilize client resources and reduce bottlenecks in data node resources and network bandwidth in the cloud.
基于上述构思,本发明实施例还提供了一种P2P节点,如图6所示,为该P2P节点的结构示意图,包括:Based on the above concept, an embodiment of the present invention also provides a P2P node, as shown in FIG. 6, which is a schematic structural diagram of the P2P node, including:
内容分片查找请求发送单元61,用于当对等网络P2P节点在自身所在的P2P自治域内查找不到内容分片所在的目标节点时,向所述P2P自治域对应的云目录服务器发送内容分片查找请求;The content fragment search request sending unit 61 is used to send the content fragment to the cloud directory server corresponding to the P2P autonomous domain when the peer-to-peer network P2P node cannot find the target node where the content fragment is located in the P2P autonomous domain where it is located. slice lookup request;
接收单元62,用于接收所述云目录服务器反馈的所述内容分片所在的目标节点的信息;A receiving unit 62, configured to receive the information of the target node where the content fragment is fed back by the cloud directory server;
内容服务请求发送单元63,用于向接收单元62接收到的所述目标节点的信息指示的目标节点发送内容服务请求,以获取所述内容分片。The content service request sending unit 63 is configured to send a content service request to the target node indicated by the target node information received by the receiving unit 62, so as to obtain the content fragment.
其中,所述目标节点的信息指示的目标节点可以为:Wherein, the target node indicated by the information of the target node may be:
所述P2P自治域中的P2P节点,或者所述P2P自治域外的数据节点。A P2P node in the P2P autonomous domain, or a data node outside the P2P autonomous domain.
其中,所述内容分片查找请求发送单元61,可以具体用于:Wherein, the content segment search request sending unit 61 can be specifically used for:
当所述P2P节点在预先设置的时间或跳数内没有在自身所在的P2P自治域内查找到内容分片所在的目标节点时,向所述云目录服务器发送内容分片查找请求。When the P2P node fails to find the target node where the content fragment is located in the P2P autonomous domain where it is located within the preset time or hop count, it sends a content fragment search request to the cloud directory server.
进一步的,所述P2P节点还可以包括:Further, the P2P node may also include:
存储单元64,用于将从所述目标节点收到的内容分片进行存储;a storage unit 64, configured to store content fragments received from the target node;
对应关系发送单元65,用于将自身与所述内容分片的对应关系发送给所述云目录服务器,以便所述云目录服务器能够根据所述对应关系对预先保存的内容分片存储信息进行更新。The correspondence sending unit 65, configured to send the correspondence between itself and the content fragment to the cloud directory server, so that the cloud directory server can update the pre-saved content fragment storage information according to the correspondence .
基于上述构思,本发明实施例还提供了一种云目录服务器,如图7所示,为该云目录服务器的结构示意图,包括:Based on the above concept, an embodiment of the present invention also provides a cloud directory server, as shown in FIG. 7 , which is a schematic structural diagram of the cloud directory server, including:
内容分片查找请求接收单元71,用于接收P2P节点发送的内容分片查找请求;所述P2P节点在所述云目录服务器对应的P2P自治域中;A content fragment search request receiving unit 71, configured to receive a content fragment search request sent by a P2P node; the P2P node is in the P2P autonomous domain corresponding to the cloud directory server;
目标节点确定单元72,用于确定内容分片查找请求接收单元71接收的所述内容分片查找请求所请求的内容分片所在的目标节点;A target node determination unit 72, configured to determine the target node where the content segment requested by the content segment search request received by the content segment search request receiving unit 71 is located;
信息发送单元73,用于将目标节点确定单元72确定出的目标节点的信息发送给所述P2P节点,使所述P2P节点能够从确定出的目标节点的信息指示的目标节点中获取内容分片。An information sending unit 73, configured to send the information of the target node determined by the target node determining unit 72 to the P2P node, so that the P2P node can obtain content fragments from the target node indicated by the determined information of the target node .
其中,所述目标节点确定单元72,可以具体包括:Wherein, the target node determining unit 72 may specifically include:
查找模块721,用于根据预先保存的内容分片存储信息,在所述P2P自治域中查找所述内容分片所在的P2P节点;所述内容分片存储信息中包含内容分片与P2P节点的对应关系;The search module 721 is configured to search for the P2P node where the content fragment is located in the P2P autonomous domain according to the pre-saved content fragment storage information; the content fragment storage information includes the information of the content fragment and the P2P node Correspondence;
目标节点第一确定模块722,用于当查找模块721在所述P2P自治域中查找到所述内容分片所在的P2P节点时,将查找到的P2P节点确定为所述目标节点;The first target node determination module 722 is configured to determine the found P2P node as the target node when the search module 721 finds the P2P node where the content fragment is located in the P2P autonomous domain;
目标节点第二确定模块723,用于当查找模块721在所述P2P自治域中没有查找到所述内容分片所在的P2P节点时,将所述内容分片查找请求发送给内容管理服务器,由所述内容管理服务器查找所述内容分片所在的数据节点;并将所述内容管理服务器查找到的数据节点确定为所述目标节点。The second determination module 723 of the target node is configured to send the content fragment search request to the content management server when the search module 721 does not find the P2P node where the content fragment is located in the P2P autonomous domain, and the The content management server searches for the data node where the content fragment is located; and determines the data node found by the content management server as the target node.
进一步的,所述云目录服务器还可以包括:Further, the cloud directory server may also include:
对应关系接收单元74,用于接收所述P2P节点发送的所述P2P节点与所述内容分片的对应关系;A correspondence relationship receiving unit 74, configured to receive the correspondence relationship between the P2P node and the content fragment sent by the P2P node;
更新单元75,用于根据对应关系接收单元74接收的所述对应关系对预先保存的内容分片存储信息进行更新。The updating unit 75 is configured to update the pre-saved content segment storage information according to the corresponding relationship received by the corresponding relationship receiving unit 74 .
基于上述构思,本发明实施例还提供了一种提供内容服务的系统,如图8所示,为该系统的结构示意图,包括:至少一个P2P自治域和与每个P2P自治域分别对应的云目录服务器81,且每个P2P自治域中包含多个P2P节点82,其中:Based on the above idea, the embodiment of the present invention also provides a system for providing content services, as shown in Figure 8, which is a schematic structural diagram of the system, including: at least one P2P autonomous domain and a cloud corresponding to each P2P autonomous domain Directory server 81, and each P2P autonomous domain contains multiple P2P nodes 82, wherein:
所述P2P节点82,用于当在自身所在的P2P自治域内查找不到内容分片所在的目标节点时,向自身所在的P2P自治域对应的云目录服务器81发送内容分片查找请求;接收所述云目录服务器81反馈的所述内容分片所在的目标节点的信息;向所述目标节点的信息指示的目标节点发送内容服务请求,以获取所述内容分片;The P2P node 82 is used to send a search request for content fragmentation to the cloud directory server 81 corresponding to the P2P autonomous domain where it is located when it cannot find the target node where the content fragmentation is located in the P2P autonomous domain where it is located; The information of the target node where the content fragment is fed back by the cloud directory server 81; sending a content service request to the target node indicated by the information of the target node to obtain the content fragment;
所述云目录服务器81,用于接收所述P2P节点82发送的内容分片查找请求;确定所述内容分片查找请求所请求的内容分片所在的目标节点;并将确定出的目标节点的信息发送给所述P2P节点82。The cloud directory server 81 is configured to receive the content fragment search request sent by the P2P node 82; determine the target node where the content fragment requested by the content fragment search request is located; The information is sent to the P2P node 82.
其中,所述系统还可以包括:内容管理服务器83和数据节点84;则Wherein, the system may also include: a content management server 83 and a data node 84; then
所述云目录服务器81,具体用于:The cloud directory server 81 is specifically used for:
根据预先保存的内容分片存储信息,在所述P2P自治域中查找所述内容分片所在的P2P节点;所述内容分片存储信息中包含内容分片与P2P节点的对应关系;当在所述P2P自治域中查找到所述内容分片所在的P2P节点时,将查找到的P2P节点确定为所述目标节点;当在所述P2P自治域中没有查找到所述内容分片所在的P2P节点时,将所述内容分片查找请求发送给内容管理服务器83,由所述内容管理服务器83查找所述内容分片所在的数据节点84;并将所述内容管理服务器83查找到的数据节点84确定为所述目标节点。According to the pre-saved content fragment storage information, search the P2P node where the content fragment is located in the P2P autonomous domain; the content fragment storage information includes the corresponding relationship between the content fragment and the P2P node; when in the P2P autonomous domain When the P2P node where the content fragment is located is found in the P2P autonomous domain, the P2P node found is determined as the target node; when the P2P node where the content fragment is located is not found in the P2P autonomous domain node, the content fragment search request is sent to the content management server 83, and the content management server 83 searches for the data node 84 where the content fragment is located; and the data node found by the content management server 83 84 is determined as the target node.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can 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, etc.) 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 should be understood that each procedure and/or block in the flowchart and/or block diagram, and combinations of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a Means for realizing the functions specified in one or more steps of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart flow or flows and/or block diagram block or blocks.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。While preferred embodiments of the invention have been described, additional changes and modifications to these embodiments can be made by those skilled in the art once the basic inventive concept is appreciated. Therefore, it is intended that the appended claims be construed to cover the preferred embodiment as well as all changes and modifications which fall within the scope of the invention.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention also intends to include these modifications and variations.
Claims (16)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310745720.6A CN104753873A (en) | 2013-12-30 | 2013-12-30 | Content service providing method, device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310745720.6A CN104753873A (en) | 2013-12-30 | 2013-12-30 | Content service providing method, device and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104753873A true CN104753873A (en) | 2015-07-01 |
Family
ID=53592991
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310745720.6A Pending CN104753873A (en) | 2013-12-30 | 2013-12-30 | Content service providing method, device and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104753873A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110932920A (en) * | 2020-01-23 | 2020-03-27 | 飞诺门阵(北京)科技有限公司 | Network topology structure |
US11706076B2 (en) | 2020-01-23 | 2023-07-18 | Novnet Computing System Tech Co., Ltd. | Computer system with computing devices, communication device, task processing device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101123565A (en) * | 2007-07-30 | 2008-02-13 | 中兴通讯股份有限公司 | P2P system and resource query method used in the system |
EP2091184A1 (en) * | 2007-04-19 | 2009-08-19 | Huawei Technologies Co., Ltd. | Method and system for publishing the content, method and system for querying the content |
CN101567796A (en) * | 2009-05-19 | 2009-10-28 | 中兴通讯股份有限公司 | Multimedia network with fragmented content and business method thereof |
CN101958827A (en) * | 2009-07-14 | 2011-01-26 | 中国科学院声学研究所 | A network system for P2P traffic optimization |
CN102611622A (en) * | 2012-02-28 | 2012-07-25 | 清华大学 | Dispatching method for working load of elastic cloud computing platform |
CN102833169A (en) * | 2012-09-04 | 2012-12-19 | 桂林电子科技大学 | Peer-to-peer network target resource location method of constant complexity |
CN103257683A (en) * | 2013-05-07 | 2013-08-21 | 华为技术有限公司 | Method and device of cloud calculation service expansion and contraction |
-
2013
- 2013-12-30 CN CN201310745720.6A patent/CN104753873A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2091184A1 (en) * | 2007-04-19 | 2009-08-19 | Huawei Technologies Co., Ltd. | Method and system for publishing the content, method and system for querying the content |
CN101123565A (en) * | 2007-07-30 | 2008-02-13 | 中兴通讯股份有限公司 | P2P system and resource query method used in the system |
CN101567796A (en) * | 2009-05-19 | 2009-10-28 | 中兴通讯股份有限公司 | Multimedia network with fragmented content and business method thereof |
CN101958827A (en) * | 2009-07-14 | 2011-01-26 | 中国科学院声学研究所 | A network system for P2P traffic optimization |
CN102611622A (en) * | 2012-02-28 | 2012-07-25 | 清华大学 | Dispatching method for working load of elastic cloud computing platform |
CN102833169A (en) * | 2012-09-04 | 2012-12-19 | 桂林电子科技大学 | Peer-to-peer network target resource location method of constant complexity |
CN103257683A (en) * | 2013-05-07 | 2013-08-21 | 华为技术有限公司 | Method and device of cloud calculation service expansion and contraction |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110932920A (en) * | 2020-01-23 | 2020-03-27 | 飞诺门阵(北京)科技有限公司 | Network topology structure |
CN110932920B (en) * | 2020-01-23 | 2021-02-02 | 飞诺门阵(北京)科技有限公司 | Network topology structure |
US11706076B2 (en) | 2020-01-23 | 2023-07-18 | Novnet Computing System Tech Co., Ltd. | Computer system with computing devices, communication device, task processing device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11102290B2 (en) | Peer-to-peer network prioritizing propagation of objects through the network | |
US9405781B2 (en) | Virtual multi-cluster clouds | |
Monga et al. | ElfStore: A resilient data storage service for federated edge and fog resources | |
CN110703980B (en) | A file transmission method and device | |
US10708350B2 (en) | Method and system for content delivery of mobile terminal applications | |
US20140229582A1 (en) | System And Method For Offline Downloading Network Resource Files | |
KR20120018178A (en) | Swarm-based synchronization of networked object stores | |
TW201405324A (en) | Cloud storage system and data storage and sharing method based on the system | |
CN107547653A (en) | A kind of distributed file storage system | |
CN104618506A (en) | Crowd-sourced content delivery network system, method and device | |
CN102708165A (en) | Method and device for processing files in distributed file system | |
WO2010127618A1 (en) | System and method for implementing streaming media content service | |
US20140143339A1 (en) | Method, apparatus, and system for resource sharing | |
CN101741869B (en) | Method and system for providing contents | |
CN101594316B (en) | Management method, content query method, system and device of distributed network | |
CN110990448B (en) | A fault-tolerant distributed query method and device | |
CN111046065A (en) | Scalable high-performance distributed query processing method and device | |
CN108540510B (en) | A cloud host creation method, device and cloud service system | |
CN110347656A (en) | The management method and device requested in document storage system | |
CN115004665B (en) | File sharing method, device and system | |
CN115811515A (en) | File access method and system based on fragments under edge cloud environment | |
CN118283059B (en) | Mirror image data processing method, DPU and system | |
Matri et al. | Keeping up with storage: Decentralized, write-enabled dynamic geo-replication | |
US20130054691A1 (en) | Flexible rule based multi-protocol peer-to-peer caching | |
CN104753873A (en) | Content service providing method, device and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150701 |
|
RJ01 | Rejection of invention patent application after publication |