[go: up one dir, main page]

CN107959704B - Data processing method and home gateway - Google Patents

Data processing method and home gateway Download PDF

Info

Publication number
CN107959704B
CN107959704B CN201610907771.8A CN201610907771A CN107959704B CN 107959704 B CN107959704 B CN 107959704B CN 201610907771 A CN201610907771 A CN 201610907771A CN 107959704 B CN107959704 B CN 107959704B
Authority
CN
China
Prior art keywords
resource data
notification
terminal
home gateway
node
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
CN201610907771.8A
Other languages
Chinese (zh)
Other versions
CN107959704A (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.)
China Mobile Communications Group Co Ltd
Research Institute of China Mobile Communication Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
Research Institute of China Mobile Communication 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 China Mobile Communications Group Co Ltd, Research Institute of China Mobile Communication Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201610907771.8A priority Critical patent/CN107959704B/en
Publication of CN107959704A publication Critical patent/CN107959704A/en
Application granted granted Critical
Publication of CN107959704B publication Critical patent/CN107959704B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • 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/1087Peer-to-peer [P2P] networks using cross-functional networking aspects
    • H04L67/1093Some peer nodes performing special functions
    • 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/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种数据处理方法,包括:家庭网关接收第一通知;所述第一通知用于通知所述家庭网关所述第一终端要获取第一资源数据;所述第一终端为所述家庭网关下连的终端,且作为对等P2P节点时能够为P2P网络中的其他P2P节点提供服务;响应所述第一通知,当所述第一终端接收所述第一资源数据时,家庭网关获取经过自身的所述第一资源数据;在本地保存获取的所述第一资源数据,并将所述第一资源数据信息同步至服务器,以使所述家庭网关能够为所述其他P2P节点提供针对所述第一资源数据的服务。本发明同时还公开了一种家庭网关。

Figure 201610907771

The invention discloses a data processing method, comprising: a home gateway receives a first notification; the first notification is used to notify the home gateway that the first terminal needs to acquire first resource data; The terminal connected to the home gateway, and can provide services for other P2P nodes in the P2P network as a peer P2P node; in response to the first notification, when the first terminal receives the first resource data, the home The gateway acquires the first resource data passing through itself; locally saves the acquired first resource data, and synchronizes the information of the first resource data to the server, so that the home gateway can be used for the other P2P nodes A service is provided for the first resource data. The invention also discloses a home gateway.

Figure 201610907771

Description

一种数据处理方法及家庭网关A data processing method and home gateway

技术领域technical field

本发明涉及内容分发网络(CDN,Content Delivery Network),尤其涉及一种数据处理方法及家庭网关。The present invention relates to a content distribution network (CDN, Content Delivery Network), in particular to a data processing method and a home gateway.

背景技术Background technique

对等连接内容分发网络(P2P CDN,Peer to Peer CDN)技术是利用用户设备作为CDN内容服务边缘节点为其他用户服务的新型CDN技术。P2P CDN的核心思想是利用用户资源,通过彼此身份对等的用户终端设备来实现用户设备彼此之间的内容分发服务,即由不同用户设备作为不同的P2P节点来为其他用户设备的视频服务请求提供视频内容分发服务,这不同于传统CDN的由内容服务边缘节点服务器为用户设备的视频服务请求提供服务的客户端/服务器(C/S)传输模型。Peer-to-peer content distribution network (P2P CDN, Peer to Peer CDN) technology is a new CDN technology that uses user equipment as an edge node for CDN content service to serve other users. The core idea of P2P CDN is to use user resources to realize the content distribution service between user equipments through user terminal equipment with equal identities. That is, different user equipments serve as different P2P nodes to request video services for other user equipments. Provides video content distribution service, which is different from the client/server (C/S) transmission model of traditional CDN in which the content service edge node server serves the video service request of the user equipment.

在P2P CDN中,每个接收视频的P2P客户端接收视频内容时,也同时作为服务者为其他尝试接收该视频的用户提供服务能力,但由于每个终端设备服务能力有限,因此一个P2P客户端(作为P2P节点)一般仅能为2-3个其他P2P节点提供服务,从而大大影响了P2P系统的服务能力。In P2P CDN, when each P2P client receiving video receives video content, it also acts as a server to provide service capabilities for other users who try to receive the video. However, due to the limited service capabilities of each terminal device, a P2P client (as a P2P node) can generally only provide services for 2-3 other P2P nodes, thus greatly affecting the service capability of the P2P system.

发明内容SUMMARY OF THE INVENTION

为解决现有存在的技术问题,本发明实施例提供一种数据处理方法及家庭网关。In order to solve the existing technical problems, the embodiments of the present invention provide a data processing method and a home gateway.

本发明实施例的技术方案是这样实现的:The technical solution of the embodiment of the present invention is realized as follows:

本发明实施例提供了一种数据处理方法,应用于家庭网关,包括:An embodiment of the present invention provides a data processing method, applied to a home gateway, including:

接收第一通知;所述第一通知用于通知所述家庭网关所述第一终端要获取第一资源数据;所述第一终端为所述家庭网关下连的终端,且作为对等(P2P,Peer to Peer)节点时能够为P2P网络中的其他P2P节点提供服务;Receive a first notification; the first notification is used to notify the home gateway that the first terminal needs to acquire first resource data; the first terminal is a terminal connected to the home gateway, and acts as a peer-to-peer (P2P) , Peer to Peer) node can provide services for other P2P nodes in the P2P network;

响应所述第一通知,当所述第一终端接收所述第一资源数据时,获取经过自身的所述第一资源数据;In response to the first notification, when the first terminal receives the first resource data, obtain the first resource data that has passed through itself;

在本地保存获取的所述第一资源数据,并将所述第一资源数据信息同步至服务器,以使所述家庭网关能够为所述其他P2P节点提供针对所述第一资源数据的服务。The acquired first resource data is stored locally, and the information of the first resource data is synchronized to the server, so that the home gateway can provide services for the first resource data for the other P2P nodes.

上述方案中,所述接收第一通知,包括:In the above solution, the receiving the first notification includes:

接收所述第一终端直接发送的第一通知。A first notification directly sent by the first terminal is received.

上述方案中,所述接收第一通知,包括:In the above solution, the receiving the first notification includes:

接收所述服务器发送的第一通知;所述服务器发送的第一通知为对所述第一终端发送给所述服务器的通知进行与所述第一资源数据对应的服务信息处理后的通知或为将所述第一终端发送给所述服务器的通知直接转发的通知。Receive the first notification sent by the server; the first notification sent by the server is a notification after processing the service information corresponding to the first resource data on the notification sent by the first terminal to the server or is A notification that directly forwards the notification sent by the first terminal to the server.

上述方案中,获取经过自身的所述第一资源数据之前,所述方法还包括:In the above solution, before acquiring the first resource data passing through itself, the method further includes:

接收所述第一终端发送的第一信息;所述第一信息表征所述第一资源数据的传输相关信息;receiving first information sent by the first terminal; the first information represents transmission-related information of the first resource data;

相应地,所述获取经过自身的所述第一资源数据,包括:Correspondingly, the acquiring the first resource data passing through itself includes:

利用所述第一信息,从经过自身的数据包中筛选出所述第一资源数据的数据包;Using the first information, filter out the data packets of the first resource data from the data packets passing through itself;

解析筛选出的数据包,得到所述第一资源数据。The filtered data packets are parsed to obtain the first resource data.

上述方案中,所述第一终端根据用户操作选择请求的业务内容,且向服务器请求所述第一资源数据的提供者之前,所述家庭网关接收第一通知。In the above solution, the home gateway receives the first notification before the first terminal selects the requested service content according to the user operation, and requests the server for the provider of the first resource data.

上述方案中,所述第一终端从服务器获取到所述第一资源数据的提供者后,且在向对应的提供者请求所述第一资源数据之前,所述家庭网关接收第一通知。In the above solution, the home gateway receives the first notification after the first terminal obtains the provider of the first resource data from the server and before requesting the first resource data from the corresponding provider.

本发明实施例还提供了一种家庭网关,包括:The embodiment of the present invention also provides a home gateway, including:

接收单元,用于接收第一通知;所述第一通知用于通知所述家庭网关所述第一终端要获取第一资源数据;所述第一终端为所述家庭网关下连的终端,且作为P2P节点时能够为P2P网络中的其他P2P节点提供服务;a receiving unit, configured to receive a first notification; the first notification is used to notify the home gateway that the first terminal needs to acquire first resource data; the first terminal is a terminal connected to the home gateway, and As a P2P node, it can provide services for other P2P nodes in the P2P network;

获取单元,用于响应所述第一通知,当所述第一终端接收所述第一资源数据时,获取经过自身的所述第一资源数据;an acquiring unit, configured to, in response to the first notification, acquire the first resource data passing through itself when the first terminal receives the first resource data;

同步单元,用于在本地保存获取的所述第一资源数据;并将所述第一资源数据信息同步至服务器,以使所述家庭网关能够为所述其他P2P节点提供针对所述第一资源数据的服务。a synchronization unit, configured to locally save the acquired first resource data; and synchronize the information of the first resource data to a server, so that the home gateway can provide the other P2P nodes with information about the first resource data services.

上述方案中,所述接收单元,具体用于:In the above scheme, the receiving unit is specifically used for:

接收所述第一终端直接发送的第一通知;receiving a first notification directly sent by the first terminal;

或者,or,

接收所述服务器发送的第一通知;所述服务器发送的第一通知为对所述第一终端发送给所述服务器的通知进行与所述第一资源数据对应的服务信息处理后的通知或为将所述第一终端发送给所述服务器的通知直接转发的通知。Receive the first notification sent by the server; the first notification sent by the server is a notification after processing the service information corresponding to the first resource data on the notification sent by the first terminal to the server or is A notification that directly forwards the notification sent by the first terminal to the server.

