[go: up one dir, main page]

CN107317842B - NDN-based blockchain synchronization method and device - Google Patents

NDN-based blockchain synchronization method and device Download PDF

Info

Publication number
CN107317842B
CN107317842B CN201710400368.0A CN201710400368A CN107317842B CN 107317842 B CN107317842 B CN 107317842B CN 201710400368 A CN201710400368 A CN 201710400368A CN 107317842 B CN107317842 B CN 107317842B
Authority
CN
China
Prior art keywords
block
request packet
user equipment
synchronization
packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710400368.0A
Other languages
Chinese (zh)
Other versions
CN107317842A (en
Inventor
雷凯
齐竹云
金彤
张丽珠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Peking University Shenzhen Graduate School
Original Assignee
Peking University Shenzhen Graduate School
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Peking University Shenzhen Graduate School filed Critical Peking University Shenzhen Graduate School
Priority to CN201710400368.0A priority Critical patent/CN107317842B/en
Publication of CN107317842A publication Critical patent/CN107317842A/en
Application granted granted Critical
Publication of CN107317842B publication Critical patent/CN107317842B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

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

Abstract

本发明公开了一种基于NDN的区块链同步方法和装置,属于通信技术领域。所述方法包括:用户设备向网络节点发送区块同步请求包,所述区块同步请求包的名称包括命名数据网络协议标识、应用标识、请求包类型和区块链的状态信息,所述区块链的状态信息用于指示所述用户设备存储的区块链中高度最高的区块的高度;接收所述网络节点返回的同步数据包,并提取所述同步数据包中的区块存储到区块链数据库。该同步方法是一种基于NDN的区块链系统通讯实现方法,可以减少网络通信量,降低传输延迟,并提高数据传输效率。

The invention discloses an NDN-based block chain synchronization method and device, belonging to the technical field of communication. The method includes: the user equipment sends a block synchronization request packet to the network node, the name of the block synchronization request packet includes a named data network protocol identifier, an application identifier, a request packet type, and state information of a block chain, and the block synchronization request packet includes The state information of the block chain is used to indicate the height of the block with the highest height in the block chain stored by the user equipment; receive the synchronization data packet returned by the network node, and extract the block in the synchronization data packet and store it in Blockchain database. The synchronization method is an NDN-based blockchain system communication implementation method, which can reduce network traffic, reduce transmission delays, and improve data transmission efficiency.

Description

基于NDN的区块链同步方法和装置NDN-based blockchain synchronization method and device

技术领域technical field

本发明涉及通信技术领域,特别涉及一种基于命名数据网络(Named DataNetworking,NDN)的区块链同步方法和装置。The present invention relates to the field of communication technology, in particular to a block chain synchronization method and device based on Named Data Networking (NDN).

背景技术Background technique

区块链(blockchain)系统是一种去中心化的、不可更改的共享分布式智能数据库。区块链最早诞生于比特币,是一种按照时间顺序将区块以顺序相连的方式组合成的链式数据结构,为比特币系统提供技术支持。其中,每个区块也就是一个数据块,每一个数据块中包含了一次比特币网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。The blockchain system is a decentralized, immutable shared distributed intelligent database. The blockchain was first born in Bitcoin. It is a chained data structure composed of blocks connected in sequence in chronological order, providing technical support for the Bitcoin system. Wherein, each block is also a data block, and each data block contains the information of a bitcoin network transaction, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block.

在区块链系统中,用户设备生产出新的区块后,将区块广播出去。网络中的其他用户设备在收到区块后,会验证其合法性;如果通过验证,则用户设备将该区块加入本地区块链中。这样,每个用户设备都存储着一条区块链,若系统运行正确,这些用户设备的区块链都是一样的。In the blockchain system, after the user equipment produces a new block, it broadcasts the block. After receiving the block, other user devices in the network will verify its legitimacy; if the verification is passed, the user device will add the block to the local blockchain. In this way, each user device stores a blockchain, and if the system operates correctly, the blockchains of these user devices are the same.

目前,区块链系统主要基于传输控制协议/因特网互联协议(TransmissionControl Protocol/Internet Protocol,TCP/IP)网络架构,基于TCP/IP网络架构的区块链系统普遍存在以下问题:At present, the blockchain system is mainly based on the Transmission Control Protocol/Internet Protocol (TCP/IP) network architecture, and the blockchain system based on the TCP/IP network architecture generally has the following problems:

(1)无法实现完全去中心化需求。由于业务需要,有很多区块链系统有去中心化的需求。例如目前最成熟的项目之一,比特币,在理论上是一个完全去中心化的纯粹的对等网络(Peer to Peer,P2P)系统。但在实际实现中,考虑到通信的困难,开发者在系统中增加了超级节点,用于向请求连接的用户设备分发各类数据。超级节点的设置,增加了比特币的安全风险,因为超级节点可以联合起来对用户设备组织欺诈活动。同时,这种架构还会导致超级节点的负载过大,存在服务质量无法提高和单点崩溃的问题。(1) It is impossible to realize the requirement of complete decentralization. Due to business needs, there are many blockchain systems that require decentralization. For example, one of the most mature projects at present, Bitcoin, is theoretically a completely decentralized pure peer-to-peer (Peer to Peer, P2P) system. However, in actual implementation, considering the difficulty of communication, developers have added super nodes to the system to distribute various types of data to user devices that request connections. The setting of super nodes increases the security risk of Bitcoin, because super nodes can unite to organize fraudulent activities on user equipment. At the same time, this architecture will also lead to excessive load on the super nodes, resulting in the problems that the quality of service cannot be improved and single point of failure.

(2)难以实现就近下载功能。按照设计,区块链系统的部分用户设备会存储当前系统的最新的区块链,当有新的用户设备请求获取区块链时,它们会返回相应的数据,但是如何让新的用户设备能够从存储有最新的区块链且距离最近的用户设备中获取区块链,一直是基于TCP/IP网络架构的区块链存在的问题。(2) It is difficult to realize the nearby download function. According to the design, some user devices of the blockchain system will store the latest blockchain of the current system, and when new user devices request to obtain the blockchain, they will return corresponding data, but how to enable new user devices to Obtaining the blockchain from the user device that stores the latest blockchain and is closest to it has always been a problem in the blockchain based on the TCP/IP network architecture.

发明内容Contents of the invention

为了解决现有技术中区块链技术存在的问题,本发明实施例提供了一种基于NDN的区块链同步方法和装置。In order to solve the problems existing in the blockchain technology in the prior art, an embodiment of the present invention provides an NDN-based blockchain synchronization method and device.

第一方面,本发明实施例提供了一种基于命名数据网络的区块链同步方法,所述方法包括:用户设备向网络节点发送区块同步请求包,所述区块同步请求包的名称包括命名数据网络协议标识、应用标识、请求包类型和区块链的状态信息,所述区块链的状态信息用于指示所述用户设备存储的区块链中高度最高的区块的高度;接收所述网络节点返回的同步数据包,并提取所述同步数据包中的区块存储到区块链数据库。In the first aspect, the embodiment of the present invention provides a block chain synchronization method based on a named data network, the method includes: the user equipment sends a block synchronization request packet to the network node, and the name of the block synchronization request packet includes Named data network protocol identification, application identification, request packet type, and state information of the block chain, the state information of the block chain is used to indicate the height of the block with the highest height in the block chain stored by the user equipment; receiving The synchronization data packet returned by the network node, and the blocks in the synchronization data packet are extracted and stored in the block chain database.

本发明实施例通过基于命名数据网络进行区块同步,由于其基于命名数据网络的区块链架构,不需要在设置超级节点,避免了设置超级节点所带来的问题;同时,在命名数据网络中,区块同步请求包在转发过程中,可以同时向多个其他用户设备进行转发,并且距离最近的用户设备会最先返回对应的数据包,从而实现了区块的就近下载;另外,命名数据网络内的网络节点在接收到区块同步请求包时,可以查找自己的内容存储库,并将对应的数据包提供给用户设备,利用网络节点的内容存储库实现了数据的复用,降低了数据传输量以及传输延迟。The embodiment of the present invention performs block synchronization based on the named data network. Due to its blockchain architecture based on the named data network, there is no need to set up super nodes, which avoids the problems caused by setting up super nodes; at the same time, in the named data network In the forwarding process, the block synchronization request packet can be forwarded to multiple other user devices at the same time, and the user device with the closest distance will return the corresponding data packet first, thus realizing the nearest download of the block; in addition, the named When a network node in the data network receives a block synchronization request packet, it can search for its own content storage, and provide the corresponding data packet to the user device, using the content storage of the network node to realize data multiplexing, reducing The data transmission volume and transmission delay.

在本发明实施例的一种实现方式中,所述用户设备向网络节点发送区块同步请求包,包括:确定存储的区块链中高度最高的区块,并计算其哈希值;将所述区块链中高度最高的区块的哈希值作为所述区块链的状态信息,生成所述区块同步请求包;将所述区块同步请求包发送给所述网络节点。In an implementation manner of the embodiment of the present invention, the user equipment sends a block synchronization request packet to the network node, including: determining the block with the highest height in the stored block chain, and calculating its hash value; The hash value of the block with the highest height in the block chain is used as the state information of the block chain to generate the block synchronization request packet; and send the block synchronization request packet to the network node.

在该实现方式中,采用存储的区块链中高度最高的区块的哈希值作为所述区块链的状态信息,计算方便。In this implementation manner, the hash value of the block with the highest height in the stored blockchain is used as the state information of the blockchain, which is convenient for calculation.

在本发明实施例的另一种实现方式中,所述方法还包括:当在所述用户设备发送所述同步请求包之后的设定时间内未接收到所述同步数据包时,向所述网络节点发送区块搜索请求包,所述区块搜索请求包的名称包括命名数据网络协议标识、应用标识、请求包类型和区块标识,所述区块标识用于指示所述用户设备搜索的区块的上一区块的高度,所述用户设备搜索的区块的上一区块的高度为所述用户设备存储的区块链中高度最高的区块的高度;当接收到所述网络节点返回的搜索数据包时,提取所述搜索数据包中的区块存储到区块链数据库,然后发送新的区块搜索请求包,所述新的区块搜索请求包的区块标识与所述区块搜索请求包的区块标识不同;当在预定时间内未接收到所述网络节点返回的搜索数据包时,重新发送所述区块搜索请求包。In another implementation manner of the embodiment of the present invention, the method further includes: when the synchronization data packet is not received within a set time after the user equipment sends the synchronization request packet, sending the The network node sends a block search request packet, the name of the block search request packet includes a named data network protocol identifier, an application identifier, a request packet type, and a block identifier, and the block identifier is used to indicate the user equipment to search The height of the previous block of the block, the height of the previous block of the block searched by the user equipment is the height of the block with the highest height in the block chain stored by the user equipment; when receiving the network When the search data packet returned by the node, the block in the search data packet is extracted and stored in the blockchain database, and then a new block search request packet is sent, and the block identifier of the new block search request packet is the same as the The block identification of the block search request packet is different; when the search data packet returned by the network node is not received within a predetermined time, the block search request packet is resent.

在本发明实施例的另一种实现方式中,所述方法还包括:接收网络节点发送的另一用户设备发送的区块同步请求包;根据所述另一用户设备发送的区块同步请求包中的区块链的状态信息,确定所述另一用户设备存储的区块链中高度最高的区块的高度;比较确定出的所述另一用户设备存储的区块链中高度最高的区块的高度和所述用户设备存储的区块链中高度最高的区块的高度,确定所述另一用户设备需要同步的区块;根据所述另一用户设备需要同步的区块生成同步数据包,并返回给所述另一用户设备。In another implementation manner of the embodiment of the present invention, the method further includes: receiving a block synchronization request packet sent by another user equipment sent by the network node; according to the block synchronization request packet sent by the other user equipment The status information of the block chain in the block chain, determine the height of the block with the highest height in the block chain stored by the other user equipment; compare the determined block with the highest block height in the block chain stored by the other user equipment The height of the block and the height of the block with the highest height in the block chain stored by the user equipment determine the block that needs to be synchronized by the other user equipment; generate synchronization data according to the block that needs to be synchronized by the other user equipment package and return it to the other user equipment.

在本发明实施例的另一种实现方式中,所述方法还包括:当所述用户设备成功创建区块时,向网络内的网络节点广播所述区块的信息;接收网络节点发送的区块搜索请求包,所述区块搜索请求包用于请求所述用户设备新创建的区块;向所述网络节点发送搜索请求包,所述搜索数据包包括所述用户设备新创建的区块。In another implementation manner of the embodiment of the present invention, the method further includes: when the user equipment successfully creates a block, broadcasting the block information to network nodes in the network; receiving the block information sent by the network node A block search request packet, the block search request packet is used to request the newly created block of the user equipment; send a search request packet to the network node, the search data packet includes the newly created block of the user equipment .

第二方面,本发明实施例还提供了一种基于命名数据网络的区块链同步方法,所述方法包括:网络节点接收用户设备发送的区块同步请求包,所述区块同步请求包的名称包括命名数据网络协议标识、应用标识、请求包类型和区块链的状态信息,所述区块链的状态信息用于指示所述用户设备存储的区块链中高度最高的区块的高度;在内容存储库中查找所述区块同步请求包对应的同步数据包,所述同步数据包包括所述用户设备未更新的区块;当在所述内容存储库中查找到所述区块同步请求包对应的同步数据包时,将所述同步数据包返回所述用户设备;当在所述内容存储库中未查找到所述区块同步请求包对应的同步数据包时,在所述网络节点的待定兴趣表中查找所述区块同步请求包对应的条目;当所述网络节点的待定兴趣表中未查找到所述区块同步请求包对应的条目时,在待定兴趣表中添加对应的条目,并在转发信息表中查询与所述区块同步请求包对应的接口,通过确定出的接口转发所述区块同步请求包;当所述网络节点的待定兴趣表中查找到所述区块同步请求包对应的条目时,在查找到的条目中添加接收所述区块同步请求包的接口;当接收到所述区块同步请求包对应的同步数据包时,根据所述待定兴趣表中的条目转发所述同步数据包。In the second aspect, the embodiment of the present invention also provides a block chain synchronization method based on a named data network, the method includes: the network node receives the block synchronization request packet sent by the user equipment, and the block synchronization request packet The name includes the named data network protocol identifier, application identifier, request packet type, and blockchain status information, which is used to indicate the height of the highest block in the blockchain stored by the user device ; Search the synchronization data packet corresponding to the block synchronization request packet in the content storage library, the synchronization data packet includes the block that has not been updated by the user equipment; when the block is found in the content storage library When the synchronization data packet corresponding to the synchronization request packet is returned, the synchronization data packet is returned to the user equipment; when the synchronization data packet corresponding to the block synchronization request packet is not found in the content storage library, in the Find the entry corresponding to the block synchronization request packet in the pending interest table of the network node; when the entry corresponding to the block synchronization request packet is not found in the pending interest table of the network node, add corresponding entry, and query the interface corresponding to the block synchronization request packet in the forwarding information table, and forward the block synchronization request packet through the determined interface; when the pending interest table of the network node finds the When the entry corresponding to the block synchronization request packet is found, an interface for receiving the block synchronization request packet is added to the found entry; when the synchronization data packet corresponding to the block synchronization request packet is received, according to the pending An entry in the interest table forwards the synchronization packet.

本发明实施例通过基于命名数据网络进行区块同步,由于其基于命名数据网络的区块链架构,不需要在设置超级节点,避免了设置超级节点所带来的问题;同时,在命名数据网络中,区块同步请求包在转发过程中,可以同时向多个其他用户设备进行转发,并且距离最近的用户设备会最先返回对应的数据包,从而实现了区块的就近下载;另外,网络节点在接收到区块同步请求包时,可以查找自己的内容存储库,并将对应的数据包提供给用户设备,利用网络节点的内容存储库实现了数据的复用,降低了数据传输量以及传输延迟。The embodiment of the present invention performs block synchronization based on the named data network. Due to its blockchain architecture based on the named data network, there is no need to set up super nodes, which avoids the problems caused by setting up super nodes; at the same time, in the named data network In the forwarding process, the block synchronization request packet can be forwarded to multiple other user devices at the same time, and the user device with the closest distance will return the corresponding data packet first, thereby realizing the nearest download of the block; in addition, the network When a node receives a block synchronization request packet, it can search its own content repository and provide the corresponding data packet to the user device. Using the content repository of the network node to realize data multiplexing reduces the amount of data transmission and Transmission delay.

在本发明实施例的一种实现方式中,所述方法还包括:接收用户设备发送的区块搜索请求包,所述区块搜索请求包的名称包括命名数据网络协议标识、应用标识、请求包类型和区块标识,所述区块标识用于指示所述用户设备搜索的区块的上一区块的高度;在内容存储库中查找所述区块搜索请求包对应的搜索数据包,所述搜索数据包包括所述用户设备搜索的区块;当在所述内容存储库中查找到所述区块搜索请求包对应的搜索数据包时,将所述搜索数据包返回所述用户设备;当在所述内容存储库中未查找到所述区块搜索请求包对应的搜索数据包时,在所述网络节点的待定兴趣表中查找所述区块搜索请求包对应的条目;当所述网络节点的待定兴趣表中未查找到所述区块搜索请求包对应的条目时,在待定兴趣表中添加对应的条目,并在转发信息表中查询与所述区块搜索请求包对应的接口,通过确定出的接口转发所述区块搜索请求包;当所述网络节点的待定兴趣表中查找到所述区块搜索请求包对应的条目时,在查找到的条目中添加接收所述区块搜索请求包的接口;当接收到所述区块搜索请求包对应的搜索数据包时,根据所述待定兴趣表中的条目转发所述搜索数据包。In an implementation manner of the embodiment of the present invention, the method further includes: receiving a block search request packet sent by the user equipment, the name of the block search request packet includes a named data network protocol identifier, an application identifier, a request packet Type and block identifier, the block identifier is used to indicate the height of the previous block of the block searched by the user equipment; search the search data packet corresponding to the block search request packet in the content storage library, the The search data packet includes the block searched by the user equipment; when the search data packet corresponding to the block search request packet is found in the content storage library, the search data packet is returned to the user equipment; When the search data packet corresponding to the block search request packet is not found in the content storage library, look up the entry corresponding to the block search request packet in the pending interest table of the network node; when the When the entry corresponding to the block search request packet is not found in the pending interest table of the network node, add the corresponding entry in the pending interest table, and query the interface corresponding to the block search request packet in the forwarding information table , forward the block search request packet through the determined interface; when the entry corresponding to the block search request packet is found in the pending interest table of the network node, add the block search request packet to the found entry An interface for a block search request packet; when receiving a search data packet corresponding to the block search request packet, forwarding the search data packet according to entries in the pending interest table.

在该实现方式中,网络节点在接收到区块搜索请求包时,可以查找自己的内容存储库,并将对应的数据包提供给用户设备,利用网络节点的内容存储库实现了数据的复用,降低了数据传输量以及传输延迟。In this implementation, when the network node receives the block search request packet, it can search its own content storage library, and provide the corresponding data packet to the user equipment, and use the content storage library of the network node to realize data multiplexing , reducing the amount of data transmission and transmission delay.

在本发明实施例的另一种实现方式中,所述方法还包括:当在所述转发信息表中未查询到与所述区块搜索请求包对应的接口时,存储所述区块搜索请求包;当所述网络节点的转发信息表进行更新,且更新后的所述转发信息表中包括所述区块搜索请求包对应的条目时,在转发信息表中查询与所述区块搜索请求包对应的接口;通过确定出的接口转发所述区块搜索请求包。In another implementation manner of the embodiment of the present invention, the method further includes: when the interface corresponding to the block search request packet is not found in the forwarding information table, storing the block search request packet; when the forwarding information table of the network node is updated, and the updated forwarding information table includes an entry corresponding to the block search request packet, query the forwarding information table related to the block search request An interface corresponding to the packet; forwarding the block search request packet through the determined interface.

在该实现方式中,用户设备在进行新区块的搜索时,通常系统内还未产生该区块,所以必须等待系统内有用户产生了该区块并广播了区块信息,然后根据该区块信息更新转发信息表后,方能实现区块搜索请求包的转发以及搜索数据包的返回。In this implementation, when the user equipment is searching for a new block, usually the block has not been generated in the system, so it must wait for a user in the system to generate the block and broadcast the block information, and then according to the block The forwarding of the block search request packet and the return of the search data packet can only be realized after the information updates the forwarding information table.

第三方面,本发明实施例提供了一种基于命名数据网络的区块链同步装置,所述装置包括用于实现第一方面所述的方法的单元,例如发送单元和接收单元。In a third aspect, an embodiment of the present invention provides a block chain synchronization device based on a named data network, and the device includes units for implementing the method described in the first aspect, such as a sending unit and a receiving unit.

第四方面,本发明实施例提供了一种基于命名数据网络的区块链同步装置,所述装置包括用于实现第二方面所述的方法的单元,例如接收单元、查找单元、处理单元和发送单元。In a fourth aspect, an embodiment of the present invention provides a block chain synchronization device based on a named data network, the device includes units for implementing the method described in the second aspect, such as a receiving unit, a search unit, a processing unit and sending unit.

第五方面,本发明实施例还提供了一种基于命名数据网络的区块链同步装置,所述装置包括:存储器、与存储器连接的处理器、收发器,所述存储器用于存储软件程序以及模块,当所述处理器用于运行或执行存储在所述存储器内的软件程序以及模块时,可以执行第一方面任一实现方式所述的方法。In the fifth aspect, the embodiment of the present invention also provides a block chain synchronization device based on a named data network, the device includes: a memory, a processor connected to the memory, a transceiver, and the memory is used to store software programs and A module, when the processor is used to run or execute the software programs and modules stored in the memory, it can execute the method described in any implementation manner of the first aspect.

第六方面,本发明实施例还提供了一种基于命名数据网络的区块链同步装置,所述装置包括:存储器、与存储器连接的处理器、收发器,所述存储器用于存储软件程序以及模块,当所述处理器用于运行或执行存储在所述存储器内的软件程序以及模块时,可以执行第二方面任一实现方式所述的方法。In the sixth aspect, the embodiment of the present invention also provides a block chain synchronization device based on a named data network, the device includes: a memory, a processor connected to the memory, a transceiver, and the memory is used to store software programs and A module, when the processor is used to run or execute the software programs and modules stored in the memory, it can execute the method described in any implementation manner of the second aspect.

第七方面,本发明实施例还提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令,所述指令由处理器加载并执行以实现如第一方面任一实现方式所述的基于命名数据网络的区块链同步方法。In the seventh aspect, the embodiment of the present invention also provides a computer-readable storage medium, where at least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor to implement the method described in any implementation manner of the first aspect. The blockchain synchronization method based on the named data network described above.

第八方面,本发明实施例还提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令,所述指令由处理器加载并执行以实现如第二方面任一实现方式所述的基于命名数据网络的区块链同步方法。In an eighth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where at least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor to implement the method described in any implementation manner of the second aspect. The blockchain synchronization method based on the named data network described above.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained based on these drawings without creative effort.

图1是本发明实施例提供的一种NDN的网络架构示意图;FIG. 1 is a schematic diagram of a network architecture of an NDN provided by an embodiment of the present invention;

图2A是本发明实施例提供的一种基于NDN的区块链同步装置的硬件结构图;FIG. 2A is a hardware structural diagram of an NDN-based block chain synchronization device provided by an embodiment of the present invention;

图2B是本发明实施例提供的一种基于NDN的区块链同步装置的硬件结构图;FIG. 2B is a hardware structural diagram of an NDN-based block chain synchronization device provided by an embodiment of the present invention;

图3为本发明实施例提供的一种基于NDN的区块链同步方法的流程图;FIG. 3 is a flow chart of an NDN-based block chain synchronization method provided by an embodiment of the present invention;

图3A为本发明实施例提供的一种基于NDN的区块链同步方法的应用场景图;FIG. 3A is an application scenario diagram of an NDN-based blockchain synchronization method provided by an embodiment of the present invention;

图3B为本发明实施例提供的一种基于NDN的区块链同步方法的应用场景图;FIG. 3B is an application scenario diagram of an NDN-based blockchain synchronization method provided by an embodiment of the present invention;

图4为本发明实施例提供的一种基于NDN的区块链同步装置的结构示意图;FIG. 4 is a schematic structural diagram of an NDN-based block chain synchronization device provided by an embodiment of the present invention;

图5为本发明实施例提供的一种基于NDN的区块链同步装置的结构示意图。Fig. 5 is a schematic structural diagram of an NDN-based block chain synchronization device provided by an embodiment of the present invention.

具体实施方式Detailed ways

在本文提及的“模块”是指存储在存储器中的能够实现某些功能的程序或指令;在本文中提及的“单元”是指按照逻辑划分的功能性结构,该“单元”可以由纯硬件实现,或者,软硬件的结合实现。The "module" mentioned in this article refers to the program or instruction that can realize certain functions stored in the memory; the "unit" mentioned in this article refers to a functional structure divided according to logic, and the "unit" can be composed of Pure hardware implementation, or a combination of software and hardware.

为了解决现有基于TCP/IP架构的区块链方案所存在的问题,本发明实施例提供了一种基于NDN的区块链实现方案,具体包括基于NDN的区块链同步方法和基于NDN的区块链同步装置。为了便于理解,下面现对先NDN进行简单介绍。In order to solve the problems existing in the existing blockchain scheme based on TCP/IP architecture, the embodiment of the present invention provides an NDN-based blockchain implementation scheme, which specifically includes an NDN-based blockchain synchronization method and an NDN-based Blockchain synchronization device. For ease of understanding, a brief introduction to NDN is given below.

图1示出了本发明实施例提供的一种NDN的网络架构。如图1所示,该NDN 100包括多个网络节点101(包括网络节点A-E),用户设备102与网络节点101连接,该用户设备102既是NDN中的生产者,也是NDN中的消费者。其中,消费者是发送兴趣包的数据请求方,生产者是具有数据包的数据提供方。Fig. 1 shows an NDN network architecture provided by an embodiment of the present invention. As shown in FIG. 1 , the NDN 100 includes multiple network nodes 101 (including network nodes A-E), and a user equipment 102 is connected to the network nodes 101. The user equipment 102 is both a producer and a consumer in the NDN. Among them, the consumer is the data requester that sends the Interest packet, and the producer is the data provider with the Data packet.

该用户设备102为终端设备,具体可以是计算机、服务器、移动终端等。The user equipment 102 is a terminal equipment, and specifically may be a computer, a server, a mobile terminal, and the like.

NDN中的网络节点101保存有三个数据结构:转发信息表(ForwardingInformation Base,FIB)、待定兴趣表(Pending Interest Table,PIT)以及内容存储库(Content Store,CS)。The network node 101 in the NDN stores three data structures: Forwarding Information Base (FIB), Pending Interest Table (PIT) and Content Store (Content Store, CS).

具体地,CS用于存储经过该网络节点的数据包,其存储模式是数据包的名字+数据,如下表所示:Specifically, CS is used to store data packets passing through the network node, and its storage mode is the name of the data packet + data, as shown in the following table:

名字name 数据data ndn/<App Name>/sync/<Blockchain State>ndn/<App Name>/sync/<Blockchain State> ……...

PIT主要用于存储接收到的兴趣包的名字以及接收该兴趣包的接口,其存储模式是兴趣包的名字+接口列表,如下表所示:PIT is mainly used to store the name of the received Interest packet and the interface that receives the Interest packet. The storage mode is the name of the Interest packet + interface list, as shown in the following table:

名字name 接口列表interface list ndn/<App Name>/sync/<Blockchain State>ndn/<App Name>/sync/<Blockchain State> 0,10,1

FIB主要用于路由转发,用于存储不同名字对应的转发接口,其存储模式为名字(或前缀)+接口列表,如下表所示:FIB is mainly used for routing and forwarding, and is used to store forwarding interfaces corresponding to different names. Its storage mode is name (or prefix) + interface list, as shown in the following table:

名字name 接口列表interface list ndn/<App Name>/sync/<Blockchain State>ndn/<App Name>/sync/<Blockchain State> 22

消费者发出的兴趣包经过某个网络节点101时,该网络节点101在CS中查找该兴趣包请求的数据包,如果CS中存在该兴趣包请求的数据包,则向消费者返回该数据包;如果CS中不存在该数据包,则在PIT中查询是否存在该兴趣包对应的条目。如果PIT中存在该兴趣包对应的条目,则将接收该兴趣包的接口添加到该条目中;如果PIT中不存在该兴趣包对应的条目,则在PIT中新增该兴趣包对应的条目,该条目包括接收该兴趣包的接口,网络节点101将兴趣包的名字在FIB中进行匹配,选择接口将兴趣包转发出去。When the Interest packet sent by the consumer passes through a certain network node 101, the network node 101 searches the CS for the data packet requested by the Interest packet, and if the data packet requested by the Interest packet exists in the CS, then returns the data packet to the consumer ; If the data packet does not exist in the CS, query whether there is an entry corresponding to the Interest packet in the PIT. If there is an entry corresponding to the Interest packet in the PIT, add the interface that receives the Interest packet to the entry; if there is no entry corresponding to the Interest packet in the PIT, add an entry corresponding to the Interest packet in the PIT, The entry includes the interface that receives the Interest packet, and the network node 101 matches the name of the Interest packet in the FIB, and selects an interface to forward the Interest packet.

如果转发过程中,另一网络节点101的CS中存在该兴趣包请求的数据包时,则该另一网络节点101按照兴趣包转发路径返回数据包。如果转发过程中,各个网络节点101的CS中均不存在该兴趣包请求的数据包,则该兴趣包将被发往数据包的生产者,由生产者向消费者返回数据包。在数据包返回的过程中,如果网络节点101接收到该兴趣包请求的数据包时,网络节点101根据PIT中该兴趣包对应的条目选择接口发送该数据包,从而实现将数据包发送至请求该数据包的消费者。其中,网络节点101在进行兴趣包转发时,采用最长前缀匹配机制,确定转发接口。If there is a data packet requested by the Interest packet in the CS of another network node 101 during the forwarding process, the other network node 101 returns the data packet according to the forwarding path of the Interest packet. If the data packet requested by the Interest packet does not exist in the CS of each network node 101 during the forwarding process, the Interest packet will be sent to the producer of the data packet, and the producer will return the data packet to the consumer. In the process of returning the data packet, if the network node 101 receives the data packet requested by the Interest packet, the network node 101 selects the interface to send the data packet according to the entry corresponding to the Interest packet in the PIT, thereby realizing sending the data packet to the request The consumer of this packet. Wherein, when forwarding the Interest packet, the network node 101 adopts the longest prefix matching mechanism to determine the forwarding interface.

本发明实施例提供的区块同步方案正是基于上述NDN网络架构实现,详见后述详细实施例。The block synchronization solution provided by the embodiment of the present invention is implemented based on the above-mentioned NDN network architecture, and details are described in the detailed embodiments described later.

下面先结合具体的硬件结构对实现本发明实施例提供的基于NDN的区块链同步装置进行说明。The implementation of the NDN-based block chain synchronization device provided by the embodiment of the present invention will be described below in conjunction with a specific hardware structure.

图2A示出了实现本发明实施例提供的一种基于NDN的区块链同步装置的硬件结构,该基于NDN的区块链同步装置可以为前述网络中的用户设备。如图2A所示,该基于NDN的区块链同步装置120包括:处理器11、收发器12、存储器13。FIG. 2A shows a hardware structure for implementing an NDN-based block chain synchronization device provided by an embodiment of the present invention. The NDN-based block chain synchronization device may be a user equipment in the aforementioned network. As shown in FIG. 2A , the NDN-based block chain synchronization device 120 includes: a processor 11 , a transceiver 12 , and a memory 13 .

处理器11包括一个或者一个以上处理核心,处理器11通过运行软件程序以及模块,从而执行各种功能应用以及信息处理。The processor 11 includes one or more processing cores, and the processor 11 executes various functional applications and information processing by running software programs and modules.

收发器12、存储器13以及处理器11通过总线耦合。存储器13可用于存储软件程序以及模块。存储器可存储操作系统14、至少一个功能的应用程序模块15。应用程序模块15至少包括:发送模块151和接收模块152。The transceiver 12, the memory 13, and the processor 11 are coupled through a bus. The memory 13 can be used to store software programs as well as modules. The memory may store an operating system 14, an application program module 15 for at least one function. The application module 15 at least includes: a sending module 151 and a receiving module 152 .

可选地,处理器11用于执行应用程序模块15中的各个模块,实现如图3中由用户设备所需要执行的步骤。Optionally, the processor 11 is configured to execute each module in the application program module 15 to implement the steps required by the user equipment as shown in FIG. 3 .

此外,存储器13是一种计算机可读存储介质,可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随时存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。In addition, the memory 13 is a computer-readable storage medium, which can be implemented by any type of volatile or non-volatile storage devices or their combination, such as static anytime access memory (SRAM), electrically erasable and programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.

本领域技术人员可以理解,图2A中所示出的基于NDN的区块链同步装置120的结构并不构成对终端设备的限定,可以包括比图示更多或更少的部件或组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure of the NDN-based block chain synchronization device 120 shown in FIG. 2A does not constitute a limitation on terminal equipment, and may include more or less components than those shown in the illustration or combine some components, or different component arrangements.

图2B示出了实现本发明实施例提供的一种基于NDN的区块链同步装置的硬件结构,该基于NDN的区块链同步装置可以为前述网络中的网络节点。如图2B所示,该基于NDN的区块链同步装置220包括:处理器21、通信接口22、存储器23。FIG. 2B shows a hardware structure for implementing an NDN-based block chain synchronization device provided by an embodiment of the present invention. The NDN-based block chain synchronization device may be a network node in the aforementioned network. As shown in FIG. 2B , the NDN-based block chain synchronization device 220 includes: a processor 21 , a communication interface 22 , and a memory 23 .

处理器21包括一个或者一个以上处理核心,处理器21通过运行软件程序以及模块,从而执行各种功能应用以及信息处理。The processor 21 includes one or more processing cores, and the processor 21 executes various functional applications and information processing by running software programs and modules.

通信接口22、存储器23以及处理器21通过总线耦合。存储器23可用于存储软件程序以及模块。存储器可存储操作系统24、至少一个功能的应用程序模块25。应用程序模块25至少包括:接收模块251、查找模块252、处理模块253和发送模块254。The communication interface 22, the memory 23 and the processor 21 are coupled through a bus. The memory 23 can be used to store software programs as well as modules. The memory can store an operating system 24, an application program module 25 for at least one function. The application module 25 at least includes: a receiving module 251 , a searching module 252 , a processing module 253 and a sending module 254 .

可选地,处理器21用于执行应用程序模块25中的各个模块,实现如图3中由网络节点所需要执行的步骤。Optionally, the processor 21 is configured to execute each module in the application program module 25 to implement the steps required by the network node as shown in FIG. 3 .

此外,存储器23是一种计算机可读存储介质,可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随时存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。In addition, the memory 23 is a computer-readable storage medium, which can be implemented by any type of volatile or non-volatile storage devices or their combination, such as static anytime access memory (SRAM), electrically erasable and programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.

本领域技术人员可以理解,图2B中所示出的基于NDN的区块链同步装置220的结构并不构成对终端设备的限定,可以包括比图示更多或更少的部件或组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure of the NDN-based block chain synchronization device 220 shown in FIG. 2B does not constitute a limitation on terminal equipment, and may include more or less components than those shown in the illustration or combine some components, or different component arrangements.

图3为本发明实施例提供的一种基于NDN的区块链同步方法的交互图,如图3所示,该区块链同步方法由图1中的用户设备和网络节点执行,该方法包括:Fig. 3 is an interaction diagram of an NDN-based block chain synchronization method provided by an embodiment of the present invention. As shown in Fig. 3, the block chain synchronization method is executed by the user equipment and the network node in Fig. 1, and the method includes :

S301:第一用户设备向网络节点发送区块同步请求包。S301: The first user equipment sends a block synchronization request packet to the network node.

其中,区块同步请求包采用兴趣包的格式,用于进行区块同步。该区块同步请求包的名称采用具有层次结构化的可变长度标识符作为命名规则,该区块同步请求包的名称具体可以包括NDN协议标识、应用标识、请求包类型和区块链的状态信息,区块链的状态信息用于指示用户设备存储的区块链中高度最高的区块的高度。Wherein, the block synchronization request packet adopts the format of interest packet, and is used for block synchronization. The name of the block synchronization request package adopts a hierarchical variable-length identifier as the naming rule. The name of the block synchronization request package can specifically include the NDN protocol identification, application identification, request package type and blockchain status Information, the status information of the blockchain is used to indicate the height of the highest block in the blockchain stored by the user equipment.

具体地,区块同步请求包的名称可以如下ndn/<App Name>/sync/<BlockchainState>。其中,ndn/是NDN协议标识;<App Name>为应用标识,例如该<App Name>具体可以为blockndn;sync为请求包的类型,用于表示该请求包为区块同步请求包;<BlockchainState>为区块链的状态信息,携带有第一用户设备存储的区块链的状态信息,具体可以是第一用户设备存储的区块链中高度最高的区块的消息摘要,例如第一用户设备存储的区块链中高度最高的区块的哈希值,哈希值的格式如下“000000000000038cc0f7…”。Specifically, the name of the block synchronization request package can be as follows: ndn/<App Name>/sync/<BlockchainState>. Among them, ndn/ is the NDN protocol identifier; <App Name> is the application identifier, for example, the <App Name> can be specifically blockndn; sync is the type of request packet, which is used to indicate that the request packet is a block synchronization request packet; <BlockchainState > is the status information of the blockchain, carrying the status information of the blockchain stored by the first user equipment, specifically, it can be the message summary of the block with the highest height in the blockchain stored by the first user equipment, for example, the first user The hash value of the block with the highest height in the blockchain stored on the device. The format of the hash value is as follows: "000000000000038cc0f7...".

其中,区块链系统用高度来表明区块链的规模,高度为0的区块是该区块链的第一个区块,依次类推,给每一个区块命名,最新收到的区块为高度最高的区块。Among them, the blockchain system uses the height to indicate the scale of the blockchain. The block with a height of 0 is the first block of the blockchain, and so on. Name each block, and the latest received block is the block with the highest height.

进一步地,在步骤S301之前,该方法还包括:Further, before step S301, the method also includes:

生成区块同步请求包。Generate a block synchronization request packet.

具体地,生成区块同步请求包的过程如下:第一用户设备确定存储的区块链中高度最高的区块,并计算其哈希值;根据该哈希值生成区块同步请求包。Specifically, the process of generating the block synchronization request packet is as follows: the first user equipment determines the block with the highest height in the stored blockchain, and calculates its hash value; generates the block synchronization request packet according to the hash value.

需要说明的是,第一用户设备在新接入区块链系统后,本地区块链需要进行更新,此时第一用户设备向网络节点发送同步请求包。It should be noted that after the first user equipment newly accesses the blockchain system, the local blockchain needs to be updated, and at this time the first user equipment sends a synchronization request packet to the network node.

S302:网络节点接收该区块同步请求包,在CS中查找该区块同步请求包对应的同步数据包。如果在CS中查找到区块同步请求包对应的同步数据包时,则执行步骤S303;如果在CS中未查找到区块同步请求包对应的同步数据包时,则执行步骤S304。S302: The network node receives the block synchronization request packet, and searches the CS for a synchronization data packet corresponding to the block synchronization request packet. If the synchronization data packet corresponding to the block synchronization request packet is found in the CS, execute step S303; if the synchronization data packet corresponding to the block synchronization request packet is not found in the CS, execute step S304.

由于,网络节点的CS会存储数据包,所以如果之前有其他用户设备在第一用户设备相同的区块链状态下进行过区块同步,则网络节点中可能存储了与该区块同步请求包对应的同步数据包,此时网络节点可以直接将对应的同步数据包发回第一用户设备。例如,用户设备A在步骤S301之前请求过区块同步且获得了同步数据包A,该同步数据包A被存储在了网络节点内,用户设备A请求区块同步时的区块链高度为40,如果第一用户设备在步骤S301中请求同步时的区块链高度也是40,则此时存储有同步数据包A的网络节点可以将该同步数据包A返回给第一用户设备。Since the CS of the network node will store data packets, if other user equipments have previously performed block synchronization in the same blockchain state as the first user equipment, the network node may store a block synchronization request packet The corresponding synchronization data packet, at this time, the network node may directly send the corresponding synchronization data packet back to the first user equipment. For example, user equipment A has requested block synchronization before step S301 and obtained synchronization data packet A, which is stored in the network node, and the block chain height when user equipment A requests block synchronization is 40 , if the block chain height when the first user equipment requests synchronization in step S301 is also 40, then the network node storing the synchronization data packet A can return the synchronization data packet A to the first user equipment.

S303:网络节点将同步数据包返回第一用户设备。S303: The network node returns the synchronization data packet to the first user equipment.

具体地,网络节点在CS中查找到与接收到的区块同步请求包,然后按照接收该区块同步请求包的接口返回给第一用户设备。Specifically, the network node finds and receives the block synchronization request packet in the CS, and returns it to the first user equipment according to the interface for receiving the block synchronization request packet.

S304:网络节点在网络节点的PIT中查找区块同步请求包对应的条目;当网络节点的PIT中未查找到区块同步请求包对应的条目时,在PIT中添加对应的条目,并执行步骤S305;当网络节点的PIT中查找到区块同步请求包对应的条目时,在查找到的条目中添加接收区块同步请求包的接口。S304: The network node searches the PIT of the network node for an entry corresponding to the block synchronization request packet; when the entry corresponding to the block synchronization request packet is not found in the PIT of the network node, add the corresponding entry in the PIT, and perform the steps S305: When an entry corresponding to the block synchronization request packet is found in the PIT of the network node, add an interface for receiving the block synchronization request packet to the found entry.

在这一步中,如果网络节点在PIT表中未查找到该区块同步请求包对应的条目,则说明在此之前没有网络节点转发过相同的区块同步请求包,此时网络节点需要在PIT表中添加该区块同步请求包对应的条目。该条目包括区块同步请求包的名称以及接收该区块同步请求包的接口。In this step, if the network node does not find the entry corresponding to the block synchronization request packet in the PIT table, it means that no network node has forwarded the same block synchronization request packet before. The entry corresponding to the block synchronization request packet is added to the table. The entry includes the name of the block synchronization request package and the interface for receiving the block synchronization request package.

如果网络节点在PIT表中查找到该区块同步请求包对应的条目,则说明在此之前已经有网络节点转发过相同的区块同步请求包,此时网络节点只需要在对应的条目内加上接收该区块同步请求包的接口,使得后续接收到对应的同步数据包时,能够通过PIT表的条目转发给第一用户设备。If the network node finds the entry corresponding to the block synchronization request packet in the PIT table, it means that the network node has forwarded the same block synchronization request packet before, and the network node only needs to add The block synchronization request packet is received on the interface, so that when the corresponding synchronization data packet is subsequently received, it can be forwarded to the first user equipment through the entry in the PIT table.

S305:网络节点在FIB表中查询与区块同步请求包对应的接口,通过确定出的接口转发区块同步请求包。S305: The network node queries the interface corresponding to the block synchronization request packet in the FIB table, and forwards the block synchronization request packet through the determined interface.

具体地,网络节点采用区块同步请求包的名称在FIB表中进行匹配,确定对应的转发接口;然后采用确定出的转发接口进行区块同步请求包的转发。其中,FIB表的格式如前文所述,匹配可以采用最长匹配规则实现。Specifically, the network node matches the name of the block synchronization request packet in the FIB table to determine the corresponding forwarding interface; then uses the determined forwarding interface to forward the block synchronization request packet. Wherein, the format of the FIB table is as described above, and the matching can be implemented by using the longest matching rule.

网络节点在FIB表中查询与区块同步请求包对应的接口,如果查询到与区块同步请求包对应的接口,则通过确定出的接口转发区块同步请求包。如果未查找到与区块同步请求包对应的接口,则将该区块同步请求包存储起来,直到FIB更新后重新进行匹配,确定对应的转发接口。The network node queries the interface corresponding to the block synchronization request packet in the FIB table, and if the interface corresponding to the block synchronization request packet is found, the block synchronization request packet is forwarded through the determined interface. If the interface corresponding to the block synchronization request packet is not found, the block synchronization request packet is stored until the FIB is updated and re-matched to determine the corresponding forwarding interface.

由于FIB中,区块同步请求包的名称匹配到的条目可能存在多个转发接口,因此,网络节点可能会同时采用多个转发接口对该区块同步请求包进行转发,进而使得该区块同步请求包能够被转发到不同的用户设备。In the FIB, there may be multiple forwarding interfaces for the entry matched by the name of the block synchronization request packet. Therefore, the network node may use multiple forwarding interfaces to forward the block synchronization request packet at the same time, thereby making the block synchronization Request packets can be forwarded to different user devices.

由于NDN网络中存在多个网络节点,因此,在区块同步请求包转发的过程中,每个接收到该区块同步请求包的网络节点均按照步骤S302-S305的方式执行。Since there are multiple network nodes in the NDN network, in the process of forwarding the block synchronization request packet, each network node that receives the block synchronization request packet performs steps S302-S305.

S306:第二用户设备接收到该区块同步请求包,并返回同步数据包。S306: The second user equipment receives the block synchronization request packet, and returns a synchronization data packet.

具体地,第二用户设备在接收到该区块同步请求包后,根据该区块同步请求包中的区块链的状态信息,确定第一用户设备需要同步的区块;根据第一用户设备需要同步的区块生成同步数据包,并返回给第一用户设备。Specifically, after receiving the block synchronization request packet, the second user equipment determines the block that the first user equipment needs to synchronize according to the state information of the block chain in the block synchronization request packet; Blocks that need to be synchronized generate a synchronization data packet and return it to the first user equipment.

其中,根据该区块同步请求包中的区块链的状态信息,确定第一用户设备需要同步的区块的过程如下:第二用户设备通过区块同步请求包的命名规则提取区块链的状态信息;根据该区块链的状态信息确定第一用户设备存储的区块链中高度最高的区块的高度;比较确定出的第一用户设备存储的区块链中高度最高的区块的高度和第二用户设备存储的区块链中高度最高的区块的高度,确定第一用户设备需要同步的区块。Wherein, according to the state information of the block chain in the block synchronization request packet, the process of determining the block to be synchronized by the first user equipment is as follows: State information; determine the height of the block with the highest height in the block chain stored by the first user equipment according to the state information of the block chain; compare the determined height of the block with the highest height in the block chain stored by the first user equipment The height and the height of the block with the highest height in the block chain stored by the second user equipment determine the block that needs to be synchronized by the first user equipment.

例如,根据区块同步请求包确定出的第一用户设备存储的区块链中高度最高的区块为第40区块,而第二用户设备存储的区块链中高度最高的区块为第80区块,则第一用户设备需要同步的区块为第41-80区块。For example, the block with the highest height in the block chain stored by the first user equipment determined according to the block synchronization request packet is the 40th block, and the block with the highest height in the blockchain stored by the second user equipment is the 40th block. 80 blocks, the blocks to be synchronized by the first user equipment are blocks 41-80.

其中,根据该区块链的状态信息确定第一用户设备存储的区块链中高度最高的区块,具体是根据第一用户设备存储的区块链中高度最高的区块的哈希值,确定对应的区块的过程,这里不再赘述。Wherein, the block with the highest height in the block chain stored by the first user equipment is determined according to the state information of the block chain, specifically according to the hash value of the block with the highest height in the block chain stored by the first user equipment, The process of determining the corresponding block will not be repeated here.

如果第二用户设备存储的区块链中高度最高的区块的高度小于或等于第一用户设备存储的区块链中高度最高的区块的高度,则说明第二用户设备不能为第一用户设备提供区块,此时第二用户设备不会返回同步数据包给第一用户设备。If the height of the block with the highest height in the block chain stored by the second user device is less than or equal to the height of the block with the highest height in the block chain stored by the first user device, it means that the second user device cannot be the first user The device provides blocks, and at this time, the second user equipment does not return a synchronization data packet to the first user equipment.

S307:网络节点接收该同步数据包,并将该同步数据包发送给第一用户设备。S307: The network node receives the synchronization data packet, and sends the synchronization data packet to the first user equipment.

具体地,网络节点根据PIT表中的条目,查找接收该同步数据包对应的区块同步请求包的接口;通过查找到的接口转发同步数据包。Specifically, the network node searches for an interface that receives the block synchronization request packet corresponding to the synchronization data packet according to the entry in the PIT table; forwards the synchronization data packet through the found interface.

在转发完成后,从PIT表中删除对应的条目,避免向第一用户设备重复发送同步数据包。After the forwarding is completed, the corresponding entry is deleted from the PIT table, so as to avoid repeatedly sending the synchronization data packet to the first user equipment.

基于这种转发机制,使得第一用户设备请求同步数据包时,通常能够得到距离最近的用户设备返回的同步数据包,原因如下:由于不同的用户设备与第一用户设备之间的距离可能不同,因而区块同步请求包以及同步数据包的传输的距离均不同,导致返回同步数据包所需时间不同,距离第一用户设备近的用户设备先返回同步数据包,转发该同步数据包的网络节点在转发之后,会将PIT表中对应的条目删除掉,后续其他用户设备返回的同步数据包并不会再转发到第一用户设备。Based on this forwarding mechanism, when the first user equipment requests a synchronization data packet, it can usually obtain the synchronization data packet returned by the nearest user equipment. , so the transmission distances of the block synchronization request packet and the synchronization data packet are different, resulting in different time required to return the synchronization data packet. The user equipment closest to the first user equipment returns the synchronization data packet first, and the network forwarding the synchronization data packet After forwarding, the node will delete the corresponding entry in the PIT table, and subsequent synchronization data packets returned by other user equipment will not be forwarded to the first user equipment.

以图3A所示的网络为例,Alice、Bob、Charles和Dave是网络中的四个用户设备。Alice和Charles已经更新了全网最新的区块,区块高度都达到了80,这两个用户设备都支持同步服务,Bob和Dave目前区块高度为40和0。黑色线段的长度代表两节点实际距离长短。Bob和Dave分别发送带有当前最高区块哈希值的同步请求包到NDN网络中,由于物理距离不同,Alice响应了Bob的请求,具体地,Alice根据同步请求包的命名提取Bob的区块链的状态信息并与自己的区块链比对,发现其缺少从高度41到高度80的所有区块,于是Alice将这些区块打包进同步数据包中返回给Bob。同样地,Charles也将1号到80号区块发送给Dave。由此,Bob和Dave完成了区块同步。Taking the network shown in FIG. 3A as an example, Alice, Bob, Charles and Dave are four user equipments in the network. Alice and Charles have updated the latest block of the whole network, and the block height has reached 80. Both user devices support the synchronization service. Bob and Dave currently have block heights of 40 and 0. The length of the black line represents the actual distance between the two nodes. Bob and Dave respectively send a synchronization request packet with the current highest block hash value to the NDN network. Due to the different physical distance, Alice responds to Bob's request. Specifically, Alice extracts Bob's block according to the name of the synchronization request packet The status information of the chain is compared with its own blockchain, and it is found that it lacks all blocks from height 41 to height 80, so Alice packs these blocks into a synchronization data packet and returns it to Bob. Similarly, Charles also sends blocks 1 to 80 to Dave. Thus, Bob and Dave complete block synchronization.

由于NDN网络中存在多个网络节点,因此,在同步数据包转发的过程中,每个接收到该同步数据包的网络节点均按照步骤S307的方式执行。Since there are multiple network nodes in the NDN network, in the process of forwarding the synchronization data packet, each network node that receives the synchronization data packet executes in the manner of step S307.

S308:第一用户设备接收该同步数据包,并提取同步数据包中的区块存储到区块链数据库。S308: The first user equipment receives the synchronization data packet, and extracts blocks in the synchronization data packet and stores them in the blockchain database.

具体地,第一用户设备提取同步数据包中的区块,然后验证提取到的区块的合法性,如果这些区块的合法性通过验证,则将其存储到区块链数据库中,如果不合法则直接丢弃。Specifically, the first user equipment extracts the blocks in the synchronization data packet, and then verifies the legitimacy of the extracted blocks, if the legitimacy of these blocks is verified, it is stored in the block chain database, if not The rules are discarded directly.

第一用户设备重复执行步骤S301和308,当在步骤S301后的设定时间内没有接收到同步数据包时,说明第一用户设备已经同步了所有区块,则执行步骤S309。The first user equipment repeatedly executes steps S301 and 308, and if no synchronization data packet is received within a set time after step S301, it means that the first user equipment has synchronized all blocks, and then executes step S309.

S309:第一用户设备向网络节点发送区块搜索请求包。S309: The first user equipment sends a block search request packet to the network node.

其中,区块搜索请求包采用兴趣包的格式,用于进行区块搜索。该区块搜索请求包的名称采用具有层次结构化的可变长度标识符作为命名规则,该区块搜索请求包的名称具体可以包括NDN协议标识、应用标识、请求包类型和区块标识,区块标识用于指示用户设备搜索的区块的上一区块的高度,用户设备搜索的区块的上一区块的高度为用户设备存储的区块链中高度最高的区块的高度。例如,区块搜索请求包所要搜索的区块为第40区块,则该区块标识对应第39区块。Among them, the block search request packet adopts the format of the interest packet and is used for block search. The name of the block search request package adopts a hierarchical variable-length identifier as the naming rule. The name of the block search request package can specifically include NDN protocol identification, application identification, request package type and block identification. The block identifier is used to indicate the height of the previous block of the block searched by the user equipment, and the height of the previous block of the block searched by the user equipment is the height of the block with the highest height in the block chain stored by the user equipment. For example, if the block to be searched by the block search request packet is the 40th block, then the block identifier corresponds to the 39th block.

具体地,区块搜索请求包的名称可以如下ndn/<App Name>/blocks/<Block’sDigest>。其其中,ndn/是NDN协议标识;<App Name>为应用标识,例如该<App Name>具体可以为blockndn;blocks为请求包的类型,用于表示该请求包为区块搜索请求包,<Block’sDigest>为区块标识,具体可以是第一用户设备存储的区块链中高度最高的区块的消息摘要,例如第一用户设备存储的区块链中高度最高的区块的哈希值,哈希值的格式如下“000000000000024b89b4…”,该哈希值是高度为0的区块的哈希值,具有该哈希值的区块搜索请求包用于搜索高度为1的区块。Specifically, the name of the block search request package can be as follows: ndn/<App Name>/blocks/<Block’sDigest>. Among them, ndn/ is the NDN protocol identifier; <App Name> is the application identifier, for example, the <App Name> can be specifically blockndn; blocks is the type of request packet, which is used to indicate that the request packet is a block search request packet, < Block'sDigest> is a block identifier, which may specifically be the message digest of the block with the highest height in the blockchain stored by the first user device, for example, the hash of the highest block in the blockchain stored by the first user device Value, the format of the hash value is as follows "000000000000024b89b4...", the hash value is the hash value of the block with a height of 0, and the block search request packet with this hash value is used to search for a block with a height of 1.

进一步地,在步骤S309之前,该方法还包括:Further, before step S309, the method also includes:

生成区块搜索请求包。Generate a block search request packet.

具体地,生成区块搜索请求包的过程如下:第一用户设备确定待搜索的区块,并计算其哈希值;根据该哈希值生成区块搜索请求包。Specifically, the process of generating the block search request packet is as follows: the first user equipment determines the block to be searched, and calculates its hash value; generates the block search request packet according to the hash value.

通常,该用户设备搜索的区块为最新的区块,比如后续步骤S310-S314所指的区块搜索。当然,该区块搜索请求包也可以用于搜索用户设备已有的区块,这样做能够对已有的区块的正确性进行判断,此时区块搜索请求包的发送和搜索数据包的接收过程可以参照前文的区块同步过程。Usually, the block searched by the user equipment is the latest block, such as the block search referred to in the subsequent steps S310-S314. Of course, the block search request packet can also be used to search the existing blocks of the user equipment, so that the correctness of the existing blocks can be judged. At this time, the sending of the block search request packet and the reception of the search data packet The process can refer to the previous block synchronization process.

S310:网络节点接收该区块搜索请求包,在CS中查找该区块搜索请求包对应的搜索数据包。如果在CS中查找到区块搜索请求包对应的搜索数据包时,则执行步骤S311;如果在CS中未查找到区块搜索请求包对应的搜索数据包时,则执行步骤S312。S310: The network node receives the block search request packet, and searches the CS for a search data packet corresponding to the block search request packet. If the search data packet corresponding to the block search request packet is found in the CS, execute step S311; if the search data packet corresponding to the block search request packet is not found in the CS, execute step S312.

步骤S310的详细过程可以参照步骤S302。For the detailed process of step S310, reference may be made to step S302.

S311:网络节点将搜索数据包返回第一用户设备。S311: The network node returns the search data packet to the first user equipment.

由于通常第一用户设备在发送搜索请求包时,网络中还并不存在新的区块(比第一用户的区块链中任一区块的高度更高的区块),所以网络节点内通常也没有存储对应的搜索数据包。Because usually when the first user equipment sends the search request packet, there is no new block (a block with a higher height than any block in the block chain of the first user) in the network, so the network node Usually no corresponding search data packets are stored either.

S312:网络节点在网络节点的PIT中查找区块搜索请求包对应的条目;当网络节点的PIT中未查找到区块搜索请求包对应的条目时,在PIT中添加对应的条目,并执行步骤S313;当网络节点的PIT中查找到区块搜索请求包对应的条目时,在查找到的条目中添加接收区块搜索请求包的接口。S312: the network node searches the PIT of the network node for the entry corresponding to the block search request packet; when the entry corresponding to the block search request packet is not found in the PIT of the network node, add the corresponding entry in the PIT, and perform the step S313: When an entry corresponding to the block search request packet is found in the PIT of the network node, add an interface for receiving the block search request packet to the found entry.

步骤S312的详细过程可以参照步骤S304。For the detailed process of step S312, reference may be made to step S304.

S313:网络节点在FIB表中查询与区块搜索请求包对应的接口,如果查询到与区块搜索请求包对应的接口,则通过确定出的接口转发区块搜索请求包,然后跳转到步骤S317。如果未查找到与区块搜索请求包对应的接口,则将该区块搜索请求包存储起来。S313: The network node queries the interface corresponding to the block search request packet in the FIB table, if the interface corresponding to the block search request packet is found, forwards the block search request packet through the determined interface, and then jumps to step S317. If the interface corresponding to the block search request packet is not found, the block search request packet is stored.

步骤S313的详细过程可以参照步骤S305。For the detailed process of step S313, reference may be made to step S305.

S314:第三用户设备创建新的区块。S314: The third user equipment creates a new block.

具体地,区块链中的每个用户设备都是矿工,即区块生产者,所以每个用户设备都会在更新完后发送区块搜索请求包,也可能在发送区块搜索请求包的同时产生新的区块。Specifically, each user device in the blockchain is a miner, that is, a block producer, so each user device will send a block search request packet after updating, or may send a block search request packet at the same time Generate new blocks.

值得说明的是,这里的第三用户设备可以和第二用户设备为同一用户设备,也可以为不同用户设备。这里的第三用户设备可以和第一用户设备为同一用户设备,如果第三用户设备和第一用户设备为同一用户设备,则在后续过程中不会向第一用户设备返回搜索请求包。It should be noted that the third user equipment here may be the same user equipment as the second user equipment, or may be different user equipment. The third user equipment here may be the same user equipment as the first user equipment. If the third user equipment is the same user equipment as the first user equipment, the search request packet will not be returned to the first user equipment in the subsequent process.

进一步地,该方法还可以包括:第三用户设备将新创建的区块加入本地区块链。Further, the method may further include: adding the newly created block to the local blockchain by the third user equipment.

S315:网络节点更新FIB表,添加对应该新的区块的条目。S315: The network node updates the FIB table, and adds an entry corresponding to the new block.

第三用户设备在创建新的区块后,与第三用户设备属于同一局域网的网络节点根据局域网交互信息,更新自身的FIB表项。具体地,在FIB表中添加对应该新的区块的条目。After the third user equipment creates a new block, the network node belonging to the same local area network as the third user equipment updates its own FIB entry according to the local area network interaction information. Specifically, an entry corresponding to the new block is added in the FIB table.

而网络节点之间根据命名数据链路状态路由协议(Name-data Link StateRouting Protocol,NLSR)来同步各自之间的FIB表。也就是说,NDN中的每个网络节点的FIB表最后都会更新该新的区块的条目。The network nodes synchronize their respective FIB tables according to a Name-data Link State Routing Protocol (NLSR). That is to say, the FIB table of each network node in NDN will finally update the entry of the new block.

对应该新的区块的条目包括与该区块对应的搜索数据包的名字以及对应的转发接口。该区块对应的搜索数据包的名字可以与用于搜索该区块的区块搜索请求包的名字相同。因此,该条目也是与区块搜索请求包对应的条目。The entry corresponding to the new block includes the name of the search data packet corresponding to the block and the corresponding forwarding interface. The name of the search data packet corresponding to the block may be the same as the name of the block search request packet used to search the block. Therefore, this entry is also the entry corresponding to the block search request packet.

S316:网络节点根据更新后的FIB确定与区块搜索请求包对应的接口,通过确定出的接口转发区块搜索请求包。S316: The network node determines the interface corresponding to the block search request packet according to the updated FIB, and forwards the block search request packet through the determined interface.

由于区块搜索请求包的目的在于搜索新创建的区块,而更新后的FIB正好更新了新创建区块的路由条目,因此此时网络节点必然能够确定出与区块搜索请求包对应的接口。Since the purpose of the block search request packet is to search for newly created blocks, and the updated FIB just updates the routing entries of the newly created block, so at this time the network node must be able to determine the interface corresponding to the block search request packet .

步骤S316的详细过程可以参照步骤S305。For the detailed process of step S316, reference may be made to step S305.

S317:第三用户设备生成该区块搜索请求包对应的搜索数据包,并返回搜索数据包。S317: The third user equipment generates a search data packet corresponding to the block search request packet, and returns the search data packet.

具体,第三用户设备接收到该区块搜索请求包,先判断是否能够提供该区块搜索请求包所请求的搜索数据包,能够提供时,生成并返回该区块搜索请求包对应的搜索数据包。Specifically, the third user equipment receives the block search request packet, first judges whether the search data packet requested by the block search request packet can be provided, and if it can be provided, generates and returns the search data corresponding to the block search request packet Bag.

例如,第三用户设备在接收到该区块搜索请求包后,根据该区块搜索请求包中的区块标识,确定第一用户设备搜索的区块;然后,第三用户设备根据自身存储的区块链的高度判断能否提供第一用户设备搜索的区块;如果能提供第一用户设备搜索的区块,则根据第一用户设备搜索的区块生成搜索数据包,并返回给第一用户设备;否则,不向第一用户设备返回搜索数据包。具体地,如果第三用户设备存储的区块链中高度最高的区块的高度小于或等于区块标识对应的区块的高度,则说明第三用户设备不能为第一用户设备提供区块。For example, after receiving the block search request packet, the third user equipment determines the block searched by the first user equipment according to the block identifier in the block search request packet; The height of the blockchain determines whether the block searched by the first user equipment can be provided; if the block searched by the first user equipment can be provided, a search data packet is generated according to the block searched by the first user equipment and returned to the first user equipment. the user equipment; otherwise, the search data packet is not returned to the first user equipment. Specifically, if the height of the block with the highest height in the block chain stored by the third user equipment is less than or equal to the height of the block corresponding to the block identifier, it means that the third user equipment cannot provide the block for the first user equipment.

例如,第三用户设备根据区块搜索请求包确定出的第一用户设备搜索的区块为第81区块,而第三用户设备具有第81区块,则第三用户设备向第一用户设备返回对应的搜索数据包。For example, the block searched by the first user equipment determined by the third user equipment according to the block search request packet is the 81st block, and the third user equipment has the 81st block, then the third user equipment sends the first user equipment Return the corresponding search data packet.

值得说明的是,由于这里的第三用户设备为创建了新区块的用户设备,则此时第三用户设备必然能够提供第一用户设备搜索的新的区块。It is worth noting that since the third user equipment here is a user equipment that has created a new block, at this time the third user equipment must be able to provide the new block searched by the first user equipment.

由于区块链系统内的各个用户设备都会发送区块搜索请求包,所以,该区块搜索数据包返回的过程中,会向区块链系统内的各个用户设备返回,相当于在网络内广播该区块。Since each user device in the blockchain system will send a block search request packet, in the process of returning the block search data packet, it will be returned to each user device in the blockchain system, which is equivalent to broadcasting in the network the block.

S318:网络节点接收该搜索数据包,并将该搜索数据包发送给第一用户设备。S318: The network node receives the search data packet, and sends the search data packet to the first user equipment.

具体地,步骤S318的细节可以参见步骤S307。Specifically, details of step S318 may refer to step S307.

S319:第一用户设备接收该搜索数据包,并提取搜索数据包中的区块存储到区块链数据库。S319: The first user equipment receives the search data packet, and extracts blocks in the search data packet and stores them in the blockchain database.

具体地,第一用户设备提取搜索数据包中的区块,然后验证提取到的区块的合法性,如果这些区块的合法性通过验证,则将其存储到区块链数据库中,如果不合法则直接丢弃。Specifically, the first user equipment extracts the blocks in the search data packet, and then verifies the legitimacy of the extracted blocks, if the legitimacy of these blocks is verified, it is stored in the block chain database, if not The rules are discarded directly.

为了保存区块链的最新状态,第一用户设备需要重复发送区块搜索请求包。具体地,当第一用户设备接收到网络节点返回的搜索数据包时,提取搜索数据包中的区块存储到区块链数据库,然后发送新的区块搜索请求包,新的区块搜索请求包的区块标识与区块搜索请求包的区块标识不同;当在预定时间内未接收到网络节点返回的搜索数据包时,重新发送区块搜索请求包。这里的预定时间可以与前文的设定时间相同,也可以不同。In order to save the latest state of the blockchain, the first user equipment needs to repeatedly send block search request packets. Specifically, when the first user equipment receives the search data packet returned by the network node, it extracts the blocks in the search data packet and stores them in the blockchain database, and then sends a new block search request packet, the new block search request The block identifier of the packet is different from the block identifier of the block search request packet; when the search data packet returned by the network node is not received within a predetermined time, the block search request packet is resent. The predetermined time here may be the same as or different from the aforementioned set time.

这里需要说明的是,虽然网络节点在接收到区块搜索请求包后会将其记录在PIT表中,等到获取到对应的搜索数据包后将其返回给对应的用户设备。但是,由于网络节点可能会定时或周期清除PIT表项,所以第一用户设备如果在预定时间内未接收到网络节点返回的搜索数据包时,可以通过重新发送区块搜索请求包的方式,避免因为网络节点清除PIT表项造成没有接收到搜索数据包的情况。What needs to be explained here is that although the network node will record it in the PIT table after receiving the block search request packet, it will return it to the corresponding user equipment after obtaining the corresponding search data packet. However, since the network node may regularly or periodically clear the PIT entry, if the first user equipment does not receive the search data packet returned by the network node within a predetermined time, it can avoid The search data packet is not received because the network node clears the PIT entry.

如图3B所示,Ailce、Bob和Ted是网络中的三个用户设备,三者都存储着全网当前所有的80个区块,并都同时发送区块搜索请求包以请求第81个区块,区块搜索请求包消息被记录在网络节点(如路由器)的PIT表中,以网络节点C为例,PIT表项中第81区块的区块搜索请求包对应的接口为0,1,2。此时,作为矿工的Ted产生了高度为81的新区块,Ted先向网络内的网络节点广播该区块的区块信息,网络节点根据该区块信息更新FIB,然后按照新的FIB将区块搜索请求包转发到Ted,Ted根据接收到的区块搜索请求包向网络返回搜索数据包,从而实现该区块的广播。网络节点C会根据PIT表项的记录,将数据沿1,2接口转发出去,最终送达至Alice和Bob。As shown in Figure 3B, Ailce, Bob, and Ted are three user devices in the network, all of which store all the current 80 blocks of the entire network, and all send block search request packets to request the 81st block at the same time block, the block search request packet message is recorded in the PIT table of the network node (such as a router), taking network node C as an example, the interface corresponding to the block search request packet of the 81st block in the PIT entry is 0, 1 ,2. At this time, Ted as a miner generates a new block with a height of 81. Ted first broadcasts the block information of the block to the network nodes in the network, and the network nodes update the FIB according to the block information, and then transfer the block The block search request packet is forwarded to Ted, and Ted returns a search data packet to the network according to the received block search request packet, thereby realizing the broadcast of the block. Network node C will forward the data along interfaces 1 and 2 according to the record of the PIT entry, and finally deliver it to Alice and Bob.

本发明实施例提供的基于NDN的区块链同步方法,具有以下优点:第一,在用户设备进行区块广播时,与现有的TCP/IP架构下的区块链实现相比更加简单,原因如下:在TCP/IP架构下为了确保网络节点不会重复接受已经获取了的区块,网络节点间并不直接发送区块,而是由提供者(区块提供方)先发送inv消息给邻居,告知对方自己有哪些区块信息可供下载,邻居节点收到inv消息后,根据inv消息(区块的哈希值)发送getdata消息告知提供者自己需要哪些区块,再由提供者返回blocks消息让邻居用户设备能下载到区块数据;而本发明实施例借助NDN网络架构本身的“消费者驱动”特点,简化了上述步骤,在不需要inv消息的情况下完成广播。同样,NDN下的广播没有TCP/IP网络架构下的那样复杂。第二,使区块链系统真正实现去中心化,系统中没有出现任何超级节点。这对系统的公平性提供了有力的保证。第三,区块链系统基于NDN网络,无论是浏览在线用户设备的同步,还是搜索等功能的实现方法,其过程都不需要再关注IP地址、端口等位置信息。这一特性在很大程度上降低了网络应用开发工作的压力。The NDN-based block chain synchronization method provided by the embodiment of the present invention has the following advantages: First, when the user equipment performs block broadcast, it is simpler than the block chain implementation under the existing TCP/IP architecture, The reason is as follows: In order to ensure that network nodes will not repeatedly accept blocks that have been acquired under the TCP/IP architecture, network nodes do not directly send blocks, but the provider (block provider) first sends an inv message to Neighbor, inform the other party which block information is available for download. After the neighbor node receives the inv message, it sends a getdata message according to the inv message (the hash value of the block) to inform the provider which blocks it needs, and then the provider returns The blocks message allows neighboring user equipment to download block data; and the embodiment of the present invention simplifies the above steps by virtue of the "consumer-driven" feature of the NDN network architecture itself, and completes the broadcast without the need for the inv message. Likewise, broadcast under NDN is not as complicated as under TCP/IP network architecture. Second, to make the blockchain system truly decentralized, there are no super nodes in the system. This provides a strong guarantee for the fairness of the system. Third, the blockchain system is based on the NDN network. Whether it is the synchronization of browsing online user devices or the implementation of functions such as search, the process does not need to pay attention to location information such as IP addresses and ports. This feature greatly reduces the pressure of web application development work.

图4示出了本发明一个实施例提供的基于NDN的区块链同步装置的框图。该基于NDN的区块链同步装置可以通过专用硬件电路,或者,软硬件的结合实现成为用户设备的全部或一部分。该基于NDN的区块链同步装置包括发送单元401和接收单元402。其中,发送单元401用于向网络节点发送区块同步请求包,区块同步请求包的名称包括NDN协议标识、应用标识、请求包类型和区块链的状态信息,区块链的状态信息用于指示用户设备存储的区块链中高度最高的区块的高度;接收单元402用于接收网络节点返回的同步数据包,并提取同步数据包中的区块存储到区块链数据库。Fig. 4 shows a block diagram of an NDN-based block chain synchronization device provided by an embodiment of the present invention. The NDN-based block chain synchronization device can be implemented as all or part of the user equipment through a dedicated hardware circuit, or a combination of software and hardware. The NDN-based blockchain synchronization device includes a sending unit 401 and a receiving unit 402 . Wherein, the sending unit 401 is used to send a block synchronization request packet to the network node. The name of the block synchronization request packet includes the NDN protocol identifier, the application identifier, the request packet type, and the state information of the block chain. The state information of the block chain is used for To indicate the height of the block with the highest height in the block chain stored by the user equipment; the receiving unit 402 is used to receive the synchronization data packet returned by the network node, and extract the block in the synchronization data packet and store it in the block chain database.

相关细节可结合参考图3的方法实施例。Relevant details may be combined with reference to the method embodiment in FIG. 3 .

需要说明的是,上述发送单元401、接收单元402可以由收发器实现,或者处理器配合收发器来实现。It should be noted that the above-mentioned sending unit 401 and receiving unit 402 may be implemented by a transceiver, or implemented by a processor in cooperation with a transceiver.

图5示出了本发明一个实施例提供的基于NDN的区块链同步装置的框图。该基于NDN的区块链同步装置可以通过专用硬件电路,或者,软硬件的结合实现成为网络节点的全部或一部分。装置包括接收单元501、查找单元502、处理单元503和发送单元504。其中,接收单元501用于网络节点接收用户设备发送的区块同步请求包,区块同步请求包的名称包括NDN协议标识、应用标识、请求包类型和区块链的状态信息,区块链的状态信息用于指示用户设备存储的区块链中高度最高的区块的高度;查找单元502用于在网络节点的PIT中查找区块同步请求包对应的条目;处理单元503用于当网络节点的PIT中未查找到区块同步请求包对应的条目时,在PIT中添加对应的条目,并在FIB表中查询与区块同步请求包对应的接口;当网络节点的PIT中查找到区块同步请求包对应的条目时,在查找到的条目中添加接收区块同步请求包的接口;发送单元504用于通过确定出的接口转发区块同步请求包;发送单元504还用于当接收到区块同步请求包对应的搜索数据包时,根据PIT中的条目转发搜索数据包。Fig. 5 shows a block diagram of an NDN-based block chain synchronization device provided by an embodiment of the present invention. The NDN-based block chain synchronization device can be implemented as all or part of the network nodes through a dedicated hardware circuit, or a combination of software and hardware. The device includes a receiving unit 501 , a searching unit 502 , a processing unit 503 and a sending unit 504 . Wherein, the receiving unit 501 is used for the network node to receive the block synchronization request packet sent by the user equipment. The name of the block synchronization request packet includes the NDN protocol identifier, the application identifier, the request packet type, and the status information of the block chain. The status information is used to indicate the height of the block with the highest height in the block chain stored by the user equipment; the search unit 502 is used to search for the entry corresponding to the block synchronization request packet in the PIT of the network node; the processing unit 503 is used to when the network node When the entry corresponding to the block synchronization request packet is not found in the PIT of the network node, add the corresponding entry in the PIT, and query the interface corresponding to the block synchronization request packet in the FIB table; when the block is found in the PIT of the network node When synchronizing the entry corresponding to the request packet, add an interface for receiving the block synchronization request packet to the found entry; the sending unit 504 is used to forward the block synchronization request packet through the determined interface; the sending unit 504 is also used to receive the block synchronization request packet when receiving When the search data packet corresponding to the block synchronization request packet is forwarded, the search data packet is forwarded according to the entries in the PIT.

相关细节可结合参考图3的方法实施例。Relevant details may be combined with reference to the method embodiment in FIG. 3 .

需要说明的是,上述查找单元502和处理单元503可以由处理器实现或者,处理器执行存储器中的程序指令来实现,上述接收单元501、发送单元504可以由通信接口实现,或者处理器配合通信接口来实现。It should be noted that the above search unit 502 and the processing unit 503 can be implemented by a processor or the processor executes program instructions in the memory, and the above receiving unit 501 and sending unit 504 can be implemented by a communication interface, or the processor cooperates with the communication interface to achieve.

以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection of the present invention. within range.

Claims (16)

1. a kind of block chain synchronous method based on name data network, which is characterized in that the described method includes:
User equipment sends block synchronization request packet to network node, and the title of the block synchronization request packet includes name data Network protocol mark, application identities, the status information for requesting Packet type and block chain, the status information of the block chain is for referring to Show the height of the highest block of height in the block chain of the user equipment storage;
The synchronization packets that the network node returns are received, and extract the storage of the block in the synchronization packets to block chain Database.
2. being asked the method according to claim 1, wherein the user equipment is synchronized to network node transmission block Seek packet, comprising:
It determines the highest block of height in the block chain of storage, and calculates its cryptographic Hash;Height in the block chain is highest Status information of the cryptographic Hash of block as the block chain, generates the block synchronization request packet;The block is synchronized and is asked Packet is asked to be sent to the network node.
3. method according to claim 1 or 2, which is characterized in that the method also includes:
When the synchronization packets are not received in the setting time after user equipment sends the synchronization request packet When, Xiang Suoshu network node sends block search request packet, and the title of the block search request packet includes name data network Protocol-identifier, application identities, request Packet type and block-identified, it is described block-identified to be used to indicate the user equipment searches The height of a upper block for block, the height of a upper block for the block of the user equipment searches are user equipment storage Block chain in the highest block of height height;
When receiving the search data packet that the network node returns, the block extracted in described search data packet is stored to area Block chain database, then sends new block search request packet, the new block search request packet it is block-identified with it is described The block-identified difference of block search request packet;When the search data for not receiving the network node return in the given time Bao Shi retransmits the block search request packet.
4. method according to claim 1 or 2, which is characterized in that the method also includes:
Receive the block synchronization request packet that another user equipment that the network node is sent is sent;
The status information of the block chain in block synchronization request packet sent according to another user equipment, determines described another The height of the highest block of height in the block chain of user equipment storage;
Compare the height of the highest block of height and the user in the block chain for another user equipment storage determined The height of the highest block of height in the block chain of equipment storage determines that another user equipment needs synchronous block;
It needs synchronous block to generate synchronization packets according to another user equipment, and returns to another user and set It is standby.
5. method according to claim 1 or 2, which is characterized in that the method also includes:
When the user equipment successfully creates block, the network node into network broadcasts the information of the block;
The block search request packet that network node is sent is received, the block search request packet is for requesting the user equipment new The block of creation;
Searching request packet is sent to the network node, described search data packet includes the newly created block of the user equipment.
6. a kind of block chain synchronous method based on name data network, which is characterized in that the described method includes:
Network node receives the block synchronization request packet that user equipment is sent, and the title of the block synchronization request packet includes name The status information of data network protocol mark, application identities, the status information for requesting Packet type and block chain, the block chain is used The height of the highest block of height in the block chain for indicating the user equipment storage;
The corresponding synchronization packets of the block synchronization request packet are searched in content store, the synchronization packets include institute State the block that user equipment does not update;
When finding the corresponding synchronization packets of the block synchronization request packet in the content store, by the synchronization Data packet returns to the user equipment;It is corresponding same when not finding the block synchronization request packet in the content store When step data packet, the corresponding entry of the block synchronization request packet is searched in the interest table undetermined of the network node;
When not finding the corresponding entry of the block synchronization request packet in the interest table undetermined of the network node, undetermined Corresponding entry is added in interest table, and inquires interface corresponding with the block synchronization request packet in forwarding information table, is led to It crosses the interface determined and forwards the block synchronization request packet;When finding the area in the interest table undetermined of the network node When the corresponding entry of block synchronization request packet, addition receives the interface of the block synchronization request packet in the entry found;
When receiving the corresponding synchronization packets of the block synchronization request packet, turned according to the entry in the interest table undetermined Send out synchronization packets described.
7. according to the method described in claim 6, it is characterized in that, the method also includes:
The block search request packet that the user equipment is sent is received, the title of the block search request packet includes name data Network protocol mark, application identities, request Packet type and block-identified, it is described block-identified to be used to indicate the user equipment and search The height of a upper block for the block of rope;
The corresponding search data packet of the block search request packet is searched in content store, described search data packet includes institute State the block of user equipment searches;
When finding the corresponding search data packet of the block search request packet in the content store, by described search Data packet returns to the user equipment;When not finding in the content store, the block search request packet is corresponding to be searched When rope data packet, the corresponding entry of the block search request packet is searched in the interest table undetermined of the network node;
When not finding the corresponding entry of the block search request packet in the interest table undetermined of the network node, undetermined Corresponding entry is added in interest table, and inquires interface corresponding with the block search request packet in forwarding information table, is led to It crosses the interface determined and forwards the block search request packet;When finding the area in the interest table undetermined of the network node When the corresponding entry of block search request packet, addition receives the interface of the block search request packet in the entry found;
When receiving the corresponding search data packet of the block search request packet, turned according to the entry in the interest table undetermined Send out described search data packet.
8. the method according to the description of claim 7 is characterized in that the method also includes:
When not inquiring interface corresponding with the block search request packet in the forwarding information table, the block is stored Searching request packet;
It when the forwarding information table of the network node is updated, and include the block in the updated forwarding information table When the corresponding entry of searching request packet, interface corresponding with the block search request packet is inquired in forwarding information table;
The block search request packet is forwarded by the interface determined.
9. a kind of block chain synchronizing device based on name data network, which is characterized in that described device includes:
Transmission unit, for sending block synchronization request packet to network node, the title of the block synchronization request packet includes life Name data network protocol mark, application identities, the status information for requesting Packet type and block chain, the status information of the block chain It is used to indicate the height of the highest block of height in the block chain of user equipment storage;
Receiving unit, the synchronization packets returned for receiving the network node, and extract the area in the synchronization packets Block is stored to block chain database.
10. device according to claim 9, which is characterized in that described device further include:
Processing unit for determining the highest block of height in the block chain stored, and calculates its cryptographic Hash;By the block chain Status information of the cryptographic Hash of the middle highest block of height as the block chain, generates the block synchronization request packet.
11. device according to claim 9 or 10, which is characterized in that the transmission unit is also used to when in the user Equipment is sent when not receiving the synchronization packets in the setting time after the synchronization request packet, Xiang Suoshu network node Send block search request packet, the title of the block search request packet include name data network protocol mark, application identities, Request Packet type and block-identified, the height of a upper block for the block-identified block for being used to indicate the user equipment searches Degree, the height of a upper block for the block of the user equipment searches are height highest in the block chain of user equipment storage Block height;
The receiving unit is also used to extract described search number when receiving the search data packet that the network node returns According to the block storage in packet to block chain database;
The transmission unit is also used to after receiving the search data packet that the network node returns, sends new block and search Rope request packet, the block-identified difference of the block-identified and block search request packet of the new block search request packet; When not receiving the search data packet that the network node returns in the given time, the block search request is retransmitted Packet.
12. device according to claim 10, which is characterized in that the receiving unit is also used to receive the network section The block synchronization request packet that another user equipment that point is sent is sent;
The processing unit, the shape for the block chain in block synchronization request packet for being also used to be sent according to another user equipment State information determines the height of the highest block of height in the block chain of another user equipment storage;Compare the institute determined It states in the block chain of another user equipment storage in the height of the highest block of height and the block chain of user equipment storage The height of highly highest block determines that another user equipment needs synchronous block;According to another user equipment Synchronous block is needed to generate synchronization packets;
The transmission unit is also used to returning to the synchronization packets into another user equipment.
13. device according to claim 9 or 10, which is characterized in that the transmission unit is also used to set as the user For when successfully creating block, the network node into network broadcasts the information of the block;
The receiving unit, is also used to receive the block search request packet of network node transmission, and the block search request packet is used In the request newly created block of user equipment;
The transmission unit is also used to send searching request packet to the network node, and described search data packet includes the use The newly created block of family equipment.
14. a kind of block chain synchronizing device based on name data network, which is characterized in that described device includes:
Receiving unit receives the block synchronization request packet that user equipment is sent, the block synchronization request packet for network node Title include name data network protocol mark, application identities, request Packet type and block chain status information, the block The status information of chain is used to indicate the height of the highest block of height in the block chain of the user equipment storage;
Searching unit, it is described same for searching the corresponding synchronization packets of the block synchronization request packet in content store Step data packet includes the block that the user equipment does not update;
Transmission unit finds the corresponding synchronization packets of the block synchronization request packet for working as in the content store When, the synchronization packets are returned into the user equipment;
The searching unit is also used to corresponding same when not finding the block synchronization request packet in the content store When step data packet, the corresponding entry of the block synchronization request packet is searched in the interest table undetermined of the network node;
Processing unit, for corresponding when not finding the block synchronization request packet in the interest table undetermined of the network node When entry, corresponding entry is added in interest table undetermined, and inquiry and the block synchronization request packet in forwarding information table Corresponding interface;When finding the corresponding entry of the block synchronization request packet in the interest table undetermined of the network node, Addition receives the interface of the block synchronization request packet in the entry found;
The transmission unit is also used to forward the block synchronization request packet by the interface determined;
The transmission unit is also used to when receiving the corresponding synchronization packets of the block synchronization request packet, according to described Entry in interest table undetermined forwards the synchronization packets.
15. device according to claim 14, which is characterized in that the receiving unit is also used to receive the user and sets The block search request packet that preparation is sent, the title of the block search request packet include name data network protocol mark, application Mark, request Packet type and block-identified, block-identified mono- area block Shang for being used to indicate the user equipment searches The height of block;
The searching unit is also used to search the corresponding search data packet of the block search request packet in content store, Described search data packet includes the block of the user equipment searches;
The searching unit is also used to that the corresponding search of the block search request packet ought be found in the content store When data packet, described search data packet is returned into the user equipment;
The processing unit, is also used to when not finding in the content store that the block search request packet is corresponding to search When rope data packet, the corresponding entry of the block search request packet is searched in the interest table undetermined of the network node;Work as institute It states when not finding the corresponding entry of the block search request packet in the interest table undetermined of network node, in interest table undetermined Corresponding entry is added, and inquires interface corresponding with the block search request packet in forwarding information table;When the network When finding the corresponding entry of the block search request packet in the interest table undetermined of node, adds and connect in the entry found Receive the interface of the block search request packet;
The transmission unit is also used to forward the block search request packet by the interface determined;
The transmission unit is also used to when receiving the corresponding search data packet of the block search request packet, according to described Entry in interest table undetermined forwards described search data packet.
16. device according to claim 15, which is characterized in that the processing unit is also used to believe when in the forwarding When not inquiring interface corresponding with the block search request packet in breath table, the block search request packet is stored;
The processing unit is also used to be updated when the forwarding information table of the network node, and the updated forwarding In information table when entry corresponding including the block search request packet, inquires in forwarding information table and asked with the block search Seek the corresponding interface of packet;
The transmission unit is also used to forward the block search request packet by the interface determined.
CN201710400368.0A 2017-05-31 2017-05-31 NDN-based blockchain synchronization method and device Active CN107317842B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710400368.0A CN107317842B (en) 2017-05-31 2017-05-31 NDN-based blockchain synchronization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710400368.0A CN107317842B (en) 2017-05-31 2017-05-31 NDN-based blockchain synchronization method and device

Publications (2)

Publication Number Publication Date
CN107317842A CN107317842A (en) 2017-11-03
CN107317842B true CN107317842B (en) 2019-11-22

Family

ID=60182198

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710400368.0A Active CN107317842B (en) 2017-05-31 2017-05-31 NDN-based blockchain synchronization method and device

Country Status (1)

Country Link
CN (1) CN107317842B (en)

Families Citing this family (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108494812B (en) * 2018-01-22 2020-03-13 北京工业大学 NDN network communication method supporting block chain service
CN108600353B (en) * 2018-04-12 2021-01-12 北京天德科技有限公司 Parallel block synchronization method of block chain nodes
CN108696589B (en) * 2018-05-14 2022-04-08 百度在线网络技术(北京)有限公司 Block chain data transmission method, device, equipment and storage medium
CN110378694B (en) * 2018-05-21 2021-01-12 腾讯科技(深圳)有限公司 Block chain data processing method and device, computer equipment and storage medium
CN109165229B (en) * 2018-08-23 2020-06-05 京东数字科技控股有限公司 Method, device, equipment and storage medium for checking local block synchronization
CN109410049A (en) * 2018-09-18 2019-03-01 深圳周百通科技有限公司 Block chain bookkeeping methods, device, computer equipment and storage medium
CN109274754B (en) * 2018-10-11 2021-05-04 上海保险交易所股份有限公司 Method, apparatus, and storage medium for synchronizing data in a blockchain network
CN109474675A (en) * 2018-10-18 2019-03-15 尚维斯 A kind of block height split blade type date storage method based on block chain
CN113169879A (en) 2018-11-27 2021-07-23 区块链控股有限公司 Computer-implemented system and method for storing data on a blockchain
CN109714412B (en) * 2018-12-25 2021-08-10 深圳前海微众银行股份有限公司 Block synchronization method, device, equipment and computer readable storage medium
CN110072196B (en) * 2019-03-29 2020-09-29 中国科学院计算技术研究所 Communication method and system for providing block chain oriented application for named data network
CN110096505B (en) * 2019-03-31 2021-05-11 杭州复杂美科技有限公司 Data storage method, system, equipment and storage medium
CN109977274B (en) * 2019-03-31 2021-05-11 杭州复杂美科技有限公司 Data query and verification method, system, equipment and storage medium
CN110113408B (en) * 2019-04-30 2020-08-14 杭州复杂美科技有限公司 Block synchronization method, equipment and storage medium
CN110401637B (en) * 2019-06-28 2021-03-02 中南民族大学 Name-based trust method in named data network
CN110688426B (en) * 2019-08-21 2021-12-10 北京邮电大学 Second-level heartbeat synchronization method for block chain big database
CN111212139A (en) * 2020-01-02 2020-05-29 支付宝(杭州)信息技术有限公司 Method and device for updating trust node information
EP3876129B1 (en) 2020-03-04 2024-04-03 Nokia Solutions and Networks Oy Integrity for mobile network data storage
CN111565175B (en) * 2020-04-22 2022-04-05 辽宁大学 IOTA-based flat named data network security defense method
CN111984733A (en) * 2020-09-03 2020-11-24 深圳壹账通智能科技有限公司 Blockchain-based data transmission method, device and storage medium
US12040975B2 (en) 2020-11-06 2024-07-16 Electronics And Telecommunications Research Institute Method and apparatus for blockchain based on information-centric networking
CN112383610B (en) * 2020-11-11 2022-12-09 上海保险交易所股份有限公司 Synchronous processing method and system for block chain state data
CN112579301B (en) * 2020-12-28 2022-07-01 北京理工大学 A data transmission method for P2P distributed machine learning training system based on NDN
CN113037852B (en) * 2021-03-22 2022-08-09 中国人民银行数字货币研究所 Block chain link point synchronization method and device
CN113364847B (en) * 2021-05-31 2022-07-19 新疆大学 Data synchronization method and device of block chain nodes and storage medium
CN113328952B (en) * 2021-05-31 2022-06-07 北京工业大学 A NDN-based blockchain data transmission method
CN113765707B (en) * 2021-08-18 2022-10-28 北京工业大学 NDN-based block chain network service quality guarantee method
CN114048517B (en) * 2022-01-14 2022-05-20 北京大学深圳研究生院 Dual channel consensus system and method for blockchains, computer readable storage medium
CN115297009B (en) * 2022-07-08 2023-11-17 中电信数智科技有限公司 Digital encryption consistency optimization method based on blockchain distributed network
CN115460255B (en) * 2022-09-23 2024-03-29 电子科技大学 A named data network system based on blockchain
CN115495531B (en) * 2022-11-17 2023-03-24 山东区块链研究院 Block chain data synchronization method and system based on check point

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103118013A (en) * 2013-01-16 2013-05-22 西安电子科技大学 Method of sending data package and incidentally sending reverse interest package in content center network
CN103457999A (en) * 2013-08-06 2013-12-18 北京大学深圳研究生院 P2P document transmission method based on NDN network architecture
CN106157142A (en) * 2016-06-30 2016-11-23 惠众商务顾问(北京)有限公司 A kind of block chain common recognition and synchronous method, system and device
CN106649632A (en) * 2016-12-07 2017-05-10 北京众享比特科技有限公司 Data synchronism method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103118013A (en) * 2013-01-16 2013-05-22 西安电子科技大学 Method of sending data package and incidentally sending reverse interest package in content center network
CN103457999A (en) * 2013-08-06 2013-12-18 北京大学深圳研究生院 P2P document transmission method based on NDN network architecture
CN106157142A (en) * 2016-06-30 2016-11-23 惠众商务顾问(北京)有限公司 A kind of block chain common recognition and synchronous method, system and device
CN106649632A (en) * 2016-12-07 2017-05-10 北京众享比特科技有限公司 Data synchronism method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"命名数据网络下的移动性支持和数据同步应用";周子健;《中国优秀硕士学位论文全文数据库信息科技辑》;20150915;全文 *
Nikos Fotiou;George C. Polyzos."Decentralized name-based security for content distribution using blockchains".《2016 IEEE Conference on Computer Communications Workshops (INFOCOM WKSHPS)》.2016, *

Also Published As

Publication number Publication date
CN107317842A (en) 2017-11-03

Similar Documents

Publication Publication Date Title
CN107317842B (en) NDN-based blockchain synchronization method and device
CN103873451B (en) A kind of method, apparatus and system of data syn-chronization
CN110489486B (en) Method, seed node and medium for generating block chain network
CN103457999B (en) A kind of P2P document transmission method based on the NDN network architecture
CN112235420B (en) Data synchronization method, system and related equipment based on block chain
CN101257670A (en) Method, device and system for mobile phone file search and download
TW200818811A (en) Inter-proximity communication within a rendezvous federation
US8903972B2 (en) Method and apparatus for sharing contents using information of group change in content oriented network environment
Ariefianto et al. Routing in NDN network: A survey and future perspectives
CN109818993A (en) An efficient blockchain consensus and exchange system
WO2010124543A1 (en) Method and apparatus for realizing number portability in short message system
KR101798402B1 (en) A communication method and an apparatus for contents requester and contents provider in a network based on a hierarchical name structure
Zhang et al. Partialsync: Efficient synchronization of a partial namespace in ndn
US9462057B2 (en) Location-based content-centric networking method
CN110460526B (en) Communication method for content-oriented networking data acquisition and distribution of Internet of things
CN110072196B (en) Communication method and system for providing block chain oriented application for named data network
CN115811515A (en) File access method and system based on fragments under edge cloud environment
CN103731454B (en) Method for responding to request in point-to-point network and server system
KR101598577B1 (en) Publishing using hash - Subscription network configuration method and communication support method
CN107317754B (en) NDN mapping table update method and device, NDN interest packet forwarding method and device, and NDN
CN106970965A (en) A kind of Novel Internet resource search method
CN101222410A (en) Neighborhood-resource discovering method, device and system
CN115580404B (en) Data transmission method, device, computer readable medium and electronic device
Ashraf et al. Dynamic naming scheme and lookup method based on trie for vehicular named data network
CN101222507B (en) Method, device and system for mobile communication in network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant