Information transmission method and device based on block chain system, equipment and storage medium

By saving the mapping relationship between the consensus address and communication address of the node in the blockchain system, the information security risks caused by directly recording the node address on the blockchain are solved, and safe and efficient information transmission is achieved.

CN120263381APending Publication Date: 2025-07-04TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410009455.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-02
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

In the blockchain system, in the information transmission between nodes, the prior art requires recording information such as the Internet protocol address of each node on the blockchain, resulting in information security risks.

Method used

By saving the mapping relationship between the consensus address of the second node and the communication address of the first node, a first consensus message is constructed and sent on the network connection, avoiding the direct storage of the communication address on the blockchain.

Benefits of technology

It reduces the information security risks on the blockchain, avoids continuous recording of node network connections, and improves the security of information transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120263381A_ABST
    Figure CN120263381A_ABST
Patent Text Reader

Abstract

The invention discloses an information transmission method and device based on a block chain system, equipment and a storage medium, and belongs to the block chain technology. The block chain system at least comprises a first node and a second node; the method is executed by a first node; the method comprises the following steps: constructing a first consensus message, wherein the first consensus message is a message needing to be sent to a second node by a first node based on a consensus protocol in a block chain system; acquiring a consensus address of the second node, wherein the consensus address is used for identifying identity information of the second node; according to first association information stored by the first node, a communication address corresponding to the consensus address of the second node is obtained, the first association information records a mapping relation between the consensus address of the second node and the communication address of the second node, and the communication address of the second node is an address where the second node communicates through network connection; and sending the first consensus message on the network connection of the first node and the second node based on the communication address of the second node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to blockchain technology, and in particular, to a method, apparatus, device, and storage medium for information transmission based on a blockchain system. Background Art

[0002] Blockchain is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithms.

[0003] In the related art, when information is transmitted between nodes in a blockchain system, information such as the Internet Protocol Address (IP) and port of each node needs to be written into the genesis block of the blockchain. This facilitates the nodes to know the addresses for information transmission.

[0004] However, each node in the blockchain system has the right to read the information in the blockchain, which poses an information security risk. Summary of the Invention

[0005] This application provides a method, apparatus, device, and storage medium for information transmission based on a blockchain system. The technical solutions are as follows:

[0006] According to one aspect of this application, there is provided a method for information transmission based on a blockchain system. The blockchain system includes at least a first node and a second node. The method is executed by the first node and includes:

[0007] Construct a first consensus message, where the first consensus message is a message that the first node needs to send to the second node based on the consensus protocol in the blockchain system;

[0008] Obtain the consensus address of the second node, where the consensus address is used to identify the identity information of the second node;

[0009] According to the first association information saved by the first node, obtain the communication address corresponding to the consensus address of the second node. The first association information records the mapping relationship between the consensus address of the second node and the communication address of the second node. The communication address of the second node is the address for the second node to communicate through a network connection;

[0010] Based on the communication address of the second node, send the first consensus message on the network connection between the first node and the second node.

[0011] According to another aspect of this application, there is provided a method for information transmission based on a blockchain system. The blockchain system includes at least a first node and a second node. The method is executed by the second node and includes:

[0012] Receive the first consensus message sent by the first node, where the first consensus message is a message that needs to be transmitted based on the consensus protocol in the blockchain system;

[0013] Process the first consensus message based on the consensus protocol;

[0014] Wherein, the first consensus message is transmitted based on the communication address of the second node on the network connection between the first node and the second node, and the communication address of the second node is obtained according to the first association information saved by the first node. The first association information records the mapping relationship between the consensus address of the second node and the communication address of the second node. The consensus address is the identity information obtained by the first node to identify the second node, and the communication address of the second node is the address for the second node to communicate through the network connection.

[0015] According to another aspect of the present application, there is provided an information transmission device based on a blockchain system. The blockchain system includes at least a first node and a second node; the device includes:

[0016] A construction module, configured to construct a first consensus message, where the first consensus message is a message that the first node needs to send to the second node based on the consensus protocol in the blockchain system;

[0017] An acquisition module, configured to acquire the consensus address of the second node, where the consensus address is the identity information used to identify the second node;

[0018] A first processing module, configured to obtain the communication address corresponding to the consensus address of the second node according to the first association information saved by the first node. The first association information records the mapping relationship between the consensus address of the second node and the communication address of the second node. The communication address of the second node is the address for the second node to communicate through the network connection;

[0019] A sending module, configured to send the first consensus message on the network connection between the first node and the second node based on the communication address of the second node.

[0020] In an alternative design of the present application, the first node stores a first association information set, where the first association information set includes at least two association information, and the at least two association information correspond one-to-one to at least two nodes in the blockchain system. The association information in the first association information set records the mapping relationship between the consensus address and the communication address of a single node in the blockchain system;

[0021] The first processing module is further configured to:

[0022] Search for the consensus address of the second node in the first associated information set to obtain the first associated information in the first associated information set;

[0023] Obtain the communication address of the second node carried in the first associated information.

[0024] In an alternative design of the present application, the obtaining module is further configured to:

[0025] On the blockchain of the blockchain system, obtain the consensus address of the second node;

[0026] Wherein, the consensus address is the address information of the public key of the second node, and the public key of the second node is used to encrypt the consensus message sent to the second node and / or verify the digital signature in the consensus message sent by the second node.

[0027] In an alternative design of the present application, the obtaining module is configured to obtain the communication address of the second node based on the network connection between the first node and the second node, and obtain the second consensus message sent by the second node to the first node, where the second consensus message is transmitted on the network connection;

[0028] The first processing module is configured to determine the consensus address of the second node according to the digital signature of the second node carried in the second consensus message;

[0029] The building module is configured to build the first associated information according to the consensus address of the second node and the communication address of the second node, and save the first associated information.

[0030] In an alternative design of the present application, the first processing module is further configured to:

[0031] Obtain the public key of the second node on the blockchain;

[0032] In the case where the public key of the second node successfully verifies the digital signature carried in the second consensus message, determine the public key address of the second node on the blockchain as the consensus address of the second node.

[0033] In an alternative design of the present application, the blockchain system includes a third node,

[0034] The sending module is configured to send address request information to the third node;

[0035] The device further includes a first receiving module, configured to receive the second association information set sent by the third node and save the second association information set at the first node, where the second association information set is sent by the third node in response to the address request information;

[0036] Wherein, the second association information set saved by the third node includes at least one association information, and each association information in the second association information set records the mapping relationship between the consensus address and the communication address of a single node in the blockchain system.

[0037] In an alternative design of the present application, the sending module is further configured to:

[0038] When the first node does not save the first association information, send the address request information to the third node;

[0039] Wherein, the first association information is included in the second association information set sent by the third node.

[0040] In an alternative design of the present application, the first node saves a first association information set, the first association information set includes at least one association information, and each association information in the first association information set records the mapping relationship between the consensus address and the communication address of a single node in the blockchain system except the second node;

[0041] The sending module is further configured to:

[0042] Send the address request information and the first association information set to the third node;

[0043] Wherein, the association information in the second association information set sent by the third node is different from the association information in the first association information set.

[0044] In an alternative design of the present application, the sending module is further configured to:

[0045] When a network connection is first established between the first node and the third node, send the address request information to the third node.

[0046] In an alternative design of the present application, the first node saves a first association information set, the first association information set includes at least one association information, and each association information in the first association information set records the mapping relationship between the consensus address and the communication address of a single node in the blockchain system;

[0047] The sending module is further configured to:

[0048] When a network connection is first established between the first node and the third node, send the address request information and the first set of association information to the third node;

[0049] Among them, the association information in the second set of association information sent by the third node is different from the association information in the first set of association information.

[0050] In an alternative design of the present application, the sending module is further configured to:

[0051] Broadcast and send address update information and the second set of association information in the blockchain system;

[0052] Among them, the address update information is used to instruct other nodes in the blockchain system except the first node to update and save the second set of association information.

[0053] According to another aspect of the present application, there is provided an information transmission device based on a blockchain system, the blockchain system includes at least a first node and a second node; the device includes:

[0054] A second receiving module, configured to receive a first consensus message sent by the first node, where the first consensus message is a message that needs to be transmitted based on a consensus protocol in the blockchain system;

[0055] A second processing module, configured to process the first consensus message based on the consensus protocol;

