Coin String Merging Method, Device, Computer Equipment and Storage Medium

By obtaining the owner ID of the transaction currency string and updating the balance of the native currency string, the problem of increasing data interaction caused by multiple currency strings in traditional digital currency transactions is solved, and the transaction processing efficiency is improved.

CN114037533BActive Publication Date: 2025-07-25BEIJING NAT DIGITAL FINANCIAL TECH TESTING CENT CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111325343.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-10
Publication Date
2025-07-25
Estimated Expiration
2041-11-10

AI Technical Summary

Technical Problem

Traditional digital currency trading methods cause the recipient to store multiple currency strings in the terminal, and each currency string has multiple transaction chains, which increases the amount of data interaction and reduces the transaction processing efficiency.

Method used

By receiving the payment party's transaction voucher data, obtain the transaction coin string owner ID, and when it is determined that it is the digital currency corresponding to the native currency string, update the native currency string balance and delete the transaction voucher data to reduce the number of currency strings.

Benefits of technology

It reduces the amount of data interaction during digital currency transactions, improves transaction processing efficiency, and simplifies the internal storage and operation process of the payee terminal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114037533B_ABST
    Figure CN114037533B_ABST
Patent Text Reader

Abstract

The present application relates to a method, apparatus, computer device, storage medium, and computer program product for coin string merging. The method includes: receiving transaction voucher data of digital coins sent by a payer in response to a transaction payment request; obtaining a transaction coin string owner identifier corresponding to the transaction voucher data; when it is determined according to the transaction coin string owner identifier that the digital coins corresponding to the transaction voucher data are the digital coins corresponding to the native coin string, updating the balance of the native coin string according to the transaction voucher data, and deleting the transaction voucher data. By adopting this method, the data interaction volume during digital coin transactions can be reduced, and the transaction processing efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and particularly to a method and apparatus for merging coin strings, a computer device, and a storage medium. Background Art

[0002] With the rapid development of the economy, digital coins have emerged. Digital coins are an unregulated, digital currency, usually issued and managed by developers, and received and used by members of a specific virtual community.

[0003] In traditional technologies, during digital coin transactions, the payer removes the balance from their balance voucher, adds the new transaction sub-chain of the current transaction, generates, and sends a payment voucher to the payee. So that after the payee verifies the payment voucher, the payee obtains the current transaction record, adds the current transaction amount as the balance behind the payment voucher to form a new balance voucher, and the new balance voucher is saved inside the payee in the form of a new coin string.

[0004] However, in traditional methods, after multiple payment and receipt operations, multiple coin strings will be saved inside the payee, and each coin string will have multiple transaction chains. During digital coin transactions, it will increase the data interaction volume, resulting in the problem of low transaction processing efficiency. Summary of the Invention

[0005] Based on this, to address the above technical problems, it is necessary to provide a coin string merging method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve transaction processing efficiency.

[0006] In a first aspect, this application provides a coin string merging method. The method includes:

[0007] Receiving the transaction voucher data of digital coins sent by the payer in response to a transaction payment request;

[0008] Obtaining the transaction coin string owner identifier corresponding to the transaction voucher data;

[0009] When it is determined according to the transaction coin string owner identifier that the digital coin corresponding to the transaction voucher data is the digital coin corresponding to the native coin string, updating the balance of the native coin string according to the transaction voucher data, and deleting the transaction voucher data.

[0010] In one embodiment, before obtaining the transaction coin string owner identifier corresponding to the transaction voucher data, it further includes:

[0011] Obtaining the payer's public key;

[0012] Performing signature verification on the transaction voucher data according to the payer's public key;

[0013] When the signature verification is passed, it is determined that the transaction voucher data verification is passed, and the step of obtaining the owner identifier of the transaction coin string corresponding to the transaction voucher data is entered.

[0014] In one embodiment, the method further includes:

[0015] Obtain the owner identifier of the native coin string corresponding to the native coin string;

[0016] When the owner identifier of the transaction coin string is the same as the owner identifier of the native coin string, it is determined that the digital coin corresponding to the transaction voucher data is the digital coin corresponding to the native coin string.

[0017] In one embodiment, when it is determined that the digital coin corresponding to the transaction voucher data is the digital coin corresponding to the native coin string according to the owner identifier of the transaction coin string, updating the balance of the native coin string according to the transaction voucher data includes:

[0018] When it is determined that the digital coin corresponding to the transaction voucher data is the digital coin corresponding to the native coin string according to the owner identifier of the transaction coin string, obtain the transaction resource amount in the latest transaction sub-chain of the transaction voucher data;

[0019] Update the balance of the native coin string according to the transaction resource amount.

