Block chain transaction processing method and device, equipment, storage medium and program product

By extracting and voting, processing the in-chain and cross-chain parts of cross-chain contracts, the problem of insufficient security of cross-chain transactions is solved, and a more secure and flexible cross-chain transaction management is achieved.

CN119830341AActive Publication Date: 2025-04-15INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411901694.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-15
Estimated Expiration
2044-12-23

AI Technical Summary

Technical Problem

There is a lack of standardized and effective methods for cross-chain transactions in the prior art, resulting in insufficient security.

Method used

By obtaining cross-chain contracts, extracting in-chain slices and cross-chain slices, and sending in-chain slices to ordinary nodes and director nodes for in-chain voting, sending cross-chain slices to director nodes for cross-chain voting, and determining the effectiveness of cross-chain contracts based on the voting results.

Benefits of technology

It improves the security of cross-chain transactions, ensures that cross-chain transactions take effect under audit, and expands the flexibility of cross-chain management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119830341A_ABST
    Figure CN119830341A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a block chain transaction processing method and device, equipment, a storage medium and a program product, and relates to the field of block chains. The method comprises the steps that a cross-chain contract is acquired, intra-chain slices and cross-chain slices are extracted, the intra-chain slices irrelevant to the cross-chain are sent to common nodes and business nodes of the block chain, the cross-chain slices relevant to the cross-chain are sent to the business nodes, and the block chain can receive voting results returned by the common nodes and the business nodes and send the voting results to the business nodes. And determining the effective mode of the cross-chain contract according to the voting result. According to the block chain transaction processing method provided by the invention, the cross-chain transaction can be ensured to take effect when the cross-chain transaction is audited, the security of the cross-chain transaction is improved, and the flexibility of cross-chain management is expanded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to a blockchain transaction processing method, device, equipment, storage medium and program product. Background Art

[0002] With the development of blockchain technology, the application scope of blockchain has gradually expanded from cryptocurrency to other fields. Due to the characteristics of blockchain such as immutability, security and reliability, it has broad application prospects in the financial field, and more and more transactions are beginning to be implemented using blockchain.

[0003] Currently, blockchain transactions are mostly concentrated in intra-chain transactions, that is, assets are transferred and settled in the same blockchain. There is a lack of standardized and effective methods for cross-chain transactions, which is prone to security issues. Summary of the invention

[0004] The present application provides a blockchain transaction processing method, device, equipment, storage medium and program product to solve the technical problem of insufficient security of cross-chain transactions.

[0005] In a first aspect, the present application provides a blockchain transaction processing method, which is applied to a blockchain, wherein the blockchain includes a common node and a director node, and the method includes:

[0006] Obtain a cross-chain contract, which is a smart contract related to cross-chain transactions;

[0007] Extracting an intra-chain slice and a cross-chain slice from the cross-chain contract, wherein the intra-chain slice contains contract content irrelevant to the cross-chain, and the cross-chain slice contains contract content related to the cross-chain;

[0008] Send the in-chain slice to the common node and the council node to obtain the in-chain voting results of the common node and the council node on the in-chain slice;

[0009] Send the cross-chain slice to the council node to obtain the cross-chain voting result of the council node on the cross-chain slice;

[0010] The effectiveness mode of the cross-chain contract is determined according to the intra-chain voting result and the cross-chain voting result.

[0011] In a second aspect, the present application provides a blockchain transaction processing device, which is applied to a blockchain, wherein the blockchain includes ordinary nodes and director nodes, and the device includes:

[0012] An acquisition module, used to acquire a cross-chain contract, where the cross-chain contract is a smart contract related to a cross-chain transaction;

[0013] An extraction module, used to extract an intra-chain slice and a cross-chain slice from the cross-chain contract, wherein the intra-chain slice contains contract content unrelated to the cross-chain, and the cross-chain slice contains contract content related to the cross-chain;

[0014] An in-chain voting module, used to send the in-chain slice to the common node and the council node to obtain the in-chain voting results of the common node and the council node on the in-chain slice;

