WO2021244206A1 - 报文处理方法、设备、系统及存储介质 - Google Patents
报文处理方法、设备、系统及存储介质 Download PDFInfo
- Publication number
- WO2021244206A1 WO2021244206A1 PCT/CN2021/091881 CN2021091881W WO2021244206A1 WO 2021244206 A1 WO2021244206 A1 WO 2021244206A1 CN 2021091881 W CN2021091881 W CN 2021091881W WO 2021244206 A1 WO2021244206 A1 WO 2021244206A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- igp
- network device
- blockchain
- message
- network
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3236—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
- H04L9/3239—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0817—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/02—Details
- H04L12/16—Arrangements for providing special services to substations
- H04L12/18—Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
- H04L12/1886—Arrangements for providing special services to substations for broadcast or conference, e.g. multicast with traffic restrictions for efficiency improvement, e.g. involving subnets or subdomains
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/50—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
Definitions
- This application relates to the field of network technology, and in particular to a message processing method, device, system, and storage medium.
- a network device usually includes one or more main control boards and one or more interface boards.
- the main control board and the interface board each have one or more central processing units (CPU) or other processors.
- the network device can The message is forwarded through the computing power provided by the processor.
- the average CPU utilization rate of network devices is less than 20%. It can be seen that network devices often have idle computing power, and the utilization rate of computing resources of network devices is not high.
- the embodiments of the present application provide a message processing method, device, system, and storage medium, which can improve the utilization rate of computing resources of network devices.
- the technical solution is as follows:
- a message processing method in which a first network device receives a first interior gateway protocol IGP message, the first IGP message includes a first field, and the first field is used
- the blockchain task is a computing task corresponding to the consensus mechanism of the blockchain network
- the blockchain network includes the first network device; the first network device is based on the The first IGP message obtains input data of the consensus mechanism; the first network device executes the blockchain task according to the input data.
- the above provides a method for building a blockchain network based on IGP.
- IGP a new IGP message used to propagate the blockchain task is provided.
- the network device receives this new IGP message , Can use its own computing power to participate in the execution of blockchain tasks.
- the computing power of network equipment is fully excavated to build a blockchain network, the idle computing power of the network equipment is avoided from being wasted, thus improving the utilization of the computing resources of the network equipment; on the other hand, it can alleviate the blockchain The problem of technology being restricted due to insufficient computing power, thus contributing to the development of blockchain technology.
- the first IGP message includes a link state broadcast LSA header
- the LSA header includes a link state LS type field
- the first field includes the LS type field.
- the network equipment can use the flooding and diffusion mechanism of LSA to realize the spread of blocks in the network.
- the function of the chain task reduces the complexity of the implementation of the plan.
- the first IGP message includes a link state message protocol data unit LSP PDU type field, and the first field includes the LSP PDU type field.
- the network device can use the flooding and diffusion mechanism of the LSP message to achieve the The function of disseminating the blockchain task reduces the complexity of the implementation of the plan.
- the method further includes: determining to execute the blockchain task according to the CPU utilization rate of the first network device being less than a threshold.
- the idle computing power of the network device can be used to start the blockchain task in time, thereby improving the utilization rate of the computing resources of the network device.
- the method further includes: the first network device broadcasts the first IGP message in the IGP domain, and the IGP domain Including the first network device and the second network device.
- the method further includes: the first network device generates a second IGP message, the second IGP message including the execution of the first network device The first block obtained by the blockchain task; the first network device broadcasts the second IGP message in the IGP domain.
- the network device encapsulates the formed block into an IGP message and broadcasts the IGP message after executing the blockchain task, so as to quickly propagate the block generated by the device to the entire block
- the chain network is convenient for the block chain network to reach consensus on the block.
- the method further includes:
- the first network device verifies the second block
- the first network device stores the second block on the blockchain.
- the first network device verifies the blocks and uploads the blocks based on the consensus mechanism, thereby realizing the blockchain The accounting function.
- the method before the first network device receives the first interior gateway protocol IGP message, the method further includes:
- the first network device creates an IGP process, and the IGP process is used to transmit the information associated with the blockchain task in the IGP domain.
- the configuration is changed on the original IGP network, and the IGP process is added to realize the transmission of blockchain network information.
- the configuration is simple and the implementation complexity is low.
- the method further includes: if the CPU utilization of the central processing unit of the first network device is greater than a threshold, the first network device stops executing the blockchain task.
- the blockchain calculation can be stopped in time when the network equipment load is high, so that the computing power of the network equipment is reserved for the forwarding task, so as to avoid the implementation of the blockchain task that affects the forwarding task. Circumstances, to ensure the forwarding performance of the network equipment.
- a message processing method in response to a storage request.
- the first IGP message includes a first field, and the first IGP message includes a first field.
- a field is used to indicate the execution of a blockchain task.
- the blockchain task is a calculation task corresponding to the consensus mechanism of the blockchain network; the gateway device sends the first IGP message.
- the above provides a method for constructing a blockchain network based on IGP.
- IGP a new IGP message used to propagate blockchain tasks is provided.
- the gateway device propagates this new message in the IGP domain.
- IGP messages so that network devices use their own computing power to participate in the execution of blockchain tasks.
- the computing power of network equipment is fully excavated to build a blockchain network, the idle computing power of the network equipment is avoided from being wasted, thus improving the utilization of the computing resources of the network equipment; on the other hand, it can alleviate the blockchain The problem of technology being restricted due to insufficient computing power, thus contributing to the development of blockchain technology.
- the sending of the first IGP message by the gateway device includes:
- the gateway device broadcasts the first IGP message in an IGP domain, and the IGP domain includes multiple network devices.
- the first interface of the gateway device is configured to receive the storage request
- the second interface of the gateway device is configured to receive the consensus algorithm required to execute the blockchain task
- the gateway device The third interface of is configured to allocate computing power to the blockchain task
- the fourth interface of the gateway device is configured to process IGP packets.
- the method further includes:
- the gateway device executes the blockchain task according to the input data.
- the method further includes:
- the gateway device receives a second IGP message, where the second IGP message includes a block obtained by the network device executing the blockchain task;
- the gateway device verifies the block
- the gateway device stores the block on the blockchain.
- the first IGP message includes a link state broadcast LSA header
- the LSA header includes a link state LS type field
- the first field includes the LS type field.
- the first IGP message includes a link state message protocol data unit LSP PDU type field, and the first field includes the LSP PDU type field.
- a network device in a third aspect, has the function of realizing packet processing in the first aspect or any one of the optional methods of the first aspect.
- the network device includes at least one unit, and at least one unit is configured to implement the packet processing method provided in the first aspect or any one of the optional manners in the first aspect.
- a gateway device in a fourth aspect, has the function of realizing packet processing in the second aspect or any one of the optional manners in the second aspect.
- the gateway device includes at least one unit, and at least one unit is configured to implement the message processing method provided in the second aspect or any one of the optional manners of the second aspect.
- a network device in a fifth aspect, includes a processor and a communication interface, and the processor is configured to execute instructions so that the network device executes the first aspect or any one of the optional methods provided in the first aspect.
- the communication interface is used to receive or send messages.
- a gateway device in a sixth aspect, includes a processor and a communication interface, and the processor is configured to execute instructions so that the gateway device executes the message provided in the second aspect or any one of the optional methods in the second aspect. Processing method, the communication interface is used to receive or send messages.
- a computer-readable storage medium stores at least one instruction, and the instruction is read by a processor to make a network device execute the first aspect or any one of the optional methods of the first aspect The provided message processing method.
- a computer-readable storage medium stores at least one instruction, and the instruction is read by a processor to enable a gateway device to execute the second aspect or any of the optional manners of the second aspect The provided message processing method.
- a computer program product is provided.
- the network device executes the message processing method provided in the first aspect or any one of the optional methods in the first aspect.
- a computer program product is provided.
- the gateway device executes the message processing method provided in the second aspect or any of the optional manners in the second aspect.
- a chip is provided, when the chip runs on a network device, the network device executes the packet processing method provided in the first aspect or any one of the optional methods in the first aspect.
- a chip is provided.
- the gateway device executes the message processing method provided in the second aspect or any one of the optional manners in the second aspect.
- a network system in a thirteenth aspect, includes a network device and a gateway device.
- the network device is configured to execute the method described in the first aspect or any one of the optional methods of the first aspect.
- the gateway device It is used to execute the method described in the above second aspect or any one of the optional manners of the second aspect.
- a network device in a fourteenth aspect, includes a main control board and an interface board, and further, may also include a switching network board.
- the network device is used to execute the method in the first aspect or any optional manner of the first aspect.
- the network device includes a unit for executing the method in the first aspect or any optional manner of the first aspect.
- an inter-process communication protocol (IPC) channel is established between the main control board and the interface board in the network device, and the main control board and the interface board are communicated through the IPC channel. Communication.
- IPC inter-process communication protocol
- a gateway device in a fifteenth aspect, includes a main control board and an interface board, and further, may also include a switching network board.
- the gateway device is used to execute the method in the second aspect or any optional manner of the second aspect.
- the gateway device includes a unit for executing the method in the second aspect or any optional manner of the second aspect.
- an IPC channel is established between the main control board and the interface board in the gateway device, and the main control board and the interface board communicate through the IPC channel.
- Fig. 1 is a schematic diagram of implementing decentralized bookkeeping based on a blockchain network provided by an embodiment of the present application
- Figure 2 is a schematic diagram of a blockchain technology provided by an embodiment of the present application.
- FIG. 3 is a schematic diagram of a system architecture provided by an embodiment of the present application.
- FIG. 4 is a schematic diagram of a system architecture provided by an embodiment of the present application.
- FIG. 5 is a schematic diagram of the format of an IGP message provided by an embodiment of the present application.
- FIG. 6 is a flowchart of a message processing method provided by an embodiment of the present application.
- FIG. 7 is a schematic diagram of a BCGW flooding accounting data to the IGP domain according to an embodiment of the present application.
- FIG. 8 is a schematic diagram of reaching a consensus and completing accounting on the entire network according to an embodiment of the present application.
- FIG. 9 is a flowchart of a method for blockchain calculation based on IGP according to an embodiment of the present application.
- FIG. 10 is a schematic structural diagram of a network device provided by an embodiment of the present application.
- FIG. 11 is a schematic structural diagram of a gateway device provided by an embodiment of the present application.
- FIG. 12 is a schematic structural diagram of a network device provided by an embodiment of the present application.
- FIG. 13 is a schematic structural diagram of a gateway device provided by an embodiment of the present application.
- FIG. 14 is a schematic structural diagram of a network system provided by an embodiment of the present application.
- the essence of the blockchain network is a shared database.
- the data or information stored in it has the characteristics of “unforgeable”, “full traces”, “traceable”, “open and transparent”, and “collective maintenance”. Based on these characteristics, blockchain technology has laid a solid foundation of "trust”, created a reliable “cooperation” mechanism, and has broad application prospects.
- hash operation digital signature
- P2P peer-to-peer
- consensus algorithm consensus algorithm
- Consensus algorithms can provide this technical mechanism, which can build consistency (build trust) in an environment lacking trust.
- Consensus algorithm is a general term for a class of algorithms, including many specific algorithms.
- a P2P network is a peer-to-peer computer network. It is a distributed application architecture that distributes tasks and workloads among peers. It is a networking or network form formed by a peer-to-peer computing model at the application layer. In a P2P network environment, multiple computers connected to each other are in a peer-to-peer position, and each computer has the same function. There is no distinction between master and slave. One computer can be used as a server and set shared resources for the network. Other computers can be used as workstations. Generally speaking, the entire network does not rely on dedicated centralized servers, nor does it have dedicated workstations. Each computer in the network can not only act as a requester of network services, but also respond to requests from other computers, providing resources, services, and content. Usually these resources and services include: information sharing and exchange, computing resources (such as central processing unit (CPU) computing power sharing), storage sharing (such as the use of cache and disk space), network sharing, printer sharing, etc. .
- computing resources such as central processing unit (C
- hashing is a message digest algorithm or function that compresses messages of any length to a certain fixed length.
- the hash operation is the SHA256 operation.
- the SHA256 operation is a hash operation with a hash value of 256 bits in length, and SHA stands for Secure Hash Algorithm.
- IGP Interior Gateway Protocol
- IGP is a protocol for exchanging routing information between gateways (hosts and routers) in an autonomous network.
- the routing information can be used in Internet Protocol (IP) or other network protocols to explain how routing is carried out.
- IP Internet Protocol
- the IGP protocol includes Routing Information Protocol (RIP), Open Shortest Path First (OSPF), Intermediate System-to-Intermediate System (IS-IS), and internal gateway routing Protocol (Interior Gateway Routing Protocol, IGRP), Enhanced Interior Gateway Routing Protocol (Enhanced Interior Gateway Routing Protocol, EIGRP), Independent Multicast Routing Protocol (Protocol Independent Multicast, PIM).
- RIP Routing Information Protocol
- OSPF Open Shortest Path First
- IS-IS Intermediate System-to-Intermediate System
- IGRP Interior Gateway Routing Protocol
- IGRP Enhanced Interior Gateway Routing Protocol
- EIGRP Enhanced Interior Gateway Routing Protocol
- PIM Protocol Independent Multicast
- the blockchain task is the computing task corresponding to the consensus mechanism of the blockchain network.
- the process of executing the blockchain task is a process of solving a computational problem that is difficult to solve and easy to verify. By solving the computational problem, it is convenient for each node of the blockchain network to reach a "consensus".
- the execution of blockchain tasks usually involves hashing.
- the execution process of a blockchain task includes: iterating a random number through a script. After each iteration, the hash value is calculated according to the current random number to determine whether the hash value is less than the target value. If the hash value is not If it is less than the target value, modify the random number (for example, add one to the random number) and recalculate until the hash value is less than the target value.
- the blockchain task is to "complement a given string, and the result of a hash operation (such as SHA25) of the complemented string is 0", where 0 is an example of the target value.
- the consensus mechanism is, for example, Proof of Work (PoW).
- the calculated random number is the proof of the workload, because it can prove that the device has done enough work and found the correct random number. .
- Figure 1 is an example of the implementation of decentralized accounting for the blockchain network. Centralized.
- the blockchain mainly uses four basic technologies: hash operation (SHA256), digital signature, P2P network and consensus algorithm. Among them, consensus algorithms often require a lot of computing power to unify distributed systems.
- hash operation SHA256
- digital signature digital signature
- P2P network consensus algorithm
- Block chains are divided into public chains and industry chains.
- Public chains such as Bitcoin
- miners supporting the computing power of the blockchain network
- the construction of industry chains requires investment in the construction of proprietary hardware, which costs a lot.
- the operator's infrastructure has a large amount of idle computing power to be tapped and realized.
- the operator’s network infrastructure contains a large amount of idle computing power.
- a municipal-level IP-based mobile access bearer network (IP Radio Access Network, IPRAN) network will have tens of thousands of network devices. Statistics show that the average CPU utilization of these devices is less than 20%, and the discounted capacity of idle computing power reaches the order of tens of millions of yuan/year.
- IP Radio Access Network IP Radio Access Network
- this embodiment provides a method for building a blockchain network based on IGP.
- network equipment can participate in the distributed computing of the blockchain, thereby reusing existing operator network infrastructure construction
- operators can flexibly rent out the idle computing power of network infrastructure for use in the construction of blockchains in vertical industries, create a healthy ecology for the industry, and help the innovation and engineering of blockchain technology in the industry.
- an embodiment of the present application provides a system architecture 100.
- the system architecture 100 is an example of a blockchain network constructed by IGP. Different devices in the system architecture 100 communicate based on IGP. All devices in the system architecture 100 optionally belong to the same IGP domain.
- the system architecture 100 includes at least one gateway device and at least one network device. The gateway device and the network device, and different network devices are connected through a wireless network or a wired network.
- the gateway device is called, for example, a Block Chain Gateway (Block Chain Gate Way, BCGW).
- the gateway devices are BCGW111, BCGW112, BCGW113, and BCGW114 shown in FIG. 3.
- the gateway device is, for example, a dedicated gateway node for the blockchain, which distributes and maintains blockchain tasks in the south direction, and provides interfaces for ordering and subscribing to blockchain data in the north direction.
- the gateway device will join the specific IGP process, and broadcast the blockchain task to the network through the IGP message in the special format shown in Figure 3, or receive the block obtained by executing the blockchain task.
- the form of the gateway device is, for example, a computing device, such as a server, or a router, a switch, and so on.
- the BCGW does not require centralized construction.
- Any network device at any network node can join the IGP domain as a BCGW, and publish blockchain task collection blocks.
- the hardware structure of the gateway device please refer to FIG. 13 and the corresponding description of the gateway device 800.
- the gateway device and the external system are connected through a wireless network or a wired network.
- the external system is not shown in Figure 3.
- External systems refer to other devices or systems that have not joined the IGP domain.
- the external system is a third-party business system or terminal device.
- the external system can send the data to be stored to the gateway device to trigger the following method 300 or method 400, so as to store the data on the blockchain through the blockchain network provided by the system architecture 100.
- the network device is, for example, a router (Router) or a switch.
- the network equipment is the router 121, the router 122, the router 123, the router 124, the router 125, the router 126, the router 127, and the router 128 shown in FIG.
- Network equipment is used to carry forwarding services of the network, and at the same time can use its own idle computing power to participate in blockchain tasks.
- the network device will join the same IGP process as the gateway device by configuring the same IGP process, sending IGP messages to each other, etc., and receive the blockchain task through the IGP message in the special format shown in Figure 5, or to Broadcast the blocks obtained by executing the blockchain task in the network.
- the hardware structure of the network device please refer to FIG. 12 and the corresponding description of the network device 700.
- the software architecture of the network device please refer to FIG. 4 and the corresponding description of the system architecture 200.
- the system architecture 100 is constructed by a network infrastructure provided by an operator, and the gateway device and the network device are both devices in the operator's infrastructure, for example, the network device is a router in an IPRAN network.
- the blockchain network constructed by reusing the operator’s infrastructure can make deep use of the operator’s stock infrastructure for industry chain construction, open up a new stock market, avoid rebuilding blockchain dedicated hardware, and save The cost of building a blockchain network;
- the blockchain network requires stable computing power, it is likely to be subject to 51% attacks to tamper with the ledger, and the blockchain network constructed by reusing the operator’s infrastructure can provide six nines of computing power reliability.
- the geographic coverage of the operator's network is very high, and blockchain users can consume the blockchain services provided by the operator anytime and anywhere.
- the operator has a high degree of automation in the issuance of services, flexible leasing, and time-sharing leasing, providing small and medium-sized enterprises with a choice of low-cost and efficient construction of private chain services.
- the hardware architecture of the blockchain network based on IGP is introduced above, and the software architecture required for the blockchain network based on IGP is introduced below.
- this embodiment provides another system architecture 200.
- the system architecture 200 is an example of a software architecture required for a blockchain network constructed based on IGP.
- the system architecture 200 is deployed on each device in the aforementioned system architecture 100.
- each device in the system architecture 100 can use the software shown in the system architecture 200 to implement the function of the blockchain.
- the system architecture 200 includes a core module 210, a northbound interface module 211, a westbound interface module 212, an eastbound interface module 213, and a southbound interface module 214.
- the northbound interface module 211 is connected to the third-party service system 221.
- the northbound interface module 211 includes a blockchain service definition submodule 2111, a data subscription submodule 2112, a data processing logic orchestration submodule 2113, and a calculation task import submodule 2114.
- the third-party business system 221 needs to keep accounts, it can initiate a request to the northbound interface module 211, and the northbound interface module 211 will create a blockchain task to import the blockchain task into the IGP domain.
- the west interface module 212 is connected to the network infrastructure 222.
- the west interface module 212 includes an IGP protocol stack sub-module 2121 and an IP socket (IP socket) sub-module 2122, so as to perform IGP protocol processing, packet encapsulation domain processing, and the like.
- IP socket IP socket
- the core module 210 includes a digital signature sub-module and a consensus algorithm sub-module.
- the eastbound interface module 213 is connected to the algorithm library 223, can access the algorithm library 223, and obtain the consensus algorithm stored in the algorithm library 223.
- the eastbound interface module 213 includes a script execution container submodule 2131, a preset algorithm submodule 2132, and an algorithm update submodule 2133.
- the algorithm update submodule 2133 is used to update the consensus algorithm. Specifically, because blockchain tasks need to call a wealth of algorithms, and the blockchain has different versions, the specific consensus algorithm will often change according to business needs. By setting the algorithm update submodule 2133, the device can be dynamically updated to execute the blockchain. The algorithm used by the task.
- the southbound interface module 214 communicates with the local hardware system 224, and is used to operate the hardware facilities of the network device to adapt to the blockchain task.
- the southbound interface module 214 includes a Compact Flash (CF) card/hard disk/memory management sub-module 2141, a CPU computing power distribution sub-module 2142, and a redundant hardware disaster recovery management sub-module 2143.
- CF Compact Flash
- the hardware architecture and software architecture of the blockchain network based on IGP are introduced respectively through the system architecture 100 and the system 200.
- several IGP processes are added to the network, and the IGP processes are used to transmit information related to blockchain tasks in the IGP domain.
- the IGP process is used to transmit blockchain tasks, or the IGP process is used to transmit blocks obtained by executing blockchain tasks.
- multiple IGP processes are created on each network device, the first IGP process is dedicated to carrying blockchain tasks, the second IGP process is used to process routing and topology, and the process numbers of the first IGP process and the second IGP process different.
- the IGP process used to transmit information about the blockchain task is an OSPF process.
- an OSPF process is newly added to the network, and the OSPF process is only used to carry blockchain tasks.
- the OSPF process is used to flood through special Link-State Advertisement (LSA) messages.
- LSA Link-State Advertisement
- the ubiquitous blockchain task and is used to publish blocks through special LSA messages.
- OSPF Process ID OSPF Process ID 20 is an example of a newly-added IGP process used to transmit blockchain task-related information.
- the IGP protocol of the network infrastructure is fully reused, and the configuration of the original IGP network can be changed to realize the transmission of blockchain network information, which is easy to quickly deploy blockchain services and easy to maintain.
- a new IGP message is designed, and this new IGP message is used to propagate blockchain tasks.
- the IGP message includes but is not limited to any type of multicast protocol message.
- the IGP message is a protocol message such as ISIS, OSPF, RIP, LLDP, and PIM. Refer to FIG. 5, which shows a schematic diagram of the format of such an IGP message used to propagate the blockchain task.
- the IGP message includes the LSA header and block.
- the LSA header belongs to the standard structure of IGP LSA messages.
- the LSA header includes LS age field, options, LS type field, LS identification (Link-State ID) field, advertising router (Advertising Router) field, LS sequence number (LS Sequence Number) field, LS checksum (LS checksum) field, length (Length) field.
- a block includes a block header and a block body.
- the block header belongs to the standard information header in the blockchain technology.
- the block header includes the version number (version) field, the last block (Last block) field, the blockchain root node (Merkle Root Node) field, the timestamp (timestamp) field, any or non-repeated random that is used only once Number (Number used once or Number once, nonce) field.
- the block header belongs to the payload of the IGP message.
- the version number field is used to indicate the version number, such as the version of the consensus algorithm used by the blockchain task.
- the version number is 32 bytes.
- the size of the block field is, for example, 4 bytes.
- the last block field is used to index to the previous block (that is, the parent block of the current block). For example, the last block field is used to carry the hash value of the last block.
- the size of the previous block field is used to identify the root node of the block chain to which the block belongs, so as to indicate which ledger the block data belongs to.
- the timestamp field is used to indicate the time when the block was generated.
- the nonce field is used to carry random numbers, that is, the hash algorithm problem.
- the size of the nonce field is, for example, 4 bytes.
- the block body is used to carry block data.
- Block data is the data body that needs to be accounted for.
- the block data belongs to the payload of the IGP message.
- the application scenarios of block data include many situations.
- the block data is used to construct an electronic currency transaction system.
- block data is used to store smart contracts.
- the IGP message provided in this embodiment includes a first field, and the first field is used to indicate the execution of a blockchain task.
- the first field includes one or more fields in the IGP message shown in FIG. 5.
- the receiving end such as a network device or a gateway device
- receives an IGP message it can learn that the blockchain task is to be executed by identifying the first field to participate in accounting.
- the first field is a field in the LSA header.
- the first field is a field in the block header.
- the first field includes a field in the LSA and a field in the block header, and the carrying position of the first field in the IGP packet is not limited in this embodiment.
- the IGP message identifies the blockchain task through a new LSA type (LS type).
- the first field includes an LS type field, and the value of the LS type field is used to indicate a blockchain task.
- the value of the LS type field is also called the LSA type number or the LS type value.
- the IGP message that propagates a blockchain task or block is an OSPF LSA message.
- LSA type number 15 use type 15 LSA as a special message for transferring blockchain tasks, and pre-configure it.
- LSA type number 15 LSA use type 15 LSA as a special message for transferring blockchain tasks, and pre-configure it.
- the protocol neighbors broadcast.
- This processing mechanism is similar to the third type of LSA (summary LSA, LS Type is 3).
- the difference from the third type of LSA is that the third type of LSA carries routing information, and the 15th type of LSA carries blockchain tasks. . After all network devices or gateway devices receive the OSPF LSA message, they recognize the value of the LS type field.
- the OSPF LSA message is used to transfer blockchain tasks or Of the calculated block.
- 15 is an example of a newly applied LSA type number.
- the blockchain task is identified by other unoccupied LSA type numbers other than 15, and this embodiment takes the specific LS type field The value is not limited.
- the IGP message that propagates the blockchain task or block is the Link State Protocol (LSP) message, and the LSP message passes through the new LSP protocol data unit (Presentation Protocol Data Unit, PDU).
- LSP PDU type identifies the blockchain task.
- the IGP message includes the LSP PDU type field, and the LSP PDU type field is used to identify the type of the PDU.
- the first field includes the LSP PDU type field.
- LSP PDU type 155 as a special LSP message for delivering blockchain tasks, and pre-configure it.
- the processing mechanism is the same as other types of LSP packets.
- 155 is an example of the newly applied LSA type number.
- the blockchain task is identified by other unoccupied LSP PDU type numbers other than 155. The specific value is not limited.
- the first field only includes the LS type field.
- the first field includes not only the LS type field, but also other fields besides the LS type field.
- the first field only includes the LSP PDU type field.
- the first field includes not only the LSP PDU type field, but also other fields except the LSP PDU type field.
- the first field includes an LS type field and a nonce field
- the nonce field is an example of fields other than the LS type field in the first field.
- the receiving end After receiving the IGP message, the receiving end identifies the LS type field and the nonce field in the IGP message, judges whether the value of the LS type field is the LSA type number (such as 15) related to the newly applied blockchain, and judges the nonce field Whether it has a value. If the value of the LS type field is the LSA type number related to the newly applied blockchain and the nonce field has no value, the receiving end determines that the node needs to perform the blockchain task.
- the LSA type number such as 15
- the receiving end determines that the IGP message contains blocks published by other nodes, and verifies the value of the nonce field. If it is verified that the value of the nonce field is correct, the receiving end keeps the account.
- Figure 5 is a message format for propagating a blockchain task based on the OSPF protocol.
- this embodiment does not limit the format of the IGP message used to propagate the blockchain task or block to be exactly the same as in FIG. 5.
- the format of the message may be different from that of FIG. 5.
- the LSA header in Figure 5 can be replaced with general-purpose multicast protocols such as ISIS, RIP, LLDP, and PIM. Header.
- the type field in the general header of other IGP protocols is used to indicate the area. Block chain task, or extend a new bit (such as a flag field), new type length value (TLV) or new option in the general header of other IGP protocols to indicate the blockchain task.
- the above describes the hardware architecture, software architecture, and message format of the IGP message provided by the embodiments of this application.
- the following uses methods 300 to 400 to exemplify the construction of a blockchain network based on the system architecture and IGP messages provided above. Method flow.
- FIG. 6 is a flowchart of a message processing method 300 according to an embodiment of the present application.
- the method 300 is executed by a device in the system architecture 100.
- the gateway device in the method 300 is the BCGW111, BCGW112, BCGW113, or BCGW114 shown in FIG. 3
- the first network device or the second network device in the method 300 is the router 121, the router 122, and the router shown in FIG. 3 123, router 124, router 125, router 126, router 127, or router 128.
- each step in the method 300 is implemented based on each unit of the system architecture 200 described above.
- the first interface of the gateway device is configured to receive storage requests.
- the gateway device receives the storage request sent by the third-party business system through the northbound interface module 211, and thus executes the following step S301.
- the second interface of the gateway device is configured to receive the consensus algorithm required to execute the blockchain task
- the third interface of the gateway device is configured to allocate computing power to the blockchain task.
- the gateway device accesses the algorithm library through the east interface module 213 to obtain a consensus algorithm, and accesses the local CPU through the south interface module 214, and allocates the CPU computing power to the blockchain task, thereby executing the blockchain task.
- the fourth interface of the gateway device is configured to process IGP packets.
- the gateway device processes the IGP common header part of the IGP message through the IGP protocol stack sub-module in the west interface module 212.
- the first interface is a northbound interface; the second interface is an eastbound interface; the third interface is a southbound interface; and the fourth interface is a westbound interface.
- the blockchain task is executed by the CPU on the main control board or the CPU on the interface board.
- an embedded neural network processor (Neural-network Processing Unit, NPU) on the interface board is used to execute the blockchain task.
- NPU Neuro-network Processing Unit
- other processors suitable for hash operations may be used to perform blockchain tasks, and this embodiment does not impose restrictions.
- different processors can also be used to undertake processing tasks corresponding to different steps, for example, one processor is used to forward messages, and another processor is used to perform blockchain tasks.
- the method 300 includes S301 to S312.
- the gateway device receives a storage request.
- the storage request is used to instruct to store data on the blockchain, and the storage request includes the data to be stored.
- the data to be stored can be referred to as a transaction
- the action of storing the data can be referred to as accounting
- the storage request can be referred to as an accounting request
- the data will eventually be in the form of blocks Stored on the blockchain.
- the storage request received by the gateway device comes from an external system located outside the IGP domain. The external system generates the storage request, sends the storage request to the gateway device, and the gateway device receives the storage request.
- the gateway device generates a first IGP message in response to the storage request.
- each time the gateway device receives a storage request it generates an IGP message in response to the storage request, thereby triggering the blockchain task in real time with the received storage request.
- the gateway device when the gateway device receives the storage request, it starts a timer, and every time the time elapses after a preset period of time, it generates an IGP packet in response to the storage request, thereby periodically triggering the block Chain task.
- the first IGP message includes the first field, so the first IGP message can instruct the receiving end to perform the blockchain task.
- the gateway device parses the storage request, obtains the data included in the storage request, carries the data in the block body part shown in FIG. 5, and obtains the first IGP message.
- the gateway device sends the first IGP message.
- the gateway device broadcasts the first IGP message in the IGP domain.
- the IGP domain includes multiple network devices. After the first IGP message is broadcast in the IGP domain, the data to be stored in the first IGP message will be sent to each of the multiple network devices. , So every network device can get data and participate in the execution of blockchain tasks.
- the first network device receives the first IGP message.
- the first network device broadcasts the first IGP packet in the IGP domain.
- OSPF, ISIS, RIP, LLDP, PIM and other IGP messages are multicast protocol messages
- the MAC frame header of the multicast protocol message includes a specific multicast MAC address, or the IP header includes a specific multicast IP address Therefore, after receiving the first IGP message, the first network device will copy and broadcast the first IGP message, and propagate the first IGP message to each neighbor device of the first network device in the IGP domain. After receiving the first IGP message, the neighboring device of the first network device will also copy and broadcast the first IGP message, and send the first IGP message to the neighboring device of the node, and so on, and finally in the IGP domain Each network device in will receive the first IGP message.
- the first IGP packet is an OSPF LSA packet of type 15 LSA, which uses flooding to advertise the type 15 LSA to all network devices in the IGP domain so that all network devices in the IGP domain can participate in the completion area
- the accounting task of the blockchain Referring to Figure 7, after receiving an accounting task, the BCGW 111 generates an OSPF LSA message carrying transaction data, and sends the OSPF LSA message to the router 121. After that, router 121 sends OSPF LSA messages to neighboring router 122 and router 123. After that, the router 122 sends an OSPF LSA message to the neighboring router 123 and router 124. After that, router 123 and router 124 respectively send OSPF LSA messages to each other’s neighbors. Finally, all network devices in the IGP domain have received OSPF LSA messages. In other words, BCGW111 combines the blockchain tasks and the data to be accounted. Flooding to all network devices in the IGP domain.
- the first network device obtains input data of the consensus mechanism according to the first IGP message.
- the input data of the consensus mechanism refers to the input data of the consensus algorithm of the blockchain, that is, the data required to calculate the nonce.
- the input data of the consensus mechanism includes the data in the block header in the first IGP message, such as the hash value carried in the root node field of the blockchain and the previous block hash value carried in the previous block field.
- the first network device recognizes the first field in the first IGP message, and according to the value of the first field, determines that the blockchain task needs to be executed, and then obtains the consensus mechanism input from the first IGP message Data, and then perform blockchain tasks. For example, the first network device identifies the LS type field and the nonce field in the first IGP message, determines that the LS type field carries a new LSA type number for identifying the blockchain task, and the nonce field has no value, then the first Network equipment participates in the execution of blockchain tasks.
- the input data of the consensus mechanism all come from the first IGP message. In other embodiments, part of the input data of the consensus mechanism comes from the first IGP message, and part is obtained locally by the first network device.
- the first network device executes the blockchain task according to the input data.
- the first network device performs a hash operation according to the input data to obtain a hash value; the first network device determines whether the hash value is less than the target value (the target value is, for example, 0); if the hash value is not less than the target value Value, the first network device modifies the random number (for example, adds one to the random number), and performs the hash operation again until the hash value is less than the target value.
- the first network device judges whether to execute the blockchain task according to the current CPU utilization. For details, refer to the following cases 1 to 2.
- Case 1 In the process of executing the blockchain task, the first network device detects the CPU utilization rate and judges whether the CPU utilization rate is greater than the threshold. If the CPU utilization of the first network device is greater than the threshold, the first network device stops executing the blockchain task.
- the threshold is denoted as "cpu-limit", for example, and the threshold is, for example, 50%.
- the blockchain calculation can be stopped in time when the network equipment load is high, so that the computing power of the network equipment is reserved for the forwarding task, so as to avoid the situation that the forwarding task is affected by the execution of the blockchain task. Ensure the forwarding performance of network equipment.
- Case 2 After the first network device suspends the blockchain task, it continues to detect the CPU utilization. If the CPU utilization of the first network device is less than the threshold, the first network device continues to execute the blockchain task. In this way, when the network device changes from busy to idle, the idle computing power of the network device can be used for blockchain calculation in time.
- the first network device can flexibly choose whether to participate in the blockchain task according to the current computing power of the device, and prioritize the use of computing power to perform forwarding tasks when it is busy, and use computing power to perform when it is idle Blockchain tasks, which effectively combine the two types of tasks, forwarding tasks and blockchain tasks, fully improve the utilization of network equipment's computing resources.
- S308 The first network device generates a second IGP message.
- each device (such as a network device and a gateway device) in the IGP domain will participate in the execution of blockchain tasks.
- a device in the IGP domain calculates the result based on the consensus algorithm (that is, calculates the correct random number)
- the device will package the calculation result and transaction data together to form the current block, and encapsulate this block into the IGP message , Broadcast the IGP message carrying the block in the IGP domain, so as to spread the block generated by this device to the entire blockchain network.
- each device in the blockchain network After each device in the blockchain network receives a block, it will verify the calculation result. If the verification is successful and the consensus is reached, each device will store the block in the blockchain.
- this embodiment will separately introduce the first network device to calculate the result first, and the first network device other than the first network device to calculate the result first.
- the blocks generated by the first network device are called the first block
- the blocks generated by the second network device are called the second block
- the blocks generated by the gateway device are called the second block.
- the block is called the third block.
- the value description is that the words “first”, “second” and “third” in the terms “first block”, “second block”, and “third block” are used to distinguish different Blocks do not limit the arrangement of blocks on the blockchain.
- the first network device calculates the result first
- the first network device obtains the first block after executing the blockchain task, and generates the second IGP message according to the first block.
- the second IGP message includes the first block
- the first block includes the random number and transaction data calculated by the first network device.
- the random number calculated by the first network device is carried by the nonce field of the block header part of the second IGP message.
- the transaction data is carried by the block body part of the second IGP message.
- the second IGP message further includes an LSA header.
- the LSA header in the second IGP packet is the same as the LSA header in the first IGP packet.
- the first network device broadcasts the second IGP packet in the IGP domain.
- the second network device in the IGP domain receives the second IGP message, obtains the first block from the second IGP message, and verifies the first block. If the first block is verified and reached a consensus, the second network device stores the first block on the blockchain.
- the second network device identifies the LS type field and the nonce field in the second IGP message, determines that the LS type field carries a new LSA type number for identifying the blockchain task, and the nonce field has a value, then the second If the network device determines that the second IGP message contains a block issued by another node, the second network device verifies the value of the nonce field, and if the value of the nonce field is verified to be correct, the second network device performs accounting.
- the second network device when the second network device first calculates the result, after the second network device executes the blockchain task, the second block is obtained, and the third IGP message is generated according to the second block.
- the third IGP message includes the second block, and the second block includes the random number and transaction data calculated by the second network device.
- the random number calculated by the second network device is carried by the nonce field of the block header part of the third IGP message.
- the transaction data is carried by the block body part of the third IGP message.
- the second network device broadcasts the third IGP message in the IGP domain.
- the first network device receives the third IGP message from the second network device; the first network device verifies the second block; if the verification of the second block passes and the consensus is reached, the first network device stores the second block in On the blockchain.
- the gateway device receives the second IGP message, obtains the first block from the second IGP message, and verifies the first block. If the first block is verified and passed the consensus, the gateway device stores the first block on the blockchain.
- the gateway device receives the third IGP message, obtains the second block from the third IGP message, and verifies the second block. If the second block is verified and passed the consensus, the gateway device stores the second block on the blockchain.
- the gateway device not only spreads the data to be stored to the network device, but also participates in the execution of the blockchain task. Specifically, the gateway device obtains the input data of the consensus mechanism; the gateway device executes the blockchain task according to the input data.
- the gateway device calculates the result first, after the gateway device executes the blockchain task, the third block is obtained, and the fourth IGP message is generated according to the third block.
- the fourth IGP message includes the third block, and the third block includes the random number and transaction data calculated by the gateway device.
- the random number calculated by the gateway device is carried by the nonce field of the block header part of the fourth IGP message.
- the transaction data is carried by the block body part of the fourth IGP message.
- the gateway device broadcasts the fourth IGP message in the IGP domain.
- the network device in the IGP domain receives the fourth IGP message, obtains the third block from the fourth IGP message, and verifies the third block. If the third block is verified and reached a consensus, the network device stores the third block on the blockchain.
- the gateway device sends the accounting result.
- the gateway device may return the accounting result to the sender of the storage request, for example, sending the accounting result to the external system.
- the accounting result is, for example, a blockchain that stores transaction data, that is, the entire "ledger".
- FIG. 8 is a schematic diagram of reaching a consensus on the entire network and completing accounting.
- FIG. 8 takes the first calculation result of the router 124 as an example for illustration. Specifically, the router 124 first completes the calculation of the consensus algorithm (guessing the correct random number), and broadcasts the block to the entire network through a special LSA message. After other nodes verify that they are correct, they join the blockchain and stop their own calculation tasks. , Which is equivalent to the IGP domain's entire network equipment reaching a consensus to complete an accounting.
- the above-described blockchain task and block transmission process are implemented through an IGP process.
- the first network device, the second network device, and the gateway device all create an IGP process in advance.
- the gateway device sends the first IGP message through the IGP process running on the gateway device.
- the first network device receives the first IGP message through the IGP process running on the first network device, and sends the second IGP message through the IGP process running on the first network device.
- the second network device receives the first IGP message through the IGP process running on the second network device, and sends the third IGP message through the IGP process running on the second network device.
- S305 and S306 to S307 are executed sequentially. For example, execute S305 first, and then execute S306 to S307; execute S306 to S307 first, and then execute S305.
- S305 is executed in parallel with S306 to S307, that is, S305 and S306 to S307 are executed simultaneously.
- This embodiment provides a method for constructing a blockchain network based on IGP.
- IGP IGP-based on GP.
- the network device receives this new IGP message.
- the computing power of network equipment is fully excavated to construct a blockchain network, the idle computing power of network equipment is avoided from being wasted, thus improving the utilization rate of computing resources of network equipment; on the other hand, it can alleviate the blockchain network.
- the problem of technology being restricted due to insufficient computing power, thus contributing to the development of blockchain technology.
- the method 300 is illustrated below by using the method 400 as an example.
- the gateway device is a BCGW.
- the network device is Router.
- the method flow described in method 400 is about how BCGW and Router implement blockchain calculation based on IGP. It should be understood that the steps of the method 400 and the method 300 are the same, please refer to the method 300, and the method 400 will not be repeated.
- FIG. 9 is a flowchart of a method 400 for performing blockchain calculation based on IGP according to an embodiment of the application.
- IGP message propagated in the method 400 please refer to the corresponding introduction in FIG. 5.
- the method 400 includes S401 to S406.
- the BCGW imports an accounting request from an external system, generates a blockchain task, encapsulates an IGP message, and broadcasts a special type of IGP message to the Router.
- the router receives a special type of IGP message, and broadcasts the IGP message to other neighboring routers.
- the Router obtains the blockchain task from the IGP message, and calls local computing resources to process the blockchain task.
- the Router which first completes the blockchain task, encapsulates the block into an IGP message, and broadcasts the IGP message on the network, thereby publishing the block.
- the Router receives the IGP message containing the block and verifies that the block is correct, indicating that other Routers have preemptively calculated the random number and stopped the local blockchain task.
- the BCGW receives the IGP message containing the block, verifies that the block is correct, stops the local blockchain task, and submits the accounting result to the external system.
- the method 300 or method 400 of the embodiment of the present application is described above, and the network device of the embodiment of the present application is described below.
- the network device described below has any function of the first network device or the second network device in the method 300, or has the method Any function of Router in 400.
- the gateway device described below has any function of the gateway device or the second gateway device in the method 300 or the method 400, or has any function of the BCGW in the method 400.
- Fig. 10 is a schematic structural diagram of a network device 500 provided by an embodiment of the present application.
- the network device 500 includes: a receiving unit 501 for performing S304; a processing unit 502 for performing S306 and S307 .
- the network device 500 further includes: a broadcasting unit, configured to perform S305 or S309.
- the processing unit 502 is configured to perform S308.
- the processing unit 502 is configured to determine to execute the blockchain task according to the CPU utilization of the network device 500 being less than a threshold.
- the receiving unit 501 is further configured to receive the second IGP message or the third IGP message;
- the processing unit 502 is configured to verify the first block or the second block; if the first block is verified and passes consensus, the first block is stored on the blockchain, or if the first block is verified The second block is verified and agreed, and the second block is stored on the blockchain.
- the processing unit 502 is configured to create an IGP process.
- the processing unit 502 is configured to stop executing the blockchain task if the CPU utilization rate of the network device 500 is greater than a threshold.
- the network device 500 corresponds to the first network device or the second network device in the foregoing method embodiment, and each unit in the network device 500 and the foregoing other operations and/or functions are used to implement the method 300 or the method 400, respectively.
- the various steps and methods implemented by a network device or a second network device for specific details, please refer to the method 300 or the method 400 described above. For brevity, the details are not repeated here.
- the network device 500 processes messages, only the division of the above-mentioned functional units is used as an example. In practical applications, the above-mentioned functions can be allocated by different functional units as required, that is, the internal structure of the network device 500 Divide into different functional units to complete all or part of the functions described above.
- the network device 500 provided in the foregoing embodiment belongs to the same concept as the foregoing method 300 or method 400. For the specific implementation process, refer to the method 300 or the method 400, which will not be repeated here.
- Fig. 11 is a schematic structural diagram of a gateway device 600 provided by an embodiment of the present application.
- the gateway device 600 includes: a processing unit 601 for performing S302; and a sending unit 602 for performing S303.
- the sending unit 602 is configured to broadcast the first IGP message in the IGP domain, where the IGP domain includes multiple network devices.
- the first interface of the gateway device 600 is configured to receive a storage request
- the second interface of the gateway device 600 is configured to receive a consensus algorithm required to execute the blockchain task
- the third interface of the gateway device 600 is configured to To allocate computing power to the blockchain task
- the fourth interface of the gateway device 600 is configured to process IGP packets.
- the processing unit 601 is configured to perform S306 and S307.
- the gateway device 600 further includes: a receiving unit for performing S311; a processing unit 601 for verifying the block; and a processing unit 601 for storing the block in On the blockchain.
- gateway device 600 corresponds to the gateway device in the foregoing method embodiment, and the units in the gateway device 600 and the foregoing other operations and/or functions are used to implement various steps implemented by the gateway device in the method 300 or the method 400, respectively.
- the gateway device 600 corresponds to the gateway device in the foregoing method embodiment, and the units in the gateway device 600 and the foregoing other operations and/or functions are used to implement various steps implemented by the gateway device in the method 300 or the method 400, respectively.
- the method 300 or the method 400 mentioned above please refer to the method 300 or the method 400 mentioned above. For the sake of brevity, it will not be repeated here.
- the gateway device 600 processes messages, only the division of the above-mentioned functional units is used as an example. In actual applications, the above-mentioned function allocation can be completed by different functional units as required, that is, the internal structure of the gateway device 600 Divide into different functional units to complete all or part of the functions described above.
- the gateway device 600 provided in the foregoing embodiment belongs to the same concept as the foregoing method 300 or method 400. For the specific implementation process, please refer to the method 300 or the method 400, which will not be repeated here.
- the hardware structure of the network device is introduced below.
- the network device 700 corresponds to the first network device or the second network device of the above method 300; or, the network device 700 corresponds to the Router in the method 400, and the hardware, modules and other operations and/or functions in the network device 700 are respectively
- the detailed process of how the network device 700 builds a blockchain network based on IGP can refer to the above method 300 or method 400 for specific details. It's concise, so I won't repeat it here.
- the steps of the method 300 or the method 400 are completed by hardware integrated logic circuits in the processor of the network device 700 or instructions in the form of software.
- the steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
- the software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
- the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware. In order to avoid repetition, it will not be described in detail here.
- the network device 700 corresponds to the network device 500 shown in FIG. 10, and each unit in the network device 500 is implemented by software of the network device 700. In other words, the units included in the network device 500 are generated after the processor of the network device 700 reads the program code stored in the memory.
- FIG. 12 shows a schematic structural diagram of a network device 700 provided by an exemplary embodiment of the present application.
- the network device 700 may be configured as a first network device or a second network device.
- the network device 700 includes: a main control board 710 and an interface board 730.
- the main control board is also called the main processing unit (MPU) or the route processor card.
- the main control board 710 is used to control and manage the various components of the network device 700, including route calculation and device management. , Equipment maintenance, protocol processing functions.
- the main control board 710 includes a central processing unit 711 and a memory 712.
- the interface board 730 is also called a line processing unit (LPU), a line card (line card), or a service board.
- the interface board 730 is used to provide various service interfaces and implement data packet forwarding.
- Service interfaces include, but are not limited to, Ethernet interfaces, POS (Packet over SONET/SDH) interfaces, etc.
- the Ethernet interfaces are, for example, Flexible Ethernet Clients (Flexible Ethernet Clients, FlexE Clients).
- the interface board 730 includes a central processor 731, a network processor 732, a forwarding entry memory 734, and a physical interface card (PIC) 733.
- PIC physical interface card
- the central processing unit 731 on the interface board 730 is used to control and manage the interface board 730 and communicate with the central processing unit 711 on the main control board 710.
- the network processor 732 is used to implement message forwarding processing.
- the form of the network processor 732 may be a forwarding chip.
- the network processor 732 is configured to forward the received message based on the forwarding table stored in the forwarding table entry memory 734, and if the destination address of the message is the address of the network device 700, the message is sent to the CPU (such as the central processing unit 711) processing; if the destination address of the message is not the address of the network device 700, the next hop and outbound interface corresponding to the destination address are found from the forwarding table according to the destination address, and the message is forwarded to The outgoing interface corresponding to the destination address.
- the processing of the upstream message includes: the processing of the inbound interface of the message, the lookup of the forwarding table; the processing of the downstream message: the lookup of the forwarding table, and so on.
- the physical interface card 733 is used to implement the docking function of the physical layer, the original traffic enters the interface board 730 from this, and the processed packets are sent from the physical interface card 733.
- the physical interface card 733 is also called a daughter card, which can be installed on the interface board 730, and is responsible for converting the photoelectric signal into a message, checking the validity of the message, and forwarding it to the network processor 732 for processing.
- the central processing unit can also perform the functions of the network processor 732, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 732 is not required in the physical interface card 733.
- the network device 700 includes multiple interface boards.
- the network device 700 further includes an interface board 740.
- the interface board 740 includes a central processing unit 741, a network processor 742, a forwarding entry memory 744, and a physical interface card 743.
- the network device 700 further includes a switching network board 720.
- the switch fabric unit 720 may also be referred to as a switch fabric unit (SFU).
- SFU switch fabric unit
- the switching network board 720 is used to complete data exchange between the interface boards.
- the interface board 730 and the interface board 740 may communicate with each other through the switching network board 720.
- the main control board 710 and the interface board 730 are coupled.
- the main control board 710, the interface board 730, the interface board 740, and the switching network board 720 are connected to the system backplane through the system bus to achieve intercommunication.
- an inter-process communication protocol (IPC) channel is established between the main control board 710 and the interface board 730, and the main control board 710 and the interface board 730 communicate through the IPC channel.
- IPC inter-process communication protocol
- the network device 700 includes a control plane and a forwarding plane.
- the control plane includes a main control board 710 and a central processing unit 731.
- the forwarding plane includes various components that perform forwarding, such as a forwarding entry memory 734, a physical interface card 733, and network processing. ⁇ 732.
- the control plane performs functions such as routers, generation of forwarding tables, processing of signaling and protocol messages, configuration and maintenance of the status of the equipment, etc.
- the control plane issues the generated forwarding tables to the forwarding plane.
- the network processor 732 is based on the control plane.
- the issued forwarding table looks up and forwards the message received by the physical interface card 733.
- the forwarding table issued by the control plane can be stored in the forwarding entry storage 734. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.
- the network device 700 is used to perform S304 to S309 described above.
- how the network device 700 performs S304, S306, and S307 includes multiple implementation manners.
- the physical interface card 733 receives the first IGP message, and the physical interface card 733 sends the first IGP message to the central processing unit 711 on the main control board 710, and the central processing unit 711 responds to the first IGP report.
- Text obtain the input data of the consensus mechanism, and execute the blockchain task according to the input data.
- the physical interface card 733 receives the first IGP message, and the physical interface card 733 sends the first IGP message to the central processing unit 731 on the interface board 730, and the central processing unit 731 reports the first IGP message according to the Text, obtain the input data of the consensus mechanism, and execute the blockchain task according to the input data.
- the physical interface card 733 receives the first IGP message, and the physical interface card 733 sends the first IGP message to the NPU on the interface board 730 (the NPU is not shown in FIG. 12), and the NPU According to the first IGP message, the input data of the consensus mechanism is obtained, and the blockchain task is executed according to the input data.
- the process of how the network device 700 executes the processing of the third IGP message includes multiple implementation manners.
- the physical interface card 733 receives the third IGP message, and the physical interface card 733 sends the third IGP message to the central processing unit 711 on the main control board 710, and the central processing unit 711 responds to the second block Perform verification; if the second block is verified and passed through consensus, the central processing unit 711 stores the second block on the blockchain. For example, the block chain is stored in the memory 712, and the second block is written to the block chain stored in the memory 712.
- the physical interface card 733 receives the third IGP message, and the physical interface card 733 sends the third IGP message to the central processing unit 731 on the interface board 730, and the central processing unit 731 performs processing on the second block. Verification; if the second block is verified and passed a consensus, the central processing unit 731 stores the second block on the blockchain. For example, the block chain is stored in the forwarding entry storage 534, and the second block is written to the blockchain stored in the forwarding entry storage 534.
- how the network device 700 performs S308 and S309 includes multiple implementation manners.
- the network processor 732 generates the second IGP packet, and sends the second IGP packet from the physical interface card 733 after the link layer encapsulation is completed according to information such as the outgoing interface.
- the network device 700 is used to perform the above-mentioned S310.
- the physical interface card 733 receives the second IGP message, and the physical interface card 733 sends the second IGP message to the central processing unit 711 on the main control board 710, and the central processing unit 711 responds to the first block Perform verification; if the first block is verified and the consensus is reached, the central processing unit 711 stores the first block on the blockchain. For example, the block chain is stored in the memory 712, and the first block is written to the block chain stored in the memory 712.
- the physical interface card 733 receives the second IGP message, the physical interface card 733 sends the second IGP message to the central processing unit 731 on the interface board 730, and the central processing unit 731 performs processing on the first block. Verification; if the first block is verified and passed a consensus, the central processing unit 731 stores the first block on the blockchain. For example, the block chain is stored in the forwarding entry storage 534, and the first block is written to the blockchain stored in the forwarding entry storage 534.
- the operations on the interface board 740 in the embodiment of the present application are consistent with the operations on the interface board 730, and will not be repeated for the sake of brevity.
- the network device 700 in this embodiment may correspond to the first network device or the second network device in each of the foregoing method embodiments, and the main control board 710, interface boards 730, and/or 740 in the network device 700 may implement
- the functions of the first network device or the second network device and/or the various steps implemented in each of the foregoing method embodiments will not be repeated here.
- the receiving unit 501 in the network device 500 is equivalent to the physical interface card 733 or the physical interface card 743 in the network device 700; the processing unit 502 in the network device 500 may be equivalent to the central processing unit 711 and the central processing unit 711 in the network device 700
- main control boards there may be one or more main control boards, and when there are more than one, it can include the main main control board and the standby main control board.
- the switching network board may not exist, or there may be one or more. When there are more than one, the load sharing and redundant backup can be realized together. Under the centralized forwarding architecture, the network equipment does not need to switch the network board, and the interface board undertakes the processing function of the business data of the entire system.
- the network device can have at least one switching network board, and data exchange between multiple interface boards is realized through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices with a distributed architecture are greater than those with a centralized architecture.
- the form of the network device may also have only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on the one board.
- the central processing unit and the main control board on the interface board The central processing unit on the board can be combined into a central processing unit on this board to perform the functions of the two superimposed.
- This type of equipment has low data exchange and processing capabilities (for example, low-end switches or routers and other networks) equipment).
- the specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
- the hardware structure of the gateway device is introduced below.
- the gateway device 800 corresponds to the gateway device (BCGW) in the above method 300 or the method 400, and each hardware, module and the above other operations and/or functions in the gateway device 800 are respectively implemented by the gateway device (BCGW) in the method embodiment
- BCGW gateway device
- the steps and methods of the gateway device 800 for the detailed process of how to detect the sample file the specific details can be referred to the method 300 or the method 400 mentioned above.
- the steps of the method 300 or the method 400 are completed by hardware integrated logic circuits in the processor of the gateway device 800 or instructions in the form of software.
- the steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
- the software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
- the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware. In order to avoid repetition, it will not be described in detail here.
- the gateway device 800 corresponds to the gateway device 600 in FIG. 11, and each unit in the gateway device 600 is implemented by the software of the gateway device 800. In other words, the unit included in the gateway device 600 is generated after the processor of the gateway device 800 reads the program code stored in the memory.
- FIG. 13 shows a schematic structural diagram of a gateway device 800 provided by an exemplary embodiment of the present application.
- the gateway device 800 is a host, a server, a personal computer, or the like.
- the gateway device 800 can be implemented by a general bus architecture.
- the gateway device 800 includes at least one processor 801, a communication bus 802, a memory 803, and at least one communication interface 804.
- the processor 801 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, or may be one or more integrated circuits used to implement the solutions of the present application, for example , Application-specific integrated circuit (ASIC), programmable logic device (programmable logic device, PLD) or a combination thereof.
- ASIC Application-specific integrated circuit
- PLD programmable logic device
- the aforementioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
- the communication bus 802 is used to transfer information between the aforementioned components.
- the communication bus 802 can be divided into an address bus, a data bus, a control bus, and so on. For ease of presentation, only one thick line is used in FIG. 13, but it does not mean that there is only one bus or one type of bus.
- the memory 803 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, or it can be a random access memory (RAM) or can store information and instructions
- ROM read-only memory
- RAM random access memory
- Other types of dynamic storage devices can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage , CD storage (including compressed CDs, laser disks, CDs, digital universal CDs, Blu-ray CDs, etc.), disk storage media or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures And any other media that can be accessed by the computer, but not limited to this.
- the memory 803 may exist independently, and is connected to the processor 801 through a communication bus 802.
- the memory 803 may also be integrated with the processor 801.
- the communication interface 804 uses any device such as a transceiver for communicating with other devices or a communication network.
- the communication interface 804 includes a wired communication interface, and may also include a wireless communication interface.
- the wired communication interface may be, for example, an Ethernet interface.
- the Ethernet interface can be an optical interface, an electrical interface or a combination thereof.
- the wireless communication interface may be a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof.
- WLAN wireless local area network
- the processor 801 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 13.
- the gateway device 800 may include multiple processors, such as the processor 801 and the processor 805 shown in FIG. 13. Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU).
- the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (such as computer program instructions).
- the gateway device 800 may further include an output device and an input device.
- the output device communicates with the processor 801 and can display information in a variety of ways.
- the output device may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector (projector).
- the input device communicates with the processor 801, and can receive user input in a variety of ways.
- the input device can be a mouse, a keyboard, a touch screen device, or a sensor device.
- the memory 803 is used to store the program code 810 for executing the solution of the present application, and the processor 801 can execute the program code 810 stored in the memory 803. That is, the gateway device 800 can implement the message processing method provided by the method embodiment through the processor 801 and the program code 810 in the memory 803.
- the gateway device 800 in the embodiment of the present application may correspond to the gateway device in the foregoing method embodiments, and the processor 801, the communication interface 804, etc. in the gateway device 800 may implement the functions of the gateway device in the foregoing method embodiments.
- the sending unit 602 in the gateway device 600 is equivalent to the communication interface 804 in the gateway device 800; the processing unit 601 in the gateway device 600 may be equivalent to the processor 801 in the gateway device 800.
- an embodiment of the present application provides a network system 900.
- the system 900 includes: a network device 901 and a gateway device 902.
- the network device 901 is the network device 500 shown in FIG. 10 or the network device 700 shown in FIG. 12
- the gateway device 902 is the gateway device 600 shown in FIG. 11 or the gateway device shown in FIG. 13 800.
- network devices and gateway devices of the various product forms described above respectively have any function of the first network device, the second network device or the gateway device of the foregoing method embodiment, and will not be repeated here.
- the disclosed system, device, and method can be implemented in other ways.
- the device embodiment described above is only illustrative.
- the division of the unit is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not implemented.
- the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.
- the unit described as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments of the present application.
- the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
- the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
- the technical solution of this application is essentially or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium It includes several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods in the various embodiments of the present application.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program code .
- first the terms “first”, “second” and other words are used to distinguish the same or similar items with basically the same function and function. It should be understood that there is no logic or sequence between “first” and “second” The dependence relationship on the above does not limit the quantity and execution order. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another.
- the first network device may be referred to as the second network device, and similarly, the second network device may be referred to as the first network device. Both the first network device and the second network device may be network devices, and in some cases, may be separate and different network devices.
- the computer program product includes one or more computer program instructions.
- the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
- the computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
- the computer program instructions can be passed from a website, computer, server, or data center.
- the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media.
- the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a digital video disc (DVD), or a semiconductor medium (for example, a solid state hard disk).
- the program can be stored in a computer-readable storage medium, as mentioned above.
- the storage medium can be read-only memory, magnetic disk or optical disk, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Environmental & Geological Engineering (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请提供了一种报文处理方法、设备、系统及存储介质,属于网络技术领域。本申请提供了一种基于IGP构建区块链网络的方法,通过对IGP进行扩展,提供一种用于传播区块链任务的新的IGP报文,网络设备接收到这种新的IGP报文时,能够利用自身的算力参与执行区块链任务,由于充分挖掘了网络设备的算力以构建区块链网络,避免网络设备空闲的算力被浪费,因此提高了网络设备的计算资源的利用率。
Description
本申请要求于2020年6月3日提交的申请号为202010496892.4、发明名称为“报文处理方法、设备、系统及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及网络技术领域,特别涉及一种报文处理方法、设备、系统及存储介质。
在网络技术中,路由器、交换机等网络设备是重要的硬件基础设施。网络设备通常包括一个或多个主控板和一个或多个接口板,主控板和接口板上分别具有一个或多个中央处理器(central processing unit,CPU)或者其他处理器,网络设备能够通过处理器提供的算力进行报文的转发处理。
经过大数据统计,时下网络设备的平均CPU利用率低于20%,可见网络设备经常出现算力空闲的情况,网络设备的计算资源的利用率不高。
发明内容
本申请实施例提供了一种报文处理方法、设备、系统及存储介质,能够提高网络设备的计算资源的利用率。所述技术方案如下:
第一方面,提供了一种报文处理方法,在该方法中,第一网络设备接收第一内部网关协议IGP报文,所述第一IGP报文包括第一字段,所述第一字段用于指示执行区块链任务,所述区块链任务是区块链网络的共识机制对应的计算任务,所述区块链网络包括所述第一网络设备;所述第一网络设备根据所述第一IGP报文,获取所述共识机制的输入数据;所述第一网络设备根据所述输入数据,执行所述区块链任务。
以上提供了一种基于IGP构建区块链网络的方法,通过对IGP进行扩展,提供一种用于传播区块链任务的新的IGP报文,网络设备接收到这种新的IGP报文时,能够利用自身的算力参与执行区块链任务。一方面,由于充分挖掘了网络设备的算力以构建区块链网络,避免网络设备空闲的算力被浪费,因此提高了网络设备的计算资源的利用率;另一方面,能够缓解区块链技术由于算力不足而受到制约的问题,因此有助于区块链技术的发展。
可选地,所述第一IGP报文包括链路状态广播LSA头,所述LSA头包括链路状态LS类型字段,所述第一字段包括所述LS类型字段。
通过这种可选方式,由于扩展了新的LS类型来标识区块链任务,使用LSA报文来传递区块链任务,网络设备能够借助LSA的泛洪扩散机制以实现在网络中传播区块链任务的功能,降低了方案实施的复杂度。
可选地,所述第一IGP报文包括链路状态报文协议数据单元LSP PDU类型字段,所述第一字段包括所述LSP PDU类型字段。
通过这种可选方式,由于扩展了新的LSP PDU类型来标识区块链任务,使用LSP报文 来传递区块链任务,网络设备能够借助LSP报文的泛洪扩散机制以实现在网络中传播区块链任务的功能,降低了方案实施的复杂度。
可选地,所述方法还包括:根据所述第一网络设备的CPU利用率小于阈值,确定执行所述区块链任务。
通过这种方式,能够在网络设备空闲的情况下,及时地利用网络设备的空闲的算力启动区块链任务,从而提高网络设备的计算资源的利用率。
可选地,所述第一网络设备接收第一内部网关协议IGP报文之后,所述方法还包括:所述第一网络设备在IGP域中广播所述第一IGP报文,所述IGP域包括所述第一网络设备和第二网络设备。
通过这种可选方式,有助于将区块链任务传递至IGP域中的所有网络设备,便于IGP预中的所有网络设备参与执行区块链任务并进行共识。
可选地,所述执行所述区块链任务之后,所述方法还包括:所述第一网络设备生成第二IGP报文,所述第二IGP报文包括所述第一网络设备执行所述区块链任务得到的第一区块;所述第一网络设备在IGP域中广播所述第二IGP报文。
通过这种可选方式,网络设备通过在执行区块链任务后,将形成的区块封装至IGP报文中并广播IGP报文,从而将本设备产生的区块快速地传播至整个区块链网络,便于区块链网络对区块进行共识。
可选地,所述方法还包括:
所述第一网络设备从IGP域中的第二网络设备接收第三IGP报文,所述第三IGP报文包括所述第二网络设备执行所述区块链任务得到的第二区块;
所述第一网络设备对所述第二区块进行验证;
若所述第二区块验证通过且经过共识,所述第一网络设备将所述第二区块存储至区块链上。
通过这种可选方式,在其他网络设备抢先计算出结果并产生区块的情况下,第一网络设备通过对区块进行验证,并基于共识机制对区块上链,从而实现了区块链的记账功能。
可选地,所述第一网络设备接收第一内部网关协议IGP报文之前,所述方法还包括:
所述第一网络设备创建IGP进程,所述IGP进程用于在IGP域中传输所述区块链任务关联的信息。
通过这种可选方式,在原有的IGP网络上更改配置,新增IGP进程来实现区块链网络信息的传递,配置简单,实现复杂度低。
可选地,所述方法还包括:若所述第一网络设备的中央处理器CPU利用率大于阈值,所述第一网络设备停止执行所述区块链任务。
通过这种可选方式,能够在网络设备负载较高的情况下及时停止区块链计算,以便将网络设备的算力留给转发任务,从而避免由于执行区块链任务而影响到转发任务的情况,保证了网络设备的转发性能。
第二方面,提供了一种报文处理方法,在该方法中,网关设备响应于存储请求,生成第一内部网关协议IGP报文,所述第一IGP报文包括第一字段,所述第一字段用于指示执行区块链任务,所述区块链任务是区块链网络的共识机制对应的计算任务;所述网关设备发送所述第一IGP报文。
以上提供了一种基于IGP构建区块链网络的方法,通过对IGP进行扩展,提供一种用于传播区块链任务的新的IGP报文,网关设备通过在IGP域中传播这种新的IGP报文,以便网络设备利用自身的算力参与执行区块链任务。一方面,由于充分挖掘了网络设备的算力以构建区块链网络,避免网络设备空闲的算力被浪费,因此提高了网络设备的计算资源的利用率;另一方面,能够缓解区块链技术由于算力不足而受到制约的问题,因此有助于区块链技术的发展。
可选地,所述网关设备发送所述第一IGP报文,包括:
所述网关设备在IGP域中广播所述第一IGP报文,所述IGP域包括多个网络设备。
可选地,所述网关设备的第一接口被配置为接收所述存储请求,所述网关设备的第二接口被配置为接收执行所述区块链任务所需的共识算法,所述网关设备的第三接口被配置为给所述区块链任务分配算力,所述网关设备的第四接口被配置为处理IGP报文。
可选地,所述方法还包括:
所述网关设备获取所述共识机制的输入数据;
所述网关设备根据所述输入数据,执行所述区块链任务。
可选地,所述网关设备发送所述第一IGP报文之后,所述方法还包括:
所述网关设备接收第二IGP报文,所述第二IGP报文包括网络设备执行所述区块链任务得到的区块;
所述网关设备对所述区块进行验证;
若所述区块验证通过且经过共识,所述网关设备将所述区块存储至区块链上。
可选地,所述第一IGP报文包括链路状态广播LSA头,所述LSA头包括链路状态LS类型字段,所述第一字段包括所述LS类型字段。
可选地,所述第一IGP报文包括链路状态报文协议数据单元LSP PDU类型字段,所述第一字段包括所述LSP PDU类型字段。
第三方面,提供了一种网络设备,该网络设备具有实现上述第一方面或第一方面任一种可选方式中报文处理的功能。该网络设备包括至少一个单元,至少一个单元用于实现上述第一方面或第一方面任一种可选方式所提供的报文处理方法。第三方面提供的网络设备的具体细节可参见上述第一方面或第一方面任一种可选方式,此处不再赘述。
第四方面,提供了一种网关设备,该网关设备具有实现上述第二方面或第二方面任一种可选方式中报文处理的功能。该网关设备包括至少一个单元,至少一个单元用于实现上述第二方面或第二方面任一种可选方式所提供的报文处理方法。第四方面提供的网关设备的具体细节可参见上述第二方面或第二方面任一种可选方式,此处不再赘述。
第五方面,提供了一种网络设备,该网络设备包括处理器和通信接口,该处理器用于执行指令,使得该网络设备执行上述第一方面或第一方面任一种可选方式所提供的报文处理方法,所述通信接口用于接收或发送报文。第五方面提供的网络设备的具体细节可参见上述第一方面或第一方面任一种可选方式,此处不再赘述。
第六方面,提供了网关设备,该网关设备包括处理器和通信接口,该处理器用于执行指 令,使得该网关设备执行上述第二方面或第二方面任一种可选方式所提供的报文处理方法,所述通信接口用于接收或发送报文。第六方面提供的网关设备的具体细节可参见上述第二方面或第二方面任一种可选方式,此处不再赘述。
第七方面,提供了一种计算机可读存储介质,该存储介质中存储有至少一条指令,该指令由处理器读取以使网络设备执行上述第一方面或第一方面任一种可选方式所提供的报文处理方法。
第八方面,提供了一种计算机可读存储介质,该存储介质中存储有至少一条指令,该指令由处理器读取以使网关设备执行上述第二方面或第二方面任一种可选方式所提供的报文处理方法。
第九方面,提供了一种计算机程序产品,当该计算机程序产品在网络设备上运行时,使得网络设备执行上述第一方面或第一方面任一种可选方式所提供的报文处理方法。
第十方面,提供了一种计算机程序产品,当该计算机程序产品在网关设备上运行时,使得网关设备执行上述第二方面或第二方面任一种可选方式所提供的报文处理方法。
第十一方面,提供了一种芯片,当该芯片在网络设备上运行时,使得网络设备执行上述第一方面或第一方面任一种可选方式所提供的报文处理方法。
第十二方面,提供了一种芯片,当该芯片在网关设备上运行时,使得网关设备执行上述第二方面或第二方面任一种可选方式所提供的报文处理方法。
第十三方面,提供了一种网络系统,该网络系统包括网络设备以及网关设备,该网络设备用于执行上述第一方面或第一方面任一种可选方式所述的方法,该网关设备用于执行上述第二方面或第二方面任一种可选方式所述的方法。
第十四方面,提供了一种网络设备,所述网络设备包括:主控板和接口板,进一步,还可以包括交换网板。所述网络设备用于执行第一方面或第一方面的任意可选方式中的方法。具体地,所述网络设备包括用于执行第一方面或第一方面的任意可选方式中的方法的单元。在一种可能的实现方式中,所述网络设备中的主控板和接口板之间建立进程间通信协议(inter-process communication,IPC)通道,主控板和接口板之间通过IPC通道进行通信。
第十五方面,提供了一种网关设备,所述网关设备包括:主控板和接口板,进一步,还可以包括交换网板。所述网关设备用于执行第二方面或第二方面的任意可选方式中的方法。具体地,所述网关设备包括用于执行第二方面或第二方面的任意可选方式中的方法的单元。在一种可能的实现方式中,所述网关设备中的主控板和接口板之间建立IPC通道,主控板和接口板之间通过IPC通道进行通信。
图1是本申请实施例提供的一种基于区块链网络实现去中心化记账的示意图;
图2是本申请实施例提供的一种区块链技术的示意图;
图3是本申请实施例提供的一种系统架构的示意图;
图4是本申请实施例提供的一种系统架构的示意图;
图5是本申请实施例提供的一种IGP报文的格式示意图;
图6是本申请实施例提供的一种报文处理方法的流程图;
图7是本申请实施例提供的一种BCGW将记账数据泛洪至IGP域的示意图;
图8是本申请实施例提供的一种全网达成共识并完成记账的示意图;
图9是本申请实施例提供的一种基于IGP进行区块链计算的方法的流程图;
图10是本申请实施例提供的一种网络设备的结构示意图;
图11是本申请实施例提供的一种网关设备的结构示意图;
图12是本申请实施例提供的一种网络设备的结构示意图;
图13是本申请实施例提供的一种网关设备的结构示意图;
图14是本申请实施例提供的一种网络系统的结构示意图。
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
由于本申请实施例涉及区块链技术,为了便于理解,下面先对本申请实施例涉及的区块链技术中的术语相关概念进行介绍。
(1)区块链网络
区块链网络本质是一个共享数据库,存储于其中的数据或信息,具有“不可伪造”、“全程留痕”、“可以追溯”、“公开透明”、“集体维护”等特征。基于这些特征,区块链技术奠定了坚实的“信任”基础,创造了可靠的“合作”机制,具有广阔的运用前景。构成区块链网络有四大基础技术基石:哈希运算、数字签名、对等(peer to peer,P2P)网络、共识算法。
(2)共识算法
分布式系统集群设计中面临着一个不可回避的问题:一致性问题。对于系统中的多个服务节点,给定一系列操作,需要使全局对局部处理结果达成某种程度的一致。共识算法就可以提供这种技术机制,可以在缺乏信任的环境中构建一致性(构建信任)。共识算法是一类算法的总称,包含许多具体的算法。
(3)P2P网络
P2P网络即为对等计算机网络,是一种在对等者(Peer)之间分配任务和工作负载的分布式应用架构,是对等计算模型在应用层形成的一种组网或网络形式。在P2P网络环境中,彼此连接的多台计算机之间都处于对等的地位,各台计算机有相同的功能,无主从之分,一台计算机既可作为服务器,设定共享资源供网络中其他计算机所使用,又可以作为工作站,整个网络一般来说不依赖专用的集中服务器,也没有专用的工作站。网络中的每一台计算机既能充当网络服务的请求者,又对其它计算机的请求做出响应,提供资源、服务和内容。通常这些资源和服务包括:信息的共享和交换、计算资源(如中央处理器(central processing unit, CPU)计算能力共享)、存储共享(如缓存和磁盘空间的使用)、网络共享、打印机共享等。
(4)哈希(hash)运算
简单的说,哈希运算就是一种将任意长度的消息压缩到某一固定长度的消息摘要算法或函数。例如,哈希运算是SHA256运算。SHA256运算是一种哈希值长度是256位的哈希运算,SHA表示安全散列算法(Secure Hash Algorithm)。
(5)内部网关协议(Interior Gateway Protocol,IGP)
IGP是在一个自治网络内网关(主机和路由器)间交换路由信息的协议。路由信息能用于网间协议(IP)或者其它网络协议来说明路由传送是如何进行的。IGP协议包括路由信息协议(Routing Information Protocol,RIP)、开放式最短路径优先(Open Shortest Path First,OSPF)、中间系统到中间系统(Intermediate System-to-Intermediate System,IS-IS)、内部网关路由协议(Interior Gateway Routing Protocol,IGRP)、增强内部网关路由协议(Enhanced Interior Gateway Routing Protocol,EIGRP)、独立组播路由协议(Protocol Independent Multicast,PIM)。
(6)区块链任务
区块链任务是区块链网络的共识机制对应的计算任务。可选地,执行区块链任务的过程是求解一个计算难题的过程,该计算难题具有难于求解易于验证的特点,通过求解该计算难题,便于区块链网络各节点达成“共识”。
区块链任务的执行通常涉及哈希运算。例如,区块链任务的执行过程包括:通过脚本对一个随机数进行迭代,每当迭代一次后,根据当前的随机数计算哈希值,判断哈希值是否小于目标值,如果哈希值不小于目标值,则修改随机数(例如对随机数加一)并重新计算,直至哈希值小于目标值为止。例如,区块链任务是“对一个给定的字符串进行补值,补值后的字符串通过哈希运算(比如SHA25)的结果为0”,其中,0是对目标值的举例说明。其中,共识机制例如是工作量证明(Proof of Work,PoW),计算得出的随机数即为对工作量的证明,因为它能够证明设备已经做了足够多的工作并找到正确的了随机数。
以上介绍了一些区块链技术中的术语概念,以下对区块链技术在应用中的情况进行简单的介绍。
请参见附图1,附图1是对区块链网络实现去中心化记账的举例说明,区块链是在不可信的环境中的分布式记账技术,用技术机制构筑信任,实现去中心化。参见附图2,区块链主要运用了四个基础技术:哈希运算(SHA256)、数字签名、P2P网络和共识算法。其中共识算法往往需要耗费大量的算力使分布式系统达成统一。
然而,区块链领域的创新面临着算力制约的问题。具体地,区块链建设需要投入大量专有硬件,尤其是区块链各节点达成“共识”需要消耗大量算力。区块链分为公有链和行业链,公有链(比如比特币)有大量“矿工”支撑区块链网络的算力,而行业链构建需要投资建设专有硬件,成本较高,当硬件建设成本高于区块链给行业带来的好处时,就会严重制约行业链的发展。
此外,运营商基础设施有大量空闲算力待挖掘和变现。具体地,运营商的网络基础设施蕴含大量闲置算力,比如一个市级的IP化的移动接入承载网(IP Radio Access Network,IPRAN)网络就会有上万台的网络设备,经过大数据统计,这些设备的平均CPU利用率低于20%,闲置算力折现能力达到千万人民币/年的量级。
有鉴于此,本实施例提供了一种基于IGP构建区块链网络的方法,通过对IGP扩展,使得网络设备能参与区块链的分布式计算,从而复用现有运营商网络基础设施构筑区块链,运营商可以灵活出租网络基础设施的闲置算力,用于垂直行业的区块链构建,给行业营造健康生态,助力区块链技术在行业领域的创新和工程落地。
下面,分别从硬件的角度和软件的角度介绍本申请实施例提供的系统架构。
参见附图3,本申请实施例提供了一种系统架构100。系统架构100是对IGP构建的区块链网络的举例说明。系统架构100中的不同设备基于IGP进行通信。系统架构100中的所有设备可选地属于同一个IGP域。系统架构100包括至少一个网关设备和至少一个网络设备。网关设备和网络设备、不同网络设备之间通过无线网络或有线网络相连。
网关设备例如称为区块链网关(Block Chain Gate Way,BCGW)。例如,网关设备是附图3所示的BCGW111、BCGW112、BCGW113和BCGW114。网关设备例如是区块链专用网关节点,南向分发维护区块链任务,北向提供区块链数据的订购订阅等接口。网关设备会加入到特定的IGP进程中,通过附图3所示的特殊格式的IGP报文,以广播的形式向网络中发布区块链任务,或者接收执行区块链任务得到的区块。网关设备的形态例如是计算设备,比如是服务器,也可以是路由器、交换机等。可选地,BCGW并不需要中心化建设,任意网络设备在任意网络节点都可加入IGP域作为BCGW,发布区块链任务收集区块等。网关设备的硬件结构请参考附图13以及网关设备800对应的描述。网关设备的软件架构请参考附图4以及系统架构200对应的描述。
网关设备和外部系统通过无线网络或有线网络相连。外部系统在附图3中没有示出。外部系统是指没有加入IGP域的其它设备或系统。例如,外部系统是第三方业务系统或终端设备。外部系统可以将待存储的数据发送至网关设备,触发下述方法300或方法400,从而通过系统架构100提供的区块链网络将数据存储至区块链上。
网络设备例如是路由器(Router)或交换机等。例如,网络设备是附图3所示的路由器121、路由器122、路由器123、路由器124、路由器125、路由器126、路由器127、路由器128。网络设备用于承载网络的转发类业务,同时可以利用自身的空闲算力参与区块链任务。网络设备会通过配置相同的IGP进程、互相发送IGP报文等方式加入到与网关设备相同的IGP进程中,通过附图5所示的特殊格式的IGP报文,接收区块链任务,或者向网络中广播执行区块链任务得到的区块。网络设备的硬件结构请参考附图12以及网络设备700对应的描述。网络设备的软件架构请参考附图4以及系统架构200对应的描述。
在一些实施例中,系统架构100通过运营商提供的网络基础设施构建,网关设备和网络设备均是运营商基础设施中的设备,例如网络设备是IPRAN网络中的路由器。通过复用运营商基础设施构筑的区块链网络,一方面,能够深度利用运营商的存量基础设施用于行业链建设,开辟一块新的存量市场,避免重新建设区块链专用硬件,节约了构建区块链网络的成本;
另一方面,能够充分发挥运营商基础设施在算力、地理覆盖率、业务发放等维度的优势。具体地,由于区块链网络要求算力稳定,否则容易遭受51%攻击篡改账本,而复用运营商基础设施构筑的区块链网络可提供6个9的算力可靠性。此外,运营商网络的地理覆盖率非常高,区块链用户可以随时随地消费运营商提供的区块链服务。此外,运营商业务发放自动化程度高,可以弹性租赁,分时租赁,给中小企业提供低成本高效构筑私有链业务的选择。
以上对基于IGP构建的区块链网络的硬件架构进行了介绍,以下对基于IGP构建的区块链网络所需的软件架构进行介绍。
参见附图4,本实施例提供了另一种系统架构200。系统架构200是对基于IGP构建的区块链网络所需的软件架构的举例说明。系统架构200部署在上述系统架构100中的每个设备上。换句话说,系统架构100中的每个设备均可以采用系统架构200所示的软件来实现区块链的功能。
系统架构200包括核心模块210、北向接口模块211、西向接口模块212、东向接口模块213和南向接口模块214。
北向接口模块211接入至第三方业务系统221。北向接口模块211包括区块链业务定义子模块2111、数据订阅子模块2112、数据处理逻辑编排子模块2113和计算任务导入子模块2114。第三方业务系统221需要记账时,可以向北向接口模块211发起请求,北向接口模块211会创建区块链任务,从而将区块链任务导入至IGP域。
西向接口模块212和网络基础设施222连接。西向接口模块212包括IGP协议栈子模块2121和IP套接字(IP socket)子模块2122,从而执行IGP协议的处理、报文封装域处理等。
核心模块210包括数字签名子模块和共识算法子模块。
东向接口模块213和算法库223连接,能够访问算法库223,得到算法库223保存的共识算法。东向接口模块213包括脚本执行容器子模块2131、预置算法子模块2132和算法更新子模块2133。算法更新子模块2133用于更新共识算法。具体地,因为区块链任务需要调用丰富的算法,且区块链有版本区别,具体的共识算法也会根据业务需要经常改变,通过设置算法更新子模块2133,能够动态更新设备执行区块链任务使用的算法。
南向接口模块214和本地硬件系统224通信,用于操作操作网络设备的硬件设施,以适配区块链任务。南向接口模块214包括闪存(Compact Flash,CF)卡/硬盘/内存管理子模块2141、CPU算力分配子模块2142和冗余硬件灾备管理子模块2143。
以上通过系统架构100和系统200,对基于IGP构建的区块链网络的硬件架构和软件架构分别进行了介绍。在一些实施例中,在系统架构100和系统200的基础上,在网络中新增若干个IGP进程,IGP进程用于在IGP域中传输区块链任务关联的信息。例如,该IGP进程用于传输区块链任务,或者,该IGP进程用于传输通过执行区块链任务得到的区块。可选地,每个网络设备上创建多个IGP进程,第一IGP进程专用于承载区块链任务,第二IGP进程用于处理路由和拓扑,第一IGP进程和第二IGP进程的进程号不同。
可选地,用于传输区块链任务相关信息的IGP进程是OSPF进程。具体地,在网络中新增一个OSPF进程,该OSPF进程只用于承载区块链任务,具体地,该OSPF进程用于通过特殊的链路状态广播(Link-State Advertisement,LSA)报文洪泛区块链任务以及用于通过特殊的LSA报文发布区块。
例如,在附图3所示的系统架构100中,所有网络设备新增如下OSPF配置。
#
ospf 20
block-chain enable//注释:该OSPF进程不处理路由和拓扑,只是通过LSA交互信息完成区块链任务
cpu-limit 50//注释:CPU利用率超过50%则停止区块链计算,防止影响原有转发类业务
area 0.0.0.0
network x.x.x.x//注释:绑定接口,加入区块链域
#
每个网络设备上通过以上配置,用进程号20创建OSPF进程,得到OSPF进程20,将接口宣告进OSPF进程20。每个网络设备使用OSPF进程20与其他网络设备建立OSPF邻居关系。OSPF邻居建立后,网络设备就会通过特殊的LSA报文接收到区块链任务。其中,OSPF进程号(OSPF Process ID)20的OSPF进程是对新增的用于传输区块链任务相关信息的IGP进程的举例说明。
通过以上方式,充分复用网络基础设施的IGP协议,在原有的IGP网络上更改配置即可实现区块链网络信息的传递,易于快速部署区块链业务,易于维护。
本实施例设计了一种新的IGP报文,这种新的IGP报文用于传播区块链任务。该IGP报文包括而不限于任何类型的组播协议报文。例如,该IGP报文是ISIS、OSPF、RIP、LLDP、PIM等协议报文。参见附图5,其示出了这种用于传播区块链任务的IGP报文的格式示意图。IGP报文包括LSA头和区块。
LSA头属于IGP LSA报文标准结构。LSA头包括LS时限(LS age)字段、选项、LS类型字段、LS标识(Link-State ID)字段、宣告路由器(Advertising Router)字段、LS序号(LS Sequence Number)字段、LS校验和(LS checksum)字段、长度(Length)字段。
区块包括区块头和区块主体。
区块头属于区块链技术中标准的信息头。区块头包括版本号(version)字段、上个区块(Last block)字段、区块链根节点(Merkle Root Node)字段、时间戳(timestamp)字段、只被使用一次的任意或非重复的随机数值(Number used once或Number once,nonce)字段。可选地,区块头属于IGP报文的载荷。
其中,版本号字段用于指示版本号,例如区块链任务使用的共识算法的版本。版本号如是32个字节。区块字段的大小例如是4个字节。上个区块字段用于索引至上一个区块(即当前区块的父区块)。例如,上个区块字段用于携带上个区块的哈希值。上个区块字段的大小例链根节点字段用于标识区块所属的区块链的根节点,从而指明区块数据隶属于哪个账本。时间戳字段用于指示区块产生的时间。
nonce字段用于携带随机数,即哈希算法难题。nonce字段的大小例如是4个字节。
区块主体用于携带区块数据。区块数据(block data)即为需要记账的数据体。可选地,区块数据属于IGP报文的载荷。区块数据的应用场景包括多种情况。可选地,区块数据用于构建电子货币交易系统。或者,区块数据用于存储智能合约。
本实施例提供的IGP报文包括第一字段,第一字段用于指示执行区块链任务。第一字段包括附图5所示的IGP报文中的一个或多个字段。当接收端(如网络设备或网关设备)收到IGP报文时,通过识别第一字段即可获知要执行区块链任务从而参与记账。
使用IGP报文中的哪一个或哪一些字段作为第一字段包括多种实现方式。可选地,第一字段为LSA头中的字段。可选地,第一字段为区块头中的字段。或者,第一字段包括LSA中的字段和区块头中的字段,本实施例对第一字段在IGP报文中的携带位置不做限定。
可选地,IGP报文通过新的LSA类型(LS type)标识区块链任务。具体来讲,第一字段包括LS类型字段,LS类型字段的取值用于指示区块链任务。其中,LS类型字段的取值也称 LSA类型号或LS type值。
例如,对于OSPF协议,传播区块链任务或区块的IGP报文是OSPF LSA报文。示意性地,申请LSA类型号15,以第15类LSA作为传递区块链任务的特殊报文,并预先配置,网络中所有设备接收到第15类LSA时,需要将报文向IGP进程内的协议邻居进行广播。这种处理机制类似于第三类LSA(summary LSA,LS Type为3),与第三类LSA不同的是,第三类LSA携带的是路由信息,第15类LSA携带的是区块链任务。所有网络设备或者网关设备收到OSPF LSA报文后,识别LS类型字段的取值,如果判断LS类型字段的取值是15,就可以知道该OSPF LSA报文是用来传递区块链任务或者计算得到的区块的。其中,15是新申请的LSA类型号的举例说明,在另一些实施例中,通过15之外的其他未被占用的LSA类型号标识区块链任务,本实施例对LS类型字段的具体取值不做限定。
例如,对于ISIS协议,传播区块链任务或区块的IGP报文是链路状态协议(Link State Protocol,LSP)报文,LSP报文通过新的LSP协议数据单元(Presentation Protocol Data Unit,PDU)类型(LSP PDU type)标识区块链任务。具体来讲,IGP报文包括LSP PDU类型字段,LSP PDU类型字段用于标识PDU的类型。第一字段包括LSP PDU类型字段。示意性地,申请LSP PDU类型155作为传递区块链任务的特殊LSP报文,并预先配置,所有网络设备接收到LSP PDU类型为155的LSP报文时,需要将报文内容向协议邻居进行广播,该处理机制与其它类型的LSP报文相同。其中,155是新申请的LSA类型号的举例说明,在另一些实施例中,通过155之外的其他未被占用的LSP PDU类型号标识区块链任务,本实施例对LSP PDU类型字段的具体取值不做限定。
可选地,第一字段仅包括LS类型字段这一个字段。或者,第一字段不仅包括LS类型字段,还包括LS类型字段之外的其他字段。可选地,第一字段仅包括LSP PDU类型字段这一个字段。或者,第一字段不仅包括LSP PDU类型字段,还包括LSP PDU类型字段之外的其他字段。
例如,第一字段包括LS类型字段和nonce字段,nonce字段是对第一字段中LS类型字段之外的其他字段的举例说明。接收端接收到IGP报文后,识别IGP报文中的LS类型字段和nonce字段,判断LS类型字段的值是否为新申请的区块链相关的LSA类型号(如15),并判断nonce字段是否具有值。如果LS类型字段的值为新申请的区块链相关的LSA类型号,且nonce字段没有值,则接收端确定本节点需要执行区块链任务。如果LS类型字段的值为新申请的区块链相关的LSA类型号,且nonce字段有值,则接收端确定IGP报文包含了其它节点发布的区块,对nonce字段的值进行验证。如果验证nonce字段的值正确,则接收端记账。
值得注意的是,本实施例提供的用于传播区块链任务或区块的IGP报文的格式包括多种实现方式,附图5是对基于OSPF协议传播区块链任务的报文格式的举例说明,本实施例并不限定用于传播区块链任务或区块的IGP报文的格式与附图5完全相同。例如,在基于OSPF协议之外的其他IGP协议传播区块链任务时,报文的格式与附图5可以具有差异。具体地,在基于ISIS、RIP、LLDP、PIM等组播协议传播区块链任务或区块时,可以将附图5中的LSA头替换为ISIS、RIP、LLDP、PIM等组播协议的通用报头。此外,可选地,在基于OSPF之外的其他IGP协议传播区块链任务时,不是使用LS类型字段来指示区块链任务,而是采用其他IGP协议的通用报头中的类型字段来指示区块链任务,或者在其他IGP协议的通用报头中扩展新的比特位(如某个flag字段)、新的类型长度值(type length value,TLV)或新的选项来指示区块链任务。
以上介绍了本申请实施例提供的硬件架构、软件架构和IGP报文的报文格式,以下通过方法300至方法400,示例性介绍基于上文提供的系统架构和IGP报文构建区块链网络的方法流程。
参见附图6,附图6是本申请实施例提供的一种报文处理方法300的流程图。
可选地,方法300由系统架构100中的设备执行。例如,方法300中的网关设备是附图3所示的BCGW111、BCGW112、BCGW113或BCGW114,方法300中的第一网络设备或第二网络设备是附图3所示的路由器121、路由器122、路由器123、路由器124、路由器125、路由器126、路由器127或者路由器128。
可选地,方法300中的各个步骤基于上述系统架构200的各个单元实现。例如,网关设备的第一接口被配置为接收存储请求。例如,网关设备通过北向接口模块211接收第三方业务系统发来的存储请求,从而执行以下步骤S301。网关设备的第二接口被配置为接收执行区块链任务所需的共识算法,网关设备的第三接口被配置为给区块链任务分配算力。例如,网关设备通过东向接口模块213访问算法库得到共识算法,通过南向接口模块214访问本地的CPU,将CPU算力分配给区块链任务,从而执行区块链任务。网关设备的第四接口被配置为处理IGP报文。例如,网关设备通过西向接口模块212中的IGP协议栈子模块处理IGP报文中IGP通用的报头部分。可选地,第一接口为北向接口;第二接口为东向接口;第三接口为南向接口;第四接口为西向接口。
可选的,方法300中通过主控板上的CPU或者接口板上的CPU执行区块链任务。可选的,方法300中通过接口板上的嵌入式神经网络处理器(Neural-network Processing Unit,NPU)执行区块链任务。或者,也可以不用CPU或NPU,而使用其他适合用于哈希运算的处理器执行区块链任务,本实施例不做限制。当然,也可以通过不同的处理器承担不同步骤对应的处理工作,例如,通过一个处理器进行报文转发,通过另一个处理器执行区块链任务。
示例性地,方法300包括S301至S312。
S301、网关设备接收存储请求。
存储请求用于指示将数据存储至区块链上,存储请求包括待存储的数据。其中,在区块链领域中,待存储的数据可称为一笔交易(transaction),存储数据的动作可称为记账,存储请求可称为记账请求,数据最终会以区块的形式存储至区块链上。可选地,网关设备接收的存储请求来自于位于IGP域外部的外部系统,外部系统生成存储请求,向网关设备发送存储请求,网关设备接收到存储请求。
S302、网关设备响应于存储请求,生成第一IGP报文。
在一种可能的实现中,网关设备每当接收到一次存储请求,则响应于存储请求,生成一次IGP报文,从而随着收到的存储请求实时地触发区块链任务。在另一种可能的实现中,网关设备当接收到存储请求后,启动定时器,每当时间经过预设时长后,则响应于存储请求,生成一次IGP报文,从而周期性地触发区块链任务。
第一IGP报文包括第一字段,因此第一IGP报文能够指示接收端执行区块链任务。第一IGP报文的具体格式请参见上述附图5对应的介绍,在此不做赘述。具体地,网关设备解析存储请求,得到存储请求包括的数据,将数据携带在附图5所示的区块体部分,得到第一IGP报文。
S303、网关设备发送第一IGP报文。
在一些实施例中,网关设备在IGP域中广播第一IGP报文。其中,IGP域包括多个网络设备,第一IGP报文在IGP域中经过广播后,第一IGP报文携带的待存储的数据会被发送至该多个网络设备中的每个网络设备上,因此每个网络设备均能够得到数据并参与执行区块链任务。
S304、第一网络设备接收第一IGP报文。
S305、第一网络设备在IGP域中广播第一IGP报文。
具体地,OSPF、ISIS、RIP、LLDP、PIM等IGP报文是组播协议报文,组播协议报文的MAC帧头包括特定的组播MAC地址,或者IP头包括特定的组播IP地址,因此第一网络设备接收到第一IGP报文后,会对第一IGP报文进行复制和广播,将第一IGP报文传播至第一网络设备在IGP域中的每个邻居设备。第一网络设备的邻居设备接收到第一IGP报文后,同样会对第一IGP报文进行复制和广播,将第一IGP报文发送至本节点的邻居设备,依次类推,最终IGP域中的每个网络设备均会接收到第一IGP报文。
例如,第一IGP报文是第15类LSA的OSPF LSA报文,采用泛洪的方式,将第15类LSA通告至IGP域中的所有网络设备,以便IGP域中的所有网络设备参与完成区块链的记账任务。请参见附图7,BCGW111接收到一个记账任务后,生成携带交易数据的OSPF LSA报文,向路由器121发送OSPF LSA报文。之后,路由器121向相邻的路由器122和路由器123发送OSPF LSA报文。之后,路由器122向相邻的路由器123和路由器124发送OSPF LSA报文。之后,路由器123和路由器124分别向彼此的邻居发送OSPF LSA报文,最终IGP域中的所有网络设备均接收到了OSPF LSA报文,换句话说,BCGW111将区块链任务和待记账的数据洪泛到IGP域的所有网络设备上。
S306、第一网络设备根据第一IGP报文,获取共识机制的输入数据。
共识机制的输入数据是指区块链的共识算法的输入数据,即计算随机数(nonce)所需的数据。例如,共识机制的输入数据包括第一IGP报文中区块头内的数据,例如区块链根节点字段携带的哈希值和上个区块字段携带的上个区块哈希值。
在一些实施例中,第一网络设备识别第一IGP报文中的第一字段,根据第一字段的值,确定需要执行区块链任务,则从第一IGP报文中获取共识机制的输入数据,进而执行区块链任务。例如,第一网络设备识别第一IGP报文中的LS类型字段和nonce字段,确定LS类型字段携带有用于标识区块链任务的、新的LSA类型号,并且nonce字段没有值,则第一网络设备参与执行区块链任务。
在一些实施例中,共识机制的输入数据全部来自于第一IGP报文。在另一些实施例中,共识机制的输入数据部分来自于第一IGP报文,部分由第一网络设备从本地获取。
S307、第一网络设备根据输入数据,执行区块链任务。
如何根据输入数据执行区块链任务包括多种实现方式。在一些实施例中,第一网络设备根据输入数据进行哈希运算,得到哈希值;第一网络设备判断哈希值是否小于目标值(目标值例如是0);如果哈希值不小于目标值,第一网络设备修改随机数(例如对随机数加一),并重新进行哈希运算,直至哈希值小于目标值为止。
可选地,第一网络设备根据当前的CPU利用率判断是否执行区块链任务,具体参见以下情况一至情况二。
情况一、在执行区块链任务的过程中,第一网络设备检测CPU利用率,判断CPU利用率是否大于阈值。若第一网络设备的CPU利用率大于阈值,第一网络设备停止执行区块链任 务。其中,阈值例如记为“cpu-limit”,阈值例如是50%。
通过这种方式,能够在网络设备负载较高的情况下及时停止区块链计算,以便将网络设备的算力留给转发任务,从而避免由于执行区块链任务而影响到转发任务的情况,保证了网络设备的转发性能。
情况二、第一网络设备暂停区块链任务后,继续检测CPU利用率。若第一网络设备的CPU利用率小于阈值,第一网络设备继续执行区块链任务。通过这种方式,能够在网络设备从忙碌变为空闲的情况下,及时地利用网络设备的空闲的算力进行区块链计算。
通过以上情况一和情况二,第一网络设备能够依据本设备当前的算力情况,灵活地选择是否参与区块链任务,在忙碌时优先使用算力执行转发任务,在空闲时使用算力执行区块链任务,从而将转发任务和区块链任务这两类任务有效地结合起来,充分提高网络设备的计算资源的利用率。
S308、第一网络设备生成第二IGP报文。
在一些实施例中,IGP域中的每个设备(如网络设备和网关设备)均会参与执行区块链任务。当IGP域中的某个设备基于共识算法计算出结果(即算出正确的随机数),该设备会将计算结果和交易数据一起打包,形成当前区块,将此区块封装至IGP报文中,在IGP域中广播携带区块的IGP报文,从而将本设备产生的区块传播至整个区块链网络。区块链网络中的每个设备接收到区块后,均会验证计算结果,如果验证成功且经过共识,每个设备会将该区块存储至区块链中。
由于IGP域中的任意设备均具有第一个计算出结果的可能性,本实施例会分别介绍第一网络设备第一个计算出结果的情况、第一网络设备之外的其他网络设备第一个计算出结果的情况、网关设备第一个计算出结果的情况。此外,为了区分描述不同网络设备生成的区块,将第一网络设备生成的区块称为第一区块,将第二网络设备生成的区块称为第二区块,将网关设备生成的区块称为第三区块。值的说明的是,术语“第一区块”、“第二区块”、“第三区块”中的“第一”、“第二”和“第三”等字样用于区分不同的区块,并不对区块在区块链上的排列位置构成限定。
在第一网络设备第一个计算出结果的情况下,第一网络设备执行区块链任务后,得到第一区块,根据第一区块生成第二IGP报文。其中,第二IGP报文包括第一区块,第一区块包括第一网络设备计算出的随机数和交易数据。第一网络设备算出的随机数通过第二IGP报文的区块头部分的nonce字段携带。交易数据通过第二IGP报文的区块主体部分携带。可选地,第二IGP报文还包括LSA头。可选地,第二IGP报文中的LSA头与第一IGP报文中的LSA头是相同的。
S309、第一网络设备在IGP域中广播第二IGP报文。
S310、IGP域中的第二网络设备接收第二IGP报文,从第二IGP报文中获得第一区块,对第一区块进行验证。若第一区块验证通过且经过共识,第二网络设备将第一区块存储至区块链上。
例如,第二网络设备识别第二IGP报文中的LS类型字段和nonce字段,确定LS类型字段携带有用于标识区块链任务的、新的LSA类型号,并且nonce字段有值,则第二网络设备确定第二IGP报文包含了其他节点发布的区块,则第二网络设备对nonce字段的值进行验证,如果验证nonce字段的值正确,则第二网络设备进行记账。
同理地,在第二网络设备第一个计算出结果的情况下,第二网络设备执行区块链任务后, 得到第二区块,根据第二区块生成第三IGP报文。其中,第三IGP报文包括第二区块,第二区块包括第二网络设备计算出的随机数和交易数据。第二网络设备算出的随机数通过第三IGP报文的区块头部分的nonce字段携带。交易数据通过第三IGP报文的区块主体部分携带。第二网络设备在IGP域中广播第三IGP报文。第一网络设备从第二网络设备接收第三IGP报文;第一网络设备对第二区块进行验证;若第二区块验证通过且经过共识,第一网络设备将第二区块存储至区块链上。
S311、网关设备接收第二IGP报文,从第二IGP报文中获得第一区块,对第一区块进行验证。若第一区块验证通过且经过共识,网关设备将第一区块存储至区块链上。
此外,在第二网络设备第一个计算出结果的情况下,网关设备接收第三IGP报文,从第三IGP报文中获得第二区块,对第二区块进行验证。若第二区块验证通过且经过共识,网关设备将第二区块存储至区块链上。
可选地,网关设备不仅会将待存储的数据传播给网络设备,也会参与执行区块链任务。具体地,网关设备获取共识机制的输入数据;网关设备根据输入数据,执行区块链任务。
在网关设备第一个计算出结果的情况下,网关设备执行区块链任务后,得到第三区块,根据第三区块生成第四IGP报文。其中,第四IGP报文包括第三区块,第三区块包括网关设备计算出的随机数和交易数据。网关设备算出的随机数通过第四IGP报文的区块头部分的nonce字段携带。交易数据通过第四IGP报文的区块主体部分携带。网关设备在IGP域中广播第四IGP报文。IGP域中的网络设备(如第一网络设备或第二网络设备)接收第四IGP报文,从第四IGP报文中获得第三区块,对第三区块进行验证。若第三区块验证通过且经过共识,网络设备将第三区块存储至区块链上。
S312、网关设备发送记账结果。
具体地,网关设备可以向存储请求的发送端返回记账结果,例如向外部系统发送记账结果。其中,记账结果例如是保存有交易数据的区块链,即整个“账本”。
例如,请参见附图8,附图8是对全网达成共识并完成记账的示意图,附图8以路由器124第一个计算出结果为例进行说明。具体地,路由器124先完成共识算法的计算(猜出正确的随机数),会通过特殊的LSA报文向全网广播区块,其它节点验证无误后加入区块链,并停止自己的计算任务,相当于该IGP域全网设备达成共识完成一次记账。
在一些实施例中,以上描述的区块链任务以及区块的传输过程通过IGP进程实现。具体地,第一网络设备、第二网络设备和网关设备均预先创建IGP进程。例如,网关设备通过网关设备上运行的IGP进程发送第一IGP报文。第一网络设备通过第一网络设备上运行的IGP进程接收第一IGP报文,通过第一网络设备上运行的IGP进程发送第二IGP报文。第二网络设备通过第二网络设备上运行的IGP进程接收第一IGP报文,通过第二网络设备上运行的IGP进程发送第三IGP报文。
本实施例对广播IGP报文的动作与执行区块链任务的动作的先后顺序不做限定。在一些实施例中,S305与S306至S307顺序执行。例如,先执行S305,再执行S306至S307;先执行S306至S307,再执行S305。在另一些实施例中,S305与S306至S307并行执行,即,同时执行S305以及S306至S307。
本实施例提供了一种基于IGP构建区块链网络的方法,通过对IGP进行扩展,提供一种用于传播区块链任务的新的IGP报文,网络设备接收到这种新的IGP报文时,能够利用自身的算力参与执行区块链任务。一方面,由于充分挖掘了网络设备的算力以构建区块链网络, 避免网络设备空闲的算力被浪费,因此提高了网络设备的计算资源的利用率;另一方面,能够缓解区块链技术由于算力不足而受到制约的问题,因此有助于区块链技术的发展。
以下通过方法400对方法300进行举例说明。在方法400,网关设备为BCGW。网络设备为Router。换句话说,方法400描述的方法流程关于BCGW和Router如何基于IGP实现区块链计算。应理解,方法400与方法300同理的步骤还请参见方法300,在方法400中不做赘述。
参见附图9,附图9为本申请实施例提供的一种基于IGP进行区块链计算的方法400的流程图。方法400中传播的特殊类型的IGP报文请参考附图5对应的介绍。
示例性地,方法400包括S401至S406。
S401、BCGW从外部系统导入记账请求,生成区块链任务,封装IGP报文,向Router广播特殊类型的IGP报文。
S402、Router接收特殊类型的IGP报文,向其他邻居Router广播该IGP报文。
S403、Router从IGP报文中获取区块链任务,调用本地计算资源处理区块链任务。
S404、首先完成区块链任务的Router将区块封装到IGP报文中,并在网络中广播该IGP报文,从而发布区块。
S405、Router收到包含区块的IGP报文,验证区块无误,说明其它Router已经抢先算出随机数,停止本地的区块链任务。
S406、BCGW收到包含区块的IGP报文,验证区块无误,停止本地的区块链任务,并向外部系统提交此次记账结果。
以上介绍了本申请实施例的方法300或方法400,以下介绍本申请实施例的网络设备,以下描述的网络设备具有上述方法300中第一网络设备或第二网络设备的任意功能,或具有方法400中Router的任意功能。以下描述的网关设备具有上述方法300或方法400中网关设备或第二网关设备的任意功能,或具有方法400中BCGW的任意功能。
附图10是本申请实施例提供的一种网络设备500的结构示意图,如附图10所示,网络设备500包括:接收单元501,用于执行S304;处理单元502,用于执行S306和S307。
可选地,网络设备500还包括:广播单元,用于执行S305或S309。
可选地,处理单元502,用于执行S308。
可选地,处理单元502,用于根据网络设备500的CPU利用率小于阈值,确定执行区块链任务。
可选地,接收单元501,还用于接收第二IGP报文或第三IGP报文;
可选地,处理单元502,用于对第一区块或第二区块进行验证;若第一区块验证通过且经过共识,将第一区块存储至区块链上,或者,若第二区块验证通过且经过共识,将第二区块存储至区块链上。
可选地,处理单元502,用于创建IGP进程。
可选地,处理单元502,用于若网络设备500的CPU利用率大于阈值,停止执行区块链任务。
应理解,网络设备500对应于上述方法实施例中的第一网络设备或第二网络设备,网络设备500中的各单元和上述其他操作和/或功能分别为了实现方法300或方法400中的第一网 络设备或第二网络设备所实施的各种步骤和方法,具体细节可参见上述方法300或方法400,为了简洁,在此不再赘述。
应理解,网络设备500在处理报文时,仅以上述各功能单元的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元完成,即将网络设备500的内部结构划分成不同的功能单元,以完成以上描述的全部或者部分功能。另外,上述实施例提供的网络设备500与上述方法300或方法400属于同一构思,其具体实现过程详见方法300或方法400,这里不再赘述。
附图11是本申请实施例提供的一种网关设备600的结构示意图,如附图11所示,网关设备600包括:处理单元601,用于执行S302;发送单元602,用于执行S303。
可选地,发送单元602,用于在IGP域中广播第一IGP报文,IGP域包括多个网络设备。
可选地,网关设备600的第一接口被配置为接收存储请求,网关设备600的第二接口被配置为接收执行区块链任务所需的共识算法,网关设备600的第三接口被配置为给区块链任务分配算力,网关设备600的第四接口被配置为处理IGP报文。
可选地,处理单元601,用于执行S306和S307。
可选地,网关设备600还包括:接收单元,用于执行S311;处理单元601,用于对区块进行验证;处理单元601,用于若区块验证通过且经过共识,将区块存储至区块链上。
应理解,网关设备600对应于上述方法实施例中的网关设备,网关设备600中的各单元和上述其他操作和/或功能分别为了实现方法300或方法400中的网关设备所实施的各种步骤和方法,具体细节可参见上述方法300或方法400,为了简洁,在此不再赘述。
应理解,网关设备600在处理报文时,仅以上述各功能单元的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元完成,即将网关设备600的内部结构划分成不同的功能单元,以完成以上描述的全部或者部分功能。另外,上述实施例提供的网关设备600与上述方法300或方法400属于同一构思,其具体实现过程详见方法300或方法400,这里不再赘述。
下面对网络设备的硬件结构进行介绍。
网络设备700对应于上述方法300的第一网络设备或第二网络设备;或,网络设备700对应于方法400中的Router,网络设备700中的各硬件、模块和上述其他操作和/或功能分别为了实现第一网络设备或第二网络设备、Router所实施的各种步骤和方法,关于网络设备700如何基于IGP构建区块链网络的详细流程,具体细节可参见上述方法300或方法400,为了简洁,在此不再赘述。其中,方法300或方法400的各步骤通过网络设备700处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤,为避免重复,这里不再详细描述。
网络设备700对应于附图10示出的网络设备500,网络设备500中的每个单元采用网络设备700的软件实现。换句话说,网络设备500包括的单元为网络设备700的处理器读取存储器中存储的程序代码后生成的。
参见附图12,附图12示出了本申请一个示例性实施例提供的网络设备700的结构示意图,该网络设备700可以配置为第一网络设备或第二网络设备。网络设备700包括:主控板710和接口板730。
主控板也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板710用于对网络设备700中各个组件的控制和管理,包括路由计算、设备管理、设备维护、协议处理功能。主控板710包括:中央处理器711和存储器712。
接口板730也称为线路接口单元卡(line processing unit,LPU)、线卡(line card)或业务板。接口板730用于提供各种业务接口并实现数据包的转发。业务接口包括而不限于以太网接口、POS(Packet over SONET/SDH)接口等,以太网接口例如是灵活以太网业务接口(Flexible Ethernet Clients,FlexE Clients)。接口板730包括:中央处理器731、网络处理器732、转发表项存储器734和物理接口卡(physical interface card,PIC)733。
接口板730上的中央处理器731用于对接口板730进行控制管理并与主控板710上的中央处理器711进行通信。
网络处理器732用于实现报文的转发处理。网络处理器732的形态可以是转发芯片。具体而言,网络处理器732用于基于转发表项存储器734保存的转发表转发接收到的报文,如果报文的目的地址为网络设备700的地址,则将该报文上送至CPU(如中央处理器711)处理;如果报文的目的地址不是网络设备700的地址,则根据该目的地址从转发表中查找到该目的地址对应的下一跳和出接口,将该报文转发到该目的地址对应的出接口。其中,上行报文的处理包括:报文入接口的处理,转发表查找;下行报文的处理:转发表查找等等。
物理接口卡733用于实现物理层的对接功能,原始的流量由此进入接口板730,以及处理后的报文从该物理接口卡733发出。物理接口卡733也称为子卡,可安装在接口板730上,负责将光电信号转换为报文并对报文进行合法性检查后转发给网络处理器732处理。在一些实施例中,中央处理器也可执行网络处理器732的功能,比如基于通用CPU实现软件转发,从而物理接口卡733中不需要网络处理器732。
可选地,网络设备700包括多个接口板,例如网络设备700还包括接口板740,接口板740包括:中央处理器741、网络处理器742、转发表项存储器744和物理接口卡743。
可选地,网络设备700还包括交换网板720。交换网板720也可以称为交换网板单元(switch fabric unit,SFU)。在网络设备有多个接口板730的情况下,交换网板720用于完成各接口板之间的数据交换。例如,接口板730和接口板740之间可以通过交换网板720通信。
主控板710和接口板730耦合。例如。主控板710、接口板730和接口板740,以及交换网板720之间通过系统总线与系统背板相连实现互通。在一种可能的实现方式中,主控板710和接口板730之间建立进程间通信协议(inter-process communication,IPC)通道,主控板710和接口板730之间通过IPC通道进行通信。
在逻辑上,网络设备700包括控制面和转发面,控制面包括主控板710和中央处理器731,转发面包括执行转发的各个组件,比如转发表项存储器734、物理接口卡733和网络处理器732。控制面执行路由器、生成转发表、处理信令和协议报文、配置与维护设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,网络处理器732基于控制面下发的转发表对物理接口卡733收到的报文查表转发。控制面下发的转发表可以保存在转发表项存储器734中。在有些实施例中,控制面和转发面可以完全分离,不在同一设备上。
如果网络设备700被配置为第一网络设备,网络设备700用于执行上述S304至S309。
其中,网络设备700如何执行S304、S306和S307包括多种实现方式。在一些实施例中,物理接口卡733接收第一IGP报文,物理接口卡733将第一IGP报文上送至主控板710上的中央处理器711,中央处理器711根据第一IGP报文,获取共识机制的输入数据,根据输入数据,执行区块链任务。在另一些实施例中,物理接口卡733接收第一IGP报文,物理接口卡733将第一IGP报文上送至接口板730上的中央处理器731,中央处理器731根据第一IGP报文,获取共识机制的输入数据,根据输入数据,执行区块链任务。在另一些实施例中,物理接口卡733接收第一IGP报文,物理接口卡733将第一IGP报文上送至接口板730上的NPU(NPU在附图12中未示出),NPU根据第一IGP报文,获取共识机制的输入数据,根据输入数据,执行区块链任务。
其中,网络设备700如何执行第三IGP报文的处理过程包括多种实现方式。在一些实施例中,物理接口卡733接收第三IGP报文,物理接口卡733将第三IGP报文上送至主控板710上的中央处理器711,中央处理器711对第二区块进行验证;若第二区块验证通过且经过共识,中央处理器711将第二区块存储至区块链上。例如,通过存储器712存储区块链,将第二区块写入至存储器712上保存的区块链上。在一些实施例中,物理接口卡733接收第三IGP报文,物理接口卡733将第三IGP报文上送至接口板730上的中央处理器731,中央处理器731对第二区块进行验证;若第二区块验证通过且经过共识,中央处理器731将第二区块存储至区块链上。例如,通过转发表项存储器534存储区块链,将第二区块写入至转发表项存储器534上保存的区块链上。
其中,网络设备700如何执行S308和S309包括多种实现方式。在一些实施例中,网络处理器732生成第二IGP报文,根据出接口等信息,在完成链路层封装后,将第二IGP报文从物理接口卡733发送出去。
如果网络设备700被配置为第二网络设备,网络设备700用于执行上述S310。在一些实施例中,物理接口卡733接收第二IGP报文,物理接口卡733将第二IGP报文上送至主控板710上的中央处理器711,中央处理器711对第一区块进行验证;若第一区块验证通过且经过共识,中央处理器711将第一区块存储至区块链上。例如,通过存储器712存储区块链,将第一区块写入至存储器712上保存的区块链上。在一些实施例中,物理接口卡733接收第二IGP报文,物理接口卡733将第二IGP报文上送至接口板730上的中央处理器731,中央处理器731对第一区块进行验证;若第一区块验证通过且经过共识,中央处理器731将第一区块存储至区块链上。例如,通过转发表项存储器534存储区块链,将第一区块写入至转发表项存储器534上保存的区块链上。
应理解,本申请实施例中接口板740上的操作与接口板730的操作一致,为了简洁,不再赘述。应理解,本实施例的网络设备700可对应于上述各个方法实施例中的第一网络设备或第二网络设备,该网络设备700中的主控板710、接口板730和/或740可以实现上述各个方法实施例中的第一网络设备或第二网络设备所具有的功能和/或所实施的各种步骤,为了简洁,在此不再赘述。
应理解,网络设备500中的接收单元501相当于网络设备700中的物理接口卡733或物理接口卡743;网络设备500中的处理单元502可以相当于网络设备700中的中央处理器711、中央处理器731、网络处理器732、中央处理器741或网络处理器742。
值得说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主 控板。接口板可能有一块或多块,网络设备的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,网络设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,网络设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的网络设备的数据接入和处理能力要大于集中式架构的设备。可选地,网络设备的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能,这种形态设备的数据交换和处理能力较低(例如,低端交换机或路由器等网络设备)。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。
下面对网关设备的硬件结构进行介绍。
网关设备800对应于上述方法300或方法400中的网关设备(BCGW),网关设备800中的各硬件、模块和上述其他操作和/或功能分别为了实现方法实施例中网关设备(BCGW)所实施的各种步骤和方法,关于网关设备800如何对样本文件进行检测的详细流程,具体细节可参见上述方法300或方法400,为了简洁,在此不再赘述。其中,方法300或方法400的各步骤通过网关设备800处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤,为避免重复,这里不再详细描述。
网关设备800对应于附图11中的网关设备600,网关设备600中的每个单元采用网关设备800的软件实现。换句话说,网关设备600包括的单元为网关设备800的处理器读取存储器中存储的程序代码后生成的。
参见附图13,附图13示出了本申请一个示例性实施例提供的网关设备800的结构示意图。例如,该网关设备800是主机、服务器或个人计算机等。该网关设备800可以由一般性的总线体系结构来实现。
网关设备800包括至少一个处理器801、通信总线802、存储器803以及至少一个通信接口804。
处理器801可以是一个通用中央处理器(central processing unit,CPU)、网络处理器(network processer,NP)、微处理器、或者可以是一个或多个用于实现本申请方案的集成电路,例如,专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。
通信总线802用于在上述组件之间传送信息。通信总线802可以分为地址总线、数据总线、控制总线等。为便于表示,附图13中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
存储器803可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,也可以是随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only Memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器803可以是独立存在,并通过通信总线802与处理器801相连接。存储器803也可以和处理器801集成在一起。
通信接口804使用任何收发器一类的装置,用于与其它设备或通信网络通信。通信接口804包括有线通信接口,还可以包括无线通信接口。其中,有线通信接口例如可以为以太网接口。以太网接口可以是光接口,电接口或其组合。无线通信接口可以为无线局域网(wireless local area networks,WLAN)接口,蜂窝网络通信接口或其组合等。
在具体实现中,作为一种实施例,处理器801可以包括一个或多个CPU,如附图13中所示的CPU0和CPU1。
在具体实现中,作为一种实施例,网关设备800可以包括多个处理器,如附图13中所示的处理器801和处理器805。这些处理器中的每一个可以是一个单核处理器(single-CPU),也可以是一个多核处理器(multi-CPU)。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(如计算机程序指令)的处理核。
在具体实现中,作为一种实施例,网关设备800还可以包括输出设备和输入设备。输出设备和处理器801通信,可以以多种方式来显示信息。例如,输出设备可以是液晶显示器(liquid crystal display,LCD)、发光二级管(light emitting diode,LED)显示设备、阴极射线管(cathode ray tube,CRT)显示设备或投影仪(projector)等。输入设备和处理器801通信,可以以多种方式接收用户的输入。例如,输入设备可以是鼠标、键盘、触摸屏设备或传感设备等。
在一些实施例中,存储器803用于存储执行本申请方案的程序代码810,处理器801可以执行存储器803中存储的程序代码810。也即是,网关设备800可以通过处理器801以及存储器803中的程序代码810,来实现方法实施例提供的报文处理方法。
本申请实施例的网关设备800可对应于上述各个方法实施例中的网关设备,并且,该网关设备800中的处理器801、通信接口804等可以实现上述各个方法实施例中的网关设备所具有的功能和/或所实施的各种步骤和方法。为了简洁,在此不再赘述。
应理解,网关设备600中的发送单元602相当于网关设备800中的通信接口804;网关设备600中的处理单元601可以相当于网关设备800中的处理器801。
参见附图14,本申请实施例提供了一种网络系统900,系统900包括:网络设备901和网关设备902。可选的,网络设备901为如附图10所示的网络设备500或附图12所示的网络设备700,网关设备902为如附图11的网关设备600或附图13所示的网关设备800。
应理解,上述各种产品形态的网络设备和网关设备,分别具有上述方法实施例第一网络设备、第二网络设备或网关设备的任意功能,此处不再赘述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例中描述的各方法步骤和单 元,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各实施例的步骤及组成。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。本领域普通技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参见前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,该单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。
该作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本申请实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
该集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例中方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本申请中术语“第一”“第二”等字样用于对作用和功能基本相同的相同项或相似项进行区分,应理解,“第一”、“第二”之间不具有逻辑或时序上的依赖关系,也不对数量和执行顺序进行限定。还应理解,尽管以下描述使用术语第一、第二等来描述各种元素,但这些元素不应受术语的限制。这些术语只是用于将一元素与另一元素区别分开。例如,在不脱离各种示例的范围的情况下,第一网络设备可以被称为第二网络设备,并且类似地,第二网络设备可以被称为第一网络设备。第一网络设备和第二网络设备都可以是网络设备,并且在某些情况下,可以是单独且不同的网络设备。
本申请中术语“至少一个”的含义是指一个或多个,本申请中术语“多个”的含义是指两个或两个以上,例如,多个网络设备是指两个或两个以上的网络设备。本文中术语“系统”和“网络”经常可互换使用。
还应理解,术语“如果”可被解释为意指“当...时”(“when”或“upon”)或“响应于确定”或“响应于检测到”。类似地,根据上下文,短语“如果确定...”或“如果检测到[所陈述的条件或事件]”可被解释为意指“在确定...时”或“响应于确定...”或“在检测到[所陈述的条件或事件]时”或“响应于检测到[所陈述的条件或事件]”。
以上描述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机程序指令。在计算机上加载和执行该计算机程序指令时,全部或部分地产生按照本申请实施例中的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,该计算机程序指令可以从一个网站站点、计算机、服务器或数据中心通过有线或无线方式向另一个网站站点、计算机、服务器或数据中心进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质(例如软盘、硬盘、磁带)、光介质(例如,数字视频光盘(digital video disc,DVD)、或者半导体介质(例如固态硬盘)等。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,该程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上描述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。
Claims (27)
- 一种报文处理方法,其特征在于,所述方法包括:第一网络设备接收第一内部网关协议IGP报文,所述第一IGP报文包括第一字段,所述第一字段用于指示执行区块链任务,所述区块链任务是区块链网络的共识机制对应的计算任务,所述区块链网络包括所述第一网络设备;所述第一网络设备根据所述第一IGP报文,获取所述共识机制的输入数据;所述第一网络设备根据所述输入数据,执行所述区块链任务。
- 根据权利要求1所述的方法,其特征在于,所述第一IGP报文包括链路状态广播LSA头,所述LSA头包括链路状态LS类型字段,所述第一字段包括所述LS类型字段;或者,所述第一IGP报文包括链路状态报文协议数据单元LSP PDU类型字段,所述第一字段包括所述LSP PDU类型字段。
- 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:根据所述第一网络设备的中央处理器CPU利用率小于阈值,确定执行所述区块链任务。
- 根据权利要求1-3任一项所述的方法,其特征在于,所述第一网络设备接收第一内部网关协议IGP报文之后,所述方法还包括:所述第一网络设备在IGP域中广播所述第一IGP报文,所述IGP域包括所述第一网络设备和第二网络设备。
- 根据权利要求1-4中任一项所述的方法,其特征在于,所述执行所述区块链任务之后,所述方法还包括:所述第一网络设备生成第二IGP报文,所述第二IGP报文包括所述第一网络设备执行所述区块链任务得到的第一区块;所述第一网络设备在IGP域中广播所述第二IGP报文。
- 根据权利要求1-4中任一项所述的方法,其特征在于,所述方法还包括:所述第一网络设备从IGP域中的第二网络设备接收第三IGP报文,所述第三IGP报文包括所述第二网络设备执行所述区块链任务得到的第二区块;所述第一网络设备对所述第二区块进行验证;若所述第二区块验证通过且经过共识,所述第一网络设备将所述第二区块存储至区块链上。
- 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:若所述第一网络设备的CPU利用率大于阈值,所述第一网络设备停止执行所述区块链任务。
- 一种报文处理方法,其特征在于,所述方法包括:网关设备响应于存储请求,生成第一内部网关协议IGP报文,所述第一IGP报文包括第一字段,所述第一字段用于指示执行区块链任务,所述区块链任务是区块链网络的共识机制对应的计算任务;所述网关设备发送所述第一IGP报文。
- 根据权利要求8所述的方法,其特征在于,所述网关设备发送所述第一IGP报文,包括:所述网关设备在IGP域中广播所述第一IGP报文,所述IGP域包括多个网络设备。
- 根据权利要求8或9所述的方法,其特征在于,所述网关设备的第一接口被配置为接收所述存储请求,所述网关设备的第二接口被配置为接收执行所述区块链任务所需的共识算法,所述网关设备的第三接口被配置为给所述区块链任务分配算力,所述网关设备的第四接口被配置为处理IGP报文。
- 根据权利要求8-10任一项所述的方法,其特征在于,所述方法还包括:所述网关设备获取所述共识机制的输入数据;所述网关设备根据所述输入数据,执行所述区块链任务。
- 根据权利要求9-11任一项所述的方法,其特征在于,所述网关设备发送所述第一IGP报文之后,所述方法还包括:所述网关设备接收第二IGP报文,所述第二IGP报文包括网络设备执行所述区块链任务得到的区块;所述网关设备对所述区块进行验证;若所述区块验证通过且经过共识,所述网关设备将所述区块存储至区块链上。
- 根据权利要求9-12任一项所述的方法,其特征在于,所述第一IGP报文包括链路状态广播LSA头,所述LSA头包括链路状态LS类型字段,所述第一字段包括所述LS类型字段;或者,所述第一IGP报文包括链路状态报文协议数据单元LSP PDU类型字段,所述第一字段包括所述LSP PDU类型字段。
- 一种第一网络设备,其特征在于,包括:接收单元,用于接收第一内部网关协议IGP报文,所述第一IGP报文包括第一字段,所述第一字段用于指示执行区块链任务,所述区块链任务是区块链网络的共识机制对应的计算任务,所述区块链网络包括所述第一网络设备;处理单元,用于根据所述第一IGP报文,获取所述共识机制的输入数据;所述处理单元,用于根据所述输入数据,执行所述区块链任务。
- 根据权利要求14所述的第一网络设备,其特征在于,所述第一IGP报文包括链路状态广播LSA头,所述LSA头包括链路状态LS类型字段,所述第一字段包括所述LS类型字段;或者,所述第一IGP报文包括链路状态报文协议数据单元LSP PDU类型字段,所述第一字段包括所述LSP PDU类型字段。
- 根据权利要求14或15所述的第一网络设备,其特征在于,所述处理单元用于根据所述第一网络设备的中央处理器CPU利用率小于阈值,确定执行所述区块链任务。
- 根据权利要求14-16中任一项所述的第一网络设备,其特征在于,所述第一网络设备还包括:广播单元,用于在IGP域中广播所述第一IGP报文,所述IGP域包括所述第一网络设备和第二网络设备。
- 根据权利要求14-17中任一项所述的第一网络设备,其特征在于,所述处理单元,用于生成第二IGP报文,所述第二IGP报文包括所述第一网络设备执行所述区块链任务得到的第一区块;所述第一网络设备还包括:广播单元,用于在IGP域中广播所述第二IGP报文。
- 根据权利要求14-17中任一项所述的第一网络设备,其特征在于,所述接收单元,还用于从IGP域中的第二网络设备接收第三IGP报文,所述第三IGP报文包括所述第二网络设备执行所述区块链任务得到的第二区块;所述处理单元,用于对所述第二区块进行验证;所述处理单元,用于若所述第二区块验证通过且经过共识,将所述第二区块存储至区块链上。
- 根据权利要求14所述的第一网络设备,其特征在于,所述处理单元,用于若所述第一网络设备的CPU利用率大于阈值,停止执行所述区块链任务。
- 一种网关设备,其特征在于,包括:处理单元,用于响应于存储请求,生成第一内部网关协议IGP报文,所述第一IGP报文包括第一字段,所述第一字段用于指示执行区块链任务,所述区块链任务是区块链网络的共识机制对应的计算任务;发送单元,用于发送所述第一IGP报文。
- 根据权利要求21所述的网关设备,其特征在于,所述发送单元,用于在IGP域中广播所述第一IGP报文,所述IGP域包括多个网络设备。
- 根据权利要求21或22所述的网关设备,其特征在于,所述网关设备的第一接口被 配置为接收所述存储请求,所述网关设备的第二接口被配置为接收执行所述区块链任务所需的共识算法,所述网关设备的第三接口被配置为给所述区块链任务分配算力,所述网关设备的第四接口被配置为处理IGP报文。
- 根据权利要求21-23任一项所述的网关设备,其特征在于,所述处理单元用于获取所述共识机制的输入数据;所述处理单元,用于根据所述输入数据,执行所述区块链任务。
- 根据权利要求21-24任一项所述的网关设备,其特征在于,所述网关设备还包括:接收单元,用于接收第二IGP报文,所述第二IGP报文包括网络设备执行所述区块链任务得到的区块;所述处理单元,用于对所述区块进行验证;所述处理单元,用于若所述区块验证通过且经过共识,将所述区块存储至区块链上。
- 根据权利要求21-25任一项所述的网关设备,其特征在于,所述第一IGP报文包括链路状态广播LSA头,所述LSA头包括链路状态LS类型字段,所述第一字段包括所述LS类型字段;或者,所述第一IGP报文包括链路状态报文协议数据单元LSP PDU类型字段,所述第一字段包括所述LSP PDU类型字段。
- 一种网络系统,其特征在于,所述系统包括网络设备和网关设备,所述网络设备为权利要求14至20任一项的所述第一网络设备,所述网关设备为权利要求21至26任一项的所述网关设备。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010496892.4 | 2020-06-03 | ||
CN202010496892.4A CN113765956B (zh) | 2020-06-03 | 2020-06-03 | 报文处理方法、设备、系统及存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021244206A1 true WO2021244206A1 (zh) | 2021-12-09 |
Family
ID=76137952
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/091881 WO2021244206A1 (zh) | 2020-06-03 | 2021-05-06 | 报文处理方法、设备、系统及存储介质 |
Country Status (4)
Country | Link |
---|---|
US (1) | US11616706B2 (zh) |
EP (1) | EP3920478B1 (zh) |
CN (1) | CN113765956B (zh) |
WO (1) | WO2021244206A1 (zh) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113919846B (zh) * | 2021-12-15 | 2022-03-08 | 腾讯科技(深圳)有限公司 | 区块链节点动态分组方法、装置、计算机设备和存储介质 |
CN115208956B (zh) * | 2022-06-23 | 2023-06-02 | 北京链道科技有限公司 | 区块链网关的实现方法 |
CN116074390B (zh) * | 2022-12-09 | 2024-10-18 | 重庆大学 | 一种新能源算力网络感知与路由的系统和方法 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109165092A (zh) * | 2018-07-10 | 2019-01-08 | 矩阵元技术(深圳)有限公司 | 一种基于有效算力贡献的共识方法、装置及系统 |
CN111082922A (zh) * | 2018-10-18 | 2020-04-28 | 北京天能博信息科技有限公司 | 一种区块链的数据处理方法及相关设备 |
WO2020099924A1 (en) * | 2018-11-08 | 2020-05-22 | Iagon As | Intelligent, decentralized and autonomous marketplace for distributed computing and storage |
Family Cites Families (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7254111B2 (en) * | 2001-10-05 | 2007-08-07 | Samsung Electronics Co., Ltd. | Routing coordination protocol for a massively parallel router architecture |
US7600255B1 (en) * | 2004-04-14 | 2009-10-06 | Cisco Technology, Inc. | Preventing network denial of service attacks using an accumulated proof-of-work approach |
US8488491B2 (en) * | 2009-11-12 | 2013-07-16 | Cisco Technology, Inc. | Compressed virtual routing and forwarding in a communications network |
WO2013052893A1 (en) * | 2011-10-07 | 2013-04-11 | Huawei Technologies Co., Ltd. | Simple topology transparent zoning in network communications |
US20170236120A1 (en) * | 2016-02-11 | 2017-08-17 | Oracle International Corporation | Accountability and Trust in Distributed Ledger Systems |
US11223598B2 (en) * | 2016-05-03 | 2022-01-11 | Nokia Of America Corporation | Internet security |
CN107231299A (zh) * | 2017-06-07 | 2017-10-03 | 众安信息技术服务有限公司 | 一种链路由及实现区块链跨链通信的系统 |
US11281644B2 (en) * | 2017-07-28 | 2022-03-22 | Hitachi, Ltd. | Blockchain logging of data from multiple systems |
US20190058709A1 (en) * | 2017-08-16 | 2019-02-21 | Telefonaktiebolaget Lm Ericsson (Publ) | Tenant management method and system in a cloud computing environment |
US10997125B2 (en) * | 2017-11-29 | 2021-05-04 | Technion Research & Development Foundation Limited | Proof of lottery (PoL) blockchain |
US20200186458A1 (en) * | 2018-12-06 | 2020-06-11 | T-Mobile Usa, Inc. | Autonomous system route validation via blockchain |
CN109698792B (zh) * | 2018-12-27 | 2021-05-18 | 四川灵通电讯有限公司 | 路由器节点之间的通信方法及其切换方法 |
US20200236031A1 (en) * | 2019-01-23 | 2020-07-23 | Hewlett Packard Enterprise Development Lp | Blockchain Routing Protocols |
US20200236032A1 (en) * | 2019-01-23 | 2020-07-23 | Hewlett Packard Enterprise Development Lp | Blockchain Routing Protocols |
CN110266655B (zh) * | 2019-05-30 | 2021-11-12 | 中国工商银行股份有限公司 | 一种基于区块链的跨链互联方法、设备以及系统 |
-
2020
- 2020-06-03 CN CN202010496892.4A patent/CN113765956B/zh active Active
-
2021
- 2021-05-06 WO PCT/CN2021/091881 patent/WO2021244206A1/zh active Application Filing
- 2021-05-26 EP EP21175907.1A patent/EP3920478B1/en active Active
- 2021-06-02 US US17/336,439 patent/US11616706B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109165092A (zh) * | 2018-07-10 | 2019-01-08 | 矩阵元技术(深圳)有限公司 | 一种基于有效算力贡献的共识方法、装置及系统 |
CN111082922A (zh) * | 2018-10-18 | 2020-04-28 | 北京天能博信息科技有限公司 | 一种区块链的数据处理方法及相关设备 |
WO2020099924A1 (en) * | 2018-11-08 | 2020-05-22 | Iagon As | Intelligent, decentralized and autonomous marketplace for distributed computing and storage |
Also Published As
Publication number | Publication date |
---|---|
CN113765956A (zh) | 2021-12-07 |
US11616706B2 (en) | 2023-03-28 |
EP3920478B1 (en) | 2024-07-31 |
US20210385140A1 (en) | 2021-12-09 |
EP3920478A1 (en) | 2021-12-08 |
CN113765956B (zh) | 2024-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021244206A1 (zh) | 报文处理方法、设备、系统及存储介质 | |
US9342575B2 (en) | Providing high availability in an active/active appliance cluster | |
WO2022095857A1 (zh) | 拓扑信息的发布方法、网络拓扑收集方法及设备 | |
US10326613B2 (en) | Method and system for processing spanning tree protocol (STP) state in a multichassis link aggregation (MLAG) domain | |
US8358662B2 (en) | Creating and maintaining traffic engineered database for path computation element | |
CN102124456A (zh) | 用于在逻辑路由器之间的链路共享的方法和装置 | |
CN103825826B (zh) | 一种动态路由的实现方法和装置 | |
CN110061912A (zh) | 仲裁虚拟节点的冗余控制平面之间的主控权 | |
Costa et al. | Camcubeos: a key-based network stack for 3d torus cluster topologies | |
CN104410527A (zh) | 一种拓扑检测方法、交换机及热堆叠系统 | |
WO2021004213A1 (zh) | 融合网络的路径标签确定方法及装置、存储介质及电子装置 | |
KR101924002B1 (ko) | 칩 멀티 프로세서, 및 칩 멀티 프로세서를 위한 라우터 | |
CN108900422B (zh) | 组播转发方法、装置及电子设备 | |
Yuan et al. | Disaggregated optical data center in a box network using parallel OCS topologies | |
CN113193988B (zh) | 一种多pce的路径计算交互方法和系统 | |
WO2021219049A1 (zh) | 一种信息上报方法、信息处理方法、装置及设备 | |
JP2023542677A (ja) | 経路識別割振り方法、システム、および装置、デバイス、ならびに記憶媒体 | |
Wang | Rural financial service promotion mechanism based on data center network | |
WO2022194193A1 (zh) | 用于获取路径的方法和装置 | |
US20140304554A1 (en) | Enabling communication over cross-coupled links between independently managed compute and storage networks | |
CN114025025B (zh) | SRv6 SID的发布方法及网络设备 | |
CN112769698B (zh) | 一种路由实现方法和装置 | |
Varis et al. | Dbridges: Flexible floodless frame forwarding | |
Csernai et al. | Incrementally upgradable data center architecture using hyperbolic tessellations | |
WO2023169364A1 (zh) | 路由生成方法、数据报文的转发方法及装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21817055 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21817055 Country of ref document: EP Kind code of ref document: A1 |