Communication Method, Device and Hardware Device Based on Blockchain System

By introducing communication security management nodes and public key encryption technology into the blockchain system, random encoding of communication channels is generated and managed, the problem of easy interception of transaction information in the blockchain system is solved, and the security and confidentiality of data transmission are achieved.

CN111711649BActive Publication Date: 2025-07-11LIANNONG (SHENZHEN) INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010303865.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-12
Publication Date
2025-07-11
Estimated Expiration
2040-04-12

AI Technical Summary

Technical Problem

In the blockchain system, transaction information is easily intercepted maliciously and cannot meet the communication security needs in scenarios such as commercial secrets that require confidentiality.

Method used

By introducing communication security management nodes into the blockchain system, random encoding of communication channels between blockchain nodes is generated and managed, and data is encrypted and transmitted using public key encryption technology to ensure the security of data transmission.

Benefits of technology

It realizes data transmission security between blockchain nodes, prevents data from being maliciously intercepted, and meets confidentiality needs such as commercial secrets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111711649B_ABST
    Figure CN111711649B_ABST
Patent Text Reader

Abstract

The present invention discloses a communication method, device and hardware device based on a blockchain system, relating to the technical field of blockchain, and is used to improve the security of data transmission between blockchain nodes. The main technical solution is as follows: receiving a communication connection request sent by a first blockchain node; detecting whether there is a communication channel between the first blockchain node and a second blockchain node in a node communication table; if not, sending a prompt message to the second blockchain node asking whether it agrees to establish a communication connection with the first blockchain node; if receiving a confirmation of the prompt message, establishing a communication channel for the first blockchain node and the second blockchain node; generating a channel random code for the communication channel; sending the channel random code to the first blockchain node and the second blockchain node; so that the first blockchain node and the second blockchain node encrypt the transmitted data according to the channel random code and their respectively corresponding first public key and second public key.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of blockchain, and in particular, to a communication method, device, and hardware device based on a blockchain system. Background Art

[0002] Blockchain is a recording technology different from traditional centralized accounting methods. Nodes participating in the blockchain system may not belong to the same organization and do not need to trust each other; blockchain data is jointly maintained by all nodes, and each node participating in the maintenance can obtain a copy of the complete record. Compared with traditional accounting technologies, its characteristics include: maintaining an ever-growing chain, only adding records, and the records that have occurred cannot be tampered with; reaching a consensus without centralized control, etc.

[0003] Based on the operation mechanism of blockchain, it can ensure that data is not tampered with during the transmission process and prevent nodes from being subjected to denial-of-service attacks. However, since it relies on the joint supervision of all nodes for services, generally all transaction information is publicly broadcast, so the relevant transaction information is easily intercepted maliciously. When it comes to many scenarios that require confidentiality such as business secrets, it cannot meet the confidentiality requirements, and the security of communication cannot be guaranteed. Summary of the Invention

[0004] The present invention provides a communication method, device, and hardware device based on a blockchain system for improving the security of data transmission between blockchain nodes.

[0005] An embodiment of the present invention provides a communication method based on a blockchain system. The blockchain system includes a communication security management node, a first blockchain node, and a second blockchain node. The method is applied to the communication security management node in the blockchain system, and the method includes:

[0006] Receiving a communication connection request sent by the first blockchain node, where the communication connection request includes the second blockchain node that needs to communicate with the first blockchain node;

[0007] Detecting whether there is a communication channel between the first blockchain node and the second blockchain node in the node communication table. The node communication table stores communication channels of multiple blockchain nodes that can communicate with each other, as well as corresponding channel random codes;

[0008] If not, sending a prompt message to the second blockchain node asking whether it agrees to establish a communication connection with the first blockchain node;

[0009] If receiving the information sent by the second blockchain node agreeing to establish a communication connection with the first blockchain node, establishing a communication channel for the first blockchain node and the second blockchain node;

[0010] Generate a channel random code for the communication channel between the first blockchain node and the second blockchain node; and store the corresponding relationship between the first blockchain node and the second blockchain node that can communicate, and the corresponding channel random code in the node communication table;