[0015] A cross-chain voting module, used to send the cross-chain slice to the council node to obtain the cross-chain voting result of the council node on the cross-chain slice;

[0016] The validation module is used to determine the validation mode of the cross-chain contract according to the intra-chain voting result and the cross-chain voting result.

[0017] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0018] The memory stores computer-executable instructions;

[0019] The processor executes the computer-executable instructions stored in the memory to implement the blockchain transaction processing method as described in any one of the first aspects.

[0020] In a fourth aspect, the present application provides a computer-readable storage medium, comprising: the computer-readable storage medium stores computer execution instructions, and the computer execution instructions, when executed by a processor, are used to implement the blockchain transaction processing method as described in any one of the first aspects.

[0021] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the blockchain transaction processing method as described in any one of the first aspects.

[0022] The blockchain transaction processing method, device, equipment, storage medium and program product provided by the present application obtains a cross-chain contract and extracts intra-chain slices and cross-chain slices, sends intra-chain slices unrelated to the cross-chain to ordinary nodes and director nodes of the blockchain, and sends cross-chain slices related to the cross-chain to the director nodes. The blockchain can receive the voting results returned by the ordinary nodes and director nodes, and determine the effectiveness method of the cross-chain contract according to the voting results, thereby ensuring that the cross-chain transaction takes effect under review, improving the security of the cross-chain transaction, and expanding the flexibility of cross-chain management. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0024] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;

[0025] Figure 2 A flowchart of a blockchain transaction processing method provided in an embodiment of the present application;

[0026] Figure 3 A schematic diagram of a voting process for taking effect provided in an embodiment of the present application;

[0027] Figure 4 A schematic diagram of another voting process provided in an embodiment of the present application;

[0028] Figure 5 A schematic diagram of a process for determining an associated node provided in an embodiment of the present application;

[0029] Figure 6 A schematic diagram of the structure of a blockchain transaction processing device provided in an embodiment of the present application;

[0030] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0031] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0032] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0033] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0034] In addition, this application involves conducting big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.), and using artificial intelligence technology to make automated decisions, and making technical solutions that have a significant impact on personal rights and interests based on the results of automated decisions. The application provides users with corresponding operation entrances for them to choose to agree or reject the results of automated decisions; if the user chooses to reject, the expert decision-making process will be entered.

[0035] It should be noted that the blockchain transaction processing method, device, equipment, storage medium and program product provided in this application can be used in the blockchain field, and can also be used in any field other than blockchain. The application field of the blockchain transaction processing method, device, equipment, storage medium and program product in this application is not limited.

[0036] In this application, it should be understood that the terms involved have the following meanings:

[0037] Blockchain: Blockchain is a distributed ledger technology that connects data blocks in an orderly manner and uses cryptography to ensure that they cannot be tampered with or forged. Transaction confirmation on the blockchain is completed by all nodes on the blockchain, and its consistency is guaranteed by the consensus algorithm. In a narrow sense, blockchain is a chain data structure that combines data blocks in a sequential manner in chronological order, and is a distributed ledger that is tampered with and cannot be forged using cryptography. In a broad sense, blockchain technology is a new distributed infrastructure and computing paradigm that uses block chain data structures to verify and store data, uses distributed node consensus algorithms to generate and update data, uses cryptography to ensure the security of data transmission and access, and uses smart contracts composed of automated script codes to program and operate data.

[0038] Smart Contract: A smart contract is a computer protocol designed to disseminate, verify or execute contracts in an information-based manner. It is an autonomous, self-executing code that automatically executes the terms and conditions contained therein without human intervention. Smart contracts are designed to run in a decentralized network, enabling reliable, secure and transparent transactions. The decentralized and tamper-proof nature of blockchains makes it possible to implement smart contracts on blockchains.

[0039] Cross-chain technology is an emerging technology in the blockchain field that aims to solve the interoperability problem between different blockchain networks. With the diversification of blockchain applications and the expansion of the ecosystem, cross-chain technology has become increasingly important because it allows communication, data sharing and asset transfer between different blockchain networks.