[0056] Among them, the first consensus message is transmitted based on the communication address of the second node on the network connection between the first node and the second node, and the communication address of the second node is obtained according to the first set of association information saved by the first node. The first set of association information records the mapping relationship between the consensus address of the second node and the communication address of the second node. The consensus address is the identity information obtained by the first node to identify the second node, and the communication address of the second node is the address for the second node to communicate through the network connection.

[0057] In an alternative design of the present application, the second receiving module is configured to receive address update information and a first set of association information sent by the first node. The first node saves the first set of association information, and each piece of association information in the first set of association information records the mapping relationship between the consensus address and the communication address of a single node in the blockchain system;

[0058] The second processing module is configured to update and save the first set of association information in the second node in response to the address update information.

[0059] In an alternative design of the present application, the first consensus message carries the communication address of the first node; the second processing module is further configured to:

[0060] Obtain the consensus address corresponding to the communication address of the first node according to the second association information stored by the second node, where the second association information records the mapping relationship between the consensus address of the first node and the communication address of the first node, the communication address of the first node is the address for the first node to communicate through a network connection, and the consensus address of the first node is the identity information for identifying the first node;

[0061] Obtain the public key of the first node according to the consensus address of the first node;

[0062] In the case where the public key of the first node successfully verifies the digital signature in the first consensus message, process the first consensus message based on the consensus protocol;

[0063] In the case where the public key of the first node fails to successfully verify the digital signature in the first consensus message, no longer process the first consensus message.

[0064] According to another aspect of the present application, there is provided a computer device, which includes a processor and a memory. At least one instruction, at least one program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the information transmission method based on the blockchain system as described in the above aspect.

[0065] According to another aspect of the present application, there is provided a computer-readable storage medium, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the information transmission method based on the blockchain system as described in the above aspect.

[0066] According to another aspect of the present application, there is provided a computer program product, which includes computer instructions. The computer instructions are stored in a computer-readable storage medium, and the processor reads and executes the computer instructions from the computer-readable storage medium to implement the information transmission method based on the blockchain system as described in the above aspect.

[0067] The beneficial effects brought by the technical solution provided by the present application at least include:

[0068] The first association information saved by the first node records the mapping relationship between the consensus address and the communication address of the second node, realizes obtaining the communication address of the second node according to the consensus address of the second node locally on the first node, and further realizes transmitting the first consensus message, which can avoid directly saving the communication address of the second node on the blockchain; it avoids continuously recording the network connection situation of the second node on the blockchain and reduces the information security risk of the second node. Description of the Drawings

[0069] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0070] Figure 1 It is a schematic structural diagram of a distributed system applied to a blockchain system provided by an exemplary embodiment of the present application;

[0071] Figure 2 It is a schematic diagram of a block structure provided by an exemplary embodiment of the present application;

[0072] Figure 3 It is a schematic diagram of a blockchain system provided by an exemplary embodiment of the present application;

[0073] Figure 4 It is a schematic diagram of an information transmission method based on a blockchain system provided by an exemplary embodiment of the present application;

[0074] Figure 5 It is a flowchart of an information transmission method based on a blockchain system provided by an exemplary embodiment of the present application;

[0075] Figure 6 It is a schematic diagram of a network connection provided by an exemplary embodiment of the present application;

[0076] Figure 7 It is a flowchart of an information transmission method based on a blockchain system provided by an exemplary embodiment of the present application;

[0077] Figure 8 It is a flowchart of an information transmission method based on a blockchain system provided by an exemplary embodiment of the present application;

[0078] Figure 9 It is a flowchart of an information transmission method based on a blockchain system provided by an exemplary embodiment of the present application;

[0079] Figure 10It is a flowchart of an information transmission method based on a blockchain system provided by an exemplary embodiment of the present application;

[0080] Figure 11 It is a structural block diagram of an information transmission device based on a blockchain system provided by an exemplary embodiment of the present application;

[0081] Figure 12 It is a structural block diagram of an information transmission device based on a blockchain system provided by an exemplary embodiment of the present application;

[0082] Figure 13 It is a structural block diagram of a server provided by an exemplary embodiment of the present application.

[0083] The accompanying drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. Detailed Embodiments

[0084] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.

[0085] The exemplary embodiments will be described in detail here, and the examples are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0086] The terms used in the present disclosure are for the purpose of describing specific embodiments only and are not intended to limit the present disclosure. The singular forms "a", "the", and "said" used in the present disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0087] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant laws, regulations, and standards of relevant countries and regions. For example, information such as consensus addresses and communication addresses involved in the present application are obtained under full authorization.

[0088] It should be understood that although the terms first, second, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this disclosure, the first parameter may also be referred to as the second parameter, and similarly, the second parameter may also be referred to as the first parameter. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".

[0089] First, the nouns involved in the embodiments of this application are introduced:

[0090] Blockchain: It refers to an intelligent peer-to-peer network that uses a distributed database to identify, disseminate, and record information. Blockchain technology is based on a decentralized peer-to-peer network, combining cryptographic principles, time-series data, and consensus mechanisms with open-source programs to ensure the coherence and continuity of each node in the distributed database, enabling information to be instantly verified, traceable, but difficult to tamper with and impossible to shield, thus making the blockchain form a highly private, efficient, and secure sharing system. Each data block in the blockchain contains information about a batch of network transactions, which is used to verify the validity (anti-counterfeiting) of the information and generate the next block. The blockchain can include the blockchain underlying platform, platform product services, and application service layers. The blockchain is a chain-like data structure formed by combining data blocks in sequence according to time order, mainly used to solve the problems of transaction trust and security.

[0091] Blockchain technology includes parent chain technology and sidechain technology. The sidechain refers to all blockchains in the blockchain that follow the sidechain protocol. The sidechain and the parent chain are relative. The sidechain protocol refers to a protocol that enables transaction information to be securely transferred from the parent blockchain to the sidechain (or other blockchains), and also enables transaction information to be securely returned from the sidechain (or other blockchains) to the parent blockchain. The sidechain protocol includes a two-way-peg mechanism. The sidechain is an independent blockchain that supports functions such as shared ledgers, consensus mechanisms, transaction types, and smart contracts.

[0092] Smart contract: It refers to a contract program that automatically executes according to specific conditions and is an important way for users to interact with the blockchain and implement business logic using the blockchain. The basic idea of a smart contract is that various contract terms can be embedded in the hardware and software we use, making it costly for attackers to attack. Smart contracts are customized by multiple users and spread and stored in the blockchain using a peer-to-peer network (also known as a point-to-point network). The smart contracts built on the blockchain are automatically executed under trigger conditions. For example, various institutions can access this data storage system through the smart contracts on the blockchain deployed in the server to use functions such as data storage and data query provided by this data storage system. The essence of a smart contract is a set of agreements defined, disseminated, verified, or executed in digital form, including that the contract parties can execute agreements in the smart contract. Smart contracts also allow for trusted transactions without a third party, and such transactions are traceable and irreversible. Smart contracts include at least one of static smart contracts and dynamic smart contracts.

[0093] The system involved in the embodiments of this application can be a distributed system formed by connecting a client and multiple nodes (any form of computing device accessing the network, such as a server, user terminal) through network communication.

[0094] Taking the distributed system as a blockchain system as an example, see Figure 1 , Figure 1 FIG. 100 is a schematic structural diagram of a distributed system 100 applied to a blockchain system provided by an exemplary embodiment of this application, formed by multiple nodes 110 (any form of computing device accessing the network, such as a server, user terminal) and a client 120. A peer-to-peer network is formed among the nodes. The peer-to-peer protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). In a distributed system, any machine such as a server or a terminal can join and become a node 110. A node includes a hardware layer, an intermediate layer, an operating system layer, and an application layer.

[0095] See Figure 1 The functions of each node 110 in the shown blockchain system are involved, and the functions include:

[0096] 1) Routing, which is the basic function of node 110 and is used to support communication between nodes 110.

[0097] In addition to the routing function, node 110 can also have the following functions:

[0098] 2) An application, which is used to be deployed in a blockchain, implements specific services according to actual business requirements, records data related to the implemented functions to form recorded data, carries a digital signature in the recorded data to indicate the source of the task data, and sends the recorded data to other nodes in the blockchain system. When other nodes verify the source and integrity of the recorded data successfully, they add the recorded data to a temporary block.

[0099] For example, the services implemented by the application include:

[0100] 2.1) A wallet, which is used to provide functions for conducting transactions of electronic currency, including initiating a transaction, that is, sending the transaction record of the current transaction to other nodes in the blockchain system. After other nodes verify it successfully, as a response to acknowledging the validity of the transaction, they deposit the recorded data of the transaction into the temporary block of the blockchain; the wallet also supports querying the remaining electronic currency in the electronic currency address. For example, after the nodes in the side blockchain collaborate to complete a task event, the main blockchain issues a proof of entitlement (such as a certificate) to the side blockchain and deposits the transaction record of this time into the temporary block of the side blockchain. Optionally, the transaction record of this time can also be deposited into the temporary block of the main blockchain.

[0101] 2.2) A shared ledger, which is used to provide functions such as storage, query, and modification of account data, sends the recorded data of the operations on the account data to other nodes in the blockchain system. After other nodes verify its validity, as a response to acknowledging the validity of the account data, they deposit the recorded data into the temporary block and can also send a confirmation to the node that initiated the operation. For example, if the task event is a fundraising event, any node in the main blockchain stores the amount of the donated funds and the information of the funded object in the shared ledger. Optionally, the side blockchain also stores the amount of the donated funds and the information of the funded object in the shared ledger.

[0102] 2.3) A smart contract, which is a computerized protocol that can execute the terms of a certain contract. It is implemented through code deployed on the shared ledger and used to execute under certain conditions. According to actual business requirements, the code is used to complete automated transactions, such as querying the logistics status of the goods purchased by the buyer and transferring the buyer's electronic currency to the merchant's address after the buyer signs for the goods; of course, smart contracts are not limited to executing contracts for transactions, but can also execute contracts for processing received information. For example, the smart contract stipulates information such as the information of both parties to the collaboration, the deadline of the task event, and the proof of entitlement of the task event. When the collaborative task event is completed, the party corresponding to the completed task event receives the corresponding proof of entitlement according to the provisions in the smart contract.

[0103] 3) The blockchain includes a series of blocks that are sequentially connected in the order of generation. Once a new block is added to the blockchain, it will not be removed again. The block records the record data submitted by the nodes in the blockchain system. The blockchain in this application is a blockchain system including a main blockchain and a side blockchain. The main blockchain corresponds to at least one node, and the side blockchain corresponds to at least one node.

[0104] Figure 2 It is a schematic diagram of the block structure provided by an exemplary embodiment of this application. Each block includes the hash value of the transaction records stored in this block (the hash value of this block) and the hash value of the previous block. Each block is connected through the hash value to form a blockchain. In addition, the block may also include information such as the timestamp when the block is generated. The blockchain is essentially a decentralized database, a string of data blocks generated by using cryptographic methods. Each data block contains relevant information for verifying the validity of its information (anti-counterfeiting) and generating the next block.

[0105] Figure 3 It is a schematic diagram of the blockchain system provided by an exemplary embodiment of this application. In the figure, two nodes are taken as examples for illustration. The first node 111 and the second node 112 in the blockchain system are both physical nodes in the blockchain node network built based on the Peer-to-Peer network and usually run on an independent server host. Each node in the blockchain system includes a physical layer for providing hardware support such as switches, routers, and base stations; a network layer for establishing a network connection through at least one of the TCP, UDP, and TLS protocols; and a protocol layer for providing protocols for the consensus mechanism on the blockchain system such as the consensus node management protocol, the consensus protocol, and the blockchain protocol.

[0106] The business application refers to an application implemented based on the blockchain node network. The business application is a distributed blockchain application for clients supported by the application layers of the first node 111 and the second node 112. It can be understood that the blockchain system may include a larger number of nodes, not limited to the first node 111 and the second node 112.

[0107] Figure 4 It shows a schematic diagram of the information transmission method based on the blockchain system provided by an embodiment of this application.

[0108] The blockchain system includes a first node 302 and a second node 304; the first node 302 and the second node 304 jointly maintain the blockchain 306. Exemplarily, the first node 302 and the second node 304 in the blockchain system are also referred to as consensus nodes and participate in the transmission of consensus messages based on the consensus protocol in the blockchain system. The blockchain system may further include observing nodes that do not participate in the transmission of the consensus protocol and are only used for synchronizing and backing up the information on the blockchain.

[0109] A network connection 310 is established between the first node 302 and the second node 304, and the network connection 310 is used for information transmission between the first node 302 and the second node 304. The network connection 310 may be a communication connection established through at least one of the TCP, UDP, and TLS protocols.

[0110] When a network connection 310 is established between the first node 302 and the second node 304, the first node 302 obtains the communication address 304a of the second node. The communication address 304a of the second node is the Internet Protocol Address (IP) of the second node 304 on the communication connection established through the TCP or UDP protocol, or the public key address of the node for encrypted communication on the communication connection established through the TLS protocol.

[0111] The first node 302 receives a second consensus message 312 sent by the second node 304. The second consensus message 312 is a message that needs to be transmitted based on the consensus protocol in the blockchain system. The second consensus message 312 carries a digital signature 312a of the second node 304. Obtain the public key 314 of the second node on the blockchain 306; when the digital signature 312a carried by the second consensus message 312 is successfully verified by the public key 314 of the second node, determine the public key address of the public key 314 of the second node on the blockchain 306 as the consensus address 304b of the second node. Construct a first association information 305 based on the consensus address 304a and the communication address 304b of the second node, and save the first association information 305 on the first node 302.

[0112] The first node 302 constructs a first consensus message 311. The first consensus message 311 is a message that needs to be transmitted based on the consensus protocol in the blockchain system, and the first consensus message 311 is a message that the first node 302 needs to send to the second node 304;

[0113] Obtain the consensus address 304b of the second node; according to the first association information 305 saved by the first node 302, obtain the communication address 304a corresponding to the consensus address 304b of the second node, and based on the communication address 304a of the second node, send the first consensus message 311 on the network connection 310 between the first node 302 and the second node 304.

[0114] Next, the information transmission method based on the blockchain system will be introduced through the following embodiments.

[0115] Figure 5 The flowchart of the information transmission method based on the blockchain system provided by an exemplary embodiment of the present application is shown. This method can be executed by the first node in the blockchain system. The method includes:

[0116] Step 510: Construct the first consensus message;

[0117] The first consensus message is a message that the first node needs to send to the second node based on the consensus protocol in the blockchain system; the consensus protocol is a protocol for keeping the node states of each node in the blockchain system consistent or reaching an agreement on blockchain transactions. The blockchain system includes at least a first node and a second node.

[0118] Exemplarily, the first consensus message can be used to instruct the second node to confirm the information on the blockchain based on the consensus protocol, or can be used to instruct the second node to perform processing such as blockchain editing based on the consensus protocol. This embodiment does not limit the message type of the first consensus message.

[0119] Exemplarily, the first consensus message includes a message code field and a payload field. By writing the message type of the first consensus message in the message code field and writing the message content of the first consensus message in the payload field, the construction of the first consensus message is achieved.

[0120] Step 520: Obtain the consensus address of the second node;

[0121] The consensus address is the identity information used to identify the second node; further, the consensus address is the address information of the public key provided by the second node, and the public key of the second node is used to encrypt the information associated with the consensus protocol sent to the second node and / or verify the digital signature in the information associated with the consensus protocol sent by the second node.

[0122] Exemplarily, the consensus address of the second node can be the information saved in the first node, or the information obtained by the first node on the blockchain. This embodiment does not limit the acquisition method of the consensus address of the second node.

[0123] Step 530: Obtain the communication address corresponding to the consensus address of the second node according to the first association information saved by the first node;

[0124] The first association information is saved locally on the first node, and the first association information records the mapping relationship between the consensus address of the second node and the communication address of the second node. In the first association information, the consensus address of the second node has a uniquely corresponding communication address of the second node.

[0125] The communication address of the second node is the address for the second node to communicate through the network connection; Exemplarily, the network connection between the first node and the second node is a communication connection established through at least one of the Transmission Control Protocol (TCP), User Datagram Protocol (UDP), and Transport Layer Security (TLS).

[0126] In the case where the network connection is a communication connection established through the TCP or UDP protocol, the communication address of the second node includes the Internet Protocol Address (IP) of the second node. In the case where the network connection is a communication connection established through the TLS protocol, the communication address of the second node includes the address information of the public key provided by the second node during encrypted communication over the network connection.

[0127] Step 540: Send a first consensus message on the network connection between the first node and the second node based on the communication address of the second node;