[0011] Send the channel random code to the first blockchain node and the second blockchain node; the first blockchain node encrypts the data to be transmitted to the second blockchain node according to the channel random code and the first public key, and the second blockchain node encrypts the data to be transmitted to the first blockchain node according to the channel random code and the second public key.

[0012] An embodiment of the present invention provides a communication device based on a blockchain system. The blockchain system includes a communication security management node, a first blockchain node, and a second blockchain node. The device is applied to the communication security management node in the blockchain system. The device includes:

[0013] A receiving module, configured to receive a communication connection request sent by the first blockchain node, where the communication connection request includes a second blockchain node that needs to communicate with the first blockchain node;

[0014] A detection module, configured to detect whether there is a communication channel between the first blockchain node and the second blockchain node in the node communication table. The node communication table stores communication channels of multiple blockchain nodes that can communicate, and corresponding channel random codes;

[0015] A sending module, configured to, if there is no communication channel between the first blockchain node and the second blockchain node, send a prompt message indicating whether to agree to establish a communication connection with the first blockchain node to the second blockchain node;

[0016] A establishing module, configured to, if receiving the information sent by the second blockchain node agreeing to establish a communication connection with the first blockchain node, establish a communication channel for the first blockchain node and the second blockchain node;

[0017] A generating module, configured to generate a channel random code for the communication channel between the first blockchain node and the second blockchain node;

[0018] A storing module, configured to store the corresponding relationship between the first blockchain node and the second blockchain node that can communicate, and the corresponding channel random code in the node communication table;

[0019] A sending module, configured to send the channel random code to the first blockchain node and the second blockchain node, so that the first blockchain node and the second blockchain node encrypt the transmitted data according to the channel random code and their respective first public key and second public key.

[0020] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the communication method based on the blockchain system described above is implemented.

[0021] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the communication device based on the blockchain system described above is implemented.

[0022] A communication method, device, computer device, and storage medium based on a blockchain system provided by the present invention receive a communication connection request sent by a first blockchain node. The communication connection request includes a second blockchain node that needs to communicate with the first blockchain node. Detect whether there is a communication channel between the first blockchain node and the second blockchain node in the node communication table. If not, send a prompt message to the second blockchain node asking whether it agrees to establish a communication connection with the first blockchain node. If the information indicating that the second blockchain node agrees to establish a communication connection with the first blockchain node is received, establish a communication channel for the first blockchain node and the second blockchain node. Generate a channel random code for the communication channel between the first blockchain node and the second blockchain node. Store the corresponding relationship that the first blockchain node and the second blockchain node can communicate, and the corresponding channel random code in the node communication table. Send the channel random code to the first blockchain node and the second blockchain node, so that the first blockchain node and the second blockchain node encrypt the transmitted data according to the channel random code and their respective first public key and second public key. That is, the present invention encrypts the data transmitted between the first blockchain node and the second blockchain node according to the generated channel random code and the first public key and the second public key respectively corresponding to the first blockchain node and the second blockchain node, thereby ensuring the security of data transmission between the first blockchain node and the second blockchain node. Description of the Drawings

[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0024] Figure 1 is a flowchart of a communication method based on a blockchain system in an embodiment of the present invention;

[0025] Figure 2 is a flowchart of randomly encoding a channel and sending it to a first blockchain node and a second blockchain node in an embodiment of the present invention;

[0026] Figure 3 is a schematic block diagram of a communication device based on a blockchain system in an embodiment of the present invention;

[0027] Figure 4 is a schematic diagram of a computer device in an embodiment of the present invention. Detailed implementation manners

[0028] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0029] In one embodiment, as Figure 1 shown, a communication method based on a blockchain system is provided. The blockchain system includes a communication security management node, a first blockchain node, and a second blockchain node. The method is applied to the communication security management node in the blockchain system and includes the following steps:

[0030] S10. Receive a communication connection request sent by the first blockchain node.