[0040] At present, some solutions based on cross-chain interaction have been proposed in related technologies, such as introducing notaries or using off-chain methods such as side chains. These methods are very restrictive. For example, in the notary mechanism, it is difficult for the same notary to be recognized in multiple blockchains. Similarly, side chains lack universality when facing different blockchains. Every time a blockchain conducts a cross-chain transaction, it needs to understand off-chain factors based on the transaction object, which is inefficient and lacks standardization.

[0041] The inventor found through research that the reason for the above problems is the lack of a universal and standardized cross-chain interaction method applicable to most blockchains. The existing cross-chain method requires the help of off-chain factors such as notaries, and different blockchains are applicable to different off-chain factors. Each time before a cross-chain occurs, it needs to be verified within the blockchain, which takes a lot of time. The inventor therefore thought that the cross-chain can be managed from the execution level of the cross-chain behavior, that is, it can limit whether the cross-chain related smart contracts are effective, and the nodes within the chain will vote, and decide whether the contract is effective according to the voting results, ensuring that safe cross-chain transactions can be executed, and unsafe cross-chain transactions cannot be executed because the contract cannot take effect, thereby ensuring the security of the cross-chain. In addition, nodes with cross-chain audit capabilities can be selected from the nodes within the blockchain as director nodes, and the director nodes vote on the cross-chain content in the smart contract, which can not only improve the accuracy of decision-making, but also reduce the burden on other nodes and improve the efficiency of cross-chain management.

[0042] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1 As shown, blockchain A may include nodes A1, A2, ..., An, and blockchain B may include nodes B1, B2, ..., Bm. The nodes in blockchain A may conduct cross-chain transactions with the nodes in blockchain B.

[0043] The blockchain transaction processing method, device, equipment, storage medium and program product provided in this application are intended to solve the above technical problems of the prior art.

[0044] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0045] Figure 2 A flowchart of a blockchain transaction processing method provided in an embodiment of the present application. Figure 2 As shown, the method includes:

[0046] Step S201, obtain the cross-chain contract.

[0047] Among them, cross-chain contracts are smart contracts related to cross-chain transactions.

[0048] The blockchain transaction processing method provided in the embodiment of the present application can be applied to a blockchain, which may include ordinary nodes and director nodes. The blockchain may be, but is not limited to, a public chain, a consortium chain, or a private chain.

[0049] Specifically, the smart contract in the blockchain can be identified, and whether the smart contract to be identified is a cross-chain contract can be determined by identifying the transaction objects contained in the smart contract and identifying the interface or library called by the smart contract.

[0050] Step S202, extracting intra-chain slices and cross-chain slices from the cross-chain contract.

[0051] Among them, the intra-chain slice contains contract content that is not related to cross-chain, and the cross-chain slice contains contract content related to cross-chain.

[0052] Specifically, based on the content of the cross-chain contract, the part that is not related to the cross-chain can be extracted to form an intra-chain slice, and the part that is related to the cross-chain can be extracted to form a cross-chain slice. For example, the internal functions and variables defined in the cross-chain contract can be identified. The content involved in this part is usually irrelevant to the cross-chain and can be extracted into the intra-chain slice. For another example, the part related to the intra-chain assets in the cross-chain contract can be identified. The content involved in this part is related to the cross-chain and can be extracted into the cross-chain slice.

[0053] Step S203, sending the in-chain slices to ordinary nodes and council nodes to obtain the in-chain voting results of ordinary nodes and council nodes on the in-chain slices.

[0054] Specifically, after extracting the in-chain slices and cross-chain slices, the in-chain slices can be broadcast to all nodes including ordinary nodes and director nodes. Users corresponding to each node can access the blockchain through terminal devices to obtain the in-chain slices from the node blocks and vote. The blockchain server can receive the voting results returned by each node, which may include affirmative or negative votes.

[0055] Step S204, sending the cross-chain slice to the council node to obtain the cross-chain voting result of the council node on the cross-chain slice.

