Blockchain-based e-commerce platform interaction system

Through the interactive server and interactive contracts of blockchain technology, the rapid matching and secure transfer of digital assets between e-commerce platforms is achieved, solving the problem of low transaction efficiency, reducing costs and improving security.

CN119963287BActive Publication Date: 2025-09-02SHANGHAI YIMENG TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510046659.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2023-05-07
Filing Date
2023-08-01
Publication Date
2025-09-02
Estimated Expiration
2043-08-01

AI Technical Summary

Technical Problem

In the process of digital asset interaction between e-commerce platforms, as the number of requests in the interactive contract increases, transaction efficiency decreases, and the existing technology requires a large amount of resources to confirm and match.

Method used

Through the blockchain-based e-commerce platform interaction system, the interactive server is used to quickly match digital assets. The client locks transactions in the interactive contract and transfers only after confirming the honest behavior, reducing the relay link and notary settings, and reducing storage costs.

Benefits of technology

It improves the interaction efficiency of digital assets between e-commerce platforms, reduces costs and ensures the security of assets and the rapid completion of transactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119963287B_ABST
    Figure CN119963287B_ABST
Patent Text Reader

Abstract

The present application discloses an e-commerce platform interaction system based on blockchain, which includes a first client, a second client, an interaction server, a first e-commerce platform, and a second e-commerce platform. The interaction server quickly matches the transaction needs of the first client and the second client for digital assets on the first e-commerce platform and the second e-commerce platform; in addition, the interaction server is also used to generate an interaction identifier during matching and send the interaction identifier to the first client and the second client. The second client is also used to add the interaction identifier to the start interaction request before sending the start interaction request to the interaction contract on the second e-commerce platform. When the first client sends an interaction confirmation request to the interaction contract on the second e-commerce platform, the transaction matching it can be quickly located according to the interaction identifier, thereby greatly improving the transaction efficiency of the interaction contract.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The patent application for this invention is a divisional application. The original application number is 202310960579.5. The application date is August 1, 2023. The name of the invention is blockchain-based e-commerce platform interaction system and method. Technical Field

[0002] The present application relates to the field of data processing technology, and in particular to an e-commerce platform interaction system based on blockchain. Background Art

[0003] Blockchain-based e-commerce platforms are online commerce platforms built using blockchain technology. Blockchain technology is a decentralized distributed ledger that uses smart contracts, consensus algorithms, and other technical means to achieve secure transaction verification and trustless processing. Blockchain technology has great application potential in the e-commerce sector and can improve problems existing in traditional e-commerce platforms, such as trust issues and data security issues.

[0004] However, there are still many problems in the interaction of digital assets between different users on e-commerce platforms. For example, during the interaction process, as the number of requests in the interaction contract increases, the interaction contract often needs to spend more resources to match the interaction confirmation requests to the corresponding transactions, which will greatly reduce transaction efficiency. Summary of the Invention

[0005] The purpose of this invention is to provide an e-commerce platform interaction system based on blockchain to address the shortcomings of the existing technology.

[0006] This application provides an e-commerce platform interaction system based on blockchain, including a first client, a second client, an interaction server, a first e-commerce platform, and a second e-commerce platform, wherein:

[0007] The first client is configured to send an interaction data packet to the interaction server, where the interaction data packet includes a transaction amount, a threshold time, a block confirmation number, and a first e-commerce address and a second e-commerce address of the first client;

[0008] The second client is configured to send a matching data packet to the interactive server, where the matching data packet includes a third e-commerce address and a fourth e-commerce address of the second client;

[0009] The interactive server is configured to obtain the interactive data packet and the matching data packet; when a match is found, send the interactive data packet to the second client and send the matching data packet to the first client;

[0010] The second client is further configured to send a start interaction request to the interaction contract in the second e-commerce platform according to the interaction data packet; the start interaction request includes the transaction amount of the second digital asset, the threshold time, the number of block confirmations, and the first e-commerce address and the second e-commerce address;

[0011] The first client is further configured to initiate a transfer transaction to the third e-commerce address on the first e-commerce platform based on the matching data packet; after the transfer transaction is uploaded to the blockchain and confirmed by the transaction confirmation number of blocks, the first client sends an interaction confirmation request to the interaction contract on the second e-commerce platform; the interaction confirmation request includes the transfer transaction, the Merkle path, the transaction block header, and multiple confirmation block headers;

