Asset transaction method, device and hardware equipment based on blockchain system
By generating smart contracts in the blockchain system, the transaction between nodes of the blockchain transaction party is directly confirmed, which solves the problem of low efficiency of three-party asset transactions in the blockchain system and achieves a more efficient transaction process.
Patent Information
- Application Number
- CN202010025082.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-01-04
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2040-01-04
AI Technical Summary
In the blockchain system, the asset trading process involving third parties is less efficient, and every two parties need to confirm whether the transaction is successful, resulting in complex and time-consuming transaction process.
By receiving transaction requests from the basic user, obtaining user information and transaction method information, determining the corresponding blockchain transaction party node, and generating a smart contract to realize the payment operation of payment and collection account. If the payment is successful, confirm that the transaction is successful.
The confirmation process of three-party asset transactions has been simplified, the asset transaction efficiency of the blockchain system has been improved, and the steps for successful transaction confirmation have been reduced.
Smart Images

Figure CN111027992B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to an asset trading method, device and hardware equipment based on a blockchain system. Background Art
[0002] Blockchain is a recording technology that is different from the traditional centralized accounting method. The nodes participating in the blockchain system may not belong to the same organization and do not need to trust each other. The blockchain data is maintained by all nodes, and each node participating in the maintenance can obtain a copy of the complete record. Compared with traditional accounting technology, its characteristics include: maintaining a growing chain, only adding records, and the records that have occurred cannot be tampered with; consensus can be reached without centralized control, etc.
[0003] In the process of asset transactions between two parties in the blockchain system, if a third party is involved in the transaction, it is necessary to determine whether the two parties have successfully completed the asset transaction with the third party respectively. That is, only after the two parties have successfully completed the asset transaction with the third party respectively, can the asset transaction between the two parties be confirmed to be successful. Therefore, the asset transaction efficiency of the existing blockchain system is low. Summary of the invention
[0004] The present invention provides an asset transaction method, device, computer equipment and storage medium based on a blockchain system, which are used to improve the asset transaction efficiency of the blockchain system.
[0005] An embodiment of the present invention provides an asset transaction method based on a blockchain system, wherein the blockchain system includes multiple basic users and multiple blockchain transaction party nodes, each of the basic users may belong to multiple blockchain transaction party nodes, and the method is applied to a first blockchain transaction party node in the blockchain system, and the method includes:
[0006] Receive a transaction request sent by the basic user, wherein the transaction request carries user information of the basic user, transaction commodities, and transaction amount and transaction method information corresponding to the transaction commodities; the basic user is a transaction user of the first blockchain transaction party node; the transaction request is used to implement a transaction between the basic user and the first blockchain transaction party node;
[0007] Acquire user information and transaction method information of the basic user from the transaction request;
[0008] Determine a second blockchain transaction party node corresponding to the first blockchain transaction party node according to the transaction mode information, and confirm whether the second blockchain transaction party node contains a user account corresponding to the user information of the basic user;
[0009] If it is confirmed that the second blockchain transaction party node contains the user account corresponding to the user information of the basic user, the transaction amount is obtained from the transaction request, and a smart contract is generated based on the user account corresponding to the user information in the second blockchain transaction party node as the payment account, the transaction amount and the payment account corresponding to the first blockchain transaction party node;
[0010] Sending the smart contract to the second blockchain transaction party node, so that the second blockchain transaction party node executes the operation of the payment account paying the transaction amount to the payment receiving account according to the smart contract;
[0011] If it is determined that the operation of the payment account paying the transaction amount to the payment account is successful, then the transaction between the basic user and the first blockchain transaction party node is confirmed to be successful.
[0012] An embodiment of the present invention provides an asset transaction device based on a blockchain system, wherein the blockchain system includes multiple basic users and multiple blockchain transaction party nodes, each of the basic users may belong to multiple blockchain transaction party nodes, and the device is applied to a first blockchain transaction party node in the blockchain system, and the device includes:
[0013] A receiving module, configured to receive a transaction request sent by the basic user, wherein the transaction request carries user information of the basic user, a transaction commodity, and a transaction amount and transaction method information corresponding to the transaction commodity; the basic user is a transaction user of the first blockchain transaction party node; and the transaction request is used to implement a transaction between the basic user and the first blockchain transaction party node;
[0014] An acquisition module, used to acquire user information and transaction method information of the basic user from the transaction request;
[0015] A confirmation module, configured to determine a second blockchain transaction party node corresponding to the first blockchain transaction party node according to the transaction mode information, and confirm whether the second blockchain transaction party node contains a user account corresponding to the user information of the basic user;
[0016] A generation module, configured to obtain the transaction amount from the transaction request if it is confirmed that the second blockchain transaction party node contains a user account corresponding to the user information of the basic user, and generate a smart contract based on the user account corresponding to the user information in the second blockchain transaction party node as the payment account, the transaction amount, and the payment account corresponding to the first blockchain transaction party node;
[0017] A sending module, configured to send the smart contract to the second blockchain transaction party node, so that the second blockchain transaction party node executes the operation of the payment account paying the transaction amount to the payment receiving account according to the smart contract;
[0018] The confirmation module is further configured to confirm that the transaction between the basic user and the first blockchain transaction party node is successful if it is determined that the operation of the payment account paying the transaction amount to the payment receiving account is successful.
[0019] A computer device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned asset transaction method based on the blockchain system when executing the computer program.
[0020] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned asset trading device based on the blockchain system.
[0021] The present invention provides an asset transaction method, device, computer equipment and storage medium based on a blockchain system. The blockchain system includes multiple basic users and multiple blockchain transaction party nodes. Each basic user can belong to multiple blockchain transaction party nodes. First, a transaction request sent by a basic user is received, and user information and transaction method information of the basic user are obtained from the transaction request; and a second blockchain transaction party node corresponding to a first blockchain transaction party node is determined according to the transaction method information; if it is confirmed that the second blockchain transaction party node contains a user account corresponding to the user information of the basic user, the transaction amount is obtained from the transaction request, and a smart contract is generated based on the user account corresponding to the user information in the second blockchain transaction party node as a payment account, a transaction amount and a receiving account corresponding to the first blockchain transaction party node; the smart contract is sent to the second blockchain transaction party node, so that the second blockchain transaction party node executes an operation of the payment account paying the transaction amount to the receiving account according to the smart contract; if it is determined that the operation of the payment account paying the transaction amount to the receiving account is successful, the transaction between the basic user and the first blockchain transaction party node is confirmed to be successful. Compared with the current process of asset transactions involving three parties in a blockchain system, which requires every two parties to confirm whether the transaction is successful, the present invention only needs to confirm that the transaction between the first blockchain transaction party node and the second blockchain transaction party node is successful, and then the asset transaction involving the three parties can be determined. Therefore, the asset transaction efficiency of the blockchain system can be improved through the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0023] Figure 1 is a flow chart of an asset transaction method based on a blockchain system in one embodiment of the present invention;
[0024] Figure 2 is a flow chart for obtaining user information and transaction method information of a basic user in one embodiment of the present invention;
[0025] Figure 3 is a specific flow chart of smart contract generation in one embodiment of the present invention;
[0026] Figure 4 This is a principle block diagram of an asset trading device based on a blockchain system in one embodiment of the present invention;
[0027] Figure 5 is a schematic diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] In one embodiment, if Figure 1 As shown, an asset transaction method based on a blockchain system is provided. The blockchain system includes multiple basic users and multiple blockchain transaction party nodes. Each of the basic users can belong to multiple blockchain transaction party nodes. The basic user is a user of the blockchain transaction party node. The basic user can be a user on multiple blockchain transaction party nodes. Blockchain transaction party nodes can conduct transactions through basic users.
[0030] Hereinafter, this method is described with the first blockchain transaction party node in the blockchain system as the execution subject, and the method includes the following steps:
[0031] S10, receiving a transaction request sent by a basic user.
[0032] Among them, the transaction request carries the user information of the basic user, the transaction goods and the transaction amount and transaction method information corresponding to the transaction goods; the basic user is the transaction user of the first blockchain transaction party node, and the transaction request is used to realize the transaction between the basic user and the first blockchain transaction party node. It should be noted that the basic user is an ordinary user on each transaction platform, and each basic user can apply for a corresponding user account on different platforms, that is, each basic user can belong to a different blockchain transaction party node. The user information of the basic user can specifically be the user's name, account number, delivery address, etc.; the transaction method information is specifically the payment method of the basic user for the transaction, which can be bank card payment, WeChat payment, Alipay payment, etc., which is not specifically limited in the embodiment of the present invention.
[0033] S20, obtaining user information and transaction method information of the basic user from the transaction request.
[0034] In one embodiment provided by the present invention, before receiving the transaction request sent by the basic user, the method further includes: obtaining a user account registration request sent by the basic user; the user account registration request includes the user information and the user account; verifying whether the user information and the user account correspond correctly; if the user information and the user account correspond correctly, the user information and user account of the basic user are stored in the first blockchain transaction party node. Among them, the user account is the payment account of the basic user, and the verification of the user information and user account is to determine whether the user information entered by the basic user can correspond to the user account, that is, to confirm whether the basic user has the authority to realize payment behavior through the user account.
[0035] Correspondingly, such as Figure 2 As shown, step S20 obtains the user information and transaction method information of the basic user from the transaction request, including:
[0036] S201, query whether there is user information and user account corresponding to the basic user in the first blockchain transaction party node.
[0037] In an embodiment of the present invention, after verifying that the user information and the user account correspond correctly, the first blockchain transaction party node stores the user information and user account of the basic user in the first blockchain transaction party node, so that after receiving the transaction request sent by the basic user, it is convenient to query whether the user information and user account corresponding to the basic user exist in the first blockchain transaction party node. If so, it means that the basic user is a registered user of the first blockchain transaction party node, and the user information and transaction method information of the basic user can be obtained from the transaction request in subsequent steps.
[0038] S202: If there is user information and a user account corresponding to the basic user, the user information and transaction method information of the basic user are obtained from the transaction request.
[0039] For the embodiment of the present invention, after receiving the transaction request sent by the basic user, it is queried whether there is user information and user account corresponding to the basic user. If there is user information and user account corresponding to the basic user, it means that the basic user is a registered user of the first blockchain transaction party node. At this time, the user information and transaction method information of the basic user are obtained from the transaction request, which can ensure the efficiency of obtaining the user information and transaction method information of the basic user, so as to realize the transaction between the basic user and the first blockchain transaction party node in the subsequent steps.
[0040] S30, determining the second blockchain transaction party node corresponding to the first blockchain transaction party node according to the transaction method information, and confirming whether the second blockchain transaction party node contains a user account corresponding to the user information of the basic user.
[0041] It should be noted that the transaction method identification information contained in the transaction method information, the transaction method information and the second blockchain transaction party node, can uniquely determine the corresponding second blockchain transaction party node through the transaction method information. After determining the second blockchain transaction party node corresponding to the transaction method information, check whether the second blockchain transaction party node contains the user account corresponding to the user information of the basic user. For example, after the basic user A sends a transaction request to the first blockchain transaction party node, the second blockchain transaction party node corresponding to the first blockchain transaction party node is determined according to the transaction method information in the transaction request, and then check whether the second transaction party node contains the user account of the basic user A.
[0042] S40, if it is confirmed that the second blockchain transaction party node contains a user account corresponding to the user information of the basic user, the transaction amount is obtained from the transaction request, and a smart contract is generated based on the user account corresponding to the user information in the second blockchain transaction party node as the payment account, transaction amount and the receiving account corresponding to the first blockchain transaction party node.
[0043] It should be noted that before generating a smart contract based on the user account corresponding to the user information in the second blockchain transaction party node as the payment account, the transaction amount and the receiving account corresponding to the first blockchain transaction party node, the method also includes: the second blockchain transaction party node sends a CA digital certificate acquisition request to the authoritative agency server, and the CA digital certificate acquisition request includes the user information of the basic user, so that the authoritative agency server performs KYC review on the basic user according to the user information of the basic user; the second blockchain transaction party node receives the CA digital certificate sent by the authoritative agency server, the CA digital certificate includes the user information of the basic user, and the CA digital certificate is a certificate that has passed the KYC review.
[0044] It should be noted that since the second blockchain transaction party is the node where the actual payment behavior occurs, the second blockchain transaction party node needs to obtain the CA digital certificate. Specifically, the CA digital certificate acquisition request sent by the second blockchain transaction party node to the authority server may contain the user information of multiple basic users, that is, the CA digital certificate acquisition request sent by the second blockchain transaction party node at one time can realize the KYC review of multiple basic users.
[0045] Correspondingly, such as Figure 3 As shown, the generating of a smart contract based on the user account corresponding to the user information in the second blockchain transaction party node as the payment account, the transaction amount and the payment account corresponding to the first blockchain transaction party node includes:
[0046] S401, obtain the CA digital certificate of the second blockchain transaction node, and detect whether the CA digital certificate contains user information of the basic user.
[0047] The CA digital certificate contains a public key. Users can trust the CA by verifying its signature. Anyone can obtain a CA digital certificate to verify the certificate it issued. The CA digital certificate binds the public key to the applicant's user identity information, signs it, and then forms a certificate and sends it to the applicant.
[0048] S402: If the CA digital certificate contains user information of the basic user, a smart contract is generated based on the user account corresponding to the user information in the second blockchain transaction party node as the payment account, transaction amount and the receiving account corresponding to the first blockchain transaction party node.
[0049] In the embodiment of the present invention, the CA digital certificate of the second blockchain transaction node is obtained, and it is detected whether the CA digital certificate contains the user information of the basic user. If the CA digital certificate contains the user information of the basic user, a smart contract is generated based on the user account corresponding to the user information in the second blockchain transaction party node as the payment account, transaction amount and the receiving account corresponding to the first blockchain transaction party node. In the subsequent steps, the second blockchain transaction party node can execute the operation of paying the transaction amount from the payment account to the receiving account according to the smart contract.
[0050] S50, sending the smart contract to the second blockchain transaction party node, so that the second blockchain transaction party node executes the operation of paying the transaction amount from the payment account to the payment account according to the smart contract.
[0051] S60: If it is determined that the operation of the payment account paying the transaction amount to the payment account is successful, then the transaction between the basic user and the first blockchain transaction party node is confirmed to be successful.
[0052] The present invention provides an asset transaction method based on a blockchain system. The blockchain system includes multiple basic users and multiple blockchain transaction party nodes. Each basic user can belong to multiple blockchain transaction party nodes. First, a transaction request sent by a basic user is received, and user information and transaction method information of the basic user are obtained from the transaction request; and a second blockchain transaction party node corresponding to a first blockchain transaction party node is determined according to the transaction method information; if it is confirmed that the second blockchain transaction party node contains a user account corresponding to the user information of the basic user, the transaction amount is obtained from the transaction request, and a smart contract is generated according to the user account corresponding to the user information in the second blockchain transaction party node as a payment account, a transaction amount and a receiving account corresponding to the first blockchain transaction party node; the smart contract is sent to the second blockchain transaction party node, so that the second blockchain transaction party node executes an operation of the payment account paying the transaction amount to the receiving account according to the smart contract; if it is determined that the operation of the payment account paying the transaction amount to the receiving account is successful, the transaction between the basic user and the first blockchain transaction party node is confirmed to be successful. Compared with the current process of asset transactions involving three parties in a blockchain system, which requires every two parties to confirm whether the transaction is successful, the present invention only needs to confirm that the transaction between the first blockchain transaction party node and the second blockchain transaction party node is successful, and then the asset transaction involving the three parties can be determined. Therefore, the asset transaction efficiency of the blockchain system can be improved through the present invention.
[0053] In one embodiment provided by the present invention, in order to ensure the security of the smart contract, after generating a smart contract based on the user account corresponding to the user information in the second blockchain transaction party node as the payment account, the transaction amount and the receiving account corresponding to the first blockchain transaction party node, the method also includes: performing a hash calculation based on the user information of the basic user and the receiving account corresponding to the first blockchain transaction party node to obtain a smart contract encryption key; and encrypting the smart contract using the smart contract encryption key.
[0054] Correspondingly, after receiving the encrypted smart contract, the second blockchain transaction party node first obtains the user information of the basic user and the receiving account corresponding to the first blockchain transaction party node that needs to make payment, and then performs hash calculation on the user information of the basic user and the receiving account corresponding to the first blockchain transaction party node to obtain the decryption key of the smart contract, and then decrypts the smart contract through the decryption key, and executes the operation of paying the transaction amount from the payment account to the receiving account based on the content in the smart contract, thereby ensuring the security of asset transactions.
[0055] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0056] In one embodiment provided by the present invention, an asset transaction device based on a blockchain system is provided, and the asset transaction device based on a blockchain system corresponds one-to-one to the asset transaction method based on a blockchain system in the above embodiment. Figure 4 As shown, the blockchain system includes multiple basic users and multiple blockchain transaction party nodes, each of the basic users can belong to multiple blockchain transaction party nodes, the device is applied to the first blockchain transaction party node in the blockchain system, and the asset transaction device based on the blockchain system includes: a receiving module 10, an acquisition module 20, a confirmation module 30, a generation module 40, and a sending module 50. The functional modules are described in detail as follows:
[0057] The receiving module 10 is used to receive a transaction request sent by the basic user, wherein the transaction request carries the user information of the basic user, the transaction commodity, and the transaction amount and transaction method information corresponding to the transaction commodity; the basic user is the transaction user of the first blockchain transaction party node; the transaction request is used to realize the transaction between the basic user and the first blockchain transaction party node;
[0058] An acquisition module 20, configured to acquire user information and transaction method information of the basic user from the transaction request;
[0059] A confirmation module 30 is used to determine a second blockchain transaction party node corresponding to the first blockchain transaction party node according to the transaction mode information, and confirm whether the second blockchain transaction party node contains a user account corresponding to the user information of the basic user;
[0060] A generating module 40 is configured to obtain the transaction amount from the transaction request if it is confirmed that the second blockchain transaction party node contains a user account corresponding to the user information of the basic user, and generate a smart contract based on the user account corresponding to the user information in the second blockchain transaction party node as the payment account, the transaction amount, and the payment account corresponding to the first blockchain transaction party node;
[0061] A sending module 50, configured to send the smart contract to the second blockchain transaction party node, so that the second blockchain transaction party node executes the operation of the payment account paying the transaction amount to the payment receiving account according to the smart contract;
[0062] The confirmation module 30 is further configured to confirm that the transaction between the basic user and the first blockchain transaction party node is successful if it is determined that the operation of the payment account paying the transaction amount to the payment receiving account is successful.
[0063] Furthermore, the device also includes:
[0064] The acquisition module 20 is further used to acquire a user account registration request sent by the basic user; the user account registration request includes the user information and the user account;
[0065] Verification module 60, used to verify whether the user information and the user account correctly correspond;
[0066] A storage module 70 is used to store the user information and the user account of the basic user in the first blockchain transaction party node if the user information and the user account correspond correctly;
[0067] The acquisition module 20 is specifically used to query whether there is user information and a user account corresponding to the basic user in the first blockchain transaction party node; if there is user information and a user account corresponding to the basic user, the user information and transaction method information of the basic user are obtained from the transaction request.
[0068] The sending module 50 is also used for the second blockchain transaction party node to send a CA digital certificate acquisition request to the authority server, wherein the CA digital certificate acquisition request includes the user information of the basic user, so that the authority server performs KYC review on the basic user according to the user information of the basic user;
[0069] The receiving module 10 is also used for the second blockchain transaction party node to receive the CA digital certificate sent by the authoritative agency server, the CA digital certificate includes user information of the basic user, and the CA digital certificate is a certificate that has passed the KYC review.
[0070] The generation module 40 is specifically used to obtain the CA digital certificate of the second blockchain transaction node, and detect whether the CA digital certificate contains the user information of the basic user; if the CA digital certificate contains the user information of the basic user, a smart contract is generated based on the user account corresponding to the user information in the second blockchain transaction party node as the payment account, the transaction amount and the receiving account corresponding to the first blockchain transaction party node.
[0071] Furthermore, the device also includes:
[0072] The encryption module 80 is used to perform hash calculation based on the user information of the basic user and the payment account corresponding to the first blockchain transaction party node to obtain a smart contract encryption key; and encrypt the smart contract using the smart contract encryption key.
[0073] For the specific definition of the asset trading device based on the blockchain system, please refer to the definition of the asset trading method based on the blockchain system above, which will not be repeated here. Each module in the above-mentioned asset trading device based on the blockchain system can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0074] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an asset trading method based on a blockchain system is implemented.
[0075] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0076] Receive a transaction request sent by the basic user, wherein the transaction request carries user information of the basic user, transaction commodities, and transaction amount and transaction method information corresponding to the transaction commodities; the basic user is a transaction user of the first blockchain transaction party node; the transaction request is used to implement a transaction between the basic user and the first blockchain transaction party node;
[0077] Acquire user information and transaction method information of the basic user from the transaction request;
[0078] Determine a second blockchain transaction party node corresponding to the first blockchain transaction party node according to the transaction mode information, and confirm whether the second blockchain transaction party node contains a user account corresponding to the user information of the basic user;
[0079] If it is confirmed that the second blockchain transaction party node contains the user account corresponding to the user information of the basic user, the transaction amount is obtained from the transaction request, and a smart contract is generated based on the user account corresponding to the user information in the second blockchain transaction party node as the payment account, the transaction amount and the payment account corresponding to the first blockchain transaction party node;
[0080] Sending the smart contract to the second blockchain transaction party node, so that the second blockchain transaction party node executes the operation of the payment account paying the transaction amount to the payment receiving account according to the smart contract;
[0081] If it is determined that the operation of the payment account paying the transaction amount to the payment account is successful, then the transaction between the basic user and the first blockchain transaction party node is confirmed to be successful.
[0082] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0083] Receive a transaction request sent by the basic user, wherein the transaction request carries user information of the basic user, transaction commodities, and transaction amount and transaction method information corresponding to the transaction commodities; the basic user is a transaction user of the first blockchain transaction party node; the transaction request is used to implement a transaction between the basic user and the first blockchain transaction party node;
[0084] Acquire user information and transaction method information of the basic user from the transaction request;
[0085] Determine a second blockchain transaction party node corresponding to the first blockchain transaction party node according to the transaction mode information, and confirm whether the second blockchain transaction party node contains a user account corresponding to the user information of the basic user;
[0086] If it is confirmed that the second blockchain transaction party node contains the user account corresponding to the user information of the basic user, the transaction amount is obtained from the transaction request, and a smart contract is generated based on the user account corresponding to the user information in the second blockchain transaction party node as the payment account, the transaction amount and the payment account corresponding to the first blockchain transaction party node;
[0087] Sending the smart contract to the second blockchain transaction party node, so that the second blockchain transaction party node executes the operation of the payment account paying the transaction amount to the payment receiving account according to the smart contract;
[0088] If it is determined that the operation of the payment account paying the transaction amount to the payment account is successful, then the transaction between the basic user and the first blockchain transaction party node is confirmed to be successful.
[0089] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0090] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0091] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. An asset trading method based on a blockchain system, characterized in that: The blockchain system includes multiple basic users and multiple blockchain transaction party nodes, each of the basic users may belong to multiple blockchain transaction party nodes, and the method is applied to the first blockchain transaction party node in the blockchain system, and the method includes: Receive a transaction request sent by the basic user, wherein the transaction request carries user information of the basic user, transaction commodities, and transaction amount and transaction method information corresponding to the transaction commodities; the basic user is a transaction user of the first blockchain transaction party node; the transaction request is used to implement a transaction between the basic user and the first blockchain transaction party node; Acquire user information and transaction method information of the basic user from the transaction request; Determine a second blockchain transaction party node corresponding to the first blockchain transaction party node according to the transaction mode information, and confirm whether the second blockchain transaction party node contains a user account corresponding to the user information of the basic user; If it is confirmed that the second blockchain transaction party node contains the user account corresponding to the user information of the basic user, the transaction amount is obtained from the transaction request, and a smart contract is generated based on the user account corresponding to the user information in the second blockchain transaction party node as the payment account, the transaction amount and the payment account corresponding to the first blockchain transaction party node; Sending the smart contract to the second blockchain transaction party node, so that the second blockchain transaction party node executes the operation of the payment account paying the transaction amount to the payment receiving account according to the smart contract; If it is determined that the operation of the payment account paying the transaction amount to the payment account is successful, then the transaction between the basic user and the first blockchain transaction party node is confirmed to be successful.
2. The asset transaction method based on the blockchain system according to claim 1 is characterized in that: Before receiving the transaction request sent by the basic user, the method further includes: Obtaining a user account registration request sent by the basic user; the user account registration request includes the user information and the user account; Verifying whether the user information and the user account correctly correspond; If the user information and the user account correctly correspond, the user information and the user account of the basic user are correspondingly stored in the first blockchain transaction party node; Obtaining user information and transaction method information of the basic user from the transaction request, including: Querying whether the first blockchain transaction party node has user information and a user account corresponding to the basic user; If there is user information and a user account corresponding to the basic user, the user information and transaction method information of the basic user are obtained from the transaction request.
3. The asset transaction method based on the blockchain system according to claim 1 is characterized in that: Before generating a smart contract based on the user account corresponding to the user information in the second blockchain transaction party node as the payment account, the transaction amount and the payment account corresponding to the first blockchain transaction party node, the method further includes: The second blockchain transaction party node sends a CA digital certificate acquisition request to the authority server, wherein the CA digital certificate acquisition request includes the user information of the basic user, so that the authority server performs KYC review on the basic user according to the user information of the basic user; The second blockchain transaction party node receives the CA digital certificate sent by the authoritative agency server, wherein the CA digital certificate includes user information of the basic user, and the CA digital certificate is a certificate that has passed the KYC review.
4. The asset transaction method based on the blockchain system according to claim 3 is characterized in that: The generating of a smart contract according to the user account corresponding to the user information in the second blockchain transaction party node as the payment account, the transaction amount and the payment account corresponding to the first blockchain transaction party node comprises: Obtaining the CA digital certificate of the second blockchain transaction party node, and detecting whether the CA digital certificate contains the user information of the basic user; If the CA digital certificate contains the user information of the basic user, a smart contract is generated based on the user account corresponding to the user information in the second blockchain transaction party node as the payment account, the transaction amount and the receiving account corresponding to the first blockchain transaction party node.
5. The asset transaction method based on the blockchain system according to claim 4 is characterized in that: After generating a smart contract based on the user account corresponding to the user information in the second blockchain transaction party node as the payment account, the transaction amount and the payment account corresponding to the first blockchain transaction party node, the method further includes: A smart contract encryption key is obtained by performing a hash calculation based on the user information of the basic user and the payment account corresponding to the first blockchain transaction party node; The smart contract is encrypted using the smart contract encryption key.
6. An asset trading device based on a blockchain system, characterized in that: The blockchain system includes multiple basic users and multiple blockchain transaction party nodes, each of the basic users may belong to multiple blockchain transaction party nodes, the device is applied to the first blockchain transaction party node in the blockchain system, and the device includes: A receiving module, configured to receive a transaction request sent by the basic user, wherein the transaction request carries user information of the basic user, a transaction commodity, and a transaction amount and transaction method information corresponding to the transaction commodity; the basic user is a transaction user of the first blockchain transaction party node; and the transaction request is used to implement a transaction between the basic user and the first blockchain transaction party node; An acquisition module, used to acquire user information and transaction method information of the basic user from the transaction request; A confirmation module, configured to determine a second blockchain transaction party node corresponding to the first blockchain transaction party node according to the transaction mode information, and confirm whether the second blockchain transaction party node contains a user account corresponding to the user information of the basic user; A generation module, configured to obtain the transaction amount from the transaction request if it is confirmed that the second blockchain transaction party node contains a user account corresponding to the user information of the basic user, and generate a smart contract based on the user account corresponding to the user information in the second blockchain transaction party node as the payment account, the transaction amount, and the payment account corresponding to the first blockchain transaction party node; A sending module, configured to send the smart contract to the second blockchain transaction party node, so that the second blockchain transaction party node executes the operation of the payment account paying the transaction amount to the payment receiving account according to the smart contract; The confirmation module is further configured to confirm that the transaction between the basic user and the first blockchain transaction party node is successful if it is determined that the operation of the payment account paying the transaction amount to the payment receiving account is successful.
7. The asset transaction device based on the blockchain system according to claim 6, characterized in that: The device also includes: The acquisition module is further used to acquire a user account registration request sent by the basic user; the user account registration request includes the user information and the user account; A verification module, used to verify whether the user information and the user account correctly correspond; A storage module, configured to store the user information and the user account of the basic user in the first blockchain transaction party node accordingly if the user information and the user account correctly correspond to each other; The acquisition module is specifically used to query whether there is user information and user account corresponding to the basic user in the first blockchain transaction party node; if there is user information and user account corresponding to the basic user, the user information and transaction method information of the basic user are obtained from the transaction request.
8. The asset transaction device based on the blockchain system according to claim 6, characterized in that: The sending module is further used for the second blockchain transaction party node to send a CA digital certificate acquisition request to the authority server, wherein the CA digital certificate acquisition request includes the user information of the basic user, so that the authority server performs KYC review on the basic user according to the user information of the basic user; The receiving module is also used for the second blockchain transaction party node to receive the CA digital certificate sent by the authoritative agency server, the CA digital certificate includes user information of the basic user, and the CA digital certificate is a certificate that has passed the KYC review.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the asset trading method based on the blockchain system as described in any one of claims 1 to 5 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the asset transaction method based on the blockchain system as described in any one of claims 1 to 5 is implemented.