CN111432011B - Block chain network communication method and equipment - Google Patents

Block chain network communication method and equipment Download PDF

Info

Publication number
CN111432011B
CN111432011B CN202010237074.2A CN202010237074A CN111432011B CN 111432011 B CN111432011 B CN 111432011B CN 202010237074 A CN202010237074 A CN 202010237074A CN 111432011 B CN111432011 B CN 111432011B
Authority
CN
China
Prior art keywords
block chain
node
network message
network
target block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010237074.2A
Other languages
Chinese (zh)
Other versions
CN111432011A (en
Inventor
王玉操
郑旗
肖伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu International Technology Shenzhen Co ltd
Original Assignee
Baidu International Technology Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Baidu International Technology Shenzhen Co ltd filed Critical Baidu International Technology Shenzhen Co ltd
Priority to CN202010237074.2A priority Critical patent/CN111432011B/en
Publication of CN111432011A publication Critical patent/CN111432011A/en
Application granted granted Critical
Publication of CN111432011B publication Critical patent/CN111432011B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

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

Abstract

The embodiment of the disclosure discloses a network communication method and equipment of a block chain, and relates to the technical field of block chains. The specific implementation scheme is as follows: the method comprises the steps of firstly obtaining a network message to be sent, then analyzing the network message to obtain a current broadcast strategy of the network message, finally determining a target block chain node for receiving the network message based on the current broadcast strategy, determining a link mode of the node and the target block chain node, and sending the network message to the target block chain node based on the determined link mode, so that the network message can shield a routing layer when the nodes of the block chain communicate with each other, and in different types of block chains, the nodes communicate with each other without communicating based on a routing protocol, therefore, the p2p network can be suitable for different types of block chains, and the applicability is wider.

Description

Block chain network communication method and equipment
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to the technical field of block chains, and particularly relates to a network communication method and device of a block chain.
Background
Peer-to-peer networks p2p (peer) consist of a set of devices that collectively store and share files, with each participant (node) acting as an independent peer.
In the related art, since the network scale and the network capability of the different types of blockchains are different, in the different types of blockchain systems, the communication between the nodes is performed through networks with different network protocols.
Disclosure of Invention
The embodiment of the disclosure provides a block chain network communication method and device.
In a first aspect, an embodiment of the present disclosure provides a method for network communication of a block chain, where the method includes: acquiring a network message to be sent; analyzing the network message to obtain a current broadcast strategy of the network message, wherein the current broadcast strategy is used for representing a transmission mode of the network message; and determining a target block chain node for receiving the network message based on the current broadcast strategy, determining a link mode of the node and the target block chain node, and sending the network message to the target block chain node based on the determined link mode.
In a second aspect, an embodiment of the present disclosure provides a network communication device of a block chain, where the device includes: a service module configured to acquire a network message to be transmitted; the interface module is configured to analyze the network message to obtain a current broadcast strategy of the network message, wherein the current broadcast strategy is used for representing a transmission mode of the network message; and the network module is configured to determine a target block chain node for receiving the network message based on the current broadcast strategy, determine a link mode of the node and the target block chain node, and send the network message to the target block chain node based on the determined link mode.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method as any one of the embodiments of the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform a method as in any of the first aspect.
The network communication method and the device of the block chain provided by the embodiment of the disclosure firstly acquire a network message to be sent, then analyze the network message to obtain a current broadcast strategy of the network message, finally determine a target block chain node for receiving the network message based on the current broadcast strategy, determine a link mode of the node and the target block chain node, and send the network message to the target block chain node based on the determined link mode; the communication between the nodes is established based on the broadcast strategy, so that the network message can shield a routing layer when the nodes of the block chain communicate with each other, and the nodes do not need to communicate with each other based on a routing protocol in the block chains of different types, so that the p2p network can be suitable for the block chains of different types, and the applicability is wider.
Drawings
Other features, objects and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which some embodiments of the present disclosure may be applied;
fig. 2 is a flow diagram of one embodiment of a method of network communication of a blockchain according to the present disclosure;
fig. 3 is a flow chart of yet another embodiment of a method of network communication of a blockchain in accordance with the present disclosure;
fig. 4 is a block diagram of one embodiment of a network communication device of a blockchain according to the present disclosure;
FIG. 5 is a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the figures and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 of a block chain network communication method and apparatus to which embodiments of the present disclosure may be applied.
As shown in fig. 1, a system architecture 100 may include a node 101, a node 102, and a node 103, where the node 101 may be a server or a client, and the node 102 and the node 103 may be a server or a client. The network 104 may be a p2p network and may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The nodes 101, 102 and 103 may be hardware or software. When nodes 101, 102, 103 are hardware, they may be various electronic devices with computing processing capabilities, including but not limited to smart phones, tablets, laptop and desktop computers, and the like. When the nodes 101, 102, 103 are software, they can be installed in the electronic devices listed above. It may be implemented, for example, as multiple software or software modules to provide distributed services, or as a single software or software module. And is not particularly limited herein.
It should be noted that the network communication method of the block chain provided by the embodiment of the present disclosure may be executed by any node 101, 102, or 103. Accordingly, the network communication device of the block chain may be disposed in the node 101, 102 or 103 without being particularly limited thereto.
It should be noted that the server and the client may be hardware or software. When the server and the client are hardware, they may be implemented as a distributed device cluster formed by devices, or as a single device. When the server and the client are software, they may be implemented as multiple pieces of software or software modules for providing distributed services, or as a single piece of software or software module. And is not particularly limited herein. It should be understood that the number of nodes and networks in fig. 1 is merely illustrative. There may be any number of node devices and networks, as desired for an implementation.
With continued reference to fig. 2, fig. 2 illustrates a flow 200 of one embodiment of a block chain network communication method according to the present disclosure. The network communication method of the block chain comprises the following steps:
step 201, acquiring a network message to be sent.
In this embodiment, an execution subject (for example, the node 101 shown in fig. 1) of the network communication method of the block chain may obtain a network message to be sent from a local area, or may obtain the network message to be sent from another node in the block chain in a wired connection manner or a wireless connection manner. It is noted that the wireless connection means may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a UWB (ultra wideband) connection, and other wireless connection means now known or developed in the future.
In some optional implementations of this embodiment, the network message may include a broadcast message and/or a broadcast query message.
In particular, the broadcast message may be content that the execution body broadcasts to other nodes in the blockchain. The broadcast query message may be content that the execution body broadcasts to indicate the query request into the blockchain system. By acquiring the broadcast message and/or the broadcast query message, broadcasting and querying of different types of network messages in the blockchain can be further realized.
Step 202, analyzing the network message to obtain a current broadcast strategy of the network message, wherein the current broadcast strategy is used for representing a transmission mode of the network message.
In this embodiment, the network message may be parsed according to a preset rule to obtain a current broadcast policy of the network message, where the current broadcast policy may be one of preset broadcast policy sets, and the broadcast policies included in the preset broadcast policy set are all used to characterize a transmission mode of the network message, and may be a default broadcast policy (defaultbroadcast policy), a hierarchical broadcast policy (bucktstream), a neighboring node broadcast policy (neirest buckacktts), a hierarchical proportional broadcast policy (buckstwithfanctorstrand), a core node broadcast policy (coreprestryarn), or a static node broadcast policy (statrstream), where the broadcast policies may all indicate a transmission mode of the network message, such as a neighboring node broadcast policy, and may be that an execution subject (local node) broadcasts the network message to neighboring nodes, and similarly, a broadcast range of the network message may be determined based on other broadcast policies.
Specifically, the analyzing the network message to obtain the current broadcast policy of the network message may be analyzing a parameter indicating the broadcast policy in the network message, and directly determining the current broadcast policy based on the parameter, for example, the network message includes a broadcast policy that can directly determine a transmission mode of the network message.
Step 203, based on the current broadcast strategy, determining the target block chain node for receiving the network message, determining the link mode of the node and the target block chain node, and based on the determined link mode, sending the network message to the target block chain node.
In this embodiment, the executing agent may determine the target blockchain node according to the determined current broadcast policy. For example, from a locally stored list of blockchain nodes, a blockchain link point that meets the current broadcast policy is determined as the target blockchain node.
Alternatively, the executing body may obtain, from the routing table, a target blockchain node that meets the current broadcast policy based on the current broadcast policy. Specifically, based on the current broadcast policy, the executing entity may obtain a broadcast list from the routing table, where the broadcast list may include an association relationship between a preset broadcast policy and a preset block chain node, and then the executing entity may use the preset block chain node associated with the preset broadcast policy matched with the current broadcast policy in the broadcast list as the target block chain node.
After determining the target block chain node, the execution main body can directly establish the connection with the target block chain node by adopting a preset link mode, send a network message to the target block chain node, and can inject and sell the connection after the network message is transmitted.
The execution main body can also acquire the preset link mode of the node and the target block chain node from the link pool after the target block chain node is determined, establish connection with the target block chain node by adopting the preset link mode, send a network message to the target block chain node, and can inject and sell the connection after the network message is transmitted. The link pool comprises preset link modes among the block link points.
In the above embodiment, the connection relationship between the target block chain node and the target block chain node may be established by determining the target block chain node and the link mode with the block chain node based on the broadcast policy, so that a routing layer in network communication between the two nodes may be shielded, and in different types of block chains, communication between the nodes is performed without performing communication based on a routing protocol, so that the p2p network of the block chain may be applicable to different types of block chains, and the applicability is wider.
In some optional implementation manners of this embodiment, the method further includes storing the target block chain node and a link manner of the node and the target block chain node in the service module.
Specifically, after the network message is transmitted, the target block link node may be maintained, including storing the address information of the target block link node and the link mode with the target block link node into the storage module of the execution main body, so that when the same network message needs to be sent again, the target block link node to be connected with the node and the link mode between the node and the target block link node may be directly obtained, and thus, the communication efficiency between the nodes may be improved.
The method provided by the embodiment of the disclosure includes first obtaining a network message to be sent, then analyzing the network message to obtain a current broadcast policy of the network message, and finally determining a target block link node for receiving the network message based on the current broadcast policy, determining a link mode of the node and the target block link node, and sending the network message to the target block link node based on the determined link mode, so that the network message can shield a routing layer when the network message communicates between nodes of the block link, and in different types of block links, the nodes do not need to communicate with each other based on a routing protocol, and thus a p2p network can be applicable to different types of block links, and has wider applicability.
With further reference to fig. 3, a flow 300 of yet another embodiment of a method of network communication of a blockchain is shown. The process 300 of the network communication method of the block chain includes the following steps:
step 301, acquiring a network message to be sent.
In this embodiment, an execution subject of the network communication method of the blockchain (for example, the node device 101 shown in fig. 1) may obtain the network message to be sent from the local, or may obtain the network message to be sent from other node devices in the blockchain in a wired connection manner or a wireless connection manner. It is noted that the wireless connection may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a UWB (ultra wideband) connection, and other wireless connection now known or developed in the future.
In some optional implementations of this embodiment, the network message may include a broadcast message and/or a broadcast query message.
In particular, the broadcast message may be content that the execution body broadcasts to other nodes in the blockchain. The broadcast query message may be content that the execution body broadcasts to indicate the query request into the blockchain system. The broadcast and query of different types of network messages in the block chain can be further realized by acquiring the broadcast message and the broadcast query message.
Step 302, analyzing parameters used for indicating the broadcast strategy in the network message to obtain analyzed parameters; and determining a preset broadcast strategy which accords with the analyzed parameters from the preset broadcast strategy set as a current broadcast strategy of the network message.
In this embodiment, a parameter used for indicating a broadcast policy in a network message is parsed to obtain a current broadcast policy of the network message, where the current broadcast policy may be one of preset broadcast policies, and broadcast policies included in the preset broadcast policy set are all used to characterize a transmission mode of the network message, and may be a default broadcast policy (default broadcast policy), a hierarchical broadcast policy (bucktstream), a neighbor node broadcast policy (nearest buckstbrokt), a hierarchical proportion broadcast policy (buckutwithfactctorstrand), a core node broadcast policy (corepeestrream), or a static node broadcast policy (statrstream), where the broadcast policies may all indicate a transmission mode of the network message, such as a neighbor node broadcast policy, and may be that an execution subject sends the network message to a neighbor node device to send the broadcast message, and similarly, a broadcast range of the network message may be determined based on other broadcast policies.
Specifically, the policy set includes an association relationship between the analyzed parameter and the broadcast policy in advance, so that the preset broadcast policy associated with the analyzed parameter can be determined from the preset broadcast policy set based on the analyzed parameter as the current broadcast policy of the network message.
Step 303, determining a target block chain node for receiving the network message based on the current broadcast policy, determining a link mode between the node and the target block chain node, and sending the network message to the target block chain node based on the determined link mode.
In this embodiment, the executing entity may determine the target blockchain node according to the determined current broadcast policy, for example, may determine that the target blockchain node is a neighboring node of the current node according to a neighboring node broadcast policy, where the neighboring node may be a node set based on a preset rule, and similarly may determine the target blockchain node according to other broadcast policies. After the target block chain node is determined, a link mode with the target block chain node can be directly established, and a network message is sent to the target block chain node.
In some optional implementation manners of this embodiment, based on the current broadcast policy, a target block chain node that meets the current broadcast policy is obtained from the routing table; and acquiring the link mode of the node and the target block chain node from a link pool based on the target block chain node, wherein the link pool comprises the preset link mode between block chain link points.
Specifically, based on the current broadcast policy, the enforcement agent may obtain a broadcast list from the routing table, where the broadcast list may contain address information of a target block link node that meets the current broadcast policy; and after the target block link node address is determined, acquiring a link mode for communicating with the target block link node address from the link pool.
In the above embodiment, the connection relationship between the target block chain node and the target block chain node may be established by determining the target block chain node and the link mode with the block chain node based on the broadcast policy, so that a routing layer when the two nodes communicate may be shielded, and in different types of block chains, communication between the nodes does not need to be performed based on a routing protocol, so that the p2p network may be applicable to different types of block chains, and the applicability is wider.
As can be seen from fig. 3, compared with the embodiment corresponding to fig. 2, the flow 300 of the network communication method of the block chain in this embodiment represents a step of analyzing the network message to obtain the current broadcast policy of the network message. Therefore, in the solution described in this embodiment, the network message may shield the routing layer when communicating between nodes of the block chain, and in different types of block chains, the nodes do not need to communicate with each other based on a routing protocol, so that the p2p network may be applicable to different types of block chains, and the applicability is wider, thereby realizing more comprehensive selection of candidate push information and more effective generation of web pages.
In the method provided by the above embodiment of the present disclosure, the parameter used for indicating the broadcast policy in the obtained network message is analyzed to obtain an analyzed parameter; and determining a preset broadcast strategy which is consistent with the analyzed parameters from the preset broadcast strategy set as a current broadcast strategy of the network message, so that the network message can shield a routing layer when communicating among nodes of the block chain, and the nodes do not need to communicate based on a routing protocol in the block chains of different types, so that the p2p network can be suitable for the block chains of different types, and the applicability is wider.
With further reference to fig. 4, as an implementation of the methods shown in the above-mentioned figures, the present disclosure provides an embodiment of a block chain network communication apparatus, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 4, the network communication device 400 of the present embodiment includes: a traffic module 401, an interface module 402 and a network module 403. The service module 401 is configured to obtain a network message to be sent; the interface module 402 is configured to parse the network message to obtain a current broadcast policy of the network message, where the current broadcast policy is used to characterize a transmission mode of the network message; the network module 403 is configured to determine a target blockchain node to receive the network message based on the current broadcast policy, and determine a linking manner of the node and the target blockchain node, and send the network message to the target blockchain node based on the determined linking manner.
In some optional implementations of this embodiment, the interface module is further configured to parse a parameter indicating the broadcast policy in the network message to obtain a parsed parameter; and determining a preset broadcast strategy which accords with the analyzed parameters from the preset broadcast strategy set as a current broadcast strategy of the network message.
In some optional implementations of this embodiment, the network module is further configured to, based on the current broadcast policy, obtain a target blockchain node that meets the current broadcast policy from the routing table; and acquiring the link mode of the node and the target block chain node from a link pool based on the target block chain node, wherein the link pool comprises the preset link mode between block chain link points.
In some optional implementations of this embodiment, the network message includes: broadcasting the message; and/or, broadcast a query message.
In some optional implementations of this embodiment, the network module is further configured to store the target blockchain node and a link manner of the node and the target blockchain node to the service module.
The device provided by the above embodiment of the present disclosure decouples the service module and the network module through the abstract interface module, so that the network module is pluggable, and the pluggable characteristic of the network module is realized, and thus, the network message can shield the routing layer during communication between nodes of the block chain, and in the block chains of different types, communication between nodes does not need to be performed based on a routing protocol, and thus, the p2p network can be applied to the block chains of different types, and the applicability is wider.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
Fig. 5 is a block diagram of an electronic device according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 5, the electronic apparatus includes: one or more processors 501, memory 502, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). Fig. 5 illustrates an example of a processor 501.
Memory 502 is a non-transitory computer readable storage medium as provided herein. Wherein the memory stores instructions executable by at least one processor to cause the at least one processor to perform the method of network communication method of a blockchain provided herein. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the method of the network communication method of the blockchain provided by the present application.
The memory 502, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the method of the network communication method of the blockchain in the embodiments of the present application (e.g., the service module 401, the interface module 402, and the network module 403 shown in fig. 4). The processor 501 executes various functional applications of the server and data processing, i.e., a method of implementing the block-chain network communication method in the above method embodiments, by running non-transitory software programs, instructions, and modules stored in the memory 502.
The memory 502 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device of the network communication method of the block chain, and the like. Further, the memory 502 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 502 optionally includes memory located remotely from processor 501, which may be connected to the electronics of the block chain's network communication method over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the network communication method of the block chain may further include: an input device 503 and an output device 504. The processor 501, the memory 502, the input device 503 and the output device 504 may be connected by a bus or other means, and fig. 5 illustrates the connection by a bus as an example.
The input device 503 may receive input numeric or character information and generate key signal input related to user settings and function control of the electronic apparatus of the network communication method of the block chain, such as an input device of a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointing stick, one or more mouse buttons, a track ball, a joystick, or the like. The output devices 504 may include a display device, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
According to the technical scheme of the embodiment of the application, the routing layer can be shielded when the network message is communicated among the nodes of the block chain, and the nodes are not required to be communicated based on the routing protocol in the block chains with different types, so that the p2p network can be suitable for the block chains with different types, and the applicability is wider.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method of network communication of a blockchain, comprising:
acquiring a network message to be sent;
analyzing the network message to obtain a current broadcast strategy of the network message, wherein the current broadcast strategy is used for representing a transmission mode of the network message;
determining a target block chain node for receiving the network message and a link mode of the node and the target block chain node based on the current broadcast strategy, and sending the network message to the target block chain node based on the determined link mode;
wherein, the determining a target block chain node for receiving the network message and determining a link mode between the node and the target block chain node based on the current broadcast strategy comprises:
based on the current broadcast strategy, acquiring a target block chain node which accords with the current broadcast strategy from a routing table;
and acquiring a link mode of the node and the target block chain node from a link pool based on the target block chain node, wherein the link pool comprises preset link modes between block chain link points.
2. The method for network communication of a block chain according to claim 1, wherein the parsing the network message to obtain the broadcast policy of the network message includes:
analyzing the parameters which are used for indicating the broadcasting strategy in the network message to obtain analyzed parameters; and
and determining a preset broadcast strategy which accords with the analyzed parameters from a preset broadcast strategy set as a current broadcast strategy of the network message.
3. The blockchain network communication method of any one of claims 1-2, wherein the network message includes:
broadcasting the message;
and/or, broadcast a query message.
4. The blockchain network communication method of claim 1, wherein the method further comprises: and storing the target block chain node and the link mode of the node and the target block chain node to a service module.
5. A block-chain network communication device, comprising:
a service module configured to acquire a network message to be transmitted;
the interface module is configured to analyze the network message to obtain a current broadcast strategy of the network message, wherein the current broadcast strategy is used for representing a transmission mode of the network message;
a network module configured to determine a target blockchain node that receives the network message and a link manner of the node and the target blockchain node based on the current broadcast policy, and send the network message to the target blockchain node based on the determined link manner;
wherein the network module is further configured to:
based on the current broadcast strategy, acquiring a target block chain node which accords with the current broadcast strategy from a routing table;
and acquiring a link mode of the node and the target block chain node from a link pool based on the target block chain node, wherein the link pool comprises preset link modes between block chain link points.
6. The blockchain network communication device of claim 5, wherein the interface module is further configured to,
analyzing the parameters which are used for indicating the broadcasting strategy in the network message to obtain analyzed parameters; and determining a preset broadcast strategy conforming to the analyzed parameters from a preset broadcast strategy set as a current broadcast strategy of the network message.
7. The network communication device of the block chain according to any of claims 5-6, wherein the network message comprises:
broadcasting the message;
and/or, broadcast a query message.
8. The network communication device of the blockchain of claim 5, wherein the network module is further configured to: and storing the target block chain node and the link mode of the node and the target block chain node to a service module.
9. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.
10. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-4.
CN202010237074.2A 2020-03-30 2020-03-30 Block chain network communication method and equipment Active CN111432011B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010237074.2A CN111432011B (en) 2020-03-30 2020-03-30 Block chain network communication method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010237074.2A CN111432011B (en) 2020-03-30 2020-03-30 Block chain network communication method and equipment