[0012] The interactive contract is used to verify the transfer transaction according to the interactive confirmation request sent by the first client;

[0013] When the verification result is successful, the second digital asset is unlocked and transferred to the second e-commerce address;

[0014] When the verification result is failure, unlocking the second digital asset and transferring it to the fourth e-commerce address;

[0015] The interaction server is further configured to generate an interaction identifier during matching and send the interaction identifier to the first client and the second client.

[0016] Preferably, the second client is further configured to add the interaction identifier to the interaction start request before sending the interaction start request to the interaction contract in the second e-commerce platform.

[0017] Preferably, the interactive contract generates a first verification hash based on the transfer transaction and the Merkle path operation;

[0018] When the first verification hash matches the root hash in the transaction block header, continue verification:

[0019] The interactive contract loops through the multiple confirmation block headers;

[0020] When the number of the multiple confirmed block headers is equal to the transaction confirmation number and each of the confirmed block headers correctly records the hash value of the previous block header, continue verification:

[0021] The interactive contract sequentially reads the confirmation block header as the current block header, and sequentially performs hash operations on the current block header to generate multiple second verification hashes. When the multiple second verification hashes all meet the consensus coefficient, the verification result is confirmed to be successful;

[0022] Otherwise, the verification result is failure.

[0023] The blockchain-based e-commerce platform interaction system provided by the present invention rapidly matches the transaction needs of digital assets between a first client and a second client on the first e-commerce platform and the second e-commerce platform through an interactive service terminal. The second client deposits a specified amount of digital assets into the interactive contract based on the matching information. At this time, the first client has not yet made a transfer, and the transfer can be made after confirming the honest behavior of the second client, thereby ensuring the security of the assets. In addition, during the interaction process, there is no need to set up a notary public and a relay terminal to transport block headers to the interactive contract, which reduces the number of steps required for interaction and greatly improves the efficiency of digital asset interaction between blockchain-based e-commerce platforms. At the same time, because the proof data is provided by the first client, the interactive contract does not need to provide additional storage space, reducing costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present invention or the existing technical solutions, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0025] Figure 1 This is an architectural diagram of a blockchain-based e-commerce platform interaction system provided in one embodiment of the present application;

[0026] Figure 2 This is a flowchart of a blockchain-based e-commerce platform interaction method provided in one embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0028] See Figure 1 , Figure 1 An embodiment of the present application provides an architecture diagram of an e-commerce platform interaction system based on blockchain.

[0029] A blockchain-based e-commerce platform interaction system includes a first client 10, a second client 20, an interaction server 30, a first e-commerce platform 40, and a second e-commerce platform 50, wherein:

[0030] The first client 10 is used to send an interaction data packet to the interaction server 30 , where the interaction data packet includes the transaction amount, threshold time, block confirmation number, and the first e-commerce address and the second e-commerce address of the first client 10 .

[0031] Among them, the first e-commerce platform 40 and the second e-commerce platform 50 can be built based on blockchain technology, and at least one of the e-commerce platforms is Turing complete, that is, at least one of the platforms should support smart contracts.

[0032] Furthermore, this embodiment limits the number of transactions, but does not limit the type of transaction subject, i.e., digital assets. The type of digital assets traded may be e-commerce platform points, etc.

[0033] Furthermore, the threshold time may be a transaction timeout period. Once a transaction begins, if it is not completed within the specified threshold time period, the transaction will be cancelled. The number of block confirmations may be a condition for determining whether a transaction is successful.

[0034] The second client 20 is configured to send a matching data packet to the interactive server 30 , where the matching data packet includes the third e-commerce address and the fourth e-commerce address of the second client 20 .

[0035] Among them, the first client 10 may have been registered on both the first e-commerce platform 40 and the second e-commerce platform 50, that is, the first client 10 has a first e-commerce address registered on the first e-commerce platform 40, and the first client 10 has a second e-commerce address registered on the second e-commerce platform 50; similarly, the second client 20 has a third e-commerce address registered on the first e-commerce platform 40, and the second client 20 has a fourth e-commerce address registered on the second e-commerce platform 50; that is to say, the first e-commerce address and the second e-commerce address respectively represent the addresses of the first client 10 in the first e-commerce platform 40 and the second e-commerce platform 50; the third e-commerce address and the fourth e-commerce address respectively represent the addresses of the second client 20 in the first e-commerce platform 40 and the second e-commerce platform 50.