[0056] A director node may also be referred to as a governance node, which refers to a node with specific authority and responsibility in a blockchain. In an embodiment of the present application, a director node may be a pre-set node with decision-making power for cross-chain transactions.

[0057] Step S205, determine the effectiveness method of the cross-chain contract based on the intra-chain voting results and the cross-chain voting results.

[0058] Specifically, the effectiveness rules of the cross-chain contract can be pre-set according to the voting behavior of the blockchain nodes. After receiving the voting results returned by each node, it can be determined whether the cross-chain contract is effective based on whether the voting results meet the effectiveness rules.

[0059] For example, a threshold can be set based on the number of affirmative votes in the voting results or the proportion of nodes that voted in favor to the total nodes of the blockchain. If the value in the voting results exceeds the threshold, it can be determined that the cross-chain contract can take effect.

[0060] The blockchain transaction processing method provided in this embodiment can obtain cross-chain contracts and extract intra-chain slices and cross-chain slices. The intra-chain slices containing contract content unrelated to the cross-chain can be sent to the ordinary nodes and the director nodes of the blockchain, and the cross-chain slices containing the contract content related to the cross-chain can be sent to the director nodes. The blockchain can receive the voting results returned by the ordinary nodes and the director nodes, and determine the effectiveness of the cross-chain contract according to the voting results. Among them, by extracting the cross-chain slices of the contract, it can make it easier for the director nodes with corresponding permissions to pay attention to the content of the cross-chain transaction. The director nodes can customize the settings, which can not only ensure that the cross-chain transaction is effective under review and improve the security of the cross-chain transaction, but also provide a new type of adjustable cross-chain audit method to expand the flexibility of cross-chain audit.

[0061] In one embodiment, the method of determining the effectiveness of the cross-chain contract according to the intra-chain voting results and the cross-chain voting results includes:

[0062] If the number of affirmative votes in the intra-chain voting results is greater than or equal to the first threshold and the number of affirmative votes in the cross-chain voting results is greater than or equal to the second threshold, the cross-chain contract is determined to be effective.

[0063] Alternatively, if Figure 3 As shown, after obtaining the voting results returned by the ordinary nodes and the director nodes, the number of affirmative votes in the intra-chain voting results and the number of affirmative votes in the cross-chain voting results can be calculated respectively, and the quantitative relationship between the number of affirmative votes in the intra-chain voting results and the preset first threshold value can be compared. If the number of affirmative votes in the intra-chain voting results is less than the first threshold value, all cross-chain contracts will not take effect; if the number of affirmative votes in the intra-chain voting results is greater than or equal to the preset first threshold value, it is possible to continue to compare whether the number of affirmative votes in the cross-chain voting results is greater than or equal to the preset second threshold value. If so, it can be determined that the cross-chain contract is effective.

[0064] By setting the first threshold, whether the cross-chain contract is effective can be determined based on the affirmative votes in the intra-chain voting results. The intra-chain voting results are generated based on the intra-chain slices. If the part of the cross-chain contract related to the chain cannot be passed by the majority of the intra-chain nodes, it can be regarded as a major problem with the contract. There is no need to pay attention to the cross-chain part and it can be directly confirmed to be ineffective, thereby improving the audit efficiency.

[0065] Alternatively, if Figure 3 As shown, if the number of affirmative votes in the intra-chain voting results is greater than or equal to the preset first threshold, but the number of affirmative votes in the cross-chain voting results is less than the second threshold, it can be confirmed that the slices related to the intra-chain in the cross-chain contract are effective, and the cross-chain slices related to the outside chain are not effective.

[0066] If the number of affirmative votes in the intra-chain voting results reaches the first threshold, it can be regarded that the cross-chain contract has been reviewed and approved by the majority of nodes in the intra-chain part. However, if the number of affirmative votes in the cross-chain voting results does not reach the second threshold, it can be regarded that more director nodes believe that there are problems in the cross-chain slice of the contract. At this time, the intra-chain slice of the cross-chain contract can be made effective, and the contract content of the intra-chain part can be executed first, and the cross-chain slice will not take effect for the time being. In this way, the cross-chain contract can be partially effective and the execution process of cross-chain transactions can be flexibly controlled.