[0020] In one embodiment, before receiving the transaction voucher data of the digital coin sent by the payer in response to the transaction payment request, it further includes:

[0021] Receive the transaction initialization request of the payer;

[0022] Verify the legitimacy of the payer according to the transaction initialization request;

[0023] When the legitimacy verification is passed, feedback the transaction initialization parameters of the payee.

[0024] In one embodiment, the method further includes:

[0025] In response to the payment request for the payer, determine the amount of resources to be traded;

[0026] Generate a transaction sub-chain according to the amount of resources to be traded;

[0027] Generate and send the expenditure voucher data to the payer terminal according to the transaction sub-chain.

[0028] In a second aspect, the present application further provides a coin string merging device. The device includes:

[0029] A receiving module, configured to receive the transaction voucher data of the digital coin sent by the payer in response to the transaction payment request;

[0030] An acquisition module, configured to acquire a transaction coin string owner identifier corresponding to transaction voucher data;

[0031] A processing module, configured to update the balance of the native coin string according to the transaction voucher data and delete the transaction voucher data when it is determined according to the transaction coin string owner identifier that the digital coin corresponding to the transaction voucher data is the digital coin corresponding to the native coin string.

[0032] Thirdly, the present application further provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the following steps are implemented:

[0033] Receiving transaction voucher data of a digital coin sent by a payer in response to a transaction payment request;

[0034] Acquiring a transaction coin string owner identifier corresponding to the transaction voucher data;

[0035] When it is determined according to the transaction coin string owner identifier that the digital coin corresponding to the transaction voucher data is the digital coin corresponding to the native coin string, updating the balance of the native coin string according to the transaction voucher data and deleting the transaction voucher data.

[0036] Fourthly, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the following steps are implemented:

[0037] Receiving transaction voucher data of a digital coin sent by a payer in response to a transaction payment request;

[0038] Acquiring a transaction coin string owner identifier corresponding to the transaction voucher data;

[0039] When it is determined according to the transaction coin string owner identifier that the digital coin corresponding to the transaction voucher data is the digital coin corresponding to the native coin string, updating the balance of the native coin string according to the transaction voucher data and deleting the transaction voucher data.

[0040] Fifthly, the present application further provides a computer program product. The computer program product includes a computer program. When the computer program is executed by a processor, the following steps are implemented:

[0041] Receiving transaction voucher data of a digital coin sent by a payer in response to a transaction payment request;

[0042] Acquiring a transaction coin string owner identifier corresponding to the transaction voucher data;

[0043] When it is determined according to the transaction coin string owner identifier that the digital coin corresponding to the transaction voucher data is the digital coin corresponding to the native coin string, updating the balance of the native coin string according to the transaction voucher data and deleting the transaction voucher data.

[0044] The above coin string merging method, device, computer device, storage medium, and computer program product, after receiving the transaction voucher data of the digital currency sent by the payer in response to the transaction payment request, obtain the transaction coin string owner identifier corresponding to the transaction voucher data. When it is determined according to the transaction coin string owner identifier that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native coin string, update the amount of the native coin string according to the transaction voucher data, and delete the transaction voucher data. When the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native coin string, it can record the transaction voucher data and does not need to save the coin string corresponding to the transaction voucher data, reducing the number of coin strings to be saved, thereby reducing the data interaction volume during digital currency transactions and improving the transaction processing efficiency. Brief Description of the Drawings

[0045] Figure 1 It is an application environment diagram of the coin string merging method in an embodiment;

[0046] Figure 2 It is a schematic flowchart of the coin string merging method in an embodiment;

[0047] Figure 3 It is a schematic flowchart of the coin string merging method in another embodiment;

[0048] Figure 4 It is a structural block diagram of the coin string merging device in an embodiment;

[0049] Figure 5 It is an internal structure diagram of a computer device in an embodiment. Detailed Embodiments

[0050] In order to make the objectives, technical solutions, and advantages of this application clearer, the following further details this application in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.

[0051] The coin string merging method provided by the embodiments of this application can be applied to, for example Figure 1In the application environment shown. Among them, terminal 102 communicates with terminal 104 through NFC (Near Field Communication). Specifically, taking terminal 102 as the payment device (i.e., the payer terminal) and terminal 104 as the payee terminal as an example, the payee terminal 104 can receive the transaction voucher data of the digital currency sent by the payer terminal 102 in response to a transaction payment request, obtain the transaction currency string owner identifier corresponding to the transaction voucher data, and when it is determined that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native currency string according to the transaction currency string owner identifier, update the balance of the native currency string according to the transaction voucher data and delete the transaction voucher data. Among them, terminal 102 and terminal 104 can be, but are not limited to, various personal 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.

