Blockchain-based communication method and apparatus
By establishing a communication protocol between blockchain nodes and large-capacity storage nodes, only storing data identifiers and synchronizing data through the identifiers, the problems of blockchain data redundancy and synchronization speed are solved, and cost reduction and speed improvement are achieved.
Patent Information
- Application Number
- PCT/CN2024/083406
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-18
- Filing Date
- 2024-03-22
- Publication Date
- 2024-10-24
AI Technical Summary
In distributed application scenarios, due to the characteristics of the blockchain, data redundancy increases, storage costs increase, and synchronization speeds between nodes decrease.
By establishing a communication protocol between the blockchain node and the large-capacity storage node, only the identification of the data is stored, rather than the actual data. Data is obtained through the identification during synchronization between nodes, reducing redundant storage and improving synchronization speed.
It effectively reduces blockchain storage costs, improves synchronization speed between nodes, and improves data security and acquisition accuracy.
Smart Images

Figure CN2024083406_24102024_PF_FP_ABST
Abstract
Description
A communication method and device based on blockchain
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on April 18, 2023, with application number 202310416809.1 and application name “A communication method and device based on blockchain”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of distributed technology, and in particular to a communication method and device based on blockchain. Background Art
[0004] In many distributed application scenarios, data processing on the blockchain is required. Generally, before processing data, it must be stored on the blockchain. However, due to the characteristics of the blockchain, the data to be processed must be stored on each blockchain node. This results in data redundancy, increases blockchain storage costs, and reduces synchronization speed between blockchain nodes.
[0005] Summary of the Invention
[0006] The present application provides a blockchain-based communication method and device to reduce data redundancy, lower blockchain storage costs, and improve the synchronization speed between blockchain nodes.
[0007] In a first aspect, embodiments of the present application provide a blockchain-based communication method, which can be executed by a communication device, which can be a terminal device or a module for a terminal device, or a server or a module for a server. This application does not limit the execution entity of this method. The method includes: a first blockchain node receiving a first transaction request, the first transaction request including a blockchain transaction type and first data, the blockchain transaction type being used to indicate how the first data is to be processed; the first blockchain node storing the first data in a large-capacity storage node and determining an identifier for the first data; and the first blockchain node synchronizing a first block including the blockchain transaction type and the identifier for the first data to at least one second blockchain node.
[0008] In the above solution, the first blockchain node stores the first data in a large-capacity storage node, and synchronizes the first block to at least one second blockchain node. The first block contains an identifier of the first data instead of the first data. Therefore, the first blockchain node and the at least one second blockchain node only need to store the identifier of the first data, and do not need to store the first data. Subsequently, when the first blockchain node and the at least one second blockchain node need to use or process the first data, they can obtain the first data from the large-capacity storage node according to the identifier of the first data. Therefore, this solution reduces data redundancy, reduces blockchain storage costs, and improves the synchronization speed between blockchain nodes.
[0009] In one possible implementation method, the first blockchain node obtains the blockchain transaction type and the identifier of the first data from the first block; the first blockchain node obtains the first data from the large-capacity storage node based on the identifier of the first data; and the first blockchain node processes the first data based on the blockchain transaction type.
[0010] In the above solution, a communication protocol exists between the first blockchain node and the large-capacity storage node, so they can communicate with each other. When the first blockchain node needs to process the first data, it accurately obtains the first data from the large-capacity storage node according to the identifier of the first data. The first blockchain node itself does not need to store the first data. Therefore, this solution reduces the data redundancy of the first blockchain node and reduces the blockchain storage cost.
[0011] In one possible implementation method, a first blockchain node receives an identifier of first data from a large-capacity storage node.
[0012] In the above solution, the large-capacity storage node generates an identifier of the first data when storing the first data and returns the identifier of the first data to the first blockchain node, which can accurately determine the identifier of the first data.
[0013] In one possible implementation method, the first blockchain node generates an identifier for the first data.
[0014] In the above solution, the first blockchain node determines the identity of the first data, which can accurately determine the identity of the first data.
[0015] In a possible implementation method, the first transaction request also includes a verification identifier.
[0016] In one possible implementation method, it is determined whether the verification identifier is the same as the identifier of the first data. When the verification identifier is the same as the identifier of the first data, the first blockchain node synchronizes the first block to at least one second blockchain node.
[0017] In the above scheme, when the verification identifier is the same as the identifier of the first data, it indicates that the first data stored in the large-capacity storage node has not been tampered with, thereby increasing the security of the first data and improving the accuracy of the first blockchain node and at least one second blockchain node in obtaining the first data from the large-capacity storage node.
[0018] In one possible implementation method, a first blockchain node receives a second transaction request, where the second transaction request includes a blockchain transaction type and an identifier of the first data; the first blockchain node synchronizes a second block including the blockchain transaction type and the identifier of the first data to at least one second blockchain node.
[0019] In the above solution, after receiving the second transaction request, the first blockchain node directly synchronizes the second block containing the blockchain transaction type and the identifier of the first data to at least one second blockchain node, without the need for secondary storage of the first data. On the one hand, this saves space on large-capacity storage nodes, and on the other hand, speeds up the synchronization of the second block to the at least one second blockchain node.
[0020] In one possible implementation method, the large-capacity storage node refers to the InterPlanetary File System IPFS node.
[0021] In the above solution, IPFS is a content-addressable peer-to-peer hypermedia distribution protocol, that is, data with the same content will only be stored in several IPFS nodes, which not only saves resource overhead, but also can store more data, and further realizes the storage of large amounts of data.
[0022] In one possible implementation method, the first block is used by at least one second blockchain node to process the first data according to the blockchain transaction type.
[0023] In the above solution, a communication protocol exists between the second blockchain node and the large-capacity storage node, so they can communicate with each other. When at least one second blockchain node needs to process the first data, it accurately obtains the first data from the large-capacity storage node according to the identifier of the first data. At least one second blockchain node itself does not need to store the first data. Therefore, this solution reduces data redundancy of at least one second blockchain node and reduces blockchain storage costs.
[0024] In a second aspect, embodiments of the present application provide a communication device comprising: a transceiver unit and a processing unit. The transceiver unit is configured to receive, at a first blockchain node, a first transaction request including a blockchain transaction type and first data, the blockchain transaction type indicating a processing method for the first data; the processing unit is configured to store the first data in a large-capacity storage node and determine an identifier for the first data; and the first blockchain node synchronizes a first block including the blockchain transaction type and the identifier for the first data to at least one second blockchain node.
[0025] In one possible implementation method, the processing unit is also used for the first blockchain node to obtain the blockchain transaction type and the identifier of the first data from the first block; the first blockchain node obtains the first data from the large-capacity storage node based on the identifier of the first data; and the first blockchain node processes the first data based on the blockchain transaction type.
[0026] In one possible implementation method, the transceiver unit is also used for the first blockchain node to receive an identifier of the first data from the large-capacity storage node.
[0027] In one possible implementation method, the processing unit is further configured to generate an identifier for the first data at the first blockchain node.
[0028] In a possible implementation method, the first transaction request also includes a verification identifier.
[0029] In one possible implementation method, the processing unit is also used to determine whether the verification identifier is the same as the identifier of the first data. When the verification identifier is the same as the identifier of the first data, the first blockchain node synchronizes the first block to at least one second blockchain node.
[0030] In one possible implementation method, the transceiver unit is also used for the first blockchain node to receive a second transaction request, where the second transaction request includes a blockchain transaction type and an identifier of the first data; the first blockchain node synchronizes the second block including the blockchain transaction type and the identifier of the first data to at least one second blockchain node.
[0031] In one possible implementation method, the large-capacity storage node refers to the InterPlanetary File System IPFS node.
[0032] In one possible implementation method, the first block is used by at least one second blockchain node to process the first data according to the blockchain transaction type.
[0033] In a third aspect, an embodiment of the present application further provides a computing device, including:
[0034] a memory for storing program instructions;
[0035] The processor is configured to call the program instructions stored in the memory and execute any method for implementing the first aspect according to the obtained program instructions.
[0036] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, in which computer-readable instructions are stored. When a computer reads and executes the computer-readable instructions, any method of the above-mentioned first aspect is implemented.
[0037] In a fifth aspect, an embodiment of the present application provides a computer program product, comprising a computer program executable by a computer device, wherein when the program is run on the computer device, the computer device executes any method for implementing the above-mentioned first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] FIG1 is a flow chart of a blockchain-based communication method provided in an embodiment of the present application;
[0039] FIG2 is a flow chart of a blockchain-based communication method provided in an embodiment of the present application;
[0040] FIG3 is a schematic structural diagram of a communication device provided in an embodiment of the present application;
[0041] FIG4 is a schematic structural diagram of a communication device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] Figure 1 is a flow chart of a blockchain-based communication method provided in an embodiment of the present application. The method can be executed by a communication device, which can be a terminal device or a module for a terminal device, or a server or a module for a server. The present application does not limit the execution subject of the method.
[0043] The method comprises the following steps:
[0044] Step 101: A first blockchain node receives a first transaction request.
[0045] The first transaction request includes a blockchain transaction type and first data, and the blockchain transaction type is used to indicate a method for processing the first data.
[0046] In one possible implementation, the first blockchain node refers to any consensus node on a blockchain. A blockchain is a decentralized, distributed system typically used to record transactions. The contents of these transactions are recorded as blocks of data, which are independently verified by a peer-to-peer computer network and then added to the blockchain. To ensure that all participants, or nodes, in a blockchain network agree on a single version of history, the network implements a consensus mechanism, also known as a consensus protocol or consensus algorithm. Blockchain nodes that implement this consensus mechanism are called consensus nodes. Consensus nodes can be thought of as special, ordinary time nodes. In addition to performing the tasks of ordinary time nodes, they also need to reach a consensus protocol to update the ledger.
[0047] In one possible implementation method, the blockchain transaction type is used to indicate how the first data is processed. For example, if it is necessary to verify the user's identity information, the first data may include the user's ID card information, academic certificate information, or degree certificate information, and the blockchain transaction type is to verify the user's identity information based on the user's ID card information, academic certificate information, or degree certificate information. For another example, for a certain financing user, it is necessary to verify whether the financing user's monthly financing amount meets the requirements. The first data may be the financing user's monthly financing bill, and the blockchain transaction type is to verify whether the financing user's monthly financing amount meets the requirements based on the financing user's monthly financing bill. This application does not limit the blockchain transaction type, nor does it limit the specific content of the first data.
[0048] In step 102, the first blockchain node stores the first data in a large-capacity storage node and determines an identifier of the first data.
[0049] In one possible implementation method, a large-capacity storage node refers to a node with distributed storage capabilities, which avoids the risks of trust centralization, single point failure, data loss or tampering brought about by centralized storage.
[0050] In one possible implementation, the high-capacity storage node refers to an InterPlanetary File System (IPFS) node. IPFS is a content-addressable peer-to-peer hypermedia distribution protocol, meaning that multiple pieces of data with the same content are only stored on a few IPFS nodes. This not only saves resources but also allows for more data storage, further enabling the storage of large amounts of data. Each file stored in the IPFS system can be identified by a hash value of its content, known as a CID (Content Identifier), which is the identifier of the first data.
[0051] In one possible implementation, a first blockchain node receives an identifier for the first data from a mass storage node. For example, if the mass storage node is an IPFS node, the first blockchain node sends a storage request to the IPFS node, requesting that the first data be stored there. After the IPFS system stores the first data there, it performs a hash calculation based on the content of the first data to determine its hash value, i.e., its identifier. The system then returns the identifier to the first blockchain node. This solution, in which the mass storage node generates the identifier for the first data when storing it and returns it to the first blockchain node, enables accurate determination of the identifier for the first data.
[0052] In another possible implementation method, the first blockchain node generates an identifier for the first data. For example, the first blockchain node determines a hash value of the first data, i.e., the identifier of the first data, through a hash calculation based on the content of the first data. Alternatively, the first blockchain node determines the identifier of the first data using other methods. This application does not limit the method for determining the identifier of the first data; it only requires that the identifier of the first data uniquely represent the first data. In this solution, the first blockchain node determines the identifier of the first data, which can accurately determine the identifier of the first data.
[0053] In step 103 , the first blockchain node synchronizes the first block including the blockchain transaction type and the identifier of the first data to at least one second blockchain node.
[0054] In one possible implementation, a first blockchain node and at least one second blockchain node execute a consensus protocol to package transactions and determine a first block. The first block contains an identifier for the blockchain transaction type and first data. The packaged first block is then synchronized to the at least one second blockchain node. The at least one second blockchain node and the first blockchain node each execute the transactions in the first block.
[0055] In one possible implementation, a first blockchain node and at least one second blockchain node obtain the blockchain transaction type and the identifier of the first data from the first block; based on the identifier of the first data, the first blockchain node and the at least one second blockchain node obtain the first data from a mass storage node; and the first blockchain node and the at least one second blockchain node process the first data based on the blockchain transaction type. In this solution, a communication protocol exists between the first blockchain node and the mass storage node, allowing them to communicate with each other. When the first blockchain node needs to process the first data, it accurately obtains the first data from the mass storage node based on the identifier of the first data. The first blockchain node does not need to store the first data itself, thus reducing data redundancy within the first blockchain node and lowering blockchain storage costs.
[0056] In one possible implementation, the first transaction request takes the form of a smart contract, and the blockchain transaction type represents the logic of the smart contract, specifically the logical relationship for processing the first data according to the smart contract. Based on the logic of the smart contract, the first blockchain node and at least one second blockchain node execute the transaction in the first block and process the first data. This solution, through the use of smart contracts, enables network communication between the first blockchain node and the at least one second blockchain node and a mass storage node, enabling the first and at least one second blockchain nodes to accurately obtain and process the first data, thus ensuring the correct execution of the business logic.
[0057] In the above solution, the first blockchain node stores the first data in a large-capacity storage node, and synchronizes the first block to at least one second blockchain node. The first block contains an identifier of the first data instead of the first data. Therefore, the first blockchain node and the at least one second blockchain node only need to store the identifier of the first data, and do not need to store the first data. Subsequently, when the first blockchain node and the at least one second blockchain node need to use or process the first data, they can obtain the first data from the large-capacity storage node according to the identifier of the first data. Therefore, this solution reduces data redundancy, reduces blockchain storage costs, and improves the synchronization speed between blockchain nodes.
[0058] In one possible implementation method, the first transaction request also includes a verification identifier. The verification identifier can be a hash value determined by hash calculation based on the content of the first data, or a verification identifier determined according to a certain rule. This application does not limit the method for determining the verification identifier and the form of the verification identifier. It is only necessary that the verification identifier can verify whether the identifier of the first data is legal. Whether the identifier of the first data is legal refers to whether the identifier of the first data can uniquely identify the content of the first data. If the identifier of the first data can uniquely identify the content of the first data, the identifier of the first data is legal; otherwise, the identifier of the first data is illegal. After determining that the identifier of the first data is legal, the first blockchain node synchronizes the first block to at least one second blockchain node.
[0059] In one possible implementation method, when the client sends a first transaction request to the first blockchain node, the client generates a verification identifier, writes the verification identifier into the first transaction request, and sends it to the first blockchain node.
[0060] In another possible implementation method, the client sends a first transaction request to the communication device, the server of the communication device receives the first transaction request, generates a verification identifier based on the first data carried in the first transaction request, then writes the verification identifier into the first transaction request, and then sends the first transaction request to the first blockchain node.
[0061] In one possible implementation method, it is determined whether the verification identifier is the same as the identifier of the first data. If the identifier of the first data is consistent with the verification identifier, then the identifier of the first data is legal, which means that when the first data is stored in the large-capacity storage node, the content of the first data has not been tampered with; if the identifier of the first data is inconsistent with the verification identifier, then the identifier of the first data is illegal, that is, when the first data is stored in the large-capacity storage node, the content of the first data has been tampered with, and the first data stored in the large-capacity storage node is wrong.
[0062] In the above scheme, when the verification identifier is the same as the identifier of the first data, it indicates that the first data stored in the large-capacity storage node has not been tampered with, thereby increasing the security of the first data and improving the accuracy of the first blockchain node and at least one second blockchain node in obtaining the first data from the large-capacity storage node.
[0063] In one possible implementation method, when the verification identifier matches the identifier of the first data, the first blockchain node synchronizes the first block to at least one second blockchain node. After synchronization is complete, the first blockchain node and the at least one second blockchain node obtain the blockchain transaction type and the identifier of the first data from the first block. The first blockchain node and the at least one second blockchain node each send a data acquisition request to a large-capacity storage node, namely, an IPFS system. The data acquisition request includes the identifier of the first data. The IPFS system reads the first data from the IPFS node based on the identifier of the first data and returns it to the first blockchain node and the at least one second blockchain node, respectively. After obtaining the first data, the first blockchain node and the at least one second blockchain node each process the first data based on the blockchain transaction type. After processing the first data, the processing results are returned to the client.
[0064] In one possible implementation method, when the verification identifier is different from the identifier of the first data, the first blockchain node will not synchronize the first block to at least one second blockchain node, but will return the information that the verification identifier is different from the identifier of the first data to the client, waiting for subsequent processing by the client, such as the client initiating a second transaction request.
[0065] In one possible implementation, a first blockchain node receives a second transaction request, which includes the blockchain transaction type and an identifier for the first data. The second transaction request does not include the first data because the first data has already been stored on the mass storage node, eliminating the need to re-store the first data. In this solution, upon receiving the second transaction request, the first blockchain node directly synchronizes the second block containing the blockchain transaction type and the identifier for the first data to at least one second blockchain node, eliminating the need for secondary storage of the first data. This not only saves space on the mass storage node but also speeds up the synchronization of the second block to the at least one second blockchain node.
[0066] In one possible implementation method, a first blockchain node synchronizes a second block containing a blockchain transaction type and an identifier of the first data to at least one second blockchain node. After synchronization is complete, the first blockchain node and the at least one second blockchain node retrieve the blockchain transaction type and the identifier of the first data from the second block. The first blockchain node and the at least one second blockchain node each send a data retrieval request to a large-capacity storage node, namely, an IPFS system. The data retrieval request includes the identifier of the first data. The IPFS system reads the first data from the IPFS node based on the identifier of the first data and returns it to the first blockchain node and the at least one second blockchain node, respectively. After respectively obtaining the first data, the first blockchain node and the at least one second blockchain node process the first data based on the blockchain transaction type. After processing the first data, the processing results are returned to the client.
[0067] In one possible implementation method, the second transaction request also includes a second verification identifier, which is used to verify whether the identifier of the first data has changed during the network transmission process. The second verification identifier can be a hash value determined by hash calculation based on the content of the first data, or it can be a second verification identifier determined according to a certain rule. This application does not limit the method for determining the second verification identifier or the form of the second verification identifier. It is only necessary that the second verification identifier can verify whether the identifier of the first data in the second transaction request has changed during the network transmission process. After determining that the identifier of the first data in the second transaction request has not changed during the network transmission process, the first blockchain node synchronizes the second block to at least one second blockchain node.
[0068] In one possible implementation method, when the second verification identifier is the same as the identifier of the first data in the second transaction request, the first blockchain node synchronizes the second block to at least one second blockchain node.
[0069] The following uses a specific example to illustrate how to process the first data.
[0070] In one possible implementation, a user sets a sales target for a product a month ago, for example, one million. One month later, the user wants to verify whether the sales target has been reached. The user, or client, sends a first transaction request to the blockchain's consensus node. This first transaction request includes a blockchain transaction type, first data, and a verification identifier. The blockchain transaction type is for verifying whether the sales target has been reached, and the first data is the user's sales orders for the month. The processing of the first data is shown in Figure 2. The method includes the following steps:
[0071] Step 201: A first blockchain node receives a first transaction request.
[0072] Step 202: The first blockchain node sends a storage request to a large-capacity storage node.
[0073] In one possible implementation method, the first blockchain node sends a storage request to a large-capacity storage node, namely an IPFS node. The storage request includes first data, namely the user's sales orders for one month.
[0074] Step 203: The large-capacity storage node stores the first data and generates an identifier of the first data.
[0075] In one possible implementation method, after receiving a storage request, the IPFS system stores the first data carried in the storage request to the IPFS node, and returns an identifier of the first data to the first blockchain node. The identifier of the first data is the hash value determined by the IPFS system through hash calculation based on the content of the first data.
[0076] Step 204: The IPFS system returns the identifier of the first data to the first blockchain node.
[0077] Step 205: The first blockchain node verifies the identifier of the first data.
[0078] In one possible implementation, a determination is made as to whether the verification identifier is identical to the identifier of the first data. If so, the first blockchain node synchronizes the first block containing the blockchain transaction type and the identifier of the first data to at least one second blockchain node. If not, the first blockchain node sends a message to the client indicating that the identifier verification of the first data has failed, and the user then decides whether to initiate another transaction request with the blockchain node.
[0079] Step 206: Determine the first block.
[0080] In one possible implementation, a first blockchain node reaches consensus with at least one second blockchain node based on a consensus protocol and determines the contents of a first block. For example, the first block includes information such as the blockchain transaction type, the identifier of the first data, the size of the first block, or the time the first block was generated. The first blockchain node then synchronizes the first block with the at least one second blockchain node. The first blockchain node and the at least one second blockchain node then write the first block to their respective corresponding blockchain nodes.
[0081] In step 207 , the first blockchain node synchronizes the first block to at least one second blockchain node.
[0082] In step 208, the first blockchain node and at least one second blockchain node process the first data according to the content of the first block.
[0083] In one possible implementation method, a first blockchain node and at least one second blockchain node obtain a blockchain transaction type and an identifier of the first data from the first block; the first blockchain node and the at least one second blockchain node respectively send a request to obtain data to a large-capacity storage node, namely, an IPFS system, where the request to obtain data includes the identifier of the first data. The IPFS system reads the first data, namely, the user's sales orders for one month, from the IPFS node based on the identifier of the first data, and returns it to the first blockchain node and the at least one second blockchain node respectively; the first blockchain node and the at least one second blockchain node calculate the sales amount for the month based on the user's sales orders for the month, and after the calculation is completed, verify whether the sales amount for the month has reached the target sales amount of the product, and return the verification result to the user.
[0084] In one possible implementation, when a user needs to re-verify whether the monthly sales amount has reached the product sales target, the user needs to send a second transaction request to the first blockchain node. The second transaction request only needs to include the blockchain transaction type, the identifier of the first data, and the second verification identifier, and no longer needs to include the first data. After the first blockchain node receives the second transaction request and verifies the identifier of the first data, it reaches a consensus with at least one second blockchain node according to the consensus protocol and determines the content of the second block. For example, the second block includes information such as the blockchain transaction type, the identifier of the first data, the size of the second block, or the generation time of the second block. The first blockchain node then synchronizes the second block to the at least one second blockchain node. The first blockchain node and the at least one second blockchain node each write the second block to their respective corresponding blockchain nodes.
[0085] In one possible implementation method, the first blockchain node and at least one second blockchain node re-verify whether the user's monthly sales amount has reached the target sales amount based on the content of the second block, and return the verification result to the user.
[0086] Based on the same technical concept, FIG3 exemplarily shows a communication device 300 provided in an embodiment of the present application. As shown in FIG3 , it includes: a transceiver unit 301 and a processing unit 302. The transceiver unit 301 is used for a first blockchain node to receive a first transaction request, the first transaction request including a blockchain transaction type and first data, the blockchain transaction type being used to indicate a processing method for the first data; the processing unit 302 is used for the first blockchain node to store the first data in a large-capacity storage node and determine the identifier of the first data; the first blockchain node synchronizes the first block including the blockchain transaction type and the identifier of the first data to at least one second blockchain node.
[0087] In one possible implementation method, the processing unit 302 is also used for the first blockchain node to obtain the blockchain transaction type and the identifier of the first data from the first block; the first blockchain node obtains the first data from the large-capacity storage node according to the identifier of the first data; and the first blockchain node processes the first data according to the blockchain transaction type.
[0088] In one possible implementation method, the transceiver unit 301 is also used for the first blockchain node to receive an identifier of the first data from the large-capacity storage node.
[0089] In one possible implementation method, the processing unit 302 is further configured to generate an identifier of the first data by the first blockchain node.
[0090] In a possible implementation method, the first transaction request also includes a verification identifier.
[0091] In one possible implementation method, the processing unit 302 is also used to determine whether the verification identifier is the same as the identifier of the first data. When the verification identifier is the same as the identifier of the first data, the first blockchain node synchronizes the first block to at least one second blockchain node.
[0092] In one possible implementation method, the transceiver unit 301 is also used for the first blockchain node to receive a second transaction request, where the second transaction request includes a blockchain transaction type and an identifier of the first data; the first blockchain node synchronizes the second block including the blockchain transaction type and the identifier of the first data to at least one second blockchain node.
[0093] In one possible implementation method, the large-capacity storage node refers to the InterPlanetary File System IPFS node.
[0094] In one possible implementation method, the first block is used by at least one second blockchain node to process the first data according to the blockchain transaction type.
[0095] Based on the same technical concept, an embodiment of the present application provides a communication device 400, which can be, for example, a computing device. As shown in Figure 4, a communication device 400 includes at least one processor 401 and a memory 402 connected to the at least one processor. The specific connection medium between the processor 401 and the memory 402 is not limited in the embodiment of the present application. In Figure 4, the processor 401 and the memory 402 are connected via a bus as an example. Buses can be divided into address buses, data buses, control buses, etc.
[0096] In an embodiment of the present application, the memory 402 stores instructions that can be executed by at least one processor 401. The at least one processor 401 can execute the above-mentioned blockchain-based communication method by executing the instructions stored in the memory 402.
[0097] Processor 401 is a control center for communication device 400. It can connect various components of the computer device using various interfaces and lines, and perform resource configuration by running or executing instructions stored in memory 402 and calling data stored in memory 402. Optionally, processor 401 may include one or more determination units. Processor 401 may integrate an application processor and a modem processor. The application processor primarily processes the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 401. In some embodiments, processor 401 and memory 402 may be implemented on the same chip. In some embodiments, they may also be implemented on separate chips.
[0098] The processor 401 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.
[0099] The memory 402 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 402 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 402 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 402 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0100] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer-executable program. The computer-executable program is used to enable a computer to execute a blockchain-based communication method listed in any of the above methods.
[0101] An embodiment of the present application provides a computer program product, including a computer program executable by a computer device. When the program is run on the computer device, the computer device executes a blockchain-based communication method listed in any of the above methods.
[0102] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0103] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or box in the flow chart and / or block diagram, as well as the combination of the flow chart and / or box in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more flow charts and / or one or more boxes in the block diagram.
[0104] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0105] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0106] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A communication method based on blockchain, characterized in that: include: The first blockchain node receives a first transaction request, where the first transaction request includes a blockchain transaction type and first data, where the blockchain transaction type is used to indicate a processing method for the first data; The first blockchain node stores the first data in the large-capacity storage node, and determines an identifier of the first data; The first blockchain node synchronizes a first block including an identifier of the blockchain transaction type and the first data to at least one second blockchain node.
2. The method according to claim 1, characterized in that The method further comprises: The first blockchain node obtains the blockchain transaction type and an identifier of the first data from the first block; The first blockchain node obtains the first data from the large-capacity storage node according to the identifier of the first data; The first blockchain node processes the first data according to the blockchain transaction type.
3. The method according to claim 1 or 2, characterized in that The first blockchain node determines the identifier of the first data, including: The first blockchain node receives an identification of the first data from the mass storage node.
4. The method according to claim 1 or 2, characterized in that: The first blockchain node determines the identifier of the first data, including: The first blockchain node generates an identifier of the first data.
5. The method according to claim 1 or 2, characterized in that: The first transaction request also includes a verification identifier; and the method further includes: Determining whether the verification identifier is the same as an identifier of the first data; The first blockchain node synchronizes the first block including the blockchain transaction type and the identifier of the first data to at least one second blockchain node, including: When the verification identifier is the same as the identifier of the first data, the first blockchain node synchronizes the first block to the at least one second blockchain node.
6. The method according to claim 1 or 2, characterized in that: The method further comprises: The first blockchain node receives a second transaction request, where the second transaction request includes the blockchain transaction type and an identifier of the first data; The first blockchain node synchronizes a second block including the blockchain transaction type and an identifier of the first data to the at least one second blockchain node.
7. The method according to claim 1 or 2, characterized in that: The large-capacity storage node refers to the InterPlanetary File System IPFS node.
8. The method according to claim 1 or 2, characterized in that: The first block is used by the at least one second blockchain node to process the first data according to the blockchain transaction type.
9. A communication device, characterized in that: Including transceiver unit and processing unit: The transceiver unit is configured to receive a first transaction request at a first blockchain node, wherein the first transaction request includes a blockchain transaction type and first data, and the blockchain transaction type is used to indicate a processing method for the first data; The processing unit is used for the first blockchain node to store the first data to the large-capacity storage node and determine the identification of the first data; the first blockchain node synchronizes the first block including the blockchain transaction type and the identification of the first data to at least one second blockchain node.
10. A computing device, characterized in that include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute the method according to any one of claims 1 to 8 according to the obtained program instructions.
Citation Information
Patent Citations
Transaction data storage method and device, server and memory medium
CN108769230A
Block chain generation method, device, block chain node, and storage medium
CN109034809A
Block chain network transmission method and device, and electronic equipment
CN109474682A
Financial big data-oriented multi-way tree structure block chain integrated optimization storage method
CN111611315A
Communication method and device based on block chain
CN116436917A
