Multi-person payment method and device, equipment, storage medium and computer program product
By creating smart contracts and contract accounts in the blockchain and generating recharge links, the multi-person payment process is automated and simplified, solving the problems of complex operations and insufficient security in the existing technology, and ensuring the automation and security of payments.
Patent Information
- Application Number
- CN202410013014.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-02
- Publication Date
- 2025-07-04
AI Technical Summary
In the existing technology, the payment process of multiple people is complicated, and users need to place orders, advance payments and collect fees by themselves. The operation is complicated and there is no complete collection, so the interests of each payer cannot be guaranteed.
By creating smart contracts and contract accounts in the blockchain and generating a recharge link, the target terminal can share it with other terminals for recharge. The smart contract monitors whether the total amount of the account reaches the total amount to be paid, and automatically triggers the payment instruction when it reaches it.
The multi-person payment process is simplified, making the order, fee raising and payment steps connected, reducing user operations, ensuring the automation and security of payment, and preventing the problem of unable to pay due to the failure to complete the previous process.
Smart Images

Figure CN120258787A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a multi-person payment method, device, computer device, storage medium, and computer program product. Background Art
[0002] With the rapid development of computer technology and Internet technology, online payment technology has emerged. Online payment technology supports users to make online payments, which can not only greatly improve the payment efficiency but also ensure payment security. In daily life, purchasing a certain commodity or service usually requires multiple payers to share the cost together. In the related art, when multiple payers share a cost, generally, a certain user initiates it and then collects the costs shared by others by himself. This method is extremely inconvenient for users and the operation is also very cumbersome. Summary of the Invention
[0003] Based on this, in view of the above technical problems, it is necessary to provide a multi-person payment method, device, computer device, computer-readable storage medium, and computer program product, which can improve the multi-person payment efficiency and simplify the multi-person payment process.
[0004] In a first aspect, this application provides a multi-person payment method. The method includes:
[0005] Receiving a multi-person payment request initiated by a target terminal for a target order;
[0006] According to the total amount to be paid carried in the multi-person payment request, creating a smart contract for the target order and a contract account associated with the smart contract in the blockchain;
[0007] Generating a recharge link corresponding to the contract account and sending the recharge link to the target terminal;
[0008] Receiving recharge information for the contract account sent by the target terminal and other terminals to which the recharge link is shared, and updating the total account amount of the contract account according to the recharge information;
[0009] Invoking the smart contract to monitor whether the total account amount of the contract account associated with the smart contract reaches the total amount to be paid, and triggering a payment instruction for the target order when the total amount to be paid is reached.
[0010] This application also provides another multi-person payment method. The method includes:
[0011] Sending a multi-person payment request for a target order to a server;
[0012] Receive the recharge link feedback from the server. The recharge link is sent by the server after creating a smart contract for the target order and a contract account associated with the smart contract in the blockchain according to the total amount to be paid carried in the multi-person payment request, and generating a recharge link corresponding to the contract account. The smart contract is used to monitor whether the total amount of the contract account reaches the total amount to be paid, and trigger a payment instruction for the target order when the total amount to be paid is reached;
[0013] Recharge the contract account according to the recharge link to instruct the server to update the total amount of the contract account; and
[0014] Send the recharge link to other terminals, for instructing the other terminals to recharge the contract account according to the recharge link.
[0015] In a second aspect, the present application also provides a multi-person payment device. The device includes:
[0016] A request receiving module, configured to receive a multi-person payment request initiated by a target terminal for a target order;
[0017] A creation module, configured to create a smart contract for the target order and a contract account associated with the smart contract in the blockchain according to the total amount to be paid carried in the multi-person payment request;
[0018] A link sending module, configured to generate a recharge link corresponding to the contract account and send the recharge link to the target terminal;
[0019] The receiving module is further configured to receive recharge information for the contract account sent by the target terminal and other terminals to which the recharge link is shared, and update the total amount of the contract account according to the recharge information;
[0020] A monitoring module, configured to call the smart contract to monitor whether the total amount of the contract account associated with the smart contract reaches the total amount to be paid, and trigger a payment instruction for the target order when the total amount to be paid is reached.
[0021] In an embodiment, the multi-person payment request further carries order information and an order expiration time, and the device further includes:
[0022] A query module, configured to receive an access request for the recharge link, where the access request is initiated by the target terminal or other terminals to which the recharge link is shared; query relevant information of the recharge link according to the access request, where the relevant information includes at least one of the total amount of the contract account corresponding to the recharge link, the historical recharge records of the contract account, the order information, and the order expiration time; and feedback the relevant information of the recharge link in response to the access request.
[0023] In one embodiment, the multi-person payment request further carries an order expiration time. The monitoring module is configured to call the smart contract to monitor whether the total amount of the contract account associated with the smart contract reaches the payable total amount, and trigger a payment instruction for the target order when the payable total amount is reached and the order expiration time has not been reached.
[0024] In one embodiment, the monitoring module is configured to trigger an order cancellation instruction for the target order when the order expiration time is reached and the total amount of the contract account has not reached the payable total amount, trigger a recharge terminal refund instruction according to the historical recharge records of the contract account, and cancel the smart contract, the contract account, and the recharge link.
[0025] In one embodiment, the device further includes:
[0026] An order cancellation module, configured to receive an order cancellation instruction initiated by the target terminal for the target order; cancel the smart contract, the contract account, and the recharge link according to the order cancellation instruction; query the historical recharge records of the contract account, and trigger a recharge terminal refund instruction for each recharge terminal according to the historical recharge records.
[0027] In one embodiment, the device further includes:
[0028] A message push module, configured to query the historical recharge records of the contract account after the step of triggering a payment instruction for the target order; determine each recharge terminal according to the historical recharge records; and send a payment success message to each recharge terminal.
[0029] In one embodiment, the device further includes:
[0030] A message push module, configured to query the historical recharge records of the contract account after the step of updating the total amount of the contract account according to the recharge information; determine each recharge terminal according to the historical recharge records; and push a notification message about the update of the total amount of the contract account to each recharge terminal.
[0031] In one embodiment, the device further includes:
[0032] A message push module, configured to, after triggering a payment instruction for the target order, when the order status of the target order is updated, push a notification message indicating that the order status of the target order has been updated to each recharge terminal of the target order.
[0033] In one embodiment, the receiving module is further configured to receive an access request for the recharge link, where the access request is initiated by the target terminal or another terminal to which the recharge link is shared; according to the access request, feedback interface interaction information required to display a recharge interface to the target terminal or another terminal to which the recharge link is shared; receive the recharge amount and user information sent by the target terminal or another terminal to which the recharge link is shared, where the recharge amount is input and confirmed by the user in the recharge interface, and the user information is the user identifier of the logged-in terminal.
[0034] In one embodiment, the device further includes:
[0035] A recording module, configured to generate multiple recharge transactions in the recharge order based on the recharge information sent by the target terminal or another terminal to which the recharge link is shared, generate a data block according to the multiple recharge transactions; store the data block on the blockchain.
[0036] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0037] Receive a multi-person payment request initiated by a target terminal for a target order;
[0038] Create a smart contract for the target order and a contract account associated with the smart contract in the blockchain according to the total amount to be paid carried in the multi-person payment request;
[0039] Generate a recharge link corresponding to the contract account, and send the recharge link to the target terminal;
[0040] Receive the recharge information for the contract account sent by the target terminal and other terminals to which the recharge link is shared, and update the total account amount of the contract account according to the recharge information;
[0041] Invoke the smart contract, monitor whether the total account amount of the contract account associated with the smart contract reaches the total amount to be paid, and trigger a payment instruction for the target order when the total amount to be paid is reached.
[0042] Fourthly, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0043] Receiving a multi-person payment request initiated by a target terminal for a target order;
[0044] According to the total amount to be paid carried in the multi-person payment request, creating a smart contract for the target order and a contract account associated with the smart contract in the blockchain;
[0045] Generating a recharge link corresponding to the contract account and sending the recharge link to the target terminal;
[0046] Receiving recharge information for the contract account sent by the target terminal and other terminals to which the recharge link is shared, and updating the total amount of the contract account according to the recharge information;
[0047] Invoking the smart contract to monitor whether the total amount of the contract account associated with the smart contract reaches the total amount to be paid, and triggering a payment instruction for the target order when the total amount to be paid is reached.
[0048] Fifthly, the present application also provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0049] Receiving a multi-person payment request initiated by a target terminal for a target order;
[0050] According to the total amount to be paid carried in the multi-person payment request, creating a smart contract for the target order and a contract account associated with the smart contract in the blockchain;
[0051] Generating a recharge link corresponding to the contract account and sending the recharge link to the target terminal;
[0052] Receiving recharge information for the contract account sent by the target terminal and other terminals to which the recharge link is shared, and updating the total amount of the contract account according to the recharge information;
[0053] Invoking the smart contract to monitor whether the total amount of the contract account associated with the smart contract reaches the total amount to be paid, and triggering a payment instruction for the target order when the total amount to be paid is reached.
[0054] The above-mentioned multi-person payment method, device, computer device, storage medium and computer program product, after receiving a multi-person payment request initiated by a target terminal for a target order, create a smart contract for the target order and a contract account associated with the smart contract in the blockchain according to the total amount to be paid carried in the multi-person payment request. The smart contract is used to monitor whether the total amount of the contract account associated with the smart contract reaches the total amount to be paid. In addition, a recharge link corresponding to the contract account is generated and sent to the target terminal. The target terminal can recharge the contract account according to the recharge link. The target terminal can share the recharge link with other terminals. After receiving the recharge information for the contract account sent by the target terminal and other terminals to which the recharge link is shared, update the total amount of the contract account according to the recharge information. Once the smart contract monitors that the total amount of the contract account associated with it reaches the total amount to be paid, a payment instruction for the target order will be triggered. In this payment process, after placing an order through the target terminal, all participants can easily complete the payment through a recharge link, and the operation is very simple. Moreover, the three steps of placing an order, raising funds, and making a payment are connected, rather than isolated. That is, if the previous process is not completed, it will result in the inability to make a payment ultimately and thus the purchase cannot be successful. For the user using the target terminal, only need to share the recharge link with other users, without any extra manual operations, and the operation is very simple. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 FIG. 1 is a diagram of the application environment of the multi-person payment method in an embodiment;
[0056] Figure 2 FIG. 2 is a schematic flowchart of the multi-person payment method in an embodiment;
[0057] Figure 3 FIG. 3 is a schematic diagram of the smart contract monitoring the contract account when smart contracts of different orders are associated with the same contract account in an embodiment;
[0058] Figure 4 FIG. 4 is a schematic diagram of the smart contract monitoring the contract account when smart contracts of different orders are associated with different contract accounts in an embodiment;
[0059] Figure 5 FIG. 5 is a schematic diagram of the interface of the recharge interface in an embodiment;
[0060] Figure 6 FIG. 6 is a timing diagram of the multi-person payment method in an embodiment;
[0061] Figure 7 FIG. 7 is a schematic flowchart of the multi-person payment method in another embodiment;
[0062] Figure 8It is a structural block diagram of a multi-person payment device in an embodiment;
[0063] Figure 9 It is an internal structure diagram of a computer device in an embodiment;
[0064] Figure 10 It is an internal structure diagram of a computer device in another embodiment. Detailed implementation manners
[0065] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0066] The multi-person payment method provided by the embodiments of the present application can be applied to an application environment as Figure 1 shown. Among them, the target terminal 102 communicates with the server 104 through a network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed in the cloud or on other servers. Other terminals 106 other than the target terminal 102 can also communicate with the server 104 through a network. In one embodiment, the server 104 can receive a multi-person payment request initiated by the target terminal for a target order; create a smart contract for the target order and a contract account associated with the smart contract in the blockchain according to the total amount to be paid carried in the multi-person payment request; generate a recharge link corresponding to the contract account, and send the recharge link to the target terminal; receive the recharge information of the contract account sent by the target terminal and other terminals to which the recharge link is shared, and update the total amount of the contract account according to the recharge information; call the smart contract to monitor whether the total amount of the contract account associated with the smart contract reaches the total amount to be paid, and trigger a payment instruction for the target order when the total amount to be paid is reached.
[0067] Among them, the above terminals (target terminal 102 and other terminals 106) can be, but are not limited to, various desktop computers, laptop computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0068] In a specific application scenario, a digital asset client runs on the target terminal 102, and the user can initiate a multi-person payment request through this digital asset client. This digital asset client supports the user in opening a digital asset account from a digital asset operation institution. There can be multiple digital asset operation institutions, and each digital asset operation institution is authorized by an authoritative institution. The user can choose any one of the digital asset operation institutions to open a digital asset account. In addition, it supports the user in opening multiple digital asset accounts at different digital asset operation institutions. Based on the digital asset accounts, the storage and trading of digital assets can be realized. After opening a digital asset account, the server 104 of this digital asset operation institution will provide digital asset-related services for the user's digital asset account, and the relevant data will also be stored in the server of this digital asset operation institution, and corresponding query services will be provided.
[0069] In related technologies, when multiple payers jointly bear an expense, there are usually two payment processes:
[0070] First, one party (assume it is Little A) places an order. After Little A places the order successfully and pays by himself, then according to the payment amount, after deducting his own share of the expense, calculate the expenses that others need to pay, and then initiate collections from others such as Little B, Little C, and Little D. For example, Little A can collect money from others offline or use a payment application with payment functions to initiate collections or transfers, and so on.
[0071] Second, first, one party (assume it is Little A) determines the total expense required to pay for the order. After deducting his own share of the expense, calculate the expenses that others need to pay, and use the method of collecting money offline or a payment application to raise funds from others such as Little B, Little C, and Little D. After raising all the total expenses, then place the order and then make the payment.
[0072] In the first method, after Little A places the order and pays successfully, Little A collects the money by himself. For the party that pays in advance by himself, the operation is very cumbersome. It not only requires placing the order by oneself, paying in advance by oneself, but also collecting the prepaid expenses from others one by one; in addition, for the party that pays in advance, there is a situation where the collection may not be complete, and its own interests cannot be guaranteed. In the second method, it also requires one party to collect funds from others one by one, and the operation is cumbersome. In addition, it requires the user to place the order manually by himself, and the order placement operation and the expense collection operation are independent and isolated.
[0073] The multi-person payment method provided by the embodiments of the present application enables all participants to easily complete the payment through a recharge link after placing an order through the target terminal. The operation is very simple. Moreover, the three steps of placing an order, raising funds, and making a payment are connected rather than isolated. That is, if the previous process is not completed, it will result in the inability to make a payment ultimately and thus the purchase cannot be successful. For the user using the target terminal, only need to share the recharge link to other users, without any extra manual operations, and the operation is very simple.
[0074] In one embodiment, as Figure 2 shown, a multi-person payment method is provided. Taking the method applied to the Figure 1 server 104 as an example for illustration, it includes the following steps:
[0075] Step 202, receive a multi-person payment request initiated by the target terminal for a target order.
[0076] The target order is an order that requires multiple people to share the cost in the embodiments of the present application. The multi-person payment request refers to a request for multiple users to jointly pay for the target order. The target terminal can obtain the total payable amount of the target order and send a multi-person payment request to the server according to the total payable amount, and the server receives the multi-person payment request.
[0077] In one embodiment, when multiple users need to jointly purchase a product, after obtaining the confirmation order placement operation of one of the users on the product (a certain commodity or a certain service) on the terminal, a target order is generated according to the product information. The order information of the target order includes the order number, the total payable amount, the details of the purchased product, and so on. The terminal can display the above order information on the order interface and provide multiple payment methods. The multiple payment methods include multi-person payment and direct payment. The direct payment includes third-party payment, bank card payment, digital asset account payment, and so on. In this embodiment, the terminal can, in response to the user's selection operation of the multi-person payment option, generate a multi-person payment request according to the total payable amount of the target order. Optionally, the multi-person payment request only carries the total payable amount, and at this time, the cost borne by each person is not restricted. Optionally, the multi-person payment request can also carry the per capita sharing amount. For example, the order interface can support the user to input the number of people for multi-person payment. The terminal can obtain the number of people input by the user on the order interface, calculate the per capita sharing amount according to the total payable amount of the target order and the number of people input by the user, and generate a multi-person payment request according to the total payable amount and the per capita sharing amount.
[0078] In some embodiments, the multi-person payment request can also carry the order information.
[0079] Step 204: Create a smart contract for the target order and a contract account associated with the smart contract in the blockchain according to the total amount to be paid carried in the multi-person payment request.
[0080] A smart contract is an automatically executed computer program implemented through blockchain technology. Smart contracts can execute transactions without an intermediary or third party, thus achieving decentralized transactions. Smart contracts can perform various tasks, such as verifying and executing contracts, managing digital assets, and executing financial transactions. A smart contract is a code-based protocol that stipulates the conditions and rules that all parties must meet during the transaction process. Once the conditions are met, the smart contract will automatically execute the transaction. Smart contracts can be written in multiple programming languages. After creating a smart contract, it can be deployed to the blockchain for transactions. In a smart contract, the conditions and rules that all parties must meet during the transaction process can be stipulated, such as the amount, time, and identities of the trading parties of the transaction. Once the conditions are met, the smart contract will automatically execute the transaction. The transaction is recorded on the blockchain and once recorded, it cannot be changed or deleted.
[0081] In the embodiment of this application, according to the total amount to be paid carried in the multi-person payment request, a smart contract for the target order and a contract account associated with the smart contract are created in the blockchain. The created smart contract is used to monitor whether the total account amount of the contract account reaches the above-mentioned amount to be paid. When the total amount to be paid is reached, a payment instruction for the target order is triggered. Since this smart contract is a code-based protocol that stipulates that once the total account amount of the contract account reaches the above-mentioned amount to be paid, the payment for the target order will be automatically triggered, without the need for extra operations by the user, it can also reduce disputes and disputes in multi-person payments and improve the reliability and security of multi-person payments.
[0082] Specifically, the server can create a smart contract for the target order and a contract account associated with the smart contract in the blockchain according to the total amount to be paid carried in the multi-person payment request. This smart contract is used to monitor whether the total account amount of the contract account reaches the total amount to be paid and trigger a payment instruction for the target order when the total amount to be paid is reached.
[0083] A contract account is a dedicated account based on which a smart contract triggers the execution of a transaction, also known as a protocol account. This contract account can be a digital asset account set by the server and can be used to receive digital assets transferred by others. For each received multi-person payment request, the server can create a smart contract for the target order in the blockchain respectively and associate this dedicated account with the smart contract.
[0084] Optionally, to avoid opening too many contract accounts and unnecessary resource waste, smart contracts for different orders can be associated with the same contract account. For example, smart contract 1 created for target order 1, smart contract 2 created for target order 2, and smart contract 3 created for target order 3 can all be associated with contract account Accout1, and smart contract 4 created for target order 4 and smart contract 5 created for target order 5 can both be associated with contract account Accout2.
[0085] Optionally, smart contracts for different orders can also be associated with different contract accounts. For example, smart contract 1 created for target order 1 is associated with contract account Accout1, and smart contract 2 created for target order 2 is associated with contract account Accout2.
[0086] Step 206: Generate a recharge link corresponding to the contract account and send the recharge link to the target terminal.
[0087] The recharge link is the account address of the contract account. After the recharge link can be accessed, it can be used to recharge the contract account and also query relevant information of the contract account. The server can generate a recharge link corresponding to the contract account. In the case where smart contracts for different orders are associated with the same contract account, the server can generate different recharge links for different orders, and these recharge links are all used to recharge the same contract account. In the case where smart contracts for different orders are associated with different contract accounts, the server generates different recharge links for different orders, and the recharge link is used to recharge a certain contract account.
[0088] After generating the recharge link corresponding to the contract account, the server sends the recharge link to the target terminal. The target terminal is the terminal used by the initiator, and the initiator can share the recharge link to other terminals. In one embodiment, the target terminal can generate a corresponding graphic code according to the recharge link and share the graphic code to other terminals. For example, the target terminal can share the graphic code to other terminals through an instant messaging application. In one embodiment, the server can generate a corresponding graphic code according to the recharge link, return the graphic code to the target terminal, and the target terminal can share the graphic code to other terminals.
[0089] To reduce the attacks and damages to the server caused by a large number of accesses to the recharge link by malicious users or attackers, some methods can be adopted to limit the access to the recharge link. For example, when detecting an access request from a terminal to the recharge link, the server can check whether there is an interaction relationship between the user identifier logged in on the terminal and the user identifier logged in on the target terminal. The interaction relationship can include, but is not limited to, an asset transaction relationship, a friend relationship, a common group relationship, or a common organization relationship, etc. If there is no interaction relationship, the access request initiated by it for the recharge link will be restricted. For another example, when the target terminal initiates a multi-person payment request, the user identifiers of multiple users who jointly bear the cost of the target order can be carried in the multi-person payment request. When the server generates the recharge link, it can set access permissions for the recharge link, that is, the recharge link can only be accessed by the terminals logged in with the user identifiers of the multiple users. For access requests initiated by terminals other than those where the user identifiers of the multiple users are located for the recharge link, they will be restricted. For another example, the server can also set an access time limit for the recharge link, and only access requests initiated within the access time limit can be responded to. The access time limit can be 1 minute, 5 minutes, 10 minutes, etc. Access requests initiated outside the access time limit will be restricted, such as directly rejecting the processing.
[0090] In some embodiments, when the multi-person payment request only carries the total amount to be paid, when the server generates the recharge link, it only needs to ensure that the recharge amount input by each user is less than or equal to the total amount to be paid. In some embodiments, when the multi-person payment request also carries the per capita sharing amount, the server can fix the recharge amount of the recharge link as the per capita sharing amount.
[0091] Step 208, receive the recharge information for the contract account sent by the target terminal and other terminals to which the recharge link is shared, and update the total account amount of the contract account according to the recharge information.
[0092] As mentioned above, the target terminal can share the recharge link to the terminals where other user identifiers that have an interaction relationship with the user identifier logged in on the terminal are located. Naturally, these terminals can continue to share the obtained recharge link to other terminals. The target terminal or other terminals can all initiate an access request for the recharge link according to the obtained recharge link and recharge to the recharge link. The server will receive the recharge information of each terminal and update the total account amount of the contract account according to the recharge information. In some embodiments, as mentioned above, the server can restrict the access request or perform permission verification to reduce the attacks and damages to the server caused by a large number of accesses to the recharge link by malicious users or attackers.
[0093] In the case where smart contracts of different orders are associated with the same contract account, the server generates corresponding recharge links for each order. The server can divide the recharge records according to the recharge links based on which recharge link each recharge record for the contract account is made through, so as to distinguish the recharge records for the same order, and thus calculate the total account amount for the same order in the contract account. For example, smart contract 1 created for target order 1, smart contract 2 created for target order 2, and smart contract 3 created for target order 3 are all associated with contract account Accout1. The server generates three recharge links link1, link2, and link3 for this contract account respectively. Among them, recharge link link1 corresponds to target order 1, recharge link link2 corresponds to target order 2, and recharge link link3 corresponds to target order 3. By calling smart contract 1, monitor and accumulate the total amount recharged to contract account Accout1 associated with smart contract 1 through recharge link link1. By calling smart contract 2, monitor and accumulate the total amount recharged to contract account Accout1 associated with smart contract 2 through recharge link link2. By calling smart contract 3, monitor and accumulate the total amount recharged to contract account Accout1 associated with smart contract 3 through recharge link link3. As Figure 3 shown, it is a schematic diagram of a smart contract monitoring a contract account when smart contracts of different orders are associated with the same contract account in an embodiment.
[0094] In the case where smart contracts of different orders are associated with different contract accounts, the server generates different recharge links for different orders. The recharge link is used to recharge a certain contract account. The server can call the smart contract corresponding to the target order to monitor the contract account associated with the smart contract. For example, smart contract 1 created for target order 1 is associated with contract account Accout1, smart contract 2 created for target order 2 is associated with contract account Accout2, and smart contract 3 created for target order 3 is associated with contract account Accout3. Then the server calls smart contract 1 to monitor and accumulate the total amount of contract account Accout1, calls smart contract 2 to monitor and accumulate the total amount of contract account Accout2, and calls smart contract 3 to monitor and accumulate the total amount of contract account Accout3. As Figure 4 shown, it is a schematic diagram of a smart contract monitoring a contract account when smart contracts of different orders are associated with different contract accounts in an embodiment.
[0095] In one embodiment, the recharge information of the contract account sent by the target terminal and other terminals to which the recharge link is shared is received, and the total account amount of the contract account is updated according to the recharge information, including: receiving an access request for the recharge link, where the access request is initiated by the target terminal or other terminals to which the recharge link is shared; according to the access request, feedbacking the interface interaction information required to display the recharge interface to the target terminal or other terminals to which the recharge link is shared; receiving the recharge amount and user information sent by the target terminal or other terminals to which the recharge link is shared, where the recharge amount is input and confirmed by the user in the recharge interface, and the user information is the user identifier of the logged-in terminal.
[0096] In this embodiment, after the target terminal or other terminals access the recharge link, a recharge interface will be displayed, and the recharge interface includes interface interaction information, such as prompt information, recharge input box, order initiator information, order summary information, etc. In the case where the multi-person payment request only carries the total amount to be paid, the prompt information can be to prompt that the recharge amount input by the user is less than or equal to the total amount to be paid, and the recharge amount of each user is not fixed. In the case where the multi-person payment request also carries the per capita share amount, the prompt information is to prompt that the recharge amount input by the user is the per capita share amount. As Figure 5 shown, it is a schematic diagram of the interface of the recharge interface in one embodiment.
[0097] The server can receive the recharge amount and user information sent by the target terminal or other terminals to which the recharge link is shared. The recharge amount is input and confirmed by the user in the recharge interface, and the user information is the user identifier of the logged-in terminal. The user can recharge through their digital asset account, third-party payment account or bank card account.
[0098] Step 210, call the smart contract to monitor whether the total account amount of the contract account associated with the smart contract reaches the total amount to be paid, and when it reaches the total amount to be paid, trigger a payment instruction for the target order.
[0099] After the server generates a recharge link corresponding to the contract account and sends the recharge link to the target terminal, the server will call the smart contract of the target order to monitor whether the total account amount of the associated contract account reaches the total amount to be paid, and when it reaches the total amount to be paid, trigger a payment instruction for the target order. Regardless of whether the recharge amount of each user is fixed or not (not fixed), as long as it is monitored that the total account amount of the associated contract account reaches the total amount to be paid, a payment instruction for the target order will be automatically triggered.
[0100] After the server triggers a payment instruction for a target order, it will transfer the total amount to be paid from the contract account to the asset receiving account, which is the asset receiving account of the target order. The asset receiving account can be queried according to the order information of the target order.
[0101] It should be noted that in the embodiment of the present application, in order to be able to monitor the total amount of the contract account in real time, step 210 is executed immediately after step 206, that is, after generating the recharge link corresponding to the contract account and sending the recharge link to the target terminal, rather than after step 208. Step 210 is a step parallel to step 208.
[0102] In the above multi-person payment method, after receiving a multi-person payment request initiated by a target terminal for a target order, according to the total amount to be paid carried in the multi-person payment request, a smart contract for the target order and a contract account associated with the smart contract are created in the blockchain. The smart contract is used to monitor whether the total amount of the contract account associated with the smart contract reaches the total amount to be paid. In addition, a recharge link corresponding to the contract account is generated and sent to the target terminal. The target terminal can recharge the contract account according to the recharge link. The target terminal can share the recharge link with other terminals. After receiving the recharge information of the contract account sent by the target terminal and other terminals to which the recharge link is shared, the total amount of the contract account is updated according to the recharge information. Once the smart contract monitors that the total amount of the contract account associated with it reaches the total amount to be paid, a payment instruction for the target order will be triggered. In this payment process, after placing an order through the target terminal, all participants can easily complete the payment through a recharge link, and the operation is very simple. Moreover, the three steps of placing an order, raising funds, and making a payment are connected, rather than isolated. That is, if the previous process is not completed, it will result in the inability to make a payment ultimately and thus the purchase cannot be successful. For the user using the target terminal, only need to share the recharge link with other users, without any extra manual operations, and the operation is very simple.
[0103] In one embodiment, the multi-person payment request further carries order information and an order expiration time. The method further includes: receiving an access request for the recharge link, where the access request is initiated by the target terminal or other terminals to which the recharge link is shared; querying relevant information of the recharge link according to the access request, where the relevant information includes at least one of the total amount of the contract account corresponding to the recharge link, the historical recharge record of the contract account, the order information, and the order expiration time; and in response to the access request, feedbacking the relevant information of the recharge link.
[0104] In this embodiment, the target terminal or other terminals can initiate an access request to the server according to the recharge link, and this access request is used to query information related to the recharge link. When the target terminal initiates a multi-person payment request, the multi-person payment request can also carry order information and the order expiration time. The server can store the target order, smart contract, recharge link, and contract account in one-to-one correspondence, and store the order information and order expiration time of the target order. When the server receives the recharge information sent by the target terminal or other terminals, it can also save the recharge information to form a recharge record of the recharge link. Taking the case where the smart contracts of different orders are associated with different contract accounts as an example, when the server receives the recharge information for a contract account, it stores information such as the recharge user identifier, recharge amount, and recharge time. In this way, when the server receives an access request from the target terminal or other terminals, it can query the current total amount of the contract account corresponding to the recharge link, can also query the historical recharge records, can also query the order information of the target order corresponding to the recharge link, and can also query the order expiration time, and feedback this information as the information related to the recharge link to the terminal that initiated the access request.
[0105] Through this embodiment, users who intend to recharge the recharge link can query the current fundraising situation of the current multi-person payment fees at any time. After the query, they can determine the recharge amount they want to recharge according to the actual situation, without the need for the user who initiates the multi-person payment to notify other participants one by one. Through one recharge link, all participants can easily complete the payment, and the operation is very simple.
[0106] In one embodiment, the multi-person payment request also carries the order expiration time, and the smart contract is called to monitor whether the total amount of the contract account associated with the smart contract reaches the total amount to be paid, and when the total amount to be paid is reached, a payment instruction for the target order is triggered, including: calling the smart contract to monitor whether the total amount of the contract account associated with the smart contract reaches the total amount to be paid, and when the total amount to be paid is reached and the order expiration time has not been reached, triggering a payment instruction for the target order.
[0107] Specifically, when the target terminal initiates a multi-person payment request, the multi-person payment request also carries the order expiration time. The server can parse out this order expiration time from the multi-person payment request and monitor whether the total amount of the contract account associated with it reaches the total amount to be paid within this order expiration time. If it reaches, a payment instruction for the target order is triggered.
[0108] Optionally, when the order expiration time is reached and the total account balance of the contract account does not reach the total amount payable, an order cancellation instruction for the target order is triggered, and based on the historical recharge records of the contract account, a recharge terminal refund instruction is triggered, and the smart contract, the contract account, and the recharge link are cancelled. That is to say, if it is monitored that the total account balance of the associated contract account does not reach the total amount payable within the order expiration time, a recharge terminal refund instruction is triggered. The server will return the already recharged amount one by one according to the historical recharge records of the recharge link corresponding to the target order, and make the recharge link invalid, cancel the smart contract, and the contract account is no longer associated with this smart contract.
[0109] When multiple people make payments, there may be a situation where the fees cannot be successfully collected. In this embodiment, the smart contract monitors whether the payable amount of the target order is reached within the valid time range of the order. When it fails to reach, the already recharged amount is automatically refunded, reducing the manual refund operation of the users who initiate multiple-person payments. The operation is very simple and also protects the rights and interests of each participant.
[0110] In one embodiment, the method further includes: receiving an order cancellation instruction initiated by a target terminal for a target order; canceling the smart contract, the contract account, and the recharge link according to the order cancellation instruction; querying the historical recharge records of the contract account, and triggering a recharge terminal refund instruction for each recharge terminal according to the historical recharge records.
[0111] Specifically, when the user who initiates multiple-person payment needs to cancel the target order, the target terminal can be used to send an order cancellation instruction for the target order to the server. For example, the user can open the order page and trigger a cancel order application on the order page. Another example is that the user can click on the recharge link and trigger a cancel order application in the recharge interface corresponding to the recharge link. When the server receives the order cancellation instruction initiated by the target terminal for the target order, it can promptly cancel the smart contract, the contract account, and the recharge link according to the order cancellation instruction, preventing other users from continuing to recharge the target order using this recharge link. At the same time, the server queries the historical recharge records of the contract account and triggers a recharge terminal refund instruction for each recharge terminal according to the historical recharge records, and can return the already recharged amount one by one.
[0112] Of course, the user who initiates the multi-person payment may not cancel the target order, but cancel the multi-person payment request for the target order. For example, when the user needs to change to bear the cost alone, the multi-person payment request needs to be cancelled. The user can click on the recharge link, and the recharge interface corresponding to the recharge link includes a control for cancelling the payment. By using this control, the multi-person payment request can be triggered to be cancelled. When the server receives the cancellation instruction of the multi-person payment request, it cancels the smart contract, the contract account, and the recharge link to prevent other users from continuing to recharge the target order using this recharge link. At the same time, the server queries the historical recharge records of the contract account and triggers a recharge terminal refund instruction for each recharge terminal according to the historical recharge records, so that the already recharged amount can be returned one by one.
[0113] In this embodiment, the target terminal that initiates the multi-person payment can cancel the target order or the multi-person payment request at any time, and only needs to use one recharge link to achieve cancellation, and the already recharged amount is automatically refunded after the cancellation is triggered, reducing the manual refund operation of the user who initiates the multi-person payment. The operation is very simple and also protects the rights and interests of each participant.
[0114] In one embodiment, after triggering the payment instruction for the target order, the method further includes: querying the historical recharge records of the contract account; determining each recharge terminal according to the historical recharge records; and sending a payment success message to each recharge terminal.
[0115] In this embodiment, after the target order is placed, the fees are raised, and the payment is successful, the server will query the historical recharge records of the recharge link corresponding to the contract account, so as to determine each user terminal participating in this payment, and push a payment success prompt message to these user terminals, so that the status of the order being successfully paid can be timely informed to each participant.
[0116] In one embodiment, after updating the total account amount of the contract account according to the recharge information, the method further includes: querying the historical recharge records of the contract account; determining each recharge terminal according to the historical recharge records; and pushing a notification message about the update of the total account amount of the contract account to each recharge terminal.
[0117] In this embodiment, before triggering the payment instruction for the target order, it indicates that the total account balance of the contract account has not reached the total amount to be paid. Whenever the server receives recharge information sent by a user terminal, the smart contract monitors that the total account balance of the contract account is updated. When the total account balance is updated, the server can push the updated total account balance to the participants who have already participated in this multi-person payment, that is, those user terminals that have already recharged, namely the recharge terminals. The server can determine each recharge terminal according to the historical recharge records and push a notification message about the update of the total account balance of the contract account to each recharge terminal. The notification message can include the updated total account balance. In this way, during the process of raising funds for multi-person payment, each participant can be informed of the current fundraising progress in real time, without the need for participants to check by themselves, reducing the viewing operations of participants, and also eliminating the need for participants to inquire from the initiator.
[0118] In one embodiment, after triggering the payment instruction for the target order, the method further includes: when the order status of the target order is updated, pushing a notification message about the update of the order status of the target order to each recharge terminal of the target order.
[0119] In this embodiment, after triggering the payment instruction for the target order, the server can obtain the order status of the target order. The order status includes ordered, paid, shipped, in delivery, completed, etc. The server can determine each recharge terminal according to the historical recharge records of the contract account and push a notification message about the update of the order status of the target order to each recharge terminal. The notification message can include the latest order status. In this way, during the process of raising funds for multi-person payment, each participant can be informed of the current order status in real time, without the need for participants to check by themselves, reducing the viewing operations of participants, and also eliminating the need for participants to inquire from the initiator.
[0120] In one embodiment, the method further includes: generating multiple recharge transactions in the recharge order based on the recharge information sent by the target terminal or other terminals to which the recharge link is shared, and generating a data block according to the multiple recharge transactions; storing the data block on the blockchain. In this way, the transparency and traceability of the payment process can be ensured, and relevant payment behaviors are recorded on the blockchain.
[0121] In addition, the server can also record the order cancellation instruction sent by the target terminal on the blockchain, can also record the access request to the recharge link sent by the target terminal or other terminals on the blockchain, and can also record each operation in the entire order payment process on the blockchain, realizing the full recording of data during the multi-person payment process to ensure the rights and interests of each participant.
[0122] As Figure 6 shown, it is a timing diagram of the multi-person payment method in one embodiment. Refer toFigure 6 , the sequence diagram involves the target terminal, other terminals and the server. Among them, the target terminal initiates a multi-person payment request to the server according to the total amount payable of the target order. The server creates a smart contract for the target order and a contract account associated with the smart contract in the blockchain according to the total amount payable, generates a recharge link corresponding to the contract account, and sends the recharge link to the target terminal.
[0123] Reference Figure 6 The target terminal or other terminal can send an access request to the recharge link to query the relevant information of the recharge link. The server will return the account balance of the contract account corresponding to the recharge link, the historical recharge record of the contract account, the order information and the order expiration time, etc.
[0124] Reference Figure 6 , the target terminal can send an order cancellation instruction initiated for the target order to cancel the target order. The server will cancel the smart contract, contract account and recharge link, and return the recharged amount.
[0125] Reference Figure 6 The target terminal can enter and confirm the recharge amount in the recharge interface to send the recharge information. The server can receive the recharge information, update the total account amount of the contract account according to the recharge information, and push notification messages about the update of the total account amount of the contract account to each recharge terminal.
[0126] In addition, refer to Figure 6 The server also calls the smart contract to monitor whether the total amount of the contract account associated with the smart contract has reached the total amount to be paid, and triggers the payment instruction for the target order when the total amount to be paid has been reached and the order expiration time has not been reached. After the payment is successful, a payment success message is sent to each recharge terminal. When the order status of the target order is updated, a notification message about the update of the order status of the target order is pushed to each recharge terminal of the target order. When the order expiration time is reached and the total amount of the contract account has not reached the total amount to be paid, the order cancellation instruction for the target order is triggered, and according to the historical recharge record of the contract account, the recharge terminal refund instruction is triggered, and the smart contract, contract account and recharge link are cancelled.
[0127] The embodiment of the present application further provides an application scenario, which can apply the above-mentioned multi-person payment method. In this specific application scenario, a client is running on the target terminal M1. User 1 generates a target order through the client, and an order page corresponding to the target order is displayed on the client. User 1 selects the multi-person payment method to pay for the order on the order page. At this time, the client sends a multi-person payment request to the server through the target terminal M1. The multi-person payment request can carry the total payable amount N of the target order and the order expiration time. After receiving the multi-person payment request, the server creates a smart contract for the target order and a contract account associated with the smart contract in the blockchain. The smart contract is used to monitor whether the total amount of the contract account reaches the total payable amount. At the same time, the server also generates a recharge link corresponding to the contract account, and the validity period of the recharge link is the same as the order expiration time of the target order. The server sends the recharge link to the target terminal M1, and the target terminal M1 can share the recharge link to other terminals M2, M3, M4, etc.
[0128] The target terminal M1 and the above-mentioned other terminals M2, M3, M4 can respectively send access requests for the recharge link. After receiving the access request, the server can feedback the interface interaction information required to display the recharge interface to the target terminal or other terminals to which the recharge link is shared. The target terminal M1 and the above-mentioned other terminals M2, M3, M4 can all display the recharge interface according to the received interface interaction information. Their respective users can input and confirm the recharge amount in the recharge interface. After receiving the recharge information, the server updates the total amount of the contract account, and the smart contract monitors whether the total amount of the account reaches the total payable amount.
[0129] In the case where the total payable amount has not been reached, the recharge link remains valid. The target terminal M1 and the above-mentioned other terminals M2, M3, M4 can all query the relevant information of the recharge link through the recharge link. The relevant information includes at least one of the total amount of the contract account corresponding to the recharge link, the historical recharge record of the contract account, the order information, and the order expiration time.
[0130] In the case where the total payable amount has not been reached, the recharge link remains valid. The target terminal M1 can also initiate an order cancellation instruction through the recharge link. When the server receives the order cancellation instruction, according to the order cancellation instruction, it cancels the smart contract, the contract account, and the recharge link, queries the historical recharge record of the contract account, and triggers a recharge terminal refund instruction for each recharge terminal according to the historical recharge record.
[0131] The recharge link remains valid when the total amount to be paid has not been reached. When any one of the target terminal M1 and the other terminals M2, M3, M4 sends a recharge message to the server, the server can push a notification message about the update of the total amount of the contract account to the terminals that have already participated in the multi-person payment.
[0132] When the smart contract monitors whether the total amount of the associated contract account reaches the total amount to be paid, and when the total amount to be paid is reached and the order expiration time has not been reached, it triggers a payment instruction for the target order. After triggering the payment instruction for the target order, the server can also query the historical recharge records of the contract account, determine each recharge terminal according to the historical recharge records, and send a payment success message to each recharge terminal. When the order status of the target order is updated, a notification message about the update of the order status of the target order is pushed to each recharge terminal of the target order.
[0133] When the smart contract monitors that the order expiration time is reached and the total amount of the contract account has not reached the total amount to be paid, it triggers an order cancellation instruction for the target order, and according to the historical recharge records of the contract account, triggers a recharge terminal refund instruction, and cancels the smart contract, the contract account, and the recharge link.
[0134] In addition, the server also generates multiple recharge transactions in the recharge order for the recharge information sent by the target terminal or other terminals to which the recharge link is shared, generates a data block according to the multiple recharge transactions, and stores the data block on the blockchain.
[0135] The multi-person payment method provided by the embodiments of the present application can be used not only in the scenario of multi-person raising order fees, but also in the raising of collective expenses such as parties and trips, and can also be used for collective procurement of related items or resources, etc. With this multi-person payment method, all participants can easily complete the payment through a recharge link, simplifying the payment process. All payment behaviors can support being recorded on the blockchain, ensuring the transparency and traceability of the payment process. All payment and confirmation steps are automatically processed through a temporarily created smart contract, and automatic refund is made when the funds are insufficient. The degree of automation is high, and it also ensures the timeliness of multi-person payment, avoiding cumbersome operations for users.
[0136] In one embodiment, as Figure 7 shown, a multi-person payment method is provided. Taking the method applied to the target terminal 102 in Figure 1 as an example, the method includes the following steps:
[0137] Step 702, initiate a multi-person payment request for the target order to the server;
[0138] Step 704: Receive the recharge link feedback from the server. The recharge link is sent by the server after creating a smart contract for the target order and a contract account associated with the smart contract in the blockchain based on the total amount to be paid carried in the multi-person payment request, and generating the recharge link corresponding to the contract account. The smart contract is used to monitor whether the total amount of the contract account reaches the total amount to be paid, and trigger a payment instruction for the target order when the total amount to be paid is reached.
[0139] Step 706: Recharge the contract account according to the recharge link to instruct the server to update the total amount of the contract account; and
[0140] Step 708: Send the recharge link to other terminals to instruct other terminals to recharge the contract account according to the recharge link.
[0141] For the embodiments of each step in this multi-person payment method, reference may be made to the similar descriptions above.
[0142] It should be understood that although the steps in the flowcharts involved in the above embodiments are sequentially shown according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.
[0143] Based on the same inventive concept, an embodiment of the present application also provides a multi-person payment device for implementing the above-mentioned multi-person payment method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the multi-person payment device provided below can refer to the limitations on the multi-person payment method in the above text, and will not be repeated here.
[0144] In one embodiment, as Figure 8 shown, a multi-person payment device 800 is provided, including: a request receiving module 802, a creating module 804, a link sending module 806, a receiving module 808, and a monitoring module 810, where:
[0145] The request receiving module 802 is configured to receive a multi-person payment request initiated by a target terminal for a target order;
[0146] A creation module 804, configured to create a smart contract for a target order and a contract account associated with the smart contract in a blockchain according to the total amount to be paid carried in a multi-person payment request;
[0147] A link sending module 806, configured to generate a recharge link corresponding to the contract account and send the recharge link to a target terminal;
[0148] A receiving module 808 is further configured to receive recharge information for the contract account sent by the target terminal and other terminals to which the recharge link is shared, and update the total account amount of the contract account according to the recharge information;
[0149] A monitoring module 810, configured to call the smart contract to monitor whether the total account amount of the contract account associated with the smart contract reaches the total amount to be paid, and trigger a payment instruction for the target order when the total amount to be paid is reached.
[0150] In one embodiment, the multi-person payment request further carries order information and an order expiration time, and the multi-person payment device 800 further includes:
[0151] A query module, configured to receive an access request for the recharge link, where the access request is initiated by the target terminal or other terminals to which the recharge link is shared; query relevant information of the recharge link according to the access request, where the relevant information includes at least one of the total account amount of the contract account corresponding to the recharge link, the historical recharge record of the contract account, the order information, and the order expiration time; and feedback the relevant information of the recharge link in response to the access request.
[0152] In one embodiment, the multi-person payment request further carries an order expiration time, and the monitoring module 810 is configured to call the smart contract to monitor whether the total account amount of the contract account associated with the smart contract reaches the total amount to be paid, and trigger a payment instruction for the target order when the total amount to be paid is reached and the order expiration time has not been reached.
[0153] In one embodiment, the monitoring module 810 is configured to trigger an order cancellation instruction for the target order when the order expiration time is reached and the total account amount of the contract account has not reached the total amount to be paid, trigger a recharge terminal refund instruction according to the historical recharge record of the contract account, and cancel the smart contract, the contract account, and the recharge link.
[0154] In one embodiment, the multi-person payment device 800 further includes:
[0155] An order cancellation module, configured to receive an order cancellation instruction initiated by the target terminal for the target order; cancel the smart contract, the contract account, and the recharge link according to the order cancellation instruction; query the historical recharge record of the contract account, and trigger a recharge terminal refund instruction for each recharge terminal according to the historical recharge record.
[0156] In one embodiment, the multi-person payment device 800 further includes:
[0157] A message push module, configured to, after the step of triggering a payment instruction for a target order, query the historical recharge records of the contract account; determine each recharge terminal according to the historical recharge records; and send a payment success message to each recharge terminal.
[0158] In one embodiment, the multi-person payment device 800 further includes:
[0159] A message push module, configured to, after the step of updating the total account amount of the contract account according to the recharge information, query the historical recharge records of the contract account; determine each recharge terminal according to the historical recharge records; and push a notification message indicating that the total account amount of the contract account has been updated to each recharge terminal.
[0160] In one embodiment, the multi-person payment device 800 further includes:
[0161] A message push module, configured to, after the step of triggering a payment instruction for a target order, when the order status of the target order is updated, push a notification message indicating that the order status of the target order has been updated to each recharge terminal of the target order.
[0162] In one embodiment, the receiving module 808 is further configured to receive an access request for a recharge link, where the access request is initiated by a target terminal or another terminal to which the recharge link is shared; according to the access request, feedback interface interaction information required to display a recharge interface to the target terminal or another terminal to which the recharge link is shared; and receive the recharge amount and user information sent by the target terminal or another terminal to which the recharge link is shared, where the recharge amount is input and confirmed by the user in the recharge interface, and the user information is the user identifier of the logged-in terminal.
[0163] In one embodiment, the multi-person payment device 800 further includes:
[0164] A recording module, configured to generate multiple recharge transactions in the recharge order based on the recharge information sent by the target terminal or another terminal to which the recharge link is shared, generate a data block according to the multiple recharge transactions; and store the data block on the blockchain.
[0165] After receiving a multi-person payment request initiated by a target terminal for a target order, the above-mentioned multi-person payment device 800 creates a smart contract for the target order and a contract account associated with the smart contract in the blockchain according to the total amount to be paid carried in the multi-person payment request. The smart contract is used to monitor whether the total amount of the contract account associated with the smart contract reaches the total amount to be paid. In addition, a recharge link corresponding to the contract account is generated and sent to the target terminal. The target terminal can recharge the contract account according to the recharge link. The target terminal can share the recharge link to other terminals. After receiving the recharge information for the contract account sent by the target terminal and other terminals to which the recharge link is shared, the total amount of the contract account is updated according to the recharge information. Once the smart contract monitors that the total amount of the contract account associated with it reaches the total amount to be paid, a payment instruction for the target order will be triggered. In this payment process, after placing an order through the target terminal, all participants can easily complete the payment through a recharge link, and the operation is very simple. Moreover, the three steps of placing an order, raising funds, and making a payment are connected, rather than isolated. That is, if the previous process is not completed, it will result in the inability to make a payment ultimately and thus the purchase cannot be successful. For the user using the target terminal, only need to share the recharge link to other users, without any extra manual operation, and the operation is very simple.
[0166] Each module in the above-mentioned multi-person payment device 800 can be implemented in whole or in part by software, hardware, and their combination. The above-mentioned modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
[0167] In one embodiment, a computer device is provided. The computer device can be Figure 1 the server 104 shown, and its internal structure diagram can be as Figure 9As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. 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 database of the computer device is used to store multi-person payment record data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a multi-person payment method.
[0168] In one embodiment, a computer device is provided. The computer device may be Figure 1 the terminal shown, and its internal structure diagram may be as Figure 10 shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner. The wireless manner can be achieved through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a multi-person payment method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball, or a touchpad set on the computer device housing, or an external keyboard, touchpad, or mouse, etc.
[0169] Those skilled in the art can understand that Figure 9 , Figure 10The structure shown is only a block diagram of some of the structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0170] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps of the multi-person payment method provided in the embodiments of this application are implemented.
[0171] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the multi-person payment method provided in the embodiments of this application are implemented.
[0172] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps of the multi-person payment method provided in the embodiments of this application are implemented.
[0173] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions.
[0174] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. 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 methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0175] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0176] The above-described embodiments only represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method for multi-person payment, characterized in that, The method includes: Receiving a multi-person payment request initiated by a target terminal for a target order; Creating a smart contract for the target order and a contract account associated with the smart contract in the blockchain according to the total amount to be paid carried in the multi-person payment request; Generating a recharge link corresponding to the contract account and sending the recharge link to the target terminal; Receiving recharge information for the contract account sent by the target terminal and other terminals to which the recharge link is shared, and updating the total amount of the contract account according to the recharge information; Invoking the smart contract to monitor whether the total amount of the contract account associated with the smart contract reaches the total amount to be paid, and triggering a payment instruction for the target order when the total amount to be paid is reached.
2. The method according to claim 1, characterized in that The multi-person payment request further carries order information and an order expiration time, and the method further includes: Receiving an access request for the recharge link, where the access request is initiated by the target terminal or other terminals to which the recharge link is shared; Querying relevant information of the recharge link according to the access request, where the relevant information includes at least one of the total amount of the contract account corresponding to the recharge link, the historical recharge record of the contract account, the order information, and the order expiration time; Responding to the access request and feeding back the relevant information of the recharge link.
3. The method according to claim 1, wherein The multi-person payment request further carries an order expiration time, and the invoking the smart contract to monitor whether the total amount of the contract account associated with the smart contract reaches the total amount to be paid, and triggering a payment instruction for the target order when the total amount to be paid is reached includes: Invoking the smart contract to monitor whether the total amount of the contract account associated with the smart contract reaches the total amount to be paid, and triggering a payment instruction for the target order when the total amount to be paid is reached and the order expiration time has not been reached.
4. The method according to claim 3, characterized in that, The method further includes: When the order expiration time is reached and the total amount of the contract account does not reach the total amount to be paid, triggering an order cancellation instruction for the target order, triggering a recharge terminal refund instruction according to the historical recharge record of the contract account, and canceling the smart contract, the contract account, and the recharge link.
5. The method according to claim 1, wherein The method further includes: Receiving an order cancellation instruction initiated by the target terminal for the target order; Canceling the smart contract, the contract account, and the recharge link according to the order cancellation instruction; Querying the historical recharge record of the contract account and triggering a recharge terminal refund instruction for each recharge terminal according to the historical recharge record.
6. The method according to claim 1, wherein After triggering the payment instruction for the target order, the method further includes: Querying the historical recharge record of the contract account; Determining each recharge terminal according to the historical recharge record; Sending a payment success message to each recharge terminal.
7. The method according to claim 1, characterized in that, After updating the total amount of the contract account according to the recharge information, the method further includes: Querying the historical recharge record of the contract account; Determining each recharge terminal according to the historical recharge record; Push a notification message indicating an update to the total account amount of the contract account to each recharge terminal.
8. The method according to claim 1, characterized in that After triggering the payment instruction for the target order, the method further includes: When the order status of the target order is updated, push a notification message indicating an update to the order status of the target order to each recharge terminal of the target order.
9. The method according to claim 1, wherein Receiving the recharge information for the contract account sent by the target terminal and other terminals to which the recharge link is shared, and updating the total account amount of the contract account according to the recharge information includes: Receiving an access request for the recharge link, where the access request is initiated by the target terminal or other terminals to which the recharge link is shared; According to the access request, feedback the interface interaction information required to display the recharge interface to the target terminal or other terminals to which the recharge link is shared; Receiving the recharge amount and user information sent by the target terminal or other terminals to which the recharge link is shared, where the recharge amount is input and confirmed by the user in the recharge interface, and the user information is the user identifier of the logged-in terminal.
10. The method according to any one of claims 1 to 9, characterized in that, The method further includes: Generate multiple recharge transactions in the recharge order based on the recharge information sent by the target terminal or other terminals to which the recharge link is shared, and generate a data block according to the multiple recharge transactions; Store the data block on the blockchain.
11. A multi-person payment method, characterized in that, The method includes: Initiate a multi-person payment request for a target order to the server; Receive the recharge link feedback by the server. The recharge link is created by the server in the blockchain for the target order based on the total amount to be paid carried in the multi-person payment request, creating a smart contract for the target order and a contract account associated with the smart contract, and generating the recharge link corresponding to the contract account and then sending it. The smart contract is used to monitor whether the total account amount of the contract account reaches the total amount to be paid, and when it reaches the total amount to be paid, trigger the payment instruction for the target order; Recharge the contract account according to the recharge link to instruct the server to update the total account amount of the contract account; and Send the recharge link to other terminals for instructing the other terminals to recharge the contract account according to the recharge link.
12. A multi-person payment device, characterized in that, The device includes: A request receiving module, configured to receive a multi-person payment request initiated by a target terminal for a target order; A creation module, configured to create a smart contract for the target order and a contract account associated with the smart contract in the blockchain according to the total amount to be paid carried in the multi-person payment request; A link sending module, configured to generate the recharge link corresponding to the contract account and send the recharge link to the target terminal; The receiving module is further configured to receive the recharge information for the contract account sent by the target terminal and other terminals to which the recharge link is shared, and update the total account amount of the contract account according to the recharge information; The monitoring module is used to call the smart contract to monitor whether the total amount of the contract account associated with the smart contract reaches the total amount to be paid, and trigger a payment instruction for the target order when the total amount to be paid is reached.
13. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 11.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 11.
15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 11.