Alliance chain asset transaction method, device, equipment, medium and program product
By verifying the consistency of user identifiers and transaction requests on the consortium blockchain and combining this with contract management, the problem of opacity in consortium blockchain transactions is solved, enabling secure, transparent, and auditable digital asset transactions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-22
- Publication Date
- 2026-04-10
AI Technical Summary
There is a lack of transparency in consortium blockchain transactions. User authentication and transaction supervision rule verification rely on off-chain systems, leading to trust issues.
By extracting user public keys, identifying user identifiers, and verifying the consistency of the identifiers with the associated organizations on the consortium blockchain, identity verification and access control are performed using process control contracts and user identity contracts. Combined with regulatory rule contracts and asset transaction contracts, this enables fully transparent and auditable on-chain digital asset transactions.
It enhances the security and access control precision of consortium blockchain asset transactions, ensures the legality and transparency of transaction identities, prevents identity impersonation and tampering, and realizes on-chain digital asset transactions that are open, transparent, and auditable by all parties throughout the entire process.
Smart Images

Figure CN121836907A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain, and more specifically to a method, apparatus, device, medium, and program product for trading consortium blockchain assets. Background Technology
[0002] A blockchain network is a decentralized network structure. In a blockchain network, nodes collectively participate in information recording, utilizing cryptographic methods and a consensus mechanism among participants to achieve the characteristics of openness, transparency, and traceability. Information recorded in a blockchain network is highly secure, as the cost of tampering is very high. Based on entry barriers, blockchain networks can be categorized into three types: public blockchains, consortium blockchains, and private blockchains.
[0003] A consortium blockchain is a type of blockchain that falls between public and private blockchains, jointly managed and maintained by multiple pre-selected and authorized organizations. It offers a balance between performance, privacy, and controllability, making it suitable for inter-enterprise collaboration, such as supply chain management or financial services. This is because the number of participants is limited, data is relatively private, and transaction speeds are relatively fast. Improving the trustworthiness of consortium blockchain transactions is crucial for enhancing the asset transaction management capabilities of consortium blockchains. Summary of the Invention
[0004] In view of the above issues, this application provides consortium blockchain asset transaction methods, apparatus, devices, media, and program products to improve the credibility of asset transactions.
[0005] According to a first aspect of this application, a method for asset trading on a consortium blockchain is provided, comprising: in response to receiving a user transaction request submitted by an organization of the consortium blockchain, extracting the user's public key from the user transaction request, wherein the user transaction request is initiated by the user to the organization and contains the user's public key; determining the user's identifier based on the user's public key using a pre-defined method; verifying the user's identifier according to the records of the consortium blockchain, and if the organization associated with the user's identifier is consistent with the organization that submitted the user transaction request, then continuing to process the user transaction request, wherein the user's identifier is pre-recorded on the consortium blockchain by the organization and associated with an organization.
[0006] According to an embodiment of this application, determining a user's identifier based on the user's public key using a pre-defined method includes: calculating the hash value of the public key based on the user's public key, wherein the user's public key is calculated by multiplying a random integer by a scalar of the curve base point; and extracting the target byte segment of the hash value to obtain the user's identifier.
[0007] According to an embodiment of this application, the method further includes: in response to receiving a user transaction request submitted by an organization, the process control contract calls the user identity contract to verify the user's identity, wherein the process control contract is used to select at least one from N contracts to verify the user transaction request; the user identity contract verifies the user's identifier based on the records of the consortium blockchain, where N is a positive integer greater than 2.
[0008] According to an embodiment of this application, the method further includes: the user identity contract extracting the user's signature from the user transaction request, wherein the signature is generated by the user signing the content of the user transaction request using their private key; verifying whether the signature conforms to the content of the user transaction request using the user's public key; and rejecting the user transaction request if the signature verification fails.
[0009] According to an embodiment of this application, the method further includes: the overall process control contract calling the regulatory rules contract to verify whether the user transaction request complies with the global rules and the organizational rules. The global rules are established according to the governance rules of the consortium blockchain and are valid for all transaction requests. The organizational rules are pre-stored in the consortium blockchain by the organization and are valid for users within the organization. If the user transaction request complies with the regulatory rules contract, the asset transaction contract is called to perform an asset transaction according to the user transaction request.
[0010] According to an embodiment of this application, the establishment of a regulatory rule contract includes: at least one organization proposing a regulatory rule contract; the proposing organization and other organizations voting in accordance with the governance rules of the consortium blockchain; and if the proportion of organizations voting in favor meets the threshold preset by the governance rules, the regulatory rule contract is established.
[0011] According to an embodiment of this application, invoking an asset transaction contract to conduct an asset transaction based on a user transaction request includes: the asset transaction contract verifying, based on a pre-stored asset information mapping, whether the asset specified in the user transaction request belongs to the user who initiated the user transaction request; the asset information mapping includes the mapping of the asset type, the identifier of the user to whom the asset belongs, and the asset attribute value; if the asset belongs to the user who initiated the user transaction request, then the identifier of the user to whom the asset belongs in the asset information mapping is updated to the identifier of the asset recipient in the user transaction request.
[0012] The second aspect of this application provides a consortium blockchain asset trading device, including a user public key extraction module for extracting the user's public key from a user transaction request submitted by an organization of the consortium blockchain in response to receiving such a request. The user transaction request is initiated by the user to the organization and contains the user's public key. A user identifier determination module is used to determine the user's identifier based on the user's public key using a pre-set method. A transaction request verification module is used to verify the user's identifier based on records in the consortium blockchain. If the organization associated with the user's identifier matches the organization that submitted the user transaction request, the user transaction request is processed. The user's identifier is pre-recorded on the consortium blockchain by the organization and associated with an organization.
[0013] A third aspect of this application provides an electronic device comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.
[0014] A fourth aspect of this application also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.
[0015] The fifth aspect of this application also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method. Attached Figure Description
[0016] The above-mentioned contents, other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0017] Figure 1 The illustrations depict application scenarios of consortium blockchain asset trading methods, apparatuses, devices, media, and program products according to embodiments of this application.
[0018] Figure 2 A flowchart illustrating a consortium blockchain asset transaction method according to an embodiment of this application is shown in the illustration.
[0019] Figure 3 A flowchart illustrating a user identifier determination method according to an embodiment of this application is shown schematically;
[0020] Figure 4 A flowchart illustrating another consortium blockchain asset transaction method according to an embodiment of this application is shown schematically;
[0021] Figure 5 This schematic diagram illustrates the principle of invoking an asset trading contract according to an embodiment of this application;
[0022] Figure 6 This schematically illustrates a structural block diagram of a consortium blockchain asset trading device according to an embodiment of this application; and
[0023] Figure 7 A block diagram schematically illustrates an electronic device suitable for implementing a consortium blockchain asset transaction method according to an embodiment of this application. Detailed Implementation
[0024] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0025] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0026] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0027] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0028] In the technical solution of this application, the user information (including but not limited to user personal information, user image information, user device information, such as location information) and data (including but not limited to data used for analysis, stored data, and displayed data) involved are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with relevant laws, regulations, and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse.
[0029] In scenarios where personal information is used for automated decision-making, the methods, devices, and systems provided in this application all provide users with corresponding operation entry points for users to choose to agree to or reject the automated decision results; if the user chooses to reject, the process enters the expert decision-making process.
[0030] To facilitate a better understanding of the concepts of the embodiments of this application, as well as one or more specific implementation details, the terminology involved in some embodiments of this application is first explained as follows.
[0031] A smart contract (or simply contract) is a collection of code and data deployed on a blockchain network. When certain conditions are met, the code can execute automatically without human intervention. Smart contracts effectively circumvent trust issues associated with contracts. Once successfully deployed, the execution process is completed by nodes in the network, unaffected by the parties involved. Blockchain technology provides a trusted execution environment for smart contracts. Smart contracts deployed on a blockchain network have the following advantages: 1. Transparent and open rules: Contract rules are jointly formulated by the contracting parties and deployed on the blockchain network, allowing for auditing by all participating parties. 2. Secure and reliable transactions: Contracts are automatically executed by nodes in the blockchain network, without human intervention, and the execution process is transparent and traceable.
[0032] Asymmetric encryption algorithms: In asymmetric encryption algorithms, there are public and private keys, which are mathematically related. The public key can be derived from the private key, but solving for the private key from the known public key is computationally infeasible when only the public key is known and the private key is unknown. In encryption and decryption, plaintext is encrypted using the public key, and only the corresponding private key can decrypt it. In digital signatures, a digital signature is created using the private key, and the public key is used to verify that the signature content matches the public key, thus confirming that the person who created the signature is the holder of the private key.
[0033] The relevant digital asset transactions within the consortium blockchain can be briefly described as follows:
[0034] On-chain smart contracts: The core logic of asset transactions is carried out on the blockchain in the form of smart contracts. All asset transactions and transfers must meet the operating rules defined in the contract.
[0035] Off-chain auxiliary systems: Non-core parts of transactions are handled using off-chain auxiliary systems, such as user authentication and transaction regulatory rule verification.
[0036] Organizations: refers to the participants in a consortium blockchain. There are multiple pre-selected and authorized organizations in a consortium blockchain. In the context of digital asset trading, these organizations can be regarded as operators or providers of trading services.
[0037] User: An individual or entity that uses a consortium blockchain to trade digital assets, i.e., a user of the trading service.
[0038] When a user conducts an asset transaction, the process is as follows: 1. The user generates a transaction request and submits it to their organization; 2. The organization accepts the user's transaction request and uses an off-chain auxiliary system to authenticate the user's identity (e.g., user password); 3. The organization's transaction supervisor verifies the user's transaction off-chain to ensure it complies with regulatory rules; 4. After all the above verifications are passed, the organization, using its managerial role, submits the asset transaction to the blockchain and executes the transaction on behalf of the user.
[0039] The drawback of consortium blockchain asset transactions is the lack of transparency: only the core part of the transaction takes place on the blockchain, while other auxiliary processes rely on off-chain subsystems, such as user authentication and transaction regulatory rule verification; the content executed off-chain within an organization cannot be observed by other participants in the consortium blockchain, thus creating trust issues.
[0040] The embodiments of this application provide a consortium blockchain asset trading method. By extracting the user's public key, determining the user's identifier, and verifying the consistency between the identifier's associated organization and the submitting organization, a strong binding of transaction identity and access control are achieved. This overcomes the opacity problem caused by relying on off-chain systems to provide transaction assistance functions in existing consortium blockchain digital asset trading technologies. It provides a fully transparent, auditable, and highly modular on-chain digital asset trading method.
[0041] Figure 1 The illustration shows an application scenario diagram of the consortium blockchain asset transaction method, apparatus, device, medium, and program product according to embodiments of this application.
[0042] like Figure 1 As shown, application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104 equipped with a consortium blockchain, and a server 105. Network 104 serves as a medium for providing communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. Its underlying implementation is based on consortium blockchain technology, consisting of a distributed network composed of multiple trusted nodes, ensuring the immutability and traceability of data. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0043] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0044] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0045] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices; at the same time, as one of the nodes in the consortium blockchain, it participates in the consensus and storage of on-chain data.
[0046] It should be noted that the consortium blockchain asset trading method provided in this application embodiment can generally be executed by server 105. Correspondingly, the consortium blockchain asset trading device provided in this application embodiment can generally be located in server 105. The consortium blockchain asset trading method provided in this application embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the consortium blockchain asset trading device provided in this application embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.
[0047] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0048] The following will be based on Figure 1 The described scene, through Figures 2-5 The consortium blockchain asset transaction method according to the embodiments of this application is described in detail.
[0049] Figure 2A flowchart illustrating a consortium blockchain asset transaction method according to an embodiment of this application is shown.
[0050] like Figure 2 As shown, the consortium blockchain asset transaction method in this embodiment includes operations S210 to S230.
[0051] In operation S210, in response to receiving a user transaction request submitted by the organization of the consortium blockchain, the user's public key is extracted from the user transaction request, wherein the user transaction request is initiated by the user to the organization and contains the user's public key.
[0052] In embodiments of this application, user consent or authorization can be obtained before acquiring user information. For example, a request to acquire user information can be sent to the user before operation S210. If the user consents or authorizes the acquisition of user information, operation S210 is executed.
[0053] In the embodiments of this application, a corresponding operation entry can be provided to the user, allowing the user to choose to agree to or reject the automated decision result. That is, before processing / making a decision on user information in S210, the user's instruction to agree to or reject the processing / decision can be obtained through the corresponding operation entry. If the user agrees to the processing / decision, then processing / making a decision on the user information in S210 is performed, i.e., step S230 is executed. If the user refuses to process / make a decision, then the expert decision-making process is initiated.
[0054] In this operation, after a user initiates a transaction, they first submit a transaction request containing their public key to their organization. The organization can also sign the transaction request through its internal endorsing nodes; this signature serves as a key credential for the transaction's legitimacy. The organization's signing entity is its endorsing node, which, based on the organization's membership service provider identity, confirms the validity of the transaction on behalf of the organization, ensuring that the transaction complies with the organization's permissions and on-chain rules. The organization then submits the request to the consortium blockchain. Therefore, in some embodiments, the transaction request received by the consortium blockchain may include a transaction message, user signature, organization signature, and user public key. The user public key can be 64 bytes of binary data generated based on elliptic curves. After receiving the transaction request, the consortium blockchain can extract the user's pre-generated public key from the message fields or the user's identity certificate.
[0055] In operation S220, the user's identifier is determined using the user's public key and a pre-defined method.
[0056] In this operation, a user's unique identity (ID) on the blockchain can be derived from the public key using a preset method. For example, the first public key can be explicitly identified as the unique identifier of the user's device; alternatively, a hash function can be used to calculate the hash value of the extracted 64-byte public key, and bytes 12-32 (20 bytes in total) of the hash result can be taken as the user's unique identifier on the blockchain; the last 20 bytes can also be used as the user's unique identifier on the blockchain, or other preset methods can be used to determine the user's unique identifier on the blockchain. There are no restrictions on this method.
[0057] In operation S230, the user's identifier is verified according to the records of the consortium blockchain. If the organization associated with the user's identifier is consistent with the organization that submitted the user's transaction request, the user's transaction request is processed. The user's identifier is pre-recorded on the consortium blockchain by the organization and associated with an organization.
[0058] This operation relies on the records of the on-chain user identity smart contract to verify whether the organization associated with the user identifier is consistent with the organization submitting the transaction. If they are inconsistent, the transaction is rejected. Users can provide their identity identifier to their organization in advance. The organization calls the user identity contract's method to register the user, registering the identity identifier on the chain and associating it with the organization's identifier.
[0059] For example, User A belongs to organization A, and User B belongs to organization B. Both A and B are authorized organizations in a consortium blockchain. In operation S210, User A generates a transaction message (including transaction information, their own signature, and a 64-byte public key, Pub). 甲 The request is submitted to Organization A; Organization A submits the complete transaction request to the on-chain contract, which extracts the public key Pub from the request. 甲 In operation S220, a pre-defined method (such as a hash function for Pub) is used. 甲 The hash is truncated to the last 20 bytes to obtain the user ID. 甲 (e.g., 0x123456...abc). During operation S230, the user identity contract is invoked to query and the ID is found. 甲 The transaction has been registered and bound to Organization A's ID; the organization submitting the transaction is now Organization A, and since the two are consistent, the transaction is allowed to continue.
[0060] This embodiment achieves strong binding of transaction identities and access control through a process of extracting the user's public key, determining the user identifier, and verifying the consistency between the identifier's associated organization and the submitting organization. Since the user identifier is pre-registered on the consortium blockchain and associated with a single organization, the organization submitting the transaction must match the organization associated with the identifier. This eliminates the possibility of other organizations impersonating the user to initiate transactions, ensuring the legitimacy of transaction requests and thus improving the security and access control precision of consortium blockchain asset transactions. By verifying on-chain, it overcomes the opacity problem caused by relying on off-chain transaction assistance functions in existing consortium blockchain digital asset transaction technologies, providing a fully transparent, auditable, and highly modular on-chain digital asset transaction method.
[0061] In some embodiments of this application, the user's identifier is determined based on the user's public key using a pre-defined method, including: calculating the hash value of the public key based on the user's public key, wherein the user's public key is calculated by multiplying a random integer by a scalar of the curve base point; and extracting the target byte segment of the hash value to obtain the user's identifier.
[0062] In this embodiment, the user identity creation steps include: 1. The user generates their own identity; 2. The user registers their own identity on the blockchain through an organization.
[0063] Figure 3 A flowchart illustrating a user identifier determination method according to an embodiment of this application is shown.
[0064] 1. Users generate their own identity. For example... Figure 3 As shown, user identities can be generated using an elliptic curve asymmetric key pair. In this embodiment, the elliptic curve uses the secp256k1 algorithm (secp is a series of elliptic curve cryptography standards developed by the Efficient Cryptography Standards Group, where 256 represents the key length, k represents the Kobletz curve, and 1 represents the sequence number). The specific steps for generating user identities are as follows.
[0065] i. Generate private key: The user's client generates a random integer that satisfies the following constraints:
[0066] k∈[1,N)
[0067] Where N = FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE BAAEDCE6 AF48A03BBFD25E8CD0364141 (the order of the elliptic curve secp256k1), and the private key k can be represented as a 32-byte binary data.
[0068] ii. Generate public key: Calculate P=kG on the secp256k1 elliptic curve.
[0069] Where G is the base point of the secp256k1 curve, and the resulting public key point P is a point on an elliptic curve with coordinates (x, y). The x and y coordinates of the public key point can each be represented as a 32-byte binary data set. Concatenating these data sets yields the general representation of the public key.
[0070] Pub=x||y
[0071] Pub is the public key, which is a 64-byte binary data.
[0072] iii. Calculate the user's identity: Using the keccak256 hash function, calculate the hash of the above public key, and take the last 20 bytes as the user's unique identity on the blockchain, as follows:
[0073] Identity=keccak256(Pub)[12:32)
[0074] 2. Users register their identity on the blockchain through an organization.
[0075] Users provide their identity identifier to their organization, which then calls the user identity smart contract to register the user, registering the identity identifier on the blockchain and associating it with the organization ID.
[0076] Based on the above process of users generating their own identities, the consortium blockchain obtains the user's public key. By calculating the hash value of the public key and extracting the target byte segment of the hash value, the user's identifier can be obtained.
[0077] This embodiment utilizes a public key generation method that multiplies a random integer with a scalar of the curve's base point, which has high security characteristics and ensures that the public key cannot be generated arbitrarily. On the other hand, the method of extracting byte segments from hash values transforms long public keys into concise identifiers, which not only preserves the uniqueness of the public key but also reduces the storage and verification costs of the identifiers, thus having the dual advantages of security, reliability, efficiency, and ease of use.
[0078] In some embodiments of this application, the method further includes: in response to receiving a user transaction request submitted by an organization, the process control contract calls the user identity contract to verify the user's identity, wherein the process control contract is used to select at least one from N contracts to verify the user transaction request; the user identity contract verifies the user's identifier based on the records of the consortium blockchain, where N is a positive integer greater than 2.
[0079] In this embodiment, the master process control smart contract serves as a unified entry and exit point for external interactions of the consortium blockchain. When the master process control smart contract is invoked externally (e.g., upon receiving a transaction request), it calls the relevant functions of other smart contracts described below. This contract does not contain specific business code; it only manages the process. This modular and pluggable design provides greater flexibility for upgrading on-chain contracts.
[0080] The user identity smart contract provides user identity management functionality. Specifically, users need to be authenticated by an organization to participate in on-chain transactions. Therefore, users need to provide their identity identifier to their organization. The organization then uses the user registration function of this smart contract to associate the user's identity identifier with the organization ID, signifying that the user has been authenticated by that organization. The user identity smart contract's functions include user binding to an organization and organization deleting users.
[0081] Figure 4 The flowchart illustrating another consortium blockchain asset transaction method according to an embodiment of this application is shown schematically.
[0082] like Figure 4 As shown, when a user submits a transaction to the consortium blockchain network through an organization, the consortium blockchain's process control contract receives the user's transaction request submitted by the organization. The process control contract then calls the user identity contract from the user identity contract, regulatory rules contract, and asset transaction contract to verify the user's identity.
[0083] In the example above, if user A submits a transaction request to organization B, and organization B submits the transaction to the contract, in operation S230, the overall process control contract calls the user identity contract to query the ID. 甲 The organization that is bound to the transaction is A, while the organization that submitted the transaction is B. Since the two are inconsistent, the transaction request is rejected.
[0084] This embodiment decouples the identity verification function to a dedicated user identity contract, reducing coupling through modular division of labor and making the updating and auditing of identity verification rules more convenient. At the same time, the verification is based on the immutable records of the consortium blockchain, avoiding the risk of data tampering in centralized verification, ensuring the authenticity and authority of the identity verification results, and thus enhancing the reliability and maintainability of identity verification before transactions.
[0085] In some embodiments of this application, the method further includes: the user identity contract extracting the user's signature from the user transaction request, wherein the signature is generated by the user signing the content of the user transaction request using their private key; verifying whether the signature conforms to the content of the user transaction request using the user's public key; and rejecting the user transaction request if the signature verification fails.
[0086] In this embodiment, the user identity smart contract can have a user transaction information verification function. When a user initiates a digital asset transaction, they need to provide transaction parameters (such as the recipient of the asset, asset type, amount, etc.), and also need to provide a signature of the transaction. The specific parameters of the transaction and the transaction signature are verified within this contract to ensure that the user's transaction has not been tampered with.
[0087] For example, user A (belonging to organization X) initiates a transaction to transfer 100 homogeneous assets to user B.
[0088] 1. User-generated signature: User A's transaction request content is: {Transferor: A, Recipient: B, Asset Type: Token001, Amount: 100, Timestamp: 202511271000}; User A uses their private key k (32 bytes) to perform a keccak256 hash on the transaction content (obtaining hash value H1), and then signs H1 with their private key k to generate user signature S1; User A submits "transaction request content + user signature S1 + user public key Pub A" to organization X, which reviews it and submits it to the consortium blockchain, and it is finally received by the user identity contract.
[0089] 2. Contract Execution Verification Process: The user identity contract extracts the user signature S1 from the transaction request; the user identity contract decrypts S1 using the user's public key Pub A to obtain the decrypted hash value H1'; at the same time, it recalculates the keccak256 hash of the currently received transaction request content to obtain H1''.
[0090] 3. Result judgment: If H1'=H1'', the verification is successful, indicating that the transaction content has not been tampered with and was initiated by user A himself, and the user identity contract allows the transaction to continue; if the verification fails, the hash value recalculated by the user identity contract is H2'', which is inconsistent with the decrypted H1', and the transaction is directly rejected.
[0091] This embodiment achieves transaction tamper resistance and identity verification by extracting the user's private key to sign the transaction and using the public key to verify the consistency between the signature and the transaction content. Since the signature is generated from the transaction content using the user's private key, if the transaction content is tampered with, the signature will not match the content, and verification failure will directly reject the transaction. Verifying identity authenticity and content integrity through signatures prevents transaction impersonation or tampering, ensuring transaction credibility.
[0092] In some embodiments of this application, the method further includes: the overall process control contract calling the regulatory rules contract to verify whether the user transaction request complies with the global rules and the organizational rules. The global rules are established according to the governance rules of the consortium blockchain and are valid for all transaction requests. The organizational rules are pre-stored in the consortium blockchain by the organization and are valid for users within the organization. If the user transaction request complies with the regulatory rules contract, the asset transaction contract is called to perform the asset transaction according to the user transaction request.
[0093] During the execution of each transaction, the overall process control contract calls the regulatory rule verification method of the regulatory rule smart contract to ensure that the transaction complies with regulatory rules, such as the total amount of transaction assets within a certain period of time, and the blacklist and whitelist rules for transaction participants.
[0094] Regulatory rules can include internal organizational regulatory rules and global regulatory rules, which are described in detail below.
[0095] i. In-organization regulatory rules: As mentioned above, each user's identity is bound to a specific organization on the blockchain. Therefore, when executing transactions, users must also follow the specific rules of this organization. Each organization can set its own internal regulatory rules by simply calling this contract as the organization to write the rules into its own rule set.
[0096] ii. Global Regulatory Rules: Global regulatory rules are a set of transaction rules that all users of all organizations participating in this consortium blockchain must follow. No single organization can set global regulatory rules unilaterally. In order to make changes to global regulatory rules (addition, modification, deletion), the change must first be proposed by one organization. Other organizations participating in this consortium blockchain will vote on the proposal (and sign the vote with their own private keys). The change will only pass if the vote exceeds a certain threshold (e.g., 2 / 3), at which point the rule change will officially take effect.
[0097] For example, when a user executes an asset transaction, the following steps may be included.
[0098] 1. Users generate asset transaction-related messages locally.
[0099] 2. User signing of transaction messages: i. Calculate the hash of the transaction using the keccak256 hash algorithm; ii. Sign the message using the user's private key to obtain the signature data.
[0100] 3. The user submits the signed transaction message to their organization. The transaction message includes the following parts: i. Original transaction information; ii. The user signature generated in step 2; iii. The user's public key.
[0101] 4. The organization submits the user's transaction message to the transaction control smart contract.
[0102] 5. The overall transaction control smart contract executes the transaction process. i. It calls the user identity smart contract to confirm that the user's organization matches the submitter's organization; ii. It calls the user identity smart contract to verify that the user's signature matches the submitted message; iii. It calls the regulatory rules smart contract to verify that the user's transaction complies with regulatory rules. In this step, it is necessary to verify whether the user's transaction complies with both global rules and organizational rules. Only if both conditions are met is the transaction allowed to continue; iv. It calls the asset trading smart contract to execute the asset transaction.
[0103] This embodiment uses a central control contract to invoke a regulatory rules contract to verify both global and organizational rules. Global rules are valid for all organizations, ensuring a unified compliance standard for transactions within the consortium blockchain. Organizational rules are tailored to the specific needs of individual organizations, accommodating personalized management. Furthermore, all rules are stored on the consortium blockchain, possessing transparent and immutable characteristics, and the contract executes verification automatically without manual intervention. This two-tiered rule system satisfies both the common and individual compliance needs of the consortium blockchain, while automatic on-chain rule verification enhances the efficiency and credibility of compliance checks, preventing abnormal transactions.
[0104] In some embodiments of this application, the establishment of a regulatory rule contract includes: at least one organization proposing a regulatory rule contract; the proposing organization and other organizations voting in accordance with the governance rules of the consortium blockchain; and if the proportion of organizations voting in favor meets the threshold preset by the governance rules, then the regulatory rule contract is established.
[0105] The global rule setting process involves the following steps: i. Organization A proposes a global rule change (addition, deletion, modification); ii. Other organizations can query the detailed information of this proposal on the blockchain; iii. The remaining organizations vote on the proposal to determine whether to agree to the global rule change; iv. When the proportion of organizations voting in favor exceeds a threshold, the vote passes, and the rule change is implemented; v. If the proposal fails to collect the required threshold of votes by the deadline, the proposal automatically expires. All of the above steps are performed by calling the interface provided by the regulatory rule smart contract.
[0106] This embodiment, based on decentralized governance technology logic of organizational proposal and voting, ensures the fairness and authority of regulatory rules. It allows at least one organization to propose rules, breaking the monopoly of a single organization on rule-making; the voting process strictly follows consortium blockchain governance rules, requiring the consent of a sufficient proportion of organizations to establish a rule, ensuring that the rule aligns with the interests and demands of the majority of organizations. This adherence to the consortium blockchain decision-making mechanism enhances the acceptance and willingness to implement rules, strengthening the legitimacy and stability of regulatory rules.
[0107] In some embodiments of this application, invoking an asset transaction contract to conduct an asset transaction based on a user transaction request includes: the asset transaction contract verifying, based on a pre-stored asset information mapping, whether the asset specified in the user transaction request belongs to the user who initiated the user transaction request; the asset information mapping includes a mapping of asset type, the identifier of the user to whom the asset belongs, and the asset attribute value; if the asset belongs to the user who initiated the user transaction request, then the identifier of the user to whom the asset belongs in the asset information mapping is updated to the identifier of the asset recipient in the user transaction request.
[0108] The asset trading contract is responsible for handling the business logic related to on-chain digital asset transactions. Users' on-chain assets can be stored in this contract in the form of a double-key data table, as follows:
[0109] Map(Identity, AssetId)=AssetAttribute
[0110] Where: Identity: represents the user's identity identifier; AssetId: represents the asset type; each digital asset circulating on the blockchain has a unique ID; AssetAttribute: the specific attribute of a digital asset held by the user. For fungible tokens, this attribute is a numerical value representing the quantity of the asset; for non-fungible tokens, this attribute represents whether the user holds a non-fungible asset with the item ID AssetId.
[0111] In this embodiment, the asset trading contract can handle both non-fungible and fungible assets simultaneously, providing flexibility and scalability for digital asset trading.
[0112] Figure 5 The diagram illustrates the principle of invoking an asset trading contract transaction according to an embodiment of this application.
[0113] like Figure 5 As shown in the example, in this embodiment, user A initiates a transaction (user transaction request 1) to transfer one unit of asset C to user B. The asset transaction contract receives the transaction request, which includes user A's public key Pub A, the recipient's identity identifier B, the asset type C, and the asset attribute value (transfer quantity) 1. Since asset C is a homogeneous asset, the asset attribute value is a numerical value.
[0114] After obtaining and verifying user A's identifier A using user A's public key Pub A, the asset transaction contract uses the binary key (A,C) to query the data table. The query result returns an asset attribute value of 10. This value is greater than the amount to be transferred (1), confirming that user A has sufficient assets to complete the transaction. After successful verification, the contract begins executing the transfer. For user A: The contract uses key (A,C) to find the corresponding record in the asset ownership and asset type mapping based on the asset information, updating its asset attribute value from 10 to 9. For user B: The contract uses key (B,C) to query the corresponding record; if it does not exist, it is automatically created. Its asset attribute value is updated from 0 to 1.
[0115] In another transaction initiated by user A (user transaction request 2), asset W005 is transferred to user B. The asset transaction contract receives the transaction request, which includes user A's public key Pub A, the recipient's identity B, the asset type W, and the asset attribute value (item ID) W005. Since asset W is a non-fungible asset, the asset attribute value is the asset ID. Because the asset transaction contract does not find this asset in the asset information mapping table (it should be W003), the transaction fails.
[0116] This embodiment verifies asset ownership and automatically updates owner identifiers through on-chain asset information mapping, ensuring the accuracy and security of asset transactions. The asset information mapping includes asset identifiers, user identifiers, and attribute values, stored on the consortium blockchain, making it tamper-proof and verifiable in real time, thus ensuring clear and traceable asset ownership relationships. The asset transaction contract automatically completes ownership verification and owner updates without manual intervention, ensuring accurate asset transfers. This achieves transparency, accuracy, and security in asset transactions.
[0117] Based on the aforementioned consortium blockchain asset trading method, this application also provides a consortium blockchain asset trading device. The following will combine... Figure 6 The device is described in detail.
[0118] Figure 6 A schematic diagram of a consortium blockchain asset trading device according to an embodiment of this application is shown.
[0119] like Figure 6 As shown, the consortium blockchain asset trading device 600 in this embodiment includes a user public key extraction module 610, a user identifier determination module 620, and a transaction request verification module 630.
[0120] The user public key extraction module 610 is used to extract the user's public key from the user transaction request submitted by the organization of the consortium blockchain in response to the user transaction request submitted by the organization. The user transaction request is initiated by the user to the organization and contains the user's public key.
[0121] The user identifier determination module 620 is used to determine the user's identifier based on the user's public key using a pre-set method.
[0122] The transaction request verification module 630 is used to verify the user's identifier based on the records of the consortium blockchain. If the organization associated with the user's identifier is consistent with the organization that submitted the user's transaction request, the user's transaction request will continue to be processed. The user's identifier is pre-recorded on the consortium blockchain by the organization and associated with an organization.
[0123] According to an embodiment of this application, the user identifier determination module 620 is further configured to calculate the hash value of the public key based on the user's public key, wherein the user's public key is calculated by multiplying a random integer by a scalar of the curve base point; and extract the target byte segment of the hash value to obtain the user's identifier.
[0124] According to an embodiment of this application, the transaction request verification module 630 is further configured to, in response to receiving a user transaction request submitted by an organization, call the user identity contract through the process control contract to verify the user's identity, wherein the process control contract is configured to select at least one from N contracts to verify the user transaction request; the user identity contract verifies the user's identifier based on the records of the consortium blockchain.
[0125] According to an embodiment of this application, the transaction request verification module 630 is further configured to call the user identity contract to extract the user's signature from the user transaction request, wherein the signature is generated by the user signing the content of the user transaction request using their private key; verify whether the signature conforms to the content of the user transaction request using the user's public key; and reject the user transaction request if the signature verification fails.
[0126] According to an embodiment of this application, the transaction request verification module 630 is further configured to call the regulatory rule contract through the overall process control contract to verify whether the user's transaction request complies with the global rules and the organizational rules. The global rules are established according to the governance rules of the consortium blockchain and are valid for all transaction requests. The organizational rules are pre-stored in the consortium blockchain by the organization and are valid for users within the organization. If the user's transaction request complies with the regulatory rule contract, the asset transaction contract is called to perform an asset transaction according to the user's transaction request.
[0127] According to an embodiment of this application, the transaction request verification module 630 is further configured to receive a proposal for a regulatory rule contract from at least one organization; the proposing organization and other organizations vote on the proposal in accordance with the governance rules of the consortium blockchain; if the proportion of organizations voting in favor meets the threshold preset by the governance rules, the regulatory rule contract is established.
[0128] According to an embodiment of this application, the transaction request verification module 630 is further configured to call the asset transaction contract to verify whether the asset specified in the user transaction request belongs to the user who initiated the user transaction request based on the pre-stored asset information mapping; the asset information mapping includes the mapping of the asset type, the identifier of the user to whom the asset belongs, and the asset attribute value; if the asset belongs to the user who initiated the user transaction request, the identifier of the user to whom the asset belongs in the asset information mapping is updated to the identifier of the asset recipient in the user transaction request.
[0129] Compared to existing technical solutions, the consortium blockchain asset trading method and apparatus of this application transform most transaction-related subsystems, such as user identity authentication and transaction supervision, from off-chain verification to on-chain smart contracts, solving the black-box problem of off-chain verification and improving transparency. The modules are independent and decoupled, exhibiting good scalability and upgradeability.
[0130] According to embodiments of this application, any multiple modules among the user public key extraction module 610, user identifier determination module 620, and transaction request verification module 630 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least some of the functions of one or more of these modules can be combined with at least some of the functions of other modules and implemented in one module. According to embodiments of this application, at least one of the user public key extraction module 610, user identifier determination module 620, and transaction request verification module 630 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the user public key extraction module 610, user identifier determination module 620, and transaction request verification module 630 can be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.
[0131] Figure 7 A block diagram schematically illustrates an electronic device suitable for implementing a consortium blockchain asset transaction method according to an embodiment of this application.
[0132] like Figure 7As shown, an electronic device 700 according to an embodiment of this application includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage portion 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.
[0133] RAM 703 stores various programs and data required for the operation of electronic device 700. Processor 701, ROM 702, and RAM 703 are interconnected via bus 704. Processor 701 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 702 and / or RAM 703. It should be noted that the programs may also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in said one or more memories.
[0134] According to embodiments of this application, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to a bus 704. The electronic device 700 may also include one or more of the following components connected to the input / output (I / O) interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output (I / O) interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0135] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0136] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include ROM 702 and / or RAM 703 and / or one or more memories other than ROM 702 and RAM 703 described above.
[0137] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code enables the computer system to implement the consortium blockchain asset trading method provided in the embodiments of this application.
[0138] When the computer program is executed by the processor 701, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0139] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 709, and / or installed from a removable medium 711. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0140] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, it performs the functions defined in the system of this application embodiment. According to the embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0141] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0142] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0143] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
Claims
1. A method for asset trading on a consortium blockchain, characterized in that, include: In response to receiving a user transaction request submitted by an organization of the consortium blockchain, the user's public key is extracted from the user transaction request, wherein the user transaction request is initiated by the user to the organization and contains the user's public key; The user's identifier is determined using a pre-defined method based on the user's public key; The user's identifier is verified according to the records of the consortium blockchain. If the organization associated with the user's identifier is consistent with the organization that submitted the user's transaction request, the user's transaction request is processed. The user's identifier is pre-recorded on the consortium blockchain by the organization and associated with one of the organizations.
2. The method according to claim 1, characterized in that, The step of determining the user's identifier using a pre-defined method based on the user's public key includes: Calculate the hash value of the user's public key based on the user's public key, wherein the user's public key is calculated by multiplying a random integer by a scalar of the curve's base point; Extract the target byte segment of the hash value to obtain the user's identifier.
3. The method according to claim 1, characterized in that, Also includes: In response to receiving a user transaction request submitted by the organization, the process control contract calls the user identity contract to verify the user's identity. The process control contract is used to select at least one of N contracts to verify the user transaction request, where N is a positive integer greater than 2. The user identity contract verifies the user's identifier based on the records of the consortium blockchain.
4. The method according to claim 3, characterized in that, Also includes: The user identity contract extracts the user's signature from the user transaction request, wherein the signature is generated by the user signing the content of the user transaction request using their private key; The user's public key is used to verify whether the signature matches the content of the user's transaction request. If the signature verification fails, the user's transaction request is rejected.
5. The method according to claim 4, characterized in that, Also includes: The overall process control contract calls the regulatory rules contract to verify whether the user's transaction request complies with the global rules and the organizational rules. The global rules are established according to the governance rules of the consortium blockchain and are valid for all transaction requests. The organizational rules are pre-stored in the consortium blockchain by the organization and are valid for the users within the organization. If the user's transaction request complies with the regulatory rules contract, the asset transaction contract is invoked to perform the asset transaction according to the user's transaction request.
6. The method according to claim 5, characterized in that, The regulatory rules contract is established in the following ways: The proposal for the regulatory rules contract shall be made by at least one of the aforementioned organizations; The proposed organization and other organizations will vote in accordance with the governance rules of the consortium blockchain; If the proportion of the organization that votes in favor meets the threshold preset by the governance rules, then the regulatory rule contract is established.
7. The method according to claim 5, characterized in that, The invocation of the asset trading contract, and the execution of the asset transaction based on the user's transaction request, includes: The asset transaction contract verifies whether the asset specified in the user's transaction request belongs to the user who initiated the transaction request, based on a pre-stored asset information mapping; the asset information mapping includes the mapping between the asset type, the identifier of the user to whom the asset belongs, and the asset attribute values. If the asset belongs to the user who initiated the user transaction request, then the identifier of the user to whom the asset belongs in the asset information mapping will be updated to the identifier of the asset recipient in the user transaction request.
8. A consortium blockchain asset trading device, characterized in that, The device includes: The user public key extraction module is used to extract the user's public key from the user transaction request submitted by the organization of the consortium blockchain in response to receiving the user transaction request. The user transaction request is initiated by the user to the organization and contains the user's public key. The user identifier determination module is used to determine the user's identifier based on the user's public key using a pre-defined method; and The transaction request verification module is used to verify the user's identifier based on the records of the consortium blockchain. If the organization associated with the user's identifier is consistent with the organization that submitted the user's transaction request, the user's transaction request will continue to be processed. The user's identifier is pre-recorded on the consortium blockchain by the organization and associated with one of the organizations.
9. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.