Data processing method and device of block chain system and block chain system
In the blockchain system, the target node of the second-level blockchain sends block data and status update transactions to the node set of the first-level blockchain, and the node set performs signature verification and storage, solving the high-level problems in the existing technology. Issues of bandwidth and high storage costs, achieving a balance between data security and cost-effectiveness.
Patent Information
- Application Number
- CN202411589026.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-01-21
AI Technical Summary
In the existing blockchain system, transaction data of the second-layer blockchain grid is stored in the first-layer blockchain network, resulting in high bandwidth demand and high storage costs, or it is difficult to ensure that it is stored off-chain. The security of transaction data.
By sending target block data and status update transactions from the target node of the second-tier blockchain to the node set of the first-tier blockchain, the node set performs signature verification and storage, and is finally updated by the management contract to ensure data security. reliability and reasonable bandwidth usage.
On the premise of ensuring data security, the bandwidth requirements and data storage costs of the first-layer blockchain are reduced.
Smart Images

Figure CN119341725A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to blockchain technology, and in particular to a data processing method and device for a blockchain system, and a blockchain system. Background Art
[0002] The convolution technology is a technology that allows the second-layer blockchain to submit the latest block status hash value and the compressed transaction data packet to a specific contract of the first-layer blockchain in the form of a transaction, and then the first-layer blockchain node network reaches a consensus and stores this data. The convolution technology can be applied to the expansion of the blockchain system. Through the convolution method, the fees required to execute transactions or smart contracts and the time required to process transactions are greatly reduced.
[0003] In a related convolution technology, the transaction data of the second-layer blockchain grid is stored in the first-layer blockchain network. Although this storage method of transaction data has high security, it requires high bandwidth of the first-layer blockchain network and has high storage costs for transaction data.
[0004] In another convolution technology, the transaction data of the second-layer blockchain grid is stored off-chain. Although this method of storing transaction data has low bandwidth requirements for the first-layer blockchain network and low storage costs for transaction data, it is difficult to ensure the security of transaction data. Summary of the invention
[0005] The embodiments of the present disclosure provide a data processing method, device and blockchain system for a blockchain system to solve the above problems.
[0006] A first aspect of the embodiments of the present disclosure provides a data processing method for a blockchain system, including:
[0007] The target node of the second-layer blockchain sends the target block data and the state update transaction corresponding to the target block data to the node set of the first-layer blockchain, wherein the node set includes some nodes of the first-layer blockchain;
[0008] In response to the target node receiving the signature result of the node set on the state update transaction, sending the state update transaction with the signature result to the management contract in the first layer blockchain;
[0009] The management contract performs signature verification on the status update transaction based on the signature result;
[0010] In response to the signature verification being successful, the management contract is updated based on the state update transaction.
[0011] In some embodiments of the present disclosure, the performing signature verification on the state update transaction based on the signature result includes:
[0012] Determine a signature result parameter based on the signature result, wherein the signature result parameter includes at least one of the number of signature nodes, the proportion of signature nodes, and the node identifier of the signed node;
[0013] In response to the signature result parameter satisfying the parameter condition corresponding to the signature verification passing, it is determined that the signature verification of the status update transaction passes.
[0014] In some embodiments of the present disclosure, the target node of the second-layer blockchain sends the target block data and the state update transaction corresponding to the target block data to the node set of the first-layer blockchain, including:
[0015] The target node sends the target block data and the status update data to the node set by way of off-chain transmission.
[0016] In some embodiments of the present disclosure, between the step of the target node of the second-layer blockchain sending the target block data and the state update transaction corresponding to the target block data to the node set of the first-layer blockchain, and the step of sending the state update transaction with the signature result to the management contract in the first-layer blockchain in response to the target node receiving the signature result of the node set for the state update transaction, the following is also included:
[0017] The node set detects whether the target block data carries the signature of the target node;
[0018] In response to detecting that the target block data carries the signature of the target node, the node set stores the target block data and signs the status update transaction to generate the signature result.
[0019] In some embodiments of the present disclosure, between the step of the target node of the second-layer blockchain sending the target block data and the state update transaction corresponding to the target block data to the node set of the first-layer blockchain, and the step of sending the state update transaction with the signature result to the management contract in the first-layer blockchain in response to the target node receiving the signature result of the node set for the state update transaction, the following is also included:
[0020] The node set executes the target block data to obtain a first state;
[0021] The set of nodes extracts a second state from the state update transaction;
[0022] In response to the first state being consistent with the second state, the node set includes the target block data and signs the state update transaction to generate the signature result.
[0023] In some embodiments of the present disclosure, before the target node of the second-layer blockchain sends the target block data and the state update transaction corresponding to the target block data to the node set of the first-layer blockchain, it also includes:
[0024] The management contract obtains the maximum storage capacity and security detection result of at least one node in the first-layer blockchain;
[0025] The management contract determines the node set from the at least one node based on the maximum storage capacity and security detection result of the at least one node.
[0026] In some embodiments of the present disclosure, it further includes:
[0027] In response to detecting that a ratio between a current storage capacity and a maximum storage capacity of a first node in the node set is greater than a preset ratio threshold, a prompt is given to the first node.
[0028] A second aspect of the embodiments of the present disclosure provides a data processing device of a blockchain system, including:
[0029] A first communication module, configured for a target node of the second-layer blockchain to send target block data and a state update transaction corresponding to the target block data to a node set of the first-layer blockchain, wherein the node set includes some nodes of the first-layer blockchain;
[0030] A second communication module is configured to send a state update transaction with the signature result to a management contract in the first-layer blockchain in response to the target node receiving the signature result of the state update transaction by the node set;
[0031] A signature verification module, used for the management contract to perform signature verification on the status update transaction based on the signature result;
[0032] The status update module is used to update the management contract based on the status update transaction in response to the signature verification being passed.
[0033] In some embodiments of the present disclosure, the signature verification module is used to determine signature result parameters based on the signature result, wherein the signature result parameters include at least one of the number of signature nodes, the proportion of signature nodes, and the node identification of the signed nodes; the signature verification module is also used to determine that the signature verification of the status update transaction is passed in response to the signature result parameters satisfying the parameter conditions corresponding to the signature verification passing.
[0034] In some embodiments of the present disclosure, the first communication module is used for the target node to send the target block data and the status update data to the node set through off-chain transmission.
[0035] In some embodiments of the present disclosure, the device further includes:
[0036] A first processing module, used to detect whether the target block data carries the signature of the target node;
[0037] The first processing module is further configured to, in response to detecting that the target block data carries the signature of the target node, store the target block data, sign the status update transaction, and generate the signature result.
[0038] In some embodiments of the present disclosure, the device further includes:
[0039] A second processing module, configured to execute the target block data to obtain a first state;
[0040] The second processing module is further used to extract the second state from the state update transaction, and the second processing module is further used to respond to the first state being consistent with the second state, the node set including the target block data, and sign the state update transaction to generate the signature result.
[0041] In some embodiments of the present disclosure, the device further includes:
[0042] An acquisition module, used for the management contract to acquire the maximum storage capacity and security detection result of at least one node in the first-layer blockchain;
[0043] A node set determination module is used for the management contract to determine the node set from the at least one node based on the maximum storage capacity and security detection result of the at least one node.
[0044] In some embodiments of the present disclosure, the device further includes:
[0045] The prompt module is used to prompt the first node in the node set in response to detecting that the ratio between the current storage capacity and the maximum storage capacity of the first node is greater than a preset ratio threshold.
[0046] A third aspect of the embodiments of the present disclosure provides a blockchain system, including:
[0047] The second layer blockchain is used to execute blockchain transactions and generate corresponding block data and status update transactions;
[0048] A layer of blockchain, including a collection of nodes and smart contracts;
[0049] The apparatus of the second aspect is used to execute the method of the first aspect.
[0050] The data processing method, device and blockchain system of the blockchain system of the disclosed embodiment do not require all nodes of the first-layer blockchain to store and consensus on the block data of the second-layer blockchain. Instead, the block data of the second-layer blockchain is stored by a node set including some nodes of the first-layer blockchain. Moreover, since the first-layer blockchain signs and updates the status of the block data of the second-layer blockchain, the bandwidth requirements for the first-layer blockchain are low and the data cost is low while ensuring data security.
[0051] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0053] The present disclosure may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
[0054] Figure 1 This is a flowchart of a data processing method of a blockchain system in one embodiment of the present disclosure;
[0055] Figure 2 is a working principle diagram of a blockchain system in an example of the present disclosure;
[0056] Figure 3 is a timing diagram of a blockchain system in an example of the present disclosure;
[0057] Figure 4 is a flowchart of step S3 in some embodiments of the present disclosure;
[0058] Figure 5 This is a structural block diagram of a data processing device of a blockchain system in one embodiment of the present disclosure;
[0059] Figure 6 is a structural block diagram of a data processing device of a blockchain system in some other embodiments of the present disclosure;
[0060] Figure 7 The structure block diagram of an electronic device in one embodiment of the present disclosure. DETAILED DESCRIPTION
[0061] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.
[0062] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.
[0063] It should also be understood that in the embodiments of the present disclosure, “plurality” may refer to two or more than two, and “at least one” may refer to one, two, or more than two.
[0064] It should also be understood that any component, data or structure mentioned in the embodiments of the present disclosure can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0065] In addition, the term "and / or" in the present disclosure is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present disclosure generally indicates that the associated objects before and after are in an "or" relationship.
[0066] It should also be understood that the description of the various embodiments in the present disclosure focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0067] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0068] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0069] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0070] The embodiments of the present disclosure can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.
[0071] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.
[0072] Figure 1 The following is a flow chart of a data processing method of a blockchain system in one embodiment of the present disclosure. Figure 1 As shown, the data processing method of the blockchain system includes the following steps:
[0073] S1: The target node of the second-layer blockchain sends the target block data and the state update transaction corresponding to the target block data to the node set of the first-layer blockchain. The node set includes some nodes of the first-layer blockchain.
[0074] The blockchain system in the disclosed embodiment includes a first-layer blockchain and a second-layer blockchain.
[0075] Among them, the second-layer blockchain is used for block transactions, and generates block data and corresponding state update transactions based on block transactions. Blockchain state update transactions refer to updating the state of the blockchain through transactions in the blockchain network. In the blockchain, state updates usually involve modifying the data stored on the blockchain. This data can be account balances, state variables of smart contracts, etc. In Ethereum, state updates are achieved by executing transactions. Each transaction modifies the state of the blockchain, and these modifications are recorded in a new block. Through blockchain state update transactions, the blockchain can ensure the integrity and consistency of data while providing a high degree of transparency and security.
[0076] A node set is set in the first-layer blockchain, and the node set includes some nodes of the first-layer blockchain but not all nodes, and is used to store the transaction blocks of the second-layer blockchain through the node set, rather than all nodes of the first-layer blockchain storing and consensus on the transaction blocks of the second-layer blockchain. Since the first-layer blockchain has high security and high transaction fees, compared with the method of storing and consensus on the transaction blocks of the second-layer blockchain by all nodes of the first-layer blockchain, the method of storing the second-layer block data by the node set of the first-layer blockchain in the embodiment of the disclosure can have low bandwidth requirements and low data costs for the first-layer blockchain while ensuring security.
[0077] When any consensus node of the second-layer blockchain generates a new block, all consensus nodes of the second-layer blockchain need to reach consensus on the new block and generate corresponding status update transactions for the new block.
[0078] In the data processing method of the blockchain system of the embodiment of the present disclosure, the target node is taken as any consensus node of the layer blockchain, and the target block data is taken as the block data corresponding to the new block for explanation.
[0079] The target node sends the target block data and the corresponding state update transaction to the node set of the first-layer blockchain. The node set of the first-layer blockchain can sign the state update transaction and feedback the signature result of the state update transaction to the target node.
[0080] S2: In response to the target node receiving the signature result of the state update transaction from the node set, the target node sends the state update transaction with the signature result to the management contract in the first layer of the blockchain.
[0081] The first-layer blockchain is also equipped with a management contract, which can manage the block data and status update transactions of the second-layer blockchain by communicating with the node set and target node of the first-layer blockchain.
[0082] When the target node receives the signature result of the state update transaction fed back by the node set of the first layer blockchain, it sends the state update transaction carrying the signature result to the management contract.
[0083] S3: The management contract verifies the signature of the status update transaction based on the signature result.
[0084] The management contract uses a preset signature verification method to perform signature verification on the signature result of the status update transaction, thereby verifying whether the signature result of the status update transaction passes.
[0085] S4: In response to the signature verification being successful, the management contract is updated based on the state update transaction.
[0086] After the management contract verifies the signature result of the status update transaction, the management contract is updated based on the status update transaction and provides a query port for users to query.
[0087] Figure 2 This is a working principle diagram of a blockchain system in an example of the present disclosure. Figure 2 As shown, the first layer network is a network composed of the first layer blockchain, and the second layer network is a network composed of the second layer blockchain. The first layer network node subset is a node set consisting of some nodes of the first layer blockchain. In this example, the first layer network node subset is a node set including node 1, node 3 and node 4. The second layer management contract located in the first layer blockchain is used to manage the status update transactions of the second layer network, and manage the block data of the second layer network through the first layer network node subset. In addition, the second layer management contract also stores the information of the first layer network node subset.
[0088] After the target node in the second-layer network generates the target block data and the status update transaction, it synchronizes the target block data to the first-layer network node subset and receives the signature result fed back by the first-layer network node subset. The target node in the second-layer network sends the status update transaction carrying the signature result to the second-layer management contract through the contract interface provided by the second-layer management contract. The second-layer management contract verifies the signature result and performs status update according to the status update transaction of the target block data after the signature verification is passed.
[0089] Figure 3 is a timing diagram of a blockchain system in an example of the present disclosure. Figure 3 As shown in the figure, after the initialization of the second-layer management contract of the first-layer network is completed, the target node of the second-layer network sends the generated new block and status update transaction to the subset of the first-layer network nodes, requests the subset of the first-layer network nodes to sign the transaction, and obtains the signature result. After the target node of the second-layer network receives the signature result fed back by the subset of the first-layer network nodes, it sends the status update transaction carrying the signature result to the second-layer management contract of the first-layer network. After the second-layer management contract verifies the signature result, it updates the second-layer network status for the status update transaction corresponding to the target block data. After that, the user can query the status update transaction and block data by the second-layer management contract, and can verify the second-layer network status through the preset verification method.
[0090] In this embodiment, since it is not necessary for all nodes of the first-layer blockchain to store and consensus on the block data of the second-layer blockchain, the block data of the second-layer blockchain is stored by a node set including some nodes of the first-layer blockchain, and since the first-layer blockchain signs and updates the status of the block data of the second-layer blockchain, under the premise of ensuring data security, the bandwidth requirements for the first-layer blockchain are low and the data cost is low.
[0091] Figure 4 FIG. 1 is a flow chart of step S3 in some embodiments of the present disclosure. Figure 4 As shown, step S3 includes the following steps:
[0092] S3-1: Based on the signature result, determine the signature result parameters, wherein the signature result parameters include at least one of the number of signature nodes, the proportion of signature nodes, and the node identification of the signed node.
[0093] The target node can count the signature results of the node set for the state update transaction and obtain the signature result parameters based on the statistical results. For example, the target node can count the number of signed nodes and define it as the number of signed nodes; the target node can also calculate the ratio between the number of signed nodes and the total number of nodes in the node set and define it as the number of signed nodes; the target node can also determine the node information of each signed node based on the node identifier of the signed node.
[0094] S3-2: In response to the signature result parameters satisfying the parameter conditions corresponding to the signature verification passing, determining that the signature verification of the status update transaction passes.
[0095] The management contract determines whether the signature result parameters meet the parameter conditions according to the corresponding parameter conditions of the given signature verification. For example, the parameter conditions can be given a quantity threshold, a ratio threshold, and a given node identifier. When the number of signature nodes is greater than the quantity threshold, the signature node ratio is greater than the ratio threshold, and the node identifiers of the signed nodes include the given node identifier, it is determined that the signature verification of the state update transaction has passed, otherwise it is determined that the signature verification of the state update transaction has failed.
[0096] In this embodiment, the signature result parameters determined by the signature result are compared with the parameter conditions corresponding to the verification, so as to quickly and accurately verify whether the status update transaction is passed.
[0097] In some embodiments of the present disclosure, step S1 includes: the target node sends the target block data and status update data to the node set through off-chain transmission.
[0098] The target node can send the target block data and the corresponding status update transaction to each node in the node set within the first layer of the blockchain through off-chain transmission instead of through the communication network of the blockchain system, thereby realizing the transmission of block data and status update transactions without occupying the bandwidth of the first layer of the blockchain.
[0099] In this embodiment, the target node sends the target block data and the corresponding status update transaction to each node in the node set in the first-layer blockchain through off-chain transmission, so that the transmission of block data and status update transactions can be achieved without occupying the bandwidth of the first-layer blockchain.
[0100] In some embodiments of the present disclosure, between step S1 and step S2, it may also include: the node set detects whether the target block data carries the signature of the target node; in response to detecting that the target block data carries the signature of the target node, the node set stores the target block data, and signs the status update transaction to generate a signature result.
[0101] For each node in the node set within the first-layer blockchain, it is possible to detect whether the target block data carries the signature of the target node. If it is detected that the target block data carries the signature of the target node, it can be confirmed that the target block data originates from the second-layer blockchain, and it can be confirmed that the signature of the target block data is consistent with the initiator of the status update transaction.
[0102] In this embodiment, by detecting whether the target block data carries the signature of the target node, it is possible to accurately confirm whether the target block data comes from the second-layer blockchain, thereby ensuring the source credibility of the data stored in the node set of the first-layer blockchain.
[0103] In some embodiments of the present disclosure, between step S1 and step S2, it may also include: the node set executes the target block data to obtain a first state; the node set extracts the second state from the state update transaction; in response to the first state being consistent with the second state, the node set includes the target block data, and signs the state update transaction to generate a signature result.
[0104] For each node in the node set within the first-layer blockchain, the real state of the target block data can be obtained by executing the target block data, which is recorded as the first state; the first state is compared with the second state extracted from the state update transaction to see if they are consistent; if the first state and the second state are consistent, it is confirmed that the state update transaction sent by the target node is correct, and the target block data is saved; if the first state and the second state are inconsistent, it is confirmed that the state update transaction sent by the target node is wrong, and the target block data is not saved.
[0105] In this embodiment, by comparing the first state obtained by executing the target block data with the second state extracted from the state update transaction sent by the target node, it is possible to verify whether the state update transaction sent by the target node is accurate. By saving the target block data when the first state is consistent with the second state, it is ensured that the block data stored in the node set of the first-layer blockchain corresponds to the state update transaction.
[0106] In some embodiments of the present disclosure, before step S1, the method may also include: the management contract obtains the maximum storage capacity and security detection result of at least one node in a layer of blockchain; the management contract determines a node set from at least one node based on the maximum storage capacity and security detection result of at least one node.
[0107] The management contract in the first-layer blockchain can send a request for storage capacity and security test results to at least one node in the first-layer blockchain, and receive the maximum storage capacity and security test results fed back by the at least one node, and then select at least one node that meets the preset storage capacity conditions and security conditions from the at least one node as a node in the node set according to the maximum storage capacity and security test results of the at least one node. Among them, at least one node of the first-layer blockchain can be determined by self-application or by designated method. For example, some or all nodes in the first-layer blockchain except the management contract can be used as candidate nodes for whether to join the node set. The security test result can be the test result issued after the security test of each candidate node by the trusted security detection structure.
[0108] In this embodiment, the management contract of the first-layer blockchain can quickly and reasonably determine the nodes to be added to the node set from at least one node based on the maximum storage capacity and security detection results of at least one node in the first-layer blockchain, thereby ensuring the data storage capacity and data storage security of the node set.
[0109] In some embodiments of the present disclosure, the data processing method of the blockchain system may further include the following steps: in response to detecting that the ratio between the current storage capacity and the maximum storage capacity of the first node in the node set is greater than a preset ratio threshold, prompting the first node.
[0110] When the management contract detects that the ratio between the current storage capacity and the maximum storage capacity of the first node in the node set is greater than the preset ratio threshold, indicating that the storage space of the first node is insufficient, the first node may be prompted to expand the storage capacity. The first node may be any node in the node set. Exemplarily, the preset ratio threshold may range from 80% to 95%.
[0111] In this embodiment, when it is detected that the ratio between the current storage capacity and the maximum storage capacity of the first node in the node set is greater than the preset ratio threshold, the first node can be informed of the insufficient storage capacity by prompting the first node, which helps the first node to expand the storage capacity, thereby ensuring that the first node can normally store the block data of the second-layer blockchain.
[0112] Figure 5is a structural block diagram of a data processing device of a blockchain system in some embodiments of the present disclosure. Figure 5 As shown, the data processing device of the blockchain system includes:
[0113] The first communication module 100 is used for the target node of the second-layer blockchain to send the target block data and the state update transaction corresponding to the target block data to the node set of the first-layer blockchain, wherein the node set includes some nodes of the first-layer blockchain;
[0114] The second communication module 200 is used to send the state update transaction with the signature result to the management contract in the first layer of blockchain in response to the target node receiving the signature result of the state update transaction from the node set;
[0115] The signature verification module 300 is used to manage the contract to perform signature verification on the status update transaction based on the signature result;
[0116] The state update module 400 is used to manage the contract to update based on the state update transaction in response to the signature verification passing.
[0117] In some embodiments of the present disclosure, the signature verification module 300 is used to determine the signature result parameters based on the signature result, wherein the signature result parameters include at least one of the number of signature nodes, the proportion of signature nodes, and the node identification of the signed nodes; the signature verification module 300 is also used to determine that the signature verification of the status update transaction is passed in response to the signature result parameters satisfying the parameter conditions corresponding to the signature verification passing.
[0118] In some embodiments of the present disclosure, the first communication module 100 is used for the target node to send target block data and status update data to the node set through off-chain transmission.
[0119] Figure 6 is a structural block diagram of a data processing device of a blockchain system in some other embodiments of the present disclosure. Figure 6 As shown, the data processing device of the blockchain system also includes:
[0120] The first processing module 500 is used to detect whether the target block data carries the signature of the target node;
[0121] The first processing module 500 is further used to store the target block data in response to detecting that the target block data carries the signature of the target node, and to sign the status update transaction to generate a signature result.
[0122] In some embodiments of the present disclosure, the data processing device of the blockchain system further includes:
[0123] The second processing module 600 is used to execute the target block data to obtain a first state;
[0124] Among them, the second processing module 600 is also used to extract the second state from the state update transaction. The second processing module 600 is also used to respond to the first state being consistent with the second state, the node set includes the target block data, and signs the state update transaction to generate a signature result.
[0125] In some embodiments of the present disclosure, the data processing device of the blockchain system further includes:
[0126] An acquisition module 700 is used to manage the contract to obtain the maximum storage capacity and security detection results of at least one node in a layer of blockchain;
[0127] The node set determination module 800 is used to manage the contract and determine a node set from at least one node based on the maximum storage capacity and security detection result of at least one node.
[0128] In some embodiments of the present disclosure, the data processing device of the blockchain system further includes:
[0129] The prompt module 900 is used to prompt the first node in response to detecting that the ratio between the current storage capacity and the maximum storage capacity of the first node in the node set is greater than a preset ratio threshold.
[0130] It should be noted that the specific implementation of the data processing device of the blockchain system of the embodiment of the present disclosure is similar to the specific implementation of the data processing method of the blockchain system of the embodiment of the present disclosure, and the technical effect of the data processing device of the blockchain system of the embodiment of the present disclosure is similar to the technical effect of the data processing method of the blockchain system of the embodiment of the present disclosure. Please refer to the description of the data processing method of the blockchain system for details. In order to reduce redundancy, it is not repeated here.
[0131] In addition, the present disclosure also provides a blockchain system, including:
[0132] The second layer blockchain is used to execute blockchain transactions and generate corresponding block data and status update transactions;
[0133] A layer of blockchain, including a collection of nodes and smart contracts;
[0134] The data processing device of the blockchain system described in the above embodiment is used to execute the data processing method of the blockchain system described in the above embodiment.
[0135] Below, reference Figure 7 To describe the electronic device according to the embodiment of the present disclosure. Figure 7 As shown, the electronic device includes one or more processors and memory.
[0136] The processor may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0137] The memory may store one or more computer program products, and the memory may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program products may be stored on the computer-readable storage medium, and the processor may run the computer program product to implement the data processing method of the blockchain system of each embodiment of the present disclosure described above and / or other desired functions.
[0138] In one example, the electronic device may further include: an input device and an output device, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0139] In addition, the input device may also include, for example, a keyboard, a mouse, and the like.
[0140] The output device can output various information to the outside, including determined distance information, direction information, etc. The output device can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0141] Of course, to simplify, Figure 7 Only some of the components related to the present disclosure in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device may further include any other appropriate components.
[0142] In addition to the above-mentioned method and device, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to perform the steps in the data processing method of the blockchain system according to various embodiments of the present disclosure described in the above part of this specification.
[0143] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0144] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, causes the processor to execute the steps of the data processing method of the blockchain system according to various embodiments of the present disclosure described in the above part of this specification.
[0145] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0146] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.
[0147] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0148] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.
[0149] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
[0150] It should also be noted that in the apparatus, device and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0151] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0152] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A data processing method for a blockchain system, characterized in that: include: The target node of the second-layer blockchain sends the target block data and the state update transaction corresponding to the target block data to the node set of the first-layer blockchain, wherein the node set includes some nodes of the first-layer blockchain; In response to the target node receiving the signature result of the node set on the state update transaction, sending the state update transaction with the signature result to the management contract in the first layer blockchain; The management contract performs signature verification on the status update transaction based on the signature result; In response to the signature verification being passed, the management contract is updated based on the state update transaction.
2. The method according to claim 1, characterized in that The performing signature verification on the status update transaction based on the signature result includes: Determine a signature result parameter based on the signature result, wherein the signature result parameter includes at least one of the number of signature nodes, the proportion of signature nodes, and the node identifier of the signed node; In response to the signature result parameter satisfying the parameter condition corresponding to the signature verification passing, it is determined that the signature verification of the status update transaction passes.
3. The method according to claim 1, characterized in that: The target node of the second-layer blockchain sends the target block data and the state update transaction corresponding to the target block data to the node set of the first-layer blockchain, including: The target node sends the target block data and the status update data to the node set by way of off-chain transmission.
4. The method according to claim 1 or 3, characterized in that: Between the step of the target node of the second-layer blockchain sending the target block data and the state update transaction corresponding to the target block data to the node set of the first-layer blockchain, and the step of sending the state update transaction with the signature result to the management contract in the first-layer blockchain in response to the target node receiving the signature result of the state update transaction from the node set, the step also includes: The node set detects whether the target block data carries the signature of the target node; In response to detecting that the target block data carries the signature of the target node, the node set stores the target block data and signs the status update transaction to generate the signature result.
5. The method according to claim 1 or 2, characterized in that: Between the step of the target node of the second-layer blockchain sending the target block data and the state update transaction corresponding to the target block data to the node set of the first-layer blockchain, and the step of sending the state update transaction with the signature result to the management contract in the first-layer blockchain in response to the target node receiving the signature result of the state update transaction from the node set, the step also includes: The node set executes the target block data to obtain a first state; The set of nodes extracts a second state from the state update transaction; In response to the first state being consistent with the second state, the node set includes the target block data and signs the state update transaction to generate the signature result.
6. The method according to any one of claims 1 to 3, characterized in that: Before the target node of the second-layer blockchain sends the target block data and the state update transaction corresponding to the target block data to the node set of the first-layer blockchain, it also includes: The management contract obtains the maximum storage capacity and security detection result of at least one node in the first-layer blockchain; The management contract determines the node set from the at least one node based on the maximum storage capacity and security detection result of the at least one node.
7. The method according to claim 6, characterized in that Also includes: In response to detecting that a ratio between a current storage capacity and a maximum storage capacity of a first node in the node set is greater than a preset ratio threshold, a prompt is given to the first node.
8. A data processing device for a blockchain system, characterized in that: include: A first communication module, configured for a target node of the second-layer blockchain to send target block data and a state update transaction corresponding to the target block data to a node set of the first-layer blockchain, wherein the node set includes some nodes of the first-layer blockchain; A second communication module is configured to send a state update transaction with the signature result to a management contract in the first-layer blockchain in response to the target node receiving the signature result of the state update transaction by the node set; A signature verification module, used for the management contract to perform signature verification on the status update transaction based on the signature result; The status update module is used to update the management contract based on the status update transaction in response to the signature verification being passed.
9. The device according to claim 8, characterized in that The signature verification module is used to determine a signature result parameter based on the signature result, wherein the signature result parameter includes at least one of the number of signature nodes, the proportion of signature nodes, and the node identification of the signed node; the signature verification module is also used to determine that the signature verification of the status update transaction has passed in response to the signature result parameter satisfying the parameter condition corresponding to the signature verification passing.
10. The device according to claim 8, characterized in that The first communication module is used for the target node to send the target block data and the status update data to the node set through off-chain transmission.
11. The device according to claim 8 or 10, characterized in that Also includes: A first processing module, used to detect whether the target block data carries the signature of the target node; The first processing module is further configured to, in response to detecting that the target block data carries the signature of the target node, store the target block data, sign the status update transaction, and generate the signature result.
12. The device according to claim 8 or 10, characterized in that Also includes: A second processing module, configured to execute the target block data to obtain a first state; The second processing module is further used to extract the second state from the state update transaction, and the second processing module is further used to respond to the first state being consistent with the second state, the node set including the target block data, and sign the state update transaction to generate the signature result.
13. A blockchain system, characterized in that: include: The second layer blockchain is used to execute blockchain transactions and generate corresponding block data and status update transactions; A layer of blockchain, including a collection of nodes and smart contracts; The device according to any one of claims 8 to 12 is used to execute the method according to any one of claims 1 to 7.
Citation Information
Cited By
Block chain transaction processing method and system for solving mobility splitting
CN120013667A