[0052] In one embodiment, as Figure 2 shown, a method for merging currency strings is provided. Taking this method applied to Figure 1 the payee terminal in it as an example, it includes the following steps:

[0053] Step 202, receive the transaction voucher data of the digital currency sent by the payer in response to the transaction payment request.

[0054] Among them, the transaction voucher data refers to the data used to record the transaction result. For example, the transaction voucher data can specifically refer to the payment voucher. In this embodiment, taking the transaction voucher data as the payment voucher, the payment voucher is generated based on the balance voucher, and the item of the transaction is the digital currency as an example for illustration. Specifically, the structure of the digital currency (digital currency, abbreviated as DC) is roughly as follows:

[0055] Issuer Data Amount Issuer Signature Operator Data Operator Signature Transaction Chain

[0056] Among them, the issuer refers to the institution that manages the issuance of the digital currency. For example, the issuer can specifically refer to the People's Bank of China. The operator refers to the institution that operates the digital currency. For example, the operator can specifically refer to specific state-owned banks, commercial banks, etc.

[0057] The structure of the transaction chain is roughly as follows:

[0058] Transaction Sub-chain L(1)x Transaction Sub-chain L(1x)x…… …… Transaction Sub-chain L(n)x

[0059] Among them, L in the trading sub-chain L(n)x represents the trading sub-chain. The nth sub-chain represents the nth level of split DC. (n) represents the sub-chain label of the currency split from the previous level, and x represents the xth currency split from the previous level. It should be noted that the DC of the trading chain is not included in the data structure, which is called the native DC. The native currency is the initial DC directly issued by the operator to the user. The DC with a trading chain in the data structure is called the derived DC. The derived currency is the DC formed after the native currency has a transaction.

[0060] The data stored in the digital wallet mainly includes balance vouchers and transaction records. Among them, the structure of the balance voucher is roughly as follows:

[0061] Native DC Transaction Sub-chain L(1)x …… Transaction Sub-chain L(n)x Balance

[0062] For example, if wallet A has a native DC of 100 yuan and a derived currency of 20 yuan, the balance voucher is:

[0063] Native DC(A) 100 Derived DC(B) 20

[0064] Specifically, when conducting a digital currency transaction, the payer's terminal will respond to the transaction payment request, subtract the balance from its own balance voucher, and add the new trading sub-chain of this transaction to generate and send the transaction voucher data to the payee's terminal.

[0065] Step 204, obtain the owner identifier of the trading currency string corresponding to the transaction voucher data.

[0066] Among them, the owner identifier of the trading currency string is used to identify the source of the digital currency corresponding to the transaction voucher data. Digital currencies from different sources correspond to different owner identifiers.

[0067] Specifically, after receiving the transaction voucher data, the payee's terminal will obtain the payer's public key of the payer stored in advance during the transaction initialization with the payer, use the payer's public key to verify the payer's signature in the transaction voucher data. After the verification of the transaction voucher data is passed, obtain the owner identifier of the trading currency string corresponding to the transaction voucher data, and use the owner identifier of the trading currency string to determine whether the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native currency string. Among them, there is an owner identifier bit corresponding to the owner identifier of the trading currency string in the transaction voucher data, and the payee's terminal can directly obtain the owner identifier of the trading currency string by identifying this owner identifier bit. For example, the owner identifier of the trading currency string can specifically be a string used for identification.

[0068] Among them, the payer's public key refers to the key of the payer sent by the payer's terminal during the pre - transaction initialization with the payee's terminal, which is the non - secret half of the key pair used together with the payer's private key. The public key is usually used to encrypt the session key, verify the digital signature, or encrypt data that can be decrypted with the corresponding private key. In this embodiment, the payer's public key is mainly used to verify the payer's signature in the transaction voucher data.

[0069] Step 206, when it is determined according to the transaction coin string owner identifier that the digital coin corresponding to the transaction voucher data is the digital coin corresponding to the native coin string, update the balance of the native coin string according to the transaction voucher data, and delete the transaction voucher data.

[0070] Among them, the digital coin corresponding to the transaction voucher data refers to the digital coin that the payer needs to pay to the payee. The native coin string refers to the initial coin string directly sent by the operator to the payee.

[0071] Specifically, after obtaining the transaction coin string owner identifier, the payee's terminal will determine whether the digital coin corresponding to the transaction voucher data is the digital coin corresponding to the native coin string according to the transaction coin string owner identifier. When it is determined that the digital coin corresponding to the transaction voucher data is the digital coin corresponding to the native coin string, update the balance of the native coin string according to the transaction resource amount in the latest transaction sub - chain of the transaction voucher data, and delete the transaction voucher data, that is, do not save the coin string corresponding to the transaction voucher data, so as to reduce the number of coin strings stored inside the payee's terminal. Among them, the transaction resource amount can specifically refer to the transaction amount, etc.