Publications (2)

Publication Number Publication Date
CN111432011A CN111432011A (en) 2020-07-17
CN111432011B true CN111432011B (en) 2023-02-17

Family

ID=71549812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010237074.2A Active CN111432011B (en) 2020-03-30 2020-03-30 Block chain network communication method and equipment

Country Status (1)

Country Link
CN (1) CN111432011B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111934990B (en) 2020-09-25 2021-02-09 支付宝(杭州)信息技术有限公司 Message transmission method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105591790A (en) * 2014-12-30 2016-05-18 中国银联股份有限公司 Data communication connection pool management device
WO2016177130A1 (en) * 2015-05-07 2016-11-10 中兴通讯股份有限公司 Method and device for selecting communication node
CN107704196A (en) * 2017-03-09 2018-02-16 上海亿账通区块链科技有限公司 Block chain data-storage system and method
CN109302296A (en) * 2018-10-10 2019-02-01 上海保险交易所股份有限公司 Method, equipment and storage medium for broadcasting the message in block chain network
CN109412953A (en) * 2018-12-27 2019-03-01 北京比新科技有限公司 A kind of routing iinformation exchange method based on block chain overlay network
CN109451039A (en) * 2018-12-07 2019-03-08 上海分布信息科技有限公司 A kind of network information transfer processing method
CN109831413A (en) * 2018-12-27 2019-05-31 链极智能科技(上海)有限公司 A kind of block chain network point to point protocol

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105591790A (en) * 2014-12-30 2016-05-18 中国银联股份有限公司 Data communication connection pool management device
WO2016177130A1 (en) * 2015-05-07 2016-11-10 中兴通讯股份有限公司 Method and device for selecting communication node
CN107704196A (en) * 2017-03-09 2018-02-16 上海亿账通区块链科技有限公司 Block chain data-storage system and method
CN109302296A (en) * 2018-10-10 2019-02-01 上海保险交易所股份有限公司 Method, equipment and storage medium for broadcasting the message in block chain network
CN109451039A (en) * 2018-12-07 2019-03-08 上海分布信息科技有限公司 A kind of network information transfer processing method
CN109412953A (en) * 2018-12-27 2019-03-01 北京比新科技有限公司 A kind of routing iinformation exchange method based on block chain overlay network
CN109831413A (en) * 2018-12-27 2019-05-31 链极智能科技(上海)有限公司 A kind of block chain network point to point protocol

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"FastProxy: Hardware and Software Acceleration of Stratum Mining Proxy";Guanwen Zhong;《IEEE》;20190805;全文 *
"区块链原理及其核心技术";蔡晓晴;《计算机学报》;20191118;全文 *