[0067] Furthermore, if it is determined that the cross-chain slice is not effective, the in-chain slice of the cross-chain contract can be executed and the next voting conditions can be set; in response to meeting the next voting conditions, the cross-chain voting results of the council nodes on the cross-chain slice are re-obtained, and the effectiveness method of the cross-chain slice is determined based on the re-obtained cross-chain voting results.

[0068] The voting condition may be a time condition. For example, if the director node votes to confirm that the cross-chain slice is not effective for the time being, the next voting time for the cross-chain slice can be set; when the next voting time arrives, the director node's voting result for the cross-chain slice is obtained again. If the number of votes in favor in the voting result is greater than or equal to the second threshold, it can be determined that the cross-chain slice is effective; if the number of votes in favor is still less than the second threshold, other processing can be performed (such as generating an abnormality report, notifying relevant personnel, etc.).

[0069] In some possible implementations, the voting condition may also be an external condition of the blockchain. Taking the cross-chain transaction between the node in blockchain A and the node in blockchain B as an example, the reason why the number of affirmative votes in the voting result of the council node in blockchain A for the cross-chain slice is less than the second threshold may be related to blockchain B. For example, the node in blockchain A meets the requirements of the cross-chain transaction, but the node in blockchain B does not meet the requirements of the cross-chain transaction (such as the node identity is not verified). Whether the node in blockchain B meets the cross-chain transaction requirements can be set as the next voting condition. When the node in blockchain B meets the requirements, the council node in blockchain A votes again.

[0070] By setting the next voting conditions, the part of the cross-chain contract that has not yet been determined to take effect can get another voting opportunity. If it passes after the second vote, the part can take effect, thereby improving the efficiency of contract execution.

[0071] In one embodiment, Figure 4 As shown, the effectiveness of the cross-chain contract is determined based on the intra-chain voting results and the cross-chain voting results, including:

[0072] Step S401, calculate the number of ordinary votes in favor and the number of directors' votes in favor according to the intra-chain voting results.

[0073] Among them, the number of ordinary votes in favor may refer to the total number of votes in favor cast by ordinary nodes for in-chain slices, and the number of director votes in favor may refer to the total number of votes in favor cast by director nodes for in-chain slices.

[0074] Step S402, according to the voting weights corresponding to the ordinary nodes and the director nodes, the number of ordinary approval votes and the number of director approval votes are weightedly calculated to obtain the approval score.

[0075] For example, if the number of ordinary votes is P and the number of director votes is Q, the approval score R can be expressed as: R = k1 × P + k2 × Q. Where k1 can represent the voting weight of an ordinary node, and k2 can represent the voting weight of a director node.

[0076] Step S403: If the approval score is greater than the preset third threshold, it is determined that the intra-chain slice of the cross-chain contract is effective.

[0077] It is understandable that different voting weights can be set for different types of blockchain nodes, and voting weights can affect whether the slices in the chain can take effect. By setting weights, the influence of ordinary nodes and council nodes on the chain part of cross-chain transactions can be flexibly adjusted to ensure the rationality of cross-chain transactions.

[0078] Optionally, before weighted calculation of the number of ordinary approval votes and the number of director approval votes is performed according to the voting weights corresponding to the ordinary nodes and the director nodes, the following is further included:

[0079] Determine the associated nodes according to the cross-chain contract. The associated nodes are ordinary nodes or director nodes. Increase the voting weight corresponding to the associated nodes.

[0080] Among them, the associated node can be a node that has a certain relationship with the cross-chain contract.

[0081] It is understandable that the associated node can be a common node or a director node. After the associated node is determined, the voting weight of the associated node can be increased.

[0082] In some possible implementations, such as Figure 5 As shown, determining the associated nodes according to the cross-chain contract may include:

[0083] Step S501, identifying the intra-chain transaction node in the cross-chain contract.