[0072] The above - mentioned coin string merging method, after receiving the transaction voucher data of the digital coin sent by the payer in response to the transaction payment request, obtains the transaction coin string owner identifier corresponding to the transaction voucher data. When it is determined according to the transaction coin string owner identifier that the digital coin corresponding to the transaction voucher data is the digital coin corresponding to the native coin string, update the amount of the native coin string according to the transaction voucher data, and delete the transaction voucher data. When the digital coin corresponding to the transaction voucher data is the digital coin corresponding to the native coin string, it can record the transaction voucher data without saving the coin string corresponding to the transaction voucher data, reduce the number of coin strings to be saved, thereby reducing the data interaction volume during digital coin transactions and improving the transaction processing efficiency.

[0073] In one embodiment, before obtaining the transaction coin string owner identifier corresponding to the transaction voucher data, it further includes:

[0074] Obtain the payer's public key;

[0075] Verify the signature of the transaction voucher data according to the payer's public key;

[0076] After the signature verification passes, if it is determined that the transaction voucher data verification passes, proceed to the step of obtaining the identifier of the owner of the transaction coin string corresponding to the transaction voucher data.

[0077] Specifically, after receiving the transaction voucher data, the payee terminal will obtain the public key of the payer stored in advance during the transaction initialization with the payer, and use the public key of the payer to decrypt the latest transaction sub-chain to verify the payer's signature in the latest transaction sub-chain to confirm whether the payer's signature is accurate. When the payer's signature is accurate, it is confirmed that the verification passes, and it is determined that the transaction voucher data verification passes, and proceed to the step of obtaining the identifier of the owner of the transaction coin string corresponding to the transaction voucher data.

[0078] In this embodiment, by obtaining the public key of the payer, the signature verification of the transaction voucher data can be performed using the public key of the payer, so that the verification result of verifying the transaction voucher data can be obtained using the signature verification result.

[0079] In one embodiment, the method further includes:

[0080] Obtain the identifier of the owner of the native coin string corresponding to the native coin string;

[0081] When the identifier of the owner of the transaction coin string is the same as the identifier of the owner of the native coin string, determine that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native coin string.

[0082] Among them, the identifier of the owner of the native coin string refers to the identifier used to identify the native coin string. Each time the operator issues digital currency to the payee, a random owner identifier will be generated and synchronized. This owner identifier is related to the operator, the issuer, and the payee. Through this owner identifier, the source of the digital currency can be located to the payee.

[0083] Specifically, after obtaining the identifier of the owner of the transaction coin string, the payee terminal will use the identifier bit to query in the native coin string to obtain the identifier of the owner of the native coin string corresponding to the native coin string, and compare whether the identifier of the owner of the transaction coin string is the same as the identifier of the owner of the native coin string. When the identifier of the owner of the transaction coin string is the same as the identifier of the owner of the native coin string, determine that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native coin string.

[0084] In this embodiment, obtaining the identifier of the owner of the native coin string corresponding to the native coin string, and when the identifier of the owner of the transaction coin string is the same as the identifier of the owner of the native coin string, determining that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native coin string, can realize the judgment of the source of the digital currency corresponding to the transaction voucher data.

[0085] In one embodiment, when it is determined according to the transaction currency string owner identifier that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native currency string, updating the balance of the native currency string according to the transaction voucher data includes:

[0086] When it is determined according to the transaction currency string owner identifier that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native currency string, obtain the transaction resource amount in the latest transaction sub-chain of the transaction voucher data;

[0087] Update the balance of the native currency string according to the transaction resource amount.

[0088] Specifically, when it is determined according to the transaction currency string owner identifier that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native currency string, the receiving party terminal will obtain the transaction resource amount in the latest transaction sub-chain of the transaction voucher data, and add the transaction resource amount to the balance of the native currency string to update the balance of the native currency string. Among them, the latest transaction sub-chain corresponds to this transaction and is generated by the paying party.

[0089] In this embodiment, by obtaining the transaction resource amount in the latest transaction sub-chain of the transaction voucher data, the balance of the native currency string can be updated using the transaction resource amount.

[0090] In one embodiment, before receiving the transaction voucher data of the digital currency sent by the paying party in response to the transaction payment request, it further includes:

[0091] Receive the transaction initialization request from the paying party;

[0092] Verify the legitimacy of the paying party according to the transaction initialization request;

[0093] When the legitimacy verification passes, feedback the receiving party transaction initialization parameters.

