Blockchain-based multicast method and device
By independently generating multicast keys in the blockchain network and transmitting them through the relay network, the security and flexibility of centralized key management are solved, and the decentralized management and high security of multicast keys are realized. transmission.
Patent Information
- Application Number
- CN202111539580.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-15
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2041-12-15
AI Technical Summary
In the existing blockchain technology, multicast key management relies on a centralized key management center, which has the risk of key leakage and lacks flexibility, making it difficult to achieve personalized customization and decentralized management of multicast keys.
In the blockchain network, nodes in the multicast group that serve as multicast data source independently generate multicast keys and encrypt the data transmission through the accessed blockchain relay communication network to avoid the third-party key management center Intervene to realize decentralized management and personalized customization of multicast keys.
It improves the security of multicast keys, avoids the risk of key leakage, and realizes personalized customization and decentralized management of multicast keys, improving the security and flexibility of data transmission.
Smart Images

Figure CN114285555B_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of this specification relate to the field of blockchain technology, and more particularly, to a blockchain-based multicast method and device. Background Art
[0002] Blockchain technology (also known as distributed ledger technology) is a decentralized distributed database technology with many characteristics such as decentralization, openness, transparency, immutability, and trustworthiness. It is suitable for many application scenarios with high demands for data reliability. Summary of the invention
[0003] This specification proposes a blockchain-based multicast method, wherein at least some blockchain nodes in a blockchain network join a multicast group; the method is applied to a first blockchain node in the multicast group as a multicast data source, and the method includes:
[0004] Generate a multicast key locally based on a key generation algorithm negotiated by each blockchain node in the multicast group;
[0005] Encrypting the multicast data to be sent to each blockchain node in the multicast group based on the multicast key;
[0006] Through the connected blockchain relay communication network, the encrypted multicast data is sent to other blockchain nodes in the multicast group in a multicast manner, so that the other blockchain nodes decrypt the multicast data based on the decryption key corresponding to the multicast key obtained from the first blockchain node.
[0007] This specification also proposes a blockchain-based multicast method, where at least some blockchain nodes in a blockchain network join a multicast group; the method is applied to a second blockchain node in the multicast group that is a multicast data receiver, and the method includes:
[0008] Obtain the first blockchain node in the multicast group as the multicast data source, and send the multicast data encrypted based on the multicast key in a multicast manner through the blockchain relay communication network to which it is connected; wherein the multicast key is a multicast key generated locally by the first blockchain node based on the key generation algorithm negotiated by each blockchain node in the multicast group;
[0009] The multicast data is decrypted based on a decryption key corresponding to the multicast key obtained from the first blockchain node.
[0010] This specification also proposes a blockchain-based multicast device, wherein at least some blockchain nodes in a blockchain network join a multicast group; the method is applied to a first blockchain node in the multicast group as a multicast data source, and the device includes:
[0011] A generation module, which generates a multicast key locally based on a key generation algorithm negotiated by each blockchain node in the multicast group;
[0012] An encryption module, encrypting multicast data to be sent to each blockchain node in the multicast group based on the multicast key;
[0013] The sending module sends the encrypted multicast data to other blockchain nodes in the multicast group in a multicast manner through the connected blockchain relay communication network, so that the other blockchain nodes decrypt the multicast data based on the decryption key corresponding to the multicast key obtained from the first blockchain node.
[0014] This specification also proposes a blockchain-based multicast device, wherein at least some blockchain nodes in a blockchain network join a multicast group; the method is applied to a second blockchain node in the multicast group as a multicast data receiver, and the device includes:
[0015] An acquisition module is provided for acquiring the multicast data encrypted based on the multicast key sent by the first blockchain node as the multicast data source in the multicast group through the blockchain relay communication network to which it is connected in a multicast manner; wherein the multicast key is a multicast key generated locally by the first blockchain node based on the key generation algorithm negotiated by each blockchain node in the multicast group;
[0016] A decryption module decrypts the multicast data based on a decryption key corresponding to the multicast key obtained from the first blockchain node.
[0017] In the above technical scheme, since the blockchain node serving as the multicast data source in the multicast group sends encrypted multicast data to other blockchain nodes in the multicast group in a multicast manner through the connected blockchain relay communication network, the multicast key used to encrypt the multicast data is a key generated locally by the multicast data source based on a key generation algorithm negotiated with other blockchain nodes in the multicast group. Therefore, the risk of key leakage faced by maintaining and distributing multicast keys through a third-party key management center can be avoided, thereby improving the security of using multicast keys.
[0018] Moreover, since each blockchain node in the multicast group can serve as the role of multicast data source; therefore, the blockchain node serving as the multicast data source in the multicast group can autonomously generate multicast keys locally, which can achieve personalized customization and decentralized management of multicast keys. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is a schematic diagram of the interaction between a blockchain node and a blockchain relay communication network provided by an exemplary embodiment.
[0020] Figure 2 This is another schematic diagram of the interaction between a blockchain node and a blockchain relay communication network provided by an exemplary embodiment.
[0021] Figure 3 The present invention is a schematic diagram of encrypting multicast data provided by an exemplary embodiment.
[0022] Figure 4 It is a flowchart of a blockchain-based multicast method provided by an exemplary embodiment.
[0023] Figure 5 It is a flowchart of another blockchain-based multicast method provided by an exemplary embodiment.
[0024] Figure 6 It is a schematic structural diagram of an electronic device provided by an exemplary embodiment.
[0025] Figure 7 It is a block diagram of a blockchain-based multicast device provided by an exemplary embodiment.
[0026] Figure 8 It is a block diagram of another blockchain-based multicast device provided by an exemplary embodiment. DETAILED DESCRIPTION
[0027] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0028] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0029] The blockchain relay communication network is a backbone relay communication network created using relay technology. This backbone relay communication network can improve the stability and real-time performance of data transmission between blockchain nodes in the blockchain network, and achieve high-speed and secure interconnection between blockchain nodes in the blockchain network.
[0030] Among them, in actual applications, the blockchain relay communication network can be specifically applied to various types of blockchain networks, including public chains, private chains, and alliance chains.
[0031] For example, the blockchain relay communication networks used in public chains mainly include Falcon, Fast Bitcoin Relay Network (FBRN), Fast Internet Bitcoin Relay Engine (FIBRE), etc., while the blockchain relay communication networks used in consortium chains mainly include BloXRoute, Blockchain Transmission Network (BTN), etc.
[0032] The blockchain nodes in the blockchain network can establish connections with the relay nodes in the blockchain relay communication network to achieve interconnection, and transmit blockchain data through the dedicated data transmission channels provided by the relay nodes in the blockchain relay communication network.
[0033] See also Figure 1 , Figure 1 This is a schematic diagram of the interaction between a blockchain node and a blockchain relay communication network provided by an exemplary embodiment.
[0034] like Figure 1 As shown, the blockchain relay communication network may include several relay nodes such as relay node 11, relay node 12, relay node 13 and relay node 14. The blockchain node in the blockchain network may establish a connection with the relay node in the blockchain relay communication network through the communication protocol supported by the blockchain network, and perform data communication with the relay node based on the connection.
[0035] It should be noted that the relay node in the blockchain relay communication network can be a physical device or a logical device. For example, in one example, the blockchain relay communication network can be a backbone communication network built on a cloud processing platform, and in this case, the relay node can be a virtual device created by virtualizing the cloud processing resources on the cloud processing platform.
[0036] In actual applications, the blockchain node can be connected to a relay node in the blockchain relay communication network through a gateway, and communicate with the relay node through the gateway.
[0037] by Figure 1 Taking the relay node 11 shown as an example, the relay node 11 can be connected to the blockchain node 21 in the blockchain network through the gateway 101. Similarly, Figure 1 The other relay nodes shown can also be connected to other blockchain nodes in the blockchain network.
[0038] The gateway 101 is specifically used to assist the node blockchain 21 in accessing the blockchain relay communication network. The gateway 101 is logically equivalent to a blockchain node in the blockchain network, but the gateway 101 itself does not participate in the blockchain consensus, nor does it affect the consensus process in the blockchain network.
[0039] In actual applications, the gateway 101 can essentially be an adapter for a blockchain node 21 to access a blockchain relay communication network. The adapter can be deployed on the blockchain node 21 or on the relay node 11. Of course, it can also be deployed in another device independent of the relay node 11 and the blockchain node 21. This specification does not limit this.
[0040] In a blockchain network, there may be several blockchain nodes, and the blockchain nodes need to implement communication operations such as consensus, transaction transmission, block synchronization, etc. In related technologies, each blockchain node directly uses P2P (Peer to Peer) technology to communicate with each other to transmit transaction data, block data, consensus data, etc. However, due to various network factors, the communication delay is high and the stability is poor, which cannot meet the application requirements.
[0041] Therefore, similar to the above-mentioned blockchain node 21, each blockchain node can be connected to the relay node in the blockchain relay communication network respectively, so that the blockchain nodes can use the dedicated data transmission channel provided by the blockchain relay communication network to transmit transaction data, block data, consensus data, etc.
[0042] Since the blockchain relay communication network is a backbone relay communication network that provides real-time transmission for each blockchain node in the blockchain network, each relay node can provide a dedicated data transmission channel with high QoS guarantee and high-quality bandwidth. Therefore, the blockchain relay communication network takes over the intermediate link of communication between blockchain nodes, which can reduce communication delay and improve stability, thereby significantly improving the communication quality between blockchain nodes.
[0043] In some scenarios, node devices in a blockchain network may need to adopt a one-to-many communication mode such as multicast. In this communication mode, at least some of the node devices in the blockchain network can form a multicast group in advance. The node devices in the multicast group that serve as the multicast data source can send the multicast data to each node device in the multicast group in a multicast manner.
[0044] Moreover, in order to ensure the data privacy and security of multicast data, the blockchain node as the multicast data source usually needs to encrypt the multicast data before sending the encrypted multicast data to each node device in the multicast group in a multicast manner.
[0045] See also Figure 2 , Figure 2 This is another schematic diagram of the interaction between a blockchain node and a blockchain relay communication network provided by an exemplary embodiment.
[0046] like Figure 2 As shown, the blockchain relay communication network may include relay nodes 11, 12, 13, and several other relay nodes. Blockchain node 21 may be connected to a gateway ( Figure 2 The blockchain node 22 is connected to the relay node 11 in the blockchain relay communication network (not shown). Correspondingly, the blockchain node 22 can also be connected to the relay node 12 in the blockchain relay communication network through a gateway. And the blockchain node 23 can also be connected to the relay node 13 in the blockchain relay communication network through a gateway.
[0047] Data can be transmitted between blockchain nodes 21, 22 and 23 through a dedicated data transmission channel provided by the blockchain relay communication network. The data transmission channel between relay nodes in the blockchain relay communication network is usually an internal transmission channel provided by the blockchain relay communication network. The internal transmission channel provided by the blockchain relay communication network is usually a dedicated data transmission channel with high QoS guarantee and high-quality bandwidth.
[0048] In practical applications, blockchain node 21, blockchain node 22 and blockchain node 23 can all join the multicast group as multicast members. When blockchain node 21, as a multicast data source, needs to send multicast data to blockchain node 22 and blockchain node 23, the multicast data can be encrypted based on the multicast key, and the encrypted multicast data can be sent to the relay node 11 connected thereto, and the relay node 11 performs multicast replication processing on the multicast data in the blockchain relay communication network to obtain a first data copy corresponding to blockchain node 22 and a second data copy corresponding to blockchain node 22; then, the first data copy is sent to relay node 12, which is then sent to blockchain node 22, and the second data copy is sent to relay node 13, which is then sent to blockchain node 23.
[0049] In practical applications, the multicast keys used by blockchain nodes as multicast data sources to encrypt multicast data are usually generated and distributed by a centralized key management center.
[0050] See also Figure 3 , Figure 3 This is a schematic diagram of encrypting multicast data shown in this specification.
[0051] like Figure 3 As shown, for a blockchain node that needs to join a multicast group in a blockchain network, it can first apply for a digital certificate from a CA organization. After the CA organization passes the identity authentication of the blockchain node, it can issue a digital certificate for the blockchain node. The digital certificate can include a public-private key pair generated by the CA organization for the blockchain node. The blockchain node can store and maintain the digital certificate locally.
[0052] After applying for a digital certificate from the CA, the blockchain node that needs to join the multicast group can establish a secure connection with the key management center and submit the digital certificate issued by the CA to the key management center. The blockchain node can submit the digital certificate to the key management center during the process of establishing the above-mentioned secure connection with the key management center, or it can submit the digital certificate to the key management center based on the established secure connection after the above-mentioned secure connection is established, which is not particularly limited in this specification.
[0053] For example, in one example, the secure connection may be an SSL connection. The blockchain node may perform an SSL handshake with the key management center to establish an SSL connection, and may carry the local digital certificate in the handshake message and upload it to the key management center.
[0054] After receiving the digital certificate submitted by the blockchain node, the key management center can also authenticate the legitimacy of the digital certificate to determine whether the digital certificate is a legal digital certificate issued by the CA. For example, the digital certificate itself can carry the digital signature submitted by the CA based on its own private key for the digital certificate, and the key management center can authenticate the digital signature of the digital certificate based on the public key of the CA; if the digital signature authentication is successful, it can indicate that the digital certificate is a legal digital certificate issued by the CA to the blockchain node.
[0055] In practical applications, each blockchain node in the above multicast group can serve as a multicast data source to send multicast data to other blockchain nodes in the multicast group. Figure 2 Nodes 1 to 4 in the multicast group shown can all serve as multicast data sources.
[0056] The blockchain node as the source of the multicast data can request the multicast key used to encrypt the multicast data from the key management center through the above-mentioned secure connection. Among them, the multicast key is usually a symmetric encryption key. After receiving the request of the blockchain node through the above-mentioned secure connection, the key management center can generate a multicast key for the blockchain node, and then encrypt the multicast key based on the public key in the digital certificate of the blockchain node, and send the encrypted multicast key to the blockchain node through the above-mentioned secure connection. After receiving the encrypted multicast key, the blockchain node can decrypt the multicast key based on the private key in the above-mentioned digital certificate to obtain the plaintext content of the multicast key.
[0057] Correspondingly, in addition to distributing the multicast key to the blockchain node, the key management center can also distribute the multicast key to other blockchain nodes in the multicast group in the same manner, and the specific process will not be repeated here.
[0058] When a blockchain node that serves as a multicast data source sends multicast data to other blockchain node devices in the multicast group, it can use the multicast key to encrypt the multicast data, and then send the encrypted multicast data to other blockchain nodes through multicast. After receiving the encrypted multicast data, other blockchain nodes can decrypt the multicast data based on the multicast key distributed by the key management center to obtain the plaintext content of the multicast data.
[0059] In the above technical solutions, a centralized key management center is used to generate and distribute keys, which is actually still a centralized key management method. However, the centralized key management method is not flexible enough for the generation and distribution of multicast keys, and the generated multicast keys are also at risk of being leaked.
[0060] In view of this, the present specification discloses a technical solution in which a blockchain node serving as a multicast data source in a multicast group autonomously generates a multicast key, and uses the connected blockchain relay communication network to send multicast data encrypted based on the autonomously generated multicast key in a multicast manner.
[0061] In implementation, each blockchain node in the multicast group can pre-negotiate a key generation algorithm for generating a multicast key. When the first blockchain node in the multicast group, which is the source of the multicast data, needs to send multicast data to other blockchain nodes in the multicast group, it can generate a multicast key locally and autonomously based on the negotiated key generation algorithm, and then encrypt the multicast data to be sent to each blockchain node in the multicast group based on the multicast key; then, the encrypted multicast data is sent to other blockchain nodes in the multicast group in a multicast manner through the connected blockchain relay communication network, so that other blockchain nodes can decrypt the multicast data based on the decryption key corresponding to the multicast key obtained from the first blockchain node.
[0062] In the above technical scheme, since the blockchain node serving as the multicast data source in the multicast group sends encrypted multicast data to other blockchain nodes in the multicast group in a multicast manner through the connected blockchain relay communication network, the multicast key used to encrypt the multicast data is a key generated locally by the multicast data source based on a key generation algorithm negotiated with other blockchain nodes in the multicast group. Therefore, the risk of key leakage faced by maintaining and distributing multicast keys through a third-party key management center can be avoided, thereby improving the security of using multicast keys.
[0063] Moreover, since each blockchain node in the multicast group can serve as the role of multicast data source; therefore, the blockchain node serving as the multicast data source in the multicast group can autonomously generate multicast keys locally, which can achieve personalized customization and decentralized management of multicast keys.
[0064] Figure 4 is a flowchart of a blockchain-based multicast method provided by an exemplary embodiment. In which, at least some blockchain nodes in the blockchain network join the multicast group; the method is applied to the first blockchain node (equivalent to the first blockchain node) in the multicast group as the multicast data source. Figure 2 The method includes the following steps:
[0065] Step 402, generating a multicast key locally based on a key generation algorithm negotiated by each blockchain node in the multicast group;
[0066] The multicast group may refer to a multicast group consisting of multiple multicast members created by at least some blockchain nodes in the blockchain network based on a supported multicast protocol. The multicast protocol supported by each blockchain node is not specifically limited in this specification. For example, in actual applications, the multicast protocol may be an application layer multicast protocol, and the multicast group may also be an application layer multicast.
[0067] The blockchain nodes that join the multicast group can negotiate the key generation algorithm for generating the multicast key by transmitting negotiation requests or messages to each other through the connected blockchain relay communication network based on the supported negotiation mechanism (for example, the negotiation protocol or negotiation algorithm supported by each blockchain node).
[0068] Among them, the negotiation mechanism supported by each blockchain node and the specific negotiation process corresponding to the negotiation mechanism are not specifically limited in this specification.
[0069] In actual applications, each blockchain node is usually interconnected through a blockchain relay communication network. Each blockchain node and the relay node in the blockchain relay communication network usually need to establish a data connection for data transmission based on the supported communication protocol. Most communication protocols themselves have a certain negotiation mechanism. Therefore, in some examples, each blockchain node can use the negotiation mechanism of the communication protocol it supports to negotiate the key generation algorithm with other blockchain nodes.
[0070] For example, the communication protocol supported by each blockchain node and the relay node in the blockchain relay communication network may be the SSL protocol, and the SSL protocol itself is a protocol with a negotiation mechanism for securely exchanging information between the two parties establishing a connection. During the handshake phase of the SSL protocol, the two parties establishing a connection can securely negotiate encryption algorithms, exchange encryption keys, and so on. Therefore, each blockchain node can use the negotiation mechanism of the supported SSL protocol itself to negotiate the key generation algorithm during the handshake phase of the SSL protocol.
[0071] Of course, the negotiation mechanism supported by each blockchain node in the multicast group can be, in addition to the negotiation mechanism of the communication protocol it supports, a negotiation protocol or negotiation algorithm independent of the communication protocol in actual applications, which is not specifically limited in this specification.
[0072] In one embodiment shown, in order to ensure that the negotiated key generation algorithm can be updated regularly, each blockchain node in the multicast group can periodically negotiate the key generation algorithm based on a preset negotiation period. In this way, for each blockchain node in the multicast group, it can periodically renegotiate the key generation algorithm with other blockchain nodes in the multicast group based on the negotiation period to update the key generation algorithm negotiated in the previous negotiation period.
[0073] In one embodiment shown, in order to implement version management for the negotiated key generation algorithm, each blockchain node in the multicast group can also set an independent version number for each negotiation cycle, so that the multicast key generated by the key generation algorithm negotiated based on different negotiation cycles can correspond to different version numbers.
[0074] The specific method of setting the version number for different negotiation periods is not specifically limited in this specification. For example, in one example, the version number generated for each negotiation period may specifically correspond to the timestamp range of each negotiation period. For example, the timestamp of each negotiation period is directly used as a parameter to generate a unique version number for each negotiation period.
[0075] In this specification, when the first blockchain node in the multicast group, which serves as the source of multicast data, needs to send multicast data to other blockchain nodes in the multicast group, it can generate a multicast key locally and autonomously based on the above-mentioned key generation algorithm negotiated, and distribute the decryption key corresponding to the generated multicast key to other blockchain nodes in the multicast group.
[0076] Among them, the key generation algorithm can be a symmetric key generation algorithm or an asymmetric key generation algorithm. Correspondingly, the multicast key can be a symmetric key generated based on a symmetric key generation algorithm or a private key in a public-private key pair generated based on an asymmetric key generation algorithm. It is not difficult to understand that when the multicast key is a symmetric key generated based on a symmetric key generation algorithm, the decryption key is also the symmetric key; conversely, when the multicast key is a private key in a public-private key pair generated based on an asymmetric key generation algorithm, the decryption key can be a public key in the public-private key pair.
[0077] In one embodiment shown, if the multicast key is a symmetric key, the key generation algorithm negotiated by each blockchain node in the multicast group may specifically include a symmetric key generation algorithm and an asymmetric key generation algorithm. The symmetric key generation algorithm is specifically used to generate a symmetric key as a multicast key. The asymmetric key generation algorithm is specifically used to generate a public-private key pair for encrypting and decrypting the symmetric key as a multicast key. Each blockchain node in the multicast group can generate a symmetric key as a multicast key locally based on the negotiated symmetric key generation algorithm, and generate a public-private key pair for encrypting and decrypting the symmetric key as a multicast key locally based on the negotiated asymmetric key generation algorithm.
[0078] In this case, the first blockchain node in the multicast group, which is the source of the multicast data, can also obtain the public key of the public-private key pair generated locally by other blockchain nodes in the multicast group based on the asymmetric key generation algorithm after it has autonomously generated the symmetric key as the multicast key locally. For example, in one example, the first blockchain node can send a public key acquisition request to other blockchain nodes in the multicast group through the blockchain relay communication network to which it is connected, and after receiving the public key acquisition request, the other blockchain nodes can also send the public key of the public-private key pair generated locally to the first blockchain node through the blockchain relay communication network to which they are connected.
[0079] When the first blockchain node obtains the public keys generated locally by other blockchain nodes in the multicast group, it can also encrypt the symmetric key generated locally as the multicast key based on the obtained public key, and then send the encrypted symmetric key as the multicast key to other blockchain nodes through the connected blockchain relay communication network to complete the autonomous distribution of the multicast key. After receiving the encrypted symmetric key as the multicast key sent by the first blockchain node, the other blockchain nodes can decrypt the symmetric key as the multicast key based on the private key in the public-private key pair generated locally, obtain the plaintext content of the symmetric key, and then decrypt the multicast data encrypted by the symmetric key sent by the first blockchain node based on the symmetric key.
[0080] In one embodiment shown, in order to ensure that the negotiated key generation algorithm can be updated regularly, each blockchain node in the multicast group can periodically negotiate the key generation algorithm based on a preset negotiation period. In this way, for each blockchain node in the multicast group, it can periodically renegotiate the key generation algorithm with other blockchain nodes in the multicast group based on the negotiation period to update the key generation algorithm negotiated in the previous negotiation period.
[0081] Step 404, encrypting the multicast data to be sent to each blockchain node in the multicast group based on the multicast key;
[0082] After distributing the locally generated multicast key to other blockchain nodes in the multicast group, the first blockchain node may encrypt the multicast data to be sent based on the locally generated multicast key. For example, when the multicast key is a symmetric key generated autonomously by the first blockchain node, the multicast data may be directly encrypted based on the symmetric key.
[0083] It should be noted that the multicast data may include any form of data that needs to be sent in a multicast form, which is not particularly limited in this specification.
[0084] In one embodiment shown, the multicast data may specifically include one of the following two types of data, or a combination of the two:
[0085] The first one is the blockchain data sent by the first blockchain node to each blockchain node in the multicast group.
[0086] It should be noted that since the blockchain relay communication network may only be used to transmit some blockchain data with high requirements for real-time and transmission quality, blockchain data with low requirements for real-time and transmission quality are usually not transmitted through the above-mentioned blockchain relay communication network; therefore, the blockchain data sent by the above-mentioned first blockchain node to each blockchain node in the multicast group may specifically include blockchain data with relatively high requirements for real-time and transmission quality.
[0087] For example, in one example, the above blockchain data may specifically include three categories: block data, transaction data, and consensus data. Among them, transaction data generally refers to transactions initiated by blockchain clients that need to be transmitted between node devices in the blockchain network and processed by consensus by blockchain nodes in the blockchain network. Consensus data generally refers to consensus-related data exchanged between blockchain nodes in the process of consensus processing of transactions by blockchain nodes in the blockchain network; for example, the above consensus data may include the results of consensus verification of transactions during the consensus process, the consensus results of transactions by each blockchain node, and consensus messages related to consensus exchanged between each blockchain node, etc. The above block data is usually persistently stored in the blockchain ledger jointly maintained by blockchain nodes for data synchronization between blockchain nodes. For example, when a new blockchain node is added to the blockchain network, the newly added blockchain node needs to synchronize the latest block data from the blockchain node that has already joined the blockchain network.
[0088] The second type is that the application installed on the first blockchain node sends an application layer message to the application installed on each blockchain node in the multicast group.
[0089] Among them, the specific message type of the above-mentioned application layer message, in actual application, depends on the specific service function provided to users by the application installed on the above-mentioned first blockchain node, and is not specifically limited in this specification.
[0090] Step 406, sending the encrypted multicast data to other blockchain nodes in the multicast group in a multicast manner through the connected blockchain relay communication network, so that the other blockchain nodes decrypt the multicast data based on the decryption key corresponding to the multicast key obtained from the first blockchain node.
[0091] After the first blockchain node completes encrypting the multicast data based on the multicast key generated locally, the encrypted multicast data can be sent to other blockchain nodes in the multicast group in a multicast manner through the connected blockchain relay communication network.
[0092] In one embodiment shown, after the above-mentioned first blockchain node distributes the locally generated multicast key to other blockchain nodes in the multicast group in the manner as described above, the above-mentioned other blockchain nodes can also return a reception confirmation result for the multicast key to the first blockchain node through the connected blockchain relay communication network.
[0093] In this case, after the first blockchain node completes encrypting the multicast data based on the multicast key generated locally, it can determine whether it has received the reception confirmation results returned by other blockchain nodes; if it is determined that the reception confirmation results returned by other blockchain nodes have been received, the encrypted multicast data will be sent to other blockchain nodes in the multicast group in a multicast manner through the connected blockchain relay communication network.
[0094] In this way, after the first blockchain node determines that other blockchain nodes in the multicast group have received the distributed decryption key, it will send the encrypted multicast data to other blockchain nodes respectively, thereby avoiding the situation where other blockchain nodes are unable to decrypt the received multicast data due to the lack of decryption keys.
[0095] Of course, if the above-mentioned first blockchain node determines that it has only received the above-mentioned reception confirmation result returned by some of the other blockchain nodes, it can redistribute the decryption key corresponding to the above-mentioned multicast key generated locally to the above-mentioned some blockchain nodes, and the specific distribution process will not be repeated.
[0096] In one embodiment shown, when the above-mentioned first blockchain node sends the encrypted multicast data to other blockchain nodes in the multicast group in a multicast manner through the connected blockchain relay communication network, it can also send the encrypted multicast data and the version number corresponding to the multicast key used for encryption in a multicast manner to other blockchain nodes in the multicast group.
[0097] In this case, when other blockchain nodes receive the encrypted multicast data, they can look up the decryption key of the corresponding version based on the version number, and then decrypt the multicast data based on the decryption key corresponding to the version number.
[0098] In this way, each blockchain node can perform accurate version management on the multicast key based on the version number.
[0099] In one embodiment shown, the relay node in the blockchain relay communication network can maintain the multicast member list corresponding to the multicast group locally. When the first blockchain node sends the encrypted multicast data to each blockchain node in the multicast group in a multicast manner through the blockchain relay communication network to which it is connected, the encrypted multicast data can be first sent to the first relay node connected to the first blockchain node in the blockchain relay communication network.
[0100] After receiving the encrypted multicast data, the first relay node can perform multicast replication processing on the encrypted multicast data based on the supported multicast protocol and the locally maintained multicast member list to obtain data copies of the encrypted multicast data corresponding to each blockchain node in the multicast member list (which may include the first blockchain node or may not include the first blockchain node). Then, each obtained data copy can be distributed to the second relay nodes connected to each blockchain node in the multicast member list in the relay communication network, and then these second relay nodes continue to send data copies of the encrypted multicast data to each blockchain node connected to it in the multicast member list.
[0101] It should be noted that the specific type of multicast protocol supported by the relay nodes in the above-mentioned blockchain relay communication network is not specifically limited in this specification.
[0102] In one embodiment shown, the multicast protocol supported by the relay node in the above blockchain relay communication network can be an application layer multicast protocol. Based on the application layer multicast protocol, the multicast replication processing of multicast data can be completed at the application level, while the traditional multicast replication processing is usually completed on the routing forwarding device. Therefore, in this way, the relay node can perform multicast replication processing on the multicast data at the application layer to obtain a data copy, thereby improving the processing efficiency of the multicast replication processing.
[0103] Moreover, since it is based on the application layer multicast protocol, it is no longer necessary to multicast the multicast data on the routing and forwarding devices, so that the routing and forwarding devices do not need to be deployed in the above-mentioned blockchain relay communication network, thereby significantly reducing the hardware deployment cost of the above-mentioned blockchain relay communication network.
[0104] For example, in one example, the blockchain relay communication network can be a backbone communication network built on a cloud processing platform, and the relay nodes can be virtual devices created by virtualizing cloud processing resources on the cloud processing platform. In this case, if the relay nodes support the application layer multicast protocol, routing and forwarding devices can no longer be deployed in the blockchain relay communication network. In this case, the blockchain relay communication network itself can be a pure virtual network that does not require any additional physical devices as support except for the cloud processing platform, thereby significantly reducing the hardware deployment cost.
[0105] Figure 5is a flowchart of a blockchain-based multicast method provided by an exemplary embodiment. In which, at least some blockchain nodes in the blockchain network join the multicast group; the method is applied to the second blockchain node (equivalent to the second blockchain node) in the multicast group as the multicast data receiver. Figure 2 The method includes the following steps:
[0106] Step 502, obtaining the first blockchain node as the multicast data source in the multicast group, and sending the multicast data encrypted based on the multicast key in a multicast manner through the blockchain relay communication network to which it is connected; wherein the multicast key is a multicast key generated locally by the first blockchain node based on the key generation algorithm negotiated by each blockchain node in the multicast group;
[0107] Step 504: decrypt the multicast data based on the decryption key corresponding to the multicast key obtained from the first blockchain node.
[0108] The specific implementation details of the above steps 502 and 504 are the same as those of the above steps. Figure 3 The implementation details shown in the related embodiments are similar and will not be described in detail in this embodiment. Figure 4 When the technical solution shown is put into practice, you can refer to Figure 4 Related embodiments.
[0109] Corresponding to the above method embodiment, this specification also provides an embodiment of a message transmission device.
[0110] Figure 6 is a schematic structural diagram of an electronic device provided by an exemplary embodiment. Figure 6 At the hardware level, the electronic device includes a processor 602, an internal bus 604, a network interface 606, a memory 608, and a non-volatile memory 610, and may also include hardware required for other services. The processor 602 reads the corresponding computer program from the non-volatile memory 610 into the memory 608 and then runs it, forming a blockchain-based multicast device at the logical level. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0111] Please refer to Figure 7 In a software implementation, the blockchain-based multicast device can be applied to a first blockchain node as a multicast data source in a blockchain network; the method may include:
[0112] A generation module 71 generates a multicast key locally based on a key generation algorithm negotiated by each blockchain node in the multicast group;
[0113] An encryption module 72 encrypts the multicast data to be sent to each blockchain node in the multicast group based on the multicast key;
[0114] The sending module 73 sends the encrypted multicast data to other blockchain nodes in the multicast group in a multicast manner through the connected blockchain relay communication network, so that the other blockchain nodes decrypt the multicast data based on the decryption key corresponding to the multicast key obtained from the first blockchain node.
[0115] Optionally, the multicast key includes a symmetric key.
[0116] Optionally, the key generation algorithm includes a symmetric key generation algorithm and an asymmetric key generation algorithm; each blockchain node in the multicast group generates a symmetric key as the multicast key locally based on the negotiated symmetric key generation algorithm, and generates a public-private key pair for encrypting and decrypting the symmetric key locally based on the asymmetric key generation algorithm;
[0117] The sending module 73:
[0118] Before sending the encrypted multicast data to other blockchain nodes in the multicast group in a multicast manner through the connected blockchain relay communication network, obtaining the public key of the public-private key pair generated locally by other blockchain nodes in the multicast group based on the asymmetric key generation algorithm;
[0119] Based on the public key, the symmetric key generated locally as the multicast key based on the symmetric key generation algorithm is encrypted, and the encrypted symmetric key is sent to other blockchain nodes in the multicast group through the connected blockchain relay communication network, so that the other blockchain nodes can decrypt the symmetric key based on the private key in the public-private key pair generated locally, and obtain the plaintext content of the symmetric key.
[0120] Optionally, the sending module 73:
[0121] Receiving a reception confirmation result for the symmetric key returned by other blockchain nodes in the multicast group through the blockchain relay communication network accessed;
[0122] Determine whether a reception confirmation result of the symmetric encryption key is received from other blockchain nodes in the multicast group; if so, further send the encrypted multicast data to other blockchain nodes in the multicast group in a multicast manner through the connected blockchain relay communication network.
[0123] Optionally, the sending module 73:
[0124] Through the connected blockchain relay communication network, the encrypted multicast data and the version number corresponding to the multicast key are sent to other blockchain nodes in the multicast group in a multicast manner, so that the other blockchain nodes decrypt the multicast data based on the decryption key corresponding to the version number obtained from the first blockchain node.
[0125] Optionally, the key generation algorithm is a key generation algorithm periodically negotiated by each blockchain node in the multicast group based on a preset negotiation period.
[0126] Optionally, the multicast key generated by the key generation algorithms negotiated based on different negotiation periods corresponds to different version numbers respectively.
[0127] Optionally, the version number corresponds to a timestamp range in which the negotiation period exists.
[0128] Optionally, a relay node in the blockchain relay communication network locally maintains multicast members corresponding to the multicast group;
[0129] The sending module 73:
[0130] The encrypted multicast data is sent to the first relay node connected to the first blockchain node in the blockchain relay communication network, and the first relay node performs multicast replication processing on the encrypted multicast data based on the supported multicast protocol to obtain a data copy of the encrypted multicast data corresponding to each blockchain node in the multicast member list, and then distributes the obtained data copy of the encrypted multicast data to the second relay node connected to each blockchain node in the multicast member list in the blockchain relay communication network, and the second relay node continues to send the received data copy of the encrypted multicast data to each blockchain node in the multicast member list.
[0131] Optionally, the multicast protocol supported by the relay nodes in the blockchain relay communication network is an application layer multicast protocol; and the multicast replication processing includes multicast replication processing at the application layer.
[0132] Optionally, the multicast data includes:
[0133] The first blockchain node sends blockchain data to each blockchain node in the multicast group; and / or,
[0134] The application installed on the first blockchain node sends an application layer message to the application installed on each blockchain node in the multicast group.
[0135] Please refer to Figure 8 In another software implementation, the blockchain-based multicast device can be used as a second blockchain node in a blockchain network as a multicast data receiver; it may include:
[0136] The acquisition module 81 acquires the multicast data encrypted based on the multicast key and sent in a multicast manner by the first blockchain node as the multicast data source in the multicast group through the blockchain relay communication network to which it is connected; wherein the multicast key is a multicast key generated locally by the first blockchain node based on the key generation algorithm negotiated by each blockchain node in the multicast group;
[0137] The decryption module 82 decrypts the multicast data based on the decryption key corresponding to the multicast key obtained from the first blockchain node.
[0138] Optionally, the multicast key includes a symmetric encryption key.
[0139] Optionally, the key generation algorithm includes a symmetric key generation algorithm and an asymmetric key generation algorithm; each blockchain node in the multicast group generates a symmetric encryption key as the multicast key locally based on the negotiated symmetric key generation algorithm, and generates a public-private key pair for encrypting and decrypting the symmetric encryption key locally based on the asymmetric key generation algorithm;
[0140] The acquisition module 81:
[0141] Before obtaining the first blockchain node as the multicast data source in the multicast group and sending the multicast data encrypted based on the multicast key in a multicast manner through the connected blockchain relay communication network, the public-private key pair is locally generated based on the asymmetric key generation algorithm; the public key in the generated public-private key pair is sent to the first blockchain node as the multicast data source, so that the first blockchain node encrypts the symmetric encryption key as the multicast key generated locally based on the symmetric key generation algorithm based on the public key; the symmetric encryption key as the multicast key encrypted based on the public key sent by the first blockchain node is received through the connected blockchain relay communication network, and the symmetric encryption key is decrypted based on the private key in the public-private key pair to obtain the plaintext content of the symmetric encryption key.
[0142] Optionally, the key generation algorithm is a key generation algorithm periodically negotiated by each blockchain node in the multicast group based on a preset negotiation period.
[0143] Optionally, the multicast data includes:
[0144] The target blockchain node sends blockchain data to each blockchain node in the multicast group; and / or,
[0145] The application installed on the target blockchain node sends an application layer message to the application installed on each blockchain node in the multicast group.
[0146] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
[0147] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0148] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0149] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0150] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0151] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0152] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. 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 associated listed items.
[0153] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0154] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.
Claims
1. A blockchain-based multicast method, in which at least some of the blockchain nodes in the blockchain network join the multicast group ; The method is applied to a first blockchain node in the multicast group as a multicast data source, and the method includes: Each blockchain node in the multicast group negotiates a key generation algorithm, where the key generation algorithm includes a symmetric key generation algorithm and an asymmetric key generation algorithm; Generate a symmetric key as a multicast key locally based on the symmetric key generation algorithm, and obtain a public key in a public-private key pair generated locally by other blockchain nodes in the multicast group based on the asymmetric key generation algorithm for encrypting and decrypting the multicast key; Based on the public key, the multicast key is encrypted, and the encrypted multicast key is sent to other blockchain nodes in the multicast group through the connected blockchain relay communication network, so that the other blockchain nodes decrypt the multicast key based on the private key in the public-private key pair generated locally; further, The multicast data to be sent to each blockchain node in the multicast group is encrypted based on the multicast key, and the encrypted multicast data is sent to other blockchain nodes in the multicast group in a multicast manner through the connected blockchain relay communication network, so that the other blockchain nodes decrypt the multicast data based on the decrypted multicast key.
2. The method according to claim 1, further comprising: include: Receiving a reception confirmation result for the multicast key returned by other blockchain nodes in the multicast group through the blockchain relay communication network accessed; The blockchain relay communication network accessed thereto sends the encrypted multicast data to other blockchain nodes in the multicast group in a multicast manner, including: Determining whether a reception confirmation result of the multicast key from other blockchain nodes in the multicast group is received; If so, the encrypted multicast data is further sent to other blockchain nodes in the multicast group in a multicast manner through the connected blockchain relay communication network.
3. According to the method described in claim 1, the key generation algorithm is a key generation algorithm periodically negotiated by each blockchain node in the multicast group based on a preset negotiation period.
4. The method according to claim 3, in, The multicast keys generated by key generation algorithms negotiated based on different negotiation periods correspond to different version numbers respectively; the method further includes: Through the connected blockchain relay communication network, the version number corresponding to the multicast key is sent to other blockchain nodes in the multicast group in a multicast manner, so that the other blockchain nodes decrypt the multicast data based on the decryption key corresponding to the version number obtained from the first blockchain node.
5. According to the method of claim 4, the version number corresponds to a timestamp range in which the negotiation period is located.
6. According to the method of claim 1, the relay node in the blockchain relay communication network maintains a multicast member list corresponding to the multicast group locally; The encrypted multicast data is sent to each blockchain node in the multicast group in a multicast manner through the connected blockchain relay communication network. include: The encrypted multicast data is sent to the first relay node connected to the first blockchain node in the blockchain relay communication network, and the first relay node performs multicast replication processing on the encrypted multicast data based on the supported multicast protocol to obtain a data copy of the encrypted multicast data corresponding to each blockchain node in the multicast member list, and then distributes the obtained data copy of the encrypted multicast data to the second relay node connected to each blockchain node in the multicast member list in the blockchain relay communication network, and the second relay node continues to send the received data copy of the encrypted multicast data to each blockchain node in the multicast member list.
7. According to the method of claim 6, the multicast protocol supported by the relay nodes in the blockchain relay communication network is an application layer multicast protocol; the multicast replication processing includes multicast replication processing at the application layer.
8. The method according to claim 1, wherein the multicast data include: The blockchain data sent by the first blockchain node to each blockchain node in the multicast group; and / or, The application installed on the first blockchain node sends an application layer message to the application installed on each blockchain node in the multicast group.
9. A blockchain-based multicast method, in which at least some of the blockchain nodes in the blockchain network join the multicast group ; The method is applied to a second blockchain node in the multicast group as a multicast data receiver, and the method includes: Each blockchain node in the multicast group negotiates a key generation algorithm, where the key generation algorithm includes a symmetric key generation algorithm and an asymmetric key generation algorithm; Obtain a first blockchain node in the multicast group as a multicast data source, and send a multicast key encrypted based on a public key in a public-private key pair obtained from other blockchain nodes in the multicast group through the blockchain relay communication network to which it is connected; wherein the multicast key is a symmetric key generated locally by the first blockchain node based on the symmetric key generation algorithm; and the public-private key pair is a public-private key pair generated locally by other blockchain nodes based on the asymmetric key generation algorithm; Decrypting the multicast key based on the private key in the public-private key pair generated locally by the asymmetric key generation algorithm; Obtain the first blockchain node, send the multicast data encrypted based on the multicast key in a multicast manner through the connected blockchain relay communication network, and decrypt the multicast data based on the decrypted multicast key.
10. According to the method of claim 9, the key generation algorithm is a key generation algorithm periodically negotiated by each blockchain node in the multicast group based on a preset negotiation period.
11. The method according to claim 9, wherein the multicast data include: The blockchain data sent by the first blockchain node to each blockchain node in the multicast group; and / or, The application installed on the first blockchain node sends an application layer message to the application installed on each blockchain node in the multicast group.
12. A multicast device based on blockchain, in which at least some blockchain nodes in the blockchain network join the multicast group ; The device is applied to a first blockchain node as a multicast data source in the multicast group, and the device includes: A generation module, wherein each blockchain node in the multicast group negotiates a key generation algorithm, wherein the key generation algorithm includes a symmetric key generation algorithm and an asymmetric key generation algorithm; An acquisition module is configured to locally generate a symmetric key as a multicast key based on the symmetric key generation algorithm, and to obtain a public key in a public-private key pair for encrypting and decrypting the multicast key generated locally by other blockchain nodes in the multicast group based on the asymmetric key generation algorithm; A first sending module encrypts the multicast key based on the public key, and sends the encrypted multicast key to other blockchain nodes in the multicast group through the connected blockchain relay communication network, so that the other blockchain nodes decrypt the multicast key based on the private key in the public-private key pair generated locally; The second sending module encrypts the multicast data to be sent to each blockchain node in the multicast group based on the multicast key, and sends the encrypted multicast data to other blockchain nodes in the multicast group in a multicast manner through the connected blockchain relay communication network, so that the other blockchain nodes decrypt the multicast data based on the decrypted multicast key.
13. A multicast device based on blockchain, in which at least some blockchain nodes in the blockchain network join the multicast group ; The device is applied to a second blockchain node in the multicast group as a multicast data receiver, and the device includes: A generation module, wherein each blockchain node in the multicast group negotiates a key generation algorithm, wherein the key generation algorithm includes a symmetric key generation algorithm and an asymmetric key generation algorithm; A first acquisition module is configured to acquire a first blockchain node in the multicast group as a multicast data source, and to send a multicast key encrypted based on a public key in a public-private key pair obtained from other blockchain nodes in the multicast group through the blockchain relay communication network to which it is connected; wherein the multicast key is a symmetric key generated locally by the first blockchain node based on the symmetric key generation algorithm; and the public-private key pair is a public-private key pair generated locally by other blockchain nodes based on the asymmetric key generation algorithm; A decryption module, decrypting the multicast key based on the private key in the public-private key pair generated locally by the asymmetric key generation algorithm; The second acquisition module takes the first blockchain node, sends the multicast data encrypted based on the multicast key in a multicast manner through the connected blockchain relay communication network, and decrypts the multicast data based on the decrypted multicast key.
14. An electronic device, include: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 11 by running the executable instructions.
15. A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 11.
