E-commerce platform interaction system based on block chain

By introducing a matching mechanism between interactive server and interactive contracts in a blockchain-based e-commerce platform, the problem of excessive consumption of interactive contract resources is solved, transaction efficiency is improved and costs are reduced.

CN119963287AActive Publication Date: 2025-05-09SHANGHAI YIMENG TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In blockchain-based e-commerce platforms, as the number of requests in interactive contracts increases, interactive contracts need to spend more resources to match interactive confirmation requests, resulting in a greatly reduced transaction efficiency.

Method used

By introducing interactive servers, it is quickly matched to the digital asset transaction needs of the first client and the second client on different e-commerce platforms. The second client deposits the digital assets into the interactive contract, while the first client only transfers the money after confirming that the second client is honest, reducing unnecessary resource consumption.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119963287A_ABST
    Figure CN119963287A_ABST
Patent Text Reader

Abstract

The invention discloses an e-commerce platform interaction system based on a block chain, and the system comprises a first client, a second client, an interaction server, a first e-commerce platform, and a second e-commerce platform. The transaction demands of the digital assets of the first client and the second client on the first e-commerce platform and the second e-commerce platform are quickly matched through the interaction server; besides, the interaction server is also used for generating an interaction identifier during matching and sending the interaction identifier to the first client and the second client, and the second client is also used for adding the interaction identifier into an interaction starting request before sending the interaction starting request to the interaction contract in the second e-commerce platform and sending the interaction starting request to the second e-commerce platform. When the first client sends the interaction confirmation request to the interaction contract on the second e-commerce platform, the transaction matched with the interaction identification can be quickly positioned according to the interaction identification, and the transaction efficiency of the interaction contract is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This invention patent application 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 refer to online business platforms built using blockchain technology. Blockchain technology is a decentralized distributed ledger technology that achieves secure verification and trustless processing of transactions through technical means such as smart contracts and consensus algorithms. Blockchain technology has great application potential in the e-commerce field and can improve the 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 the present invention is to provide an e-commerce platform interaction system based on blockchain in view of the deficiencies in the prior art.

[0006] The present 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 used to send an interactive data packet to the interactive server, where the interactive 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 used 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 used 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 and the matching data packet is sent 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 block confirmation number, and the first e-commerce address and the second e-commerce address;

[0011] The first client is further used to initiate a transfer transaction to the third e-commerce address on the first e-commerce platform according to the matching data packet; when the transfer transaction is on-chain and confirmed by the block of the transaction confirmation number, the first client sends an interaction confirmation request to the interaction contract on the second e-commerce platform; the interaction confirmation request includes a transfer transaction, a Merkle path, a 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, unlocking the second digital asset and transferring it 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 according to 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 confirmed block header as the current block header, and sequentially performs hash operations on the current block header to generate multiple second verification hashes, and confirms that the verification result is successful when the multiple second verification hashes all meet the consensus coefficient;

[0022] Otherwise, the verification results are all confirmed as failure.

[0023] The blockchain-based e-commerce platform interactive system provided by the present invention 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 through the interactive service end; the second client deposits a specified amount of digital assets into the interactive contract according to the matching information. At this time, the first client has not made a transfer, and the transfer can be made after confirming the honesty of the second client to ensure the security of the assets. In addition, during the interaction process, there is no need to set up a notary and transport 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, the interactive contract does not need to provide additional storage space, which reduces 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 drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 creative labor.

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

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

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

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

[0029] An e-commerce platform interaction system based on blockchain 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 interactive data packet to the interactive server 30 , where the interactive data packet includes a transaction quantity, a threshold time, a block confirmation number, and a first e-commerce address and a 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 time. Once a transaction starts, if the transaction is not completed within the specified threshold time, 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 used to send a matching data packet to the interactive server 30 , where the matching data packet includes a third e-commerce address and a 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 service end 30 is used 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 in the server, and 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 used 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 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.

[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 in the interaction request will be locked within the 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 also used to initiate 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 uploaded to the 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 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 of the second client 20 to the account 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 may be a 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 may 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 number of block confirmations.

[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 confirmed block header as the current block header, and sequentially performs hash operations on the current block header to generate multiple second verification hashes, and confirms that the verification result is successful when the multiple second verification hashes all meet the consensus coefficient;

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

[0051] When the verification result is successful, unlocking the second digital asset and transferring it 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, which 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 proves that the participants have put enough effort into a task through calculation.

[0055] Specifically, the system gives a target hash value, such as requiring a certain number of zeros in front of the generated hash value; the participant constructs a block header data (BlockHeader) by randomly selecting a number (called Nonce), and uses this data as an input parameter to calculate the SHA-256 hash value; the participant combines the BlockHeader and Nonce into a new data block, and uses the SHA-256 hash algorithm to calculate the data block to generate a hash value; the participant compares 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 to say, when the values ​​of multiple second verification hashes are all smaller than the target hash value (the maximum target hash divided by the consensus coefficient), the multiple second verification hashes meet the consensus coefficient.

[0058] In this embodiment, the target hash value can be a 256-bit binary number, and the maximum target hash value can be obtained by setting all bits to 1. Because the hash value is a binary string of fixed length, 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 pay a lot of computing and electricity costs to forge a transaction block header and confirmation block header that meet the requirements, which requires the attacker to have considerable computing and economic 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 transaction needs of digital assets 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 according to the matching information. At this time, the first client 10 has not made a transfer, and the transfer can be made after confirming that the second client 20 behaves honestly to ensure the safety 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 according to the threshold time;

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

[0063] Among them, setting a threshold time in the interactive contract can promote the two parties to complete the transaction quickly within the specified time to a certain extent. 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 failed.

[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 also Figure 2 , Figure 2 This is a flowchart of an e-commerce platform interaction method based on blockchain 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, where the interaction data packet includes a transaction quantity, a threshold time, a block confirmation number, and a first e-commerce address and a 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 service end 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 uploaded to the 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 a transfer transaction, a Merkle path, a 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 confirmed block header as the current block header, and sequentially performs hash operations on the current block header to generate multiple second verification hashes, and confirms that the verification result is successful when the multiple second verification hashes all meet the consensus coefficient;

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

[0084] The interactive contract also determines whether the interactive confirmation request has timed out according to 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 a failure;

[0088] When the verification result is successful, unlocking the second digital asset and transferring it 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 used to send an interactive data packet to the interactive server, where the interactive 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 used 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 used 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 and the matching data packet is sent 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 block confirmation number, and the first e-commerce address and the second e-commerce address; The first client is further used to initiate a transfer transaction to the third e-commerce address on the first e-commerce platform according to the matching data packet; when the transfer transaction is on-chain and confirmed by the block of the transaction confirmation number, the first client sends an interaction confirmation request to the interaction contract on the second e-commerce platform; the interaction confirmation request includes a transfer transaction, a Merkle path, a 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, unlocking the second digital asset and transferring it 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.

2. The system according to claim 1, characterized in that: 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.

3. The system according to claim 2, characterized in that: 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 confirmed block header as the current block header, and sequentially performs hash operations on the current block header to generate multiple second verification hashes, and confirms that the verification result is successful when the multiple second verification hashes all meet the consensus coefficient; Otherwise, the verification results are all confirmed as failure.

Citation Information

Patent Citations

  • Data processing method and system, storage medium and computer equipment

    CN110400221A

  • Cross-block-chain interaction method and system, computer equipment and storage medium

    CN111914021A

  • Traversal method and device based on block chain side chain and computer readable storage medium

    CN113157809A

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

    CN113179272A

  • Systems and methods for recording data representing multiple interactions

    US20200379979A1