[0031] Among them, the communication connection request includes a second blockchain node that needs to communicate with the first blockchain node. It should be noted that the communication connection request may include a second blockchain node that communicates with the first blockchain node, and may also include a third blockchain node, a fourth blockchain node, etc. that communicate with the first blockchain node. The embodiments of the present invention do not make specific limitations.

[0032] S20. Detect whether there is a communication channel between the first blockchain node and the second blockchain node in the node communication table.

[0033] Among them, the node communication table stores communication channels of multiple blockchain nodes that can communicate with each other, and corresponding channel random encodings; the channel random encoding is used to identify the communication channel and is also used to encrypt the data sent between the first blockchain node and the second blockchain node in subsequent steps. In the embodiments of the present invention, the communication channels and the corresponding channel random encodings in the node communication table are created and generated according to requirements.

[0034] S30. If not, send a prompt message to the second blockchain node asking whether it agrees to establish a communication connection with the first blockchain node.

[0035] For the embodiments of the present invention, if there is no communication channel between the first blockchain node and the second blockchain node in the node communication table, it indicates that the first blockchain node and the second blockchain node have not established a connection yet. At this time, it is necessary to send a prompt message to the second blockchain node asking whether it agrees to establish a communication connection with the first blockchain node, so that after receiving this prompt message, the second blockchain node can confirm whether to establish a communication connection with the first blockchain node.

[0036] S40. If the information indicating that the second blockchain node agrees to establish a communication connection with the first blockchain node is received, establish a communication channel for the first blockchain node and the second blockchain node.

[0037] S50. Generate a channel random code for the communication channel between the first blockchain node and the second blockchain node; and store the corresponding relationship that the first blockchain node and the second blockchain node can communicate with each other, as well as the corresponding channel random code, in the node communication table.

[0038] S60. Send the channel random code to the first blockchain node and the second blockchain node; so that the first blockchain node and the second blockchain node encrypt the data to be transmitted according to the channel random code and their respective first public key and second public key.

[0039] In the embodiments of the present invention, after generating the channel random code for the communication channel, send the channel random code to the first blockchain node and the second blockchain node, so that the first blockchain node and the second blockchain node encrypt the data to be transmitted according to the channel random code and their respective first public key and second public key. Specifically, the first blockchain node encrypts the data to be transmitted to the second blockchain node according to the channel random code and the first public key, and the second blockchain node encrypts the data to be transmitted to the first blockchain node according to the channel random code and the second public key, so as to ensure the security of data transmission between the first blockchain node and the second blockchain node.

[0040] In an embodiment provided by the present invention, before the first blockchain node and the second blockchain node encrypt the data to be transmitted according to the channel random code and their respective first public key and second public key, the method further includes: the first blockchain node generates the first public key and broadcasts the first public key to all blockchain nodes; the second blockchain node generates the second public key and broadcasts the second public key to all blockchain nodes;

[0041] Correspondingly, the first blockchain node and the second blockchain node encrypt the transmitted data according to the channel random code and their respectively corresponding first public key and second public key, including: the first blockchain node encrypts the data content to be sent to the second blockchain node according to the first public key and the channel random code, and sends the encrypted data content to the second blockchain node through the communication channel; the second blockchain node encrypts the data content to be sent to the first blockchain node according to the second public key and the channel random code, and sends the encrypted data content to the first blockchain node through the communication channel.

[0042] As Figure 2 shown, in an embodiment provided by the present invention, sending the channel random code to the first blockchain node and the second blockchain node includes:

[0043] S601, determining the valid time of the communication random code.

[0044] Wherein, the valid time is determined according to the hardware occupied resources of the first blockchain node and the first blockchain node and / or the network bandwidth. The present invention determines the valid time of the communication random code according to the hardware occupied resources and / or the network bandwidth, so that the communication code is only valid within a fixed time, increasing the difficulty for network attackers to obtain the communication random code, thereby ensuring the security of the data transmitted between the first blockchain node and the second blockchain node.