[0128] The first node can establish a network connection with one or more nodes in the blockchain system. The communication address of the second node indicates to the first node to send the first consensus message on the network connection between the first node and the second node. It should be noted that the network connection between the first node and the second node can be pre-established or established after obtaining the communication address of the second node shown in Step 530; this application does not limit this.

[0129] Exemplarily, the first consensus message sent on the network connection between the first node and the second node is a binary bitstream obtained through serialization processing. In one example, a network layer message is sent on the network connection between the first node and the second node, and the network layer message carries the binary bitstream obtained by serializing the first consensus message. In one example, the network layer message includes a message code field and a payload field. The message code field and the payload field of the first consensus message are serialized into a binary bitstream, and the binary bitstream is determined as the payload field of the network layer message. The message code field of the network layer message indicates the message type of the first consensus message. For example, the message code field of the first consensus message is determined as the message code field of the network layer message. Further, the message code field of the network layer message also indicates the byte length of the first consensus message. The byte length of the first consensus message is obtained based on the payload field of the first consensus message and added to the message code field of the network layer message.

[0130] In summary, the method provided in this embodiment records the mapping relationship between the consensus address and the communication address of the second node through the first association information saved by the first node, realizes obtaining the communication address of the second node according to the consensus address of the second node locally on the first node, and further realizes the transmission of the first consensus message, which can avoid directly saving the communication address of the second node on the blockchain; it avoids the continuous recording of the network connection status of the second node on the blockchain and reduces the information security risk of the second node.

[0131] Figure 6 The figure shows a schematic diagram of a network connection provided by an exemplary embodiment of the present application. The figure shows the network connections established between the first node 111 and the second node 112, the third node 113, and the fourth node 114 in the blockchain system; it can be understood that the blockchain system may include a greater or lesser number of nodes. Among them, a first connection 112a is established between the first node 111 and the second node 112. Taking the first connection 112a as an example for detailed introduction. The first connection 112a includes the communication address of the second node 112, and the first node 111 and the second node 112 can communicate with each other. The first association information set locally maintained by the first node 111 includes first association information 112b, and the first association information 112b records the mapping relationship between the consensus address and the communication address of the second node 112. The consensus module 111a of the first node 111 can realize the sending of the first consensus message using the consensus address of the second node 112.

[0132] On the first connection 112a, the first node 111 and the second node 112 communicate through network layer messages (peer-to-peer communication). The consensus module (Consensus) 111a of the first node 111 can obtain the consensus address of the second node 112, and can determine the communication address of the first node 111 according to the first association information 112b, so as to send the first consensus message on the first connection 112a.

[0133] Similarly, a second connection 113a is established between the first node 111 and the third node 113. The first association information set locally maintained by the first node 111 includes the nth association information 113b, and the nth association information 113b records the mapping relationship between the consensus address and the communication address of the third node 113. A third connection 114a is established between the first node 111 and the fourth node 114. The first association information set locally maintained by the first node 111 includes the (n + 1)th association information 114b, and the (n + 1)th association information 114b records the mapping relationship between the consensus address and the communication address of the fourth node 114.

[0134] Figure 7 The flowchart of the information transmission method based on the blockchain system provided by an exemplary embodiment of the present application is shown. This method can be executed by the first node. That is, in Figure 5 In the illustrated embodiment, step 520 can be implemented as step 522, and step 530 can be implemented as steps 532 and 534:

[0135] Step 522: Obtain the consensus address of the second node on the blockchain of the blockchain system;

[0136] In this embodiment, the public key provided by the second node is recorded on the blockchain, and the consensus address is the public key address information of the second node. The public key of the second node is used to encrypt the consensus message sent to the second node and / or verify the digital signature in the consensus message sent by the second node.

[0137] In one example, it is necessary to encrypt the consensus message (such as the first consensus message) sent to the second node using the public key of the second node. Further, after the second node receives this information, it decrypts the information using the private key of the second node to achieve the encrypted transmission of the consensus message. Taking the first consensus message as an example, encrypting using the public key of the second node is performed before the serialization of the first consensus message. It can be seen that the public key corresponding to the consensus message in this step is different from the public key associated with the TLS protocol in step 530. The public key associated with the TLS protocol is used to encrypt the network layer message after the serialization of the consensus message to achieve encrypted transmission on the communication connection.

[0138] The consensus address of the second node on the blockchain is information confirmed by multiple nodes in the blockchain system, which avoids the risk of tampering with the consensus address of the second node, ensures the accuracy of the consensus address obtained by the first node, and further ensures that the first node can correctly send the first consensus message to the second node.

[0139] Step 532: Search for the consensus address of the second node in the first associated information set to obtain the first associated information in the first associated information set;

[0140] In this embodiment, the first node stores a first associated information set, which includes at least two associated information. The at least two associated information corresponds to at least two nodes in the blockchain system one by one. The associated information in the first associated information set records the mapping relationship between the consensus address and the communication address of a single node in the blockchain system.

[0141] By searching for the consensus address of the second node, the first associated information recording the consensus address of the second node is filtered out from the first associated information set stored by the first node.

[0142] In one example, search for the consensus address of the second node in some fields of the associated information in the first associated information set to obtain the first associated information recording the consensus address of the second node. Since each associated information in the first associated information set includes a consensus address and a communication address, and the information formats such as the byte length and character composition of the consensus address and the communication address are different (for example, the byte lengths of the consensus address and the communication address are different; or the consensus address is composed of symbols, letters, and numbers, while the communication address is composed of symbols and numbers), first determine the consensus address in the associated information, and then compare whether the consensus address in the associated information is the same as the consensus address of the second node. In another example, search for the consensus address of the second node in all fields of the associated information to obtain the first associated information recording the consensus address of the second node.

[0143] Step 534: Obtain the communication address of the second node carried in the first associated information;

[0144] The first associated information records the mapping relationship between the consensus address of the second node and the communication address of the second node, and obtain the communication address of the second node in the first associated information.

[0145] It should be noted that steps 532 and 534 in this embodiment can be combined with Figure 5 Steps 510, 520, and 540 in are combined into a new embodiment for separate implementation, and the present application does not limit this.

[0146] In summary, in the case where the first node stores the first association information set, the method provided in this embodiment provides an implementation manner for searching for the first association information, and can obtain the first association information stored locally by the first node; through the mapping relationship between the consensus address and the communication address of the second node recorded in the first association information, the communication address of the second node is obtained according to the consensus address of the second node locally at the first node, and then the transmission of the first consensus message is realized, which can avoid directly storing the communication address of the second node on the blockchain; it avoids the information on the blockchain from continuously recording the network connection situation of the second node, and reduces the information security risk of the second node.

[0147] Figure 8 FIG. shows a flowchart of an information transmission method based on a blockchain system provided by an exemplary embodiment of the present application. This method can be executed by a first node. That is, on the basis of the embodiment shown in Figure 5 the following steps are further included:

[0148] Step 502a: Based on the network connection between the first node and the second node, obtain the communication address of the second node, and obtain the second consensus message sent by the second node to the first node;

[0149] The communication address of the second node can be obtained when the network connection between the first node and the second node is first established, or can be obtained in response to obtaining the second consensus message. This step does not limit the timing of obtaining the listening address.

[0150] The second consensus message is transmitted over the network connection. The second consensus message is a message that the second node needs to send to the first node based on the consensus protocol in the blockchain system; for the message type of the second consensus message, please refer to the introduction of the first consensus message in step 510.

[0151] Step 502b: Determine the consensus address of the second node according to the digital signature of the second node carried in the second consensus message;

[0152] In this embodiment, the second consensus message carries the digital signature (Signature) of the second node, and the digital signature of the second node is used to prevent other nodes from tampering with the second consensus message. As introduced above, the consensus address of the second node is the address information of the public key provided by the second node.

[0153] In an optional example, the public key provided by the second node is used to verify the digital signature carried in the second consensus message. This step can be implemented as the following two sub-steps:

[0154] · Obtain the public key of the second node on the blockchain;

[0155] · In the case where the public key of the second node successfully verifies the digital signature carried in the second consensus message, determine the public key address of the second node on the blockchain as the consensus address of the second node;

[0156] In this example, the public key provided by the second node is recorded on the blockchain. The digital signature is decrypted using the public key provided by the second node to obtain the first digest of the second consensus message. The message content of the second consensus message is input into a hash function to obtain the second digest of the second consensus message. In the case where the first digest and the second digest are the same, that is, the public key of the second node successfully verifies the digital signature carried in the second consensus message, it is ensured that the message content of the second consensus message has not been tampered with, and it is ensured that the public key of the second node recorded on the blockchain is accurate.