[0084] Step S502, obtaining the identity information of the transaction node within the blockchain from the blockchain.

[0085] Step S503: determining associated nodes from common nodes and director nodes according to identity information.

[0086] Exemplarily, the objects involved in the cross-chain transaction can be determined based on the content of the cross-chain contract, including the transaction nodes within the chain and the transaction nodes outside the chain. The identity information of the transaction nodes within the chain is then queried based on the blockchain, and which nodes are associated with the transaction nodes within the chain are further determined based on the identity information.

[0087] In this way, on the basis of the above voting method, the associated nodes related to the cross-chain transaction behavior can be further distinguished, and the voting weight of the associated nodes can be increased, so that the associated nodes can have higher decision-making power over cross-chain transactions.

[0088] In one embodiment, obtaining a cross-chain contract may include: obtaining a smart contract to be identified; detecting whether there is preset cross-chain information in the smart contract, and if so, determining the smart contract as a cross-chain contract. The cross-chain information includes at least one of an off-chain object name, a cross-chain interface, a cross-chain library, and a cross-chain route.

[0089] Exemplarily, it is possible to detect whether the blockchain transaction executed by the smart contract contains transaction objects that are not from the current blockchain. If so, it means that the smart contract involves cross-chain transactions.

[0090] For example, the cross-chain call behavior of the smart contract can also be detected. If there is a cross-chain call behavior in the blockchain transaction executed by the smart contract, the smart contract may also involve a cross-chain transaction. For example, cross-chain behavior can be implemented through some frameworks, and the event records of these frameworks can be detected to determine whether the smart contract is a cross-chain call behavior.

[0091] In some possible implementations, cross-chain behaviors can also be detected in other ways. For example, cross-chain transactions usually involve transaction nodes on chain A sending messages to chain A routers to request interactions with chain B. Blockchain routing can be detected to determine whether smart contracts are related to cross-chain transactions. For another example, SDK detection can be used to determine whether cross-chain call behaviors occur.

[0092] Through the above-mentioned methods, it is possible to accurately determine whether a smart contract involves content related to cross-chain transactions, thereby quickly identifying cross-chain contracts and improving the processing efficiency of blockchain cross-chain transactions.

[0093] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0094] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0095] Figure 6 A schematic diagram of the structure of a blockchain transaction processing device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the blockchain transaction processing device 600 includes:

[0096] An acquisition module 601 is used to acquire a cross-chain contract, where the cross-chain contract is a smart contract related to the cross-chain transaction;

[0097] The extraction module 602 is used to extract the intra-chain slice and the cross-chain slice from the cross-chain contract, wherein the intra-chain slice contains the contract content unrelated to the cross-chain, and the cross-chain slice contains the contract content related to the cross-chain.

[0098] The in-chain voting module 603 is used to send the in-chain slice to the ordinary node and the director node to obtain the in-chain voting results of the ordinary node and the director node on the in-chain slice.

[0099] The cross-chain voting module 604 is used to send the cross-chain slice to the council node to obtain the cross-chain voting result of the council node on the cross-chain slice.

[0100] The validation module 605 is used to determine the validation method of the cross-chain contract according to the intra-chain voting result and the cross-chain voting result.

[0101] In one embodiment, the effectiveness module 605 can also be used to: if the number of affirmative votes in the intra-chain voting result is greater than or equal to a first threshold and the number of affirmative votes in the cross-chain voting result is greater than or equal to a second threshold, determine that the cross-chain contract is effective.

[0102] In one embodiment, the effectiveness module 605 can also be used to: if the number of affirmative votes in the intra-chain voting result is greater than or equal to a first threshold and the number of affirmative votes in the cross-chain voting result is less than a second threshold, then determine that the intra-chain slice of the cross-chain contract is effective, and determine that the cross-chain slice is not effective.