[0036] The interactive server 30 is configured to obtain the interactive data packet and the matching data packet; when a match is found, the interactive data packet is sent to the second client 20 and the matching data packet is sent to the first client 10 .

[0037] Among them, after obtaining the interactive data packet, the interactive server 30 can list the transaction requirements in the interactive data packet on the server. When the second client 20 finds a match with the displayed requirements, the second client 20 can send a matching data packet to the interactive server 30.

[0038] The second client 20 is further configured to send a start interaction request to the interaction contract in the second e-commerce platform 50 according to the interaction data packet; the start interaction request includes the transaction amount of the second digital asset, the threshold time, the number of block confirmations, and the first e-commerce address and the second e-commerce address.

[0039] Among them, the assets used for interaction between the first e-commerce platform 40 and the second e-commerce platform 50 can be represented by the first digital asset and the second digital asset respectively. Specifically, the first digital asset and the second digital asset can be the platform points on the first e-commerce platform 40 and the second e-commerce platform 50 respectively.

[0040] Furthermore, after the second client 20 sends an interaction request to the interaction contract, the second digital asset of the transaction amount specified in the interaction request will be locked within a threshold time. Until the transaction fails or the transaction time exceeds the threshold time, the second client 20 can withdraw the locked second digital asset.

[0041] The first client 10 is further configured to initiate a transfer transaction to the third e-commerce address on the first e-commerce platform 40 based on the matching data packet; after the transfer transaction is uploaded to the chain and confirmed by the transaction confirmation number of blocks, the first client 10 sends an interaction confirmation request to the interaction contract on the second e-commerce platform 50; the interaction confirmation request includes a transfer transaction, a Merkle path, a transaction block header, and multiple confirmation block headers.

[0042] Among them, the first client 10 can package a certain number of first digital assets into a transfer transaction to a third e-commerce address according to a certain conversion ratio, so as to realize the transfer to the account of the second client 20 on the first e-commerce platform 40; that is, the transfer transaction includes a certain number of first digital assets.

[0043] Specifically, the interactive confirmation request is initiated by the first client 10 on the second e-commerce platform 50 using the second e-commerce address; wherein, the transaction block header can be the block header on the block containing the transfer transaction on the first e-commerce platform 40, and the Merkle path is the Merkle path corresponding to the transfer transaction in the block containing the transfer transaction on the first e-commerce platform 40; multiple confirmation block headers can be continuous and uninterrupted block headers after the transaction block header on the first e-commerce platform 40, and the number is equal to the block confirmation number.

[0044] The interaction contract is used to verify the transfer transaction according to the interaction confirmation request sent by the first client 10.

[0045] wherein the interactive contract generates a first verification hash according to the transfer transaction and the Merkle path operation;

[0046] When the first verification hash matches the root hash in the transaction block header, continue verification:

[0047] The interactive contract loops through the multiple confirmation block headers;

[0048] When the number of the multiple confirmed block headers is equal to the transaction confirmation number and each of the confirmed block headers correctly records the hash value of the previous block header, continue verification:

[0049] The interactive contract sequentially reads the confirmation block header as the current block header, and sequentially performs hash operations on the current block header to generate multiple second verification hashes. When the multiple second verification hashes all meet the consensus coefficient, the verification result is confirmed to be successful;

[0050] Otherwise, the verification results are all confirmed to be failures;

[0051] When the verification result is successful, the second digital asset is unlocked and transferred to the second e-commerce address;

[0052] When the verification result is failure, the second digital asset is unlocked and transferred to the fourth e-commerce address.

[0053] Among them, the assets used for interaction between the first e-commerce platform and the second e-commerce platform 50 can be represented by the first digital asset and the second digital asset respectively. Specifically, the first digital asset and the second digital asset can be the platform points on the first e-commerce platform 40 and the second e-commerce platform 50 respectively.

[0054] In this embodiment, the consensus coefficient is a value in the block header that is used to verify the workload through the Proof of Work algorithm. The purpose of the consensus coefficient is to ensure the stability and security of the blockchain network. The Proof of Work algorithm is an algorithm that uses calculations to prove that participants have expended sufficient effort on a task.