[0094] Specifically, before conducting a transaction, the receiving party needs to conduct transaction initialization with the paying party to exchange the authentication parameters of both parties for subsequent mutual authentication. At this time, the paying party terminal will send a transaction initialization request to the receiving party terminal, carrying the paying party transaction initialization parameters in the transaction initialization request. After receiving the transaction initialization request, the receiving party terminal will use the paying party transaction initialization parameters to verify the legitimacy of the paying party, and after the verification passes, return the corresponding receiving party transaction initialization parameters to complete the transaction initialization.

[0095] Among them, the paying party transaction initialization parameters include the paying party certificate, and verifying the legitimacy of the paying party mainly refers to the receiving party terminal using the stored CA (Certificate Authority) root certificate to verify the paying party certificate.

[0096] In this embodiment, by receiving a transaction initialization request from the payer, validating the legality of the payer according to the transaction initialization request, and feeding back the transaction initialization parameters of the payee when the legality verification passes, transaction initialization can be achieved.

[0097] In one embodiment, the method further includes:

[0098] Responding to a payment request for the payer to determine the amount of resources to be traded;

[0099] Generating a transaction sub-chain according to the amount of resources to be traded;

[0100] Generating and sending expenditure voucher data to the payer's terminal according to the transaction sub-chain.

[0101] Specifically, when it is necessary to make a payment to the payer, the payee's terminal will respond to the payment request for the payer, determine the amount of resources to be traded, confirm whether the current transaction is feasible according to the amount of resources to be traded. When the current transaction is feasible, deduct the amount of resources to be traded from the balance to obtain a balance voucher, generate a transaction sub-chain according to the amount of resources to be traded, generate and send expenditure voucher data to the payer's terminal according to the transaction sub-chain. After receiving the expenditure voucher, the payer will add the current amount of resources to be traded to the expenditure voucher as the balance to form its own new balance voucher.

[0102] In this embodiment, by responding to a payment request for the payer, determining the amount of resources to be traded, generating a transaction sub-chain according to the amount of resources to be traded, and generating and sending expenditure voucher data to the payer's terminal according to the transaction sub-chain, payment to the payer can be achieved.

[0103] In one embodiment, taking the payee's terminal A paying digital currency to the payer's terminal B and then the payer's terminal B refunding to the payee's terminal A as an example, the coin string merging method and its effect of this application are described.

[0104] First, the existing technical solutions are described below:

[0105] There are two hardware wallets, namely the payee's terminal A and the payer's terminal B. Among them, the payee's terminal A is a native DC with an initial amount of 100 yuan. The payee's terminal A pays 10 yuan to the payer's terminal B. After the transaction, the balance voucher of the payee's terminal A is:

[0106] Native DC(A) 90

[0107] The balance voucher of the payer's terminal B is:

[0108] Native DC(A) Transaction Sub-chain L(1)1 10

[0109] This corresponds to the payment to the payee in the above embodiment. The payee terminal A responds to the payment request from the payer, determines the amount of resources to be traded (10 yuan), generates a transaction sub-chain based on the amount of resources to be traded, and generates and sends expenditure voucher data to the payer terminal B according to the transaction sub-chain.

[0110] At this time, if a refund occurs, assuming the refund amount is 10 yuan, the payer terminal B pays 10 yuan to the payee terminal A. After the transaction, the balance voucher of the payer terminal B is:

[0111] Native DC(A) Transaction Sub-chain L(1)1 0

[0112] The balance voucher corresponding to the payee terminal A is:

[0113] Native DC(A) Transaction Sub-chain L(1)1 Transaction Sub-chain L((1)1)1 10

[0114] At this time, the payee terminal A stores two coin strings internally, which are:

[0115]

[0116]

[0117] After multiple offline payment and receipt operations, multiple coin strings will be stored in the payee terminal A, and each coin string will have multiple transaction chains. This increases the internal storage space, increases the data interaction in operations such as transactions, synchronization, and recharge, prolongs the operation time, affects the user experience, and directly increases the probability of communication anomalies (such as NFC card movement, Bluetooth connection failure, etc.) due to the increased operation time. At the same time, the more coin strings and transaction chains there are, the directly increases the complexity of code processing, and the probability of bugs increases accordingly.

[0118] If the coin string merging method provided by the present application is adopted, after the payee terminal A receives the transaction voucher data of the digital currency sent by the payer terminal B in response to the transaction payment request, it will obtain the transaction coin string owner identifier corresponding to the transaction voucher data. When it is determined according to the transaction coin string owner identifier that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native coin string, the balance of the native coin string is updated according to the transaction voucher data, and the transaction voucher data is deleted. In this way, it can be realized that while recording the transaction voucher data, the coin string corresponding to the transaction voucher data is no longer saved, reducing the number of coin strings to be saved, thereby reducing the data interaction volume during digital currency transactions and improving the transaction processing efficiency.