上述方案中,所述接收单元,还用于接收所述第一终端发送的第一信息;所述第一信息表征所述第一资源数据的传输相关信息;In the above solution, the receiving unit is further configured to receive first information sent by the first terminal; the first information represents transmission-related information of the first resource data;

相应地,所述获取单元,具体用于:Correspondingly, the obtaining unit is specifically used for:

利用所述第一信息,从经过自身的数据包中筛选出所述第一资源数据的数据包;Using the first information, filter out the data packets of the first resource data from the data packets passing through itself;

解析筛选出的数据包,得到所述第一资源数据。The filtered data packets are parsed to obtain the first resource data.

上述方案中,所述接收单元,用于所述第一终端根据用户操作选择请求的业务内容,且向服务器请求所述第一资源数据的提供者之前,接收第一通知。In the above solution, the receiving unit is used for the first terminal to select the requested service content according to the user operation, and to receive the first notification before requesting the server for the provider of the first resource data.

上述方案中,所述接收单元,用于所述第一终端从服务器获取到所述第一资源数据的提供者后,且在向对应的提供者请求所述第一资源数据之前,接收第一通知。In the above solution, the receiving unit is configured to receive the first resource data after the first terminal obtains the provider of the first resource data from the server and before requesting the first resource data from the corresponding provider. Notice.

本发明实施例提供的数据处理方法及家庭网关,家庭网关接收第一通知;所述第一通知用于通知所述家庭网关所述第一终端要获取第一资源数据;所述第一终端为所述家庭网关下连的终端,且作为对等P2P节点时能够为P2P网络中的其他P2P节点提供服务;所述家庭网关响应所述第一通知,当所述第一终端接收所述第一资源数据时,获取经过自身的所述第一资源数据;所述家庭网关在本地保存获取的所述第一资源数据,并将所述第一资源数据信息同步至服务器,以使所述家庭网关能够为所述其他P2P节点提供针对所述第一资源数据的服务,家庭网关作为P2P节点为其他P2P节点提供服务,如此,能够大大提升P2P系统的整体服务能力。In the data processing method and the home gateway provided by the embodiments of the present invention, the home gateway receives a first notification; the first notification is used to notify the home gateway that the first terminal needs to acquire first resource data; the first terminal is A terminal connected to the home gateway, and can provide services for other P2P nodes in the P2P network as a peer P2P node; the home gateway responds to the first notification, when the first terminal receives the first When the resource data is obtained, the first resource data passing through itself is obtained; the home gateway locally saves the obtained first resource data, and synchronizes the first resource data information to the server, so that the home gateway can The service for the first resource data can be provided for the other P2P nodes, and the home gateway acts as a P2P node to provide services for the other P2P nodes. In this way, the overall service capability of the P2P system can be greatly improved.

附图说明Description of drawings

在附图(其不一定是按比例绘制的)中,相似的附图标记可在不同的视图中描述相似的部件。具有不同字母后缀的相似附图标记可表示相似部件的不同示例。附图以示例而非限制的方式大体示出了本文中所讨论的各个实施例。In the drawings, which are not necessarily to scale, like reference numerals may describe like parts in the different views. Similar reference numbers with different letter suffixes may denote different instances of similar components. The accompanying drawings generally illustrate, by way of example and not limitation, the various embodiments discussed herein.

图1为相关技术中P2P CDN系统的架构示意图;FIG. 1 is a schematic diagram of the architecture of a P2P CDN system in the related art;

图2为相关技术中终端设备以线宽带接入方式连入互联网的网络结构示意图;2 is a schematic diagram of a network structure in which a terminal device is connected to the Internet in a line broadband access mode in the related art;

图3为本发明实施例一数据处理的方法流程示意图;3 is a schematic flowchart of a data processing method according to Embodiment 1 of the present invention;

图4为本发明实施例二家庭网关提供服务的方法流程示意图;4 is a schematic flowchart of a method for providing a service by a home gateway according to Embodiment 2 of the present invention;

图5为本发明实施例三家庭网关提供服务的方法流程示意图;FIG. 5 is a schematic flowchart of a method for providing a service by a home gateway according to Embodiment 3 of the present invention;

图6为本发明实施例四家庭网关结构示意图。FIG. 6 is a schematic structural diagram of a home gateway according to Embodiment 4 of the present invention.

具体实施方式Detailed ways

下面结合附图及实施例对本发明再作进一步详细的描述。The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments.

图1为P2P CDN系统架构示意图。从图1可以看出,在P2P CDN系统中,主要包括策略中心及Tracker服务器。其中,Figure 1 is a schematic diagram of a P2P CDN system architecture. As can be seen from Figure 1, the P2P CDN system mainly includes a policy center and a tracker server. in,

策略中心提供对P2P CDN系统中涉及到的各项策略的配置功能,包括内容预推送策略管理、Tracker调度策略管理等。The strategy center provides configuration functions for various strategies involved in the P2P CDN system, including content pre-push strategy management, Tracker scheduling strategy management, etc.

Tracker服务器实现P2P CDN系统的全局控制与调度功能,是终端用户访问的统一入口服务器。Tracker服务器维护文件所有下载者的IP地址和端口号信息,在机顶盒终端P2P节点启动后且处于空闲状态时Tracker服务器定期进行内容预推送,以及在某一用户设备请求获取某个视频内容时返回可提供该内容的分发服务的P2P节点列表。The Tracker server implements the global control and scheduling functions of the P2P CDN system, and is a unified portal server accessed by end users. The Tracker server maintains the IP address and port number information of all downloaders of the file. After the P2P node of the set-top box terminal is started and is in an idle state, the Tracker server periodically pre-pushes the content, and returns the available content when a user device requests a certain video content. List of P2P nodes that provide distribution services for this content.