Also Published As

Publication number Publication date
CN111432011A (en) 2020-07-17

Similar Documents

Publication Publication Date Title
CN110865855B (en) Applet processing method and related equipment
CN111741026B (en) Cross-chain transaction request processing method, device, equipment and storage medium
CN108494860B (en) WEB access system, WEB access method and device for client
CN112000394B (en) Method, apparatus, device and storage medium for accessing applet
JP2021121972A (en) Mini-program processing method, server, equipment, storage medium, and program
CN111740872A (en) Message passing test method and device, electronic equipment and storage medium
CN111510466B (en) Data updating method and device for client, electronic equipment and readable medium
EP3816802A2 (en) Method and device for processing mini program data
CN111770176B (en) Traffic scheduling method and device
CN112771928B (en) Method and device for determining satellite return information
CN111881387A (en) Data processing method, device, equipment and medium for small program
CN111913998A (en) Data processing method, device, equipment and storage medium
CN111432011B (en) Block chain network communication method and equipment
CN112069137B (en) Method, device, electronic equipment and computer readable storage medium for generating information
CN111555894B (en) Data processing method, device, equipment and storage medium
CN112558933A (en) Component rendering method and device, readable medium and electronic equipment
WO2023169193A1 (en) Method and device for generating smart contract
CN111698326A (en) Method and apparatus for determining cost attribution of cloud service resources
CN112948138A (en) Method and device for processing message
CN113094139B (en) UI style updating method and device
CN112507676B (en) Method and device for generating energy report, electronic equipment and computer readable medium
CN113568803B (en) Method, electronic device and computer program product for monitoring a storage system
CN112153754A (en) Point-to-point connection method and device, electronic equipment and storage medium
CN112257039A (en) Identity attribute adding method and device and electronic equipment
CN112559001A (en) Method and device for updating application

Legal Events

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