[0055] Specifically, the system provides a target hash value, such as requiring a certain number of zeros in front of the generated hash value. Participants construct a block header by randomly selecting a number (called a nonce) and use this data as an input parameter to calculate the SHA-256 hash value. Participants combine the block header and nonce into a new data block and calculate the data block using the SHA-256 hash algorithm to generate a hash value. Participants compare the generated hash value with the target hash value. If the generated hash value is less than the target hash value, the calculation is considered valid.

[0056] Furthermore, the target hash value is the maximum target hash value divided by the current consensus coefficient, and the result is the target hash value.

[0057] That is, when the values ​​of the plurality of second verification hashes are all smaller than the target hash value (the maximum target hash divided by the consensus coefficient), the plurality of second verification hashes meet the consensus coefficient.

[0058] In this embodiment, the target hash value can be a 256-bit binary number. At the same time, the maximum target hash value can be obtained by setting all bits to 1. Because the hash value is a fixed-length binary string, the smaller the target hash value, the more difficult it is to find a nonce that meets the requirements. This method can effectively prevent fraud and attacks, because the attacker must incur a large amount of computing and electricity costs to forge a transaction block header and confirmation block header that meet the requirements. This requires the attacker to have considerable computing and financial strength, and the economic benefits of this forgery method are far less than the benefits obtained by participating in the main chain consensus.

[0059] In the above process, the digital asset transaction needs of the first client 10 and the second client 20 on the first e-commerce platform 40 and the second e-commerce platform 50 are quickly matched through the interactive service end 30; the second client 20 deposits a specified amount of digital assets into the interactive contract based on the matching information. At this time, the first client 10 has not yet made a transfer. The transfer can be made after confirming that the second client 20 has acted honestly, thereby ensuring the security of the assets.

[0060] In addition, during the interaction process, there is no need to set up a notary and move the block header to the relay end of the interactive contract, which reduces the links required for the interaction and greatly improves the interaction efficiency of digital assets between blockchain-based e-commerce platforms. At the same time, since the proof data is provided by the first client 10, the interactive contract does not need to provide additional storage space, reducing costs.

[0061] The interactive contract further determines whether the interactive confirmation request has timed out based on the threshold time;

[0062] When the interactive confirmation request times out, the verification result is confirmed to be failure.

[0063] Among them, setting a threshold time in the interactive contract can, to a certain extent, promote both parties to quickly complete the transaction within the specified time. At the same time, it can also ensure that the assets of the second client 20 will not be locked for a long time, thereby improving the security of the assets.

[0064] The interactive contract also reads the initiating address in the transfer transaction;

[0065] When the initiating address does not match the first e-commerce address in the start interaction request, the verification result is confirmed to be failure.

[0066] The initiating address in the transfer transaction should be the first e-commerce address of the first client 10 on the first e-commerce platform 40. When the two do not match, the transfer transaction should be considered illegal.

[0067] The interaction server 30 is further configured to generate an interaction identifier during matching and send the interaction identifier to the first client 10 and the second client 20 .

[0068] The second client 20 is further configured to add the interaction identifier to the interaction start request before sending the interaction start request to the interaction contract in the second e-commerce platform 50 .

[0069] When the first client 10 sends an interaction confirmation request to the interaction contract on the second e-commerce platform 50 , the transaction matching it can be quickly located according to the interaction identifier.

[0070] See Figure 2 , Figure 2 This is a flowchart of a blockchain-based e-commerce platform interaction method provided in one embodiment of the present application.

[0071] A blockchain-based e-commerce platform interaction method, the method comprising:

[0072] Step S101: The first client 10 sends an interaction data packet to the interaction server 30. The interaction data packet includes the transaction amount, the threshold time, the block confirmation number, and the first e-commerce address and the second e-commerce address of the first client 10.

[0073] Step S102 : the second client 20 sends a matching data packet to the interactive server 30 , where the matching data packet includes the third e-commerce address and the fourth e-commerce address of the second client 20 .

[0074] Step S103 : the interactive server 30 obtains the interactive data packet and the matching data packet; when a match is found, the interactive data packet is sent to the second client 20 , and the matching data packet is sent to the first client 10 .

[0075] Step S104: The second client 20 also sends a start interaction request to the interaction contract in the second e-commerce platform 50 according to the interaction data packet; the start interaction request includes the second digital asset of the transaction quantity, the threshold time, the block confirmation number, and the first e-commerce address and the second e-commerce address.