[0157] Step 502c: Construct first association information based on the consensus address of the second node and the communication address of the second node, and save the first association information;

[0158] Exemplarily, concatenate the consensus address of the second node and the communication address of the second node to obtain the first association information, so as to record the communication address of the second node uniquely corresponding to the consensus address of the second node in the first association information. Save the first association information locally at the first node.

[0159] In summary, for the method provided in this embodiment, based on the second consensus message sent by the second node to the first node, the first node can obtain the consensus address and the communication address of the second node, and fully utilizes the received second consensus message to construct the first association information, expanding the construction method of the first association information; through the mapping relationship between the consensus address of the second node and the communication address recorded in the first association information, the communication address of the second node is obtained locally at the first node, which can avoid directly saving the communication address of the second node on the blockchain; it avoids the continuous recording of the network connection situation of the second node on the blockchain, reducing the information security risk of the second node.

[0160] Figure 9 Shows a flowchart of an information transmission method based on a blockchain system provided by an exemplary embodiment of the present application. This method can be executed by the first node. That is, Figure 5 Based on the embodiment shown, the following steps are further included:

[0161] Step 505a: Send address request information to the third node;

[0162] In this embodiment, the blockchain system includes a third node, and the third node is different from the first node. The third node is usually a node different from the second node in the blockchain system, but it does not exclude the case where the third node and the second node are the same node.

[0163] The address request information is used to request a third node to send a second set of association information. The second set of association information is at least one association relationship saved by the third node. In this embodiment, the second set of association information may include the first association information or may not include the first association information.

[0164] Exemplarily, the address request information is sent based on the network connection between the first node and the third node. This application does not limit the sending time of the address request information. The address request information may be sent when the network connection between the first node and the third node is first established, or may be sent after the first node obtains the consensus address of the second node; this will be separately introduced through embodiments below.

[0165] Step 505b: Receive the second set of association information sent by the third node, and save the second set of association information on the first node;

[0166] The second set of association information sent by the third node is sent by the third node in response to the address request information. Each association information in the second set of association information records the mapping relationship between the consensus address and the communication address of a single node in the blockchain system saved by the third node. In one example, the second set of association information is the information carried in the payload field of an address reply message (RelationResp), and the address reply message instructs the first node to save the second set of association information in the payload field.

[0167] By saving the above-mentioned second set of association information, the first node realizes the synchronization of association information with the third node in the blockchain system, and locally supplements and saves the second set of association information on the first node.

[0168] It should be noted that this embodiment only shows the case where the step group composed of step 505a and step 505b is executed before step 510. In different embodiments, the above step group may be executed before, after, or simultaneously with any step from step 510 to step 540. This application does not limit this.

[0169] In an optional example, after step 505b, it further includes: broadcasting and sending address update information and the second set of association information in the blockchain system;

[0170] The address update information is used to instruct other nodes in the blockchain system except the first node to update and save the second set of association information. Exemplarily, the address update information is also called an address notification message (RelationNotify), and the payload field of the address update information carries the second set of association information. The address notification message instructs other nodes to save the second set of association information in the payload field.

[0171] Exemplarily, the address request information, address reply message, and address notification message in this embodiment all belong to the messages in the consensus node management protocol of the blockchain system, and the messages in the consensus node management protocol are used to perform the synchronization of associated information.

[0172] Exemplarily, a network connection is established between the first node and other nodes in the blockchain system except the first node. When the other nodes store a local associated information set, the address update information is used to instruct the other nodes to store the associated information in the second associated information set that is different from the associated information in the local associated information set.

[0173] In summary, the method provided in this embodiment realizes the synchronization of associated information between the first node and the third node by sending address request information to the third node, receiving and storing the second associated information set. The first node stores the second associated information set provided by the third node, expanding the information source for storing associated information in the first node.

[0174] In an optional example, based on Figure 9 the embodiment shown, step 505a can be implemented as sub-step one:

[0175] Sub-step one: When the first node does not store the first associated information, send an address request information to the third node;

[0176] In this embodiment, sub-step one is executed after Figure 9 step 520 in. The second associated information set sent by the third node includes the first associated information.

[0177] After obtaining the consensus address of the second node, if the first node does not store the first associated information, it will cause the inability to transmit and determine the communication address of the second node. In this embodiment, when the first node does not store the first associated information, it sends an address request information to the third node, and the third node sends the first associated information, thereby realizing the supplementary storage of the first associated information in the first node. Even when the first node lacks the first associated information, it can be supplemented based on the third node, and then the transmission of the first consensus message can be realized.

[0178] Furthermore, the first node stores a first associated information set, the first associated information set includes at least one associated information, and each associated information in the first associated information set records the mapping relationship between the consensus address and the communication address of a single node in the blockchain system except the second node. That is to say, when obtaining the consensus address of the second node, the first node includes one or more associated information, but the first node does not store the first associated information.

[0179] Correspondingly, sub-step one can be implemented as: sending address request information and the first set of associated information to the third node;

[0180] When requesting the third node to send the associated information saved by the third node, simultaneously send the first set of associated information saved by the first node to the third node. Exemplarily, the associated information in the second set of associated information sent by the third node is different from the associated information in the first set of associated information. Further, the second set of associated information is the information obtained by the third node traversing all the saved associated information and being different from the first set of associated information.

[0181] In one example, the consensus address of the associated information in the second set of associated information that the first node needs to save is different from the associated information in the first set of associated information; that is, the associated information in the second set of associated information is the associated information of a new node not saved by the first node.

[0182] In another example, the consensus address of the associated information in the second set of associated information that the first node needs to save is the same as the associated information in the first set of associated information, the communication address of the associated information in the second set of associated information is different from the associated information in the first set of associated information, and the timestamp carried by the associated information in the second set of associated information is later than the timestamp of the associated information in the first set of associated information; the associated information in the second set of associated information is the associated information of a node that the first node has already saved, but the communication address of this node has changed; even if the node changes the network connection method without restarting (the node performs a hot switch), the associated information of the hot-switched node can be updated on the first node, and the transmission of consensus information can be ensured even when the node undergoes a hot switch.

[0183] In summary, the method provided in this embodiment sends address request information to the third node when the first node does not save the first associated information; realizes obtaining the first associated information required for the transmission of the first consensus message from the third node, realizes the synchronization of the associated information between the first node and the third node, and expands the information source for saving the associated information in the first node.

[0184] In an optional example, based on the Figure 9 illustrated embodiment, step 505a can be implemented as sub-step two:

[0185] Sub-step two: When establishing a network connection between the first node and the third node for the first time, send address request information to the third node;

[0186] When a network connection is first established between the first node and the third node, by sending address request information to the third node, the synchronization of association information between the first node and the third node in the blockchain system is achieved in a timely manner, the information source of the association information saved by the first node is expanded in a timely manner, and the second association information set included in the third node to which the network connection is established is fully utilized. When synchronizing association information when the first node and the third node establish a network connection, it is possible to determine in a timely manner whether the third node is a malicious node. For example, in the case where the third node does not save any association information, there is a risk of stealing information on the blockchain without participating in the blockchain consensus. It is possible to identify in a timely manner an eclipse attack executed by a malicious node by occupying the network connection of an honest node.

[0187] Similar to step 505a, the present application does not limit the execution timing of the step group composed of sub-step two and step 505b, and the above step group can be executed before, after or simultaneously with any step among steps 510 to 540.

[0188] Further, the first node saves a first association information set, the first association information set includes at least one association information, and each association information in the first association information set records the mapping relationship between the consensus address and the communication address of a single node in the blockchain system;

[0189] Correspondingly, sub-step two can be implemented as: when a network connection is first established between the first node and the third node, sending address request information and the first association information set to the third node;

[0190] When requesting the third node to send the association information saved by the third node, at the same time send the first association information set already saved by the first node to the third node. Exemplarily, the association information in the second association information set sent by the third node is different from the association information in the first association information set. Further, the second association information set is information obtained by traversing all the association information saved by the third node and different from the association information in the first association information set.

[0191] For the introduction of the difference between the association information in the second association information set sent by the third node and the association information in the first association information set, please refer to sub-step one in the above text.