[0103] In one embodiment, the validation module 605 can also be used for: if it is determined that the cross-chain slice is not effective, executing the in-chain slice of the cross-chain contract and setting the next voting condition; in response to satisfying the next voting condition, re-obtaining the cross-chain voting result of the director node on the cross-chain slice, and determining the validation method of the cross-chain slice based on the re-obtained cross-chain voting result.

[0104] In one embodiment, the effectiveness module 605 can also be used to: calculate the number of ordinary approval votes and the number of director approval votes according to the intra-chain voting results; perform weighted calculation on the number of ordinary approval votes and the number of director approval votes according to the voting weights corresponding to the ordinary nodes and the director nodes respectively to obtain an approval score; if the approval score is greater than a preset third threshold, it is determined that the intra-chain slice of the cross-chain contract is effective.

[0105] In one embodiment, the validation module 605 can also be used to: determine an associated node according to the cross-chain contract, wherein the associated node belongs to the ordinary node or the council node; and increase the voting weight corresponding to the associated node.

[0106] In one embodiment, the validation module 605 can also be used to: identify the intra-chain transaction node in the cross-chain contract; obtain the identity information of the intra-chain transaction node from the blockchain; and determine the associated node from the ordinary node and the director node based on the identity information.

[0107] In one embodiment, the acquisition module 601 can also be used to: obtain the smart contract to be identified; detect whether there is preset cross-chain information in the smart contract, and if so, determine the smart contract as a cross-chain contract, and the cross-chain information includes at least one of an off-chain object name, a cross-chain interface, a cross-chain library and a cross-chain route.

[0108] The blockchain transaction processing device provided in this embodiment is used to execute the technical solution in any of the aforementioned method embodiments. Its implementation principle and technical effects are similar and will not be repeated here.

[0109] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.

[0110] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.

[0111] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7 As shown, the electronic device 70 includes:

[0112] Processor 71, memory 72, and communication interface 73;

[0113] The memory 72 is used to store executable instructions of the processor 71; the executable instructions may be computer-executable instructions;

[0114] The processor 71 is configured to execute the technical solution in any of the aforementioned method embodiments by executing the executable instructions.

[0115] Optionally, the memory 72 can be independent or integrated with the processor 71.

[0116] Optionally, when the memory 72 is a device independent of the processor 71, the electronic device 70 may further include:

[0117] The bus 74 , the memory 72 and the communication interface 73 are connected to the processor 71 via the bus 74 and communicate with each other. The communication interface 73 is used to communicate with other devices.

[0118] Optionally, the communication interface 73 may be implemented by a transceiver. The communication interface is used to implement communication between the database access device and other devices (such as a client, a read-write library, and a read-only library). The memory may include a random access memory (RAM) and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage.

[0119] The bus 74 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0120] The above-mentioned processor can be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0121] The electronic device is used to execute the technical solution in any of the aforementioned method embodiments, and its implementation principle and technical effect are similar and will not be repeated here.

[0122] An embodiment of the present application also provides a readable storage medium, which may be a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the technical solution provided by any of the aforementioned method embodiments is implemented.

[0123] An embodiment of the present application also provides a computer program product, including a computer program, which is used to implement the technical solution provided by any of the aforementioned method embodiments when executed by a processor.

[0124] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0125] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0126] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0127] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A blockchain transaction processing method, characterized in that: Applied to a blockchain, the blockchain includes ordinary nodes and director nodes, and the blockchain transaction processing method includes: Obtain a cross-chain contract, which is a smart contract related to cross-chain transactions; Extracting an intra-chain slice and a cross-chain slice from the cross-chain contract, wherein the intra-chain slice contains contract content irrelevant to the cross-chain, and the cross-chain slice contains contract content related to the cross-chain; Send the in-chain slice to the common node and the council node to obtain the in-chain voting results of the common node and the council node on the in-chain slice; Send the cross-chain slice to the council node to obtain the cross-chain voting result of the council node on the cross-chain slice; The effectiveness mode of the cross-chain contract is determined according to the intra-chain voting result and the cross-chain voting result.