[0045] It should be noted that determining the valid time of the communication random code according to the hardware occupied resources and / or the network bandwidth can specifically set the valid time of the communication random code shorter when the hardware occupied resources are less and the network bandwidth is larger, that is, it means that when the hardware occupied resources are less and the network bandwidth is larger, the data transmission efficiency is faster, and at this time, the valid time of the communication random code can be set shorter; otherwise, the valid time of the communication random code is set longer.

[0046] S602, sending the channel random code and the corresponding valid time to the first blockchain node and the second blockchain node.

[0047] After the first blockchain node and the second blockchain node receive the channel random code and the corresponding valid time, they perform communication transmission according to the channel random code within the valid time.

[0048] S603. After the expiration of the valid time of the channel random encoding to be awaited, regenerate the channel random encoding for the communication channel between the first blockchain node and the second blockchain node, and re-determine the valid time according to the hardware resource occupancy and / or network bandwidth of the first blockchain node and the first blockchain node.

[0049] In the embodiments of the present invention, for the channel random encoding and the corresponding valid time, if the first blockchain node and the second blockchain node still need to perform data transmission, regenerate the channel random encoding for the communication channel between the first blockchain node and the second blockchain node, re-determine the valid time according to the hardware resource occupancy and / or network bandwidth of the first blockchain node and the first blockchain node, and update the corresponding channel random encoding in the node communication table.

[0050] S604. Send the regenerated channel random encoding and the corresponding valid time to the first blockchain node and the second blockchain node.

[0051] In the embodiments of the present invention, send the channel random encoding and the corresponding valid time to the first blockchain node and the second blockchain node, so that the first blockchain node and the second blockchain node encrypt and transmit data according to the channel random encoding within the valid time, and after the expiration of the valid time of the channel random encoding, regenerate the channel random encoding for the communication channel between the first blockchain node and the second blockchain node, thereby ensuring the security of data transmission between the first blockchain node and the second blockchain node.

[0052] In an embodiment provided by the present invention, when receiving the revocation communication connection information sent by the first blockchain node and / or the second blockchain node, or when the first blockchain node and the second blockchain node do not perform data transmission within a preset time; delete the communication channel between the first blockchain node and the second blockchain node; and delete the corresponding relationship between the first blockchain node and the second blockchain node that can communicate, and the corresponding channel random encoding from the node communication table. Among them, the preset time can be set according to actual needs. For example, the preset time can be set to 5 minutes, 10 minutes, 15 minutes, etc., and the embodiments of the present invention do not make specific limitations.

[0053] A communication method based on a blockchain system provided by the present invention receives a communication connection request sent by a first blockchain node, where the communication connection request includes a second blockchain node that needs to communicate with the first blockchain node; detects whether there is a communication channel between the first blockchain node and the second blockchain node in the node communication table; if not, sends a prompt message to the second blockchain node asking whether it agrees to establish a communication connection with the first blockchain node; if it receives a message sent by the second blockchain node agreeing to establish a communication connection with the first blockchain node, establishes a communication channel for the first blockchain node and the second blockchain node; generates a channel random code for the communication channel between the first blockchain node and the second blockchain node; and stores the corresponding relationship between the first blockchain node and the second blockchain node that can communicate, as well as the corresponding channel random code, in the node communication table; sends the channel random code to the first blockchain node and the second blockchain node; so that the first blockchain node and the second blockchain node encrypt the transmitted data according to the channel random code and their respectively corresponding first public key and second public key. That is, the present invention encrypts the data transmitted between the first blockchain node and the second blockchain node according to the generated channel random code and the first public key and the second public key respectively corresponding to the first blockchain node and the second blockchain node, thereby ensuring the security of data transmission between the first blockchain node and the second blockchain node.

[0054] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

[0055] In an embodiment provided by the present invention, a communication device based on a blockchain system is provided, and the communication device based on the blockchain system corresponds one-to-one with the communication method based on the blockchain system in the above embodiment. As Figure 3 shown, the blockchain system includes a communication security management node, a first blockchain node, and a second blockchain node. The device is applied to the communication security management node in the blockchain system. The communication device based on the blockchain system includes: a receiving module 10, a detecting module 20, a sending module 30, a establishing module 40, a generating module 50, and a storing module 60. The detailed description of each functional module is as follows:

[0056] The receiving module 10 is configured to receive a communication connection request sent by a first blockchain node, where the communication connection request includes a second blockchain node that needs to communicate with the first blockchain node;

[0057] The detection module 20 is used to detect whether there is a communication channel between the first blockchain node and the second blockchain node in the node communication table. The node communication table stores the communication channels of multiple blockchain nodes that can communicate with each other, as well as the corresponding channel random codes.

[0058] The sending module 30 is used to send a prompt message asking whether to agree to establish a communication connection with the first blockchain node to the second blockchain node if there is no communication channel between the first blockchain node and the second blockchain node.

[0059] The establishment module 40 is used to establish a communication channel for the first blockchain node and the second blockchain node if it receives the information that the second blockchain node agrees to establish a communication connection with the first blockchain node.

[0060] The generation module 50 is used to generate a channel random code for the communication channel between the first blockchain node and the second blockchain node.

[0061] The storage module 60 is used to store the corresponding relationship between the first blockchain node and the second blockchain node that can communicate with each other, as well as the corresponding channel random code into the node communication table.

[0062] The sending module 30 is further used to send the channel random code to the first blockchain node and the second blockchain node; so that the first blockchain node and the second blockchain node encrypt the data to be transmitted according to the channel random code and their respectively corresponding first public key and second public key.

[0063] The generation module 50 is further used for the first blockchain node to generate the first public key and broadcast the first public key to all blockchain nodes; the second blockchain node to generate the second public key and broadcast the second public key to all blockchain nodes.

[0064] The sending module 30 is further used for the first blockchain node to encrypt the data content to be sent to the second blockchain node according to the first public key and the channel random code, and send the encrypted data content to the second blockchain node through the communication channel.

[0065] The sending module 30 is further used for the second blockchain node to encrypt the data content to be sent to the first blockchain node according to the second public key and the channel random code, and send the encrypted data content to the first blockchain node through the communication channel.

[0066] The sending module 30 is specifically configured to determine the valid time of the communication random coding, where the valid time is determined according to the first blockchain node and the hardware occupation resources and / or network bandwidth of the first blockchain node; and send the channel random coding and the corresponding valid time to the first blockchain node and the second blockchain node.

[0067] The generating module 50 is further configured to, after the valid time of the channel random coding arrives, regenerate the channel random coding for the communication channel between the first blockchain node and the second blockchain node, and re-determine the valid time according to the first blockchain node and the hardware occupation resources and / or network bandwidth of the first blockchain node;

[0068] The sending module 30 is further configured to send the regenerated channel random coding and the corresponding valid time to the first blockchain node and the second blockchain node.

[0069] Further, the apparatus further includes:

[0070] The deleting module 70 is configured to, when receiving the revocation communication connection information sent by the first blockchain node and / or the second blockchain node, or when the first blockchain node and the second blockchain node do not perform data transmission within a preset time; delete the communication channel between the first blockchain node and the second blockchain node;

[0071] The deleting module 70 is configured to delete the corresponding relationship between the first blockchain node and the second blockchain node that can communicate, and the corresponding channel random coding from the node communication table.

[0072] For the specific limitations of the communication device based on the blockchain system, reference can be made to the limitations of the communication method based on the blockchain system in the above text, which will not be elaborated here. Each module in the above communication device based on the blockchain system can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.

[0073] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as Figure 4As shown in the figure. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a communication method based on a blockchain system.

[0074] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:

[0075] Receive a communication connection request sent by a first blockchain node, where the communication connection request contains a second blockchain node that needs to communicate with the first blockchain node;

[0076] Detect whether there is a communication channel between the first blockchain node and the second blockchain node in the node communication table. The node communication table stores the communication channels of multiple blockchain nodes that can communicate with each other, as well as the corresponding channel random codes;