[0119] Specifically, if a refund occurs, assuming the refund amount is 10 yuan, the payer terminal B pays 10 yuan to the payee terminal A. After the transaction, when the payee terminal A confirms that the digital currency is the native currency, its balance voucher will become:

[0120] Native DC(A) 100

[0121] Only retain this native coin string.

[0122] In one embodiment, as Figure 3 shown, the coin string merging method of the present application is illustrated by a process schematic diagram, and the coin string merging method specifically includes the following steps:

[0123] Step 302, receive the transaction initialization request of the payer;

[0124] Step 304, perform a legality verification on the payer according to the transaction initialization request;

[0125] Step 306, when the legality verification passes, feedback the transaction initialization parameters of the payee;

[0126] Step 308, in response to the payment request for the payer, determine the amount of resources to be traded;

[0127] Step 310, generate a transaction sub-chain according to the amount of resources to be traded;

[0128] Step 312, generate and send the expenditure voucher data to the payer's terminal according to the transaction sub-chain;

[0129] Step 314, receive the transaction voucher data of the digital currency sent by the payer in response to the transaction payment request;

[0130] Step 316, obtain the public key of the payer;

[0131] Step 318, perform a signature verification on the transaction voucher data according to the public key of the payer;

[0132] Step 320, when the signature verification passes, determine that the transaction voucher data verification passes;

[0133] Step 322, obtain the transaction coin string owner identifier corresponding to the transaction voucher data;

[0134] Step 324, obtain the native coin string owner identifier corresponding to the native coin string;

[0135] Step 326, when the transaction coin string owner identifier is the same as the native coin string owner identifier, determine that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native coin string;

[0136] Step 328, when it is determined that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native coin string according to the transaction coin string owner identifier, obtain the amount of transaction resources in the latest transaction sub-chain of the transaction voucher data;

[0137] Step 330: Update the balance of the native coin string according to the transaction resource quantity and delete the transaction voucher data.

[0138] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above-described 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 in turn with at least some of the steps or stages in other steps or other steps.

[0139] Based on the same inventive concept, an embodiment of the present application also provides a coin string merging device for implementing the coin string merging method described above. 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 coin string merging device provided below can refer to the limitations on the coin string merging method in the above text and will not be repeated here.

[0140] In one embodiment, as Figure 4 shown, a coin string merging device is provided, including: a receiving module 402, an obtaining module 404, and a processing module 406, where:

[0141] The receiving module 402 is configured to receive the transaction voucher data of the digital currency sent by the payer in response to the transaction payment request;

[0142] The obtaining module 404 is configured to obtain the transaction coin string owner identifier corresponding to the transaction voucher data;

[0143] The processing module 406 is configured to, when it is determined according to the transaction coin string owner identifier that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native coin string, update the balance of the native coin string according to the transaction voucher data and delete the transaction voucher data.

[0144] The above coin string merging device, after receiving the transaction voucher data of digital currency sent by the payer in response to a transaction payment request, obtains the transaction coin string owner identifier corresponding to the transaction voucher data. When it is determined that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native coin string according to the transaction coin string owner identifier, the amount of the native coin string is updated according to the transaction voucher data, and the transaction voucher data is deleted. When the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native coin string, it can record the transaction voucher data and does not need to save the coin string corresponding to the transaction voucher data, reducing the number of coin strings to be saved, thereby reducing the data interaction volume during digital currency transactions and improving the transaction processing efficiency.

[0145] In one embodiment, the coin string merging device further includes a verification module. The verification module is used to obtain the payer's public key, perform signature verification on the transaction voucher data according to the payer's public key. When the signature verification passes, it is determined that the transaction voucher data verification passes, and the step of obtaining the transaction coin string owner identifier corresponding to the transaction voucher data is entered.

[0146] In one embodiment, the processing module is further used to obtain the native coin string owner identifier corresponding to the native coin string. When the transaction coin string owner identifier is consistent with the native coin string owner identifier, it is determined that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native coin string.

[0147] In one embodiment, the processing module is further used to, when it is determined that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native coin string according to the transaction coin string owner identifier, obtain the transaction resource amount in the latest transaction sub-chain of the transaction voucher data, and update the balance of the native coin string according to the transaction resource amount.

[0148] In one embodiment, the verification module is further used to receive the payer's transaction initialization request, perform legality verification on the payer according to the transaction initialization request. When the legality verification passes, the payee's transaction initialization parameters are fed back.