2. The method according to claim 1, characterized in that The method of determining the effectiveness of the cross-chain contract according to the intra-chain voting result and the cross-chain voting result includes: If the number of affirmative votes in the intra-chain voting result is greater than or equal to a first threshold and the number of affirmative votes in the cross-chain voting result is greater than or equal to a second threshold, it is determined that the cross-chain contract is effective.

3. The method according to claim 1 or 2, characterized in that: The method of determining the effectiveness of the cross-chain contract according to the intra-chain voting result and the cross-chain voting result includes: If the number of affirmative votes in the intra-chain voting result is greater than or equal to the first threshold and the number of affirmative votes in the cross-chain voting result is less than the second threshold, it is determined that the intra-chain slice of the cross-chain contract is effective, and it is determined that the cross-chain slice is not effective.

4. The method according to claim 3, characterized in that Also includes: If it is determined that the cross-chain slice is not effective, the intra-chain slice of the cross-chain contract is executed and the next voting conditions are set; In response to satisfying the next voting condition, the cross-chain voting result of the council node on the cross-chain slice is re-obtained, and the effectiveness mode of the cross-chain slice is determined according to the re-obtained cross-chain voting result.

5. The method according to claim 1 or 2, characterized in that: The method of determining the effectiveness of the cross-chain contract according to the intra-chain voting result and the cross-chain voting result includes: The number of ordinary votes in favor and the number of directors’ votes in favor are calculated based on the voting results within the chain; According to the voting weights corresponding to the ordinary nodes and the council nodes, the number of ordinary votes and the number of council votes are weighted to obtain a vote score; If the approval score is greater than a preset third threshold, it is determined that the in-chain slice of the cross-chain contract is effective.

6. The method according to claim 5, characterized in that Before weighted calculation of the number of ordinary approval votes and the number of director approval votes is performed according to the voting weights corresponding to the ordinary nodes and the director nodes, the method further includes: Determine an associated node according to the cross-chain contract, where the associated node belongs to the common node or the council node; Increase the voting weight corresponding to the associated node.

7. The method according to claim 6, characterized in that The determining of the associated node according to the cross-chain contract includes: Identify the intra-chain transaction node in the cross-chain contract; Obtaining identity information of the transaction node within the chain from the blockchain; An associated node is determined from the common nodes and the director nodes according to the identity information.

8. The method according to claim 1 or 2, characterized in that: The obtaining of the cross-chain contract includes: Get the smart contract to be identified; Detect whether there is preset cross-chain information in the smart contract. If so, determine the smart contract as a cross-chain contract, and the cross-chain information includes at least one of an off-chain object name, a cross-chain interface, a cross-chain library, and a cross-chain route.

9. A blockchain transaction processing device, characterized in that: Applied to a blockchain, the blockchain includes common nodes and director nodes, and the blockchain transaction processing device includes: An acquisition module, used to acquire a cross-chain contract, where the cross-chain contract is a smart contract related to a cross-chain transaction; An extraction module, used to extract an intra-chain slice and a cross-chain slice from the cross-chain contract, wherein the intra-chain slice contains contract content unrelated to the cross-chain, and the cross-chain slice contains contract content related to the cross-chain; An in-chain voting module, used to send the in-chain slice to the common node and the council node to obtain the in-chain voting results of the common node and the council node on the in-chain slice; A cross-chain voting module, used to send the cross-chain slice to the council node to obtain the cross-chain voting result of the council node on the cross-chain slice; The validation module is used to determine the validation mode of the cross-chain contract according to the intra-chain voting result and the cross-chain voting result.

10. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 8 when executed by a processor.

12. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 8 when being executed by a processor.

Citation Information

Patent Citations

  • Oracle machine-based cross-chain asset transaction method and device, and storage medium

    CN113139808A

  • Cross-chain transaction processing method and device, equipment, storage medium and program product

    CN113689216A

  • Cross-chain interoperation management method and device based on governance chain and storage medium

    CN115310920A

  • Cross-chain transaction processing method and device, equipment and storage medium

    CN116957568A

  • Method and apparatus for a hierarchical blockchain network

    WO2020133333A1