[0077] If not, send a prompt message to the second blockchain node asking whether it agrees to establish a communication connection with the first blockchain node;

[0078] If the information indicating that the second blockchain node agrees to establish a communication connection with the first blockchain node is received, establish a communication channel for the first blockchain node and the second blockchain node;

[0079] Generate a channel random code for the communication channel between the first blockchain node and the second blockchain node; and store the corresponding relationship between the first blockchain node and the second blockchain node that can communicate with each other, as well as the corresponding channel random code, in the node communication table;

[0080] Send the channel random code to the first blockchain node and the second blockchain node; so that the first blockchain node and the second blockchain node encrypt the transmitted data according to the channel random code and their respective first public key and second public key.

[0081] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, the following steps are implemented:

[0082] Receive a communication connection request sent by a first blockchain node, where the communication connection request includes a second blockchain node that needs to communicate with the first blockchain node;

[0083] Detect whether there is a communication channel between the first blockchain node and the second blockchain node in the node communication table. The node communication table stores communication channels of multiple blockchain nodes that can communicate with each other, as well as corresponding channel random codes;

[0084] If not, send a prompt message to the second blockchain node asking whether it agrees to establish a communication connection with the first blockchain node;

[0085] If receiving the information sent by the second blockchain node agreeing to establish a communication connection with the first blockchain node, establish a communication channel for the first blockchain node and the second blockchain node;

[0086] Generate a channel random code for the communication channel between the first blockchain node and the second blockchain node; and store the corresponding relationship between the first blockchain node and the second blockchain node that can communicate with each other, as well as the corresponding channel random code, in the node communication table;

[0087] Send the channel random code to the first blockchain node and the second blockchain node; so that the first blockchain node and the second blockchain node encrypt the transmitted data according to the channel random code and their respectively corresponding first public key and second public key.

[0088] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0089] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0090] The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A communication method based on a blockchain system, characterized in that, The blockchain system includes a communication security management node, a first blockchain node, and a second blockchain node. The method is applied to the communication security management node in the blockchain system, and the method includes: Receiving a communication connection request sent by the first blockchain node, where the communication connection request includes the second blockchain node that needs to communicate with the first blockchain node; Detecting whether there is a communication channel between the first blockchain node and the second blockchain node in the node communication table. The node communication table stores the communication channels of multiple blockchain nodes that can communicate, as well as the corresponding channel random codes; If not, sending a prompt message to the second blockchain node asking whether it agrees to establish a communication connection with the first blockchain node; If receiving the information sent by the second blockchain node agreeing to establish a communication connection with the first blockchain node, establishing a communication channel for the first blockchain node and the second blockchain node; Generating a channel random code for the communication channel between the first blockchain node and the second blockchain node; and storing the corresponding relationship between the first blockchain node and the second blockchain node that can communicate, as well as the corresponding channel random code in the node communication table; Sending the channel random code to the first blockchain node and the second blockchain node; the first blockchain node encrypts the data to be transmitted to the second blockchain node according to the channel random code and the first public key, and the second blockchain node encrypts the data to be transmitted to the first blockchain node according to the channel random code and the second public key.

2. The communication method based on the blockchain system according to claim 1, characterized in that Before the first blockchain node and the second blockchain node encrypt the transmitted data according to the channel random code and their respective first public key and second public key, the method further includes: The first blockchain node generates the first public key and broadcasts the first public key to all blockchain nodes; the second blockchain node generates the second public key and broadcasts the second public key to all blockchain nodes; The first blockchain node and the second blockchain node encrypt the transmitted data according to the channel random code and their respective first public key and second public key, including: The first blockchain node encrypts the data content to be sent to the second blockchain node according to the first public key and the channel random code, and sends the encrypted data content to the second blockchain node through the communication channel; The second blockchain node encrypts the data content to be sent to the first blockchain node according to the second public key and the channel random code, and sends the encrypted data content to the first blockchain node through the communication channel.