同时,在P2P CDN技术的内容分发流程中,为了缩短一个P2P节点向另一个P2P节点服务时的传输时延,会尽可能选择最短的内容分发传输路径(路由)。举个例子来说,P2PCDN系统的调度服务器(节点追踪(Tracker)服务器)收到用户A请求获取某一内容时,检索到在用户A所处的邻近区域(例如,同一宽带远程接入服务器(BRAS,Broadband RemoteAccess Server)设备下)中当前正好有其他P2P节点(可能不止一个)可以为其提供内容分发服务时,应优选这些P2P节点为用户A提供服务。At the same time, in the content distribution process of the P2P CDN technology, in order to shorten the transmission delay when one P2P node serves another P2P node, the shortest content distribution transmission path (route) will be selected as much as possible. For example, when the scheduling server (Tracker server) of the P2PCDN system receives a request from user A to obtain a certain content, it retrieves the information in the adjacent area where user A is located (for example, the same broadband remote access server ( When there are currently other P2P nodes (maybe more than one) in the BRAS, Broadband Remote Access Server) that can provide content distribution services for them, these P2P nodes should preferably provide services for user A.

现有P2P CDN系统中用户获取视频内容服务的业务流程包括:The business process for users to obtain video content services in the existing P2P CDN system includes:

步骤A1:用户X1通过个人电脑(PC,Personal Computer)或机顶盒等设备上的视频播放器选择期望观看某一个视频节目A;同时,其终端设备上的P2P客户端作为P2P节点X1注册到Tracker服务器上,告知服务器自身已上线;用户X2通过PC或机顶盒等设备上的视频播放器选择期望观看视频节目A;同时,其终端设备上的P2P客户端作为P2P节点X2注册到Tracker服务器上,告知服务器自身已上线;Step A1: User X1 selects a certain video program A that he wishes to watch through a video player on a personal computer (PC, Personal Computer) or a set-top box; at the same time, the P2P client on his terminal device registers with the Tracker server as a P2P node X1 user X2 selects the desired video program A through the video player on the PC or set-top box; at the same time, the P2P client on his terminal device registers with the Tracker server as the P2P node X2 and informs the server itself online;

这里,当P2P节点X1获取到视频节目A时后续可作为服务者为其它P2P节点提供视频节目A的视频服务。Here, when the P2P node X1 acquires the video program A, it can act as a server to provide video services of the video program A for other P2P nodes subsequently.

步骤B:用户X1的P2P节点X1(此时作为视频服务的接收方)向Tracker服务器请求可提供当前内容A分发服务的其他P2P节点(视频服务提供方)列表;用户X2的P2P节点X2(此时作为视频服务的接收方)向Tracker服务器请求可提供当前内容A分发服务的其他P2P节点(视频服务提供方)列表;Step B: The P2P node X1 of the user X1 (the receiver of the video service at this time) requests the Tracker server for a list of other P2P nodes (video service providers) that can provide the current content A distribution service; the P2P node X2 of the user X2 (this (as the receiver of the video service) to request the Tracker server for a list of other P2P nodes (video service providers) that can provide the current content A distribution service;

步骤C:Tracker服务器(调度中心)收到P2P节点X1的请求后,综合自身采集的P2P节点信息(是否有存储内容A、服务能力等),以及这些P2P节点与P2P节点X1的距离远近信息,向P2P节点X1返回可为其提供服务的若干个候选P2P节点的信息列表;收到P2P节点X2的请求后,综合自身采集的P2P节点信息(是否有存储内容A、服务能力等),以及这些P2P节点与P2P节点X2的距离远近信息,向P2P节点X2返回可为其提供服务的若干个候选P2P节点的信息列表;Step C: After the Tracker server (dispatching center) receives the request of the P2P node X1, it integrates the P2P node information collected by itself (whether there is storage content A, service capability, etc.), and the distance information between these P2P nodes and the P2P node X1, Return the information list of several candidate P2P nodes that can provide services to P2P node X1; after receiving the request of P2P node X2, integrate the P2P node information collected by itself (whether there is storage content A, service capability, etc.), and these The distance information between the P2P node and the P2P node X2, and return the information list of several candidate P2P nodes that can provide services to the P2P node X2;

这里,对于列表中的每个P2P节点,其信息中包括有该P2P节点的IP地址(必需)和端口(可选)信息等。Here, for each P2P node in the list, the information includes the IP address (required) and port (optional) information of the P2P node.

步骤D:P2P节点X1根据P2P节点列表信息,连接到其他P2P节点请求获取该视频内容的数据分片,获得视频内容服务,并在获取到视频内容后为用户播放视频内容;P2P节点X1根据P2P节点列表信息,连接到P2P节点X1请求获取视频内容A的数据分片,获得视频内容服务,并在获取到视频内容后为用户播放视频内容。Step D: According to the P2P node list information, the P2P node X1 connects to other P2P nodes to request to obtain the data fragment of the video content, obtains the video content service, and plays the video content for the user after obtaining the video content; the P2P node X1 according to the P2P Node list information, connect to the P2P node X1 to request to obtain the data fragment of the video content A, obtain the video content service, and play the video content for the user after obtaining the video content.

从上面的描述中可以看出,目前每个接收视频的P2P客户端在接收视频内容时,也同时作为服务者为其他尝试接收该视频的用户提供直播服务能力,但由于每个终端设备服务能力有限(受限于终端的处理能力、磁盘输入/输出(I/O,Input/Output)读取速率、上行网络带宽等因素),一般仅能为2-3个其他P2P节点提供服务,从而大大影响了系统的服务能力。As can be seen from the above description, when each P2P client receiving video currently receives video content, it also acts as a server to provide live service capabilities for other users who try to receive the video. However, due to the service capabilities of each terminal device Limited (limited by the processing capacity of the terminal, disk input/output (I/O, Input/Output) read rate, uplink network bandwidth, etc.), generally only 2-3 other P2P nodes can be provided services, which greatly Affect the service capability of the system.

另外,对于直播视频,当更多P2P用户请求接收该直播服务时,后接入的用户只能作为上层用户的下层用户经多层叠加来接收服务,这样,经过多层P2P节点中转服务后直播视频内容会产生较大时延,且随着P2P上级节点为下级节点服务的累计层级的增大,直播时延也会累计增大。因此在通过P2P系统提供直播服务时,需要挖掘可能提供直播服务的更多设备作为一级服务P2P节点,进而提升P2P系统的整体服务能力和缩短直播延时。In addition, for live video, when more P2P users request to receive the live service, the users who access later can only receive the service as the lower-level user of the upper-level user through multi-layer overlay. Video content will have a large delay, and as the cumulative level of P2P upper-level nodes serving lower-level nodes increases, the live broadcast delay will also increase cumulatively. Therefore, when providing live broadcast services through the P2P system, it is necessary to tap more devices that may provide live broadcast services as first-level service P2P nodes, thereby improving the overall service capability of the P2P system and shortening the live broadcast delay.

同样的,对于点播业务,由于业务数据可以通过预分发方式存入上层用户的存储设备中,因为没有直播业务的多层叠加服务所产生的时延累加问题,但同样也存在终端设备服务能力有限(受限于终端的处理能力、磁盘I/O读取速率、上行网络带宽等因素),导致P2P系统的整体服务能力不足的问题。Similarly, for the on-demand service, since the service data can be stored in the storage device of the upper-layer user through pre-distribution, there is no delay accumulation problem caused by the multi-layer overlay service of the live service, but there is also a limited service capability of the terminal equipment. (Limited by factors such as terminal processing capability, disk I/O read rate, uplink network bandwidth, etc.), which leads to the problem of insufficient overall service capability of the P2P system.

同时,图2为以有线宽带接入方式连入互联网的网络结构示意图。如图2所示,家庭网关是运营商网络在家庭内部的末端设备,处于用户家庭网络的中心,负责连接并管理家庭内部各业务终端设备,并与上联的接入网的网络侧光线路终端(OLT,Optical LineTerminal)、BRAS等设备连接,从而实现有线宽带网络接入业务的功能。其中,OLT用于连接光纤干线的终端设备,是网关设备上联的光接入网设备;BRAS是宽带接入服务器,位于各种大型IP网络的边缘位置,为城域网宽带用户提供接入、认证和计费功能,例如家庭网关就可以通过该设备帮助用户接入到互联网中。Meanwhile, FIG. 2 is a schematic diagram of a network structure connected to the Internet in a wired broadband access manner. As shown in Figure 2, the home gateway is the terminal device of the operator's network in the home. It is located in the center of the user's home network. It is responsible for connecting and managing various service terminal devices in the home, and connecting with the network side optical line of the uplink access network. Terminal (OLT, Optical Line Terminal), BRAS and other devices are connected, so as to realize the function of wired broadband network access service. Among them, the OLT is used to connect the terminal equipment of the optical fiber trunk line, and it is the optical access network equipment connected to the gateway equipment; the BRAS is the broadband access server, which is located at the edge of various large IP networks and provides access for broadband users of the metropolitan area network. , authentication and billing functions, such as a home gateway can help users access the Internet through this device.

而基于有线宽带的接入网,用户在通过机顶盒、PC、手机等各类设备上网时,都需要通过家庭网关设备连入到互联网中(经由OLT、BRAS等设备),换句话说,在P2P CDN系统中,作为P2P节点的终端的各类业务数据都要经过家庭网关才能发给不处于自身所在家庭网络中的其他设备。In the access network based on wired broadband, when users access the Internet through various devices such as set-top boxes, PCs, and mobile phones, they need to connect to the Internet through home gateway devices (via OLT, BRAS and other devices). In other words, in P2P In the CDN system, all kinds of service data of the terminal serving as the P2P node must pass through the home gateway before being sent to other devices not in the home network where it is located.

基于此,在本发明的各种实施例中:家庭网关接收第一通知;所述第一通知用于通知所述家庭网关所述第一终端要获取第一资源数据;所述第一终端为所述家庭网关下连的终端,且作为P2P节点时能够为P2P网络中的其他P2P节点提供服务;响应所述第一通知,当所述第一终端接收所述第一资源数据时,获取经过自身的所述第一资源数据;在本地保存获取的所述第一资源数据,并将所述第一资源数据信息同步至服务器,以使所述家庭网关能够为所述其他P2P节点提供针对所述第一资源数据的服务。Based on this, in various embodiments of the present invention: the home gateway receives a first notification; the first notification is used to notify the home gateway that the first terminal needs to acquire first resource data; the first terminal is The terminal connected to the home gateway can provide services for other P2P nodes in the P2P network when used as a P2P node; in response to the first notification, when the first terminal receives the first resource data, obtain the the first resource data of its own; save the acquired first resource data locally, and synchronize the information of the first resource data to the server, so that the home gateway can provide the other P2P nodes Describe the service of the first resource data.

也就是说,在本发明的各种实施例中,利用家庭终端的数据必须经过家庭网关的特点,家庭网关上新增P2P节点功能,并在机顶盒等终端设备、家庭网关上的P2P节点上新增机顶盒等终端设备通知家庭网关设备自身将要获取业务数据的功能,使得家庭网关能够在其下连(下属)的机顶盒或PC等终端设备获取业务数据时,可以同步地存储该业务数据,从而使得家庭网关设备也成为P2P网络中拥有该业务数据内容的一个P2P节点服务提供者,能够为其他P2P节点提供该业务数据。That is to say, in various embodiments of the present invention, using the feature that the data of the home terminal must pass through the home gateway, the P2P node function is newly added on the home gateway, and the P2P node on the terminal equipment such as the set-top box and the home gateway is added. The terminal equipment such as the set-top box is added to notify the home gateway equipment that it will acquire service data, so that the home gateway can store the service data synchronously when the terminal equipment such as the set-top box or PC connected to it (subordinate) acquires the service data, so that the home gateway can store the service data synchronously. The home gateway device also becomes a P2P node service provider in the P2P network that owns the service data content, and can provide the service data for other P2P nodes.

实施例一Example 1

本发明实施例提供一种数据处理方法,应用于家庭网关,适用于P2P CDN系统。The embodiment of the present invention provides a data processing method, which is applied to a home gateway and is suitable for a P2P CDN system.

本发明实施例数据处理的方法,如图3所示,包括以下步骤:The data processing method according to the embodiment of the present invention, as shown in FIG. 3 , includes the following steps:

步骤301:所述家庭网关接收第一通知;Step 301: the home gateway receives the first notification;

这里,所述第一通知用于通知所述家庭网关所述第一终端要获取第一资源数据。Here, the first notification is used to notify the home gateway that the first terminal needs to acquire the first resource data.

其中,所述第一终端为所述家庭网关下连的终端,且作为P2P节点时能够为P2P网络中的其他P2P节点提供服务。Wherein, the first terminal is a terminal connected to the home gateway, and can provide services for other P2P nodes in the P2P network when serving as a P2P node.

实际应用时,在P2P CDN中,所述第一资源数据可以为视频数据;相应地,所述第一终端可以为机顶盒、或PC等具有视频播放功能的终端设备。In practical application, in a P2P CDN, the first resource data may be video data; correspondingly, the first terminal may be a terminal device such as a set-top box or a PC with a video playback function.

实际应用时,所述家庭网关接收第一通知的时机可以是:所述第一终端接收到用户选择的业务内容,且向所述服务器请求所述第一资源数据的提供者之前。也就是说,所述第一终端根据用户操作选择请求的业务内容,且向所述服务器请求所述第一资源数据的提供者之前,所述家庭网关接收第一通知。In practical application, the timing when the home gateway receives the first notification may be: before the first terminal receives the service content selected by the user and requests the server for the provider of the first resource data. That is, before the first terminal selects the requested service content according to the user operation, and before requesting the server for the provider of the first resource data, the home gateway receives the first notification.

所述家庭网关接收第一通知的时机还可以是:所述第一终端获取到所述第一资源数据的提供者后,且在向对应的提供者请求所述第一资源数据之前。也就是说,所述第一终端从服务器获取到所述第一资源数据的提供者后,且在向对应的提供者请求所述第一资源数据之前,所述家庭网关接收第一通知。The timing for the home gateway to receive the first notification may also be: after the first terminal acquires the provider of the first resource data and before requesting the corresponding provider for the first resource data. That is, after the first terminal acquires the provider of the first resource data from the server, and before requesting the first resource data from the corresponding provider, the home gateway receives the first notification.

实际应用时,所述家庭网关可以通过以下方式之一接收第一通知:In practical application, the home gateway can receive the first notification in one of the following ways:

第一种方式,所述第一终端直接将所述第一通知发送给家庭网关,即通过本地局域网通信的方式,也就是说,所述家庭网关接收所述第一终端直接发送的第一通知。In the first manner, the first terminal directly sends the first notification to the home gateway, that is, by means of local area network communication, that is, the home gateway receives the first notification directly sent by the first terminal .

第二种方式,所述第一终端通过服务器的中转将所述第一通知发送给所述家庭网关,即通过所述服务器中转通信,也就是说,所述家庭网关接收所述服务器发送的第一通知;所述服务器发送的第一通知为对所述第一终端发送给所述服务器的通知进行与所述第一资源数据对应的服务信息处理后的通知或为将所述第一终端发送给所述服务器的通知直接转发的通知。In the second manner, the first terminal sends the first notification to the home gateway through the server's relay, that is, the communication is relayed through the server, that is, the home gateway receives the first notification sent by the server. A notification; the first notification sent by the server is a notification after processing the service information corresponding to the first resource data on the notification sent by the first terminal to the server, or is a notification sent by the first terminal Notifications to the server are directly forwarded notifications.

这里,所述进行与所述第一资源数据对应的服务信息处理是指:增加和/或删除一些与所述第一资源数据对应的必要服务信息,比如:增加服务有效期等等。Here, the processing of the service information corresponding to the first resource data refers to: adding and/or deleting some necessary service information corresponding to the first resource data, for example, increasing the service validity period and the like.

步骤302:响应所述第一通知,当所述第一终端接收所述第一资源数据时,所述家庭网关获取经过自身的所述第一资源数据;Step 302: In response to the first notification, when the first terminal receives the first resource data, the home gateway obtains the first resource data passing through itself;

这里,实际应用时,所述第一终端获知到所述第一资源数据的传输相关信息后,比如:为所述第一终端提供所述第一资源数据的至少一个P2P节点的IP地址、所述第一资源数据的IP数据包编号、或接收所述第一资源数据的接收时间等各种信息时,可以将这些传输相关信息通知给所述家庭网关,以便所述家庭网关可以快速定位、筛选出需要保存的数据。Here, in practical application, after the first terminal learns the transmission-related information of the first resource data, for example, the IP address, the IP address of at least one P2P node that provides the first resource data for the first terminal, the When various information such as the IP packet number of the first resource data or the reception time of the first resource data are received, these transmission-related information can be notified to the home gateway, so that the home gateway can quickly locate, Filter out the data that needs to be saved.

基于此,在一实施例中,在执行本步骤之前,该方法还可以包括:Based on this, in an embodiment, before performing this step, the method may further include:

接收所述第一终端发送的第一信息;所述第一信息表征所述第一资源数据的传输相关信息;receiving first information sent by the first terminal; the first information represents transmission-related information of the first resource data;

相应地,本步骤的具体实现可以包括:Correspondingly, the specific implementation of this step may include:

利用所述第一信息,从经过自身的数据包中筛选出所述第一资源数据的数据包;Using the first information, filter out the data packets of the first resource data from the data packets passing through itself;

解析筛选出的数据包,得到所述第一资源数据。The filtered data packets are parsed to obtain the first resource data.

如此,所述家庭网关可以从经过自身的所有网络数据(家庭网关下可能还连有除第一终端外的其他终端设备,如其他电脑、手机等)中快速定位、筛选到这些需要获取的P2P业务资源数据,简化了家庭网关需要对大量数据包的每个包都解析的处理方式,提升了处理效率。In this way, the home gateway can quickly locate and filter these P2P data that need to be acquired from all network data passing through itself (there may be other terminal devices other than the first terminal connected to the home gateway, such as other computers, mobile phones, etc.) The service resource data simplifies the processing method that the home gateway needs to parse each packet of a large number of data packets, and improves the processing efficiency.

步骤303:所述家庭网关在本地保存获取的所述第一资源数据,并将所述第一资源数据信息同步至服务器。Step 303: The home gateway locally saves the acquired first resource data, and synchronizes the information of the first resource data to the server.

这里,所述家庭网关在本地保存所述第一资源数据并将所述第一资源数据信息同步至服务器的目的是:当所述家庭网关作为P2P节点时,所述家庭网关能够为所述其他P2P节点提供针对所述第一资源数据的服务。Here, the purpose of saving the first resource data locally and synchronizing the first resource data information to the server by the home gateway is: when the home gateway acts as a P2P node, the home gateway can be used for the other The P2P node provides services for the first resource data.

本发明实施例提供的数据处理方法,家庭网关接收第一通知;所述第一通知用于通知所述家庭网关所述第一终端要获取第一资源数据;所述第一终端为所述家庭网关下连的终端,且作为对等P2P节点时能够为P2P网络中的其他P2P节点提供服务;所述家庭网关响应所述第一通知,当所述第一终端接收所述第一资源数据时,获取经过自身的所述第一资源数据;所述家庭网关在本地保存获取的所述第一资源数据,并将所述第一资源数据信息同步至服务器,以使所述家庭网关能够为所述其他P2P节点提供针对所述第一资源数据的服务,家庭网关作为P2P节点为其他P2P节点提供服务,如此,能够大大提升P2P系统的整体服务能力。In the data processing method provided by the embodiment of the present invention, the home gateway receives a first notification; the first notification is used to notify the home gateway that the first terminal needs to acquire first resource data; the first terminal is the home A terminal connected to the gateway, and can provide services for other P2P nodes in the P2P network as a peer P2P node; the home gateway responds to the first notification, when the first terminal receives the first resource data , obtain the first resource data passing through itself; the home gateway locally saves the obtained first resource data, and synchronizes the first resource data information to the server, so that the home gateway can The other P2P nodes provide services for the first resource data, and the home gateway acts as a P2P node to provide services for other P2P nodes. In this way, the overall service capability of the P2P system can be greatly improved.

另外,接收所述第一终端发送的第一信息;所述第一信息表征所述第一资源数据的传输相关信息;所述家庭网关利用所述第一信息,从经过自身的数据包中筛选出所述第一资源数据的数据包;所述家庭网关解析筛选出的数据包,得到所述第一资源数据,家庭网关可以从经过自身的所有网络数据(家庭网关下可能还连有除第一终端外的其他终端设备,如其他电脑、手机等)中快速定位、筛选到这些需要获取的P2P业务资源数据,如此,大大提升了处理效率。In addition, the first information sent by the first terminal is received; the first information represents the transmission-related information of the first resource data; the home gateway uses the first information to filter the data packets that have passed through itself. The data packet of the first resource data is output; the home gateway parses the filtered data packet to obtain the first resource data, and the home gateway can obtain the first resource data from all network data passing through itself (there may also be connected to the home gateway except the first resource data). Other terminal devices other than one terminal (such as other computers, mobile phones, etc.) can quickly locate and filter the P2P service resource data that needs to be obtained, thus greatly improving the processing efficiency.

实施例二Embodiment 2

在实施例一的基础上,本实施例以机顶盒为例,详细描述家庭网关如何作为P2P节点为其他P2P节点提供服务的过程。On the basis of the first embodiment, this embodiment takes a set-top box as an example to describe in detail the process of how the home gateway acts as a P2P node to provide services for other P2P nodes.

需要说明的是:各设备上的P2P节点是指:设备上设置有具备P2P的功能模块。It should be noted that: a P2P node on each device means that a functional module with P2P is set on the device.

如图4所示,家庭网关作为P2P节点为其他P2P节点提供的流程主要包括以下步骤:As shown in Figure 4, the process provided by the home gateway as a P2P node for other P2P nodes mainly includes the following steps:

步骤401:用户X通过第一机顶盒上的第一视频播放器选择期望观看某一个视频节目A;Step 401: User X selects a certain video program A that he wishes to watch through the first video player on the first set-top box;

步骤402:第一视频播放器根据用户的请求,向第一机顶盒上的第一P2P节点发送内容访问请求;Step 402: the first video player sends a content access request to the first P2P node on the first set-top box according to the user's request;

这里,所述内容访问请求携带节目A的网址。Here, the content access request carries the website address of program A.

步骤403:第一P2P节点收到请求后,处理请求,即注册到Tracker服务器上,告知服务器自身已上线,以准备从P2P CDN中获取节目A的内容;Step 403: After receiving the request, the first P2P node processes the request, that is, registers with the Tracker server, and informs the server that it is online, so as to prepare to obtain the content of program A from the P2P CDN;

步骤404:第一P2P节点通知家庭网关上的第二P2P节点,将开始获取节目A的内容服务;Step 404: the first P2P node notifies the second P2P node on the home gateway that it will start to obtain the content service of program A;

这里,实际应用时,本步骤的具体实现可以包括:Here, in practical application, the specific implementation of this step may include:

步骤404a:第一P2P节点直接向第二P2P节点发送通知;Step 404a: the first P2P node directly sends a notification to the second P2P node;

步骤404b:第二P2P节点收到通知后向第一P2P节点返回响应。Step 404b: After receiving the notification, the second P2P node returns a response to the first P2P node.

也就是说,第一P2P节点与第二P2P节点通过本地局域网通信,以实现第一P2P节点通知第二P2P节点自身将开始获取节目A的内容服务。That is, the first P2P node communicates with the second P2P node through the local area network, so that the first P2P node notifies the second P2P node that it will start to obtain the content service of the program A.

本步骤的具体实现也可以包括:The specific implementation of this step can also include:

步骤404A:第一P2P节点向Tracker服务器发送通知;Step 404A: the first P2P node sends a notification to the Tracker server;

步骤404B:Tracker服务器收到通知后,向第一P2P节点返回响应;Step 404B: After the Tracker server receives the notification, it returns a response to the first P2P node;

步骤404C:Tracker服务器向第二P2P节点转发收到的通知;Step 404C: The Tracker server forwards the received notification to the second P2P node;

步骤404D:第二P2P节点向Tracker服务器返回响应。Step 404D: The second P2P node returns a response to the Tracker server.

也就是说,第二P2P节点与第二P2P节点通过Tracker服务器中转通信,以实现第一P2P节点通知第二P2P节点自身将开始获取节目A的内容服务。That is, the second P2P node communicates with the second P2P node through the Tracker server, so that the first P2P node notifies the second P2P node that it will start to obtain the content service of the program A.

步骤405:第一P2P节点(此时作为视频服务的接收方)向Tracker服务器请求可提供当前节目A分发服务的其他P2P节点(视频服务提供方)列表;Step 405: the first P2P node (as the receiver of the video service at this time) requests the Tracker server for a list of other P2P nodes (video service providers) that can provide the current program A distribution service;

步骤406:Tracker服务器收到第一P2P节点的请求后,向第一P2P节点返回可为其提供服务的若干个候选P2P节点的信息列表;Step 406: After the Tracker server receives the request from the first P2P node, it returns the information list of several candidate P2P nodes that can provide services to the first P2P node;

这里,Tracker服务器综合自身采集的P2P节点信息(是否有存储节目A的内容、服务能力等),以及这些P2P节点与第一P2P节点的距离远近信息,向第一P2P节点返回可为其提供服务的若干个候选P2P节点的信息列表。Here, the Tracker server synthesizes the P2P node information collected by itself (whether it has stored the content of program A, service capabilities, etc.), as well as the distance information between these P2P nodes and the first P2P node, and returns to the first P2P node to provide services for it The information list of several candidate P2P nodes.

其中,对于列表中的每个P2P节点,其信息中包括有该P2P节点的IP地址(必需)和端口(可选)信息等。Wherein, for each P2P node in the list, the information includes the IP address (required) and port (optional) information of the P2P node, and the like.

步骤407:第一P2P节点根据P2P节点列表信息,选择第三P2P节点和超级P2P节点作为节目A的内容的提供者,向超级P2P节点请求节目A的数据;Step 407: The first P2P node selects the third P2P node and the super P2P node as the content provider of the program A according to the P2P node list information, and requests the data of the program A from the super P2P node;

步骤408:超级P2P节点收到请求后,对第一P2P节点进行认证;Step 408: After receiving the request, the super P2P node authenticates the first P2P node;

步骤409:认证通过后,超级P2P节点向第一P2P发送节目A的数据;Step 409: After the authentication is passed, the super P2P node sends the data of the program A to the first P2P;

步骤410:第一P2P节点收到响应后,向第三P2P节点请求节目A的数据;Step 410: After receiving the response, the first P2P node requests the data of the program A from the third P2P node;

步骤411:第三P2P节点收到请求后,对第一P2P节点进行认证;Step 411: After receiving the request, the third P2P node authenticates the first P2P node;

步骤412:认证通过后,第三P2P节点向第一P2P节点通过家庭网关向第一P2P节点发送节目A的数据;Step 412: After passing the authentication, the third P2P node sends the data of the program A to the first P2P node through the home gateway to the first P2P node;

这里,需要说明的是:实际应用时,超级P2P节点(与其它能提供服务的节点相比,具有较强的服务能力,即能为更多的P2P节点提供服务)是可选的,在网络中不一定存在超级P2P节点;另外,第一P2P节点不一定通过超级P2P节点获取服务。Here, it should be noted that: in practical application, super P2P nodes (compared with other nodes that provide services, have stronger service capabilities, that is, can provide services for more P2P nodes) is optional. There is not necessarily a super P2P node; in addition, the first P2P node does not necessarily obtain services through the super P2P node.

当第一P2P节点不通过超级P2P节点获取服务时,则不执行向步骤407~409。When the first P2P node does not obtain the service through the super P2P node, steps 407 to 409 are not executed.

步骤413:家庭网关收到节目A的数据后,获取节目A的数据并在本地存储;Step 413: After receiving the data of the program A, the home gateway obtains the data of the program A and stores it locally;

步骤414:家庭网关向Tracker服务器发送资源同步情况,以告知Tracker服务器自身具有节目A的数据;Step 414: the home gateway sends the resource synchronization information to the Tracker server to inform the Tracker server that it has the data of program A;

步骤415:Tracker服务器收到信息后,更新自身的资源列表;Step 415: After the Tracker server receives the information, it updates its own resource list;

步骤416:Tracker服务器向家庭网关返回同步响应;Step 416: The Tracker server returns a synchronization response to the home gateway;

步骤417:第一P2P节点收到节目A的数据后在本地存储节目A的数据;Step 417: the first P2P node stores the data of the program A locally after receiving the data of the program A;

步骤418:第一P2P节点向Tracker服务器发送资源同步情况,以告知Tracker服务器自身具有节目A的数据;Step 418: The first P2P node sends the resource synchronization situation to the Tracker server to inform the Tracker server that it has the data of program A;

步骤419:Tracker服务器收到信息后,更新自身的资源列表;Step 419: After the Tracker server receives the information, it updates its own resource list;

步骤420:Tracker服务器向第一P2P节点返回同步响应;Step 420: The Tracker server returns a synchronization response to the first P2P node;

步骤421:第一P2P节点向第一视频播放器返回节目A的数据;Step 421: the first P2P node returns the data of the program A to the first video player;

步骤422:第一视频播放器进行节目A的播放;Step 422: the first video player plays the program A;

这里,实际应用时,步骤418~420与421~422的执行没有先后顺序。Here, in practical application, steps 418-420 and 421-422 are executed in no order.

步骤423:当用户Y通过第二机顶盒上的第二视频播放器选择期望观看某一个视频节目A时,第二机顶盒上的第四P2P节点注册到Tracker服务器上,告知服务器自身已上线;Step 423: When user Y selects a certain video program A that he wishes to watch through the second video player on the second set-top box, the fourth P2P node on the second set-top box registers with the Tracker server and informs the server that it is online;

这里,第二视频播放器与第四P2P节点之间的交互与步骤402的描述相同。Here, the interaction between the second video player and the fourth P2P node is the same as that described in step 402 .

步骤424:第四P2P节点(此时作为视频服务的接收方)向Tracker服务器请求可提供当前节目A分发服务的其他P2P节点(视频服务提供方)列表;Step 424: the fourth P2P node (as the receiver of the video service at this time) requests the Tracker server for a list of other P2P nodes (video service providers) that can provide the current program A distribution service;

步骤425:Tracker服务器收到第四P2P节点的请求后,向第四P2P节点返回可为其提供服务的若干个候选P2P节点的信息列表;Step 425: After receiving the request from the fourth P2P node, the Tracker server returns the information list of several candidate P2P nodes that can provide services to the fourth P2P node;

这里,Tracker服务器综合自身采集的P2P节点信息(是否有存储节目A的内容、服务能力等),以及这些P2P节点与第四P2P节点的距离远近信息,向第四P2P节点返回可为其提供服务的若干个候选P2P节点的信息列表。Here, the Tracker server integrates the P2P node information collected by itself (whether it has stored the content of program A, service capabilities, etc.), as well as the distance information between these P2P nodes and the fourth P2P node, and returns to the fourth P2P node to provide services for it The information list of several candidate P2P nodes.

其中,对于列表中的每个P2P节点,其信息中包括有该P2P节点的IP地址(必需)和端口(可选)信息等。Wherein, for each P2P node in the list, the information includes the IP address (required) and port (optional) information of the P2P node, and the like.

步骤426:第四P2P节点根据P2P节点列表信息,连接到其他P2P节点请求获取节目A的数据分片,获得视频内容服务,并在获取到视频内容后为用户播放视频内容。Step 426: The fourth P2P node connects to other P2P nodes to request to obtain the data fragments of the program A according to the P2P node list information, obtains the video content service, and plays the video content for the user after obtaining the video content.

其中,在获取视频内容时,可以通过家庭网关获取到节目A的视频内容服务,也可以通过第一P2P节点获取到节目A的视频内容服务。Wherein, when acquiring the video content, the video content service of the program A may be acquired through the home gateway, and the video content service of the program A may also be acquired through the first P2P node.

从上面的描述中可以看出,本实施例中,第一机顶盒通知家庭网关自身将要获取节目A的内容服务的时机是:第一机顶盒接收到用户选择的业务,且向Tracker服务器请求节目A的内容提供者之前。As can be seen from the above description, in this embodiment, the timing when the first set-top box notifies the home gateway that it will acquire the content service of program A is: the first set-top box receives the service selected by the user, and requests the tracker server for the content service of program A. before the content provider.

实施例三Embodiment 3

在实施例一的基础上,本实施例以机顶盒为例,详细描述家庭网关如何作为P2P节点为其他P2P节点提供服务的过程。On the basis of the first embodiment, this embodiment takes a set-top box as an example to describe in detail the process of how the home gateway acts as a P2P node to provide services for other P2P nodes.

需要说明的是:各设备上的P2P节点是指:设备上设置有具备P2P的功能模块。It should be noted that: a P2P node on each device means that a functional module with P2P is set on the device.

与实施例二不同的是:第一机顶盒通知家庭网关自身将要获取节目A的内容服务的时机是:第一机顶盒上的第一P2P节点从Tracker服务器获取到候选P2P节点的信息列表后且向对应的P2P节点请求节目的数据之前。The difference from the second embodiment is that the timing when the first set-top box notifies the home gateway that it will acquire the content service of program A is: after the first P2P node on the first set-top box obtains the information list of the candidate P2P nodes from the Tracker server, and sends the information to the corresponding before the P2P node requests the program data.

如图5所示,家庭网关作为P2P节点为其他P2P节点提供的流程主要包括以下步骤:As shown in Figure 5, the process provided by the home gateway as a P2P node for other P2P nodes mainly includes the following steps:

步骤501:用户X通过第一机顶盒上的第一视频播放器选择期望观看某一个视频节目A;Step 501: User X selects a certain video program A that he wishes to watch through the first video player on the first set-top box;

步骤502:第一视频播放器根据用户的请求,向第一机顶盒上的第一P2P节点发送内容访问请求;Step 502: the first video player sends a content access request to the first P2P node on the first set-top box according to the user's request;

这里,所述内容访问请求携带节目A的网址。Here, the content access request carries the website address of program A.

步骤503:第一P2P节点收到请求后,处理请求,即注册到Tracker服务器上,告知服务器自身已上线,以准备从P2P CDN中获取节目A的内容;Step 503: After receiving the request, the first P2P node processes the request, that is, registers on the Tracker server, and informs the server that it is online, so as to prepare to obtain the content of program A from the P2P CDN;

步骤504:第一P2P节点(此时作为视频服务的接收方)向Tracker服务器请求可提供当前节目A分发服务的其他P2P节点(视频服务提供方)列表;Step 504: The first P2P node (as the receiver of the video service at this time) requests the Tracker server for a list of other P2P nodes (video service providers) that can provide the current program A distribution service;

步骤505:Tracker服务器收到第一P2P节点的请求后,向第一P2P节点返回可为其提供服务的若干个候选P2P节点的信息列表;Step 505: After the Tracker server receives the request from the first P2P node, it returns the information list of several candidate P2P nodes that can provide services to the first P2P node;

这里,Tracker服务器综合自身采集的P2P节点信息(是否有存储节目A的内容、服务能力等),以及这些P2P节点与第一P2P节点的距离远近信息,向第一P2P节点返回可为其提供服务的若干个候选P2P节点的信息列表。Here, the Tracker server synthesizes the P2P node information collected by itself (whether it has stored the content of program A, service capabilities, etc.), as well as the distance information between these P2P nodes and the first P2P node, and returns to the first P2P node to provide services for it The information list of several candidate P2P nodes.

其中,对于列表中的每个P2P节点,其信息中包括有该P2P节点的IP地址(必需)和端口(可选)信息等。Wherein, for each P2P node in the list, the information includes the IP address (required) and port (optional) information of the P2P node, and the like.

步骤506:第一P2P节点根据P2P节点列表信息,选择第三P2P节点和超级P2P节点作为节目A的内容的提供者,向超级P2P节点请求节目A的数据;Step 506: the first P2P node selects the third P2P node and the super P2P node as the content provider of the program A according to the P2P node list information, and requests the data of the program A from the super P2P node;

步骤507:超级P2P节点收到请求后,对第一P2P节点进行认证;Step 507: After receiving the request, the super P2P node authenticates the first P2P node;

步骤508:认证通过后,超级P2P节点向第一P2P发送节目A的数据;Step 508: After the authentication is passed, the super P2P node sends the data of the program A to the first P2P;

这里,实际应用时,超级P2P节点(与其它能提供服务的节点相比,具有较强的服务能力,即能为更多的P2P节点提供服务)是可选的,在网络中不一定存在超级P2P节点;另外,第一P2P节点不一定通过超级P2P节点获取服务。Here, in practical applications, super P2P nodes (compared with other nodes that provide services, have stronger service capabilities, that is, can provide services for more P2P nodes) are optional, and there may not be super P2P nodes in the network. P2P node; in addition, the first P2P node does not necessarily obtain services through the super P2P node.

当第一P2P节点不通过超级P2P节点获取服务时,则不执行向步骤506~508。When the first P2P node does not obtain the service through the super P2P node, steps 506 to 508 are not executed.

步骤509:第一P2P节点收到数据后,通知家庭网关上的第二P2P节点,将开始获取节目A的内容服务;Step 509: After the first P2P node receives the data, it notifies the second P2P node on the home gateway that it will start to obtain the content service of program A;

这里,实际应用时,本步骤的具体实现可以包括:Here, in practical application, the specific implementation of this step may include:

步骤509a:第一P2P节点直接向第二P2P节点发送通知;Step 509a: the first P2P node directly sends a notification to the second P2P node;

步骤509b:第二P2P节点收到通知后向第一P2P节点返回响应。Step 509b: After receiving the notification, the second P2P node returns a response to the first P2P node.

也就是说,第一P2P节点与第二P2P节点通过本地局域网通信,以实现第一P2P节点通知第二P2P节点自身将开始获取节目A的内容服务。That is, the first P2P node communicates with the second P2P node through the local area network, so that the first P2P node notifies the second P2P node that it will start to obtain the content service of the program A.

本步骤的具体实现也可以包括:The specific implementation of this step can also include:

步骤509A:第一P2P节点向Tracker服务器发送通知;Step 509A: the first P2P node sends a notification to the Tracker server;

步骤509B:Tracker服务器收到通知后,向第一P2P节点返回响应;Step 509B: After the Tracker server receives the notification, it returns a response to the first P2P node;

步骤509C:Tracker服务器向第二P2P节点转发收到的通知;Step 509C: The Tracker server forwards the received notification to the second P2P node;

步骤509D:第二P2P节点向Tracker服务器返回响应。Step 509D: The second P2P node returns a response to the Tracker server.

也就是说,第二P2P节点与第二P2P节点通过Tracker服务器中转通信,以实现第一P2P节点通知第二P2P节点自身将开始获取节目A的内容服务。That is, the second P2P node communicates with the second P2P node through the Tracker server, so that the first P2P node notifies the second P2P node that it will start to obtain the content service of the program A.

步骤510:通知家庭网关后,第一P2P节点向第三P2P节点请求节目A的数据;Step 510: After notifying the home gateway, the first P2P node requests the data of the program A from the third P2P node;

步骤511:第三P2P节点收到请求后,对第一P2P节点进行认证;Step 511: After receiving the request, the third P2P node authenticates the first P2P node;

步骤512:认证通过后,第三P2P节点向第一P2P节点通过家庭网关向第一P2P节点发送节目A的数据;Step 512: After the authentication is passed, the third P2P node sends the data of the program A to the first P2P node through the home gateway to the first P2P node;

步骤513:家庭网关收到节目A的数据后,获取节目A的数据并在本地存储;Step 513: After receiving the data of the program A, the home gateway obtains the data of the program A and stores it locally;

步骤514:家庭网关向Tracker服务器发送资源同步情况,以告知Tracker服务器自身具有节目A的数据;Step 514: the home gateway sends the resource synchronization situation to the Tracker server to inform the Tracker server that it has the data of program A;

步骤515:Tracker服务器收到信息后,更新自身的资源列表;Step 515: After the Tracker server receives the information, it updates its own resource list;

步骤516:Tracker服务器向家庭网关返回同步响应;Step 516: The Tracker server returns a synchronization response to the home gateway;

步骤517:第一P2P节点收到节目A的数据后在本地存储节目A的数据;Step 517: the first P2P node stores the data of the program A locally after receiving the data of the program A;

步骤518:第一P2P节点向Tracker服务器发送资源同步情况,以告知Tracker服务器自身具有节目A的数据;Step 518: The first P2P node sends the resource synchronization situation to the Tracker server to inform the Tracker server that it has the data of program A;

步骤519:Tracker服务器收到信息后,更新自身的资源列表;Step 519: After the Tracker server receives the information, it updates its own resource list;

步骤520:Tracker服务器向第一P2P节点返回同步响应;Step 520: The Tracker server returns a synchronization response to the first P2P node;

步骤521:第一P2P节点向第一视频播放器返回节目A的数据;Step 521: the first P2P node returns the data of the program A to the first video player;

步骤522:第一视频播放器进行节目A的播放;Step 522: the first video player plays the program A;

这里,实际应用时,步骤518~520与521~522的执行没有先后顺序。Here, in practical application, steps 518-520 and 521-522 are executed in no order.

步骤523:当用户Y通过第二机顶盒上的第二视频播放器选择期望观看某一个视频节目A时,第二机顶盒上的第四P2P节点注册到Tracker服务器上,告知服务器自身已上线;Step 523: When user Y selects a certain video program A that he wishes to watch through the second video player on the second set-top box, the fourth P2P node on the second set-top box registers with the Tracker server and informs the server that it is online;

这里,第二视频播放器与第四P2P节点之间的交互与步骤402的描述相同。Here, the interaction between the second video player and the fourth P2P node is the same as that described in step 402 .

步骤524:第四P2P节点(此时作为视频服务的接收方)向Tracker服务器请求可提供当前节目A分发服务的其他P2P节点(视频服务提供方)列表;Step 524: the fourth P2P node (as the receiver of the video service at this time) requests the Tracker server for a list of other P2P nodes (video service providers) that can provide the current program A distribution service;

步骤525:Tracker服务器收到第四P2P节点的请求后,向第四P2P节点返回可为其提供服务的若干个候选P2P节点的信息列表;Step 525: After the Tracker server receives the request from the fourth P2P node, it returns the information list of several candidate P2P nodes that can provide services to the fourth P2P node;

这里,Tracker服务器综合自身采集的P2P节点信息(是否有存储节目A的内容、服务能力等),以及这些P2P节点与第四P2P节点的距离远近信息,向第四P2P节点返回可为其提供服务的若干个候选P2P节点的信息列表。Here, the Tracker server integrates the P2P node information collected by itself (whether it has stored the content of program A, service capabilities, etc.), as well as the distance information between these P2P nodes and the fourth P2P node, and returns to the fourth P2P node to provide services for it The information list of several candidate P2P nodes.

其中,对于列表中的每个P2P节点,其信息中包括有该P2P节点的IP地址(必需)和端口(可选)信息等。Wherein, for each P2P node in the list, the information includes the IP address (required) and port (optional) information of the P2P node, and the like.

步骤526:第四P2P节点根据P2P节点列表信息,连接到其他P2P节点请求获取节目A的数据分片,获得视频内容服务,并在获取到视频内容后为用户播放视频内容。Step 526: The fourth P2P node connects to other P2P nodes according to the P2P node list information to request to obtain the data fragments of the program A, obtain the video content service, and play the video content for the user after obtaining the video content.

其中,在获取视频内容时,可以通过家庭网关获取到节目A的视频内容服务,也可以通过第一P2P节点获取到节目A的视频内容服务。Wherein, when acquiring the video content, the video content service of the program A may be acquired through the home gateway, and the video content service of the program A may also be acquired through the first P2P node.

实施例四Embodiment 4

为实现本发明是实施例的方法,本实施例提供一种家庭网关,适用于P2P CDN系统。In order to realize the method of the embodiment of the present invention, the embodiment provides a home gateway, which is suitable for a P2P CDN system.

如图6所示,本发明实施例的家庭网关包括:As shown in FIG. 6 , the home gateway according to the embodiment of the present invention includes:

接收单元61,用于接收第一通知;所述第一通知用于通知所述家庭网关所述第一终端要获取第一资源数据;所述第一终端为所述家庭网关下连的终端,且作为P2P节点时能够为P2P网络中的其他P2P节点提供服务;A receiving unit 61, configured to receive a first notification; the first notification is used to notify the home gateway that the first terminal needs to acquire first resource data; the first terminal is a terminal connected to the home gateway, And as a P2P node, it can provide services for other P2P nodes in the P2P network;

获取单元62,用于响应所述第一通知,当所述第一终端接收所述第一资源数据时,获取经过自身的所述第一资源数据;an obtaining unit 62, configured to, in response to the first notification, obtain the first resource data passing through itself when the first terminal receives the first resource data;

同步单元63,用于在本地保存获取的所述第一资源数据;并将所述第一资源数据信息同步至服务器,以使所述家庭网关能够为所述其他P2P节点提供针对所述第一资源数据的服务。The synchronization unit 63 is configured to save the acquired first resource data locally; and synchronize the information of the first resource data to the server, so that the home gateway can provide the other P2P nodes with information about the first resource. Service for resource data.

其中,实际应用时,在P2P CDN中,所述第一资源数据可以为视频数据;相应地,所述第一终端可以为机顶盒、或PC等具有视频播放功能的终端设备。Wherein, in practical application, in a P2P CDN, the first resource data may be video data; correspondingly, the first terminal may be a terminal device such as a set-top box or a PC with a video playback function.

实际应用时,所述家庭网关接收第一通知的时机可以是:所述第一终端接收到用户选择的业务内容,且向所述服务器请求所述第一资源数据的提供者之前。也就是说,所述接收单元61,用于所述第一终端根据用户操作选择请求的业务内容,且向所述服务器请求所述第一资源数据的提供者之前,接收第一通知。In practical application, the timing when the home gateway receives the first notification may be: before the first terminal receives the service content selected by the user and requests the server for the provider of the first resource data. That is, the receiving unit 61 is configured to receive the first notification before the first terminal selects the requested service content according to the user operation, and requests the server for the provider of the first resource data.

所述家庭网关接收第一通知的时机还可以是:所述第一终端获取到所述第一资源数据的提供者后,且在向对应的提供者请求所述第一资源数据之前。也就是说,所述接收单元61,用于所述第一终端从服务器获取到所述第一资源数据的提供者后,且在向对应的提供者请求所述第一资源数据之前,接收第一通知。The timing for the home gateway to receive the first notification may also be: after the first terminal acquires the provider of the first resource data and before requesting the corresponding provider for the first resource data. That is to say, the receiving unit 61 is configured to receive the first resource data after the first terminal obtains the provider of the first resource data from the server and before requesting the first resource data from the corresponding provider. a notice.

实际应用时,所述接收单元61可以通过以下方式之一接收第一通知:In practical application, the receiving unit 61 can receive the first notification in one of the following ways:

第一种方式,所述第一终端直接将所述第一通知发送给家庭网关,即通过本地局域网通信的方式,也就是说,所述接收单元61接收所述第一终端直接发送的第一通知。In the first manner, the first terminal directly sends the first notification to the home gateway, that is, through a local area network communication method, that is, the receiving unit 61 receives the first notification directly sent by the first terminal. Notice.

第二种方式,所述第一终端通过服务器的中转将所述第一通知发送给所述家庭网关,即通过所述服务器中转通信,也就是说,所述接收单元61接收所述服务器发送的第一通知;所述服务器发送的第一通知为对所述第一终端发送给所述服务器的通知进行与所述第一资源数据对应的服务信息处理后的通知或为将所述第一终端发送给所述服务器的通知直接转发的通知。In the second way, the first terminal sends the first notification to the home gateway through the relay of the server, that is, the communication is relayed through the server, that is, the receiving unit 61 receives the information sent by the server. The first notification; the first notification sent by the server is a notification after processing the service information corresponding to the first resource data on the notification sent by the first terminal to the server, or is a notification sent by the first terminal Notifications sent to the server are directly forwarded notifications.

其中,所述进行与所述第一资源数据对应的服务信息处理是指:增加和/或删除一些与所述第一资源数据对应的必要服务信息,比如:增加服务有效期等等。The processing of the service information corresponding to the first resource data refers to: adding and/or deleting some necessary service information corresponding to the first resource data, for example, increasing the service validity period and the like.

这里,实际应用时,所述第一终端获知到所述第一资源数据的传输相关信息后,比如:为所述第一终端提供所述第一资源数据的至少一个P2P节点的IP地址、所述第一资源数据的IP数据包编号、或接收所述第一资源数据的接收时间等各种信息时,可以将这些传输相关信息通知给所述家庭网关,以便所述家庭网关可以快速定位、筛选出需要保存的数据。Here, in practical application, after the first terminal learns the transmission-related information of the first resource data, for example, the IP address, the IP address of at least one P2P node that provides the first resource data for the first terminal, the When various information such as the IP packet number of the first resource data or the reception time of the first resource data are received, these transmission-related information can be notified to the home gateway, so that the home gateway can quickly locate, Filter out the data that needs to be saved.

基于此,在一实施例中,所述接收单元61,还用于接收所述第一终端发送的第一信息;所述第一信息表征所述第一资源数据的传输相关信息;Based on this, in an embodiment, the receiving unit 61 is further configured to receive first information sent by the first terminal; the first information represents transmission-related information of the first resource data;

相应地,所述获取单元62,具体用于:Correspondingly, the obtaining unit 62 is specifically used for:

利用所述第一信息,从经过自身的数据包中筛选出所述第一资源数据的数据包;Using the first information, filter out the data packets of the first resource data from the data packets passing through itself;

解析筛选出的数据包,得到所述第一资源数据。The filtered data packets are parsed to obtain the first resource data.

如此,所述家庭网关可以从经过自身的所有网络数据(家庭网关下可能还连有除第一终端外的其他终端设备,如其他电脑、手机等)中快速定位、筛选到这些需要获取的P2P业务资源数据,简化了家庭网关需要对大量数据包的每个包都解析的处理方式,提升了处理效率。In this way, the home gateway can quickly locate and filter these P2P data that need to be acquired from all network data passing through itself (there may be other terminal devices other than the first terminal connected to the home gateway, such as other computers, mobile phones, etc.) The service resource data simplifies the processing method that the home gateway needs to parse each packet of a large number of data packets, and improves the processing efficiency.

所述同步单元在本地保存所述第一资源数据并将所述第一资源数据信息同步至服务器的目的是:当所述家庭网关作为P2P节点时,所述家庭网关能够为所述其他P2P节点提供针对所述第一资源数据的服务。The purpose of the synchronization unit saving the first resource data locally and synchronizing the first resource data information to the server is: when the home gateway acts as a P2P node, the home gateway can be the other P2P node A service is provided for the first resource data.

实际应用时,所述接收单元61可由家庭网关中的收发机实现;所述获取单元62及同步单元63可由家庭网关的中央处理器(CPU,Central Processing Unit)、微处理器(MCU,Micro Control Unit)、数字信号处理器(DSP,Digital Signal Processor)或可编程逻辑阵列(FPGA,Field-Programmable Gate Array)结合收发机实现。In practical application, the receiving unit 61 can be realized by a transceiver in the home gateway; the acquiring unit 62 and the synchronization unit 63 can be realized by a central processing unit (CPU, Central Processing Unit), a microprocessor (MCU, Micro Control) of the home gateway Unit), digital signal processor (DSP, Digital Signal Processor) or programmable logic array (FPGA, Field-Programmable Gate Array) combined with transceiver implementation.

本发明实施例提供的家庭网关,所述接收单元61接收第一通知;所述第一通知用于通知所述家庭网关所述第一终端要获取第一资源数据;所述第一终端为所述家庭网关下连的终端,且作为对等P2P节点时能够为P2P网络中的其他P2P节点提供服务;所述获取单元62响应所述第一通知,当所述第一终端接收所述第一资源数据时,获取经过自身的所述第一资源数据;所述同步单元63在本地保存获取的所述第一资源数据,并将所述第一资源数据信息同步至服务器,以使所述家庭网关能够为所述其他P2P节点提供针对所述第一资源数据的服务,家庭网关作为P2P节点为其他P2P节点提供服务,如此,能够大大提升P2P系统的整体服务能力。In the home gateway provided by the embodiment of the present invention, the receiving unit 61 receives a first notification; the first notification is used to notify the home gateway that the first terminal needs to acquire first resource data; the first terminal is the The terminal connected to the home gateway, and can provide services for other P2P nodes in the P2P network as a peer P2P node; the obtaining unit 62 responds to the first notification, when the first terminal receives the first In the case of resource data, obtain the first resource data passing through itself; the synchronization unit 63 locally saves the obtained first resource data, and synchronizes the first resource data information to the server, so that the family The gateway can provide services for the first resource data for the other P2P nodes, and the home gateway acts as a P2P node to provide services for other P2P nodes. In this way, the overall service capability of the P2P system can be greatly improved.

另外,所述接收单元61接收所述第一终端发送的第一信息;所述第一信息表征所述第一资源数据的传输相关信息;所述获取单元62利用所述第一信息,从经过自身的数据包中筛选出所述第一资源数据的数据包;所述获取单元62解析筛选出的数据包,得到所述第一资源数据,家庭网关可以从经过自身的所有网络数据(家庭网关下可能还连有除第一终端外的其他终端设备,如其他电脑、手机等)中快速定位、筛选到这些需要获取的P2P业务资源数据,如此,大大提升了处理效率。In addition, the receiving unit 61 receives the first information sent by the first terminal; the first information represents the transmission-related information of the first resource data; the obtaining unit 62 uses the first information to The data packet of the first resource data is screened out from its own data packet; the acquisition unit 62 parses the filtered data packet to obtain the first resource data, and the home gateway can obtain the first resource data from all network data (home gateway There may be other terminal devices other than the first terminal, such as other computers, mobile phones, etc., which can be quickly located and screened to obtain the P2P service resource data that needs to be obtained, thus greatly improving the processing efficiency.

本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the invention may take the form of a hardware embodiment, a 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 having computer-usable program code embodied therein, including but not limited to disk storage, optical storage, and the like.

本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a 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 function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.

以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention.

Claims (7)

1. A data processing method, applied to a home gateway, the method comprising:
receiving a first notification; the first notification is used for notifying the home gateway that the first terminal needs to acquire first resource data; the first terminal is a terminal connected with the home gateway in a downlink manner and can provide services for other P2P nodes in a P2P network when being used as a peer P2P node; the other P2P nodes are terminals which are connected with other home gateways except the home gateway in a downlink mode and are used as P2P nodes;
responding to the first notification, and when the first terminal receives the first resource data, acquiring the first resource data passing through the first terminal;
locally saving the acquired first resource data, and synchronizing the first resource data information to a server, so that the home gateway can provide services for the other P2P nodes aiming at the first resource data;
the timing of the home gateway receiving the first notification includes:
the home gateway receives a first notification before the first terminal selects the requested service content according to the user operation and requests the provider of the first resource data from the server; or,
after the first terminal acquires the provider of the first resource data from the server and before the first resource data is requested to the corresponding provider, the home gateway receives a first notification.
2. The method of claim 1, wherein receiving the first notification comprises:
and receiving a first notification directly sent by the first terminal.
3. The method of claim 1, wherein receiving the first notification comprises:
receiving a first notification sent by the server; the first notification sent by the server is a notification obtained by processing the service information corresponding to the first resource data for the notification sent by the first terminal to the server or a notification directly forwarded by the notification sent by the first terminal to the server.
4. The method of claim 1, wherein prior to obtaining the first resource data that passes through itself, the method further comprises:
receiving first information sent by the first terminal; the first information characterizes transmission related information of the first resource data;
accordingly, the acquiring the first resource data passing through itself includes:
screening out the data packets of the first resource data from the data packets passing through the first information by using the first information;
and analyzing the screened data packet to obtain the first resource data.
5. A home gateway, characterized in that the home gateway comprises:
a receiving unit configured to receive a first notification; the first notification is used for notifying the home gateway that the first terminal needs to acquire first resource data; the first terminal is a terminal connected with the home gateway in a down mode and can provide services for other P2P nodes in a P2P network when being used as a P2P node; the other P2P nodes are terminals which are connected with other home gateways except the home gateway in a downlink mode and are used as P2P nodes;
an obtaining unit, configured to respond to the first notification, and when the first terminal receives the first resource data, obtain the first resource data that passes through the first terminal;
the synchronization unit is used for locally storing the acquired first resource data; and synchronizing the first resource data information to a server to enable the home gateway to provide the other P2P nodes with services for the first resource data;
the timing of the home gateway receiving the first notification includes:
the receiving unit is used for the first terminal to select the requested service content according to the user operation and receive a first notification before requesting the provider of the first resource data from the server; or,
the receiving unit is configured to receive a first notification after the first terminal acquires the provider of the first resource data from the server and before the first terminal requests the corresponding provider for the first resource data.
6. The home gateway according to claim 5, wherein the receiving unit is specifically configured to:
receiving a first notification directly sent by the first terminal;
or,
receiving a first notification sent by the server; the first notification sent by the server is a notification obtained by processing the service information corresponding to the first resource data for the notification sent by the first terminal to the server or a notification directly forwarded by the notification sent by the first terminal to the server.
7. The home gateway according to claim 5, wherein the receiving unit is further configured to receive first information sent by the first terminal; the first information characterizes transmission related information of the first resource data;
correspondingly, the obtaining unit is specifically configured to:
screening out the data packets of the first resource data from the data packets passing through the first information by using the first information;
and analyzing the screened data packet to obtain the first resource data.
CN201610907771.8A 2016-10-18 2016-10-18 Data processing method and home gateway Active CN107959704B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610907771.8A CN107959704B (en) 2016-10-18 2016-10-18 Data processing method and home gateway

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610907771.8A CN107959704B (en) 2016-10-18 2016-10-18 Data processing method and home gateway

Publications (2)

Publication Number Publication Date
CN107959704A CN107959704A (en) 2018-04-24
CN107959704B true CN107959704B (en) 2020-01-03

Family

ID=61954470

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610907771.8A Active CN107959704B (en) 2016-10-18 2016-10-18 Data processing method and home gateway

Country Status (1)

Country Link
CN (1) CN107959704B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109347968B (en) * 2018-11-07 2021-09-24 网宿科技股份有限公司 A method, device and system for downloading data blocks of resource files
CN111432231B (en) * 2020-04-26 2023-04-07 中移(杭州)信息技术有限公司 Content scheduling method of edge network, home gateway, system and server
CN114285788B (en) * 2020-09-18 2023-06-20 华为技术有限公司 Device connection method, device and device
CN112769958B (en) 2021-02-05 2022-10-04 上海哔哩哔哩科技有限公司 Point-to-point network scheduling method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102461076A (en) * 2009-06-04 2012-05-16 瑞典爱立信有限公司 Method and apparatus for obtaining media objects for devices in a local network
CN102904935A (en) * 2012-09-25 2013-01-30 中国联合网络通信集团有限公司 Download method, device and system based on home gateway

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8422397B2 (en) * 2007-12-28 2013-04-16 Prodea Systems, Inc. Method and apparatus for rapid session routing
US8831032B2 (en) * 2008-03-05 2014-09-09 Telefonaktiebolaget L M Ericsson (Publ) SIP-HTTP application correlator

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102461076A (en) * 2009-06-04 2012-05-16 瑞典爱立信有限公司 Method and apparatus for obtaining media objects for devices in a local network
CN102904935A (en) * 2012-09-25 2013-01-30 中国联合网络通信集团有限公司 Download method, device and system based on home gateway

Also Published As

Publication number Publication date
CN107959704A (en) 2018-04-24

Similar Documents

Publication Publication Date Title
US11363116B2 (en) Systems and methods for intelligent routing and content placement in information centric networks
US7978631B1 (en) Method and apparatus for encoding and mapping of virtual addresses for clusters
US8904559B2 (en) Enforcing single stream per sign-on from a content delivery network (CDN) media server
US8059560B2 (en) Tree-type network system, node device, broadcast system, broadcast method, and the like
US9173006B2 (en) Method for live broadcasting in a distributed network and apparatus for the same
CN106210049B (en) Cluster communication method and system based on message queue
US20150317583A1 (en) Business Scheduling Method and Apparatus and Convergence Device
JP2020528189A (en) Systems and methods for communicating between secure and unsecured devices using proxies
CN107959704B (en) Data processing method and home gateway
CN103888539B (en) Bootstrap technique, device and the P2P caching systems of P2P cachings
US20130304877A1 (en) System and method for dynamic configuration of isn store-based overlay network
CN115669075A (en) Private network device and private lan connection, content discovery, data transmission and control method
CN108924609A (en) Method, electronic equipment, device and the storage medium of transmission of flow media data
JP5726302B2 (en) Secret or protected access to a network of nodes distributed across a communication architecture using a topology server
CN108270835A (en) A business content scheduling method, device, policy server and system
US8681760B2 (en) Network positioning system and terminal positioning device
CN114518909B (en) Authorization information configuration method, device, equipment and storage medium based on API gateway
WO2016180284A1 (en) Service node allocation method, device, cdn management server and system
CN117014636B (en) Data stream scheduling method of audio and video network, storage medium and electronic device
WO2014117508A1 (en) Content delivery network and content management method in content delivery network
CN109040199A (en) A kind of method, system and storage medium for distributing resource data
US11671515B2 (en) Methods, network node and client device for acquisition and delivery of resources in a communications network
US11310679B2 (en) Message by message tunability of message reliability in a cellular network
KR20120071787A (en) Method for providing home network contents information in remote access environment
KR20160096941A (en) Method, transmitting server, system for providing iptv broadcasting service through heterogeneous networks

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