CN107317842A - Block chain synchronous method and device based on NDN - Google Patents

Block chain synchronous method and device based on NDN Download PDF

Info

Publication number
CN107317842A
CN107317842A CN201710400368.0A CN201710400368A CN107317842A CN 107317842 A CN107317842 A CN 107317842A CN 201710400368 A CN201710400368 A CN 201710400368A CN 107317842 A CN107317842 A CN 107317842A
Authority
CN
China
Prior art keywords
block
request bag
user equipment
network node
search
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.)
Granted
Application number
CN201710400368.0A
Other languages
Chinese (zh)
Other versions
CN107317842B (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

Abstract

The invention discloses a kind of block chain synchronous method and device based on NDN, belong to communication technical field.Methods described includes:User equipment sends block synchronization request bag to network node, the title of the block synchronization request bag includes the status information of name data network protocol mark, application identities, request Packet type and block chain, and the status information of the block chain is used to indicating the height of height highest block in the block chain that the user equipment is stored;The synchronization packets that the network node is returned are received, and extract the storage of the block in the synchronization packets and arrive block chain database.The synchronous method is a kind of block catenary system communication implementation method based on NDN, it is possible to reduce Internet traffic, reduces transmission delay, and improve data transmission efficiency.

Description

Block chain synchronous method and device based on NDN
Technical field
It is more particularly to a kind of based on name data network (Named Data the present invention relates to communication technical field Networking, NDN) block chain synchronous method and device.
Background technology
Block chain (blockchain) system is a kind of decentralization, not modifiable shared distributed intelligence data Storehouse.Block chain is born in bit coin earliest, is a kind of chain for being sequentially in time combined into block in the way of being sequentially connected Formula data structure, technical support is provided for bit coin system.Wherein, namely one data block of each block, each data The information of a bit coin network trading is contained in block, for verifying the validity (false proof) of its information and generating next area Block.
In block catenary system, user equipment is produced after new block, and block is broadcasted.Other use in network Family equipment can verify its legitimacy after block is received;If by checking, the block is added local block by user equipment In chain.So, each user equipment stores a block chain, if system operation is correct, the block chain of these user equipmenies It is just as.
At present, block catenary system is based primarily upon transmission control protocol/Internet Protocol (Transmission Control Protocol/Internet Protocol, TCP/IP) network architecture, the block chain based on the TCP/IP network architectures System generally existing problems with:
(1) complete decentralization demand can not be realized.Because business needs, there are many block catenary systems to have decentralization Demand.Such as one of most ripe project at present, bit coin is the pure peer-to-peer network of a complete decentralization in theory Network (Peer to Peer, P2P) system.But in practical implementations, it is contemplated that the difficulty of communication, developer adds in systems Super node, distributes Various types of data for the user equipment to request connection.The setting of super node, adds the peace of bit coin Full blast danger, because super node can join together to user equipment tissue fraudulent activities.Meanwhile, this framework also results in super The load excessive of level node, presence service quality can not improve the problem of being collapsed with single-point.
(2) it is difficult to download function nearby.According to design, certain customers' equipment of block catenary system can store current system The newest block chain of system, when there is new user equipment requests to obtain block chain, they can return to corresponding data, but such as What allows new user equipment to obtain block chain from the block chain that is stored with newest and closest user equipment, always It is the problem of block chain based on the TCP/IP network architectures is present.
The content of the invention
In order to solve the problem of block chain technology is present in the prior art, NDN is based on the embodiments of the invention provide one kind Block chain synchronous method and device.
In a first aspect, the embodiments of the invention provide a kind of block chain synchronous method based on name data network, it is described Method includes:User equipment sends block synchronization request bag to network node, and the title of the block synchronization request bag includes life Name data network protocol mark, application identities, the status information for asking Packet type and block chain, the status information of the block chain The height of height highest block in block chain for indicating the user equipment storage;Receive what the network node was returned Synchronization packets, and the storage of the block in the synchronization packets is extracted to block chain database.
Block is synchronous by being carried out based on name data network for the embodiment of the present invention, because it is based on name data network Block chain framework, it is not necessary to which super node is being set, it is to avoid the problem of setting super node is brought;Meanwhile, in name number According in network, block synchronization request bag can be forwarded to multiple other users equipment simultaneously in repeating process, and away from Corresponding packet can be returned at first from nearest user equipment, it is achieved thereby that the download nearby of block;In addition, name data Network node in network can search the content store of oneself when receiving block synchronization request bag, and will be corresponding Packet is supplied to user equipment, and the multiplexing of data is realized using the content store of network node, data transfer is reduced Amount and transmission delay.
In a kind of implementation of the embodiment of the present invention, the user equipment sends block synchronization request to network node Bag, including:It is determined that height highest block in the block chain of storage, and calculate its cryptographic Hash;By height in the block chain most The cryptographic Hash of high block generates the block synchronization request bag as the status information of the block chain;The block is same Step request bag is sent to the network node.
In the implementation, the block chain is used as using the cryptographic Hash of height highest block in the block chain of storage Status information, convenience of calculation.
In another implementation of the embodiment of the present invention, methods described also includes:Sent when in the user equipment When not receiving the synchronization packets in the setting time after the synchronization request bag, block is sent to the network node Searching request bag, the title of the block search request bag includes name data network protocol mark, application identities, request bag class Type and block-identified, the block-identified height for being used to indicate a upper block for the block of the user equipment searches, it is described The height of a upper block for the block of user equipment searches is height highest block in the block chain that the user equipment is stored Height;When receiving the search packet that the network node is returned, the block storage in the search packet is extracted To block chain database, then send new block search request bag, the new block search request bag it is block-identified with The block-identified difference of the block search request bag;When the search for not receiving the network node return in the given time During packet, the block search request bag is resend.
In another implementation of the embodiment of the present invention, methods described also includes:Receive the another of network node transmission The block synchronization request bag that one user equipment is sent;Area in the block synchronization request bag sent according to another user equipment The status information of block chain, determines the height of height highest block in the block chain of another user equipment storage;Compare really The height and the user equipment of height highest block are stored in the block chain for another user equipment storage made The height of height highest block in block chain, determines that another user equipment needs synchronous block;According to described another User equipment needs synchronous block generation synchronization packets, and returns to another user equipment.
In another implementation of the embodiment of the present invention, methods described also includes:When the user equipment is successfully created When building block, the network node into network broadcasts the information of the block;Receive the block search request that network node is sent Bag, the block search request bag is used to ask the block that the user equipment is newly created;Send and search for the network node Request bag, the search packet includes the block that the user equipment is newly created.
Second aspect, the embodiment of the present invention additionally provides a kind of block chain synchronous method based on name data network, institute The method of stating includes:Network node receives the block synchronization request bag that user equipment is sent, the title of the block synchronization request bag Include the status information of name data network protocol mark, application identities, request Packet type and block chain, the shape of the block chain The height of height highest block in block chain of the state information for indicating the user equipment storage;Looked into content store The corresponding synchronization packets of the block synchronization request bag are looked for, the synchronization packets include the area that the user equipment does not update Block;When finding the corresponding synchronization packets of the block synchronization request bag in the content store, by the synchronization Packet returns to the user equipment;It is corresponding same when not finding the block synchronization request bag in the content store During step data bag, the corresponding entry of the block synchronization request bag is searched in the interest table undetermined of the network node;Work as institute When not finding the corresponding entry of the block synchronization request bag in the interest table undetermined for stating network node, in interest table undetermined Corresponding entry is added, and interface corresponding with the block synchronization request bag is inquired about in forwarding information table, by determining Interface forward the block synchronization request bag;Synchronously please when finding the block in the interest table undetermined of the network node When seeking the corresponding entry of bag, addition receives the interface of the block synchronization request bag in the entry found;When receiving When stating the corresponding synchronization packets of block synchronization request bag, the entry in the interest table undetermined forwards the synchrodata Bag.
Block is synchronous by being carried out based on name data network for the embodiment of the present invention, because it is based on name data network Block chain framework, it is not necessary to which super node is being set, it is to avoid the problem of setting super node is brought;Meanwhile, in name number According in network, block synchronization request bag can be forwarded to multiple other users equipment simultaneously in repeating process, and away from Corresponding packet can be returned at first from nearest user equipment, it is achieved thereby that the download nearby of block;In addition, network node When receiving block synchronization request bag, the content store of oneself can be searched, and corresponding packet is supplied to user Equipment, the multiplexing of data is realized using the content store of network node, reduces volume of transmitted data and transmission delay.
In a kind of implementation of the embodiment of the present invention, methods described also includes:Receive the block that user equipment is sent Searching request bag, the title of the block search request bag includes name data network protocol mark, application identities, request bag class Type and block-identified, the block-identified height for being used to indicate a upper block for the block of the user equipment searches;Inside Hold in thesaurus and search the corresponding search packet of the block search request bag, the search packet is set including the user The block of standby search;When found in the content store block search request bag it is corresponding search packet when, The search packet is returned into the user equipment;Asked when not finding the block search in the content store During the corresponding search packet of bag, it is corresponding in the interest table undetermined of the network node to search the block search request bag Entry;When not finding the corresponding entry of the block search request bag in the interest table undetermined of the network node, treating Corresponding entry, and the inquiry interface corresponding with the block search request bag in forwarding information table are added in the interest table of Dingxing, The block search request bag is forwarded by the interface determined;It is described when being found in the interest table undetermined of the network node During the corresponding entry of block search request bag, addition receives the interface of the block search request bag in the entry found; When receive the block search request bag it is corresponding search packet when, in the interest table undetermined entry forwarding institute State search packet.
In the implementation, network node is when receiving block search request bag, and the content that can search oneself is deposited Bank, and corresponding packet is supplied to user equipment, the multiplexing of data is realized using the content store of network node, Reduce volume of transmitted data and transmission delay.
In another implementation of the embodiment of the present invention, methods described also includes:When in the forwarding information table When not inquiring interface corresponding with the block search request bag, the block search request bag is stored;When the network section The forwarding information table of point is updated, and to include the block search request bag corresponding for the forwarding information table after updating During entry, interface corresponding with the block search request bag is inquired about in forwarding information table;Forwarded by the interface determined The block search request bag.
In the implementation, user equipment does not produce the block also when carrying out the search of new block in usual system, So having to wait for thering is user to generate the block in system and broadcasting block information, then updated and turned according to the block information After photos and sending messages table, the forwarding of block search request bag can be realized and the return of packet is searched for.
The third aspect, it is described the embodiments of the invention provide a kind of block chain sychronisation based on name data network Device includes the unit for being used to realize the method described in first aspect, such as transmitting element and receiving unit.
Fourth aspect, it is described the embodiments of the invention provide a kind of block chain sychronisation based on name data network Device includes the unit for being used to realize the method described in second aspect, such as receiving unit, searching unit, processing unit and transmission Unit.
5th aspect, the embodiment of the present invention additionally provides a kind of block chain sychronisation based on name data network, institute Stating device includes:Memory, the processor being connected with memory, transceiver, the memory be used for store software program and Module, when the processor is used to running or performing the software program being stored in the memory and module, can hold Method described in any implementation of row first aspect.
6th aspect, the embodiment of the present invention additionally provides a kind of block chain sychronisation based on name data network, institute Stating device includes:Memory, the processor being connected with memory, transceiver, the memory be used for store software program and Module, when the processor is used to running or performing the software program being stored in the memory and module, can hold Method described in any implementation of row second aspect.
7th aspect, the embodiment of the present invention is additionally provided deposits in a kind of computer-readable recording medium, the storage medium At least one instruction is contained, the instruction is loaded as processor and performed to realize as described in any implementation of first aspect Block chain synchronous method based on name data network.
Eighth aspect, the embodiment of the present invention is additionally provided deposits in a kind of computer-readable recording medium, the storage medium At least one instruction is contained, the instruction is loaded as processor and performed to realize as described in any implementation of second aspect Block chain synchronous method based on name data network.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, makes required in being described below to embodiment Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings Accompanying drawing.
Fig. 1 is a kind of NDN provided in an embodiment of the present invention network architecture schematic diagram;
Fig. 2A is a kind of hardware structure diagram of block chain sychronisation based on NDN provided in an embodiment of the present invention;
Fig. 2 B are a kind of hardware structure diagrams of block chain sychronisation based on NDN provided in an embodiment of the present invention;
Fig. 3 is a kind of flow chart of the block chain synchronous method based on NDN provided in an embodiment of the present invention;
Fig. 3 A are a kind of application scenario diagram of the block chain synchronous method based on NDN provided in an embodiment of the present invention;
Fig. 3 B are a kind of application scenario diagram of the block chain synchronous method based on NDN provided in an embodiment of the present invention;
Fig. 4 is a kind of structural representation of the block chain sychronisation based on NDN provided in an embodiment of the present invention;
Fig. 5 is a kind of structural representation of the block chain sychronisation based on NDN provided in an embodiment of the present invention.
Embodiment
Refer to store the program that can realize some functions or instruction in memory in " module " being mentioned above; " unit " mentioned in this article refers to the functional structure logically divided, and being somebody's turn to do " unit " can be realized by pure hardware, or, Software and hardware is implemented in combination with.
In order to solve the problems of existing block chain scheme based on TCP/IP frameworks, the embodiments of the invention provide A kind of block chain implementation based on NDN, specifically includes the block chain synchronous method based on NDN and the block chain based on NDN Sychronisation.In order to make it easy to understand, existing below simply introduced first NDN.
Fig. 1 shows a kind of NDN provided in an embodiment of the present invention network architecture.As shown in figure 1, the NDN 100 includes Multiple network nodes 101 (including network node A-E), user equipment 102 is connected with network node 101, and the user equipment 102 was both It is the producer in NDN, is also the consumer in NDN.Wherein, consumer is the request of data side for sending interest bag, the producer It is the data providing with packet.
The user equipment 102 is terminal device, can be specifically computer, server, mobile terminal etc..
Network node 101 in NDN preserves three data structures:Forwarding information table (Forwarding Information Base, FIB), interest table undetermined (Pending Interest Table, PIT) and content store (Content Store, CS).
Specifically, CS is used to store the packet by the network node, and its memory module is name+number of packet According to as shown in the table:
Name Data
ndn/<App Name>/sync/<Blockchain State> ……
PIT is mainly used in the name for storing the interest bag received and the interface for receiving the interest bag, its memory module It is name+interface list of interest bag, it is as shown in the table:
Name Interface list
ndn/<App Name>/sync/<Blockchain State> 0,1
FIB is mainly used in routing forwarding, and for storing the corresponding forwarding interface of different names, its memory module is name (or prefix)+interface list, it is as shown in the table:
Name Interface list
ndn/<App Name>/sync/<Blockchain State> 2
When the interest bag that consumer sends passes through some network node 101, the network node 101 searches the interest in CS The packet of request is wrapped, if there is the packet that the interest bag is asked in CS, the packet is returned to consumer;If CS In be not present the packet, then in PIT inquiry whether there is the corresponding entry of interest bag.If there is the interest in PIT Corresponding entry is wrapped, then the interface for receiving the interest bag is added in the entry;If interest bag correspondence is not present in PIT Entry, then in PIT increase newly the corresponding entry of interest bag, the entry include receive the interest bag interface, network node 101 are matched the name of interest bag in FIB, and selection interface forwards interest bag.
If there is the packet that the interest bag is asked in repeating process, in the CS of another network node 101, then this is another One network node 101 is according to interest bag forward-path returned data bag.If in repeating process, the CS of each network node 101 In the packet that the interest bag is asked is not present, then the interest bag will be addressed to the producer of packet, from the producer to disappearing The person's of expense returned data bag.During packet is returned, if network node 101 receives the packet of interest bag request When, network node 101 sends the packet according to the corresponding entry selection interface of the interest bag of this in PIT, so as to realize data Bag is sent to the consumer for asking the packet.Wherein, network node 101 is when carrying out the forwarding of interest bag, using longest-prefix Matching mechanisms, determine forwarding interface.
Block synchronization scenario provided in an embodiment of the present invention is based on the above-mentioned NDN network architectures and realized, refers to aftermentioned detailed Thin embodiment.
Below first with reference to specific hardware configuration to realizing that the block chain provided in an embodiment of the present invention based on NDN is synchronously filled Put and illustrate.
Fig. 2A shows the hardware knot for realizing a kind of block chain sychronisation based on NDN provided in an embodiment of the present invention Structure, it can be the user equipment in aforementioned network to be somebody's turn to do the block chain sychronisation based on NDN.As shown in Figure 2 A, should be based on NDN's Block chain sychronisation 120 includes:Processor 11, transceiver 12, memory 13.
Processor 11 includes one or more than one processing core, and processor 11 passes through runs software program and mould Block, so as to perform various function application and information processing.
Transceiver 12, memory 13 and processor 11 are coupled by bus.Memory 13 can be used for storage software program And module.Memory can storage program area 14, the application program module of at least one function 15.Application program module 15 to Include less:Sending module 151 and receiving module 152.
Alternatively, processor 11 is used to perform the modules in application program module 15, realizes as set in Fig. 3 by user The step of standby required execution.
In addition, memory 13 is a kind of computer-readable recording medium, can be by any kind of volatibility or non-volatile Property storage device or combinations thereof realize, such as static access memory (SRAM) at any time, electrically erasable is read-only to be deposited Reservoir (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), read-only storage (ROM), magnetic memory, flash memory, disk or CD.
It will be understood by those skilled in the art that the structure of the block chain sychronisation 120 based on NDN shown in Fig. 2A The restriction to terminal device is not constituted, parts more more or less than diagram can be included or some parts are combined, or not Same part arrangement.
Fig. 2 B show the hardware knot for realizing a kind of block chain sychronisation based on NDN provided in an embodiment of the present invention Structure, it can be the network node in aforementioned network to be somebody's turn to do the block chain sychronisation based on NDN.As shown in Figure 2 B, should be based on NDN's Block chain sychronisation 220 includes:Processor 21, communication interface 22, memory 23.
Processor 21 includes one or more than one processing core, and processor 21 passes through runs software program and mould Block, so as to perform various function application and information processing.
Communication interface 22, memory 23 and processor 21 are coupled by bus.Memory 23 can be used for storage software journey Sequence and module.Memory can storage program area 24, the application program module of at least one function 25.Application program module 25 At least include:Receiving module 251, searching modul 252, processing module 253 and sending module 254.
Alternatively, processor 21 is used to perform the modules in application program module 25, realizes in such as Fig. 3 by network section The step of being performed required for point.
In addition, memory 23 is a kind of computer-readable recording medium, can be by any kind of volatibility or non-volatile Property storage device or combinations thereof realize, such as static access memory (SRAM) at any time, electrically erasable is read-only to be deposited Reservoir (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), read-only storage (ROM), magnetic memory, flash memory, disk or CD.
It will be understood by those skilled in the art that the structure of the block chain sychronisation 220 based on NDN shown in Fig. 2 B The restriction to terminal device is not constituted, parts more more or less than diagram can be included or some parts are combined, or not Same part arrangement.
Fig. 3 is a kind of interaction figure of the block chain synchronous method based on NDN provided in an embodiment of the present invention, as shown in figure 3, The block chain synchronous method is performed by the user equipment in Fig. 1 and network node, and this method includes:
S301:First user equipment sends block synchronization request bag to network node.
Wherein, block synchronization request bag uses the form of interest bag, synchronous for carrying out block.The block synchronization request bag Title use have hierarchically structured variable-length identifier be used as naming rule, the name weighing-appliance of the block synchronization request bag Body can include the status information of NDN protocol-identifiers, application identities, request Packet type and block chain, the status information of block chain The height of height highest block in the block chain stored for instruction user equipment.
Specifically, the title of block synchronization request bag can ndn/ as follows<App Name>/sync/<Blockchain State>.Wherein, ndn/ is NDN protocol-identifiers;<App Name>For application identities, for example should<App Name>It is specifically as follows blockndn;Sync is the type of request bag, for representing that the request bag is block synchronization request bag;<Blockchain State>For the status information of block chain, the status information of the block chain of the first user equipment storage is carried, can be specifically The eap-message digest of height highest block in the block chain of first user equipment storage, the block of such as the first user equipment storage The cryptographic Hash of height highest block in chain, the form of cryptographic Hash is following " 000000000000038cc0f7 ... ".
Wherein, block catenary system shows the scale of block chain with height, and the highly block for 0 is the first of the block chain Individual block, the like, the name of each block is given, the newest block received is height highest block.
Further, before step S301, this method also includes:
Generate block synchronization request bag.
Specifically, the process of generation block synchronization request bag is as follows:It is high in the block chain of first user equipment determination storage Highest block is spent, and calculates its cryptographic Hash;Block synchronization request bag is generated according to the cryptographic Hash.
It should be noted that the first user equipment is after newly access block catenary system, local block chain needs to be updated, Now the first user equipment sends synchronization request bag to network node.
S302:Network node receives the block synchronization request bag, the block synchronization request bag is searched in CS corresponding same Step data bag.If the corresponding synchronization packets of block synchronization request bag are found in CS, step S303 is performed;If When not finding the corresponding synchronization packets of block synchronization request bag in CS, then step S304 is performed.
Due to the CS meeting data storage bags of network node, if so thering is other users equipment to be set in the first user before Block was carried out under standby identical block chain state synchronous, then might have stored in network node and the block synchronization request bag pair The synchronization packets answered, now network node corresponding synchronization packets directly can be beamed back into the first user equipment.For example, with Family device A requested block synchronization and obtains synchronization packets A before step S301, and synchronization packets A is stored in In network node, block chain when user equipment A request blocks are synchronous is highly 40, if the first user equipment is in step Block chain when asking synchronous in S301 is highly also 40, then the network node for the synchronization packets A that is now stored with will can be somebody's turn to do Synchronization packets A returns to the first user equipment.
S303:Network node synchronization packets return to the first user equipment.
Specifically, the block synchronization request bag that network node finds and received in CS, then according to the reception area The interface of block synchronization request bag returns to the first user equipment.
S304:Network node searches the corresponding entry of block synchronization request bag in the PIT of network node;Work as network node PIT in when not finding the corresponding entry of block synchronization request bag, corresponding entry is added in PIT, and perform step S305;When finding the corresponding entry of block synchronization request bag in the PIT of network node, add and connect in the entry found Receive the interface of block synchronization request bag.
In this step, if network node does not find the corresponding entry of block synchronization request bag in PIT tables, Illustrate that no target node crosses identical block synchronization request bag before this, now network node is needed in PIT tables Add the corresponding entry of block synchronization request bag.The title of the entry including block synchronization request bag and to receive the block same Walk the interface of request bag.
If network node finds the corresponding entry of block synchronization request bag in PIT tables, illustrate before this There is target node to cross identical block synchronization request bag, now network node only needs to add in corresponding entry Receive the interface of the block synchronization request bag so that during subsequently received corresponding synchronization packets, can be by the bars of PIT tables Mesh is transmitted to the first user equipment.
S305:Network node inquires about interface corresponding with block synchronization request bag in fib table, passes through the interface determined Forward block synchronization request bag.
Specifically, network node is matched using the title of block synchronization request bag in fib table, determines corresponding turn Send out interface;Then the forwarding of block synchronization request bag is carried out using the forwarding interface determined.Wherein, the form of fib table is as before Literary described, matching can be realized using longest match rule.
Network node inquires about interface corresponding with block synchronization request bag in fib table, if inquired synchronous with block The corresponding interface of request bag, then forward block synchronization request bag by the interface determined.If do not found synchronous with block The corresponding interface of request bag, then store the block synchronization request bag, until re-starting matching after FIB renewals, it is determined that Corresponding forwarding interface.
Due in FIB, the name-matches of block synchronization request bag to entry there may be multiple forwarding interfaces, therefore, Network node may be forwarded using multiple forwarding interfaces to the block synchronization request bag simultaneously, and then make it that the block is same Step request bag can be forwarded to different user equipmenies.
Due to there are multiple network nodes in NDN networks, therefore, during block synchronization request bag is forwarded, each The network node for receiving the block synchronization request bag is performed in the way of step S302-S305.
S306:Second user equipment receives the block synchronization request bag, and returns to synchronization packets.
Specifically, second user equipment is after the block synchronization request bag is received, according in the block synchronization request bag Block chain status information, determine that the first user equipment needs synchronous block;Synchronization is needed according to the first user equipment Block generates synchronization packets, and returns to the first user equipment.
Wherein, the status information of the block chain in the block synchronization request bag, determines that the first user equipment needs same The process of the block of step is as follows:The state that second user equipment extracts block chain by the naming rule of block synchronization request bag is believed Breath;The height of height highest block in the block chain that the first user equipment is stored is determined according to the status information of the block chain; Compare the height of height highest block and the storage of second user equipment in the block chain for the first user equipment storage determined Block chain in height highest block height, determine that the first user equipment needs synchronous block.
For example, height highest area in the block chain that the first user equipment determined according to block synchronization request bag is stored Block is the 40th block, and height highest block is the 80th block in the block chain of second user equipment storage, then the first user Equipment needs synchronous block to be 41-80 blocks.
Wherein, height highest area in the block chain that the first user equipment is stored is determined according to the status information of the block chain Block, is specifically the cryptographic Hash of height highest block in the block chain stored according to the first user equipment, determines corresponding block Process, repeat no more here.
If the height of height highest block is less than or equal to the first user in the block chain of second user equipment storage The height of height highest block in the block chain of equipment storage, then illustrate that second user equipment can not carry for the first user equipment For block, now second user equipment will not return to synchronization packets to the first user equipment.
S307:Network node receives the synchronization packets, and the synchronization packets are sent into the first user equipment.
Specifically, entry of the network node in PIT tables, lookup receives the corresponding block of the synchronization packets and synchronously please Seek the interface of bag;Synchronization packets are forwarded by the interface found.
After the completion of forwarding, corresponding entry is deleted from PIT tables, it is to avoid repeat to send same step number to the first user equipment According to bag.
Based on this forwarding mechanism so that during the first user equipment requests synchronization packets, distance usually can be obtained most The synchronization packets that near user equipment is returned, reason is as follows:Due between different user equipmenies and the first user equipment Distance may be different, thus the distance of the transmission of block synchronization request bag and synchronization packets is different, causes to return synchronously Different the time required to packet, the near user equipment of the user equipment of distance first first returns to synchronization packets, forwards the same step number According to the network node of bag after forwarding, corresponding entry in PIT tables can be deleted, it is same that follow-up other users equipment is returned Step data bag can't be forwarded to the first user equipment again.
By taking the network shown in Fig. 3 A as an example, Alice, Bob, Charles and Dave are four user equipmenies in network. Alice and Charles have updated the newest block of the whole network, and block height has all reached 80, and the two user equipmenies are all propped up Synchronous service is held, Bob and the current blocks of Dave are highly 40 and 0.The node actual range length of length representative two of black line segment. Bob and Dave send the synchronization request bag with current highest block cryptographic Hash into NDN networks respectively, due to physical distance not Together, Alice has responded Bob request, specifically, and Alice extracts the state of Bob block chain according to the name of synchronization request bag Information is simultaneously compared with the block chain of oneself, find its lack from height 41 to height 80 all blocks, then Alice by these Block, which is packed into synchronization packets, returns to Bob.Similarly, No. 1 to No. 80 block is also sent to Dave by Charles.By This, Bob and Dave complete block synchronization.
It is therefore, each to receive during synchronization packets are forwarded due to there are multiple network nodes in NDN networks Network node to the synchronization packets is performed in the way of step S307.
S308:First user equipment receives the synchronization packets, and extracts the storage of the block in synchronization packets to block Chain database.
Specifically, the first user equipment extracts the block in synchronization packets, then verifies the legal of the block that extracts Property, if the legitimacy of these blocks, by checking, is stored in block chain database, directly lost if not conforming to rule Abandon.
First user equipment repeats step S301 and 308, is not received in setting time after in step S301 During to synchronization packets, illustrate that the first user equipment has been synchronized all blocks, then perform step S309.
S309:First user equipment sends block search request bag to network node.
Wherein, block search request bag uses the form of interest bag, for carrying out block search.The block search request bag Title use have hierarchically structured variable-length identifier be used as naming rule, the name weighing-appliance of the block search request bag Body can include NDN protocol-identifiers, application identities, ask Packet type and block-identified, block-identified to be used for instruction user equipment The height of a upper block for the block of search, the height of a upper block for the block of user equipment searches is user equipment storage The height of height highest block in block chain.For example, the block to be searched for of block search request bag is the 40th block, then should The block-identified block of correspondence the 39th.
Specifically, the title of block search request bag can ndn/ as follows<App Name>/blocks/<Block’s Digest>.Its wherein, ndn/ is NDN protocol-identifiers;<App Name>For application identities, for example should<App Name>Specifically may be used Think blockndn;Blocks is the type of request bag, for representing that the request bag is block search request bag,<Block’s Digest>To be block-identified, can be specifically the storage of the first user equipment block chain in the message of height highest block pluck Will, such as the cryptographic Hash of height highest block in the block chain of the first user equipment storage, the form of cryptographic Hash is as follows " 000000000000024b89b4 ... ", the cryptographic Hash is the cryptographic Hash for the block that height is 0, and the block with the cryptographic Hash is searched Rope request bag is used to search for the block that height is 1.
Further, before step S309, this method also includes:
Generate block search request bag.
Specifically, the process of generation block search request bag is as follows:First user equipment determines block to be searched, and counts Calculate its cryptographic Hash;Block search request bag is generated according to the cryptographic Hash.
Generally, the block of the user equipment searches is newest block, such as block signified subsequent step S310-S314 Search.Certainly, the block search request bag can be used for searching for the existing block of user equipment, and so doing can be to existing The correctness of block is judged, before the reception process of the now transmission of block search request bag and search packet is referred to The block synchronizing process of text.
S310:Network node receives the block search request bag, searches this in CS block search request bag is corresponding and search Rope packet.If the corresponding search packet of block search request bag is found in CS, step S311 is performed;If When not finding the corresponding search packet of block search request bag in CS, then step S312 is performed.
Step S310 detailed process is referred to step S302.
S311:Network node search packet returns to the first user equipment.
Also and (compare the in the absence of new block because usual first user equipment is when sending searching request bag, in network The higher block of the height of either block in the block chain of one user), so not stored generally also in network node corresponding Search for packet.
S312:Network node searches the corresponding entry of block search request bag in the PIT of network node;Work as network node PIT in when not finding the corresponding entry of block search request bag, corresponding entry is added in PIT, and perform step S313;When finding the corresponding entry of block search request bag in the PIT of network node, add and connect in the entry found Receive the interface of block search request bag.
Step S312 detailed process is referred to step S304.
S313:Network node inquires about interface corresponding with block search request bag in fib table, if inquired and block The corresponding interface of searching request bag, then forward block search request bag by the interface determined, then branch to step S317. If not finding interface corresponding with block search request bag, the block search request bag is stored.
Step S313 detailed process is referred to step S305.
S314:3rd user equipment creates new block.
Specifically, each user equipment in block chain is miner, i.e. the block producer, so each user equipment Block search request bag can be sent after having updated, it is also possible to produce new block while block search request bag is sent.
What deserves to be explained is, the 3rd user equipment here can be same user equipment with second user equipment, also may be used Think different user devices.Here the 3rd user equipment can be same user equipment with the first user equipment, if the 3rd User equipment and the first user equipment are same user equipment, then will not return and search for the first user equipment in subsequent process Request bag.
Further, this method can also include:The block newly created is added local block chain by the 3rd user equipment.
S315:Network node updates fib table, adds the entry to block that should be new.
3rd user equipment belongs to the network node root of same LAN with the 3rd user equipment after new block is created According to LAN interactive information, the fib table of itself is updated.Specifically, the entry to block that should be new is added in fib table.
And according to name state of data link Routing Protocol (Name-data Link State between network node Routing Protocol, NLSR) come it is synchronous each between fib table.That is, the FIB of each network node in NDN Table finally can all update the entry of the new block.
Entry to block that should be new includes the name of search packet corresponding with the block and corresponding forwarding Interface.The block it is corresponding search packet name can be with the block search request bag for searching for the block name phase Together.Therefore, the entry is also entry corresponding with block search request bag.
S316:Network node determines interface corresponding with block search request bag according to the FIB after renewal, by determining Interface forwarding block search request bag.
Because the purpose of block search request bag is to search for the block newly created, and the FIB after updating just have updated The new route entry for creating block, therefore now network node is necessarily capable of determining that connect corresponding with block search request bag Mouthful.
Step S316 detailed process is referred to step S305.
S317:3rd user equipment generates the corresponding search packet of the block search request bag, and returns to search data Bag.
Specifically, the 3rd user equipment receives the block search request bag, first judges whether that the block search can be provided The search packet that request bag is asked, using the teaching of the invention it is possible to provide when, generate and return to the corresponding search data of the block search request bag Bag.
For example, the 3rd user equipment is after the block search request bag is received, according in the block search request bag It is block-identified, determine the block of the first user equipment searches;Then, the 3rd user equipment is according to the height of the block chain itself stored Can degree judge provide the block of the first user equipment searches;If the block of the first user equipment searches, basis can be provided The block generation search packet of first user equipment searches, and return to the first user equipment;Otherwise, do not set to the first user It is standby to return to search packet.Specifically, if the height of height highest block is small in the block chain of the 3rd user equipment storage In or equal to block-identified corresponding block height, then illustrate the 3rd user equipment can not provide area for the first user equipment Block.
For example, the block for the first user equipment searches that the 3rd user equipment is determined according to block search request bag is the 81 blocks, and the 3rd user equipment has the 81st block, then the 3rd user equipment returns to corresponding search to the first user equipment Packet.
What deserves to be explained is, because the 3rd user equipment here is the user equipment that creates new block, then now Three user equipmenies can necessarily provide the new block of the first user equipment searches.
Because each user equipment in block catenary system can all send block search request bag, so, the block search During packet is returned, can each user equipment into block catenary system return, equivalent to broadcasting the area in network Block.
S318:Network node receives the search packet, and the search packet is sent into the first user equipment.
Specifically, step S318 details may refer to step S307.
S319:First user equipment receives the search packet, and extracts the block storage in search packet to block Chain database.
Specifically, the first user equipment extracts the block in search packet, then verifies the legal of the block that extracts Property, if the legitimacy of these blocks, by checking, is stored in block chain database, directly lost if not conforming to rule Abandon.
In order to preserve the last state of block chain, the first user equipment needs to repeat to send block search request bag.Specifically Ground, when the first user equipment receives the search packet of network node return, extracts the block storage in search packet To block chain database, new block search request bag is then sent, the block-identified and block of new block search request bag The block-identified difference of searching request bag;When not receiving the search packet of network node return in the given time, weight It is new to send block search request bag.Here the scheduled time can be identical with setting time above, can also be different.
Need exist for explanation be, although network node can be recorded in PIT after block search request bag is received In table, corresponding user equipment is returned to after getting corresponding search packet.But, because network node can Energy meeting timing or cycle remove PIT list items, if so the first user equipment does not receive network node and returned in the given time , can be by way of resending block search request bag during the search packet returned, it is to avoid because network node removes PIT List item causes to be not received by the situation of search packet.
As shown in Figure 3 B, Ailce, Bob and Ted are three user equipmenies in network, and it is current that three stores the whole network 80 all blocks, and all send block search request bag simultaneously to ask the 81st block, block search request bag message In the PIT tables for being recorded in network node (such as router), by taking network node C as an example, the block of the 81st block is searched in PIT list items The corresponding interface of rope request bag is 0,1,2.Now, the new block that height is 81 is generated as the Ted of miner, Ted is first to net Network node in network broadcasts the block information of the block, and network node updates FIB according to the block information, then according to new Block search request is forwarded a packet to Ted by FIB, and Ted returns to search data according to the block search request bag received to network Bag, so as to realize the broadcast of the block.Network node C can forward data along 1,2 interface according to the records of PIT list items, Finally it is sent to Alice and Bob.
Block chain synchronous method provided in an embodiment of the present invention based on NDN, with advantages below:First, set in user During standby progress block broadcast, simpler compared with the block chain under existing TCP/IP frameworks is realized, reason is as follows:In TCP/ In order to ensure network node will not repeatedly receive not directly transmit area between the block that has obtained, network node under IP frameworks Block, but inv message is first sent by supplier (block provider) to neighbours, inform which block information other side oneself has be available for Download, neighbor node is received after inv message, sending getdata message according to inv message (cryptographic Hash of block) informs supplier Which block oneself is needed, then allows neighbor user equipment to download to block data by supplier's return blocks message;And this " consumer's driving " feature of inventive embodiments by the NDN network architectures in itself, simplifies above-mentioned steps, disappears not needing inv Broadcast is completed in the case of breath.Equally, it is complicated as under the no TCP/IP network architectures of broadcast under NDN.Second, make block Catenary system is really realized in decentralization, system without any super node of appearance.This fairness to system provides strong Guarantee.3rd, block catenary system is based on NDN networks, either browses the functions such as the synchronization of online user's equipment, or search Implementation method, its process need not all pay close attention to the positional informations such as IP address, port again.This characteristic is largely reduced The pressure of Network application and development work.
Fig. 4 shows the block diagram for the block chain sychronisation based on NDN that one embodiment of the invention is provided.This is based on NDN block chain sychronisation can by special hardware circuit, or, being implemented in combination with for software and hardware is complete as user equipment Portion or a part.The block chain sychronisation based on NDN includes transmitting element 401 and receiving unit 402.Wherein, send single Member 401 is used to send block synchronization request bag to network node, and the title of block synchronization request bag includes NDN protocol-identifiers, answered With the status information of mark, request Packet type and block chain, the status information of block chain is used for the area that instruction user equipment is stored The height of height highest block in block chain;Receiving unit 402 is used for the synchronization packets for receiving network node return, and extracts Block chain database is arrived in block storage in synchronization packets.
Correlative detail can combine the embodiment of the method with reference to Fig. 3.
It should be noted that above-mentioned transmitting element 401, receiving unit 402 can be realized by transceiver, or processor is matched somebody with somebody Transceiver is closed to realize.
Fig. 5 shows the block diagram for the block chain sychronisation based on NDN that one embodiment of the invention is provided.This is based on NDN block chain sychronisation can by special hardware circuit, or, being implemented in combination with for software and hardware is complete as network node Portion or a part.Device includes receiving unit 501, searching unit 502, processing unit 503 and transmitting element 504.Wherein, receive Unit 501 is used for network node and receives the block synchronization request bag that user equipment is sent, and the title of block synchronization request bag includes NDN protocol-identifiers, application identities, the status information for asking Packet type and block chain, the status information of block chain are used to indicate to use The height of height highest block in the block chain of family equipment storage;Searching unit 502 is used to search in the PIT of network node The corresponding entry of block synchronization request bag;Processing unit 503 does not find block synchronization request in the PIT for working as network node When wrapping corresponding entry, corresponding entry is added in PIT, and inquire about in fib table connect corresponding with block synchronization request bag Mouthful;When finding the corresponding entry of block synchronization request bag in the PIT of network node, add and receive in the entry found The interface of block synchronization request bag;Transmitting element 504 is used to forward block synchronization request bag by the interface determined;Send single Member 504 be additionally operable to when receive block synchronization request bag it is corresponding search packet when, in PIT entry forwarding search number According to bag.
Correlative detail can combine the embodiment of the method with reference to Fig. 3.
It should be noted that above-mentioned searching unit 502 and processing unit 503 can be realized by processor or, processor Perform the programmed instruction in memory to realize, above-mentioned receiving unit 501, transmitting element 504 can be realized by communication interface, or Person's processor coordinates communication interface to realize.
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all the present invention spirit and Within principle, any modification, equivalent substitution and improvements made etc. should be included in the scope of the protection.

Claims (16)

1. a kind of block chain synchronous method based on name data network, it is characterised in that methods described includes:
User equipment sends block synchronization request bag to network node, and the title of the block synchronization request bag includes name data Procotol mark, application identities, the status information for asking Packet type and block chain, the status information of the block chain are used to refer to Show the height of height highest block in the block chain of the user equipment storage;
The synchronization packets that the network node is returned are received, and extract the storage of the block in the synchronization packets and arrive block chain Database.
2. according to the method described in claim 1, it is characterised in that the user equipment sends block to network node and synchronously please Bag is sought, including:
It is determined that height highest block in the block chain of storage, and calculate its cryptographic Hash;By height highest in the block chain The cryptographic Hash of block generates the block synchronization request bag as the status information of the block chain;The block synchronously please Bag is asked to be sent to the network node.
3. method according to claim 1 or 2, it is characterised in that methods described also includes:
The synchronization packets are not received in setting time after in the user equipment transmission synchronization request bag When, block search request bag is sent to the network node, the title of the block search request bag 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 stores for the user equipment Block chain in height highest block height;
When receiving the search packet that the network node is returned, area is arrived in the block storage extracted in the search packet Block chain database, then sends new block search request bag, the new block search request bag it is block-identified with it is described The block-identified difference of block search request bag;When the search data for not receiving the network node return in the given time Bao Shi, resends the block search request bag.
4. method according to claim 1 or 2, it is characterised in that methods described also includes:
Receive the block synchronization request bag for another user equipment transmission that the network node is sent;
The status information of block chain in the block synchronization request bag sent according to another user equipment, is determined described another The height of height highest block in the block chain of user equipment storage;
Compare the height of height highest block and the user in the block chain for another user equipment storage determined The height of height highest block in the block chain of equipment storage, determines that another user equipment needs synchronous block;
Synchronization packets are generated according to the block that another user equipment needs are synchronous, and return to another user and are set It is standby.
5. method according to claim 1 or 2, it is characterised in that methods described also includes:
When the user equipment successfully creates block, the network node into network broadcasts the information of the block;
The block search request bag that network node is sent is received, the block search request bag is used to ask the user equipment new The block of establishment;
Searching request bag is sent to the network node, the search packet includes the block that the user equipment is newly created.
6. a kind of block chain synchronous method based on name data network, it is characterised in that methods described includes:
Network node receives the block synchronization request bag that user equipment is sent, and the title of the block synchronization request bag includes name Data network protocol mark, application identities, the status information for asking Packet type and block chain, the status information of the block chain are used The height of height highest block in the block chain for indicating the user equipment storage;
The corresponding synchronization packets of the block synchronization request bag 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 bag in the content store, by the synchronization Packet returns to the user equipment;It is corresponding same when not finding the block synchronization request bag in the content store During step data bag, the corresponding entry of the block synchronization request bag is searched in the interest table undetermined of the network node;
When not finding the corresponding entry of the block synchronization request bag in the interest table undetermined of the network node, undetermined Corresponding entry is added in interest table, and interface corresponding with the block synchronization request bag is inquired about in forwarding information table, is led to Cross the interface determined and forward the block synchronization request bag;When finding the area in the interest table undetermined of the network node During the corresponding entry of block synchronization request bag, addition receives the interface of the block synchronization request bag in the entry found;
When receiving the corresponding synchronization packets of the block synchronization request bag, the entry in the interest table undetermined turns Send out synchronization packets described.
7. method according to claim 6, it is characterised in that methods described also includes:
The block search request bag that the user equipment is sent is received, the title of the block search request bag includes name data Procotol mark, application identities, request Packet type and block-identified, it is described block-identified to be used to indicate that the user equipment is searched The height of a upper block for the block of rope;
The corresponding search packet of the block search request bag is searched in content store, the search packet includes institute State the block of user equipment searches;
When found in the content store block search request bag it is corresponding search packet when, by the search Packet returns to the user equipment;When not found in the content store, the block search request bag is corresponding to search During rope packet, the corresponding entry of the block search request bag is searched in the interest table undetermined of the network node;
When not finding the corresponding entry of the block search request bag in the interest table undetermined of the network node, undetermined Corresponding entry is added in interest table, and interface corresponding with the block search request bag is inquired about in forwarding information table, is led to Cross the interface determined and forward the block search request bag;When finding the area in the interest table undetermined of the network node During the corresponding entry of block search request bag, addition receives the interface of the block search request bag in the entry found;
When receiving the corresponding search packet of the block search request bag, entry in the interest table undetermined turns Send out search packet described.
8. method according to claim 7, it is characterised in that methods described also includes:
When not inquiring interface corresponding with the block search request bag in the forwarding information table, the block is stored Searching request bag;
When the forwarding information table of the network node is updated, and the forwarding information table after updating includes the block During the corresponding entry of searching request bag, interface corresponding with the block search request bag is inquired about in forwarding information table;
The block search request bag is forwarded by the interface determined.
9. a kind of block chain sychronisation based on name data network, it is characterised in that described device includes:
Transmitting element, for sending block synchronization request bag to network node, the title of the block synchronization request bag includes life Name data network protocol mark, application identities, the status information for asking Packet type and block chain, the status information of the block chain The height of height highest block in the block chain stored for instruction user equipment;
Receiving unit, for receiving the synchronization packets that the network node is returned, and extracts the area in the synchronization packets Block chain database is arrived in block storage.
10. device according to claim 9, it is characterised in that described device also includes:
Height highest block in processing unit, the block chain for determining storage, and calculate its cryptographic Hash;By the block chain The cryptographic Hash of middle height highest block generates the block synchronization request bag as the status information of the block chain.
11. the device according to claim 9 or 10, it is characterised in that the transmitting element, is additionally operable to when in the user When not receiving the synchronization packets in the setting time after the equipment transmission synchronization request bag, to the network node Send block search request bag, the title of the block search request bag include name data network protocol mark, application identities, Ask Packet type and block-identified, the block-identified height for being used to indicate a upper block for the block of the user equipment searches Degree, the height of a upper block for the block of the user equipment searches is height highest in the block chain of user equipment storage Block height;
The receiving unit, is additionally operable to, when receiving the search packet that the network node is returned, extract the search number Block chain database is arrived according to the block storage in bag;
The transmitting element, is additionally operable to after the search packet that the network node is returned is received, and sends new block and searches Rope request bag, the block-identified difference of the block-identified and block search request bag of the new block search request bag; When not receiving the search packet that the network node is returned in the given time, the block search request is resend Bag.
12. device according to claim 13, it is characterised in that the receiving unit, is additionally operable to receive the network section The block synchronization request bag that another user equipment that point is sent is sent;
The processing unit, the shape for the block chain being additionally operable in the block synchronization request bag according to another user equipment transmission State information, determines the height of height highest block in the block chain of another user equipment storage;Compare the institute determined State in the block chain of another user equipment storage in the height of height highest block and the block chain of user equipment storage The height of height highest block, determines that another user equipment needs synchronous block;According to another user equipment Synchronous block is needed to generate synchronization packets;
The transmitting element, is additionally operable to the synchronization packets returning to another user equipment.
13. the device according to claim 9 or 10, it is characterised in that the transmitting element, is additionally operable to when the user sets For when successfully creating block, the network node into network broadcasts the information of the block;
The receiving unit, is additionally operable to receive the block search request bag that network node is sent, the block search request bag is used In the block for asking the user equipment newly to create;
The transmitting element, is additionally operable to send searching request bag to the network node, the search packet includes described use The block that family equipment is newly created.
14. a kind of block chain sychronisation based on name data network, it is characterised in that described device includes:
Receiving unit, the block synchronization request bag that user equipment is sent, the block synchronization request bag are received for network node Title include name data network protocol mark, application identities, the status information for asking Packet type and block chain, the block The height of height highest block in block chain of the status information of chain for indicating the user equipment storage;
Searching unit, it is described same for searching the corresponding synchronization packets of the block synchronization request bag in content store Step data bag includes the block that the user equipment does not update;
Transmitting element, the corresponding synchronization packets of the block synchronization request bag are found for working as in the content store When, the synchronization packets are returned into the user equipment;
The searching unit, is additionally operable to corresponding same when not finding the block synchronization request bag in the content store During step data bag, the corresponding entry of the block synchronization request bag is searched in the interest table undetermined of the network node;
Processing unit, for corresponding when not finding the block synchronization request bag in the interest table undetermined of the network node During entry, corresponding entry, and inquiry and the block synchronization request bag in forwarding information table are added in interest table undetermined Corresponding interface;When finding the corresponding entry of the block synchronization request bag in the interest table undetermined of the network node, Addition receives the interface of the block synchronization request bag in the entry found;
The transmitting element, is additionally operable to forward the block synchronization request bag by the interface determined;
The transmitting element, is additionally operable to when receiving the corresponding synchronization packets of the block synchronization request bag, according to described Entry in interest table undetermined forwards the synchronization packets.
15. device according to claim 14, it is characterised in that the receiving unit, it is additionally operable to receive the user and sets The block search request bag that preparation is sent, the title of the block search request bag includes name data network protocol mark, application Mark, request Packet type and block-identified, the block-identified areas of block Shang mono- for being used to indicate the user equipment searches The height of block;
The searching unit, is additionally operable to search the corresponding search packet of the block search request bag in content store, The search packet includes the block of the user equipment searches;
The searching unit, is additionally operable to that the corresponding search of the block search request bag ought be found in the content store During packet, the search packet is returned into the user equipment;
The processing unit, is additionally operable to when not found in the content store that the block search request bag is corresponding to search During rope packet, the corresponding entry of the block search request bag is searched in the interest table undetermined of the network node;Work as institute When not finding the corresponding entry of the block search request bag in the interest table undetermined for stating network node, in interest table undetermined Add corresponding entry, and the inquiry interface corresponding with the block search request bag in forwarding information table;When the network When the corresponding entry of the block search request bag is found in the interest table undetermined of node, add and connect in the entry found Receive the interface of the block search request bag;
The transmitting element, is additionally operable to forward the block search request bag by the interface determined;
The transmitting element, be additionally operable to when receive the block search request bag it is corresponding search packet when, according to described Entry in interest table undetermined forwards the search packet.
16. device according to claim 15, it is characterised in that the processing unit, is additionally operable to when in the forwarding letter When not inquiring interface corresponding with the block search request bag in breath table, the block search request bag is stored;
The processing unit, the forwarding information table for being additionally operable to work as the network node is updated, and the forwarding after renewal When information table includes the block search request bag corresponding entry, inquiry please with the block search in forwarding information table Seek the corresponding interface of bag;
The transmitting element, is additionally operable to forward the block search request bag by the interface determined.
CN201710400368.0A 2017-05-31 2017-05-31 Block chain synchronous method and device based on NDN Active CN107317842B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710400368.0A CN107317842B (en) 2017-05-31 2017-05-31 Block chain synchronous method and device based on NDN

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710400368.0A CN107317842B (en) 2017-05-31 2017-05-31 Block chain synchronous method and device based on NDN

Publications (2)

Publication Number Publication Date
CN107317842A true CN107317842A (en) 2017-11-03
CN107317842B 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 Block chain synchronous method and device based on NDN

Country Status (1)

Country Link
CN (1) CN107317842B (en)

Cited By (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108494812A (en) * 2018-01-22 2018-09-04 北京工业大学 A kind of NDN network communication methods for supporting block chain business
CN108600353A (en) * 2018-04-12 2018-09-28 北京天德科技有限公司 A kind of parallel block synchronization method of block chain node
CN108696589A (en) * 2018-05-14 2018-10-23 百度在线网络技术(北京)有限公司 Block chain data transmission method, device, equipment and storage medium
CN109165229A (en) * 2018-08-23 2019-01-08 北京京东金融科技控股有限公司 Local the block synchronous method of inspection, device, equipment and storage medium
CN109274754A (en) * 2018-10-11 2019-01-25 上海保险交易所股份有限公司 For the method for synchrodata, equipment and storage medium in block chain network
CN109410049A (en) * 2018-09-18 2019-03-01 深圳周百通科技有限公司 Block chain bookkeeping methods, device, computer equipment and storage medium
CN109474675A (en) * 2018-10-18 2019-03-15 尚维斯 A kind of block height split blade type date storage method based on block chain
CN109714412A (en) * 2018-12-25 2019-05-03 深圳前海微众银行股份有限公司 Block synchronous method, device, equipment and computer readable storage medium
CN109977274A (en) * 2019-03-31 2019-07-05 杭州复杂美科技有限公司 A kind of data query and verification method, system, equipment and storage medium
CN110072196A (en) * 2019-03-29 2019-07-30 中国科学院计算技术研究所 Communication means and system towards the application of block chain are provided for NDN network
CN110096505A (en) * 2019-03-31 2019-08-06 杭州复杂美科技有限公司 A kind of date storage method and system, equipment and storage medium
CN110113408A (en) * 2019-04-30 2019-08-09 杭州复杂美科技有限公司 A kind of block synchronous method, equipment and storage medium
CN110378694A (en) * 2018-05-21 2019-10-25 腾讯科技(深圳)有限公司 Block chain data processing method, device, computer equipment and storage medium
CN110401637A (en) * 2019-06-28 2019-11-01 中南民族大学 Trust method based on name in a kind of name data network
CN110688426A (en) * 2019-08-21 2020-01-14 北京邮电大学 Second-level heartbeat synchronization method for block chain big database
CN111565175A (en) * 2020-04-22 2020-08-21 辽宁大学 IOTA-based planar named data network security defense method
CN112383610A (en) * 2020-11-11 2021-02-19 上海保险交易所股份有限公司 Synchronous processing method and system for block chain state data
CN112579301A (en) * 2020-12-28 2021-03-30 北京理工大学 NDN-based data transmission method for P2P distributed machine learning training system
CN113037852A (en) * 2021-03-22 2021-06-25 中国人民银行数字货币研究所 Block chain link point synchronization method and device
WO2021135857A1 (en) * 2020-01-02 2021-07-08 支付宝(杭州)信息技术有限公司 Method and device for updating trusted node information
CN113328952A (en) * 2021-05-31 2021-08-31 北京工业大学 Block chain data transmission method based on NDN
CN113364847A (en) * 2021-05-31 2021-09-07 新疆大学 Data synchronization method and device of block chain nodes and storage medium
CN113765707A (en) * 2021-08-18 2021-12-07 北京工业大学 NDN-based block chain network service quality guarantee method
CN114048517A (en) * 2022-01-14 2022-02-15 北京大学深圳研究生院 Dual channel consensus system and method for blockchains, computer readable storage medium
CN115297009A (en) * 2022-07-08 2022-11-04 中电信数智科技有限公司 Block chain-based distributed network digital encryption consistency optimization method
CN115460255A (en) * 2022-09-23 2022-12-09 电子科技大学 Named data network system based on block chain
CN115495531A (en) * 2022-11-17 2022-12-20 山东区块链研究院 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
NIKOS FOTIOU ; GEORGE C. POLYZOS: ""Decentralized name-based security for content distribution using blockchains"", 《2016 IEEE CONFERENCE ON COMPUTER COMMUNICATIONS WORKSHOPS (INFOCOM WKSHPS)》 *
周子健: ""命名数据网络下的移动性支持和数据同步应用"", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (44)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108494812A (en) * 2018-01-22 2018-09-04 北京工业大学 A kind of NDN network communication methods for supporting block chain business
CN108494812B (en) * 2018-01-22 2020-03-13 北京工业大学 NDN network communication method supporting block chain service
CN108600353A (en) * 2018-04-12 2018-09-28 北京天德科技有限公司 A kind of parallel block synchronization method of block chain node
CN108600353B (en) * 2018-04-12 2021-01-12 北京天德科技有限公司 Parallel block synchronization method of block chain nodes
CN108696589A (en) * 2018-05-14 2018-10-23 百度在线网络技术(北京)有限公司 Block chain data transmission method, device, equipment and storage medium
CN110378694A (en) * 2018-05-21 2019-10-25 腾讯科技(深圳)有限公司 Block chain data processing method, device, computer equipment and storage medium
CN110378694B (en) * 2018-05-21 2021-01-12 腾讯科技(深圳)有限公司 Block chain data processing method and device, computer equipment and storage medium
CN109165229A (en) * 2018-08-23 2019-01-08 北京京东金融科技控股有限公司 Local the block synchronous method of inspection, device, 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
CN109274754A (en) * 2018-10-11 2019-01-25 上海保险交易所股份有限公司 For the method for synchrodata, equipment and storage medium in block chain network
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
CN109714412B (en) * 2018-12-25 2021-08-10 深圳前海微众银行股份有限公司 Block synchronization method, device, equipment and computer readable storage medium
CN109714412A (en) * 2018-12-25 2019-05-03 深圳前海微众银行股份有限公司 Block synchronous method, device, equipment and computer readable storage medium
CN110072196A (en) * 2019-03-29 2019-07-30 中国科学院计算技术研究所 Communication means and system towards the application of block chain are provided for NDN network
CN110096505A (en) * 2019-03-31 2019-08-06 杭州复杂美科技有限公司 A kind of date storage method and system, equipment and storage medium
CN109977274A (en) * 2019-03-31 2019-07-05 杭州复杂美科技有限公司 A kind of data query and verification method, system, equipment and storage medium
CN110096505B (en) * 2019-03-31 2021-05-11 杭州复杂美科技有限公司 Data storage method, system, equipment and storage medium
CN110113408A (en) * 2019-04-30 2019-08-09 杭州复杂美科技有限公司 A kind of block synchronous method, equipment and storage medium
CN110113408B (en) * 2019-04-30 2020-08-14 杭州复杂美科技有限公司 Block synchronization method, equipment and storage medium
CN110401637A (en) * 2019-06-28 2019-11-01 中南民族大学 Trust method based on name in a kind of name data network
CN110688426A (en) * 2019-08-21 2020-01-14 北京邮电大学 Second-level heartbeat synchronization method for block chain big database
WO2021135857A1 (en) * 2020-01-02 2021-07-08 支付宝(杭州)信息技术有限公司 Method and device for updating trusted node information
CN111565175A (en) * 2020-04-22 2020-08-21 辽宁大学 IOTA-based planar named data network security defense method
CN111565175B (en) * 2020-04-22 2022-04-05 辽宁大学 IOTA-based planar named data network security defense method
CN112383610A (en) * 2020-11-11 2021-02-19 上海保险交易所股份有限公司 Synchronous processing method and system for block chain state data
CN112383610B (en) * 2020-11-11 2022-12-09 上海保险交易所股份有限公司 Synchronous processing method and system for block chain state data
CN112579301A (en) * 2020-12-28 2021-03-30 北京理工大学 NDN-based data transmission method for P2P distributed machine learning training system
CN112579301B (en) * 2020-12-28 2022-07-01 北京理工大学 NDN-based data transmission method for P2P distributed machine learning training system
CN113037852A (en) * 2021-03-22 2021-06-25 中国人民银行数字货币研究所 Block chain link point synchronization method and device
CN113037852B (en) * 2021-03-22 2022-08-09 中国人民银行数字货币研究所 Block chain link point synchronization method and device
CN113328952A (en) * 2021-05-31 2021-08-31 北京工业大学 Block chain data transmission method based on NDN
CN113328952B (en) * 2021-05-31 2022-06-07 北京工业大学 Block chain data transmission method based on NDN
CN113364847A (en) * 2021-05-31 2021-09-07 新疆大学 Data synchronization method and device of block chain nodes and storage medium
CN113765707B (en) * 2021-08-18 2022-10-28 北京工业大学 NDN-based block chain network service quality guarantee method
CN113765707A (en) * 2021-08-18 2021-12-07 北京工业大学 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
CN114048517A (en) * 2022-01-14 2022-02-15 北京大学深圳研究生院 Dual channel consensus system and method for blockchains, computer readable storage medium
CN115297009A (en) * 2022-07-08 2022-11-04 中电信数智科技有限公司 Block chain-based distributed network digital encryption consistency optimization method
CN115297009B (en) * 2022-07-08 2023-11-17 中电信数智科技有限公司 Digital encryption consistency optimization method based on blockchain distributed network
CN115460255A (en) * 2022-09-23 2022-12-09 电子科技大学 Named data network system based on block chain
CN115460255B (en) * 2022-09-23 2024-03-29 电子科技大学 Named data networking system based on block chain
CN115495531A (en) * 2022-11-17 2022-12-20 山东区块链研究院 Block chain data synchronization method and system based on check point

Also Published As

Publication number Publication date
CN107317842B (en) 2019-11-22

Similar Documents

Publication Publication Date Title
CN107317842B (en) Block chain synchronous method and device based on NDN
CN103339901B (en) Terminal in content guiding network environment and the communication means of intermediate node and terminal and intermediate node
CN107295600B (en) A kind of data transmission method in In-vehicle networking
CN103236971B (en) A kind of routing conversion of the Internet content
CN108494812B (en) NDN network communication method supporting block chain service
CN104580371B (en) File is fixed and variable-size fragment, transmission, copy control methods in opportunistic network
CN105721311A (en) System and method for efficient name-based content routing using link-state information in information-centric networks
CN103188260A (en) Method of implementing content-centric network (CCN) using internet protocol (IP)-based network in gateway, and gateway
Bian et al. Boosting named data networking for efficient packet forwarding in urban VANET scenarios
CN105519053A (en) Dynamic interest forwarding mechanism for information centric networking
CN105872008A (en) System and method for on-demand content exchange with adaptive naming in information-centric networks
CN102035900B (en) NAT (network address translation) traversal method, system and relay server by relay mode
CN103457999A (en) P2P document transmission method based on NDN network architecture
CN102404818B (en) Method for generating and updating routing list of satellite network
CN110072196B (en) Communication method and system for providing block chain oriented application for named data network
CN107181775B (en) Routing method and routing device in content-centric network
CN103888517A (en) Caching method for publishing and subscription system to achieve historical event subscription
CN102037711B (en) Limiting storage messages in peer to peer network
CN104125310B (en) Message method based on semi-permanent address
CN101584192B (en) Node registering method
EP3018871A1 (en) Content name compression method and apparatus
CN101237412B (en) Packet delivery and route selection method
CN100563188C (en) Communicating terminal inserts the method for routing of request in the communication network
KR101144331B1 (en) Time Driven Mesh Overlay Network System and Method for Constructing Time Driven Mesh Overlay Network Using the Same
CN114302259A (en) User information collection method, device, equipment and computer readable storage medium

Legal Events

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