[0192] In this embodiment, before the first node saves the second association information set, the first node may or may not have saved the first association information. Similarly, the second association information set may or may not include the first association information, and this embodiment does not limit it.

[0193] In summary, the method provided in this embodiment sends address request information to a third node when establishing a network connection for the first time, realizes the timely synchronization of association information between the first node and the third node, and expands the information source for storing association information in the first node. Even when the communication addresses of individual nodes on the blockchain change, the mapping relationship between the changed communication address and the consensus address can be obtained by the first node through the synchronization of association information between the first node and the third node, ensuring that the first node can transmit messages based on the correct communication address.

[0194] Figure 10 The flowchart of an information transmission method based on a blockchain system provided by an exemplary embodiment of the present application is shown. This method can be executed by a first node and a second node in the blockchain system. The method includes:

[0195] Step 610: The first node constructs a first consensus message;

[0196] The first consensus message is a message that the first node needs to send to the second node based on the consensus protocol in the blockchain system; the consensus protocol is a protocol for maintaining the node states of each node in the blockchain system to be consistent or reaching an agreement on blockchain transactions. The blockchain system includes at least a first node and a second node.

[0197] Step 620: The first node obtains the consensus address of the second node;

[0198] The consensus address is the identity information used to identify the second node; further, the consensus address is the address information of the public key provided by the second node, and the public key of the second node is used to encrypt the information associated with the consensus protocol sent to the second node and / or verify the digital signature in the information associated with the consensus protocol sent by the second node.

[0199] Step 630: The first node obtains the communication address corresponding to the consensus address of the second node according to the first association information saved by the first node;

[0200] The first association information is saved locally by the first node, and the first association information records the mapping relationship between the consensus address of the second node and the communication address of the second node. In the first association information, the consensus address of the second node has a uniquely corresponding communication address of the second node. The communication address of the second node is the address for the second node to communicate through a network connection.

[0201] Step 640: The first node sends the first consensus message on the network connection between the first node and the second node based on the communication address of the second node;

[0202] The first node can establish a network connection with one or more nodes in the blockchain system. The communication address of the second node indicates to the first node to send a first consensus message on the network connection between the first node and the second node.

[0203] It should be noted that for further introduction to steps 610 to 640, reference can be made to Figure 5 each step in, which will not be repeated here one by one.

[0204] Step 650: The second node receives the first consensus message sent by the first node;

[0205] As introduced above, the first consensus message is a message that needs to be transmitted based on the consensus protocol in the blockchain system; the first consensus message is transmitted on the network connection between the first node and the second node based on the communication address of the second node. The communication address of the second node is obtained according to the first association information saved by the first node. The first association information records the mapping relationship between the consensus address of the second node and the communication address of the second node. The consensus address is the identity information obtained by the first node to identify the second node, and the communication address of the second node is the address for the second node to communicate through the network connection.

[0206] Step 660: The second node processes the first consensus message based on the consensus protocol;

[0207] Exemplarily, the first consensus message is a message that the first node needs to send to the second node based on the consensus protocol in the blockchain system; the functions of the first consensus message include but are not limited to requesting the second node to confirm the validity of transaction information / block information. After the second node receives the first consensus message, it processes the first consensus message based on the consensus protocol, confirms or rejects the validity of the transaction information / block information, and then agrees or refuses to add the transaction information / block information to the blockchain.

[0208] In an optional implementation manner, step 660 can be executed as the following steps:

[0209] · Obtain the consensus address corresponding to the communication address of the first node according to the second association information saved by the second node;

[0210] The first consensus message also carries the communication address of the first node. Adding the communication address of the first node in the first consensus message is used to indicate the message source of the first consensus message.

[0211] The second associated information is stored locally at the second node. The second associated information records the mapping relationship between the consensus address of the first node and the communication address of the first node. The communication address of the first node is the address through which the first node communicates via a network connection, and the consensus address of the first node is the identity information used to identify the first node. For the introduction of the communication address and the consensus address, reference can be made to the introduction of the communication address and the consensus address of the second node in the above text, which will not be repeated here.

[0212] · Obtain the public key of the first node according to the consensus address of the first node;

[0213] Exemplarily, the consensus address of the first node is the address information of the public key provided by the first node. Further, the public key provided by the first node is recorded on the blockchain. The public key provided by the first node is used to verify the digital signature in the information associated with the consensus protocol sent by the first node.

[0214] The following will take the first consensus message as an example for illustration. The digital signature in the first consensus message is added by the first node to prevent other nodes from tampering with the first consensus message.

[0215] Obtain the public key provided by the first node. Decrypt the digital signature with the public key provided by the first node to obtain the first digest of the first consensus message. Input the message content of the first consensus message into a hash function to obtain the second digest of the first consensus message. When the first digest and the second digest are the same, that is, the public key of the first node successfully verifies the digital signature carried by the first consensus message, it is ensured that the message content of the first consensus message has not been tampered with.

[0216] · When the public key of the first node successfully verifies the digital signature in the first consensus message, process the first consensus message based on the consensus protocol;

[0217] When the public key of the first node successfully verifies the digital signature in the first consensus message, the message content of the first consensus message has not been tampered with. Exemplarily, process the first consensus message based on the consensus protocol to confirm or reject the validity of the transaction information / block information.

[0218] · When the public key of the first node fails to successfully verify the digital signature in the first consensus message, do not process the first consensus message any further.

[0219] When the public key of the first node fails to successfully verify the digital signature in the first consensus message, the message content of the first consensus message has been tampered with. Abandon processing the first consensus message to avoid the blockchain security risk caused by the tampered message content.

[0220] Step 665a: The second node receives the address update information and the first associated information set sent by the first node;

[0221] The address update information and the first set of associated information are sent by the first node after sending the first consensus message. By supplementing and sending the address update information and the first set of associated information after sending the first consensus message, it is indicated that the second node synchronizes the associated information with the first node.

[0222] The first node stores the first set of associated information, and each piece of associated information in the first set of associated information records the mapping relationship between the consensus address and the communication address of a single node in the blockchain system;

[0223] Step 665b: In response to the address update information, the second node updates and stores the first set of associated information at the second node;

[0224] The address update information is used to instruct the second node to store the first set of associated information, so as to realize the synchronization of the associated information between the second node and the first node. Further, before executing step 655a, the second node already stores a local set of associated information, and the address update information is used to instruct the second node to store the associated information in the first set of associated information that is different from the local set of associated information. For the introduction of the differences between the local set of associated information and the first set of associated information, please refer to sub-step one in the above text.

[0225] After receiving the first consensus message, based on the address update information and the first set of associated information sent by the first node to the second node, the synchronization of the associated information between the second node and the first node is realized, expanding the information source for storing the associated information in the second node; it can make full use of the network connection between nodes for synchronizing the associated information after the consensus message is transmitted.

[0226] It should be noted that steps 650 and 660 in this embodiment can form a new embodiment to be executed independently by the second node; similarly, steps 650, 660, 665a, and 665b in this embodiment can form a new embodiment to be executed independently by the second node, and this application does not limit this. This embodiment only shows the situation where steps 665a and 665b are executed after step 660, but steps 665a and 665b can also be executed before or simultaneously with step 660, and this application does not limit this.

[0227] In summary, the method provided in this embodiment, through the first set of associated information stored by the first node, records the mapping relationship between the consensus address and the communication address of the second node, realizes obtaining the communication address of the second node according to the consensus address of the second node locally at the first node, and then realizes the transmission of the first consensus message, which can avoid directly storing the communication address of the second node on the blockchain; it avoids the information on the blockchain continuously recording the network connection situation of the second node, reducing the information security risk of the second node.

[0228] Those of ordinary skill in the art can understand that the above embodiments can be implemented independently, or the above embodiments can be freely combined to form new embodiments to implement the information transmission method based on the blockchain system of the present application.

[0229] Figure 11 The block diagram of the information transmission device based on the blockchain system provided by an exemplary embodiment of the present application is shown. The blockchain system includes at least a first node and a second node; the device includes:

[0230] A construction module 810, configured to construct a first consensus message, where the first consensus message is a message that the first node needs to send to the second node based on the consensus protocol in the blockchain system;

[0231] An acquisition module 820, configured to acquire the consensus address of the second node, where the consensus address is identity information for identifying the second node;

[0232] A first processing module 830, configured to obtain the communication address corresponding to the consensus address of the second node according to the first association information saved by the first node, where the first association information records the mapping relationship between the consensus address of the second node and the communication address of the second node, and the communication address of the second node is the address for the second node to communicate through a network connection;