[0076] Step S105: The first client 10 also initiates a transfer transaction to the third e-commerce address on the first e-commerce platform 40 according to the matching data packet; when the transfer transaction is on-chain and confirmed by the blocks of the transaction confirmation number, the first client 10 sends an interaction confirmation request to the interaction contract on the second e-commerce platform 50; the interaction confirmation request includes the transfer transaction, the Merkle path, the transaction block header, and multiple confirmation block headers.

[0077] Step S106: the interactive contract verifies the transfer transaction according to the interactive confirmation request sent by the first client 10;

[0078] wherein the interactive contract generates a first verification hash according to the transfer transaction and the Merkle path operation;

[0079] When the first verification hash matches the root hash in the transaction block header, continue verification:

[0080] The interactive contract loops through the multiple confirmation block headers;

[0081] When the number of the multiple confirmed block headers is equal to the transaction confirmation number and each of the confirmed block headers correctly records the hash value of the previous block header, continue verification:

[0082] The interactive contract sequentially reads the confirmation block header as the current block header, and sequentially performs hash operations on the current block header to generate multiple second verification hashes. When the multiple second verification hashes all meet the consensus coefficient, the verification result is confirmed to be successful;

[0083] Otherwise, the verification results are all confirmed to be failures;

[0084] The interactive contract further determines whether the interactive confirmation request has timed out based on the threshold time;

[0085] When the interactive confirmation request times out, confirming the verification result is failure;

[0086] The interactive contract also reads the initiating address in the transfer transaction;

[0087] When the initiating address does not match the first e-commerce address in the start interaction request, confirming that the verification result is failed;

[0088] When the verification result is successful, the second digital asset is unlocked and transferred to the second e-commerce address;

[0089] When the verification result is failure, the second digital asset is unlocked and transferred to the fourth e-commerce address.

Claims

1. An e-commerce platform interactive system based on blockchain, characterized in that: It includes a first client, a second client, an interactive server, a first e-commerce platform, and a second e-commerce platform, wherein: The first client is configured to send an interaction data packet to the interaction server, wherein the interaction data packet includes a transaction amount, a threshold time, a block confirmation number, and a first e-commerce address and a second e-commerce address of the first client; The second client is configured to send a matching data packet to the interactive server, where the matching data packet includes a third e-commerce address and a fourth e-commerce address of the second client; The interactive server is configured to obtain the interactive data packet and the matching data packet; when a match is found, send the interactive data packet to the second client and send the matching data packet to the first client; The second client is further configured to send a start interaction request to the interaction contract in the second e-commerce platform according to the interaction data packet; the start interaction request includes the transaction amount of the second digital asset, the threshold time, the number of block confirmations, and the first e-commerce address and the second e-commerce address; The first client is further configured to initiate a transfer transaction to the third e-commerce address on the first e-commerce platform based on the matching data packet; after the transfer transaction is uploaded to the blockchain and confirmed by the transaction confirmation number of blocks, the first client sends an interaction confirmation request to the interaction contract on the second e-commerce platform; the interaction confirmation request includes the transfer transaction, the Merkle path, the transaction block header, and multiple confirmation block headers; The interactive contract is used to verify the transfer transaction according to the interactive confirmation request sent by the first client; When the verification result is successful, the second digital asset is unlocked and transferred to the second e-commerce address; When the verification result is failure, unlocking the second digital asset and transferring it to the fourth e-commerce address; The interaction server is further configured to generate an interaction identifier during matching and send the interaction identifier to the first client and the second client; The second client is further configured to add the interaction identifier to the start interaction request before sending the start interaction request to the interaction contract in the second e-commerce platform; The interactive contract generates a first verification hash according to the transfer transaction and the Merkle path operation; When the first verification hash matches the root hash in the transaction block header, continue verification: The interactive contract loops through the multiple confirmation block headers; When the number of the multiple confirmed block headers is equal to the transaction confirmation number and each of the confirmed block headers correctly records the hash value of the previous block header, continue verification: The interactive contract sequentially reads the confirmation block header as the current block header, and sequentially performs hash operations on the current block header to generate multiple second verification hashes. When the multiple second verification hashes all meet the consensus coefficient, the verification result is confirmed to be successful; Otherwise, the verification result is failure.

Citation Information

Patent Citations

  • Blockchain cross-chain interaction method and device based on smart contract, and computer readable storage medium

    CN113179272A