[0149] In one embodiment, the coin string merging device further includes a payment module. The payment module is used to respond to the payment request for the payer, determine the transaction resource amount to be traded, generate a transaction sub-chain according to the transaction resource amount, and generate and send expenditure voucher data to the payer's terminal according to the transaction sub-chain.

[0150] Each module in the above coin string merging device can be implemented in whole or in part by software, hardware, and their combination. The above 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 as to facilitate the processor to call and execute the operations corresponding to the above modules.

[0151] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in Figure 5 . The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system 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 communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner. The wireless manner can be implemented 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 method for merging coin strings. The display screen of the computer device 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 covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.

[0152] Those skilled in the art can understand that Figure 5 the structure shown in is only a block diagram of some 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 different component arrangements.

[0153] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented:

[0154] Receiving the transaction voucher data of the digital currency sent by the payer in response to the transaction payment request;

[0155] Obtaining the transaction coin string owner identifier corresponding to the transaction voucher data;

[0156] When it is determined according to the transaction coin string owner identifier that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native coin string, updating the balance of the native coin string according to the transaction voucher data and deleting the transaction voucher data.

[0157] In one embodiment, when the processor executes the computer program, the following steps are further implemented: obtaining the public key of the payer, performing signature verification on the transaction voucher data according to the public key of the payer, and when the signature verification passes, determining that the transaction voucher data verification passes and entering the step of obtaining the transaction coin string owner identifier corresponding to the transaction voucher data.

[0158] In one embodiment, when the processor executes the computer program, the following steps are further implemented: obtaining the native coin string owner identifier corresponding to the native coin string, and when the trading coin string owner identifier is consistent with the native coin string owner identifier, determining that the digital coin corresponding to the trading voucher data is the digital coin corresponding to the native coin string.

[0159] In one embodiment, when the processor executes the computer program, the following steps are further implemented: when it is determined that the digital coin corresponding to the trading voucher data is the digital coin corresponding to the native coin string according to the trading coin string owner identifier, obtaining the trading resource amount in the latest trading sub-chain of the trading voucher data, and updating the balance of the native coin string according to the trading resource amount.

[0160] In one embodiment, when the processor executes the computer program, the following steps are further implemented: receiving a trading initialization request from the payer, performing a legality verification on the payer according to the trading initialization request, and when the legality verification passes, feeding back the trading initialization parameters of the payee.

[0161] In one embodiment, when the processor executes the computer program, the following steps are further implemented: responding to a payment request for the payer, determining the amount of resources to be traded, generating a trading sub-chain according to the amount of resources to be traded, and generating and sending expenditure voucher data to the payer's terminal according to the trading sub-chain.

[0162] 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 following steps are implemented:

[0163] Receiving the trading voucher data of the digital coin sent by the payer in response to the trading payment request;

[0164] Obtaining the trading coin string owner identifier corresponding to the trading voucher data;

[0165] When it is determined that the digital coin corresponding to the trading voucher data is the digital coin corresponding to the native coin string according to the trading coin string owner identifier, updating the balance of the native coin string according to the trading voucher data and deleting the trading voucher data.

[0166] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: obtaining the public key of the payer, performing a signature verification on the trading voucher data according to the public key of the payer, and when the signature verification passes, determining that the trading voucher data verification passes and entering the step of obtaining the trading coin string owner identifier corresponding to the trading voucher data.

[0167] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: obtaining the native coin string owner identifier corresponding to the native coin string, and when the trading coin string owner identifier is consistent with the native coin string owner identifier, determining that the digital coin corresponding to the trading voucher data is the digital coin corresponding to the native coin string.

[0168] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: when it is determined according to the owner identifier of the transaction currency string that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native currency string, obtain the transaction resource amount in the latest transaction sub-chain of the transaction voucher data, and update the balance of the native currency string according to the transaction resource amount.

[0169] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: receive a transaction initialization request from a payer, verify the legality of the payer according to the transaction initialization request, and when the legality verification passes, feedback the transaction initialization parameters of the payee.

[0170] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: respond to a payment request for a payer, determine the amount of resources to be traded, generate a transaction sub-chain according to the amount of resources to be traded, and generate and send expenditure voucher data to the payer's terminal according to the transaction sub-chain.

[0171] In one embodiment, a computer program product is provided, including a computer program, which when executed by a processor implements the following steps:

[0172] Receive the transaction voucher data of the digital currency sent by the payer in response to the transaction payment request;

[0173] Obtain the owner identifier of the transaction currency string corresponding to the transaction voucher data;

[0174] When it is determined according to the owner identifier of the transaction currency string that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native currency string, update the balance of the native currency string according to the transaction voucher data, and delete the transaction voucher data.