[0233] A sending module 840, configured to send the first consensus message on the network connection between the first node and the second node based on the communication address of the second node.

[0234] In an optional implementation manner of this embodiment, the first node saves a first association information set, where the first association information set includes at least two association information, and the at least two association information correspond to at least two nodes in the blockchain system one by one. The association information in the first association information set records the mapping relationship between the consensus address and the communication address of a single node in the blockchain system; the first processing module 830 is further configured to:

[0235] Search for the consensus address of the second node in the first association information set to obtain the first association information in the first association information set;

[0236] Obtain the communication address of the second node carried in the first association information.

[0237] In an optional implementation manner of this embodiment, the acquisition module 820 is further configured to:

[0238] Obtain the consensus address of the second node on the blockchain of the blockchain system;

[0239] Among them, the consensus address is the address information of the public key of the second node, and the public key of the second node is used to encrypt the consensus message sent to the second node and / or verify the digital signature in the consensus message sent by the second node.

[0240] In an alternative implementation of this embodiment, the obtaining module 820 is configured to obtain the communication address of the second node based on the network connection between the first node and the second node, and obtain a second consensus message sent by the second node to the first node, where the second consensus message is transmitted on the network connection;

[0241] The first processing module 830 is configured to determine the consensus address of the second node according to the digital signature of the second node carried in the second consensus message;

[0242] The building module 810 is configured to build the first association information according to the consensus address of the second node and the communication address of the second node, and save the first association information.

[0243] In an alternative implementation of this embodiment, the first processing module 830 is further configured to:

[0244] Obtain the public key of the second node on the blockchain;

[0245] When the public key of the second node successfully verifies the digital signature carried in the second consensus message, determine the public key address of the second node on the blockchain as the consensus address of the second node.

[0246] In an alternative implementation of this embodiment, the blockchain system includes a third node,

[0247] The sending module 840 is configured to send address request information to the third node;

[0248] The device further includes a first receiving module 850, configured to receive a second association information set sent by the third node and save the second association information set on the first node, where the second association information set is sent by the third node in response to the address request information;

[0249] Among them, the second association information set saved by the third node includes at least one association information, and each association information in the second association information set records the mapping relationship between the consensus address and the communication address of a single node in the blockchain system.

[0250] In an alternative implementation of this embodiment, the sending module 840 is further configured to: when the first node does not store the first association information, send the address request information to the third node; wherein, the second association information set sent by the third node includes the first association information.

[0251] In an alternative implementation of this embodiment, the first node stores a first association information set, the first association information set includes at least one association information, and each association information in the first association information set records the mapping relationship between the consensus address and the communication address of a single node in the blockchain system except the second node;

[0252] The sending module 840 is further configured to:

[0253] send the address request information and the first association information set to the third node;

[0254] wherein, the association information in the second association information set sent by the third node is different from the association information in the first association information set.

[0255] In an alternative implementation of this embodiment, the sending module 840 is further configured to:

[0256] when a network connection is first established between the first node and the third node, send the address request information to the third node.

[0257] In an alternative implementation of this embodiment, the first node stores a first association information set, the first association information set includes at least one association information, and each association information in the first association information set records the mapping relationship between the consensus address and the communication address of a single node in the blockchain system;

[0258] The sending module 840 is further configured to:

[0259] when a network connection is first established between the first node and the third node, send the address request information and the first association information set to the third node;

[0260] wherein, the association information in the second association information set sent by the third node is different from the association information in the first association information set.

[0261] In an alternative implementation of this embodiment, the sending module 840 is further configured to:

[0262] broadcast and send address update information and the second association information set in the blockchain system;

[0263] Among them, the address update information is used to instruct other nodes in the blockchain system except the first node to update and save the second associated information set.

[0264] Figure 12 The structure block diagram of an information transmission device based on a blockchain system provided by an exemplary embodiment of the present application is shown. The blockchain system includes at least a first node and a second node; the device includes:

[0265] A second receiving module 860, configured to receive a first consensus message sent by the first node, where the first consensus message is a message that needs to be transmitted based on a consensus protocol in the blockchain system;

[0266] A second processing module 870, configured to process the first consensus message based on the consensus protocol;

[0267] Among them, the first consensus message is transmitted based on the communication address of the second node on the network connection between the first node and the second node. The communication address of the second node is obtained according to the first associated information saved by the first node. The first associated information records the mapping relationship between the consensus address of the second node and the communication address of the second node. The consensus address is the identity information obtained by the first node and used to identify the second node. The communication address of the second node is the address through which the second node communicates through the network connection.

[0268] In an optional implementation manner of this embodiment, the second receiving module 860 is configured to receive address update information and a first associated information set sent by the first node. The first node saves the first associated information set. Each piece of associated information in the first associated information set records the mapping relationship between the consensus address and the communication address of a single node in the blockchain system;

[0269] The second processing module 870 is configured to, in response to the address update information, update and save the first associated information set in the second node.

[0270] In an optional implementation manner of this embodiment, the first consensus message carries the communication address of the first node; the second processing module 870 is further configured to: obtain the consensus address corresponding to the communication address of the first node according to the second associated information saved by the second node. The second associated information records the mapping relationship between the consensus address of the first node and the communication address of the first node. The communication address of the first node is the address through which the first node communicates through the network connection. The consensus address of the first node is the identity information used to identify the first node;

[0271] Obtain the public key of the first node according to the consensus address of the first node;

[0272] In the case where the public key of the first node successfully verifies the digital signature in the first consensus message, process the first consensus message based on the consensus protocol;

[0273] In the case where the public key of the first node fails to successfully verify the digital signature in the first consensus message, no longer process the first consensus message.

[0274] It should be noted that when the device provided in the above embodiment realizes its functions, only the division of the above-mentioned various functional modules is used for illustration. In actual applications, the above functions can be assigned to different functional modules according to actual needs, that is, the content structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0275] Regarding the device in the above embodiment, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method; the technical effects obtained by each module performing operations are the same as those in the embodiments related to the method, and will not be elaborated here.

[0276] The embodiment of the present application further provides a computer device, which includes: a processor and a memory, and a computer program is stored in the memory; the processor is configured to execute the computer program in the memory to implement the information transmission method based on the blockchain system provided in each of the above method embodiments.

[0277] Optionally, the computer device is a server. Exemplarily, Figure 13 is a structural block diagram of a server provided by an exemplary embodiment of the present application.

[0278] Generally, the server 2300 includes: a processor 2301 and a memory 2302.

[0279] The processor 2301 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. The processor 2301 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The processor 2301 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 2301 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 2301 may further include an artificial intelligence (AI) processor, and the AI processor is used to process computational operations related to machine learning.

[0280] The memory 2302 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 2302 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In some embodiments, the non-transitory computer-readable storage media in the memory 2302 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 2301 to implement the information transmission method based on the blockchain system provided in the method embodiments of the present application.

[0281] In some embodiments, the server 2300 may further optionally include: an input interface 2303 and an output interface 2304. The processor 2301, the memory 2302, the input interface 2303, and the output interface 2304 may be connected through a bus or signal lines. Each peripheral device may be connected to the input interface 2303 and the output interface 2304 through a bus, signal lines, or a circuit board. The input interface 2303 and the output interface 2304 can be used to connect at least one peripheral device related to input / output (I / O) to the processor 2301 and the memory 2302. In some embodiments, the processor 2301, the memory 2302, the input interface 2303, and the output interface 2304 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 2301, the memory 2302, the input interface 2303, and the output interface 2304 can be implemented on a separate chip or circuit board, and the embodiments of the present application do not limit this.

[0282] Those skilled in the art can understand that the structure shown above does not constitute a limitation on the server 2300, and it may include more or fewer components than shown in the figure, or combine certain components, or adopt different component arrangements.

[0283] In an exemplary embodiment, a chip is further provided, and the chip includes programmable logic circuits and / or program instructions, which are used to implement the information transmission method based on the blockchain system described in the above aspects when the chip runs on a computer device.

[0284] In an exemplary embodiment, a computer program product is further provided. The computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor reads and executes the computer instructions to implement the information transmission method based on the blockchain system provided in the above method embodiments.

[0285] In an exemplary embodiment, a computer-readable storage medium is further provided. A computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by the processor to implement the information transmission method based on the blockchain system provided in the above method embodiments.