3. The communication method based on the blockchain system according to claim 2, wherein Sending the channel random code to the first blockchain node and the second blockchain node includes: Determining the valid time of the communication random code, where the valid time is determined according to the hardware occupancy resources and / or network bandwidth of the first blockchain node and the first blockchain node; Send the random encoding of the channel and the corresponding valid time to the first blockchain node and the second blockchain node.

4. The communication method based on the blockchain system according to claim 3, wherein After sending the random encoding of the channel and the corresponding valid time to the first blockchain node and the second blockchain node, the method further includes: After the valid time of the random encoding of the channel arrives, regenerate the random encoding of the communication channel between the first blockchain node and the second blockchain node, and re-determine the valid time according to the hardware occupancy resources and / or network bandwidth of the first blockchain node and the first blockchain node; Send the regenerated random encoding of the channel and the corresponding valid time to the first blockchain node and the second blockchain node.

5. The communication method based on the blockchain system according to any one of claims 1-4, characterized in that, The method further includes: When receiving the revocation communication connection information sent by the first blockchain node and / or the second blockchain node, or when the first blockchain node and the second blockchain node do not perform data transmission within a preset time; delete the communication channel between the first blockchain node and the second blockchain node; And delete the corresponding relationship between the first blockchain node and the second blockchain node that can communicate, and the corresponding random encoding of the channel from the node communication table.

6. A communication device based on a blockchain system, characterized in that, The blockchain system includes a communication security management node, a first blockchain node, and a second blockchain node. The device is applied to the communication security management node in the blockchain system. The device includes: A receiving module, configured to receive a communication connection request sent by the first blockchain node, where the communication connection request includes a second blockchain node that needs to communicate with the first blockchain node; A detection module, configured to detect whether there is a communication channel between the first blockchain node and the second blockchain node in the node communication table. The node communication table stores the communication channels of multiple blockchain nodes that can communicate, and the corresponding random encoding of the channel; A sending module, configured to, if there is no communication channel between the first blockchain node and the second blockchain node, send a prompt message indicating whether to agree to establish a communication connection with the first blockchain node to the second blockchain node; A establishing module, configured to, if receiving the information sent by the second blockchain node agreeing to establish a communication connection with the first blockchain node, establish a communication channel between the first blockchain node and the second blockchain node; A generating module, configured to generate a random encoding of the communication channel between the first blockchain node and the second blockchain node; A storing module, configured to store the corresponding relationship between the first blockchain node and the second blockchain node that can communicate, and the corresponding random encoding of the channel into the node communication table; The sending module is further configured to send the random encoding of the channel to the first blockchain node and the second blockchain node; the first blockchain node encrypts the data to be transmitted to the second blockchain node according to the random encoding of the channel and the first public key, and the second blockchain node encrypts the data to be transmitted to the first blockchain node according to the random encoding of the channel and the second public key.

7. The communication device based on the blockchain system according to claim 6, characterized in that, The generating module is further configured to generate, by the first blockchain node, the first public key and broadcast the first public key to all blockchain nodes; generate, by the second blockchain node, the second public key and broadcast the second public key to all blockchain nodes; The sending module is further configured to encrypt, by the first blockchain node, the data content to be sent to the second blockchain node according to the first public key and the channel random code, and send the encrypted data content to the second blockchain node through the communication channel; The sending module is further configured to encrypt, by the second blockchain node, the data content to be sent to the first blockchain node according to the second public key and the channel random code, and send the encrypted data content to the first blockchain node through the communication channel.

8. The communication device based on the blockchain system according to claim 7, characterized in that, The sending module is specifically configured to determine the valid time of the communication random code, where the valid time is determined according to the hardware occupation resources and / or network bandwidth of the first blockchain node and the first blockchain node; send the channel random code and the corresponding valid time to the first blockchain node and the second blockchain node.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, the communication method based on the blockchain system according to any one of claims 1 to 5 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, the communication method based on the blockchain system according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Communication method and device among block chain nodes

    CN107566337A

  • Encryption communication method and system for blockchain node

    CN108768630A