[0175] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: obtain the public key of the payer, verify the signature of the transaction voucher data according to the public key of the payer, and when the signature verification passes, determine that the transaction voucher data verification passes, and enter the step of obtaining the owner identifier of the transaction currency string corresponding to the transaction voucher data.

[0176] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: obtain the owner identifier of the native currency string corresponding to the native currency string, and when the owner identifier of the transaction currency string is the same as the owner identifier of the native currency string, determine that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native currency string.

[0177] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: when it is determined according to the transaction coin string owner identifier that the digital coin corresponding to the transaction voucher data is the digital coin corresponding to the native coin string, obtain the transaction resource amount in the latest transaction sub-chain of the transaction voucher data, and update the balance of the native coin string according to the transaction resource amount.

[0178] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: receive a transaction initialization request from the payer, verify the legitimacy of the payer according to the transaction initialization request, and when the legitimacy verification passes, feedback the transaction initialization parameters of the payee.

[0179] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: respond to the payment request for the payer, determine the transaction resource amount to be transacted, generate a transaction sub-chain according to the transaction resource amount, and generate and send expenditure voucher data to the payer terminal according to the transaction sub-chain.

[0180] 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 processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.

[0181] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise 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 described in this specification.

[0182] The above-described embodiments merely 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 merging coin strings, characterized in that, including: Receiving the transaction voucher data of the digital currency sent by the payee in response to the transaction payment request, where the transaction voucher data is generated by removing the balance from the balance voucher of the payee's digital wallet and adding the new transaction sub-chain of this transaction; After verifying the payee's signature in the transaction voucher data using the payee's public key initialized in advance, obtaining the transaction currency string owner identifier corresponding to the transaction voucher data, and determining whether the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native currency string through the transaction currency string owner identifier; When it is determined that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native currency string according to the transaction currency string owner identifier, obtaining the transaction resource amount of the latest transaction sub-chain of the transaction voucher data, updating the balance of the native currency string using the transaction resource amount, recording the currency string corresponding to the transaction voucher data, and deleting the transaction voucher data.

2. The method according to claim 1, characterized in that Verifying the payee's signature in the transaction voucher data using the payee's public key initialized in advance further includes: Obtaining the payee's public key; Decrypting the latest transaction sub-chain of the transaction voucher data using the payee's public key to verify the payee's signature in the latest transaction sub-chain; When it is determined that the payee's signature is accurate and the signature verification is passed, determining that the transaction voucher data verification is passed.

3. The method according to claim 1, wherein It also includes: Obtaining the native currency string owner identifier corresponding to the native currency string; When the transaction currency string owner identifier is the same as the native currency string owner identifier, determining that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native currency string.

4. The method according to claim 3, wherein Obtaining the native currency string owner identifier corresponding to the native currency string includes: The owner identifier randomly generated and synchronously sent by the operator each time when distributing digital currency to the payee is used to locate the source of the payee of the digital currency; According to the obtained transaction currency string owner identifier, querying in the native currency string using the owner identifier bit to obtain the native currency string owner identifier corresponding to the native currency string; When comparing that the transaction currency string owner identifier is the same as the native currency string owner identifier, determining that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native currency string.

5. The method according to claim 1, wherein Before receiving the transaction voucher data of the digital currency sent by the payee in response to the transaction payment request, it further includes: Receiving the transaction initialization request of the payee; According to the transaction initialization request, verifying the legitimacy of the payee; When the legitimacy verification is passed, feedbacking the transaction initialization parameters of the payee.

6. The method according to claim 1, wherein It also includes: Responding to the payment request of the payee, determining the transaction resource amount to be traded; Generating a transaction sub-chain according to the transaction resource amount to be traded.

7. A coin string merging device, characterized in that, The device includes: A receiving module, configured to receive the transaction voucher data of the digital currency sent by the payee in response to the transaction payment request, where the transaction voucher data is generated by removing the balance from the balance voucher of the payee's digital wallet and adding the new transaction sub-chain of this transaction; An obtaining module, configured to obtain the transaction currency string owner identifier corresponding to the transaction voucher data after verifying the payee's signature in the transaction voucher data using the payee's public key initialized in advance, and determining whether the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native currency string through the transaction currency string owner identifier; A processing module, configured to obtain the transaction resource amount of the latest transaction sub-chain of the transaction voucher data when determining that the digital currency corresponding to the transaction voucher data is the digital currency corresponding to the native currency string according to the owner identifier of the transaction currency string, update the balance of the native currency string by using the transaction resource amount, record the currency string corresponding to the transaction voucher data, and delete the transaction voucher data.

8. 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, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Offline transaction method and system for digital currency

    CN111523869A

  • Transaction voucher generation, verification and storage method, device, equipment and system

    CN113052599A