[0286] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium, and the storage medium mentioned above can be a read-only memory, a disk, or an optical disc, etc.

[0287] Those skilled in the art should be able to realize that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented by hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. The computer-readable medium includes computer storage media and communication media, where the communication media includes any medium that facilitates the transmission of a computer program from one place to another. The storage media can be any available medium accessible by a general-purpose or special-purpose computer.

[0288] The above are only alternative embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.

Claims

1. An information transmission method based on a blockchain system, characterized in that, The blockchain system includes at least a first node and a second node; the method is executed by the first node; the method includes: Constructing a first consensus message, which is a message that the first node needs to send to the second node based on the consensus protocol in the blockchain system; Obtaining the consensus address of the second node, which is the identity information used to identify the second node; According to the first association information saved by the first node, obtaining the communication address corresponding to the consensus address of the second node, where the first association information records the mapping relationship between the consensus address of the second node and the communication address of the second node, and the communication address of the second node is the address for the second node to communicate through the network connection; Based on the communication address of the second node, sending the first consensus message on the network connection between the first node and the second node.

2. The method according to claim 1, wherein The first node saves a first association information set, which includes at least two association information, and the at least two association information correspond to at least two nodes in the blockchain system one by one. The association information in the first association information set records the mapping relationship between the consensus address and the communication address of a single node in the blockchain system; The obtaining the communication address corresponding to the consensus address of the second node according to the first association information saved by the first node includes: Searching for the consensus address of the second node in the first association information set to obtain the first association information in the first association information set; Obtaining the communication address of the second node carried in the first association information.

3. The method according to claim 2, wherein The obtaining the consensus address of the second node includes: On the blockchain of the blockchain system, obtaining the consensus address of the second node; Wherein, the consensus address is the address information of the public key of the second node, and the public key of the second node is used to encrypt the consensus message sent to the second node and / or verify the digital signature in the consensus message sent by the second node.

4. The method according to any one of claims 1 to 3, characterized in that The method further includes: Based on the network connection between the first node and the second node, obtaining the communication address of the second node and obtaining the second consensus message sent by the second node to the first node, where the second consensus message is transmitted on the network connection; Determining the consensus address of the second node according to the digital signature of the second node carried in the second consensus message; Constructing the first association information according to the consensus address and the communication address of the second node, and saving the first association information.

5. The method according to claim 4, characterized in that The determining the consensus address of the second node according to the digital signature of the second node carried in the second consensus message includes: Obtaining the public key of the second node on the blockchain; When the public key of the second node successfully verifies the digital signature carried in the second consensus message, determining the public key address of the second node on the blockchain as the consensus address of the second node.

6. The method according to any one of claims 1 to 3, characterized in that The blockchain system includes a third node, and the method further includes: Sending address request information to the third node; Receiving a second set of association information sent by the third node, and saving the second set of association information on the first node, where the second set of association information is sent by the third node in response to the address request information; Wherein, the second set of association information saved by the third node includes at least one piece of association information, and each piece of association information in the second set of association information records the mapping relationship between the consensus address and the communication address of a single node in the blockchain system.

7. The method according to claim 6, characterized in that, After obtaining the consensus address of the second node, the sending address request information to the third node includes: When the first node does not save the first set of association information, sending the address request information to the third node; Wherein, the first set of association information is included in the second set of association information sent by the third node.

8. The method according to claim 7, wherein The first node saves a first set of association information, the first set of association information includes at least one piece of association information, and each piece of association information in the first set of association information records the mapping relationship between the consensus address and the communication address of a single node in the blockchain system except the second node; The sending the address request information to the third node when the first node does not save the first set of association information includes: Sending the address request information and the first set of association information to the third node; Wherein, the association information in the second set of association information sent by the third node is different from the association information in the first set of association information.

9. The method according to claim 6, characterized in that, The sending address request information to the third node includes: When a network connection is first established between the first node and the third node, sending the address request information to the third node.

10. The method according to claim 9, characterized in that, The first node saves a first set of association information, the first set of association information includes at least one piece of association information, and each piece of association information in the first set of association information records the mapping relationship between the consensus address and the communication address of a single node in the blockchain system; The sending the address request information to the third node when a network connection is first established between the first node and the third node includes: When a network connection is first established between the first node and the third node, sending the address request information and the first set of association information to the third node; Wherein, the association information in the second set of association information sent by the third node is different from the association information in the first set of association information.

11. The method according to claim 6, characterized in that, The method further includes: Broadcasting and sending address update information and the second set of association information in the blockchain system; Wherein, the address update information is used to instruct other nodes in the blockchain system except the first node to update and save the second set of association information.

12. An information transmission method based on a blockchain system, characterized in that, The blockchain system includes at least a first node and a second node; the method is executed by the second node; the method includes: Receive a first consensus message sent by the first node, where the first consensus message is a message that needs to be transmitted based on a consensus protocol in the blockchain system; Process the first consensus message based on the consensus protocol; Wherein, the first consensus message is transmitted based on the communication address of the second node on the network connection between the first node and the second node, and the communication address of the second node is obtained according to first association information saved by the first node. The first association information records the mapping relationship between the consensus address of the second node and the communication address of the second node. The consensus address is identity information obtained by the first node and used to identify the second node, and the communication address of the second node is the address for the second node to communicate through the network connection.

13. The method according to claim 12, wherein The method further includes: Receive address update information and a first set of association information sent by the first node. The first node saves the first set of association information, and each piece of association information in the first set of association information records the mapping relationship between the consensus address and the communication address of a single node in the blockchain system; In response to the address update information, update and save the first set of association information at the second node.

14. The method according to claim 12, wherein The first consensus message carries the communication address of the first node; and processing the first consensus message based on the consensus protocol includes: Obtain the consensus address corresponding to the communication address of the first node according to second association information saved by the second node. The second association information records the mapping relationship between the consensus address of the first node and the communication address of the first node. The communication address of the first node is the address for the first node to communicate through the network connection, and the consensus address of the first node is identity information used to identify the first node; Obtain the public key of the first node according to the consensus address of the first node; When the public key of the first node successfully verifies the digital signature in the first consensus message, process the first consensus message based on the consensus protocol; When the public key of the first node fails to successfully verify the digital signature in the first consensus message, stop processing the first consensus message.

15. An information transmission device based on a blockchain system, characterized in that, The blockchain system includes at least a first node and a second node; the apparatus includes: A construction module, configured to construct a first consensus message, where the first consensus message is a message that the first node needs to send to the second node based on a consensus protocol in the blockchain system; An acquisition module, configured to acquire the consensus address of the second node, where the consensus address is identity information used to identify the second node; A first processing module, configured to obtain the communication address corresponding to the consensus address of the second node according to first association information saved by the first node. The first association information records the mapping relationship between the consensus address of the second node and the communication address of the second node. The communication address of the second node is the address for the second node to communicate through the network connection; A sending module, configured to send the first consensus message on the network connection between the first node and the second node based on the communication address of the second node.

16. An information transmission device based on a blockchain system, characterized in that, The blockchain system includes at least a first node and a second node; the apparatus includes: A second receiving module, configured to receive the first consensus message sent by the first node, where the first consensus message is a message that needs to be transmitted based on a consensus protocol in the blockchain system; A second processing module, configured to process the first consensus message based on the consensus protocol; Wherein, the first consensus message is transmitted on the network connection between the first node and the second node based on the communication address of the second node, the communication address of the second node is obtained according to first association information saved by the first node, the first association information records a mapping relationship between the consensus address of the second node and the communication address of the second node, the consensus address is identity information obtained by the first node for identifying the second node, and the communication address of the second node is an address for the second node to communicate through the network connection.

17. A computer device, characterized in that, The computer device includes: a processor and a memory, where at least one segment of program is stored in the memory; the processor is configured to execute the at least one segment of program in the memory to implement the information transmission method based on the blockchain system as described in any one of claims 1 to 14 above.

18. A computer-readable storage medium, characterized in that, Executable instructions are stored in the readable storage medium, and the executable instructions are loaded and executed by the processor to implement the information transmission method based on the blockchain system as described in any one of claims 1 to 14 above.

19. A computer program product, characterized in that, The computer program product includes computer instructions, the computer instructions are stored in a computer-readable storage medium, and the processor reads and executes the computer instructions from the computer-readable storage medium to implement the information transmission method based on the blockchain system as described in any one of claims 1 to 14 above.