Data processing method, system, apparatus, device, storage medium and program product
By setting consensus nodes within each organization of the consortium blockchain to store only block data containing current transaction information, and having data storage nodes update the full data, the problems of storage pressure and low consensus processing efficiency in consortium blockchains are solved, achieving more efficient data management and consensus processing.
Patent Information
- Application Number
- CN202411995226.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-12-31
AI Technical Summary
As the runtime of the consortium blockchain increases, the storage space requirements of each node increase, resulting in enormous storage and computational pressure, which affects the consensus processing efficiency and performance of the consensus nodes.
Within each organization of the consortium blockchain, a consensus node is set up to store only block data of current transaction information, and the full data of the consortium blockchain is synchronized and updated through the data storage node, thereby reducing the storage pressure on the consensus node.
It alleviates the storage pressure on consortium blockchains, improves the processing efficiency and performance of consensus nodes, reduces the degree of centralization, and enhances the reliability and data consistency of the system.
Smart Images

Figure CN119835332B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular to data processing methods, systems, devices, equipment, storage media, and program products. Background Technology
[0002] In recent years, with the development of blockchain technology, its application in the transaction field has become increasingly widespread.
[0003] Consortium blockchains, as a form of blockchain, are blockchains jointly managed by multiple organizations. Each organization runs one or more nodes, and the data within them can only be read, written, and sent by different organizations within the system, and they jointly record the transaction data.
[0004] However, as the consortium blockchain operates for longer periods, the storage space occupied by the data of each node in the consortium blockchain becomes larger and larger, which will put enormous pressure on the storage and computing of the consortium blockchain. Summary of the Invention
[0005] This application provides a data processing method, system, apparatus, device, storage medium, and program product, which provides a technical solution that can alleviate the storage pressure of consortium blockchains and improve the consensus processing efficiency and performance of consensus nodes.
[0006] In a first aspect, this application provides a data processing method applied to a consensus node in a consortium blockchain; the consortium blockchain includes multiple organizations, each organization including a consensus node; the method includes:
[0007] The received transaction information containing signature information is confirmed through a pre-defined consensus mechanism, and block data of the transaction information is generated.
[0008] The block data is used to overwrite the block data of the previous transaction information, and the block data of the transaction information is synchronized to the data storage node in each of the organizations.
[0009] The technical solution provided in this application sets up a consensus node within each organization of the consortium blockchain. This consensus node is used to confirm the received transaction information, including signature information, and generate block data for the transaction information. Subsequently, the consensus node also overwrites the previously stored block data of the transaction information with the newly generated block data. In other words, the consensus node only stores the block data of the current transaction information. Compared to existing technologies where consensus nodes need to store the entire blockchain data, this alleviates the storage pressure on the consortium blockchain.
[0010] Furthermore, since consensus nodes only store block data containing current transaction information, the storage pressure on consensus nodes is greatly reduced, thereby improving the efficiency and performance of consensus nodes during consensus processing.
[0011] Secondly, this application provides a data processing method applied to a data storage node in a consortium blockchain; the consortium blockchain includes multiple organizations, each organization including a data storage node; the method includes:
[0012] The data in the first ledger of the consortium blockchain is updated using the block data of the transaction information, wherein the first ledger is used to store the full data of the consortium blockchain.
[0013] The technical solution provided in this application involves setting up a data storage node within each organization of the consortium blockchain. This data storage node is used to acquire block data synchronized by the consensus nodes and to update the data in the first ledger of the consortium blockchain using this block data. The first ledger stores all the data of the consortium blockchain. Based on this, utilizing each organization's data storage node to store the full data of the consortium blockchain can reduce the degree of centralization in the consortium blockchain.
[0014] Thirdly, this application provides a data processing system applied in a consortium blockchain, the system comprising multiple organizations, each organization comprising a consensus node and a data storage node;
[0015] The consensus node is used for:
[0016] The received transaction information containing signature information is confirmed through a pre-defined consensus mechanism, and block data of the transaction information is generated.
[0017] The block data is used to overwrite the block data of the previous transaction information, and the block data of the transaction information is synchronized to the data storage node in each of the organizations;
[0018] The data storage node is used for:
[0019] The data in the first ledger of the corresponding consortium blockchain is updated using the block data of the transaction information, wherein the first ledger is used to store the full data of the consortium blockchain.
[0020] Fourthly, this application also provides a data processing apparatus for use in a consensus node of a consortium blockchain; the consortium blockchain includes multiple organizations, each organization including a consensus node; the apparatus includes:
[0021] Consensus module: Based on a preset consensus mechanism, it confirms the received transaction information containing signature information and generates block data of the transaction information;
[0022] Storage synchronization module: Overwrites the stored block data of the previous transaction information with the block data, and synchronizes the block data of the transaction information to the data storage node in each of the organizations.
[0023] Fifthly, this application also provides a data processing apparatus for use in a data storage node of a consortium blockchain; the consortium blockchain includes multiple organizations, each organization including a data storage node; the apparatus includes:
[0024] Processing module: used to update the data in the first ledger of the consortium blockchain using the block data of the transaction information, wherein the first ledger is used to store the full data of the consortium blockchain.
[0025] In a sixth aspect, this application also provides a data processing apparatus, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the method described in any one of the second aspects.
[0026] In a seventh aspect, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in any one of the second aspects.
[0027] Eighthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the method described in any one of the second aspects. Attached Figure Description
[0028] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0029] Figure 1 This is a schematic diagram of the structure of a consortium blockchain in related technologies;
[0030] Figure 2 A schematic diagram of the structure of the data processing system provided in the embodiments of this application. Figure 1 ;
[0031] Figure 3 A schematic diagram of the structure of the data processing system provided in the embodiments of this application. Figure 2 ;
[0032] Figure 4 A flowchart illustrating the steps of a data processing method provided in this application embodiment;
[0033] Figure 5 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0034] Figure 6 This is a schematic diagram of another data processing apparatus provided in an embodiment of this application;
[0035] Figure 7 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application.
[0036] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0037] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0038] It should be noted that the data processing methods, systems, devices, storage media, and products provided in this application can be used in the blockchain field, or in any field other than blockchain. The application fields of the data processing methods, systems, devices, storage media, and products in this application are not limited.
[0039] The specific application scenario for this application is consortium blockchain. Figure 1 This is a schematic diagram of a consortium blockchain, which includes multiple organizations (or structures). Each organization runs one or more nodes, and the data within it can only be read, written, and sent by different organizations within the system, who collectively record the transaction data.
[0040] However, as the consortium blockchain operates for longer periods, the storage space occupied by each node within the organization, which stores the entire blockchain data, increases significantly. This places immense pressure on the consortium blockchain's storage and computation capabilities. Furthermore, the increasing volume of data storing the entire consortium blockchain data will impact the consensus processing efficiency and performance of the consensus nodes.
[0041] To address the above issues, this application proposes the following: By setting up a dedicated node within each organization of the consortium blockchain to store all the data of the consortium blockchain, other nodes no longer store the data, thereby alleviating the storage pressure on the consortium blockchain. Furthermore, a consensus node is set up within each organization, which is mainly used for consensus confirmation and no longer stores the block data of previous transaction data, thereby improving the efficiency and performance of the consensus node when performing consensus processing.
[0042] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0043] This application provides a data processing method, system, device, storage medium, and program product for use in consortium blockchains.
[0044] Consortium blockchains are a type of blockchain that falls between public and private blockchains. They are jointly managed and maintained by multiple organizations and are typically used in scenarios requiring the participation of multiple entities but where complete transparency is not desired. They can be applied to financial services; for example, banks and financial institutions can use consortium blockchains for cross-border payments, settlements, and clearing.
[0045] In consortium blockchains, consensus nodes are responsible for verifying the validity of transactions, including checking the transaction format, signature validity, and ensuring that transactions conform to the network protocol rules. They are also responsible for generating new blocks and packaging verified transactions into these blocks; this process is typically accomplished by a group of nodes taking turns or through some election mechanism. The consensus mechanisms used in consortium blockchains are often Byzantine Fault Tolerance (BFT) type, such as PBFT (Practical Byzantine Fault Tolerance). In these mechanisms, consensus nodes reach an agreement on the validity of blocks through multiple rounds of communication and voting. Because the participants are known, consortium blockchains can achieve a more efficient consensus process. Consensus nodes are also responsible for synchronizing data across the network, ensuring that all nodes hold the latest state of the blockchain, including propagating newly generated blocks and updating the ledger state. In consortium blockchains, consensus nodes can also be responsible for managing permissions and access control, including determining which nodes can participate in the consensus process and which nodes can read or write data. If the consortium blockchain supports smart contracts, consensus nodes may be responsible for executing the smart contract logic and ensuring that the results are consistent across the network.
[0046] Reference Figure 2This application provides a data processing system applied in a consortium blockchain. The system includes multiple organizations, each of which includes a consensus node and a data storage node.
[0047] Consensus nodes are used for:
[0048] First, the received transaction information containing signature information is confirmed through a pre-set consensus mechanism, and block data of the transaction information is generated.
[0049] The aforementioned signature information can be endorsement signature information. Endorsement signature information is used to verify the validity of a transaction. In a consortium blockchain, transactions typically require verification and endorsement from multiple nodes to ensure compliance with the network's rules and protocols. Through endorsement signatures, the network can control which participants are authorized to verify and endorse specific types of transactions. This facilitates more granular access management and security controls. Endorsement signatures help ensure that transactions have been properly verified and approved before being submitted to the blockchain, thereby improving data consistency and reliability.
[0050] The transaction information received by the consensus nodes, including signature information, can be created by the transaction initiator and accompanied by the necessary signature information. These signatures are used to verify the authenticity and integrity of the transaction. Afterward, the transaction is broadcast to the consensus nodes or endorsing nodes in the network, awaiting verification and processing.
[0051] Upon receiving transaction information, consensus nodes first verify the signature information within the transaction to ensure its legality and integrity. Then, the consensus phase begins, where nodes communicate, exchanging transaction information and verification results. Nodes reach a consensus through voting or other means. Once a majority of nodes agree on the validity of the transaction, it is considered confirmed. The consensus nodes then package the confirmed transactions into a new block, which is the block data that generates the transaction information.
[0052] Second, the block data of the previous transaction information is overwritten using the block data, and the block data of the transaction information is synchronized to the data storage node in each of the organizations.
[0053] In other words, this consensus node only stores block data containing the current transaction information. Compared to existing technologies where consensus nodes need to store the entire blockchain data, this alleviates the storage pressure on consortium blockchains. Furthermore, by storing only block data containing the current transaction information, the storage pressure on consensus nodes is significantly reduced, thereby improving the efficiency and performance of consensus nodes during consensus processing.
[0054] The data storage node is used for:
[0055] The data in the first ledger of the consortium blockchain is updated using the block data of the transaction information, wherein the first ledger is used to store the full data of the consortium blockchain. Each organization's data storage node adds the new block data to its local first ledger upon receiving it. This ensures that all data storage nodes hold the latest version of the blockchain data.
[0056] The blockchain data stored in the first ledger includes the blockchain's block data and state data describing the state of the world. The blockchain's block data is a record describing every transaction that actually occurs on the blockchain; the state data records the current state of each account and smart contract.
[0057] Based on this, by using each organization's data storage nodes to store the full amount of data in the blockchain, the degree of centralization of the blockchain can be reduced.
[0058] Optionally, the consensus node is also used for:
[0059] In response to the generation identifier of the block data, a data synchronization message is generated based on the block data, and the data synchronization message is synchronized to the data storage node; the synchronization message carries the block data.
[0060] It should be understood that each block typically has a unique identifier (such as a block hash) used to verify the integrity of the block.
[0061] In this embodiment, a data synchronization message can be generated based on the block data of the transaction information in response to the identifier. The format of this data synchronization message conforms to the network protocol so that all receiving nodes can correctly parse and process it.
[0062] In some examples, the synchronization message may also carry necessary metadata, such as block identifiers and generation time.
[0063] Based on this, data storage nodes are also used for:
[0064] Obtain the data synchronization message and parse the block data from the data synchronization message.
[0065] After receiving a data synchronization message, the data storage node first verifies the message's integrity and validity. For example, the data storage node verifies the integrity and validity of the data synchronization message by checking the block identifier and signature.
[0066] After successful verification, the data storage node extracts block data from the data synchronization message, including the block header and transaction list. The block header contains important metadata, such as the hash of the previous block, timestamp, and block identifier. The data storage node needs to parse this information to verify the correctness and order of the blocks. Then, the data storage node extracts and parses the transaction information in the block, ensuring that the format and content of each transaction conform to the network protocol. Afterward, the storage node stores the block data in its local first ledger to update the local first ledger and ensure its up-to-date and consistent state.
[0067] Based on this, the system provided in this application embodiment can effectively synchronize block data, ensuring that all data storage nodes can update the ledger status in a timely manner. This not only improves the reliability and security of the system but also enhances data consistency and collaboration capabilities among organizations.
[0068] In one alternative implementation, the consensus node is specifically used for:
[0069] The data synchronization message is sent to the preset data synchronization queue. The preset data synchronization queue is used to store data synchronization messages to be processed.
[0070] The preset data synchronization queue is used to temporarily store data synchronization messages to be processed, so as to ensure that data storage nodes can obtain and process these messages in an orderly manner, and to ensure that data storage nodes can effectively process messages even when the blockchain is under high transaction volume.
[0071] Data storage nodes are specifically used for:
[0072] Retrieve data synchronization messages to be processed from the data synchronization queue.
[0073] Data storage nodes read messages from the data synchronization queue in a first-in, first-out (FIFO) manner. After reading the data synchronization messages, they verify the validity and consistency of the block data. Then, they add the block data to the local first ledger and update the state of the first ledger.
[0074] For example, when a data storage node detects an unprocessed data synchronization message in the data synchronization queue, each organization's data storage node retrieves the unprocessed data synchronization message from the data synchronization queue.
[0075] Specifically, when an unprocessed data synchronization message is detected in the data synchronization queue, each organization's archive node retrieves the unprocessed data synchronization messages in the data synchronization queue according to the order in which they were generated.
[0076] Therefore, by using data synchronization queues, consortium blockchains can more effectively manage the propagation and processing of block data, ensuring system reliability and consistency. This not only improves the efficiency of data synchronization but also enhances collaboration among organizations.
[0077] In another alternative implementation, the consensus node is also used for:
[0078] Synchronize the data synchronization message to the data synchronization message interface.
[0079] In this embodiment, the consensus node sends data synchronization messages to the data synchronization message interface. The data synchronization message interface acts as a standardized communication point, responsible for receiving data synchronization messages from the consensus node and publishing them to all nodes listening on the interface.
[0080] The data synchronization message interface supports high-throughput and low-latency message delivery. Furthermore, this interface is scalable to accommodate future network growth and increased transaction volume.
[0081] Data storage nodes are also used for:
[0082] Listen to the data synchronization message interface of the consensus node to obtain the data synchronization message.
[0083] Data storage nodes continuously listen to the consensus node's data synchronization message interface to obtain data synchronization messages in real time. When this interface publishes a new data synchronization message, the node receives the message and verifies it to ensure message integrity and signature validity.
[0084] Based on this, the embodiments of this application utilize a data synchronization message interface, enabling the system to achieve a more efficient and reliable data synchronization process, ensuring that all data storage nodes can update the ledger status in a timely manner. This mechanism not only improves the system's response speed but also enhances collaboration and data consistency among organizations.
[0085] Optional, refer to Figure 4 Each organization also includes at least two ledger nodes;
[0086] The consensus node is also used for:
[0087] The block data is distributed to each of the organization's ledger nodes.
[0088] The dissemination can be achieved through point-to-point communication or broadcasting mechanisms, ensuring that all accounting nodes receive the latest block data.
[0089] The accounting node is used for:
[0090] The acquired block data is used to update the data in the second ledger of the consortium blockchain; wherein the second ledger is used to store a portion of the data of the consortium blockchain.
[0091] After receiving block data from the consensus nodes, each organization's ledger nodes update the consortium blockchain's secondary ledger using this data. This secondary ledger may be used to store specific types of data or transactions for easy querying and management. Based on this, the ledger nodes can provide an efficient interface for querying and analyzing specific types of data. This is extremely useful for applications requiring rapid access to specific information.
[0092] Before updating the second ledger, the ledger node can verify the integrity and validity of the block data. It ensures that the updated second ledger is consistent with other nodes by performing necessary consistency checks.
[0093] Based on this, consortium blockchains can achieve more efficient data management and ledger updates, ensuring that all organizations' accounting nodes can obtain and process block data in a timely manner. This not only improves the reliability and security of the system but also enhances data consistency and collaboration capabilities among organizations.
[0094] In some examples, the second ledger is used to store the latest acquired block data.
[0095] Therefore, the second ledger can be viewed as a caching layer for storing the most recently acquired block data. This allows the system to quickly access recent transactions and state updates.
[0096] In other words, by using a second ledger to store the latest acquired block data, the consortium blockchain system can achieve more efficient data management and query capabilities, thereby improving the system's response speed.
[0097] In other examples, the second ledger is used to store multiple blocks of data with relatively large weights, wherein the weights are determined according to the preset consensus mechanism.
[0098] In some examples, a block's weight is related to the complexity of its consensus process, the number of validating nodes, or the importance of transactions within the block. Based on this, weight can be used to represent the relative importance of a block within the entire blockchain, helping nodes prioritize and store critical data.
[0099] For example, blocks with higher weights may contain key transactions or important state updates.
[0100] By storing high-weight blocks in a second ledger, the system can access and process this important data more quickly, improving overall performance and ensuring that critical data is processed and stored in a timely manner.
[0101] Optionally, accounting nodes are also used for:
[0102] In response to the consensus node's read operation on the block, the block data is obtained from the corresponding data storage node.
[0103] In some examples, the ledger node receives a read request from the consensus node. The read request may involve data for a specific block, used for verification, analysis, or other purposes. The ledger node sends the request to the data storage node within the unified organization that stores the required block data. The request includes the identifier of the required block (such as the block hash or block height). Upon receiving the request, the data storage node retrieves the requested block data from its local storage.
[0104] The data storage nodes return the retrieved block data to the ledger nodes. Upon receiving the block data, the ledger nodes perform necessary processing and analysis, which may include verifying block integrity, examining transaction details, or performing other block-related operations. The consensus nodes then use the block data obtained from the ledger nodes to perform their required operations, such as verification, analysis, or decision-making.
[0105] Based on this, the consortium blockchain in this embodiment can support efficient data access and collaboration between ledger nodes and consensus nodes, ensuring the reliability and security of the system. It not only improves the efficiency of system data access but also enhances the collaboration capabilities between the system's nodes.
[0106] Reference Figure 4 This application provides a data processing method, which may include the following steps:
[0107] S401, the consensus node confirms the received transaction information containing signature information according to the preset consensus mechanism and generates block data of the transaction information.
[0108] S402, the consensus node uses the block data to overwrite the block data of the previous transaction information stored therein.
[0109] S403, the consensus node synchronizes the block data of the transaction information to the data storage node in each of the organizations.
[0110] S404, the data storage node updates the data in the first ledger of the consortium blockchain using the block data of the transaction information, wherein the first ledger is used to store the full data of the consortium blockchain.
[0111] Based on this, this embodiment sets up a consensus node and a data storage node within each organization of the consortium blockchain. The consensus node is used to confirm the received transaction information containing signature information and generate block data for the transaction information. Subsequently, the consensus node is also used to overwrite the stored block data of the previous transaction information using the newly generated block data. In other words, the consensus node only stores the block data of the current transaction information. Compared to existing technologies where consensus nodes need to store the entire blockchain data, this alleviates the storage pressure on the consortium blockchain.
[0112] Furthermore, since consensus nodes only store block data containing current transaction information, the storage pressure on consensus nodes is greatly reduced, thereby improving the efficiency and performance of consensus nodes during consensus processing.
[0113] Optionally, the consensus node synchronizes the block data of the transaction information to the data storage node in each of the organizations, including:
[0114] In response to the generation identifier of the block data, the consensus node generates a data synchronization message based on the block data and synchronizes the data synchronization message to the data storage node in each of the organizations; the data synchronization message carries the block data.
[0115] The data storage node obtains the data synchronization message and parses the block data from the data synchronization message.
[0116] Optionally, the consensus node synchronizes the data synchronization message to a preset data synchronization queue, or synchronizes the data message to a data synchronization message interface; wherein, the preset data synchronization queue is used to store data synchronization messages to be processed.
[0117] The data storage node retrieves the data synchronization message to be processed from the data synchronization queue, or retrieves the data synchronization message to be processed from the data synchronization queue.
[0118] Optionally, each of the organizations also includes at least two ledger nodes;
[0119] The method further includes: consensus nodes distributing the block data to each of the organization's ledger nodes, so that the ledger nodes use the block data to update the data in the second ledger of the consortium blockchain; wherein the second ledger is used to store a portion of the data of the consortium blockchain.
[0120] Optionally, the second ledger is used to store the latest acquired block data;
[0121] Alternatively, the second ledger may be used to store multiple blocks of data with relatively large weights, wherein the weights are determined according to the preset consensus mechanism.
[0122] Optionally, the method further includes:
[0123] The consensus node sends the read operation of the generated target block to the ledger node, so that the ledger node can obtain the block data corresponding to the target block from the data storage node of the corresponding organization.
[0124] It should be understood that the beneficial effects of the data processing method are the same as those of the data processing system in the first aspect, and will not be repeated here.
[0125] Reference Figure 5 This application also provides a data processing apparatus for use in a consensus node of a consortium blockchain; the consortium blockchain includes multiple organizations, each organization including a consensus node; the apparatus includes:
[0126] Consensus module 501: used to confirm the received transaction information containing signature information according to a preset consensus mechanism, and generate block data of the transaction information;
[0127] Storage synchronization module 502: used to overwrite the stored block data of the previous transaction information with the block data, and synchronize the block data of the transaction information to the data storage node in each of the organizations.
[0128] Optionally, the storage synchronization module 502 is further configured to: generate a data synchronization message based on the block data in response to the generation identifier of the block data, and synchronize the data synchronization message to the data storage node in each of the organizations; the data synchronization message carries the block data.
[0129] Optionally, the storage synchronization module 502 is further configured to: synchronize the data synchronization message to a preset data synchronization queue, or synchronize the data message to a data synchronization message interface; wherein the preset data synchronization queue is used to store data synchronization messages to be processed.
[0130] Optionally, the consensus module 501 is further configured to: distribute the block data to each of the organization's ledger nodes, so that the ledger nodes use the block data to update the data in the second ledger of the consortium blockchain; wherein the second ledger is used to store a portion of the data of the consortium blockchain.
[0131] The second ledger is used to store the latest acquired block data;
[0132] Alternatively, the second ledger may be used to store multiple blocks of data with relatively large weights, wherein the weights are determined according to the preset consensus mechanism.
[0133] Optionally, the storage synchronization module 502 is further configured to: send the read operation of the generated target block to the ledger node, so that the ledger node can obtain the block data corresponding to the target block from the data storage node of the corresponding organization.
[0134] Reference Figure 6 This application also provides a data processing device applied to a data storage node in a consortium blockchain; the consortium blockchain includes multiple organizations, each organization including a data storage; the device includes:
[0135] Processing module 601: used to update the data in the first ledger of the consortium blockchain using the block data of the transaction information, wherein the first ledger is used to store the full data of the consortium blockchain.
[0136] Optionally, the processing module 601 is further configured to: acquire the data synchronization message and parse the block data from the data synchronization message.
[0137] Optionally, the processing module 601 is further configured to: obtain a data synchronization message to be processed from the data synchronization queue, or obtain a data synchronization message to be processed from the data synchronization queue.
[0138] This application also provides a data processing device. Figure 7 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application. Figure 7 As shown, the data storage device may include: transceiver 121, processor 122, and memory 123.
[0139] The processor 122 executes computer execution instructions stored in the memory, causing the processor 122 to perform the scheme in the above-described data processing method embodiment. The processor 122 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0140] The memory 123 is connected to the processor 122 via the system bus and completes communication between them. The memory 123 is used to store computer program instructions.
[0141] Transceiver 121 can be used to obtain the task to be run and its configuration information.
[0142] The system bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. Transceivers are used to enable communication between database access devices and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) and may also include non-volatile memory.
[0143] This application also provides a chip for executing instructions, which is used to execute the data processing method described in the above embodiments.
[0144] This application also provides a computer-readable storage medium storing computer instructions, which, when executed on a computer, cause the computer to perform the technical solution of the data processing method described in the above embodiments.
[0145] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium, and when the at least one processor executes the computer program, it can implement the technical solution of the data processing method in the above embodiments.
[0146] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.
[0147] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to implement the solution of this embodiment according to actual needs.
[0148] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit composed of the above modules can be implemented in hardware or in the form of hardware plus software functional units.
[0149] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application.
[0150] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0151] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk or optical disc, etc.
[0152] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0153] The aforementioned storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0154] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. The processor and storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic control unit or main control device.
Claims
1. A data processing method, characterized in that, The method is applied to consensus nodes in a consortium blockchain; the consortium blockchain includes multiple organizations, each organization including one consensus node; the method includes: The received transaction information containing signature information is confirmed through a pre-defined consensus mechanism, and block data of the transaction information is generated. The block data is used to overwrite the block data of the previous transaction information, and the block data of the transaction information is synchronized to the data storage node in each of the organizations; Each of the organizations also includes at least two ledger nodes; The method further includes: distributing the block data to each of the organization's ledger nodes, so that the ledger nodes use the block data to update the data in the second ledger of the consortium blockchain; wherein the second ledger is used to store a portion of the data of the consortium blockchain; The second ledger is used to store multiple newly acquired block data; or, the second ledger is used to store multiple block data with larger weights, wherein the weights are determined according to the preset consensus mechanism.
2. The method according to claim 1, characterized in that, The step of synchronizing the block data of the transaction information to each data storage node in the organization includes: In response to the generation identifier of the block data, a data synchronization message is generated based on the block data, and the data synchronization message is synchronized to the data storage node in each of the organizations; the data synchronization message carries the block data.
3. The method according to claim 2, characterized in that: The method further includes: The data synchronization message is synchronized to a preset data synchronization queue, or the data synchronization message is synchronized to a data synchronization message interface; wherein, the preset data synchronization queue is used to store data synchronization messages to be processed.
4. The method according to claim 1, characterized in that, The method further includes: The read operation of the generated target block is sent to the ledger node so that the ledger node can obtain the block data corresponding to the target block from the data storage node of the corresponding organization.
5. A data processing method, characterized in that, It is used in the data storage nodes of consortium blockchains; The consortium blockchain includes multiple organizations, each organization including a data storage node; the method includes: The data in the first ledger of the consortium blockchain is updated using the block data of transaction information, wherein the first ledger is used to store the full data of the consortium blockchain; Each of the organizations also includes at least two ledger nodes; The method further includes: distributing the block data to each of the organization's ledger nodes, so that the ledger nodes use the block data to update the data in the second ledger of the consortium blockchain; wherein the second ledger is used to store a portion of the data of the consortium blockchain; The second ledger is used to store multiple newly acquired block data; or, the second ledger is used to store multiple block data with larger weights, wherein the weights are determined according to a preset consensus mechanism.
6. The method according to claim 5, characterized in that: The method further includes: Obtain the data synchronization message and parse the block data from the data synchronization message.
7. The method according to claim 5, characterized in that: The data synchronization message obtained includes: Retrieve pending data synchronization messages from the data synchronization queue, or retrieve pending data synchronization interfaces from the data synchronization queue.
8. A data processing system, characterized in that, In a consortium blockchain, the system comprises multiple organizations, each of which includes a consensus node and a data storage node. The consensus node is used for: The received transaction information containing signature information is confirmed through a pre-defined consensus mechanism, and block data of the transaction information is generated. The block data is used to overwrite the block data of the previous transaction information, and the block data of the transaction information is synchronized to the data storage node in each of the organizations; The data storage node is used for: The data in the first ledger of the corresponding consortium blockchain is updated using the block data of the transaction information, wherein the first ledger is used to store the full data of the consortium blockchain; Each of the organizations also includes at least two ledger nodes; The consensus node is also used to: distribute the block data to each of the organization's ledger nodes; The ledger node is used to: update the data in the second ledger of the consortium blockchain using the acquired block data; wherein, the second ledger is used to store a portion of the data of the consortium blockchain; The second ledger is used to store multiple newly acquired block data; or, the second ledger is used to store multiple block data with larger weights, wherein the weights are determined according to the preset consensus mechanism.
9. A data processing apparatus, characterized in that, The device is applied to a consensus node in a consortium blockchain; the consortium blockchain includes multiple organizations, each organization including one consensus node; the device includes: Consensus module: used to confirm the received transaction information containing signature information according to a preset consensus mechanism, and generate block data of the transaction information; Storage synchronization module: used to overwrite the stored block data of the previous transaction information with the block data, and synchronize the block data of the transaction information to the data storage node in each of the organizations; Each of the organizations also includes at least two ledger nodes; The consensus module is further configured to: distribute the block data to each of the organization's ledger nodes, so that the ledger nodes can use the block data to update the data in the second ledger of the consortium blockchain; wherein the second ledger is used to store a portion of the data of the consortium blockchain; The second ledger is used to store multiple newly acquired block data; or, the second ledger is used to store multiple block data with larger weights, wherein the weights are determined according to the preset consensus mechanism.
10. A data processing apparatus, wherein the data processing apparatus is configured to implement the method according to any one of claims 5-7 when performing an operation, characterized in that, It is used in the data storage nodes of consortium blockchains; The consortium blockchain includes multiple organizations, each organization including a data storage node; the device includes: Processing module: used to update the data in the first ledger of the consortium blockchain using the block data of transaction information, wherein the first ledger is used to store the full data of the consortium blockchain.
11. A data processing device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the method of any one of claims 1-4, or the method of any one of claims 5-7.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1-4, or the method of any one of claims 5-7.
13. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1-4, or the method of any one of claims 5-7.
Citation Information
Patent Citations
A block chain data networked storage and transfer method
CN109558453A
Data processing method and device of block chain network, product, equipment and medium
CN116980155A