A blockchain-based transaction suspension method, device and equipment
Patent Information
- Application Number
- CN202211540016.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-02
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2042-12-02
AI Technical Summary
[0003]本说明书实施例提供的一种基于区块链的交易暂停方法、装置及设备,可以有效解决现有区块链网络无法处理交易暂停的问题
[0039]交易发起方节点在发起目标交易时,通过判断目标交易的发起时刻与交易暂停时段的起始时刻的时间间隔是否小于预设时间间隔,若时间间隔小于预设时间间隔,则在交易存证中设置第一交易处理规则,使得参与目标交易的各交易参与方节点在非交易暂停时段进行交易处理。
Smart Images

Figure CN115879938B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular to a blockchain-based method, apparatus, and device for suspending transactions. Background Technology
[0002] In existing technology, for customers transferring funds, due to agreements with banks, there are fixed time periods each day for internal fund management to cover intraday overdrafts, such as 23:45-0:00. It is necessary to avoid initiating or processing recent transactions during this period. Therefore, if a transaction is indeed initiated during this period, it needs to be delayed until after the end of the period, i.e., after 0:00, before being sent to the bank for processing. Summary of the Invention
[0003] The embodiments of this specification provide a blockchain-based transaction suspension method, apparatus, and device, which can effectively solve the problem that existing blockchain networks cannot handle transaction suspension.
[0004] To solve the above-mentioned technical problems, the embodiments in this specification are implemented as follows:
[0005] This specification provides an embodiment of a blockchain-based transaction suspension method. The blockchain network includes at least one transaction initiator node and at least one transaction participant node. The method is applied to the transaction initiator node and includes:
[0006] When initiating a target transaction, it is determined whether the time interval between the initiation time of the target transaction and the start time of the transaction suspension period is less than a preset time interval, and a first determination result is obtained, wherein the initiation time is earlier than the start time.
[0007] If the first judgment result indicates that the time interval is less than the preset time interval, then a first transaction processing rule is set in the transaction record of the target transaction. The first transaction processing rule is used to enable each transaction participant node participating in the target transaction to perform transaction processing during non-transaction suspension periods.
[0008] The transaction certificate is submitted to the blockchain network so that each of the transaction participants can process the target transaction sequentially by parsing the transaction certificate.
[0009] This specification provides an embodiment of a blockchain-based transaction suspension method. The blockchain network includes at least one transaction initiator node and at least one transaction participant node. The method is applied to the transaction participant node and includes:
[0010] Receive transaction evidence sent by the blockchain network, wherein the transaction evidence is submitted to the blockchain network by the transaction initiating node when initiating the target transaction;
[0011] The transaction record is parsed to obtain each transaction participant node participating in the target transaction, and the first transaction processing rule for each transaction participant node to process the target transaction;
[0012] If a node is identified as a participant in the target transaction, the target transaction is processed according to the first transaction processing rule during non-transaction pause periods to obtain a processing result.
[0013] Based on the processing result, a transaction confirmation and evidence storage shall be submitted to the blockchain network.
[0014] This specification provides an embodiment of a transaction suspension device based on a blockchain network. The blockchain network includes at least one transaction initiator node and at least one transaction participant node. The device is applied to the transaction initiator node and includes:
[0015] The judgment module determines whether the time interval between the initiation time of the target transaction and the start time of the transaction suspension period is less than a preset time interval when initiating the target transaction, and obtains a first judgment result, wherein the initiation time is earlier than the start time.
[0016] The rule setting module sets a first transaction processing rule in the transaction record of the target transaction if the first judgment result indicates that the time interval is less than the preset time interval. The first transaction processing rule is used to enable each transaction participant node participating in the target transaction to perform transaction processing during non-transaction suspension periods.
[0017] The submission module submits the transaction certificate to the blockchain network so that each of the transaction participants can process the target transaction sequentially by parsing the transaction certificate.
[0018] This specification provides an embodiment of a transaction suspension device based on a blockchain network. The blockchain network includes at least one transaction initiator node and at least one transaction participant node. The device is applied to the transaction participant node and includes:
[0019] The receiving module receives transaction evidence sent by the blockchain network, wherein the transaction evidence is submitted to the blockchain network by the transaction initiating node when initiating the target transaction;
[0020] The parsing module parses the transaction evidence to obtain the nodes of each transaction participant in the target transaction, and the first transaction processing rules for each of the transaction participant nodes to process the target transaction.
[0021] If the processing module determines that a node is a participant in the target transaction, it processes the target transaction according to the first transaction processing rule during the non-transaction suspension period to obtain the processing result.
[0022] The submission module submits transaction confirmation and evidence storage to the blockchain network based on the processing result.
[0023] This specification provides an embodiment of a transaction suspension device based on a blockchain network. The blockchain network includes at least one transaction initiator node and at least one transaction participant node. The device is applied to the transaction initiator node and includes:
[0024] At least one processor; and,
[0025] A memory communicatively connected to the at least one processor; wherein,
[0026] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:
[0027] When initiating a target transaction, it is determined whether the time interval between the initiation time of the target transaction and the start time of the transaction suspension period is less than a preset time interval, and a first determination result is obtained, wherein the initiation time is earlier than the start time.
[0028] If the first judgment result indicates that the time interval is less than the preset time interval, then a first transaction processing rule is set in the transaction record of the target transaction. The first transaction processing rule is used to enable each transaction participant node participating in the target transaction to perform transaction processing during non-transaction suspension periods.
[0029] The transaction certificate is submitted to the blockchain network so that each of the transaction participants can process the target transaction sequentially by parsing the transaction certificate.
[0030] This specification provides an embodiment of a transaction suspension device based on a blockchain network. The blockchain network includes at least one transaction initiator node and at least one transaction participant node. The device is applied to the transaction participant node and includes:
[0031] At least one processor; and,
[0032] A memory communicatively connected to the at least one processor; wherein,
[0033] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:
[0034] Receive transaction evidence sent by the blockchain network, wherein the transaction evidence is submitted to the blockchain network by the transaction initiating node when initiating the target transaction;
[0035] The transaction record is parsed to obtain each transaction participant node participating in the target transaction, and the first transaction processing rule for each transaction participant node to process the target transaction;
[0036] If a node is identified as a participant in the target transaction, the target transaction is processed according to the first transaction processing rule during non-transaction pause periods to obtain a processing result.
[0037] Based on the processing result, a transaction confirmation and evidence storage shall be submitted to the blockchain network.
[0038] At least one embodiment provided in this specification can achieve the following beneficial effects:
[0039] When a transaction initiating node initiates a target transaction, it determines whether the time interval between the initiation time of the target transaction and the start time of the transaction suspension period is less than a preset time interval. If the time interval is less than the preset time interval, it sets the first transaction processing rule in the transaction record, so that each transaction participant node participating in the target transaction can process the transaction during the non-transaction suspension period.
[0040] Meanwhile, the blockchain network records and verifies the transaction processing process, ensuring that the transaction data is immutable and enabling the transaction status to be advanced by multiple participants. This can prevent data security risks caused by centralized systems and allow for the suspension of transactions within the blockchain network. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 A schematic diagram of a transaction suspension system based on a blockchain network provided as an embodiment of this specification;
[0043] Figure 2 A schematic diagram of system modules for a transaction suspension system based on a blockchain network, provided as an embodiment of this specification;
[0044] Figure 3This is a timing diagram of the blockchain-based transaction suspension method provided in the embodiments of this specification in a specific application scenario;
[0045] Figure 4 A schematic diagram illustrating the result of a transaction sub-chain network in a transaction suspension system based on a blockchain network, provided as an embodiment of this specification.
[0046] Figure 5 A flowchart illustrating a transaction suspension method based on a blockchain network, provided as an embodiment of this specification;
[0047] Figure 6 A flowchart illustrating another blockchain-based transaction suspension method provided in the embodiments of this specification;
[0048] Figure 7 A schematic diagram of a transaction processing flow for a transaction suspension method based on a blockchain network, provided as an embodiment of this specification;
[0049] Figure 8 A schematic diagram illustrating the processing sequence of each transaction participant in the embodiments provided in this specification;
[0050] Figure 9 A schematic diagram of the transaction processing flow for another blockchain-based transaction suspension method provided in the embodiments of this specification;
[0051] Figure 10 A schematic diagram of a transaction suspension device based on a blockchain network provided in the embodiments of this specification;
[0052] Figure 11 A schematic diagram of a transaction suspension device based on a blockchain network provided in the embodiments of this specification;
[0053] Figure 12 A schematic diagram of a transaction suspension device based on a blockchain network provided in the embodiments of this specification;
[0054] Figure 13 This is a schematic diagram of a transaction suspension device based on a blockchain network, provided as an embodiment of this specification. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of one or more embodiments of this specification clearer, the technical solutions of one or more embodiments of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of one or more embodiments of this specification.
[0056] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0057] In existing technologies, when ordinary users, financial institutions, and third-party payment institutions conduct transactions, financial institutions' regulations require third-party payment institutions to perform internal daily overdraft balance operations during fixed time periods each day. During these periods, transactions, including initiating and processing, must be avoided. If a transaction is initiated during this period, it must be processed after the period has ended. To ensure fairness, impartiality, openness, and transparency, transaction processing is generally based on blockchain networks. However, blockchain networks themselves do not support scheduled tasks and cannot automatically trigger transaction tasks at a future time, meaning they cannot support transaction suspension. In this situation, the parties involved in the transaction do not know whether the transaction needs to be suspended, or for how long.
[0058] While a centralized system can be used to suspend transactions, the entire process for each participant must be managed by the centralized system. Participants cannot view each other's transaction progress and results; they can only communicate through the centralized system, which poses a security risk.
[0059] To address the shortcomings of existing technologies, this solution provides the following embodiments:
[0060] Figure 1 This is a schematic diagram of a transaction suspension system based on a blockchain network, provided as an embodiment of this specification.
[0061] The transaction suspension system based on a blockchain network provided in this specification can be a blockchain network 100 established based on several blockchain nodes. The blockchain network 100 may include blockchain nodes 1A, 1B, 1C, and 1D. These blockchain nodes may correspond to either the transaction initiator or the transaction participant, and no specific limitation is made here. That is to say, the same blockchain node can play different roles in different transaction processes.
[0062] The number of blockchain nodes configured in the blockchain network 100 is not affected by Figure 1 The limitations of the illustrated embodiment can be configured to be more or less. In addition, in a blockchain network, one or more transactions can be initiated simultaneously, without specific limitations.
[0063] In blockchain network 100, smart contracts that include transaction suspension periods can be configured, so that each blockchain node can determine the transaction suspension period based on the smart contract.
[0064] Specifically, blockchain is a technology based on distributed ledgers and consensus mechanisms. Distributed ledgers refer to the sharing of information among various nodes, and consensus mechanisms refer to the confirmation of information changes by nodes and their publication in the distributed ledger. Information changes that occur on each node of the blockchain are immutable and traceable. It is a technical solution that does not rely on third parties and stores, verifies, transmits, and exchanges network data through its own distributed nodes. Essentially, it is a decentralized database.
[0065] A transaction suspension can refer to a situation where a transaction is temporarily paused for a certain period of time due to internal system checks or other reasons, and then resumed after a period of time.
[0066] A smart contract is a computer protocol designed to transmit, verify, or execute contracts in an informational manner, allowing for trusted transactions without a third party. These transactions are traceable and irreversible. A smart contract is a set of promises defined in digital form, including the protocols by which the contract participants can execute these promises.
[0067] The specific application scenario involves banks and ordinary users as the participants in the transaction. Figure 2 For this application scenario, the embodiments of this specification provide a schematic diagram of the system modules of a transaction suspension system based on a blockchain network.
[0068] In practical applications, blockchain networks can continuously generate blocks, which are used to record and document different stages of transaction processing, ensuring that transaction processing information cannot be tampered with.
[0069] Transaction participants can directly listen to and query blocks in the blockchain network to determine which blocks are associated with their transactions and process the transactions that need to be processed in a timely manner.
[0070] In specific application scenarios, blockchain node 1B is used as the initiating node of the target transaction, and blockchain nodes 1C and 1D are used as the participating nodes of the target transaction. For example... Figure 3The diagram shown is a timing diagram of the transaction suspension method based on a blockchain network provided in the embodiments of this specification under a specific application scenario.
[0071] Step 301: Blockchain node 1B initiates the target transaction based on the smart contract during non-transaction pause periods;
[0072] In this application scenario, it is assumed that the transaction suspension period is from 23:45 to 0:00 every night, and the blockchain node 1B initiates the target transaction at 23:44.
[0073] Step 303: Blockchain node 1B submits transaction evidence to the blockchain network, the transaction evidence including the first transaction processing rules for each participating node in the target transaction;
[0074] Step 305: Blockchain nodes 1C, 1D, and 1A parse the transaction record to obtain the first transaction processing rule;
[0075] In the embodiments of this specification, the first transaction processing rule may refer to the restriction rules for each transaction participant when they are processing their respective transactions. Specifically, it may include the processing order and processing time of each transaction participant, so that blockchain nodes 1C and 1D can process transactions after the transaction suspension period according to the first transaction processing rule.
[0076] In this application scenario, according to the first transaction processing rule, the transaction participants in the target transaction include blockchain nodes 1C and 1D, and the processing order of blockchain node 1C is before that of blockchain node 1D. That is to say, blockchain node 1D can only process the transaction after blockchain node 1C has processed the transaction; otherwise, the transaction processing result will be invalid and will cause the target transaction to fail.
[0077] In addition, since blockchain node 1B initiates the target transaction at 23:44, blockchain node 1C is restricted to completing its corresponding transaction processing task before 23:45, and blockchain node 1D is restricted to performing its corresponding transaction processing task after 0:00.
[0078] Step 307: Blockchain node 1C obtains the transaction information of the target transaction;
[0079] In the embodiments of this specification, the transaction information includes at least the transaction amount, the payment account, and the receiving account. The transaction information may refer to data of a private nature during the target transaction process, which can only be known by the transaction initiator and the transaction participants. If it is leaked, it will cause serious security risks to the processing of the target transaction.
[0080] In this case, the embodiments of this specification provide the following three methods for obtaining transaction information:
[0081] In the first method, when initiating a target transaction, the transaction initiating node encrypts the transaction information and sends the decryption information to each participating node in the target transaction, so that each participating node can decrypt the transaction information based on the decryption information.
[0082] The second approach involves establishing a transaction system independent of the blockchain network, accessible only to the transaction initiator and participants. Confidential transaction information and processing details are stored within this system, from which participants retrieve transaction information.
[0083] In this scenario, the blockchain network only stores information that does not require confidentiality, such as transaction progress information and transaction processing rules.
[0084] The third approach involves the blockchain network constructing a transaction sub-chain network when initiating a target transaction. This sub-chain network includes the transaction initiator node and the nodes of each transaction participant. This sub-chain network is used to store confidential transaction information and transaction processing information, while the main blockchain network only stores transaction progress information and transaction processing rules, which do not need to be kept confidential.
[0085] In this scenario, the constructed transaction sub-chain network 110 can be as follows: Figure 4 As shown.
[0086] Step 309: Blockchain node 1C processes the transaction information based on the first transaction processing rule to obtain the transaction processing result;
[0087] Step 311: Blockchain node 1C submits the first transaction confirmation and storage to the blockchain network;
[0088] In the embodiments of this specification, the first transaction confirmation certificate can refer to a transaction processing certificate generated by blockchain node 1C after processing the target transaction, enabling other blockchain nodes to continue transaction processing based on the first transaction confirmation certificate, or to further monitor the progress of the target transaction processing. This first transaction confirmation certificate may at least include current transaction processing progress information, while other confidential transaction processing information can be encrypted using the same confidentiality methods described above.
[0089] Step 313: Blockchain nodes 1A, 1B, and 1D confirm the validity of the first transaction confirmation and evidence storage;
[0090] Step 315: Blockchain node 1D processes the transaction information based on the first transaction processing rule to obtain the transaction processing result;
[0091] Step 317: Blockchain node 1D submits the second transaction confirmation certificate to the blockchain network;
[0092] Step 319: Blockchain nodes 1A, 1B, and 1C respectively reach a consensus on the confirmation and storage of the second transaction;
[0093] Step 321: After consensus is reached, blockchain nodes 1A, 1B, 1C, and 1D submit the transaction completion certificate to the blockchain network.
[0094] Figure 5 This is a flowchart illustrating a transaction suspension method based on a blockchain network in an embodiment of this specification. The execution entity of the blockchain-based transaction suspension method provided in this embodiment can be a transaction initiator node. The blockchain network includes at least one transaction initiator node and at least one transaction participant node. The blockchain network is configured with a smart contract that includes a transaction suspension period.
[0095] like Figure 5 As shown, the transaction suspension method based on the blockchain network may include the following steps:
[0096] Step 501: When initiating a target transaction, determine whether the time interval between the initiation time of the target transaction and the start time of the transaction suspension period is less than a preset time interval, and obtain a first determination result, wherein the initiation time is earlier than the start time;
[0097] In the embodiments of this specification, the preset time interval is less than the sum of the processing times of all transaction participants involved in the transaction processing, and is used to determine whether the time interval between the initiation time of the target transaction and the start time of the transaction suspension period is sufficient for all transaction participants to process the target transaction.
[0098] After initiating a target transaction, the initiating node can determine in advance whether there is enough time to process the transaction before the start of the transaction suspension period, or which transaction participants need to complete their corresponding transaction processing before the start of the transaction suspension period, by judging whether the time interval between the initiation time of the target transaction and the start time of the transaction suspension period is less than a preset time interval. The specific operation process is as follows.
[0099] Step 503: If the first judgment result indicates that the time interval is less than the preset time interval, then a first transaction processing rule is set in the transaction record of the target transaction. The first transaction processing rule is used to enable each transaction participant node participating in the target transaction to perform transaction processing during non-transaction suspension periods.
[0100] In the embodiments of this specification, the first transaction processing rule may refer to the limiting conditions that restrict transaction participants to conduct transaction processing during non-trading suspension periods. Furthermore, the first transaction processing rule may also include the processing order and processing time for each transaction participant. For example, if the time interval is sufficient for one or two transaction participants to conduct transaction processing, the first transaction processing rule can restrict the transaction participants that can conduct transaction processing before the trading suspension period according to their processing order, while other transaction participants are restricted to conducting transaction processing after the trading suspension period.
[0101] In this way, each participating node in the transaction can strictly follow the processing order and processing time constraints according to the first transaction processing rules to perform its corresponding target transaction processing tasks in sequence; otherwise, the target transaction will fail, thereby improving the security and reliability of transactions.
[0102] Furthermore, continuing with the second method of obtaining transaction information in the above embodiments, sending the decrypted information to each transaction participant node participating in the target transaction may include:
[0103] The decryption information is sent to each participating node in the target transaction through a bridging layer, which is set between the blockchain network and each transaction initiator node and each participating node.
[0104] By setting up a bridging layer between the blockchain network and each transaction initiator node and each transaction participant node, the bridging layer can access all blocks generated in the blockchain network, and then send the transaction information related to the block to the relevant blockchain node without sending it to other blockchain nodes, thus ensuring the security of confidential data.
[0105] A bridging layer can be understood as an encapsulation layer that enables program interaction in different environments or modes. It can be an encapsulation layer for interaction between trusted and untrusted environments. It can predefine the interface information corresponding to the interaction between trusted and untrusted environments and generate the corresponding bridging layer.
[0106] In the embodiments of this specification, each blockchain node in the blockchain network can be regarded as an untrusted environment. Not all blockchain nodes can view the transaction data in the block, while the blockchain nodes that can view the transaction data can be regarded as a trusted environment. By setting up a bridging layer, the transaction data that needs to be kept confidential can be isolated from the untrusted environment to ensure data security.
[0107] Step 505: Submit the transaction certificate to the blockchain network so that each of the transaction participants can process the target transaction sequentially by parsing the transaction certificate.
[0108] In the embodiments described in this specification, after setting the first transaction processing rule, the transaction participant node submits transaction evidence to the blockchain network. In this way, after listening to the block storing the transaction evidence, other transaction participant nodes in the blockchain can parse the transaction evidence to obtain its content. This allows the transaction participant node participating in the target transaction to process the transaction sequentially and on time according to the first transaction processing rule, while other transaction participant nodes supervise the processing of this target transaction.
[0109] In this embodiment of the specification, after submitting the transaction certificate to the blockchain network, the method may further include:
[0110] By listening to the blocks generated by the blockchain network, the transaction confirmations submitted to the blockchain network by each transaction participant node after processing the target transaction are obtained.
[0111] A consensus is reached on the confirmation and notarization of each transaction, resulting in a consensus outcome.
[0112] Based on the consensus result, a transaction completion certificate or a transaction failure certificate may be submitted to the blockchain network.
[0113] After initiating a target transaction, the node that initiates the transaction continues to monitor blocks in the blockchain. This allows them to track the processing progress of their own target transaction and also monitor other transactions. Therefore, participating nodes also reach a consensus on transaction confirmation and notarization to monitor transactions within the blockchain network.
[0114] Furthermore, consensus is reached on the confirmation and notarization of each transaction, which may specifically include:
[0115] Based on the first transaction processing rule, determine whether the confirmation and storage of each transaction is legal, and obtain the second determination result;
[0116] If the second determination result is that the transaction confirmation and evidence storage are valid, then submit the transaction completion and evidence storage to the blockchain network;
[0117] If the second determination result is that the transaction confirmation certificate is invalid, then a transaction failure certificate is submitted to the blockchain network.
[0118] In specific application scenarios, submitting transaction completion verification to the blockchain network may include:
[0119] If the submission order of each transaction confirmation certificate is consistent with the processing order, and the submission time of each transaction confirmation certificate is consistent with the processing time, then the transaction completion certificate is submitted to the blockchain network.
[0120] In the embodiments of this specification, if each transaction participant performs transaction processing in accordance with the first transaction processing rule, it can be determined that the transaction is successfully completed. The transaction participant node submits transaction completion certificate to the blockchain network, indicating that the consensus on the transaction is completed.
[0121] In specific application scenarios, submitting transaction failure evidence to the blockchain network can include at least one of the following methods:
[0122] If the submission order of the transaction confirmation certificates is inconsistent with the processing order, then a transaction failure certificate is submitted to the blockchain network.
[0123] and / or
[0124] If the submission time of each transaction confirmation certificate is inconsistent with the processing time, then a transaction failure certificate is submitted to the blockchain network.
[0125] and / or
[0126] If the actual completion time of each transaction confirmation and notarization exceeds the preset completion time of the target transaction, then a transaction failure notarization is submitted to the blockchain network.
[0127] To ensure that transactions are conducted fairly, justly, and transparently, all parties involved in a transaction must process the transaction in accordance with the processing order and time stipulated in the first transaction processing rule. If any party fails to comply with the first transaction processing rule, the transaction may be deemed to have failed.
[0128] In this embodiment of the specification, the smart contract includes a transaction subchain network generation rule. This rule allows the blockchain network to automatically construct a transaction subchain network, including the transaction initiator node and all participating transaction node nodes, after the transaction initiator node initiates the target transaction. After the transaction subchain network is generated, the method further includes:
[0129] The transaction information is published to the transaction subchain network to generate transaction information storage, so that each of the transaction participants in the transaction subchain network can obtain the transaction information according to the transaction information storage, process the transaction information sequentially according to the transaction processing rules, obtain the transaction processing result, generate transaction confirmation storage, store the transaction processing result in the transaction subchain network, and store the transaction confirmation storage in the blockchain network.
[0130] By constructing a transaction subchain network, the transaction initiator node and all transaction participant nodes process transactions within the transaction subchain network. Transaction information that needs to be kept confidential is only publicly available within the transaction subchain network and cannot be accessed by other blockchain nodes. However, the processing progress and completion status of the target transaction can be monitored based on the transaction confirmation and evidence stored in the blockchain network, thereby achieving network-wide consensus on the target transaction.
[0131] In another specific application scenario of the embodiments of this specification, if the time interval between the initiation time of the target transaction and the start time of the transaction suspension period is greater than a preset time interval, it indicates that the target transaction can be completed before the start of the transaction suspension period. In this case, the transaction initiator node will set a second transaction processing rule in the transaction record, so that each of the transaction participants will process the target transaction in sequence according to the second transaction processing rule.
[0132] The transaction suspension method based on a blockchain network provided in this specification involves the transaction initiator node determining whether the time interval between the initiation time of the target transaction and the start time of the transaction suspension period is less than a preset time interval when initiating the target transaction. If the time interval is less than the preset time interval, a first transaction processing rule is set in the transaction record, so that each transaction participant node participating in the target transaction can process the transaction during the non-transaction suspension period.
[0133] Meanwhile, the blockchain network records and verifies the transaction processing process, ensuring that the transaction data is immutable and enabling the transaction status to be advanced by multiple participants. This can prevent data security risks caused by centralized systems and allow for the suspension of transactions within the blockchain network.
[0134] Based on the same inventive idea Figure 6 This is a flowchart illustrating a transaction suspension method based on a blockchain network in an embodiment of this specification. The execution entity of the blockchain-based transaction suspension method provided in this embodiment can be a transaction participant node, and the blockchain network includes at least one transaction initiator node and at least one transaction participant node.
[0135] like Figure 6 As shown, the transaction suspension method based on the blockchain network may include the following steps:
[0136] Step 601: Receive the transaction certificate sent by the blockchain network, wherein the transaction certificate is submitted to the blockchain network by the transaction initiating node when initiating the target transaction;
[0137] Step 603: Parse the transaction record to obtain each transaction participant node participating in the target transaction, and the first transaction processing rule for each transaction participant node to process the target transaction;
[0138] Step 605: If a node is identified as a participant in the target transaction, the target transaction is processed according to the first transaction processing rule during the non-transaction suspension period to obtain the processing result;
[0139] In this embodiment of the specification, processing the target transaction according to the first transaction processing rule during non-transaction suspension periods may specifically include:
[0140] It was determined that the transaction participant node that was preceding the transaction participant node in the processing sequence had submitted transaction confirmation and evidence storage.
[0141] When the processing time of the transaction participant node arrives, the transaction information of the target transaction is obtained, and the transaction information includes at least the transaction amount, the paying account, and the receiving account.
[0142] The target transaction is processed based on the transaction information.
[0143] In practical applications, when a transaction participant node performs its own transaction processing, the following conditions must be met: first, the transaction participant node before the processing order has submitted transaction confirmation and evidence storage, which means that the transaction processing has been completed; second, the processing time for the transaction processing in the first transaction processing rule has arrived.
[0144] For example, for transaction participants C and D, transaction participant D can only perform the corresponding transaction processing operation after transaction participant C submits the transaction confirmation and the transaction suspension period ends; otherwise, it will continue to wait for the conditions to be met.
[0145] Furthermore, obtaining the transaction information of the target transaction may include:
[0146] The decryption information sent by the transaction initiator node is obtained, and the encrypted information contained in the transaction certificate is decrypted to obtain the transaction information. The transaction initiator node sends the decryption information to each of the transaction participant nodes through a bridging layer. The bridging layer is set between the blockchain network and each transaction initiator node and each transaction participant node.
[0147] Furthermore, obtaining the transaction information of the target transaction may also include:
[0148] The transaction information is queried from a transaction system independent of the blockchain network. The transaction information is uploaded to the transaction system by the transaction initiator node when initiating the transaction.
[0149] Furthermore, the smart contract configured in the blockchain network includes a transaction sub-chain network generation rule. This rule allows the blockchain network to automatically construct a transaction sub-chain network, including the transaction initiator node and all transaction participant nodes, after the target transaction is initiated, and to obtain the transaction information of the target transaction. This rule may include:
[0150] The transaction information is stored in the transaction sub-chain network, and the transaction information is stored in the transaction sub-chain network after the transaction initiator node is constructed.
[0151] The transaction information is parsed to obtain the transaction information.
[0152] The specific implementation methods for obtaining transaction information described above are the same as the corresponding implementation methods in the above embodiments, and will not be repeated here.
[0153] Step 607: Submit transaction confirmation and evidence storage to the blockchain network based on the processing result.
[0154] Step 609: Submit transaction confirmation and evidence to the blockchain network.
[0155] Furthermore, after submitting transaction confirmation and notarization to the blockchain network, the method may further include:
[0156] Continuously monitor the blocks generated in the blockchain network;
[0157] If the block contains transaction confirmation records related to the target transaction, then consensus is reached on the transaction confirmation records, and transaction completion records or transaction failure records are submitted to the blockchain network based on the consensus result.
[0158] In the embodiments of this specification, reaching a consensus on the transaction confirmation and notarization, and submitting transaction completion or transaction failure notarization to the blockchain network based on the consensus result, may include:
[0159] If the actual completion time of each transaction confirmation and notarization exceeds the preset completion time of the target transaction, then a transaction failure notarization is submitted to the blockchain network.
[0160] The transaction suspension method based on a blockchain network provided in this specification involves the transaction initiator node determining whether the time interval between the initiation time of the target transaction and the start time of the transaction suspension period is less than a preset time interval when initiating the target transaction. If the time interval is less than the preset time interval, a first transaction processing rule is set in the transaction record, so that each transaction participant node participating in the target transaction can process the transaction during the non-transaction suspension period.
[0161] Meanwhile, the blockchain network records and verifies the transaction processing process, ensuring that the transaction data is immutable and enabling the transaction status to be advanced by multiple participants. This can prevent data security risks caused by centralized systems and allow for the suspension of transactions within the blockchain network.
[0162] Figure 7 This diagram illustrates a transaction processing flow for a blockchain-based transaction suspension method provided in an embodiment of this specification. The method specifically includes the following steps:
[0163] Step 701: Transaction initiator A submits the transaction certificate TR1, which indicates that the transaction was initiated, to the blockchain network;
[0164] In the embodiments of this specification, TR1 is the block storage address of the transaction evidence in the blockchain network, and the block storage address includes at least the blockchain address of the block and / or the block height.
[0165] In this way, transaction participants can obtain transaction evidence based on the blockchain address.
[0166] Alternatively, transaction participants can poll block data in the blockchain network based on block height to obtain the transaction certificate.
[0167] Specifically, transaction evidence can include the following:
[0168] i. Basic transaction details, such as fund transactions, require recording the account information for receiving and making payments.
[0169] ii. The parties involved in the transaction and the order in which they are processed. Assume there are four parties in the transaction: A, B, C, and D. The processing order refers to the dependencies between the parties. For example, B depends on A, and B's transaction confirmation must be valid only after A's transaction confirmation is in the next block.
[0170] iii. Time limits for confirmation by transaction participants. For example, the timestamp of the block containing B's evidence record cannot be between 11:45 and 12:00 every day; or the block containing B's evidence record must be a certain number of blocks after A's block (the block production frequency of the blockchain network is basically fixed, which is equivalent to limiting the time interval).
[0171] Step 703: The transaction participants determine whether the transaction is related to them based on the transaction record TR1;
[0172] In the embodiments described in this specification, each transaction participant obtains transaction evidence by listening to the blocks generated in the blockchain network in real time.
[0173] As one application example, the ability to listen to blocks can be the responsibility of one of the transaction participants, while other participants perceive the transaction data contained in the block based on notifications from that transaction participant.
[0174] Step 705: If the transaction is not related to yourself, return to step 703.
[0175] Step 707: If it is a transaction related to oneself, determine whether the triggering conditions for the transaction participants to process the transaction are met;
[0176] Step 709: If the triggering condition is not met, return to step 707;
[0177] Step 711: If the triggering condition is met, the transaction participants begin transaction processing;
[0178] Step 713: After the transaction is completed, the transaction participants submit the participant confirmation certificate TR* to the blockchain network.
[0179] During the transaction processing, the order in which each participant processes the transaction is as follows: Figure 8 As shown.
[0180] Figure 9 This is a schematic diagram of the transaction processing flow for another blockchain-based transaction suspension method provided in the embodiments of this specification.
[0181] For any participant or ordinary user on the blockchain network, the specific process for confirming the success of a transaction in the blockchain network is illustrated in the diagram below. Figure 9 As shown.
[0182] Step 901: Analyze the evidence storage content in the transaction evidence storage;
[0183] Step 903: Obtain all transaction participants involved in the transaction processing;
[0184] Step 905: Continuously monitor the content of newly generated blocks in the blockchain network;
[0185] Step 907: Determine if there is a transaction confirmation record related to this transaction;
[0186] Step 909: If the transaction confirmation certificate exists, determine whether the transaction confirmation certificate is valid;
[0187] Step 911: If the transaction confirmation certificate does not exist, return to step 905.
[0188] Step 913: If the transaction confirmation certificate is valid, then determine whether the transaction confirmation certificates of all transaction participants exist;
[0189] Step 915: If the transaction confirmation and evidence storage is invalid, return to step 905;
[0190] Step 917: If all transaction confirmation records exist for all transaction participants, then the transaction is considered complete;
[0191] Step 919: If transaction confirmation records do not exist for all transaction participants, return to step 905.
[0192] Step 921: If the time for adding a new block exceeds the preset completion time of the transaction, the transaction is determined to have failed.
[0193] For example, if a transaction requires confirmation and processing within 10 minutes or it becomes invalid, and a block is generated every 10 seconds, then the transaction confirmation and evidence storage of all transaction participants must be included within 60 blocks after the transaction is initiated; otherwise, the transaction will fail.
[0194] Based on the same inventive concept, embodiments of this specification also provide apparatus corresponding to the above-described methods.
[0195] in, Figure 10 The embodiments provided in this specification correspond to Figure 5 A schematic diagram of a transaction suspension device based on a blockchain network is provided. The blockchain network includes at least one transaction initiator node and at least one transaction participant node, and the device is applied to the transaction initiator node.
[0196] like Figure 10 As shown, the device may include:
[0197] The judgment module 1001, when initiating a target transaction, determines whether the time interval between the initiation time of the target transaction and the start time of the transaction suspension period is less than a preset time interval, and obtains a first judgment result, wherein the initiation time is earlier than the start time.
[0198] The rule setting module 1002 sets a first transaction processing rule in the transaction record of the target transaction if the first judgment result indicates that the time interval is less than the preset time interval. The first transaction processing rule is used to enable each transaction participant node participating in the target transaction to perform transaction processing during non-transaction suspension periods.
[0199] The submission module 1003 submits the transaction certificate to the blockchain network so that each of the transaction participants can process the target transaction sequentially by parsing the transaction certificate.
[0200] based on Figure 10 The embodiments of this specification also provide some specific implementations of the device, which will be described below.
[0201] Optionally, after submitting the transaction certificate to the blockchain network, the device may further include:
[0202] By listening to the blocks generated by the blockchain network, the transaction confirmations submitted to the blockchain network by each transaction participant node after processing the target transaction are obtained.
[0203] A consensus is reached on the confirmation and notarization of each transaction, resulting in a consensus outcome.
[0204] Based on the consensus result, a transaction completion certificate or a transaction failure certificate may be submitted to the blockchain network.
[0205] Optionally, reaching a consensus on the confirmation and notarization of each of the aforementioned transactions may include:
[0206] Based on the first transaction processing rule, determine whether the confirmation and storage of each transaction is legal, and obtain the second determination result;
[0207] If the second determination result is that the transaction confirmation and evidence storage are valid, then submit the transaction completion and evidence storage to the blockchain network;
[0208] If the second determination result is that the transaction confirmation certificate is invalid, then a transaction failure certificate is submitted to the blockchain network.
[0209] Optionally, the first transaction processing rule, which includes the processing order and processing time of each of the transaction participant nodes for processing the target transaction, and submitting transaction completion proof to the blockchain network, may include:
[0210] If the submission order of each transaction confirmation certificate is consistent with the processing order, and the submission time of each transaction confirmation certificate is consistent with the processing time, then the transaction completion certificate is submitted to the blockchain network.
[0211] Optionally, submitting a transaction failure certificate to the blockchain network may include at least one of the following methods:
[0212] If the submission order of the transaction confirmation certificates is inconsistent with the processing order, then a transaction failure certificate is submitted to the blockchain network.
[0213] and / or
[0214] If the submission time of each transaction confirmation certificate is inconsistent with the processing time, then a transaction failure certificate is submitted to the blockchain network.
[0215] and / or
[0216] If the actual completion time of each transaction confirmation and notarization exceeds the preset completion time of the target transaction, then a transaction failure notarization is submitted to the blockchain network.
[0217] Optionally, the transaction evidence includes transaction information, which at least includes the transaction amount, the paying account, and the receiving account. When submitting the transaction evidence to the blockchain network, the device may further include:
[0218] The transaction information is encrypted;
[0219] The decryption information is sent to each of the transaction participant nodes, enabling each of the transaction participant nodes to decrypt the transaction information based on the decryption information.
[0220] Optionally, sending the decrypted information to each of the transaction participant nodes may include:
[0221] The decryption information is sent to each of the transaction participant nodes through a bridging layer, which is set between the blockchain network and each transaction initiator node and each transaction participant node.
[0222] Optionally, when submitting transaction evidence to the blockchain network, the device may further include:
[0223] The transaction information related to the target transaction is sent to a transaction system independent of the blockchain network, so that each transaction participant can obtain the transaction information through the transaction system and use the transaction information to process the target transaction.
[0224] Optionally, the smart contract configured in the blockchain network includes a transaction sub-chain network generation rule. This rule allows the blockchain network to automatically construct a transaction sub-chain network, including the transaction initiator node and all transaction participant nodes, after the target transaction is initiated. After the transaction sub-chain network is generated, the device may further include:
[0225] The transaction information is published to the transaction subchain network to generate transaction information storage, so that each of the transaction participants in the transaction subchain network can obtain the transaction information according to the transaction information storage, process the transaction information sequentially according to the transaction processing rules, obtain the processing result, generate transaction confirmation storage, store the processing result in the transaction subchain network, and store the transaction confirmation storage in the blockchain network.
[0226] This specification provides an embodiment of a transaction suspension device based on a blockchain network. When a transaction initiating node initiates a target transaction, it determines whether the time interval between the initiation time of the target transaction and the start time of the transaction suspension period is less than a preset time interval. If the time interval is less than the preset time interval, a first transaction processing rule is set in the transaction record, so that each transaction participant node participating in the target transaction can process the transaction during the non-transaction suspension period.
[0227] Meanwhile, the blockchain network records and verifies the transaction processing process, ensuring that the transaction data is immutable and enabling the transaction status to be advanced by multiple participants. This can prevent data security risks caused by centralized systems and allow for the suspension of transactions within the blockchain network.
[0228] Based on the same inventive concept, embodiments of this specification also provide apparatus corresponding to the above-described methods.
[0229] in, Figure 11 The embodiments provided in this specification correspond to Figure 6 A schematic diagram of a transaction suspension device based on a blockchain network is provided. The blockchain network includes at least one transaction initiator node and at least one transaction participant node. The blockchain network is configured with a smart contract that includes a transaction suspension period. The device is applied to the transaction participant node.
[0230] like Figure 11 As shown, the device may include:
[0231] The receiving module 1101 receives the transaction certificate sent by the blockchain network, which is submitted to the blockchain network by the transaction initiating node when initiating the target transaction;
[0232] The parsing module 1102 parses the transaction record to obtain each transaction participant node participating in the target transaction, and the first transaction processing rule for each transaction participant node to process the target transaction.
[0233] Processing module 110 3 If a node is identified as a participant in the target transaction, the target transaction is processed according to the first transaction processing rule during non-transaction pause periods to obtain a processing result.
[0234] The submission module 1104 submits transaction confirmation and evidence storage to the blockchain network based on the processing result.
[0235] based on Figure 11 The embodiments of this specification also provide some specific implementations of the device, which will be described below.
[0236] Optionally, the first transaction processing rule includes the processing order and processing time of each of the transaction participant nodes for processing the target transaction. Processing the target transaction according to the first transaction processing rule during non-transaction pause periods may include:
[0237] It was determined that the transaction participant node that was preceding the transaction participant node in the processing sequence had submitted transaction confirmation and evidence storage.
[0238] When the processing time of the transaction participant node arrives, the transaction information of the target transaction is obtained, and the transaction information includes at least the transaction amount, the paying account, and the receiving account.
[0239] The target transaction is processed based on the transaction information.
[0240] Optionally, obtaining the transaction information of the target transaction may include:
[0241] The decryption information sent by the transaction initiator node is obtained, and the encrypted information contained in the transaction certificate is decrypted to obtain the transaction information. The transaction initiator node sends the decryption information to each of the transaction participant nodes through a bridging layer. The bridging layer is set between the blockchain network and each transaction initiator node and each transaction participant node.
[0242] Optionally, obtaining the transaction information of the target transaction may include:
[0243] The transaction information is queried from a transaction system independent of the blockchain network. The transaction information is uploaded to the transaction system by the transaction initiator node when initiating the transaction.
[0244] Optionally, the smart contract configured in the blockchain network includes a transaction sub-chain network generation rule. This rule allows the blockchain network to automatically construct a transaction sub-chain network, including the transaction initiator node and all transaction participant nodes, after the target transaction is initiated, and to obtain the transaction information of the target transaction. This rule may include:
[0245] The transaction information is stored in the transaction sub-chain network, and the transaction information is stored in the transaction sub-chain network after the transaction initiator node is constructed.
[0246] The transaction information is parsed to obtain the transaction information.
[0247] Optionally, after processing the target transaction based on the transaction information, the process may further include:
[0248] Generate processing results and store transaction confirmation evidence;
[0249] The processing result is stored in the transaction sub-chain network, so that other transaction participant nodes in the transaction sub-chain network can process the target transaction based on the processing result;
[0250] The transaction confirmation is stored in the blockchain network, enabling other blockchain nodes in the blockchain network to reach a consensus on the target transaction based on the transaction confirmation.
[0251] The transaction suspension device based on a blockchain network provided in this specification allows the transaction initiator node to determine whether the time interval between the initiation time of the target transaction and the start time of the transaction suspension period is less than a preset time interval when initiating the target transaction. If the time interval is less than the preset time interval, a first transaction processing rule is set in the transaction record, so that each transaction participant node participating in the target transaction can process the transaction during the non-transaction suspension period.
[0252] Meanwhile, the blockchain network records and verifies the transaction processing process, ensuring that the transaction data is immutable and enabling the transaction status to be advanced by multiple participants. This can prevent data security risks caused by centralized systems and allow for the suspension of transactions within the blockchain network.
[0253] Based on the same inventive concept, embodiments of this specification also provide devices corresponding to the above methods.
[0254] in, Figure 12 The embodiments provided in this specification correspond to Figure 5 A schematic diagram of a transaction suspension device based on a blockchain network. (See diagram below.) Figure 12 As shown, device 1200 may include:
[0255] At least one processor 1210; and,
[0256] Memory 1230 communicatively connected to the at least one processor; wherein,
[0257] The memory 1230 stores instructions 1220 that can be executed by the at least one processor 1210, the instructions being executed by the at least one processor 1210 to enable the at least one processor 1210 to:
[0258] When initiating a target transaction, it is determined whether the time interval between the initiation time of the target transaction and the start time of the transaction suspension period is less than a preset time interval, and a first determination result is obtained, wherein the initiation time is earlier than the start time.
[0259] If the first judgment result indicates that the time interval is less than the preset time interval, then a first transaction processing rule is set in the transaction record of the target transaction. The first transaction processing rule is used to enable each transaction participant node participating in the target transaction to perform transaction processing during non-transaction suspension periods.
[0260] The transaction certificate is submitted to the blockchain network so that each of the transaction participants can process the target transaction sequentially by parsing the transaction certificate.
[0261] Based on the same inventive concept, embodiments of this specification also provide devices corresponding to the above methods.
[0262] in, Figure 13 The embodiments provided in this specification correspond to Figure 6 A schematic diagram of a transaction suspension device based on a blockchain network. (See diagram below.) Figure 13 As shown, device 1300 may include:
[0263] At least one processor 1310; and,
[0264] Memory 1330 communicatively connected to the at least one processor; wherein,
[0265] The memory 1330 stores instructions 1320 that can be executed by the at least one processor 1310, the instructions being executed by the at least one processor 1310 to enable the at least one processor 1310 to:
[0266] Receive transaction evidence sent by the blockchain network, wherein the transaction evidence is submitted to the blockchain network by the transaction initiating node when initiating the target transaction;
[0267] The transaction record is parsed to obtain each transaction participant node participating in the target transaction, and the first transaction processing rule for each transaction participant node to process the target transaction;
[0268] If a node is identified as a participant in the target transaction, the target transaction is processed according to the first transaction processing rule during non-transaction pause periods to obtain a processing result.
[0269] Based on the processing result, a transaction confirmation and evidence storage shall be submitted to the blockchain network.
[0270] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, for... Figure 12 and Figure 13As the device shown is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0271] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program a digital system themselves to "integrate" it onto a PLD, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0272] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0273] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0274] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0275] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0276] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0277] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0278] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0279] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0280] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0281] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital character versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0282] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0283] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0284] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0285] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for suspending transactions based on a blockchain network, the blockchain network comprising at least one transaction initiator node and at least one transaction participant node, the method being applied to the transaction initiator node, the method comprising: When initiating a target transaction, it is determined whether the time interval between the initiation time of the target transaction and the start time of the transaction suspension period is less than a preset time interval to obtain a first determination result. The initiation time is earlier than the start time. The blockchain network is configured with a smart contract that includes the transaction suspension period. If the first judgment result indicates that the time interval is less than the preset time interval, then a first transaction processing rule is set in the transaction record of the target transaction. The first transaction processing rule is used to enable each transaction participant node participating in the target transaction to perform transaction processing during non-transaction suspension periods. The first transaction processing rule includes the processing order and processing time of each transaction participant node in performing the target transaction. The transaction certificate is submitted to the blockchain network so that each of the transaction participants can process the target transaction sequentially by parsing the transaction certificate.
2. The method of claim 1, further comprising, after submitting the transaction evidence to the blockchain network: By listening to the blocks generated by the blockchain network, the transaction confirmations submitted to the blockchain network by each transaction participant node after processing the target transaction are obtained. A consensus is reached on the confirmation and notarization of each transaction, resulting in a consensus outcome. Based on the consensus result, a transaction completion certificate or a transaction failure certificate may be submitted to the blockchain network.
3. The method as described in claim 2, wherein consensus is reached on the confirmation and storage of each of the aforementioned transactions, comprising: Based on the first transaction processing rule, determine whether the confirmation and storage of each transaction is legal, and obtain the second determination result; If the second determination result is that the transaction confirmation and evidence storage are valid, then submit the transaction completion and evidence storage to the blockchain network; If the second determination result is that the transaction confirmation certificate is invalid, then a transaction failure certificate is submitted to the blockchain network.
4. The method as described in claim 3, comprising submitting transaction completion proof to the blockchain network, including: If the submission order of each transaction confirmation certificate is consistent with the processing order, and the submission time of each transaction confirmation certificate is consistent with the processing time, then the transaction completion certificate is submitted to the blockchain network.
5. The method as described in claim 4, submitting transaction failure evidence to the blockchain network, includes at least one of the following methods: If the submission order of the transaction confirmation certificates is inconsistent with the processing order, then a transaction failure certificate is submitted to the blockchain network. and / or If the submission time of each transaction confirmation certificate is inconsistent with the processing time, then a transaction failure certificate is submitted to the blockchain network. and / or If the actual completion time of each transaction confirmation and notarization exceeds the preset completion time of the target transaction, then a transaction failure notarization is submitted to the blockchain network.
6. The method of claim 1, wherein the transaction evidence includes transaction information, the transaction information including at least the transaction amount, the paying account, and the receiving account, and the method further includes, when submitting the transaction evidence to the blockchain network: The transaction information is encrypted; The decryption information is sent to each of the transaction participant nodes, enabling each of the transaction participant nodes to decrypt the transaction information based on the decryption information.
7. The method as described in claim 6, wherein sending the decrypted information to each of the transaction participant nodes includes: The decryption information is sent to each of the transaction participant nodes through a bridging layer, which is set between the blockchain network and each transaction initiator node and each transaction participant node.
8. The method of claim 1, wherein when submitting transaction evidence to the blockchain network, the method further comprises: The transaction information related to the target transaction is sent to a transaction system independent of the blockchain network, so that each transaction participant can obtain the transaction information through the transaction system and use the transaction information to process the target transaction.
9. The method as described in claim 1, wherein the smart contract configured in the blockchain network includes a transaction sub-chain network generation rule, the transaction sub-chain network generation rule being that the blockchain network automatically constructs a transaction sub-chain network including the transaction initiator node and each of the transaction participant nodes after the target transaction is initiated, and after the transaction sub-chain network is generated, the method further includes: The transaction information is published to the transaction subchain network to generate transaction information storage, so that each of the transaction participants in the transaction subchain network can obtain the transaction information according to the transaction information storage, process the transaction information sequentially according to the first transaction processing rules, obtain the processing result, generate transaction confirmation storage, store the processing result in the transaction subchain network, and store the transaction confirmation storage in the blockchain network.
10. A method for suspending transactions based on a blockchain network, the blockchain network comprising at least one transaction initiator node and at least one transaction participant node, the method being applied to the transaction participant node, the method comprising: The system receives transaction records sent by the blockchain network. These records are submitted to the blockchain network by the transaction initiator node when initiating the target transaction. The blockchain network is configured with a smart contract that includes a transaction pause period. The transaction record is parsed to obtain each transaction participant node participating in the target transaction, and a first transaction processing rule for each transaction participant node to process the target transaction, wherein the first transaction processing rule includes the processing order and processing time of each transaction participant node to process the target transaction. If a node is identified as a participant in the target transaction, the target transaction is processed according to the first transaction processing rule during non-transaction pause periods to obtain a processing result. Based on the processing result, a transaction confirmation and evidence storage shall be submitted to the blockchain network.
11. The method of claim 10, wherein the first transaction processing rule includes the processing order and processing time for each of the transaction participant nodes to process the target transaction, and processing the target transaction according to the first transaction processing rule during non-transaction pause periods includes: It was determined that the transaction participant node that was preceding the transaction participant node in the processing sequence had submitted transaction confirmation and evidence storage. When the processing time of the transaction participant node arrives, the transaction information of the target transaction is obtained, and the transaction information includes at least the transaction amount, the paying account, and the receiving account. The target transaction is processed based on the transaction information.
12. The method of claim 11, wherein obtaining the transaction information of the target transaction comprises: The decryption information sent by the transaction initiator node is obtained, and the encrypted information contained in the transaction certificate is decrypted to obtain the transaction information. The transaction initiator node sends the decryption information to each of the transaction participant nodes through a bridging layer. The bridging layer is set between the blockchain network and each transaction initiator node and each transaction participant node.
13. The method of claim 11, wherein obtaining the transaction information of the target transaction comprises: The transaction information is queried from a transaction system independent of the blockchain network. The transaction information is uploaded to the transaction system by the transaction initiator node when initiating the transaction.
14. The method of claim 11, wherein the smart contract configured in the blockchain network includes a transaction sub-chain network generation rule, the transaction sub-chain network generation rule being that, after the target transaction is initiated, the blockchain network automatically constructs a transaction sub-chain network including the transaction initiator node and each of the transaction participant nodes, and obtains the transaction information of the target transaction, including: The transaction information is stored in the transaction sub-chain network, and the transaction information is stored in the transaction sub-chain network after the transaction initiator node is constructed. The transaction information is parsed to obtain the transaction information.
15. The method of claim 14, further comprising, after processing the target transaction based on the transaction information: Generate processing results and store transaction confirmation evidence; The processing result is stored in the transaction sub-chain network, so that other transaction participant nodes in the transaction sub-chain network can process the target transaction based on the processing result; The transaction confirmation is stored in the blockchain network, enabling other blockchain nodes in the blockchain network to reach a consensus on the target transaction based on the transaction confirmation.
16. A transaction suspension device based on a blockchain network, the blockchain network including at least one transaction initiator node and at least one transaction participant node, the device being applied to the transaction initiator node, the device comprising: The judgment module, when initiating a target transaction, determines whether the time interval between the initiation time of the target transaction and the start time of the transaction suspension period is less than a preset time interval, and obtains a first judgment result, wherein the initiation time is earlier than the start time, and the blockchain network is configured with a smart contract that includes the transaction suspension period. The rule setting module sets a first transaction processing rule in the transaction record of the target transaction if the first judgment result indicates that the time interval is less than the preset time interval. The first transaction processing rule is used to enable each transaction participant node participating in the target transaction to perform transaction processing during non-transaction suspension periods. The first transaction processing rule includes the processing order and processing time of each transaction participant node in performing the target transaction. The submission module submits the transaction certificate to the blockchain network so that each of the transaction participants can process the target transaction sequentially by parsing the transaction certificate.
17. A transaction suspension device based on a blockchain network, the blockchain network including at least one transaction initiator node and at least one transaction participant node, the device being applied to the transaction participant node, the device comprising: The receiving module receives transaction evidence sent by the blockchain network. The transaction evidence is submitted to the blockchain network by the transaction initiating node when initiating the target transaction. The blockchain network is configured with a smart contract that includes a transaction pause period. The parsing module parses the transaction record to obtain each transaction participant node participating in the target transaction, and a first transaction processing rule for each transaction participant node to process the target transaction. The first transaction processing rule includes the processing order and processing time of each transaction participant node to process the target transaction. If the processing module determines that a node is a participant in the target transaction, it processes the target transaction according to the first transaction processing rule during the non-transaction suspension period to obtain the processing result. The submission module submits transaction confirmation and evidence storage to the blockchain network based on the processing result.
18. A transaction suspension device based on a blockchain network, the blockchain network including at least one transaction initiator node and at least one transaction participant node, the device being applied to the transaction initiator node, comprising: At least one processor; And, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to: When initiating a target transaction, it is determined whether the time interval between the initiation time of the target transaction and the start time of the transaction suspension period is less than a preset time interval to obtain a first determination result. The initiation time is earlier than the start time. The blockchain network is configured with a smart contract that includes the transaction suspension period. If the first judgment result indicates that the time interval is less than the preset time interval, then a first transaction processing rule is set in the transaction record of the target transaction. The first transaction processing rule is used to enable each transaction participant node participating in the target transaction to perform transaction processing during non-transaction suspension periods. The first transaction processing rule includes the processing order and processing time of each transaction participant node in performing the target transaction. The transaction certificate is submitted to the blockchain network so that each of the transaction participants can process the target transaction sequentially by parsing the transaction certificate.
19. A transaction suspension device based on a blockchain network, the blockchain network including at least one transaction initiator node and at least one transaction participant node, the device being applied to the transaction participant node, comprising: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to: The system receives transaction records sent by the blockchain network. These records are submitted to the blockchain network by the transaction initiator node when initiating the target transaction. The blockchain network is configured with a smart contract that includes a transaction pause period. The transaction record is parsed to obtain each transaction participant node participating in the target transaction, and a first transaction processing rule for each transaction participant node to process the target transaction, wherein the first transaction processing rule includes the processing order and processing time of each transaction participant node to process the target transaction. If a node is identified as a participant in the target transaction, the target transaction is processed according to the first transaction processing rule during non-transaction pause periods to obtain a processing result. Based on the processing result, a transaction confirmation and evidence storage shall be submitted to the blockchain network.
Citation Information
Patent Citations
Order processing method and device
CN112669148A
Conditional payment data processing system based on block chain, related nodes and method
CN115131019A