CN105100008B - The method and relevant device of content distribution in content center network - Google Patents
The method and relevant device of content distribution in content center network Download PDFInfo
- Publication number
- CN105100008B CN105100008B CN201410197163.3A CN201410197163A CN105100008B CN 105100008 B CN105100008 B CN 105100008B CN 201410197163 A CN201410197163 A CN 201410197163A CN 105100008 B CN105100008 B CN 105100008B
- Authority
- CN
- China
- Prior art keywords
- content source
- encoded data
- data packet
- content
- interest message
- 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.)
- Expired - Fee Related
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/40—Network security protocols
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明实施例公开了内容中心网络中内容分发的方法及相关设备,用于提高内容中心网络中内容的获取效率,避免链路资源的浪费。本发明实施例方法包括:内容源请求端设备发送兴趣报文到内容源提供端设备后,接收内容源提供端设备提供的编码的数据包,该编码的数据包是由内容源提供端设备将与该兴趣报文相匹配的数据块分段生成数据块分片,并且使用喷泉编码算法对数据块分片编码得到的,所以该内容源请求端设备可以同时接收多个内容源提供端设备发送的编码的数据包,内容源请求端设备对包括有接收到的编码的数据包的编码数据包集合进行解码,得到该数据块。
The embodiment of the present invention discloses a content distribution method in a content-centric network and related equipment, which are used to improve content acquisition efficiency in the content-centric network and avoid waste of link resources. The method in the embodiment of the present invention includes: after the content source requesting end device sends an interest message to the content source providing end device, it receives the encoded data packet provided by the content source providing end device, and the encoded data packet is sent by the content source providing end device The data block fragments that match the interest message generate data block fragments, and use the fountain coding algorithm to encode the data block fragments, so the content source requesting end device can simultaneously receive multiple content source providing end devices The coded data packet of the content source request device decodes the coded data packet set including the received coded data packet to obtain the data block.
Description
技术领域technical field
本发明涉及通信领域,尤其涉及内容中心网络中内容分发的方法及相关设备。The invention relates to the communication field, in particular to a content distribution method and related equipment in a content-centric network.
背景技术Background technique
当前的互联网广泛采用TCP/IP协议通过“主机-主机”的方式进行通信。互联网最初的目标是实现硬件资源的共享,但随着互联网的迅猛发展,其应用主要转移到文字、图片和视频等信息的共享上,用户更加关心信息获取的速度以及可靠性。因此,传统的互联网显然不能满足用户的需求。内容中心网络(Content-Centric Network,CCN)或命名数据网络(Named Data Network,NDN)是一种取代当前互联网的新的架构。为表述方便,将这里的CCN或NDN统一称为内容中心网络。内容中心网络的基本思想是将信息(或称为内容、数据)本身视为网络中的“对等实体”,是将当前基于主机(host-based)的网络架构转变为基于内容(content-based)的架构。相对于当前的互联网,内容中心网络是一种以接收端为中心的通信模式,接收端通过发送请求消息请求内容,请求消息可以被每个中间节点转发,网络中拥有该请求消息请求的内容的节点就可以返回数据Data包。The current Internet widely uses the TCP/IP protocol to communicate in a "host-host" manner. The original goal of the Internet was to share hardware resources. However, with the rapid development of the Internet, its applications have mainly shifted to the sharing of information such as text, pictures, and videos. Users are more concerned about the speed and reliability of information acquisition. Therefore, the traditional Internet obviously cannot meet the needs of users. Content-Centric Network (CCN) or Named Data Network (NDN) is a new architecture that replaces the current Internet. For the convenience of expression, the CCN or NDN here is collectively referred to as a content-centric network. The basic idea of content-centric network is to regard information (or content, data) itself as a "peer entity" in the network, which is to transform the current host-based network architecture into a content-based network architecture. ) structure. Compared with the current Internet, the content-centric network is a communication mode centered on the receiving end. The receiving end requests content by sending a request message, and the request message can be forwarded by each intermediate node. The node can return the data Data packet.
目前在内容中心网络中采用网络编码的方式,编码用于定义请求的特征向量,以说明请求的内容中缺少的部分,内容提供端根据该编码确定可提供的内容是否能满足请求,如果能则返回一个数据块,该数据块是缺少的内容的一部分。Currently, network coding is used in the content-centric network. The coding is used to define the feature vector of the request to explain the missing part of the requested content. The content provider determines whether the content that can be provided can meet the request according to the coding. If so, then Returns a chunk of data that is part of the missing content.
但是,使用这种方式进行多源分发,当网络中有多个内容提供者都能提供相同的数据块时,只有一个数据块对接收端得到请求的完整内容起到了有效的促进作用,不仅不能提高内容的获取效率,而且还会造成链路资源的浪费。However, using this method for multi-source distribution, when multiple content providers in the network can provide the same data block, only one data block can effectively promote the receiving end to obtain the complete content requested, not only cannot Improve the efficiency of content acquisition, but also cause a waste of link resources.
发明内容Contents of the invention
本发明实施例提供了内容中心网络中内容分发的方法及相关设备,用于提高内容中心网络中内容的获取效率,避免链路资源的浪费。Embodiments of the present invention provide a method for distributing content in a content-centric network and related equipment, which are used to improve content acquisition efficiency in the content-centric network and avoid waste of link resources.
本发明实施例第一方面提供了一种内容中心网络中内容分发的方法,所述内容中心网络中包括内容源请求端设备和内容源提供端设备,所述方法包括:The first aspect of the embodiments of the present invention provides a method for distributing content in a content-centric network, where the content-centric network includes a content source requester device and a content source provider device, and the method includes:
内容源请求端设备发送兴趣报文到内容源提供端设备,所述兴趣报文中携带所述内容源请求端设备请求的数据块的信息;The content source requesting end device sends an interest message to the content source providing end device, and the interest message carries the information of the data block requested by the content source requesting end device;
所述内容源请求端设备接收所述内容源提供端设备提供的编码的数据包,所述编码的数据包是由所述内容源提供端设备将与所述兴趣报文相匹配的数据块分段生成数据块分片,并且使用喷泉编码算法对所述数据块分片编码得到的;The content source requester device receives the encoded data packet provided by the content source provider device, and the encoded data packet is divided by the content source provider device into a data block matching the interest message. The segment generates data block fragments, and uses the fountain coding algorithm to encode the data block fragments;
所述内容源请求端设备对编码数据包集合进行解码,得到所述数据块,所述编码数据包集合中包括所述内容源请求端设备接收到的编码的数据包。The content source requesting end device decodes the encoded data packet set to obtain the data block, and the encoded data packet set includes the encoded data packet received by the content source requesting end device.
结合本发明实施例的第一方面,本发明实施例第一方面的第一种实现方式中,所述内容中心网络中还包括转发节点,With reference to the first aspect of the embodiments of the present invention, in the first implementation manner of the first aspect of the embodiments of the present invention, the content-centric network further includes forwarding nodes,
所述内容源请求端设备发送兴趣报文到内容源提供端设备具体包括:The content source requester device sending the interest message to the content source provider device specifically includes:
所述内容源请求端设备发送所述兴趣报文给转发节点,使得所述转发节点转发所述兴趣报文给所述内容源提供端设备;The content source requester device sends the interest message to the forwarding node, so that the forwarding node forwards the interest message to the content source provider device;
所述内容源请求端设备接收所述内容源提供端设备提供的编码的数据包具体包括:The receiving of the encoded data packet provided by the content source provider device by the content source requesting device specifically includes:
所述内容源请求端设备接收所述转发节点转发的编码的数据包,所述编码的数据包由所述内容源提供端设备发送给所述转发节点。The content source requesting end device receives the encoded data packet forwarded by the forwarding node, and the encoded data packet is sent to the forwarding node by the content source providing end device.
结合本发明实施例的第一方面或第一方面的第一种实现方式,本发明实施例第一方面的第二种实现方式中,所述内容源请求端设备对编码数据包集合进行解码,得到所述数据块的步骤之后还包括:In combination with the first aspect of the embodiments of the present invention or the first implementation of the first aspect, in the second implementation of the first aspect of the embodiments of the present invention, the content source requesting device decodes the set of encoded data packets, After the step of obtaining the data block, it also includes:
所述内容源请求端设备停止接收所述编码的数据包,并发出停止发包通告,所述停止发包通告用于使得接收到所述停止发包通告的设备停止发送所述数据块对应的编码的数据包并清除所述编码的数据包的转发路径信息。The content source requesting end device stops receiving the encoded data packets, and sends out a packet sending stop notification, and the packet sending stop notification is used to make the device that receives the packet sending stop notification stop sending the encoded data corresponding to the data block packet and clear the forwarding path information of the encoded data packet.
结合本发明实施例第一方面的第二种实现方式,本发明实施例第一方面的第三种实现方式中,所述内容源请求端设备对编码数据包集合进行解码具体包括:In combination with the second implementation of the first aspect of the embodiments of the present invention, in the third implementation of the first aspect of the embodiments of the present invention, the decoding of the encoded data packet set by the content source requesting device specifically includes:
所述内容源请求端设备使用高斯消元法对所述编码数据包集合进行解码。The content source requesting device decodes the set of encoded data packets by using a Gaussian elimination method.
结合本发明实施例第一方面的第三种实现方式,本发明实施例第一方面的第四种实现方式中,In combination with the third implementation manner of the first aspect of the embodiments of the present invention, in the fourth implementation manner of the first aspect of the embodiments of the present invention,
所述数据块为组成一个内容的多个数据块中的一块;The data block is one of a plurality of data blocks constituting one content;
所述数据块的信息为所述数据块在所述内容中的编号;The information of the data block is the number of the data block in the content;
所述兴趣报文中还包括所述内容的内容名。The interest message also includes the content name of the content.
本发明实施例第二方面提供了一种内容中心网络中内容分发的方法,包括:The second aspect of the embodiment of the present invention provides a method for distributing content in a content-centric network, including:
转发节点接收内容源请求端设备发送的兴趣报文,所述兴趣报文中携带所述内容源请求端设备请求的数据块的信息;The forwarding node receives the interest message sent by the content source requesting end device, the interest message carrying the information of the data block requested by the content source requesting end device;
所述转发节点转发所述兴趣报文到内容源提供端设备,使得所述内容源提供端设备对与所述兴趣报文相匹配的数据块进行喷泉编码后返回编码的数据包给所述转发节点;The forwarding node forwards the interest message to the content source provider device, so that the content source provider device performs fountain coding on the data block matching the interest message and returns the encoded data packet to the forwarding node. node;
所述转发节点将所述内容源提供端设备返回的编码的数据包缓存到编码缓存区;The forwarding node caches the encoded data packet returned by the content source provider device in an encoding buffer area;
所述转发节点将所述返回的编码的数据包转发给所述内容源请求端设备,使得所述内容源请求端设备对编码数据包集合进行解码得到所述数据块,所述编码数据包集合中包括所述内容源请求端设备接收到的编码的数据包。The forwarding node forwards the returned encoded data packet to the content source requester device, so that the content source requester device decodes the set of encoded data packets to obtain the data block, and the set of encoded data packets Include the encoded data packet received by the content source requester device.
结合本发明实施例的第二方面,本发明实施例第二方面的第一种实现方式中,所述转发节点转发所述兴趣报文到内容源提供端设备的步骤之前还包括:In combination with the second aspect of the embodiments of the present invention, in the first implementation of the second aspect of the embodiments of the present invention, before the forwarding node forwards the interest message to the content source provider device, it further includes:
所述转发节点查找所述编码缓存区中是否存在与所述兴趣报文相匹配的编码的数据包;The forwarding node searches whether there is an encoded data packet matching the interest message in the encoding buffer;
若所述编码缓存区中存在与所述兴趣报文相匹配的编码的数据包,则发送所述相匹配的编码的数据包给所述内容源请求端设备。If there is an encoded data packet that matches the Interest message in the encoded buffer, then send the matched encoded data packet to the content source requesting device.
本发明实施例第三方面提供了一种内容中心网络中内容分发的方法,包括:The third aspect of the embodiment of the present invention provides a method for distributing content in a content-centric network, including:
内容源提供端设备接收内容源请求端设备发出的兴趣报文,所述兴趣报文中携带所述内容源请求端设备请求的数据块的信息;The content source provider device receives the interest message sent by the content source requester device, and the interest message carries the information of the data block requested by the content source requester device;
所述内容源提供端设备按照预置规则将与所述兴趣报文相匹配的数据块分段生成数据块分片,按喷泉编码算法对所述数据块分片进行编码,得到编码的数据包;The content source provider device segments the data block matching the interest message into data block fragments according to preset rules, encodes the data block fragments according to the fountain coding algorithm, and obtains encoded data packets ;
所述内容源提供端设备将所述编码的数据包发送到内容源请求端设备,使得所述内容源请求端设备在接收到编码的数据包后,进行解码得到所述数据块。The content source provider device sends the encoded data packet to the content source requester device, so that the content source requester device decodes the encoded data packet to obtain the data block after receiving the encoded data packet.
结合本发明实施例的第三方面,本发明实施例第三方面的第一种实现方式中,所述内容源提供端设备接收内容源请求端设备发出的兴趣报文包括:In combination with the third aspect of the embodiments of the present invention, in the first implementation manner of the third aspect of the embodiments of the present invention, the receiving of the interest message sent by the content source requesting device by the content source provider device includes:
所述内容源提供端设备接收转发节点发送的所述兴趣报文,所述兴趣报文由所述内容源请求端设备发送给所述转发节点;The content source provider device receives the interest message sent by the forwarding node, and the interest message is sent to the forwarding node by the content source requester device;
所述内容源提供端设备将所述编码的数据包发送到内容源请求端设备包括:Sending the encoded data packet to the content source requesting device by the content source provider device includes:
所述内容源提供的设备将所述编码的数据包发送给所述转发节点,使得所述转发节点将所述编码的数据包转发给所述内容源请求端设备。The device provided by the content source sends the encoded data packet to the forwarding node, so that the forwarding node forwards the encoded data packet to the content source requesting end device.
结合本发明实施例的第三方面或第三方面的第一种实现方式,本发明实施例第三方面的第二种实现方式中,所述编码的数据包中包含有所述数据块的编号,所述数据块为组成一个内容的多个数据块中的一块;In combination with the third aspect of the embodiment of the present invention or the first implementation manner of the third aspect, in the second implementation manner of the third aspect of the embodiment of the present invention, the coded data packet contains the serial number of the data block , the data block is one of multiple data blocks forming one content;
所述编码的数据包中还包括所述内容的内容名,喷泉编码的标识和一个随机数。The coded data packet also includes the content name of the content, the fountain coded identifier and a random number.
本发明实施例第四方面提供了一种内容源请求端设备,其特征在于,包括:The fourth aspect of the embodiment of the present invention provides a content source requester device, which is characterized in that it includes:
第一发送模块,用于发送兴趣报文到内容源提供端设备,所述兴趣报文中携带所述内容源请求端设备请求的数据块的信息;A first sending module, configured to send an interest message to the content source provider device, where the interest message carries information about the data block requested by the content source requester device;
第一接收模块,用于接收所述内容源提供端设备提供的编码的数据包,所述编码的数据包是由所述内容源提供端设备将与所述兴趣报文相匹配的数据块分段生成数据块分片,并且使用喷泉编码算法对所述数据块分片编码得到的;The first receiving module is configured to receive the encoded data packet provided by the content source provider device, where the encoded data packet is divided into data blocks matching the interest message by the content source provider device The segment generates data block fragments, and uses the fountain coding algorithm to encode the data block fragments;
解码模块,用于对编码数据包集合进行解码,得到所述数据块,所述编码数据包集合中包括所述第一接收模块接收到的编码的数据包。The decoding module is configured to decode a set of encoded data packets to obtain the data block, and the set of encoded data packets includes the encoded data packets received by the first receiving module.
结合本发明实施例的第四方面,本发明实施例第四方面的第一种实现方式中,In combination with the fourth aspect of the embodiments of the present invention, in the first implementation manner of the fourth aspect of the embodiments of the present invention,
所述第一发送模块具体用于,发送所述兴趣报文给转发节点,使得所述转发节点转发所述兴趣报文给所述内容源提供端设备;The first sending module is specifically configured to send the interest message to the forwarding node, so that the forwarding node forwards the interest message to the content source provider device;
所述第一接收模块具体用于,接收所述转发节点转发的编码的数据包,所述编码的数据包由所述内容源提供端设备发送给所述转发节点。The first receiving module is specifically configured to receive an encoded data packet forwarded by the forwarding node, and the encoded data packet is sent to the forwarding node by the content source provider device.
结合本发明实施例的第四方面或第四方面的第一种实现方式,本发明实施例第四方面的第二种实现方式中,所述内容源请求端设备还包括:In combination with the fourth aspect or the first implementation manner of the fourth aspect of the embodiments of the present invention, in the second implementation manner of the fourth aspect of the embodiments of the present invention, the content source requesting end device further includes:
停止模块,用于停止接收所述编码的数据包,并发出停止发包通告,所述停止发包通告用于使得接收到所述停止发包通告的设备停止发送所述数据块对应的编码的数据包并清除所述编码的数据包的转发路径信息。A stop module, configured to stop receiving the encoded data packets, and issue a packet sending stop notification, the packet sending stop notification is used to make the device that receives the packet sending stop notification stop sending the encoded data packets corresponding to the data block and Clear forwarding path information of the encoded data packet.
结合本发明实施例第四方面的第二种实现方式,本发明实施例第四方面的第三种实现方式中,In combination with the second implementation manner of the fourth aspect of the embodiments of the present invention, in the third implementation manner of the fourth aspect of the embodiments of the present invention,
所述解码模块具体用于,使用高斯消元法对所述编码数据包集合进行解码,得到所述数据块。The decoding module is specifically configured to use a Gaussian elimination method to decode the set of encoded data packets to obtain the data block.
本发明实施例第五方面提供了一种转发节点,包括:The fifth aspect of the embodiment of the present invention provides a forwarding node, including:
第二接收模块,用于接收内容源请求端设备发送的兴趣报文,所述兴趣报文中携带所述内容源请求端设备请求的数据块的信息;The second receiving module is configured to receive an interest message sent by a content source requesting end device, where the interest message carries information about a data block requested by the content source requesting end device;
第一转发模块,用于转发所述兴趣报文到内容源提供端设备,使得所述内容源提供端设备对与所述兴趣报文相匹配的数据块进行喷泉编码后返回编码的数据包给缓存模块;The first forwarding module is configured to forward the interest message to the content source provider device, so that the content source provider device performs fountain encoding on the data block matching the interest message and returns the encoded data packet to cache module;
缓存模块,用于将所述内容源提供端设备返回的编码的数据包缓存到编码缓存区;A caching module, configured to cache the encoded data packets returned by the content source provider device in an encoding buffer area;
第二转发模块,用于将所述内容源提供端设备返回的编码的数据包转发给所述内容源请求端设备,使得所述内容源请求端设备对编码数据包集合进行解码得到所述数据块,所述编码数据包集合中包括所述内容源请求端设备接收到的编码的数据包。The second forwarding module is configured to forward the encoded data packet returned by the content source provider device to the content source requester device, so that the content source requester device decodes a set of encoded data packets to obtain the data block, the set of encoded data packets includes the encoded data packets received by the content source request end device.
结合本发明实施例的第五方面,本发明实施例第五方面的第一种实现方式中,所述转发节点还包括:With reference to the fifth aspect of the embodiments of the present invention, in the first implementation manner of the fifth aspect of the embodiments of the present invention, the forwarding node further includes:
查找模块,用于查找所述编码缓存区中是否存在与所述兴趣报文相匹配的编码的数据包;A search module, configured to find whether there is an encoded data packet matching the interest message in the encoding buffer;
第二发送模块,用于当所述编码缓存区中存在与所述兴趣报文相匹配的编码的数据包时,发送所述相匹配的编码的数据包给所述内容源请求端设备。The second sending module is configured to send the matched encoded data packet to the content source requesting end device when there is an encoded data packet matching the interest message in the encoded buffer.
本发明实施例第六方面提供了一种内容源提供端设备,包括:The sixth aspect of the embodiment of the present invention provides a content source provider device, including:
第三接收模块,用于接收内容源请求端设备发出的兴趣报文,所述兴趣报文中携带所述内容源请求端设备请求的数据块的信息;The third receiving module is configured to receive an interest message sent by the content source requesting end device, the interest message carrying the information of the data block requested by the content source requesting end device;
编码模块,用于按照预置规则将与所述兴趣报文相匹配的数据块分段生成数据块分片,按喷泉编码算法对所述数据块分片进行编码,得到编码的数据包;An encoding module, configured to generate data block fragments by segmenting the data blocks matching the interest message according to preset rules, and encode the data block fragments according to the fountain encoding algorithm to obtain encoded data packets;
第三发送模块,用于将所述编码模块得到的编码的数据包发送到内容源请求端设备,使得所述内容源请求端设备在接收到编码的数据包后,进行解码得到所述数据块。The third sending module is configured to send the encoded data packet obtained by the encoding module to the content source requesting device, so that the content source requesting device decodes the encoded data packet to obtain the data block after receiving the encoded data packet .
结合本发明实施例的第六方面,本发明实施例第六方面的第一种实施例中,所述第三接收模块具体用于,接收转发节点发送的所述兴趣报文,所述兴趣报文由所述内容源请求端设备发送给所述转发节点;With reference to the sixth aspect of the embodiments of the present invention, in the first embodiment of the sixth aspect of the embodiments of the present invention, the third receiving module is specifically configured to receive the Interest message sent by the forwarding node, and the Interest message The text is sent to the forwarding node by the content source requesting device;
所述第三发送模块具体用于,将所述编码的数据包发送给所述转发节点,使得所述转发节点将所述编码的数据包转发给所述内容源请求端设备,使得所述内容源请求端设备在接收到编码的数据包后,进行解码得到所述数据块。The third sending module is specifically configured to send the encoded data packet to the forwarding node, so that the forwarding node forwards the encoded data packet to the content source requesting end device, so that the content After receiving the encoded data packet, the source requester device decodes it to obtain the data block.
从以上技术方案可以看出,本发明实施例具有以下优点:本发明实施例中内容源请求端设备发送兴趣报文到内容源提供端设备后,接收内容源提供端设备提供的编码的数据包,该编码的数据包是由内容源提供端设备将与该兴趣报文相匹配的数据块分段生成数据块分片,并且使用喷泉编码算法对数据块分片编码得到的,所以该内容源请求端设备可以同时接收多个内容源提供端设备发送的编码的数据包,内容源请求端设备对包括有接收到的编码的数据包的编码数据包集合进行解码,当满足编码条件时,内容源请求端设备即可以解码成功得到该数据块,由于按照喷泉编码算法得到的编码的数据包的数量远大于数据块的数量,且编码的数据包互相之间相同的概率非常小,所以在一定时间内,内容源请求端设备从多个设备上获取的编码的数据包相同的概率远小于从多个设备上获取的数据块相同的概率,使得内容源请求端设备得到有效数据的概率增大,减少了获取足够有效数据的时间,提高了内容中心网络中内容的获取效率,网络链路中不再传输大量的重复数据,避免了链路资源的浪费。It can be seen from the above technical solutions that the embodiment of the present invention has the following advantages: in the embodiment of the present invention, after the content source requesting end device sends the interest message to the content source providing end device, it receives the encoded data packet provided by the content source providing end device , the encoded data packet is obtained by generating data block fragments by the content source provider device by segmenting the data block matching the interest message, and using the fountain coding algorithm to encode the data block fragments, so the content source The requesting end device can simultaneously receive encoded data packets sent by multiple content source providing end devices, and the content source requesting end device decodes the set of encoded data packets including the received encoded data packets. When the encoding conditions are satisfied, the content The device at the source requesting end can successfully decode and obtain the data block. Since the number of encoded data packets obtained according to the fountain encoding algorithm is much larger than the number of data blocks, and the probability that the encoded data packets are identical to each other is very small, so in a certain Within a certain period of time, the probability that the encoded data packets obtained by the content source requesting device from multiple devices are the same is much smaller than the probability that the data blocks obtained from multiple devices are the same, which increases the probability that the content source requesting device obtains valid data , reducing the time to obtain sufficient effective data, improving the content acquisition efficiency in the content-centric network, no longer transmitting a large amount of repeated data in the network link, and avoiding the waste of link resources.
附图说明Description of drawings
图1为本发明实施例中内容中心网络中内容分发的方法一个流程示意图;FIG. 1 is a schematic flowchart of a method for distributing content in a content-centric network in an embodiment of the present invention;
图2为本发明实施例中内容中心网络中内容分发的方法另一个流程示意图;FIG. 2 is another schematic flowchart of a content distribution method in a content-centric network in an embodiment of the present invention;
图3为本发明实施例中内容中心网络中内容分发的方法另一个流程示意图;FIG. 3 is another schematic flowchart of a method for distributing content in a content-centric network in an embodiment of the present invention;
图4为本发明实施例中一个解码流程示意图;FIG. 4 is a schematic diagram of a decoding process in an embodiment of the present invention;
图5为本发明实施例中内容中心网络中内容分发的方法另一个流程示意图;FIG. 5 is another schematic flowchart of a method for distributing content in a content-centric network in an embodiment of the present invention;
图6为本发明实施例中内容中心网络中内容分发的方法另一个流程示意图;FIG. 6 is another schematic flowchart of a method for distributing content in a content-centric network in an embodiment of the present invention;
图7为本发明实施例中内容中心网络中内容分发的方法另一个流程示意图;FIG. 7 is another schematic flowchart of a method for distributing content in a content-centric network in an embodiment of the present invention;
图8为本发明实施例中内容中心网络中内容分发的方法另一个流程示意图;FIG. 8 is another schematic flowchart of a method for distributing content in a content-centric network in an embodiment of the present invention;
图9为本发明实施例中内容源请求端设备一个结构示意图;FIG. 9 is a schematic structural diagram of a content source requesting device in an embodiment of the present invention;
图10为本发明实施例中内容源请求端设备另一个结构示意图;FIG. 10 is a schematic diagram of another structure of a content source requesting end device in an embodiment of the present invention;
图11为本发明实施例中网络设备一个结构示意图;FIG. 11 is a schematic structural diagram of a network device in an embodiment of the present invention;
图12为本发明实施例中转发节点一个结构示意图;FIG. 12 is a schematic structural diagram of a forwarding node in an embodiment of the present invention;
图13为本发明实施例中转发节点另一个结构示意图;FIG. 13 is another structural schematic diagram of a forwarding node in an embodiment of the present invention;
图14为本发明实施例中内容源提供端设备一个结构示意图;FIG. 14 is a schematic structural diagram of a content source provider device in an embodiment of the present invention;
图15为本发明实施例中内容分发系统一个结构示意图。Fig. 15 is a schematic structural diagram of the content distribution system in the embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts belong to the protection scope of the present invention.
下面分别从不同的执行主体的角度对本发明实施例中内容中心网络中内容分发的方法进行描述:The method for content distribution in the content-centric network in the embodiment of the present invention is described below from the perspectives of different executive entities:
一、内容源请求端设备的操作:1. Operation of the content source requester device:
请参阅图1,本发明实施例中内容中心网络中内容分发的方法一个实施例包括:Referring to Fig. 1, an embodiment of a method for content distribution in a content-centric network in an embodiment of the present invention includes:
101、内容源请求端设备发送兴趣报文到内容源提供端设备;101. The content source requester device sends an Interest message to the content source provider device;
在内容中心网络中,当内容源请求端设备需要请求内容时,发送兴趣报文到内容源提供端设备,以数据块为单位请求数据,该兴趣报文中携带有内容源请求端设备请求的数据块的信息。In a content-centric network, when a content source requester device needs to request content, it sends an Interest message to the content source provider device, and requests data in units of data blocks. The Interest message carries the information requested by the content source requester device. information about the data block.
102、内容源请求端设备接收所述内容源提供端设备提供的编码的数据包;102. The content source requesting device receives the encoded data packet provided by the content source providing device;
内容源请求端设备发送兴趣报文到内容源提供端设备后,接收该内容源提供端设备提供的编码的数据包,该编码的数据包是由内容源提供端设备将与兴趣报文相匹配的数据块分段生成数据块分片,并且使用喷泉编码算法对数据块分片编码得到的。After the content source requester device sends the interest message to the content source provider device, it receives the encoded data packet provided by the content source provider device. The encoded data packet is matched with the interest message by the content source provider device. The data block segmentation of generates data block fragments, and uses the fountain coding algorithm to encode the data block fragments.
可以理解的是,进行喷泉编码时,可以将该数据块分成k段,每一段即为一个原始分组,然后可以由k个原始分组生成任意数量的编码分组,每一个编码分组即可以成为一个编码的数据包,接收端只要收到k(1+ε)个编码分组的任意子集,即可通过译码以高概率成功(和ε有关)恢复全部原始分组,从而得到完整的数据块。It can be understood that when performing fountain coding, the data block can be divided into k segments, each segment is an original packet, and then any number of encoded packets can be generated from the k original packets, and each encoded packet can become an encoded As long as the receiving end receives any subset of k(1+ε) coded packets, it can successfully (related to ε) restore all the original packets through decoding with a high probability, so as to obtain a complete data block.
由喷泉编码可知,提供的编码的数据包有很多个,步骤101中的内容源提供端设备的数量可以为一个,也可以为多个,步骤102中返回编码的数据包的内容源提供端设备可以为一个,也可以为多个,具体数量可以根据实际接收到兴趣报文的内容源提供端设备的数量与含有与兴趣报文相匹配的数据块的内容源提供端设备的数量而定,此处不做限定。It can be seen from the fountain code that there are many encoded data packets provided, and the number of content source provider devices in step 101 can be one or multiple, and the content source provider device that returns the encoded data packets in step 102 It can be one or multiple, and the specific number can be determined according to the number of content source provider devices that actually receive the Interest message and the number of content source provider devices that contain data blocks that match the Interest message. There is no limit here.
103、内容源请求端设备对编码数据包集合进行解码,得到所述数据块,所述编码数据包集合中包括所述内容源请求端设备接收到的编码的数据包。103. The content source requester device decodes the encoded data packet set to obtain the data block, and the encoded data packet set includes the encoded data packet received by the content source requester device.
内容源请求端设备接收内容源提供端设备提供的编码的数据包后,对编码数据包集合进行解码,得到与兴趣报文相匹配的数据块,该编码数据包集合中包括内容源请求端设备接收到的编码的数据包。After receiving the encoded data packet provided by the content source provider device, the content source requester device decodes the set of encoded data packets to obtain a data block matching the interest message. The encoded data packet set includes the content source requester device Encoded packet received.
需要说明的是,内容源请求端设备对编码数据包集合进行解码的方式可以有很多种,例如内容源请求端设备可以持续对编码数据包集合进行解码,直到接收到的编码的数据包达到一定的数量,即编码数据包集合中包含的编码的数据包达到一定的数量后,才解码成功,内容源请求端设备也可以设定一个预置数值,当接收到的编码的数据包达到预置数值后,才开始对编码数据包集合进行解码,得到数据块,还可以有其他的方式,例如解码前可以先判断编码数据包集合中的编码的数据包是否满足解码条件等,此处不作限定。本发明实施例中内容源请求端设备发送兴趣报文到内容源提供端设备后,接收内容源提供端设备提供的编码的数据包,该编码的数据包是由内容源提供端设备将与该兴趣报文相匹配的数据块分段生成数据块分片,并且使用喷泉编码算法对数据块分片编码得到的,所以该内容源请求端设备可以同时接收多个内容源提供端设备发送的编码的数据包,内容源请求端设备对包括有接收到的编码的数据包的编码数据包集合进行解码,当满足编码条件时,内容源请求端设备即可以解码成功得到该数据块,由于按照喷泉编码算法得到的编码的数据包的数量远大于数据块的数量,且编码的数据包互相之间相同的概率非常小,所以在一定时间内,内容源请求端设备从多个设备上获取的编码的数据包相同的概率远小于从多个设备上获取的数据块相同的概率,使得内容源请求端设备得到有效数据的概率增大,减少了获取足够有效数据的时间,提高了内容中心网络中内容的获取效率,网络链路中不再传输大量的重复数据,避免了链路资源的浪费。It should be noted that there are many ways for the content source requester device to decode the set of encoded data packets. For example, the content source requester device can continuously decode the set of encoded data packets until the received encoded data packets reach a certain value. The number of encoded data packets contained in the encoded data packet set reaches a certain number before decoding is successful. The content source requesting device can also set a preset value. When the received encoded data packets reach the preset value After the value is obtained, the encoded data packet set is decoded to obtain the data block. There are other ways. For example, before decoding, it is possible to judge whether the encoded data packets in the encoded data packet set meet the decoding conditions, etc., which are not limited here. . In the embodiment of the present invention, after the content source requester device sends an interest message to the content source provider device, it receives the encoded data packet provided by the content source provider device, and the encoded data packet is shared with the content source provider device. The data block segments matching the interest message generate data block fragments, and use the fountain coding algorithm to encode the data block fragments, so the content source requesting device can receive codes sent by multiple content source provider devices at the same time The content source requester device decodes the encoded data packet set including the received encoded data packet. When the encoding condition is satisfied, the content source requester device can decode the data block successfully. According to the Fountain The number of encoded data packets obtained by the encoding algorithm is much larger than the number of data blocks, and the probability that the encoded data packets are identical to each other is very small, so within a certain period of time, the encoding obtained by the content source requesting device from multiple devices The probability of the same data packets is much smaller than the probability of the same data blocks obtained from multiple devices, which increases the probability of obtaining valid data from the content source request device, reduces the time to obtain sufficient valid data, and improves the efficiency of the content-centric network. The efficiency of content acquisition, a large amount of repeated data is no longer transmitted in the network link, and the waste of link resources is avoided.
上面实施例中,内容源请求端设备发送兴趣报文到内容源提供端设备,在实际应用中,内容源请求端设备可以将兴趣报文发送给转发节点,再由转发节点转发给内容源提供端设备,请参阅图2,本发明实施例中内容中心网络中内容分发的方法另一个实施例包括:In the above embodiment, the content source requester device sends the interest message to the content source provider device. In practical applications, the content source requester device can send the interest message to the forwarding node, and then the forwarding node forwards the interest message to the content source provider. terminal device, please refer to FIG. 2, another embodiment of the content distribution method in the content-centric network in the embodiment of the present invention includes:
201、内容源请求端设备发送兴趣报文给转发节点,使得该转发节点转发兴趣报文给内容源提供端设备;201. The content source requester device sends an Interest message to the forwarding node, so that the forwarding node forwards the Interest message to the content source provider device;
在内容中心网络中,当内容源请求端设备需要请求内容时,发送兴趣报文给转发节点,使得该转发节点转发兴趣报文给内容源提供端设备,以数据块为单位请求数据,该兴趣报文中携带有内容源请求端设备请求的数据块的信息。In the content-centric network, when the content source requester device needs to request content, it sends an Interest message to the forwarding node, so that the forwarding node forwards the Interest message to the content source provider device, and requests data in units of data blocks. The message carries the information of the data block requested by the content source requesting end device.
可以理解的是,内容源请求端设备可以发送兴趣报文给多个转发节点,或者也可以发送给与其连接的所有转发节点,转发节点可以将兴趣报文转发给多个内容源提供端设备或其他转发节点,也可以通过查询或路径计算等方式转发给特定的一些内容源提供端设备,此处不做限定。It can be understood that the content source requester device can send the interest message to multiple forwarding nodes, or to all forwarding nodes connected to it, and the forwarding node can forward the interest message to multiple content source provider devices or Other forwarding nodes may also forward to some specific content source provider devices through query or path calculation, which is not limited here.
202、内容源请求端设备接收转发节点转发的编码的数据包,该编码的数据包由内容源提供端设备发送给该转发节点;202. The content source requesting end device receives the encoded data packet forwarded by the forwarding node, and the encoded data packet is sent to the forwarding node by the content source providing end device;
内容源请求端设备发送兴趣报文给转发节点后,接收转发节点转发的编码的数据包,该编码的数据包由内容源提供端设备发送给该转发节点,该编码的数据包是由内容源提供端设备将与兴趣报文相匹配的数据块分段生成数据块分片,并且使用喷泉编码算法对数据块分片编码得到的。After the content source requester device sends the interest message to the forwarding node, it receives the encoded data packet forwarded by the forwarding node. The encoded data packet is sent to the forwarding node by the content source provider device. The encoded data packet is sent by the content source The provider device segments the data blocks that match the Interest message to generate data block fragments, and uses the fountain coding algorithm to encode the data block fragments.
可以理解的是,进行喷泉编码时,可以将该数据块分成k段,每一段即为一个原始分组,然后可以由k个原始分组生成任意数量的编码分组,每一个编码分组即可以成为一个编码的数据包,接收端只要收到k(1+ε)个编码分组的任意子集,即可通过译码以高概率成功(和ε有关)恢复全部原始分组,从而得到完整的数据块。It can be understood that when performing fountain coding, the data block can be divided into k segments, each segment is an original packet, and then any number of encoded packets can be generated from the k original packets, and each encoded packet can become an encoded As long as the receiving end receives any subset of k(1+ε) coded packets, it can successfully (related to ε) restore all the original packets through decoding with a high probability, so as to obtain a complete data block.
由喷泉编码可知,提供的编码的数据包有很多个,步骤201中的内容源提供端设备的数量可以为一个,也可以为多个,步骤202中返回编码的数据包的内容源提供端设备可以为一个,也可以为多个,具体数量可以根据实际接收到兴趣报文的内容源提供端设备的数量与含有与兴趣报文相匹配的数据块的内容源提供端设备的数量而定,此处不做限定。内容源提供端设备为多个时,多个内容源提供端设备按照相同的规则将数据块分成k段,每一段即为一个原始分组,然后可以由k个原始分组生成任意数量的编码分组,每一个编码分组即可以成为一个编码的数据包It can be seen from the fountain code that there are many encoded data packets provided, and the number of content source provider devices in step 201 can be one or multiple, and the content source provider device that returns the encoded data packets in step 202 It can be one or multiple, and the specific number can be determined according to the number of content source provider devices that actually receive the Interest message and the number of content source provider devices that contain data blocks that match the Interest message. There is no limit here. When there are multiple content source provider devices, multiple content source provider devices divide the data block into k segments according to the same rules, and each segment is an original packet, and then any number of encoded packets can be generated from the k original packets. Each encoded packet can become an encoded data packet
203、内容源请求端设备对编码数据包集合进行解码,得到所述数据块,所述编码数据包集合中包括所述内容源请求端设备接收到的编码的数据包。203. The content source requester device decodes the encoded data packet set to obtain the data block, and the encoded data packet set includes the encoded data packet received by the content source requester device.
内容源请求端设备接收内容源提供端设备提供的编码的数据包后,对编码数据包集合进行解码,得到与兴趣报文相匹配的数据块,该编码数据包集合中包括内容源请求端设备接收到的编码的数据包。After receiving the encoded data packet provided by the content source provider device, the content source requester device decodes the set of encoded data packets to obtain a data block matching the interest message. The encoded data packet set includes the content source requester device Encoded packet received.
需要说明的是,内容源请求端设备对编码数据包集合进行解码的方式可以有很多种,例如内容源请求端设备可以持续对编码数据包集合进行解码,直到接收到的编码的数据包达到一定的数量,即编码数据包集合中包含的编码的数据包达到一定的数量后,才解码成功,内容源请求端设备也可以设定一个预置数值,当接收到的编码的数据包达到预置数值后,才开始对编码数据包集合进行解码,得到数据块,还可以有其他的方式,例如解码前可以先判断编码数据包集合中的编码的数据包是否满足解码条件等,此处不作限定。It should be noted that there are many ways for the content source requester device to decode the set of encoded data packets. For example, the content source requester device can continuously decode the set of encoded data packets until the received encoded data packets reach a certain value. The number of encoded data packets contained in the encoded data packet set reaches a certain number before decoding is successful. The content source requesting device can also set a preset value. When the received encoded data packets reach the preset value After the value is obtained, the encoded data packet set is decoded to obtain the data block. There are other ways. For example, before decoding, it is possible to judge whether the encoded data packets in the encoded data packet set meet the decoding conditions, etc., which are not limited here. .
本发明实施例中,内容源请求端设备兴趣报文给转发节点,使得该转发节点转发兴趣报文给所述内容源提供端设备,再接收转发节点转发的编码的数据包,这样可以将兴趣报文扩散到更大的范围,并且可以得到更多的设备返回的编码的数据包,提高了内容的获取效率。In the embodiment of the present invention, the content source requests the device interest message to the forwarding node, so that the forwarding node forwards the interest message to the content source provider device, and then receives the encoded data packet forwarded by the forwarding node, so that the interest The message spreads to a larger area, and more coded data packets returned by devices can be obtained, which improves the content acquisition efficiency.
在实际应用中,内容源请求端设备得到数据块后,还可以发出停止发包通告停止其他设备对该数据块对应的编码包的转发,请参阅图3,本发明实施例中内容中心网络中内容分发的方法另一个实施例包括:In practical applications, after the content source requester device obtains the data block, it can also issue a stop sending notification to stop other devices from forwarding the encoded packets corresponding to the data block. Please refer to Figure 3, the content in the content-centric network in the embodiment of the present invention Another embodiment of the method of distributing includes:
301、内容源请求端设备发送兴趣报文给转发节点,使得该转发节点转发兴趣报文给内容源提供端设备;301. The content source requester device sends an Interest message to the forwarding node, so that the forwarding node forwards the Interest message to the content source provider device;
在内容中心网络中,当内容源请求端设备需要请求内容时,发送兴趣报文给转发节点,使得该转发节点转发兴趣报文给内容源提供端设备,以数据块为单位请求数据,该兴趣报文中携带有内容源请求端设备请求的数据块的信息。In the content-centric network, when the content source requester device needs to request content, it sends an Interest message to the forwarding node, so that the forwarding node forwards the Interest message to the content source provider device, and requests data in units of data blocks. The message carries the information of the data block requested by the content source requesting end device.
需要说明的是,该数据块为组成一个内容的多个数据块中的一块,该数据块的信息可以为该数据块在该内容中的编号,该兴趣报文中还可以包括该内容的内容名,例如该兴趣报文的包头中可以携带有以…/content_name/chunk_number格式定义的命名信息,该content_name为内容源请求端设备请求的内容的内容名,该chunk_number为请求数据块在该内容中的编号,该兴趣报文中还可以以其他的命名方式携带这些信息,此处不作限定。It should be noted that the data block is one of multiple data blocks that constitute a content, the information of the data block may be the number of the data block in the content, and the interest message may also include the content of the content Name, for example, the packet header of the interest message can carry naming information defined in the format of .../content_name/chunk_number, the content_name is the content name of the content requested by the content source requester device, and the chunk_number is the requested data block in the content The information can also be carried in other naming ways in the Interest message, which is not limited here.
可以理解的是,内容源请求端设备可以发送兴趣报文给多个转发节点,或者也可以发送给与其连接的所有转发节点,转发节点可以将兴趣报文转发给多个内容源提供端设备或其他转发节点,也可以通过查询或路径计算等方式转发给特定的一些内容源提供端设备,此处不做限定。It can be understood that the content source requester device can send the interest message to multiple forwarding nodes, or to all forwarding nodes connected to it, and the forwarding node can forward the interest message to multiple content source provider devices or Other forwarding nodes may also forward to some specific content source provider devices through query or path calculation, which is not limited here.
302、内容源请求端设备接收转发节点转发的编码的数据包,该编码的数据包由内容源提供端设备发送给该转发节点;302. The content source requesting end device receives the encoded data packet forwarded by the forwarding node, and the encoded data packet is sent to the forwarding node by the content source providing end device;
内容源请求端设备发送兴趣报文给转发节点后,接收转发节点转发的编码的数据包,该编码的数据包由内容源提供端设备发送给该转发节点,该编码的数据包是由内容源提供端设备将与兴趣报文相匹配的数据块分段生成数据块分片,并且使用喷泉编码算法对数据块分片编码得到的。After the content source requester device sends the interest message to the forwarding node, it receives the encoded data packet forwarded by the forwarding node. The encoded data packet is sent to the forwarding node by the content source provider device. The encoded data packet is sent by the content source The provider device segments the data blocks that match the Interest message to generate data block fragments, and uses the fountain coding algorithm to encode the data block fragments.
可以理解的是,进行喷泉编码时,可以将该数据块分成k段,每一段即为一个原始分组,然后可以由k个原始分组生成任意数量的编码分组,每一个编码分组即可以成为一个编码的数据包,接收端只要收到k(1+ε)个编码分组的任意子集,即可通过译码以高概率成功(和ε有关)恢复全部原始分组,从而得到完整的数据块。It can be understood that when performing fountain coding, the data block can be divided into k segments, each segment is an original packet, and then any number of encoded packets can be generated from the k original packets, and each encoded packet can become an encoded As long as the receiving end receives any subset of k(1+ε) coded packets, it can successfully (related to ε) restore all the original packets through decoding with a high probability, so as to obtain a complete data block.
由喷泉编码可知,提供的编码的数据包有很多个,步骤301中的内容源提供端设备的数量可以为一个,也可以为多个,步骤302中返回编码的数据包的内容源提供端设备可以为一个,也可以为多个,具体数量可以根据实际接收到兴趣报文的内容源提供端设备的数量与含有与兴趣报文相匹配的数据块的内容源提供端设备的数量而定,此处不做限定。It can be seen from the fountain code that there are many encoded data packets provided, and the number of content source provider devices in step 301 can be one or multiple, and the content source provider device that returns the encoded data packets in step 302 It can be one or multiple, and the specific number can be determined according to the number of content source provider devices that actually receive the Interest message and the number of content source provider devices that contain data blocks that match the Interest message. There is no limit here.
303、内容源请求端设备对编码数据包集合进行解码,得到所述数据块,所述编码数据包集合中包括所述内容源请求端设备接收到的编码的数据包。303. The content source requester device decodes the encoded data packet set to obtain the data block, and the encoded data packet set includes the encoded data packet received by the content source requester device.
内容源请求端设备接收内容源提供端设备提供的编码的数据包后,对编码数据包集合进行解码,得到与兴趣报文相匹配的数据块,该编码数据包集合中包括内容源请求端设备接收到的编码的数据包。After receiving the encoded data packet provided by the content source provider device, the content source requester device decodes the set of encoded data packets to obtain a data block matching the interest message. The encoded data packet set includes the content source requester device Encoded packet received.
需要说明的是,内容源请求端设备对编码数据包集合进行解码的方式可以有很多种,例如内容源请求端设备可以持续对编码数据包集合进行解码,直到接收到的编码的数据包达到一定的数量,即编码数据包集合中包含的编码的数据包达到一定的数量后,才解码成功,内容源请求端设备也可以设定一个预置数值,当接收到的编码的数据包达到预置数值后,才开始对编码数据包集合进行解码,得到数据块,还可以有其他的方式,例如解码前可以先判断编码数据包集合中的编码的数据包是否满足解码条件等,此处不作限定。It should be noted that there are many ways for the content source requester device to decode the set of encoded data packets. For example, the content source requester device can continuously decode the set of encoded data packets until the received encoded data packets reach a certain value. The number of encoded data packets contained in the encoded data packet set reaches a certain number before decoding is successful. The content source requesting device can also set a preset value. When the received encoded data packets reach the preset value After the value is obtained, the encoded data packet set is decoded to obtain the data block. There are other ways. For example, before decoding, it is possible to judge whether the encoded data packets in the encoded data packet set meet the decoding conditions, etc., which are not limited here. .
其中,内容源请求端设备可以使用高斯消元法对改编码数据包集合进行解码,具体的解码流程可以如图4所示:Among them, the content source requesting end device can use the Gaussian elimination method to decode the set of encoded data packets, and the specific decoding process can be shown in Figure 4:
401、接收到一个编码符号;401. A coding symbol is received;
402、提取该编码符号的特征向量;402. Extract the feature vector of the encoding symbol;
403、判断该特征向量与已接收的特征向量是否线性无关;403. Determine whether the feature vector is linearly independent from the received feature vector;
若不是线性无关的,则触发步骤404;If it is not linearly independent, trigger step 404;
若是线性无关的,则触发步骤405;If it is linearly independent, trigger step 405;
404、丢弃该特征向量;404. Discard the feature vector;
405、保存该编码符号的数据包,将该特征向量加入编码矩阵;405. Save the data packet of the encoding symbol, and add the feature vector to the encoding matrix;
406、判断编码符号的置是否等于输入符号的个数;406. Judging whether the number of encoding symbols is equal to the number of input symbols;
若不等于,则触发步骤401,再接收一个编码符号;If not equal, then trigger step 401, and then receive another coding symbol;
若等于,则触发步骤407;If equal, trigger step 407;
407、利用编码矩阵与接收的编码符号进行解码。407. Decode by using the encoding matrix and the received encoding symbols.
304、内容源请求端设备停止接收编码的数据包,并发出停止发包通告。304. The device at the content source requesting end stops receiving the encoded data packets, and sends a packet sending stop notification.
内容源请求端设备得到与兴趣报文相匹配的数据块后,停止接受编码的数据包,并发出停止发包通告,该停止发包通告用于使得接收到该停止发包通告的设备停止发送该数据块对应的编码的数据包并清除编码数据包转发路径信息,例如PTT表项等。After the content source requester device obtains the data block that matches the interest message, it stops accepting the encoded data packet and sends a packet stop notification, which is used to make the device that receives the packet stop notification stop sending the data block Correspondingly encoded data packets and clear the forwarding path information of the encoded data packets, such as PTT entries.
本发明实施例中,内容源请求端设备在得到数据块后,停止接收编码的数据包,并发送停止发包通告使得其他设备停止发送该数据块对应的编码的数据包并清除编码数据包转发路径信息,节省了网络资源,提高了各设备进行后续处理的效率,并且利用高斯消元法进行解码,降低了度为1的编码的数据包对解码成功率的影响,提高了解码成功率。In the embodiment of the present invention, after the content source requester device obtains the data block, it stops receiving the encoded data packet, and sends a packet stop notification so that other devices stop sending the encoded data packet corresponding to the data block and clears the forwarding path of the encoded data packet Information saves network resources, improves the efficiency of subsequent processing of each device, and uses Gaussian elimination method for decoding, which reduces the impact of encoded data packets with a degree of 1 on the decoding success rate and improves the decoding success rate.
二、转发节点的操作:2. The operation of the forwarding node:
请参阅图5,本发明实施例中内容中心网络中内容分发的方法另一个实施例包括:Please refer to FIG. 5, another embodiment of the content distribution method in the content-centric network in the embodiment of the present invention includes:
501、转发节点接收内容源请求端设备发送的兴趣报文;501. The forwarding node receives the Interest message sent by the content source requesting end device;
当内容源请求端设备发送兴趣报文给转发节点后,转发节点接收内容源请求端设备发送的兴趣报文,该兴趣报文中携带有内容源请求端设备请求的数据块的信息。After the content source requester device sends an Interest message to the forwarding node, the forwarding node receives the Interest message sent by the content source requester device, and the Interest message carries the information of the data block requested by the content source requester device.
502、转发节点转发该兴趣报文到内容源提供端设备,使得内容源提供端设备对与该兴趣报文相匹配的数据块进行喷泉编码后返回编码的数据包给该转发节点;502. The forwarding node forwards the interest message to the content source provider device, so that the content source provider device performs fountain coding on the data block matching the interest message and returns the encoded data packet to the forwarding node;
转发节点接收内容源请求端设备发送的兴趣报文后,转发给该兴趣报文到内容源提供端设备,使得内容源提供端设备对与该兴趣报文相匹配的数据块进行喷泉编码后返回编码的数据包给该转发节点。After the forwarding node receives the interest message sent by the content source requesting end device, it forwards the interest message to the content source provider device, so that the content source provider device performs fountain encoding on the data block matching the interest message and returns The encoded data packet is sent to the forwarding node.
可以理解的是,该转发节点也可以通过另外的转发节点转发兴趣报文到内容源提供端设备,并不限定为直接转发该兴趣报文到内容源提供端设备。It can be understood that the forwarding node may also forward the interest message to the content source provider device through another forwarding node, and is not limited to directly forwarding the interest message to the content source provider device.
503、转发节点将内容源提供端设备返回的编码的数据包缓存到编码缓存区;503. The forwarding node caches the encoded data packet returned by the content source provider device in the encoding buffer area;
转发节点转发该兴趣报文到内容源提供端设备,将内容源提供端设备返回的编码的数据包缓存到编码缓存区,该编码缓存区专用于缓存编码的数据包。The forwarding node forwards the interest packet to the content source provider device, and caches the coded data packet returned by the content source provider device into a coded buffer area, and the coded buffer area is dedicated to buffering the coded data packet.
可以理解的是,当转发节点接收到一个编码的数据包后,若当前编码缓存区存在相同的编码的数据包,则该转发节点可以将接收到的相同的编码的数据包直接丢弃。It can be understood that, after the forwarding node receives an encoded data packet, if the same encoded data packet exists in the current encoding buffer, the forwarding node may directly discard the received same encoded data packet.
504、转发节点将该返回的编码的数据包转发给内容源请求端设备,使得内容源请求端设备对编码数据包集合进行解码得到该数据块。504. The forwarding node forwards the returned encoded data packet to the content source requesting end device, so that the content source requesting end device decodes the set of encoded data packets to obtain the data block.
转发节点将内容源提供端设备返回的编码的数据包缓存到编码缓存区后,将该返回的编码的数据包转发给内容源请求端设备,使得内容源请求端设备对编码数据包集合进行解码得到该数据块。After the forwarding node caches the encoded data packet returned by the content source provider device in the encoding buffer area, it forwards the returned encoded data packet to the content source request end device, so that the content source request end device decodes the set of encoded data packets Get the data block.
转发节点可以直接按照兴趣报文的反向路径将编码的数据包转发到内容源请求端设备,也可以查找计算路径之后再按计算出来的路径转发编码的数据包,此处不作限定。The forwarding node can directly forward the encoded data packet to the content source request device according to the reverse path of the interest message, or can search and calculate the path and then forward the encoded data packet according to the calculated path, which is not limited here.
可以理解的是,编码的数据包中携带有喷泉编码的标识,转发节点可以通过该标识判断出该数据包为编码的数据包。It can be understood that the coded data packet carries the identifier of the fountain code, and the forwarding node can judge that the data packet is an encoded data packet through the identifier.
本发明实施例中,转发节点开辟专用于缓存编码的数据包的编码缓存区,使得可以通过缓存提高编码的数据包的利用率,从而提高了内容获取的效率。In the embodiment of the present invention, the forwarding node opens an encoding cache area dedicated to caching encoded data packets, so that the utilization rate of encoded data packets can be improved through caching, thereby improving the efficiency of content acquisition.
上面实施例中,转发节点接收到兴趣报文之后,转发该兴趣报文,在实际应用中,转发节点可以先查找编码缓存区是否存在与该兴趣报文相匹配的编码的数据包,再进行后续处理,请参阅图6,本发明实施例中内容中心网络中内容分发的方法另一个实施例包括:In the above embodiment, after the forwarding node receives the Interest message, it forwards the Interest message. In practical applications, the forwarding node can first check whether there is an encoded data packet matching the Interest message in the encoding buffer, and then perform For subsequent processing, please refer to FIG. 6. Another embodiment of the content distribution method in the content-centric network in the embodiment of the present invention includes:
601、转发节点接收内容源请求端设备发送的兴趣报文;601. The forwarding node receives the Interest packet sent by the content source requesting end device;
当内容源请求端设备发送兴趣报文给转发节点后,转发节点接收内容源请求端设备发送的兴趣报文,该兴趣报文中携带有内容源请求端设备请求的数据块的信息。After the content source requester device sends an Interest message to the forwarding node, the forwarding node receives the Interest message sent by the content source requester device, and the Interest message carries the information of the data block requested by the content source requester device.
该数据块的信息可以为该数据块在该内容中的编号,该兴趣报文中还可以包括该内容的内容名,例如该兴趣报文的包头中可以携带有以…/content_name/chunk_number格式定义的命名信息,该content_name为内容源请求端设备请求的内容的内容名,该chunk_number为请求数据块在该内容中的编号,该兴趣报文中还可以以其他的命名方式携带这些信息,此处不作限定。The information of the data chunk can be the number of the data chunk in the content, and the interest message can also include the content name of the content, for example, the header of the interest message can carry the format defined in .../content_name/chunk_number The content_name is the content name of the content requested by the content source requester device, and the chunk_number is the number of the requested data block in the content. The interest message can also carry this information in other naming methods. Here Not limited.
602、转发节点查找编码缓存区中是否存在与该兴趣报文相匹配的编码的数据包,若存在,则触发步骤603,若不存在,则触发步骤604;602. The forwarding node checks whether there is an encoded data packet matching the interest message in the encoding buffer, if it exists, trigger step 603, and if not, trigger step 604;
转发节点接收内容源请求端设备发送的兴趣报文后,查找编码缓存区中是否存在与该兴趣报文相匹配的编码的数据包,该编码缓存区专用于缓存编码的数据包;After the forwarding node receives the interest message sent by the content source requester device, it searches whether there is an encoded data packet matching the interest message in the encoding buffer, which is dedicated to buffering the encoded data packet;
若存在,则触发步骤603;If it exists, trigger step 603;
若不存在,则触发步骤604。If not, step 604 is triggered.
可以理解的是,转发节点中也可以存在有普通缓存区,用于缓存数据块,若转发节点的普通缓存区中存在有内容源请求端设备请求的数据块时,此时可将转发节点作为一个内容源提供端设备。It can be understood that there may also be a common buffer area in the forwarding node for caching data blocks. If there are data blocks requested by the content source requesting end device in the common buffer area of the forwarding node, the forwarding node can be used as the forwarding node at this time. A content source provider device.
603、转发节点发送与该兴趣报文相匹配的编码的数据包给内容源请求端设备;603. The forwarding node sends an encoded data packet matching the Interest message to the content source requesting end device;
若转发节点查找编码缓存区中存在与该兴趣报文相匹配的编码的数据包,则转发节点发送与该兴趣报文相匹配的编码的数据包给内容源请求端设备。If the forwarding node finds that there is an encoded data packet matching the interest message in the encoding buffer, the forwarding node sends the encoded data packet matching the interest message to the content source requesting device.
604、转发节点转发该兴趣报文到内容源提供端设备,使得内容源提供端设备对与该兴趣报文相匹配的数据块进行喷泉编码后返回编码的数据包给该转发节点;604. The forwarding node forwards the interest message to the content source provider device, so that the content source provider device performs fountain encoding on the data block matching the interest message and returns the encoded data packet to the forwarding node;
转发节点发送编码缓存区中与该兴趣报文相匹配的编码的数据包给内容源请求端设备,或在编码缓存区中查找不到与该兴趣报文相匹配的编码的数据包后,转发给该兴趣报文到内容源提供端设备,使得内容源提供端设备对与该兴趣报文相匹配的数据块进行喷泉编码后返回编码的数据包给该转发节点。The forwarding node sends the coded data packet matching the interest message in the code buffer to the content source request device, or after finding no coded data packet matching the interest message in the code buffer, forward Send the interest message to the content source provider device, so that the content source provider device performs fountain encoding on the data block matching the interest message and returns the encoded data packet to the forwarding node.
可以理解的是,该转发节点也可以通过另外的转发节点转发兴趣报文到内容源提供端设备,并不限定为直接转发该兴趣报文到内容源提供端设备。It can be understood that the forwarding node may also forward the interest message to the content source provider device through another forwarding node, and is not limited to directly forwarding the interest message to the content source provider device.
605、转发节点将内容源提供端设备返回的编码的数据包缓存到编码缓存区;605. The forwarding node caches the encoded data packet returned by the content source provider device in the encoding buffer area;
转发节点转发该兴趣报文到内容源提供端设备,将内容源提供端设备返回的编码的数据包缓存到编码缓存区,该编码缓存区专用于缓存编码的数据包。The forwarding node forwards the interest packet to the content source provider device, and caches the coded data packet returned by the content source provider device into a coded buffer area, and the coded buffer area is dedicated to buffering the coded data packet.
可以理解的是,当转发节点接收到一个编码的数据包后,若当前编码缓存区存在相同的编码的数据包,则该转发节点可以将接收到的相同的编码的数据包直接丢弃。It can be understood that, after the forwarding node receives an encoded data packet, if the same encoded data packet exists in the current encoding buffer, the forwarding node may directly discard the received same encoded data packet.
606、转发节点将该返回的编码的数据包转发给内容源请求端设备,使得内容源请求端设备对编码数据包集合进行解码得到该数据块。606. The forwarding node forwards the returned encoded data packet to the content source requesting end device, so that the content source requesting end device decodes the set of encoded data packets to obtain the data block.
转发节点将内容源提供端设备返回的编码的数据包缓存到编码缓存区后,将该返回的编码的数据包转发给内容源请求端设备,使得内容源请求端设备对编码数据包集合进行解码得到该数据块。After the forwarding node caches the encoded data packet returned by the content source provider device in the encoding buffer area, it forwards the returned encoded data packet to the content source request end device, so that the content source request end device decodes the set of encoded data packets Get the data block.
转发节点可以直接按照兴趣报文的反向路径将编码的数据包转发到内容源请求端设备,也可以查找计算路径之后再按计算出来的路径转发编码的数据包,此处不作限定。The forwarding node can directly forward the encoded data packet to the content source request device according to the reverse path of the interest message, or can search and calculate the path and then forward the encoded data packet according to the calculated path, which is not limited here.
可以理解的是,编码的数据包中携带有喷泉编码的标识,转发节点可以通过该标识判断出该数据包为编码的数据包。It can be understood that the coded data packet carries the identifier of the fountain code, and the forwarding node can judge that the data packet is an encoded data packet through the identifier.
607、当转发节点接收到内容源请求端设备发送的停止发包通告后,转发节点终止该兴趣报文的转发。607. After the forwarding node receives the packet sending stop notification sent by the content source requesting device, the forwarding node stops forwarding the Interest message.
当转发节点接收到内容源请求端设备发送的停止发包通告后,转发节点可以终止兴趣报文的转发,并清除编码数据包转发路径信息,还可以清除与该兴趣报文相匹配的编码的数据包。When the forwarding node receives the packet stop notification sent by the content source requesting end device, the forwarding node can terminate the forwarding of the interest message, and clear the forwarding path information of the encoded data packet, and can also clear the encoded data that matches the interest message Bag.
本发明实施例中,在转发兴趣报文之前,转发节点可以查找编码缓存区中是否存在有与该兴趣报文相匹配的编码的数据包,若有则可以先将该编码的数据包发送给内容源请求端设备,使得请求端设备能更快的得到足以进行解码的编码的数据包,提高了获取内容的效率。In the embodiment of the present invention, before forwarding the interest message, the forwarding node can check whether there is an encoded data packet matching the interest message in the encoding buffer, and if so, the encoded data packet can be sent to The content source requester device enables the requester device to obtain encoded data packets that are sufficient for decoding faster, improving the efficiency of content acquisition.
三、内容源提供端设备的操作:3. Operation of the content source provider device:
请参阅图7,本发明实施例中内容中心网络中内容分发的方法另一个实施例包括:Referring to FIG. 7, another embodiment of the content distribution method in the content-centric network in the embodiment of the present invention includes:
701、内容源提供端设备接收内容源请求端设备发出的兴趣报文;701. The content source provider device receives the Interest packet sent by the content source requester device;
当内容源请求端设备发出兴趣报文后,内容源提供端设备接收内容源请求端设备发出的兴趣报文,该兴趣报文中携带有内容源请求端设备请求的数据块的信息。After the content source requester device sends an Interest message, the content source provider device receives the Interest message sent by the content source requester device, and the Interest message carries the information of the data block requested by the content source requester device.
702、内容源提供端设备按照预置规则将与该兴趣报文相匹配的数据块分段生成数据块分片,按喷泉编码算法对该数据块分片进行编码,得到编码的数据包;702. The content source provider device segments the data block matching the interest message according to preset rules to generate data block fragments, encodes the data block fragments according to the fountain coding algorithm, and obtains encoded data packets;
内容源提供端设备接收到内容源请求端设备发出的兴趣报文后,按照预置规则将与该兴趣报文相匹配的数据块分段生成数据块分片,按喷泉编码算法对该数据块分片进行编码,得到编码的数据包;After receiving the interest message sent by the content source requesting device, the content source provider device will segment the data block matching the interest message according to the preset rules to generate data block fragments, and the data block will be segmented according to the fountain coding algorithm. Fragmentation is encoded to obtain encoded data packets;
该预置规则为喷泉编码的规则,不同的喷泉编码的分段规则可能不同,例如可以为LT编码,将数据块分成K段,K为正整数,保证除了最后一段之外的所有包具有相同大小,最后一段长度不足部分填零补齐,也可以采用喷泉编码中的另外的编码形式,此处不做限定。The preset rule is the rule of fountain encoding. Different fountain encodings may have different segmentation rules. For example, LT encoding can be used to divide the data block into K segments. K is a positive integer to ensure that all packets except the last segment have the same The size of the last paragraph is filled with zeros if the length is insufficient, or another encoding form in the fountain encoding can also be used, which is not limited here.
703、内容源提供端设备将该编码的数据包发送到内容源请求端设备,使得内容源请求端设备在接收到编码的数据包后,进行解码得到该数据块。703. The content source provider device sends the encoded data packet to the content source requester device, so that the content source requester device decodes the encoded data packet to obtain the data block after receiving the encoded data packet.
内容源提供端设备得到编码的数据包后,将编码的数据包发送到内容源请求端设备,使得内容源请求端设备在接收到编码的数据包后,进行解码得到与该兴趣报文相匹配的数据块。After the content source provider device obtains the encoded data packet, it sends the encoded data packet to the content source requester device, so that after receiving the encoded data packet, the content source requester device decodes it to match the interest packet. of data blocks.
可以理解的是,由于喷泉编码算法可以持续不断的产生新的编码的数据包,所以内容源提供端设备可以不停的发送新产生的编码的数据包到内容源请求端设备,直到发送到一定的数量或接收到停止发包通告等,才停止发送编码的数据包,停止的具体触发条件可以根据实际情况设定,此处不作限定。It can be understood that since the fountain encoding algorithm can continuously generate new encoded data packets, the content source provider device can continuously send newly generated encoded data packets to the content source request end device until it is sent to a certain The number of packets or the notification to stop sending packets is received, etc., to stop sending encoded data packets. The specific trigger conditions for stopping can be set according to the actual situation, and are not limited here.
本发明实施例中,内容源提供端设备接收到兴趣报文后,对与该兴趣报文相匹配的数据块进行喷泉编码,得到编码的数据包发送出去,这样多个提供端设备同时发送编码的数据包时,使得各提供者之间无需协作,但是实现了多节点协作形式的内容发送,在每个提供者完成内容发送的同时,降低了每个内容源提供端设备需要发包的个数。In the embodiment of the present invention, after receiving the interest message, the content source provider device performs fountain coding on the data block that matches the interest message, and sends out the encoded data packet, so that multiple provider devices simultaneously send the encoded When the data packets are sent, there is no need for cooperation between providers, but the content transmission in the form of multi-node cooperation is realized. When each provider completes the content transmission, the number of packets that each content source provider device needs to send is reduced. .
上面实施例中,内容源提供端设备接收内容源请求端设备发出的兴趣报文,在实际应用中,内容源设备可以接受由转发节点转发过来的兴趣报文,请参阅图8,本发明实施例中内容中心网络中内容分发的方法另一个实施例包括:In the above embodiment, the content source provider device receives the interest message sent by the content source request end device. In practical applications, the content source device can accept the interest message forwarded by the forwarding node. Please refer to FIG. 8, the implementation of the present invention Another embodiment of the content distribution method in the content-centric network in the example includes:
801、内容源提供端设备接收转发节点发送的兴趣报文,该兴趣报文由内容源请求端设备发送给该转发节点;801. The content source provider device receives the interest message sent by the forwarding node, and the interest message is sent to the forwarding node by the content source requesting device;
当内容源请求端设备发出兴趣报文后,内容源提供端设备接收转发节点发送的兴趣报文,该兴趣报文由内容源请求端设备发送给该转发节点,该兴趣报文中携带有内容源请求端设备请求的数据块的信息。After the content source requester device sends an Interest message, the content source provider device receives the Interest message sent by the forwarding node, and the Interest message is sent by the content source requester device to the forwarding node, and the Interest message carries content Information about the data block requested by the source requester device.
802、内容源提供端设备按照预置规则将与该兴趣报文相匹配的数据块分段生成数据块分片,按喷泉编码算法对该数据块分片进行编码,得到编码的数据包;802. The content source provider device segments the data block matching the interest message according to preset rules to generate data block fragments, and encodes the data block fragments according to the fountain coding algorithm to obtain encoded data packets;
内容源提供端设备接收到内容源请求端设备发出的兴趣报文后,按照预置规则将与该兴趣报文相匹配的数据块分段生成数据块分片,按喷泉编码算法对该数据块分片进行编码,得到编码的数据包;After receiving the interest message sent by the content source requesting device, the content source provider device will segment the data block matching the interest message according to the preset rules to generate data block fragments, and the data block will be segmented according to the fountain coding algorithm. Fragmentation is encoded to obtain encoded data packets;
该预置规则为喷泉编码的规则,不同的喷泉编码的分段规则可能不同,例如可以为LT编码,将数据块分成K段,K为正整数,保证除了最后一段之外的所有包具有相同大小,最后一段长度不足部分填零补齐,也可以采用喷泉编码中的另外的编码形式,此处不做限定。The preset rule is the rule of fountain encoding. Different fountain encodings may have different segmentation rules. For example, LT encoding can be used to divide the data block into K segments. K is a positive integer to ensure that all packets except the last segment have the same The size of the last paragraph is filled with zeros if the length is insufficient, or another encoding form in the fountain encoding can also be used, which is not limited here.
803、内容源提供的设备将该编码的数据包发送给转发节点,使得该转发节点将编码的数据包转发给内容源请求端设备,使得内容源请求端设备在接收到编码的数据包后,进行解码得到该数据块。803. The device provided by the content source sends the encoded data packet to the forwarding node, so that the forwarding node forwards the encoded data packet to the content source requesting device, so that after receiving the encoded data packet, the content source requesting device, Decode to obtain the data block.
内容源提供端设备得到编码的数据包后,将该编码的数据包发送给转发节点,使得内容源请求端设备在接收到转发节点转发的编码的数据包后,进行解码得到与该兴趣报文相匹配的数据块。After the content source provider device obtains the encoded data packet, it sends the encoded data packet to the forwarding node, so that the content source requesting device decodes the encoded data packet forwarded by the forwarding node to obtain the Interest message matching data blocks.
可以理解的是,由于喷泉编码算法可以持续不断的产生新的编码的数据包,所以内容源提供端设备可以不停的发送新产生的编码的数据包到内容源请求端设备,直到发送到一定的数量或接收到停止发包通告等,才停止发送编码的数据包,停止的具体触发条件可以根据实际情况设定,此处不作限定。It can be understood that since the fountain encoding algorithm can continuously generate new encoded data packets, the content source provider device can continuously send newly generated encoded data packets to the content source request end device until it is sent to a certain The number of packets or the notification to stop sending packets is received, etc., to stop sending encoded data packets. The specific trigger conditions for stopping can be set according to the actual situation, and are not limited here.
该编码的数据包中可以包含有与该兴趣报文相匹配的数据块的编号,该数据块为组成一个内容的多个数据块中的一块,该编码的数据包中还可以包括该内容的内容名,喷泉编码的标识以及一个随机数,例如编码的数据包的包头可以携带有以…/content name/chunk number/LT/nonce格式定义的命名信息,其中,content_name为内容源请求端设备请求的内容的内容名,chunk_number为与该兴趣报文相匹配的数据块的编号,LT为使用喷泉编码中LT编码的标识,nonce为一个取值范围很大的随机数,多个数据块可以组成一个内容,可以理解的是,还可以采用其他的命名方式对各编码的数据包进行命名以区分开每个不同的编码的数据包,此处不做限定。The coded data packet may contain the number of the data block matching the interest message, the data block is one of the multiple data blocks that make up a content, and the coded data packet may also include the number of the content The content name, the identifier of the fountain code and a random number, for example, the header of the coded data packet can carry the naming information defined in the format of .../content name/chunk number/LT/nonce, where content_name is the content source request device request The content name of the content, chunk_number is the number of the data block that matches the interest message, LT is the identifier of the LT code in the fountain code, nonce is a random number with a wide range of values, and multiple data blocks can be composed One content, it can be understood that each encoded data packet can also be named in other naming manners to distinguish each different encoded data packet, which is not limited here.
本发明实施例中,内容源提供端设备可以接收转发节点转发的兴趣报文,再将编码的数据包转发给转发节点,使得转发节点发送给内容源请求端设备,这样,转发节点可以将兴趣报文转发给多个内容源提供端设备,使得多个内容源提供端设备同时提供编码的数据包,将编码的数据包发送给转发节点,使得转发节点之间可以互相转发该编码的数据包,使内容源请求端设备可以同时接收到多个设备提供的编码的数据包,提高了内容获取的效率。In the embodiment of the present invention, the content source provider device can receive the interest message forwarded by the forwarding node, and then forward the encoded data packet to the forwarding node, so that the forwarding node sends it to the content source requesting device. In this way, the forwarding node can send the interest message The message is forwarded to multiple content source provider devices, so that multiple content source provider devices provide encoded data packets at the same time, and send the encoded data packets to the forwarding nodes, so that the forwarding nodes can forward the encoded data packets to each other , so that the device at the content source requesting end can receive encoded data packets provided by multiple devices at the same time, thereby improving the efficiency of content acquisition.
为便于理解,结合以上三个执行主体的操作,下面以一具体应用场景对本发明实施例中内容网络中多源分发的方法进行具体描述:For ease of understanding, combined with the operations of the above three execution subjects, the method for multi-source distribution in the content network in the embodiment of the present invention is described in detail below in a specific application scenario:
内容源请求端设备发送兴趣报文给转发节点,该兴趣报文的包头中携带有…/ABC/5的命名信息,表示请求内容名为ABC的内容中编号为5的数据块;The content source requester device sends an interest message to the forwarding node. The header of the interest message carries the naming information of .../ABC/5, indicating that the data block numbered 5 in the content named ABC is requested;
转发节点接收该兴趣报文,同时查找编码缓存区得到2个与该兴趣报文相匹配的编码的数据包,转发节点返回这2个编码的数据包给内容源请求端设备,并转发该兴趣报文给另外的转发节点与内容源提供端设备;The forwarding node receives the interest message, and at the same time searches the encoding buffer to obtain 2 encoded data packets that match the interest message. The forwarding node returns the 2 encoded data packets to the content source requesting device and forwards the interest message. The message is sent to another forwarding node and content source provider device;
内容源提供端设备接收转发节点转发的兴趣报文,保存有与兴趣报文相匹配的数据块的内容源提供端设备按照LT编码的规则,将该数据块分段并编码成编码的数据包,各编码的数据包的包头都携带有…/ABC/5/LT/nonce的命名信息,nonce为一个取值范围很大的随机数,持续的发送给转发节点;The content source provider device receives the interest message forwarded by the forwarding node, and the content source provider device that stores the data block that matches the interest message segments and encodes the data block into encoded data packets according to the LT coding rules , the header of each encoded data packet carries the naming information of .../ABC/5/LT/nonce, and the nonce is a random number with a large value range, which is continuously sent to the forwarding node;
转发节点接收到带有LT标识的数据包即识别为编码的数据包,将编码的数据包按照本地缓存机制,例如LRU机制,将编码的数据包缓存到编码缓存区;When the forwarding node receives the data packet with the LT mark, it recognizes it as an encoded data packet, and caches the encoded data packet in the encoding buffer area according to the local cache mechanism, such as the LRU mechanism;
转发节点按照该兴趣报文的反向路径,将接收到的编码的数据包转发给内容源请求端设备,转发节点在此过程中,不执行任何丢包操作,过程中不清除编码的数据包的转发路径信息,例如PIT表中相应表项内容;The forwarding node forwards the received encoded data packet to the content source requesting device according to the reverse path of the interest message. During this process, the forwarding node does not perform any packet loss operation, and does not clear the encoded data packet during the process. Forwarding path information, such as the content of the corresponding entry in the PIT table;
内容源请求端设备持续的接收转发节点返回的编码的数据包;The content source requester device continues to receive the encoded data packets returned by the forwarding node;
当满足解码条件时,内容源请求端设备采用高斯消元法对接收到的编码的数据包进行解码,得到与兴趣报文相匹配数据块5;When the decoding condition is met, the content source requesting device uses the Gaussian elimination method to decode the received encoded data packet to obtain the data block 5 that matches the interest message;
内容源请求端设备发出停止发包通告;The device at the content source requesting end issues a notification to stop sending packets;
转发节点接收到该停止发包通告后,停止兴趣报文的转发,并清除所有与该兴趣报文相匹配的编码的数据包以及转发路径信息;After the forwarding node receives the packet stop notification, it stops forwarding the interest message, and clears all encoded data packets and forwarding path information that match the interest message;
内容源提供端设备接收到该停止发包通告后,停止对数据块编码并终止对编码的数据包的发送。After receiving the packet sending stop notification, the content source provider device stops encoding the data block and terminates sending the encoded data packet.
下面分别对本发明实施例中的三个执行主体进行描述:The three execution subjects in the embodiment of the present invention are described respectively below:
一、请求端设备:1. The requesting device:
请参阅图9,本发明实施例中内容源请求端设备一个实施例包括:Please refer to Figure 9, an embodiment of the content source requester device in the embodiment of the present invention includes:
第一发送模块901,用于发送兴趣报文到内容源提供端设备,所述兴趣报文中携带所述内容源请求端设备请求的数据块的信息;The first sending module 901 is configured to send an interest message to the content source provider device, where the interest message carries information about the data block requested by the content source requester device;
第一接收模块902,用于接收所述内容源提供端设备提供的编码的数据包,所述编码的数据包是由所述内容源提供端设备将与所述兴趣报文相匹配的数据块分段生成数据块分片,并且使用喷泉编码算法对所述数据块分片编码得到的;The first receiving module 902 is configured to receive the encoded data packet provided by the content source provider device, where the encoded data packet is a data block that the content source provider device will match with the interest message Segmentation generates data block fragments, and uses the fountain coding algorithm to encode the data block fragments;
解码模块903,用于对编码数据包集合进行解码,得到所述数据块,所述编码数据包集合中包括所述第一接收模块902接收到的编码的数据包。The decoding module 903 is configured to decode a set of encoded data packets to obtain the data block, and the set of encoded data packets includes the encoded data packets received by the first receiving module 902 .
本发明实施例中第一发送模块901发送兴趣报文到内容源提供端设备后,第一接收模块902接收内容源提供端设备提供的编码的数据包,该编码的数据包是由内容源提供端设备将与该兴趣报文相匹配的数据块分段生成数据块分片,并且使用喷泉编码算法对数据块分片编码得到的,所以第一接收模块902可以同时接收多个内容源提供端设备发送的编码的数据包,解码模块903对包括有接收到的编码的数据包的编码数据包集合进行解码,当满足编码条件时,解码模块903即可以解码成功得到该数据块,由于按照喷泉编码算法得到的编码的数据包的数量远大于数据块的数量,且编码的数据包互相之间相同的概率非常小,所以在一定时间内,内容源请求端设备从多个设备上获取的编码的数据包相同的概率远小于从多个设备上获取的数据块相同的概率,使得内容源请求端设备得到有效数据的概率增大,减少了获取足够有效数据的时间,提高了内容中心网络中内容的获取效率,网络链路中不再传输大量的重复数据,避免了链路资源的浪费。In the embodiment of the present invention, after the first sending module 901 sends the interest message to the content source provider device, the first receiving module 902 receives the encoded data packet provided by the content source provider device. The encoded data packet is provided by the content source The end device generates data block fragments by segmenting the data blocks matching the interest message, and uses the fountain coding algorithm to encode the data block fragments, so the first receiving module 902 can receive multiple content source providers at the same time For the encoded data packet sent by the device, the decoding module 903 decodes the set of encoded data packets including the received encoded data packet. When the encoding condition is met, the decoding module 903 can successfully decode the data block to obtain the data block. The number of encoded data packets obtained by the encoding algorithm is far greater than the number of data blocks, and the probability of the encoded data packets being identical to each other is very small, so within a certain period of time, the encoding obtained by the content source requesting device from multiple devices The probability of the same data packets is much smaller than the probability of the same data blocks obtained from multiple devices, which increases the probability of obtaining valid data from the content source request device, reduces the time to obtain sufficient valid data, and improves the efficiency of the content-centric network. The efficiency of content acquisition, a large amount of repeated data is no longer transmitted in the network link, and the waste of link resources is avoided.
实际应用中,内容源请求端设备得到数据块后,还可以发出停止发包通告停止其他设备对该数据块对应的编码包的转发,请参阅图10,本发明实施例中内容源请求端设备另一个实施例包括:In practical applications, after the content source requester device obtains the data block, it can also issue a stop sending notification to stop other devices from forwarding the encoded packets corresponding to the data block. Please refer to Figure 10. In the embodiment of the present invention, the content source requester device also One embodiment includes:
第一发送模块1001,用于发送兴趣报文到内容源提供端设备,所述兴趣报文中携带所述内容源请求端设备请求的数据块的信息;The first sending module 1001 is configured to send an interest message to the content source provider device, where the interest message carries information about the data block requested by the content source requester device;
第一接收模块1002,用于接收所述内容源提供端设备提供的编码的数据包,所述编码的数据包是由所述内容源提供端设备将与所述兴趣报文相匹配的数据块分段生成数据块分片,并且使用喷泉编码算法对所述数据块分片编码得到的;The first receiving module 1002 is configured to receive the encoded data packet provided by the content source provider device, where the encoded data packet is a data block that the content source provider device will match with the interest message Segmentation generates data block fragments, and uses the fountain coding algorithm to encode the data block fragments;
解码模块1003,用于对编码数据包集合进行解码,得到所述数据块,所述编码数据包集合中包括所述第一接收模块1002接收到的编码的数据包;A decoding module 1003, configured to decode a set of encoded data packets to obtain the data block, and the set of encoded data packets includes the encoded data packets received by the first receiving module 1002;
本实施例中,该第一发送模块1001具体可以用于,发送所述兴趣报文给转发节点,使得所述转发节点转发所述兴趣报文给所述内容源提供端设备;In this embodiment, the first sending module 1001 may be specifically configured to send the interest message to the forwarding node, so that the forwarding node forwards the interest message to the content source provider device;
该第一接收模块1002具体可以用于,接收所述转发节点转发的编码的数据包,所述编码的数据包由所述内容源提供端设备发送给所述转发节点;The first receiving module 1002 may be specifically configured to receive an encoded data packet forwarded by the forwarding node, and the encoded data packet is sent to the forwarding node by the content source provider device;
该内容源请求端设备还包括:The content source requester device also includes:
停止模块1004,用于停止接收所述编码的数据包,并发出停止发包通告,所述停止发包通告用于使得接收到所述停止发包通告的设备停止发送所述数据块对应的编码的数据包并清除所述编码的数据包的转发路径信息。A stop module 1004, configured to stop receiving the encoded data packets, and issue a packet sending stop notification, the packet sending stop notification is used to make the device that receives the packet sending stop notification stop sending the encoded data packets corresponding to the data block And clear the forwarding path information of the encoded data packet.
本发明的一些实施例中,该解码模块1003具体用于,使用高斯消元法对所述编码数据包集合进行解码,得到所述数据块。In some embodiments of the present invention, the decoding module 1003 is specifically configured to use a Gaussian elimination method to decode the set of encoded data packets to obtain the data block.
本发明实施例中,解码模块1003在得到数据块后,停止模块1004停止接收编码的数据包,并发送停止发包通告使得其他设备停止发送该数据块对应的编码的数据包并清除编码数据包转发路径信息,节省了网络资源,提高了各设备进行后续处理的效率,并且解码模块1003利用高斯消元法进行解码,降低了度为1的编码的数据包对解码成功率的影响,提高了解码成功率。In the embodiment of the present invention, after the decoding module 1003 obtains the data block, the stop module 1004 stops receiving the encoded data packet, and sends a notification to stop sending packets so that other devices stop sending the encoded data packet corresponding to the data block and clears the forwarding of the encoded data packet. The path information saves network resources and improves the efficiency of subsequent processing of each device, and the decoding module 1003 uses Gaussian elimination method to decode, which reduces the influence of encoded data packets with a degree of 1 on the decoding success rate and improves the decoding efficiency. Success rate.
图11为网络设备一个结构示意图,其可以为内容源请求端设备的结构示意图,也可以为转发节点的结构示意图,还可以为内容源提供端设备的结构示意图。FIG. 11 is a schematic structural diagram of a network device, which may be a schematic structural diagram of a content source requesting end device, a structural schematic diagram of a forwarding node, or a structural schematic diagram of a content source providing end device.
上面从单元化功能实体的角度对本发明实施例中的内容源请求端设备进行了描述,下面从硬件处理的角度对本发明实施例中的内容源请求端设备进行描述,请参阅图11,本发明实施例中的内容源请求端设备另一实施例包括:The content source requester device in the embodiment of the present invention has been described above from the perspective of unitized functional entities. The following describes the content source requester device in the embodiment of the present invention from the perspective of hardware processing. Please refer to FIG. 11 , the present invention Another embodiment of the content source requester device in the embodiment includes:
输入装置1101、输出装置1102、处理器1103和存储器1104(其中内容源请求端设备中的处理器1103的数量可以一个或多个,图11中以一个处理器1103为例)。在本发明的一些实施例中,输入装置901、输出装置1102、处理器1103和存储器1104可通过总线或其它方式连接,其中,图11中以通过总线连接为例。An input device 1101, an output device 1102, a processor 1103, and a memory 1104 (the number of processors 1103 in the content source requester device can be one or more, one processor 1103 is taken as an example in FIG. 11 ). In some embodiments of the present invention, the input device 901 , the output device 1102 , the processor 1103 and the memory 1104 may be connected through a bus or in other ways, wherein connection through a bus is taken as an example in FIG. 11 .
其中,通过调用存储器1104存储的操作指令,处理器1103,用于执行如下步骤:Wherein, by calling the operation instructions stored in the memory 1104, the processor 1103 is configured to perform the following steps:
发送兴趣报文到内容源提供端设备,所述兴趣报文中携带所述内容源请求端设备请求的数据块的信息;sending an interest message to the content source provider device, the interest message carrying the information of the data block requested by the content source requester device;
接收所述内容源提供端设备提供的编码的数据包,所述编码的数据包是由所述内容源提供端设备将与所述兴趣报文相匹配的数据块分段生成数据块分片,并且使用喷泉编码算法对所述数据块分片编码得到的;receiving an encoded data packet provided by the content source provider device, wherein the encoded data packet is generated by segmenting a data block matching the interest message by the content source provider device to generate a data block fragment, and obtained by encoding the data block fragments using a fountain encoding algorithm;
对编码数据包集合进行解码,得到所述数据块,所述编码数据包集合中包括接收到的编码的数据包;Decoding the set of encoded data packets to obtain the data block, the set of encoded data packets including the received encoded data packets;
本发明的一些实施例中,该处理器1103具体用于执行如下步骤:In some embodiments of the present invention, the processor 1103 is specifically configured to perform the following steps:
发送所述兴趣报文给转发节点,使得所述转发节点转发所述兴趣报文给所述内容源提供端设备;sending the interest message to the forwarding node, so that the forwarding node forwards the interest message to the content source provider device;
接收所述转发节点转发的编码的数据包,所述编码的数据包由所述内容源提供端设备发送给所述转发节点;receiving an encoded data packet forwarded by the forwarding node, where the encoded data packet is sent to the forwarding node by the content source provider device;
本发明的一些实施例中,该处理器1103还用于执行如下步骤:In some embodiments of the present invention, the processor 1103 is also configured to perform the following steps:
停止接收所述编码的数据包,并发出停止发包通告,所述停止发包通告用于使得接收到所述停止发包通告的设备停止发送所述数据块对应的编码的数据包并清除所述编码的数据包的转发路径信息;stop receiving the encoded data packet, and issue a stop sending notification, the stop sending notification is used to make the device that receives the stop sending notification stop sending the encoded data packet corresponding to the data block and clear the encoded The forwarding path information of the data packet;
本发明的一些实施例中,该处理器1103具体用于执行如下步骤:In some embodiments of the present invention, the processor 1103 is specifically configured to perform the following steps:
使用高斯消元法对所述编码数据包集合进行解码,得到所述数据块。The coded data packet set is decoded by using a Gaussian elimination method to obtain the data block.
二、转发节点:2. Forwarding node:
请参阅图12,本发明实施例中转发节点一个实施例包括:Please refer to Figure 12, an embodiment of the forwarding node in the embodiment of the present invention includes:
第二接收模块1201,用于接收内容源请求端设备发送的兴趣报文,所述兴趣报文中携带所述内容源请求端设备请求的数据块的信息;The second receiving module 1201 is configured to receive an interest message sent by a content source requesting end device, where the interest message carries information about a data block requested by the content source requesting end device;
第一转发模块1202,用于转发所述兴趣报文到内容源提供端设备,使得所述内容源提供端设备对与所述兴趣报文相匹配的数据块进行喷泉编码后返回编码的数据包给缓存模块1203;The first forwarding module 1202 is configured to forward the interest message to the content source provider device, so that the content source provider device performs fountain coding on the data block matching the interest message and returns an encoded data packet To the cache module 1203;
缓存模块1203,用于将所述内容源提供端设备返回的编码的数据包缓存到编码缓存区;A caching module 1203, configured to cache the encoded data packets returned by the content source provider device in an encoding buffer area;
第二转发模块1204,用于将所述内容源提供端设备返回的编码的数据包转发给所述内容源请求端设备,使得所述内容源请求端设备对编码数据包集合进行解码得到所述数据块,所述编码数据包集合中包括所述内容源请求端设备接收到的编码的数据包。The second forwarding module 1204 is configured to forward the encoded data packet returned by the content source provider device to the content source requester device, so that the content source requester device decodes the set of encoded data packets to obtain the A data block, the set of encoded data packets includes the encoded data packets received by the content source request end device.
本发明实施例中,缓存模块1203开辟专用于缓存编码的数据包的编码缓存区,使得可以通过缓存提高编码的数据包的利用率,从而提高了内容获取的效率。In the embodiment of the present invention, the caching module 1203 opens an encoding cache area dedicated to caching encoded data packets, so that the utilization rate of encoded data packets can be improved through caching, thereby improving the efficiency of content acquisition.
上面实施例中,第二接收模块1201接收到兴趣报文之后,第一转发模块1202转发该兴趣报文,在实际应用中,转发节点可以先查找编码缓存区是否存在与该兴趣报文相匹配的编码的数据包,再进行后续处理,请参阅图13,本发明实施例中转发节点另一个实施例包括:In the above embodiment, after the second receiving module 1201 receives the interest message, the first forwarding module 1202 forwards the interest message. In practical applications, the forwarding node can first check whether there is an encoding cache that matches the interest message. Encoded data packets, and then perform subsequent processing, please refer to Figure 13, another embodiment of the forwarding node in the embodiment of the present invention includes:
第二接收模块1301,用于接收内容源请求端设备发送的兴趣报文,所述兴趣报文中携带所述内容源请求端设备请求的数据块的信息;The second receiving module 1301 is configured to receive an interest message sent by a content source requesting end device, where the interest message carries information about a data block requested by the content source requesting end device;
第一转发模块1302,用于转发所述兴趣报文到内容源提供端设备,使得所述内容源提供端设备对与所述兴趣报文相匹配的数据块进行喷泉编码后返回编码的数据包给缓存模块;The first forwarding module 1302 is configured to forward the interest message to the content source provider device, so that the content source provider device performs fountain coding on the data block matching the interest message and returns an encoded data packet to the cache module;
缓存模块1303,用于将所述内容源提供端设备返回的编码的数据包缓存到编码缓存区;A caching module 1303, configured to cache the encoded data packets returned by the content source provider device in an encoding buffer area;
第二转发模块1304,用于将所述内容源提供端设备返回的编码的数据包转发给所述内容源请求端设备,使得所述内容源请求端设备对编码数据包集合进行解码得到所述数据块,所述编码数据包集合中包括所述内容源请求端设备接收到的编码的数据包;The second forwarding module 1304 is configured to forward the encoded data packet returned by the content source provider device to the content source requester device, so that the content source requester device decodes the set of encoded data packets to obtain the A data block, wherein the set of encoded data packets includes the encoded data packets received by the content source requesting end device;
本实施例中,该转发节点还包括:In this embodiment, the forwarding node also includes:
查找模块1305,用于查找所述编码缓存区中是否存在与所述兴趣报文相匹配的编码的数据包;A search module 1305, configured to find whether there is an encoded data packet matching the interest message in the encoding buffer;
第二发送模块1306,用于当所述编码缓存区中存在与所述兴趣报文相匹配的编码的数据包时,发送所述相匹配的编码的数据包给所述内容源请求端设备。The second sending module 1306 is configured to send the matched encoded data packet to the content source requesting device when there is an encoded data packet matching the interest message in the encoded buffer.
本发明实施例中,在转发兴趣报文之前,查找模块1305可以查找编码缓存区中是否存在有与该兴趣报文相匹配的编码的数据包,若有则第二发送模块1306可以先将该编码的数据包发送给内容源请求端设备,使得请求端设备能更快的得到足以进行解码的编码的数据包,提高了获取内容的效率。In the embodiment of the present invention, before forwarding the interest message, the search module 1305 can search whether there is a coded data packet that matches the interest message in the encoding buffer, and if so, the second sending module 1306 can first send the message The encoded data packet is sent to the content source requesting device, so that the requesting device can obtain the encoded data packet sufficient for decoding faster, and the efficiency of content acquisition is improved.
上面从单元化功能实体的角度对本发明实施例中的转发节点进行了描述,下面从硬件处理的角度对本发明实施例中的转发节点进行描述,请参阅图11,本发明实施例中的转发节点另一实施例包括:The forwarding node in the embodiment of the present invention is described above from the perspective of unitized functional entities, and the forwarding node in the embodiment of the present invention is described below from the perspective of hardware processing. Please refer to FIG. 11, the forwarding node in the embodiment of the present invention Another embodiment includes:
输入装置1101、输出装置1102、处理器1103和存储器1104(其中转发节点中的处理器1103的数量可以一个或多个,图11中以一个处理器1103为例)。在本发明的一些实施例中,输入装置901、输出装置1102、处理器1103和存储器1104可通过总线或其它方式连接,其中,图11中以通过总线连接为例。An input device 1101 , an output device 1102 , a processor 1103 and a memory 1104 (there may be one or more processors 1103 in the forwarding node, one processor 1103 is taken as an example in FIG. 11 ). In some embodiments of the present invention, the input device 901 , the output device 1102 , the processor 1103 and the memory 1104 may be connected through a bus or in other ways, wherein connection through a bus is taken as an example in FIG. 11 .
其中,通过调用存储器1104存储的操作指令,处理器1103,用于执行如下步骤:Wherein, by calling the operation instructions stored in the memory 1104, the processor 1103 is configured to perform the following steps:
接收内容源请求端设备发送的兴趣报文,所述兴趣报文中携带所述内容源请求端设备请求的数据块的信息;receiving an interest message sent by the content source requesting end device, the interest message carrying the information of the data block requested by the content source requesting end device;
转发所述兴趣报文到内容源提供端设备,使得所述内容源提供端设备对与所述兴趣报文相匹配的数据块进行喷泉编码后返回编码的数据包给缓存模块;Forwarding the interest message to the content source provider device, so that the content source provider device performs fountain encoding on the data block matching the interest message and returns the encoded data packet to the cache module;
将所述内容源提供端设备返回的编码的数据包缓存到编码缓存区;Buffering the encoded data packets returned by the content source provider device into the encoding buffer;
将所述内容源提供端设备返回的编码的数据包转发给所述内容源请求端设备,使得所述内容源请求端设备对编码数据包集合进行解码得到所述数据块,所述编码数据包集合中包括所述内容源请求端设备接收到的编码的数据包;Forwarding the encoded data packet returned by the content source provider device to the content source requester device, so that the content source requester device decodes the set of encoded data packets to obtain the data block, and the encoded data packet The collection includes encoded data packets received by the content source requesting device;
本发明的一些实施例中,该处理器1103还用于执行如下步骤:In some embodiments of the present invention, the processor 1103 is also configured to perform the following steps:
查找所述编码缓存区中是否存在与所述兴趣报文相匹配的编码的数据包;Finding whether there is an encoded data packet matching the Interest message in the encoded buffer;
当所述编码缓存区中存在与所述兴趣报文相匹配的编码的数据包时,发送所述相匹配的编码的数据包给所述内容源请求端设备。When there is an encoded data packet matching the Interest message in the encoded buffer, sending the matched encoded data packet to the content source requesting end device.
三、内容源提供端设备:3. Content source provider device:
请参阅图14,本发明实施例中内容源提供端一个实施例包括:Please refer to Figure 14, an embodiment of the content source provider in the embodiment of the present invention includes:
第三接收模块1401,用于接收内容源请求端设备发出的兴趣报文,所述兴趣报文中携带所述内容源请求端设备请求的数据块的信息;The third receiving module 1401 is configured to receive an interest message sent by the content source requester device, where the interest message carries the information of the data block requested by the content source requester device;
编码模块1402,用于按照预置规则将与所述兴趣报文相匹配的数据块分段生成数据块分片,按喷泉编码算法对所述数据块分片进行编码,得到编码的数据包;An encoding module 1402, configured to segment the data blocks matching the interest message into data block fragments according to preset rules, encode the data block fragments according to the fountain encoding algorithm, and obtain encoded data packets;
第三发送模块1403,用于将所述编码模块1402得到的编码的数据包发送到内容源请求端设备,使得所述内容源请求端设备在接收到编码的数据包后,进行解码得到所述数据块;The third sending module 1403 is configured to send the encoded data packet obtained by the encoding module 1402 to the content source requesting end device, so that the content source requesting end device decodes the encoded data packet to obtain the data block;
本发明的一些实施例中,该第三接收模块1401具体用于,接收转发节点发送的所述兴趣报文,所述兴趣报文由所述内容源请求端设备发送给所述转发节点;In some embodiments of the present invention, the third receiving module 1401 is specifically configured to receive the interest message sent by the forwarding node, and the interest message is sent to the forwarding node by the content source requesting end device;
该第三发送模块1403具体用于,将所述编码的数据包发送给所述转发节点,使得所述转发节点将所述编码的数据包转发给所述内容源请求端设备,使得所述内容源请求端设备在接收到编码的数据包后,进行解码得到所述数据块。The third sending module 1403 is specifically configured to send the encoded data packet to the forwarding node, so that the forwarding node forwards the encoded data packet to the content source requesting end device, so that the content After receiving the encoded data packet, the source requester device decodes it to obtain the data block.
本发明实施例中,第三接收模块1401接收到兴趣报文后,编码模块1402对与该兴趣报文相匹配的数据块进行喷泉编码,第三发送模块1403将得到的编码的数据包发送出去,这样多个提供端设备同时发送编码的数据包时,使得各提供者之间无需协作,但是实现了多节点协作形式的内容发送,在每个提供者完成内容发送的同时,降低了每个内容源提供端设备需要发包的个数。In the embodiment of the present invention, after the third receiving module 1401 receives the interest message, the encoding module 1402 performs fountain encoding on the data block matching the interest message, and the third sending module 1403 sends out the obtained encoded data packet In this way, when multiple provider devices send encoded data packets at the same time, there is no need for cooperation among providers, but the content transmission in the form of multi-node cooperation is realized, and when each provider completes content transmission, each provider is reduced. The number of packets that the content source provider device needs to send.
上面从单元化功能实体的角度对本发明实施例中的内容源提供端设备进行了描述,下面从硬件处理的角度对本发明实施例中的内容源提供端设备进行描述,请参阅图11,本发明实施例中的内容源提供端设备另一实施例包括:The content source provider device in the embodiment of the present invention is described above from the perspective of unitized functional entities, and the content source provider device in the embodiment of the present invention is described below from the perspective of hardware processing. Please refer to FIG. 11 , the present invention Another embodiment of the content source provider device in the embodiment includes:
输入装置1101、输出装置1102、处理器1103和存储器1104(其中转发节点中的处理器1103的数量可以一个或多个,图11中以一个处理器1103为例)。在本发明的一些实施例中,输入装置901、输出装置1102、处理器1103和存储器1104可通过总线或其它方式连接,其中,图11中以通过总线连接为例。An input device 1101 , an output device 1102 , a processor 1103 and a memory 1104 (there may be one or more processors 1103 in the forwarding node, one processor 1103 is taken as an example in FIG. 11 ). In some embodiments of the present invention, the input device 901 , the output device 1102 , the processor 1103 and the memory 1104 may be connected through a bus or in other ways, wherein connection through a bus is taken as an example in FIG. 11 .
其中,通过调用存储器1104存储的操作指令,处理器1103,用于执行如下步骤:Wherein, by calling the operation instructions stored in the memory 1104, the processor 1103 is configured to perform the following steps:
接收内容源请求端设备发出的兴趣报文,所述兴趣报文中携带所述内容源请求端设备请求的数据块的信息;receiving an interest message sent by the content source requesting end device, the interest message carrying the information of the data block requested by the content source requesting end device;
按照预置规则将与所述兴趣报文相匹配的数据块分段生成数据块分片,按喷泉编码算法对所述数据块分片进行编码,得到编码的数据包;Segmenting the data blocks matching the interest message according to preset rules to generate data block fragments, and encoding the data block fragments according to the fountain coding algorithm to obtain encoded data packets;
将该编码的数据包发送到内容源请求端设备,使得所述内容源请求端设备在接收到编码的数据包后,进行解码得到所述数据块。The encoded data packet is sent to the content source requesting device, so that the content source requesting device decodes the encoded data packet to obtain the data block after receiving the encoded data packet.
本发明的一些实施例中,该处理器1103具体用于执行如下步骤:In some embodiments of the present invention, the processor 1103 is specifically configured to perform the following steps:
接收转发节点发送的所述兴趣报文,所述兴趣报文由所述内容源请求端设备发送给所述转发节点;receiving the interest message sent by the forwarding node, where the interest message is sent to the forwarding node by the content source requesting device;
将所述编码的数据包发送给所述转发节点,使得所述转发节点将所述编码的数据包转发给所述内容源请求端设备,使得所述内容源请求端设备在接收到编码的数据包后,进行解码得到所述数据块。sending the encoded data packet to the forwarding node, so that the forwarding node forwards the encoded data packet to the content source requesting end device, so that the content source requesting end device receives the encoded data After the packet is decoded, the data block is obtained.
下面对本发明实施例中内容分发系统进行说明,请参与图15,本发明实施例中内容分发系统一个实施例包括:The following describes the content distribution system in the embodiment of the present invention, please refer to Figure 15, an embodiment of the content distribution system in the embodiment of the present invention includes:
图9或图10所示的内容源请求端设备1501,图12或图13所示的转发节点1502,和图14所示的内容源提供端设备1503。The content source requesting end device 1501 shown in FIG. 9 or FIG. 10 , the forwarding node 1502 shown in FIG. 12 or FIG. 13 , and the content source providing end device 1503 shown in FIG. 14 .
为了便于理解上述实施例,下面以上述内容分发系统各个设备在一个具体应用场景中的交互过程进行说明:In order to facilitate the understanding of the above embodiment, the interaction process of each device in the above content distribution system in a specific application scenario is described below:
内容源请求端设备1501发送兴趣报文给转发节点1502,该兴趣报文的包头中携带有…/ABC/5的命名信息,表示请求内容名为ABC的内容中编号为5的数据块;The content source requester device 1501 sends an interest message to the forwarding node 1502. The header of the interest message carries the naming information of .../ABC/5, indicating that the data block numbered 5 in the content named ABC is requested;
转发节点1502接收该兴趣报文,同时查找编码缓存区得到2个与该兴趣报文相匹配的编码的数据包,转发节点1502返回这2个编码的数据包给内容源请求端设备1501,并转发该兴趣报文给另外的转发节点与内容源提供端设备1503;The forwarding node 1502 receives the interest message, and searches the encoding buffer to obtain 2 encoded data packets matching the interest message, and the forwarding node 1502 returns the 2 encoded data packets to the content source requester device 1501, and Forwarding the interest message to another forwarding node and content source provider device 1503;
内容源提供端设备1503接收转发节点1502转发的兴趣报文,保存有与兴趣报文相匹配的数据块的内容源提供端设备1503按照LT编码的规则,将该数据块分段并编码成编码的数据包,各编码的数据包的包头都携带有…/ABC/5/LT/nonce的命名信息,nonce为一个取值范围很大的随机数,持续的发送给转发节点1502;The content source provider device 1503 receives the interest message forwarded by the forwarding node 1502, and the content source provider device 1503 that stores the data block matching the interest message segments and encodes the data block into coded The header of each encoded data packet carries the naming information of .../ABC/5/LT/nonce, and the nonce is a random number with a large value range, which is continuously sent to the forwarding node 1502;
转发节点1502接收到带有LT标识的数据包即识别为编码的数据包,将编码的数据包按照本地缓存机制,例如LRU机制,将编码的数据包缓存到编码缓存区;The forwarding node 1502 receives the data packet with the LT identifier and recognizes it as a coded data packet, and caches the coded data packet in the code buffer according to a local cache mechanism, such as an LRU mechanism;
转发节点1502按照该兴趣报文的反向路径,将接收到的编码的数据包转发给内容源请求端设备1501,转发节点1502在此过程中,不执行任何丢包操作,过程中不清除编码的数据包的转发路径信息,例如PIT表中相应表项内容;The forwarding node 1502 forwards the received encoded data packet to the content source requesting device 1501 according to the reverse path of the interest message. During this process, the forwarding node 1502 does not perform any packet loss operation and does not clear the encoded data packet during the process. The forwarding path information of the data packet, such as the content of the corresponding entry in the PIT table;
内容源请求端设备1501持续的接收转发节点1502返回的编码的数据包;The content source requester device 1501 continuously receives the encoded data packets returned by the forwarding node 1502;
当满足解码条件时,内容源请求端设备1501采用高斯消元法对接收到的编码的数据包进行解码,得到与兴趣报文相匹配数据块5;When the decoding condition is satisfied, the content source requester device 1501 decodes the received encoded data packet by using the Gaussian elimination method, and obtains the data block 5 that matches the interest message;
内容源请求端设备1501发出停止发包通告;The content source requesting end device 1501 issues a notification to stop sending packets;
转发节点1502接收到该停止发包通告后,停止兴趣报文的转发,并清除所有与该兴趣报文相匹配的编码的数据包以及转发路径信息;After the forwarding node 1502 receives the notification to stop sending packets, it stops forwarding the interest message, and clears all encoded data packets and forwarding path information that match the interest message;
内容源提供端设备1503接收到该停止发包通告后,停止对数据块编码并终止对编码的数据包的发送。After receiving the packet sending stop notification, the content source provider device 1503 stops encoding the data block and terminates sending the encoded data packet.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所披露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, and other media that can store program codes.
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still understand the foregoing The technical solutions recorded in each embodiment are modified, or some of the technical features are replaced equivalently; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims (18)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410197163.3A CN105100008B (en) | 2014-05-09 | 2014-05-09 | The method and relevant device of content distribution in content center network |
| PCT/CN2014/090669 WO2015169074A1 (en) | 2014-05-09 | 2014-11-10 | Method and related device for distributing contents in content-centric network |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410197163.3A CN105100008B (en) | 2014-05-09 | 2014-05-09 | The method and relevant device of content distribution in content center network |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN105100008A CN105100008A (en) | 2015-11-25 |
| CN105100008B true CN105100008B (en) | 2018-06-05 |
Family
ID=54392092
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201410197163.3A Expired - Fee Related CN105100008B (en) | 2014-05-09 | 2014-05-09 | The method and relevant device of content distribution in content center network |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN105100008B (en) |
| WO (1) | WO2015169074A1 (en) |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107483349A (en) * | 2016-06-07 | 2017-12-15 | 华为技术有限公司 | Method and device for transmitting data stream |
| CN108076144B (en) * | 2017-12-03 | 2020-09-11 | 北京邮电大学 | A Fair Cache Algorithm and Device for Content-Centric Networks |
| CN114254757B (en) * | 2020-09-24 | 2024-08-06 | 香港理工大学深圳研究院 | Distributed deep learning method and device, terminal equipment and storage medium |
| WO2022126303A1 (en) * | 2020-12-14 | 2022-06-23 | Qualcomm Incorporated | Wireless communications based on rateless codes and layered modulation |
| CN115834574B (en) * | 2023-02-16 | 2023-05-09 | 鹏城实验室 | Data coding transmission method, device, equipment and storage medium |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101277248A (en) * | 2007-03-26 | 2008-10-01 | 刘军波 | Method and system for distributing network data |
| WO2011150644A1 (en) * | 2010-12-17 | 2011-12-08 | 华为技术有限公司 | Method and apparatus for acquiring and transmitting streaming media data in the process of initiation |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100094965A1 (en) * | 2008-10-15 | 2010-04-15 | Patentvc Ltd. | Erasure-coded content assembly and retransmission |
| WO2010045511A2 (en) * | 2008-10-15 | 2010-04-22 | Gal Zuckerman | Methods and systems for delivering content |
-
2014
- 2014-05-09 CN CN201410197163.3A patent/CN105100008B/en not_active Expired - Fee Related
- 2014-11-10 WO PCT/CN2014/090669 patent/WO2015169074A1/en active Application Filing
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101277248A (en) * | 2007-03-26 | 2008-10-01 | 刘军波 | Method and system for distributing network data |
| WO2011150644A1 (en) * | 2010-12-17 | 2011-12-08 | 华为技术有限公司 | Method and apparatus for acquiring and transmitting streaming media data in the process of initiation |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2015169074A1 (en) | 2015-11-12 |
| CN105100008A (en) | 2015-11-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN105100008B (en) | The method and relevant device of content distribution in content center network | |
| KR102052520B1 (en) | A node and a communication method for supporting content mobility in a content centric network | |
| US20210227007A1 (en) | Data storage method, encoding device, and decoding device | |
| CN103747083B (en) | A kind of content delivery method based on CCN | |
| CN103516757B (en) | Content processing method, Apparatus and system | |
| US11461276B2 (en) | Method and device for deduplication | |
| US9807205B2 (en) | Header compression for CCN messages using dictionary | |
| KR20170052475A (en) | Bit-aligned header compression for ccn messages using dictionary | |
| CN100450100C (en) | A routing method and routing device | |
| CN109426631A (en) | A kind of communication means based on RDMA, device and storage medium | |
| CN105074688B (en) | Flow-based data deduplication using a peer graph | |
| CN105099918A (en) | Method and apparatus for data searching and matching | |
| CN102523296B (en) | Method, device and system for optimizing wireless webpage browsing resources | |
| CN104869062B (en) | A kind of data packet forwarding method and equipment | |
| CN104113545B (en) | Stream media system and its application method under information centre's network | |
| WO2014166078A1 (en) | Data sending and processing method and router | |
| US10009446B2 (en) | Header compression for CCN messages using dictionary learning | |
| CN116095003A (en) | Address mapping method and device for Ethernet data frame and FC data frame | |
| CN107196981A (en) | Access record retransmission method, equipment and system | |
| CN105871720A (en) | Method for segmentally forwarding content objectives in content-centric network | |
| CN105681892A (en) | Differential data transmission method, device and system | |
| CN105141470B (en) | Content distribution system linear dependence judgment method and device based on network code | |
| CN103929404A (en) | A method for parsing HTTP chunked encoded data | |
| CN115604186A (en) | Routing method and related equipment | |
| CN115834574A (en) | Data coding transmission method, device, equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180605 Termination date: 20190509 |