Off-line payment authorization method and device, off-line payment method and device and collection method and device
By generating and issuing user certificates and granting offline accounts to make offline payments within the preset amount, the problem of early activation and recharge in the existing technology is solved, and convenient offline payment is achieved in the absence of network.
Patent Information
- Application Number
- CN202411702302.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-27
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2041-09-27
AI Technical Summary
The existing offline wallet payment solution requires early activation and recharge when the terminal device is in the networked state, which limits its practical application scenarios in the networkless state.
By detecting the current status of the target electronic wallet account, generating and issuing user certificates, granting offline accounts the permission to make offline payments within the preset amount, and avoiding early recharge.
It realizes that the terminal equipment makes offline payments without networking without the need for early recharge, improving the convenience and applicability of offline payment.
Smart Images

Figure CN119624443A_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application with application number 2021111475911 filed on September 27, 2021, and named “A method and device for offline payment authorization, offline payment, and collection”. Technical Field
[0002] The present invention relates to the field of electronic payment technology, and in particular to an offline payment authorization, offline payment, and a payment collection method and device for an offline device. Background Art
[0003] Using offline wallets to pay without an Internet connection (offline payment) is an important supplement to online payment. The offline state usually occurs in specific scenarios, such as on airplanes, in basements, and in mountainous areas.
[0004] At present, the offline wallet payment solutions all require that the offline wallet be activated (i.e., an offline account be opened) when the terminal device is connected to the Internet and a certain amount of money be "recharged" into the offline wallet. Then, when the terminal device is offline, the user can use the offline wallet payment service.
[0005] However, activating the offline wallet in advance and recharging it has certain usage limitations for the actual scenario application of offline wallet payment. Summary of the invention
[0006] One or more embodiments of the present specification provide an offline payment authorization, offline payment, and a payment collection method and apparatus for an offline device to implement authorization of an offline payment function without advance recharge.
[0007] According to a first aspect, an offline payment authorization method is provided, which is applied to a server, and the method comprises:
[0008] When it is detected that the current state of the target electronic wallet account meets the preset certificate issuance condition, the wallet account information, current account balance and current credit information of the target electronic wallet account are obtained;
[0009] Determine a corresponding offline payment limit based on the current account balance and the current credit information;
[0010] Using the server private key, the summary information is signed to obtain an electronic wallet signature, wherein the summary information includes the wallet account information, the offline payment limit, the issuance time, and the validity period;
[0011] Generate a user certificate based on the summary information and the electronic wallet signature;
[0012] The user certificate is issued to the terminal device where the target electronic wallet account is located, so that the offline account corresponding to the target electronic wallet account can make offline payments within the offline payment limit based on the user certificate.
[0013] In one possible implementation, the preset certificate issuance condition includes at least one of the following conditions: the obtained user certificate of the target electronic wallet account has expired, and the terminal device is in a networked state;
[0014] During a first period before the expiration of the obtained user certificate, the terminal device is in a networked state;
[0015] In a second period before the expiration of the obtained user certificate, the traffic usage status of the terminal device meets a preset idle condition;
[0016] The current account balance of the target electronic wallet account and / or the current credit information change meets certain conditions;
[0017] The target electronic wallet account has not obtained a user certificate, and the traffic usage status of the terminal device meets a preset idle condition.
[0018] In one possible implementation, the wallet account information is: a hash value of the wallet account ID and wallet account name information corresponding to the target electronic wallet account.
[0019] In one possible implementation, the current credit information includes at least one of the following information: a current credit value and a current loanable amount.
[0020] In one possible implementation, the terminal device is provided with a trusted execution environment TEE;
[0021] The sending of the user certificate to the terminal device where the target electronic wallet account is located includes:
[0022] The user certificate is sent to the TEE of the terminal device so that the terminal device stores the user certificate in the TEE.
[0023] In one possible implementation, the determining the corresponding offline payment limit based on the current account balance and the current credit information includes:
[0024] Determining a current score of the target electronic wallet account based on the current account balance, the current credit information and their respective corresponding weights;
[0025] Based on the current score, an offline payment limit corresponding to the target electronic wallet account is determined.
[0026] In one possible implementation, determining the offline payment amount corresponding to the target electronic wallet account based on the current score includes:
[0027] Based on a preset first correspondence between the account score and the credit limit level, determining a current credit limit level corresponding to the current score;
[0028] Based on a preset second correspondence between the credit limit level and the credit limit value, the credit limit value corresponding to the current credit limit level is determined as the offline payment limit.
[0029] In one possible implementation, it also includes:
[0030] Obtaining an offline bill sent by the terminal device, wherein the offline bill is a bill generated by offline payment of the offline account, and at least includes a corresponding transaction amount and the wallet account information;
[0031] Based on the transaction amount and the wallet account information, deduct a corresponding amount from the target electronic wallet account;
[0032] The limit restoration information is sent to the terminal device so that the current upper limit of offline payment of the offline account is restored to the offline payment limit.
[0033] In one possible implementation, the offline bill further includes: corresponding merchant account information and merchant signature, where the merchant signature is obtained by signing the merchant account information and the transaction amount using the merchant private key;
[0034] The deducting a corresponding amount from the target electronic wallet account based on the transaction amount and the wallet account information includes:
[0035] Verifying the offline bill using the merchant public key corresponding to the merchant private key;
[0036] If the verification is successful, a corresponding amount is deducted from the target electronic wallet account based on the transaction amount and the wallet account information.
[0037] According to a second aspect, an offline payment method is provided, which is applied to a terminal device, wherein the terminal device stores a user certificate issued by a server, wherein the user certificate includes at least an offline payment amount, an issuance time, a validity period, and an electronic wallet signature, and the method includes:
[0038] When receiving an offline payment instruction, determining whether the current transaction amount carried in the offline payment instruction is not greater than the upper limit of the current offline payment, wherein the upper limit of the current offline payment is determined based on the offline payment amount and the historical offline transaction amount;
[0039] If it is determined that the current transaction amount is not greater than the upper limit of the current offline payment, providing the user certificate to a payment receiving device corresponding to the offline payment instruction;
[0040] Obtaining transaction confirmation information provided by the payment receiving device, wherein the transaction confirmation information is sent by the payment receiving device when the user certificate is determined to be valid based on the electronic wallet signature;
[0041] An offline bill is generated based on the transaction confirmation information.
[0042] In one possible implementation, the terminal device includes a trusted execution environment TEE, the user certificate is stored in the TEE, and the method is executed in the TEE.
[0043] In one possible implementation, it also includes:
[0044] Determining whether the user certificate is valid based on the time of receipt of the offline payment instruction, the time of issuance and the validity period of the user certificate;
[0045] If it is determined that the user certificate is valid, the user certificate is provided to the payment device.
[0046] In one possible implementation, it also includes:
[0047] Calculating the difference between the current offline payment upper limit and the current transaction amount;
[0048] The difference is determined as the new upper limit of the current offline payment.
[0049] In one possible implementation, it also includes:
[0050] When in an online state, the offline bill is sent to the server, so that the server performs settlement based on the offline bill.
[0051] In one possible implementation manner, obtaining the transaction confirmation information provided by the payment device includes:
[0052] The transaction confirmation information provided by the payment device is obtained through short-distance transmission.
[0053] In one possible implementation, the transaction confirmation information includes: the merchant account information of the merchant, the current transaction amount and the merchant signature, and the merchant signature is obtained by signing the merchant account information and the current transaction amount using the merchant private key;
[0054] The generating an offline bill based on the transaction confirmation information includes:
[0055] Verifying the transaction confirmation information based on the merchant public key corresponding to the merchant private key;
[0056] If the verification is successful, an offline bill is generated based on the merchant account information, the current transaction amount and the wallet account information.
[0057] According to a third aspect, a payment collection method for an offline device is provided, which is applied to a payment collection device, and the method comprises:
[0058] Obtain a user certificate provided by an offline terminal device, wherein the user certificate is issued by a server and includes: wallet account information of an electronic wallet account corresponding to the terminal device, an amount that can be paid offline, the issuance time and validity period of the user certificate, and an electronic wallet signature;
[0059] Verifying the electronic wallet signature using the public key of the server;
[0060] If the verification is successful, judging whether the user certificate is valid based on the transaction time of this transaction, the issuance time and the validity period;
[0061] If the user certificate is determined to be valid, generating transaction confirmation information corresponding to the transaction;
[0062] The transaction confirmation information is provided to the terminal device, so that the terminal device generates a corresponding offline bill based on the transaction confirmation information.
[0063] In one possible implementation, the transaction confirmation information includes at least: the merchant account information of the merchant, the transaction amount of this transaction and the merchant signature, and the merchant signature is obtained by signing the merchant account information and the current transaction amount using the merchant private key.
[0064] In one possible implementation, providing the transaction confirmation information to the terminal device includes:
[0065] The transaction confirmation information is provided to the terminal device through a short-distance transmission method.
[0066] In one possible implementation, it also includes:
[0067] If the user certificate is determined to be invalid, generating transaction failure information;
[0068] The transaction failure information is provided to the terminal device.
[0069] According to a fourth aspect, an offline payment authorization device is provided, which is applied to a server, and the device includes:
[0070] A first obtaining module is configured to obtain wallet account information, current account balance and current credit information of the target electronic wallet account when it is detected that the current state of the target electronic wallet account meets the preset certificate issuance condition;
[0071] A first determination module, configured to determine a corresponding offline payment limit based on the current account balance and the current credit information;
[0072] A first signature module is configured to use a server private key to sign the summary information to obtain an electronic wallet signature, wherein the summary information includes the wallet account information, the offline payment limit, the issuance time, and the validity period;
[0073] A first generating module, configured to generate a user certificate based on the summary information and the electronic wallet signature;
[0074] The first sending module is configured to send the user certificate to the terminal device where the target electronic wallet account is located, so that the offline account corresponding to the target electronic wallet account can make offline payments within the offline payment limit based on the user certificate.
[0075] According to a fifth aspect, an offline payment device is provided, which is applied to a terminal device, wherein the terminal device stores a user certificate issued by a server, wherein the user certificate includes at least an offline payment amount, an issuance time, a validity period, and an electronic wallet signature, and the device includes:
[0076] A first judgment module is configured to, upon receiving an offline payment instruction, judge whether a current transaction amount carried in the offline payment instruction is not greater than an upper limit of a current offline payment, wherein the upper limit of the current offline payment is determined based on the available offline payment amount and a historical offline transaction amount;
[0077] A first providing module is configured to provide the user certificate to a payment receiving device corresponding to the offline payment instruction if it is determined that the current transaction amount is not greater than the upper limit of the current offline payment;
[0078] A second obtaining module is configured to obtain transaction confirmation information provided by the payment receiving device, wherein the transaction confirmation information is sent by the payment receiving device when the user certificate is determined to be valid based on the electronic wallet signature;
[0079] The second generating module is configured to generate an offline bill based on the transaction confirmation information.
[0080] According to a sixth aspect, a payment collection device for an offline device is provided, which is applied to a payment collection device, and the device includes:
[0081] Obtain a user certificate provided by an offline terminal device, wherein the user certificate is issued by a server and includes: wallet account information of an electronic wallet account corresponding to the terminal device, an amount that can be paid offline, the issuance time and validity period of the user certificate, and an electronic wallet signature;
[0082] A third obtaining module is configured to verify the electronic wallet signature using the public key of the server;
[0083] A second judgment module is configured to judge whether the user certificate is valid based on the transaction time of this transaction, the issuance time and the validity period if the verification is passed;
[0084] A third generating module is configured to generate transaction confirmation information corresponding to the transaction when it is determined that the user certificate is valid;
[0085] The second providing module is configured to provide the transaction confirmation information to the terminal device, so that the terminal device generates a corresponding offline bill based on the transaction confirmation information.
[0086] According to a seventh aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the method described in the first aspect.
[0087] According to an eighth aspect, a computing device is provided, comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method described in the first aspect is implemented.
[0088] According to a ninth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the method described in the second aspect.
[0089] According to the tenth aspect, a computing device is provided, comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method described in the second aspect is implemented.
[0090] According to the eleventh aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the method described in the third aspect.
[0091] According to the twelfth aspect, a computing device is provided, comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method described in the third aspect is implemented.
[0092] According to the method and device provided in the embodiments of this specification, when the current state of the target electronic wallet account meets the preset certificate issuance conditions, the wallet account information, current account balance and current credit information of the target electronic wallet account are used to generate a user certificate corresponding to the target electronic wallet account including the offline payment limit, and the certificate is issued to the terminal device where the target electronic wallet account is located, so that the offline account corresponding to the target electronic wallet account can make offline payments within the offline payment limit based on the user certificate, that is, the offline payment authorization of the offline account is realized through the user certificate, so that the offline account does not need to be recharged in advance, that is, there is no need to deposit working capital in advance, and offline payments within the offline payment limit can be realized. In addition, when the user certificate is issued for the target electronic wallet account for the first time, it is also possible to implement the offline account corresponding to the target electronic wallet account without opening (that is, without activating the corresponding hardware wallet), and realize the offline payment function authorization of the offline account without opening and pre-recharging. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0094] Figure 1 A schematic diagram of an implementation framework of an embodiment disclosed in this specification;
[0095] Figure 2 A flowchart of an offline payment authorization method provided in an embodiment;
[0096] Figure 3 A schematic diagram of a flow chart of an offline payment method provided in an embodiment;
[0097] Figure 4 A schematic diagram of a flow chart of a payment collection method for an offline device provided in an embodiment;
[0098] Figure 5 A schematic block diagram of an offline payment authorization device provided in an embodiment;
[0099] Figure 6 A schematic block diagram of an offline payment device provided in an embodiment;
[0100] Figure 7 A schematic block diagram of a payment collection device for an offline device provided in an embodiment. DETAILED DESCRIPTION
[0101] The technical solutions of the embodiments of this specification will be described in detail below with reference to the accompanying drawings.
[0102] The embodiments of this specification disclose an offline payment authorization method and device, an offline payment method and device, and a payment collection method and device for an offline device. The application scenario and inventive concept of the offline payment authorization method are first introduced below, as follows:
[0103] At present, the payment schemes using offline wallets all require that the offline wallet be activated (i.e., an offline account be opened) when the terminal device is connected to the Internet and a certain amount of money be "recharged" into the offline wallet. Then, when the terminal device is offline, the user can use the offline payment service provided by the offline wallet.
[0104] Users often do not form a habit of activating offline wallets and recharging in advance, or they are not sure in advance that they need offline payment services. In an exemplary scenario: when a user is on an airplane, he needs to buy something. At this time, the user's terminal device is off-line. The user needs to use the offline wallet payment service and needs to "recharge" the money to the activated offline wallet in advance when the terminal device is connected to the Internet. However, they often do not anticipate in advance that they will buy things on the plane and recharge their offline wallets in advance. Accordingly, activating and recharging offline wallets in advance has certain usage restrictions on actual scenario applications.
[0105] In view of this, the embodiments of this specification provide an authorization method for offline payment, such as Figure 1 FIG. 1 is a schematic diagram of an implementation framework of an embodiment disclosed in this specification, wherein the server can detect the current status of multiple electronic wallet accounts, such as Figure 1 As shown, multiple electronic wallet accounts may include electronic wallet account 1, electronic wallet account 2...electronic wallet account n, and the electronic wallet account is an account of an electronic wallet application, which runs on a terminal device. Electronic wallet applications may include but are not limited to applications that can support online payment functions, such as Alipay wallet applications, mobile wallet applications, and bank terminal applications. Among them, in order to support offline payment functions, the terminal device is also provided with a hardware wallet application, which may exist in the form of a plug-in of the electronic wallet application or in the form of an independent client software. In the case where the hardware wallet application exists in the form of an independent client software, the electronic wallet application may be bound to the hardware wallet application so that the hardware wallet application can make offline payments based on user certificates. In one implementation, the hardware wallet application may be an offline wallet application based on a mobile phone, an offline wallet application based on a mobile phone SIM by operators such as China Mobile and China Unicom, and an offline wallet application based on payment card hardware by various card merchants.
[0106] The server can detect the status of the electronic wallet account through its status detection module, such as Figure 1 As shown, when the server detects that the current state of the electronic wallet account 1 meets the preset certificate issuance conditions, the electronic wallet account 1 is used as the target electronic wallet account, and the wallet account information, current account balance and current credit information of the target electronic wallet account are obtained through its first acquisition module; the offline payment limit corresponding to the target electronic wallet account is determined through its first determination module based on the current account balance and current credit information; the summary information is signed by the server private key through its first signature module to obtain the electronic wallet signature, and the summary information includes the wallet account information, the offline payment limit, the issuance time and the validity period; the user certificate corresponding to the target electronic wallet account is generated through its first generation module based on the summary information and the electronic wallet signature; the user certificate is issued to the terminal device where the target electronic wallet account is located through its first sending module, so that the offline account corresponding to the target electronic wallet account can make offline payments within the offline payment limit based on the user certificate. Among them, the offline account is an account that logs in to the hardware wallet application, and offline payments can be made through the hardware wallet application.
[0107] In one implementation, the preset certificate issuance condition includes at least one of the following conditions: 1. The obtained user certificate of the target electronic wallet account has expired, and the terminal device is in an online state; 2. The first period before the expiration of the obtained user certificate, and the terminal device is in an online state; 3. The second period before the expiration of the obtained user certificate, and the traffic usage status of the terminal device meets the preset idle condition; 4. The current account balance and / or current credit information change of the target electronic wallet account meets certain conditions; 5. The target electronic wallet account has never obtained a user certificate, and the traffic usage status of the terminal device meets the preset idle condition. Among them, the second period is greater than the first period.
[0108] In this embodiment, the server can evaluate the corresponding offline payment limit based on the current account balance and current credit information of the target electronic wallet account, and then generate a user certificate with a validity period, and send the user certificate to the terminal device where the target electronic wallet account is located, so that the offline account corresponding to the target electronic wallet account can make offline payments within the offline payment limit based on the user certificate, that is, the offline payment authorization of the offline account is realized through the user certificate, so that the offline account does not need to be recharged in advance, that is, there is no need to deposit working capital in advance, and offline payments within the offline payment limit can be realized. In addition, when the user certificate is issued for the target electronic wallet account for the first time, it is also possible to implement the offline account corresponding to the target electronic wallet account without opening (that is, without activating the corresponding hardware wallet), and realize the offline payment function authorization without opening and pre-recharging of the offline account.
[0109] In combination with specific embodiments, the offline payment authorization method, offline payment method, and payment collection method for offline devices provided in this specification are described in detail below. First, the offline payment authorization method is described.
[0110] Figure 2 A flowchart of an offline payment authorization method in one embodiment of the present specification is shown. The method can be implemented by a server, wherein the server can be implemented by any device, equipment, platform, device cluster, etc. with computing and processing capabilities. The method includes the following steps S210-S250:
[0111] S210: When it is detected that the current state of the target electronic wallet account meets the preset certificate issuance conditions, the wallet account information, current account balance and current credit information of the target electronic wallet account are obtained. The target electronic wallet account can be any electronic wallet account whose current state meets the preset certificate issuance conditions. The electronic wallet account is an account of an electronic wallet application, which runs on a terminal device. Electronic wallet applications include but are not limited to applications that can support payment functions such as Alipay wallet applications, mobile wallet applications, and bank terminal applications. The server is a server corresponding to the electronic wallet application.
[0112] In one implementation, to prevent the leakage of the private information of the target electronic wallet account, the wallet account information may be: a hash value of the wallet account ID and the wallet account name information corresponding to the target electronic wallet account. For example, it may be the MD5 value of the wallet account ID and the wallet account name information. The current credit information may represent the credit information corresponding to the target electronic wallet account, and the current credit information may include at least one of the following information: the current credit value and the current loanable amount.
[0113] In an exemplary scenario, the electronic wallet application is an Alipay wallet application, and the target electronic wallet account is an Alipay wallet account. Accordingly, the wallet account information may be: a hash value of the Alipay wallet account ID and the Alipay wallet account name information; the current account balance may be the current user balance of the Alipay wallet; the current credit value may be the current Sesame Credit value; and the current loanable limit may be the current Huabei limit.
[0114] In one implementation, the preset certificate issuance condition includes at least one of the following conditions: 1. The obtained user certificate of the target electronic wallet account expires, and the terminal device is in an online state; 2. The first period before the expiration of the obtained user certificate, and the terminal device is in an online state; 3. The second period before the expiration of the obtained user certificate, and the traffic usage status of the terminal device meets the preset idle condition; 4. The current account balance and / or current credit information change of the target electronic wallet account meets certain conditions; 5. The target electronic wallet account has never obtained a user certificate, and the traffic usage status of the terminal device meets the preset idle condition. Among them, the second period is greater than the first period.
[0115] It is understandable that the preset certificate issuance conditions listed above are only provided as an example in the embodiments of this specification. The staff can set specific preset certificate issuance conditions according to actual needs, and the embodiments of this specification do not limit them. For example: the preset certificate issuance conditions can also include: the target electronic wallet account has not obtained a user certificate, its current account balance and / or current credit information meet the preset conditions (such as the current credit value in the current credit information exceeds a certain credit value, or the current loanable amount in the current credit information exceeds a certain amount, or the current account balance is not zero, etc.), and the terminal device is in an online state.
[0116] When it is detected that the current status of the target electronic wallet account meets any of the preset certificate issuance conditions, it can be considered that its current status meets the preset certificate issuance conditions, and then the server obtains the wallet account information, current account balance and current credit information of the target electronic wallet account.
[0117] S220: Based on the current account balance and the current credit information, determine the corresponding offline payment limit. In this step, the current account balance can characterize the spending capacity of the target e-wallet account to a certain extent (the more the current account balance, the greater the spending capacity), and the current credit information can characterize the compliance degree of the target e-wallet account (the larger the current credit value and the current loanable amount in the current credit information, the higher the compliance degree), such as its compliance degree of repayment. In view of this, based on the current account balance and the current credit information, determine the offline payment limit corresponding to the target e-wallet account, which is: the maximum upper limit of offline payment that can be supported by the offline account corresponding to the target e-wallet account before each online repayment on its terminal device.
[0118] S230: Use the server private key to sign the summary information to obtain the electronic wallet signature. The summary information includes wallet account information, offline payment limit, issuance time and validity period. It should be understood that changes in the credit information and account balance of the target electronic wallet account will cause changes in its consumption capacity and compliance (for example, the consumption capacity becomes lower or higher), and accordingly, the offline payment limit determined for the target electronic wallet account will also change. To this end, a validity period can be set for the offline payment limit (that is, the user certificate is generated later), and the validity period of the offline payment limit can be specifically limited by the corresponding issuance time and validity period. In addition, in order to prevent the summary information from being tampered with, which will cause problems in the subsequent offline payment process, in this step, the summary information is signed using the server private key to obtain the electronic wallet signature. The electronic wallet signature is used for identity authentication and corresponding validity period verification when the offline account corresponding to the target electronic wallet account performs offline payment.
[0119] The issuance time indicates the time when the user certificate is generated and issued. In one case, the user certificate is generated and issued on the same day. The validity period can be set based on experience. Considering the changes in the target electronic wallet account related information and the issuance frequency, the validity period can be set to 3-7 days.
[0120] S240: Generate a user certificate based on the summary information and the electronic wallet signature. In one implementation, the summary information and the electronic wallet signature may be combined to generate a user certificate.
[0121] S250: Send the user certificate to the terminal device where the target e-wallet account is located, so that the offline account corresponding to the target e-wallet account can make offline payments within the offline payment limit based on the user certificate. When the terminal device is connected to the Internet, the server sends the user certificate to the terminal device where the target e-wallet account is located, and the terminal device obtains and stores the user certificate through the connected network. Subsequently, the offline account corresponding to the target e-wallet account can make offline payments based on the user certificate. Before the terminal device is connected to the Internet and performs offline payment settlement, the maximum amount of offline payment made by the offline account is the offline payment limit, and the specific offline payment limit can be determined based on the offline payment limit and the historical offline transaction amount. Among them, offline payment settlement can refer to the server clearing the offline transaction amount generated by the offline account during the offline period after the terminal device is connected to the Internet again.
[0122] In one implementation, the terminal device is installed with a hardware wallet application to implement offline payment. The offline account corresponding to the target electronic wallet account is the account corresponding to the hardware wallet application. In one case, the hardware wallet application can exist in the form of a plug-in of the electronic wallet application; it can also exist in the form of an independent client application. In the case where the hardware wallet application exists in the form of an independent client application, the electronic wallet application is bound to the hardware wallet application so that the hardware wallet application can perform offline payment based on the user certificate.
[0123] In the embodiments of this specification, by issuing a user certificate to the terminal device where the target electronic wallet account is located, the offline account corresponding to the target electronic wallet account can make offline payments within the offline payment limit based on the user certificate. As a result, offline payments within the offline payment limit can be realized without pre-recharge of the offline account, that is, without pre-depositing working capital. Moreover, when the user certificate is issued for the target electronic wallet account for the first time, it is also possible to implement the offline account corresponding to the target electronic wallet account without opening (i.e., without activating the corresponding hardware wallet), and realize the offline payment function authorization without opening and pre-recharge of the offline account.
[0124] Moreover, in the embodiment of this specification, the authorization of offline payment without pre-charge for offline accounts means that money is not deposited in offline accounts in advance, and the user's liquid assets are not occupied in advance. It can be understood that in this embodiment, offline accounts can use user certificates to realize consumption first and repayment later, which can avoid the problem that the money deposited in offline accounts cannot be retrieved when the corresponding hardware wallet is damaged or the terminal device is lost, thereby avoiding the user's property loss.
[0125] In one possible implementation, in order to protect the security of the user certificate and prevent its leakage, the terminal device is provided with a trusted execution environment TEE. Accordingly, the above S250 may include: sending the user certificate to the TEE of the terminal device so that the terminal device stores the user certificate in the TEE. In one case, the hardware wallet application may be installed in the TEE of the terminal device.
[0126] In one possible implementation, the S220 may include the following steps 11-12:
[0127] Step 11: Based on the current account balance, the current credit information and their respective corresponding weights, determine the current score of the target electronic wallet account.
[0128] Step 12: Based on the current score, determine the offline payment limit corresponding to the target electronic wallet account.
[0129] In this implementation, the server may pre-store the weights corresponding to the current account balance and the current credit information, and subsequently determine the current score of the target electronic wallet account based on the current account balance and its corresponding weight, and the current credit information and its corresponding weight. In one case, the sum of the product of the current account balance and its corresponding weight and the product of the current credit information and its corresponding weight may be determined as the current score; or: first calculate the product of the current account balance and its corresponding weight as the first product value, calculate the product of the current credit information and its corresponding weight as the second product value, and take the average of the first product value and the second product value as the current score. Subsequently, based on the current score, determine the offline payment limit corresponding to the target electronic wallet account. In one case, the server pre-stores a mapping relationship between the score and the limit, and based on the mapping relationship, determines the limit corresponding to the current score as the offline payment limit.
[0130] As for the current account balance of the target electronic wallet account, if the owner of the target electronic wallet account continues to consume, the account balance will change frequently. If the account balance changes, the offline payment limit will change accordingly, and the server will frequently generate and issue user certificates for the target electronic wallet account, which will not only waste server computing resources, but also increase the network process consumption of the terminal device, bringing a bad experience to the user. In view of this, in one possible implementation, the step 12 may include the following steps 121-122:
[0131] Step 121: Based on a preset first correspondence between the account score and the credit limit level, determine the current credit limit level corresponding to the current score.
[0132] Step 122: Based on the preset second correspondence between the credit limit level and the credit limit value, determine the credit limit value corresponding to the current credit limit level as the offline payment limit.
[0133] In this implementation, the credit limit levels are divided, and the correspondence between the account score and the credit limit level and the first correspondence, as well as the correspondence between the credit limit level and the credit limit value, i.e., the second correspondence, are pre-constructed and stored. Subsequently, after the server obtains the current score, it determines the current credit limit level corresponding to the current score based on the first correspondence; and determines the credit limit value corresponding to the current credit limit level based on the second correspondence as the offline payment limit. The credit limit level is set so that the offline payment limit is changed (user certificate is changed) only when the current account balance and / or current credit information changes, resulting in a change in the credit limit level corresponding to the calculated current score, thereby avoiding the server from frequently generating and issuing user certificates for the target e-wallet account.
[0134] In another implementation, a correspondence between the account balance and credit information and the credit limit can be directly established, and then, based on the correspondence, the credit limit corresponding to the current account balance and the current credit information is determined as the offline payment limit corresponding to the target e-wallet account.
[0135] In one embodiment, the method may further include the following steps 21-23:
[0136] Step 21: Obtain an offline bill sent by the terminal device, wherein the offline bill is a bill generated by an offline account for offline payment, and at least includes the corresponding transaction amount and wallet account information.
[0137] Step 22: Based on the transaction amount and wallet account information, a corresponding amount is deducted from the target electronic wallet account.
[0138] Step 23: Send the credit limit recovery information to the terminal device so that the offline account can restore the current upper limit of offline payment to the offline payment limit.
[0139] In this embodiment, after the server sends the user certificate to the terminal device where the target electronic wallet account is located, the offline account corresponding to the target electronic wallet account can make offline payments within the offline payment limit based on the user certificate. After the offline account makes an offline payment, a corresponding offline bill will be generated. The offline bill at least includes the transaction amount and wallet account information corresponding to the offline payment made by the offline account, so that after the terminal device is connected to the network, the offline payment settlement can be performed on the server side. Specifically, after the terminal device is connected to the network, the offline bill stored during the offline period is uploaded to the server through the network. The server receives the offline bill and deducts the corresponding amount from the target electronic wallet account based on the transaction amount and wallet account information included therein to achieve offline payment settlement.
[0140] It is understandable that in order to avoid double spending in offline accounts, after the terminal device makes an offline payment in the offline account, it will adjust its current offline payment upper limit according to the transaction amount corresponding to the offline payment. For example, after the terminal device obtains the user certificate, the initial offline payment upper limit of the offline account corresponding to the target electronic wallet account is: the offline payment amount corresponding to the user certificate is 300. The offline account makes an offline payment, and the corresponding transaction amount is 50. Accordingly, the terminal device adjusts the current offline payment upper limit of the offline account to 250 (300-50) according to the transaction amount of 50; the offline account makes another offline payment, and the corresponding transaction amount is 100. Accordingly, the terminal device adjusts the current offline payment upper limit of the offline account to 150 (250-100) according to the transaction amount of 100; and so on.
[0141] In view of this, in order to ensure the normal use of the offline payment function of the offline account, the server sends a limit recovery message to the terminal device after clearing. After the terminal device obtains the limit recovery message, it restores the upper limit of the offline payment of the offline account, that is, restores the current upper limit of the offline payment of the offline account to the offline payment limit.
[0142] In one case, the user certificate of the offline account corresponding to the target electronic wallet account may expire during the period when the terminal device is offline. In this case, after the server performs offline payment settlement for the offline account, that is, executes step 22, it can directly regenerate a new user certificate for the target electronic wallet account without executing step 23. In other words, after the server performs settlement for the offline account, it can first determine whether the user certificate currently obtained by the offline account has expired, and execute step 23 if it is determined that the user certificate currently obtained by the offline account has not expired.
[0143] In one possible implementation, in order to prevent the offline bill from being tampered with or forged, the offline bill may also include: corresponding merchant account information and merchant signature, where the merchant signature is obtained by signing the merchant account information and transaction amount using the merchant private key; wherein the corresponding merchant account information is: the account information of the merchant corresponding to the offline account for offline payment.
[0144] The step 22 may include the following steps 221-222:
[0145] Step 221: Use the merchant public key corresponding to the merchant private key to verify the offline bill.
[0146] Step 222: If the verification is successful, a corresponding amount is deducted from the target electronic wallet account based on the transaction amount and wallet account information.
[0147] In this implementation, the server can use the merchant public key corresponding to the merchant private key to verify the offline bill to determine whether the offline bill has been tampered with. If the verification is successful, that is, the offline bill is determined not to have been tampered with, then the corresponding amount is deducted from the target electronic wallet account based on the transaction amount and wallet account information. If the verification fails, it can be determined that the offline bill has been tampered with, and the server locks the offline bill and performs subsequent specific processing operations. The specific processing operation can be, for example, that the server verifies the offline bill by querying the transaction record corresponding to the corresponding merchant.
[0148] Corresponding to the above method embodiment, the embodiment of this specification also provides an offline payment method, which is applied to a terminal device. The terminal device stores a user certificate issued by a server. The user certificate includes at least the offline payment amount, the issuance time, the validity period and the electronic wallet signature, such as Figure 3As shown, the method may include steps S310-S340:
[0149] S310: Upon receiving an offline payment instruction, determine whether the current transaction amount carried by the offline payment instruction is not greater than the upper limit of the current offline payment. The upper limit of the current offline payment is determined based on the offline payment limit and the historical offline transaction amount. In one case, the upper limit of the current offline payment may be: the difference between the offline payment limit and all historical offline transaction amounts. The historical offline transaction amount includes: the transaction amount corresponding to the historical offline payment made by the terminal device after the offline payment limit was last restored or determined and before the current offline payment.
[0150] In an exemplary offline payment scenario, the terminal device may receive an offline payment instruction by scanning a payment code presented by the merchant, wherein the payment code includes the current transaction amount. In another exemplary offline payment scenario, the terminal device may receive an offline payment instruction based on a user operation. For example, the user operation may be to enter the current transaction amount in a designated payment interface so that the terminal device receives an offline payment instruction. In another exemplary offline payment scenario, the terminal device may present a payment code based on a user operation for scanning by the payment device. After the payment device scans the payment code presented by the terminal device, it may provide the terminal device with the current transaction amount. Accordingly, when the terminal device obtains the current transaction amount, it is considered that an offline payment instruction has been obtained.
[0151] In one implementation, the terminal device may be installed with a hardware wallet application, and the terminal device implements the offline payment function through the hardware wallet application. In another implementation, the terminal device is also installed with an electronic wallet application. The hardware wallet application may exist in the form of a plug-in of the electronic wallet application; it may also exist in the form of an independent client application. In the case where the hardware wallet application exists in the form of an independent client application, the electronic wallet application is bound to the hardware wallet application so that the hardware wallet application can perform offline payment based on the user certificate.
[0152] The above-mentioned server is a server corresponding to the electronic wallet application, and the terminal device can obtain the user certificate through the electronic wallet application. The above-mentioned offline payment limit is determined based on the account balance and credit information of the electronic wallet account logged in by the electronic wallet application. The above-mentioned user certificate may also include the wallet account information of the electronic wallet account. The wallet account information can prove the account to which the user certificate belongs. The above-mentioned electronic wallet signature is: the wallet account information, the offline payment limit, the issuance time and the validity period are signed based on the server private key. The issuance time can guarantee the time when the user certificate is generated and issued, and the validity period can limit the validity period of the user certificate.
[0153] S320: If it is determined that the current transaction amount is not greater than the upper limit of the current offline payment, the user certificate is provided to the payment device corresponding to the offline payment instruction. In this step, if the terminal device determines that the current transaction amount is not greater than the upper limit of the current offline payment, it is considered that the transaction can be carried out, and accordingly, the user certificate is provided to the payment device corresponding to the offline payment instruction. In one implementation, the terminal device can provide the user certificate to the payment device corresponding to the offline payment instruction through a short-distance transmission method. The short-distance transmission method may include, but is not limited to: Bluetooth transmission method, code scanning transmission method, and transmission method based on NFC (Near Field Communication) technology.
[0154] S330: Obtain transaction confirmation information provided by the payment receiving device, wherein the transaction confirmation information is sent by the payment receiving device when the user certificate is determined to be valid based on the electronic wallet signature.
[0155] S340: Generate an offline bill based on the transaction confirmation information.
[0156] After the terminal device provides the user certificate to the payment device, the payment device verifies the user certificate based on the electronic wallet signature. After the user certificate verification is passed, that is, the user certificate is determined to be valid, the transaction is carried out. After the payment device carries out the transaction, it generates transaction confirmation information and provides the transaction confirmation information to the terminal device to notify the terminal device that the transaction (offline payment) is successful. The terminal device obtains the transaction confirmation information provided by the payment device and generates an offline bill based on the transaction confirmation information. The server can perform offline payment settlement for the offline account through the offline bill.
[0157] In one case, the payment device can provide transaction confirmation information to the terminal device through the above-mentioned short-distance transmission method.
[0158] In this embodiment, when the terminal device determines that the upper limit of the current offline payment is greater than the current transaction amount, that is, the current transaction amount can be paid, the user certificate can be provided to the payment device, that is, offline payment is realized through the user certificate.
[0159] In one possible implementation, in order to prevent the user certificate from being stolen or tampered with, the terminal device may include a trusted execution environment TEE, the user certificate may be stored in the TEE, and the offline payment method may be executed in the TEE. Accordingly, to prevent the hardware wallet application from being maliciously damaged, the above hardware wallet application may be installed and run in the TEE. Considering the limited space resources of the TEE, the electronic wallet application may run in the universal execution environment REE of the terminal device.
[0160] In one embodiment, the method may further include the following steps 31-32:
[0161] Step 31: Based on the time of receiving the offline payment instruction, the time of issuing the user certificate and the validity period, determine whether the user certificate is valid;
[0162] When it is determined that the user certificate is valid, the user certificate is provided to the payment receiving device corresponding to the offline payment instruction.
[0163] In one implementation, when the terminal device determines that the current transaction amount is not greater than the upper limit of the current offline payment, it can execute step 31 to determine whether the user certificate is valid based on the reception time of the offline payment instruction, the issuance time and the validity period of the user certificate, that is, to determine whether the time corresponding to the issuance time plus the validity period is not earlier than the reception time. If it is determined that the time corresponding to the issuance time plus the validity period is not earlier than the reception time, the user certificate is determined to be valid, and the user certificate is provided to the payment device corresponding to the offline payment instruction through a short-distance transmission method. Through this implementation, invalid interactions between the terminal device and the payment device can be avoided. For example, when it is determined that the user certificate is invalid, the terminal device does not provide the user certificate to the payment device, and directly obtains the result that offline payment cannot be performed.
[0164] In another implementation, after receiving the offline payment instruction, the terminal device may first determine whether the user certificate is valid based on the time of receiving the offline payment instruction, the time of issuing the user certificate and the validity period. If the user certificate is valid, the terminal device may determine whether the current transaction amount carried by the offline payment instruction is not greater than the upper limit of the current offline payment. If the current transaction amount is not greater than the upper limit of the current offline payment, the terminal device may provide the user certificate to the payment receiving device corresponding to the offline payment instruction. If the user certificate is determined to be invalid, the subsequent steps will not be executed.
[0165] In order to avoid the double-spending problem of offline accounts, the terminal device needs to update its current offline payment upper limit when obtaining the transaction confirmation information provided by the payment receiving device, that is, when determining that the offline payment is successful. Accordingly, in an operative embodiment, the method may further include the following steps 41-42:
[0166] Step 41: Calculate the difference between the current offline payment upper limit and the current transaction amount.
[0167] Step 42: Determine the difference as the new upper limit of the current offline payment.
[0168] In the embodiments of this specification, the offline bill generated by the terminal device for offline payment based on the user certificate during the offline period will be saved locally on the terminal device. In order to prevent the offline bill from being tampered with, the offline bill can be stored in the TEE. Subsequently, in order to ensure the normal use of the offline account, when the terminal device is connected to the network again, the offline bill will be uploaded to the server, and the server will settle the offline account based on the offline bill.
[0169] In one implementation, when the terminal device detects that it is connected to the Internet, it can automatically retrieve all offline bills stored locally that have not been uploaded to the server, and automatically send all offline bills to the server. In another implementation, when the terminal device detects that it is connected to the Internet, it can automatically retrieve all offline bills stored locally that have not been uploaded to the server, and display offline bill prompt information to prompt the user to upload the offline bill, and then send the offline bill to the server when receiving the user's offline bill upload instruction.
[0170] Accordingly, the method may further include the following steps: in an online state, sending the offline bill to the server so that the server performs settlement based on the offline bill. Subsequently, after the server performs settlement, it may continue to determine whether the user certificate obtained by the offline account is valid, and if it is determined that the user certificate is valid, send credit limit recovery information to the terminal device. After the terminal device obtains the credit limit recovery information, it restores the current offline payment limit to the offline payment limit carried by the user certificate.
[0171] In order to prevent the transaction confirmation information from being forged or tampered with, after the terminal device obtains the transaction confirmation information, it can first verify the transaction confirmation information. Accordingly, in one possible implementation, the transaction confirmation information includes: the merchant's merchant account information, the current transaction amount and the merchant's signature. The merchant's signature is obtained by signing the merchant's account information and the current transaction amount using the merchant's private key;
[0172] The S340 may include the following steps 51-52:
[0173] Step 51: Verify the transaction confirmation information based on the merchant public key corresponding to the merchant private key;
[0174] Step 52: If the verification is successful, an offline bill is generated based on the merchant account information, the current transaction amount and the wallet account information.
[0175] The merchant public key corresponding to the merchant private key may be pre-stored locally in the terminal device, or may be provided to the terminal device by the payment device when the terminal device conducts a transaction with the merchant. After the terminal device obtains the transaction confirmation information, it verifies the transaction confirmation information based on the merchant public key corresponding to the merchant private key. If the verification is successful, it is determined that the merchant account information and the current transaction amount in the transaction confirmation information have not been tampered with, and an offline bill is generated based on the merchant account information, the current transaction amount and the wallet account information. The offline bill may include at least the merchant account information, the current transaction amount and the wallet account information.
[0176] In another implementation, the offline bill may also include the merchant's signature, so that before the server settles the offline account, it first uses the merchant's public key corresponding to the merchant's private key to verify the offline bill to verify whether the merchant account information and transaction amount carried in the offline bill have been tampered with. After the server determines that the merchant account information and transaction amount carried in the offline bill have not been tampered with, that is, the offline bill has been verified, it settles the offline account, that is, based on the transaction amount and the wallet account information carried in the offline bill, deducts the corresponding amount from the corresponding electronic wallet account. This avoids property losses in the electronic wallet account.
[0177] Corresponding to the above method embodiment, the embodiment of this specification also provides a payment collection method for an offline device, which is applied to a payment collection device, such as Figure 4 As shown, the method includes the following steps S410-S450:
[0178] S410: Obtain a user certificate provided by the offline terminal device, wherein the user certificate is issued by the server and includes: wallet account information of the electronic wallet account corresponding to the terminal device, the amount that can be paid offline, the issuance time and validity period of the user certificate, and the electronic wallet signature.
[0179] The user certificate is a user certificate generated based on the offline payment authorization method provided in the above embodiment. The specific generation process can be found in the above offline payment authorization method embodiment, which will not be repeated here. The user certificate is generated by the server and sent to the terminal device in a networked state. The terminal device stores it locally, for example, in the trusted execution environment TEE of the terminal device. Subsequently, when the terminal device is offline, it can make offline payments based on the user certificate, that is, conduct offline transactions with merchants.
[0180] In one case, when the terminal device is in an offline state and conducts a transaction with a merchant (performing an offline payment), the user certificate can be provided to the merchant's payment device through a short-distance transmission method, and the payment device obtains the user certificate provided by the offline terminal device through the short-distance transmission method. Among them, the short-distance transmission method may include but is not limited to: Bluetooth communication method, code scanning communication method, and transmission method based on NFC (Near Field Communication) technology.
[0181] S420: Use the public key of the server to verify the electronic wallet signature. The electronic wallet signature is generated by signing the wallet account information, offline payment amount, issuance time and validity period of the electronic wallet account corresponding to the terminal device using the private key of the server (i.e., the server private key mentioned in the above embodiment). The public key of the server can be pre-stored locally in the payment receiving device, or it can be downloaded from the server after the payment receiving device obtains the user certificate.
[0182] The payment receiving device uses the public key of the server to verify the electronic wallet signature to verify whether the wallet account information, the amount that can be paid offline, the issuance time and the effective duration of the user certificate in the user certificate have been tampered with. If it is determined that the wallet account information, the amount that can be paid offline, the issuance time and the effective duration of the user certificate have not been tampered with, it is determined that the electronic wallet signature verification has passed, and accordingly, the subsequent step S430 is executed. If it is determined that any of the wallet account information, the amount that can be paid offline, the issuance time and the effective duration of the user certificate have been tampered with, it is determined that the electronic wallet signature verification has failed and the transaction cannot be carried out.
[0183] In one implementation, after determining that the electronic wallet signature verification has failed, the payment device may provide the terminal device with information indicating that the transaction has failed. Alternatively, after determining that the electronic wallet signature verification has failed, the payment device may display information indicating that the user certificate is incorrect on a display screen to which it is connected, and the user of the payment device may determine that the transaction payment has failed based on the information, and then perform corresponding operations, such as reminding the terminal device user that the payment cannot be made and suggesting that the user change other payment methods.
[0184] S430: If the verification is successful, determine whether the user certificate is valid based on the transaction time, issuance time and validity period of this transaction. In this step, after determining that the electronic wallet signature verification is successful, the payment device obtains the transaction time of this transaction, and determines whether the user certificate is valid based on the transaction time, issuance time and validity period.
[0185] The process of determining whether the user certificate is valid may include: determining a first time based on the issuance time and the validity period, and determining whether the transaction time is no later than the first time. Subsequently, if it is determined that the transaction time is no later than the first time, the user certificate is determined to be valid; otherwise, if it is determined that the transaction time is later than the first time, the user certificate is determined to be invalid.
[0186] S440: Generate transaction confirmation information corresponding to this transaction when it is determined that the user certificate is valid. In this step, the payment device performs the transaction and generates transaction confirmation information corresponding to this transaction when it is determined that the user certificate is valid. The transaction confirmation information is used to indicate that the transaction is successful. In one case, the transaction confirmation information may include at least: the merchant's merchant account information, the transaction amount of this transaction, and the merchant signature. The merchant signature is obtained by signing at least the merchant account information and the current transaction amount using the merchant's private key. Subsequently, the terminal device side and / or the server side can verify whether the merchant account information and the current transaction amount have been tampered with through the merchant signature.
[0187] In another implementation, when the user certificate is determined to be invalid, the payment device may generate transaction failure information and provide the transaction failure information to the terminal device. Alternatively, after determining that the user certificate is invalid, the payment device may display information indicating that the user certificate is invalid on a display screen to which it is connected, and the user of the payment device may determine that the transaction payment has failed based on the information and then perform corresponding operations, such as reminding the user of the terminal device that the payment cannot be made and suggesting that the user change to another payment method.
[0188] S450: Providing the transaction confirmation information to the terminal device so that the terminal device generates a corresponding offline bill based on the transaction confirmation information. In one implementation, after the payment device generates the transaction confirmation information, the transaction confirmation information can be provided to the terminal device through a short-distance transmission method. After the terminal device obtains the transaction confirmation information, it generates a corresponding offline bill based on the transaction confirmation information.
[0189] In this embodiment, the payment receiving device performs the transaction after verifying that the user certificate provided by the terminal device is valid, thereby facilitating transactions of the terminal device in an offline state.
[0190] The foregoing describes certain embodiments of the present specification, and other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in an order different from that in the embodiments, and the desired results may still be achieved. In addition, the processes depicted in the accompanying drawings do not necessarily have to be performed in the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0191] Corresponding to the above method embodiment, the present specification embodiment provides an offline payment authorization device 500, which is applied to a server, and its schematic block diagram is as follows: Figure 5 As shown, the device comprises:
[0192] The first obtaining module 510 is configured to obtain wallet account information, current account balance and current credit information of the target electronic wallet account when it is detected that the current state of the target electronic wallet account meets the preset certificate issuance condition;
[0193] A first determination module 520 is configured to determine a corresponding offline payment limit based on the current account balance and the current credit information;
[0194] The first signature module 530 is configured to use the server private key to sign the summary information to obtain the electronic wallet signature, wherein the summary information includes the wallet account information, the offline payment limit, the issuance time and the validity period;
[0195] A first generating module 540 is configured to generate a user certificate based on the summary information and the electronic wallet signature;
[0196] The first sending module 550 is configured to send the user certificate to the terminal device where the target electronic wallet account is located, so that the offline account corresponding to the target electronic wallet account can make offline payments within the offline payment limit based on the user certificate.
[0197] In one possible implementation, the preset certificate issuance condition includes at least one of the following conditions: the obtained user certificate of the target electronic wallet account has expired, and the terminal device is in a networked state;
[0198] During a first period before the expiration of the obtained user certificate, the terminal device is in a networked state;
[0199] In a second period before the expiration of the obtained user certificate, the traffic usage status of the terminal device meets a preset idle condition;
[0200] The current account balance of the target electronic wallet account and / or the current credit information change meets certain conditions;
[0201] The target electronic wallet account has not obtained a user certificate, and the traffic usage status of the terminal device meets a preset idle condition.
[0202] In one possible implementation, the wallet account information is: a hash value of the wallet account ID and wallet account name information corresponding to the target electronic wallet account.
[0203] In one possible implementation, the current credit information includes at least one of the following information: a current credit value and a current loanable amount.
[0204] In one possible implementation, the terminal device is provided with a trusted execution environment TEE;
[0205] The first sending module 550 is specifically configured to send the user certificate to the TEE of the terminal device, so that the terminal device stores the user certificate in the TEE.
[0206] In one possible implementation, the first determining module 520 includes:
[0207] A first determining unit (not shown in the figure) is configured to determine a current score of the account score of the target electronic wallet account based on the current account balance, the current credit information and their respective corresponding weights;
[0208] The second determining unit (not shown in the figure) is configured to determine the offline payment limit corresponding to the target electronic wallet account based on the current score.
[0209] In one possible implementation, the second determining unit is specifically configured to determine the current credit limit level corresponding to the current score based on a preset first correspondence between the account score and the credit limit level;
[0210] Based on a preset second correspondence between the credit limit level and the credit limit value, the credit limit value corresponding to the current credit limit level is determined as the offline payment limit.
[0211] In one possible implementation, the device further comprises:
[0212] A fourth obtaining module (not shown in the figure) is configured to obtain an offline bill sent by the terminal device, wherein the offline bill is a bill generated by offline payment of the offline account, and at least includes a corresponding transaction amount and the wallet account information;
[0213] an amount deduction module (not shown in the figure), configured to deduct a corresponding amount from the target electronic wallet account based on the transaction amount and the wallet account information;
[0214] The second sending module (not shown in the figure) is configured to send limit recovery information to the terminal device so that the current upper limit of offline payment of the offline account is restored to the offline payment limit.
[0215] In one possible implementation, the offline bill further includes: corresponding merchant account information and merchant signature, where the merchant signature is obtained by signing the merchant account information and the transaction amount using the merchant private key;
[0216] The amount deduction module is specifically configured to verify the offline bill using the merchant public key corresponding to the merchant private key;
[0217] If the verification is successful, a corresponding amount is deducted from the target electronic wallet account based on the transaction amount and the wallet account information.
[0218] Corresponding to the above method embodiment, the present specification embodiment provides an offline payment device 600, which is applied to a terminal device, wherein the terminal device stores a user certificate issued by a server, wherein the user certificate includes at least the offline payment amount, the issuance time, the validity period, and the electronic wallet signature, and its schematic block diagram is as follows: Figure 6 As shown, the device comprises:
[0219] The first judgment module 610 is configured to, upon receiving an offline payment instruction, judge whether the current transaction amount carried in the offline payment instruction is not greater than the upper limit of the current offline payment, wherein the upper limit of the current offline payment is determined based on the offline payment amount and the historical offline transaction amount;
[0220] A first providing module 620 is configured to provide the user certificate to a payment receiving device corresponding to the offline payment instruction if it is determined that the current transaction amount is not greater than the upper limit of the current offline payment;
[0221] A second obtaining module 630 is configured to obtain transaction confirmation information provided by the payment receiving device, wherein the transaction confirmation information is sent by the payment receiving device when the user certificate is determined to be valid based on the electronic wallet signature;
[0222] The second generating module 640 is configured to generate an offline bill based on the transaction confirmation information.
[0223] In one possible implementation, the terminal device includes a trusted execution environment TEE, the user certificate is stored in the TEE, and the method is executed in the TEE.
[0224] In one possible implementation, the device further comprises:
[0225] A third judgment module (not shown in the figure) is configured to judge whether the user certificate is valid based on the reception time of the offline payment instruction, the issuance time and the validity period of the user certificate;
[0226] The third providing module (not shown in the figure) is configured to provide the user certificate to the payment device if it is determined that the user certificate is valid.
[0227] In one possible implementation, the device further comprises:
[0228] A calculation module (not shown in the figure), configured to calculate the difference between the upper limit of the current offline payment and the current transaction amount;
[0229] The second determination module (not shown in the figure) is configured to determine the difference as the new upper limit of the current offline payment.
[0230] In one possible implementation, the device further comprises:
[0231] The third sending module (not shown in the figure) is configured to send the offline bill to the server when in an online state, so that the server performs settlement based on the offline bill.
[0232] In one possible implementation, the second obtaining module 630 is specifically configured to obtain the transaction confirmation information provided by the payment device through a short-distance transmission method.
[0233] In one possible implementation, the transaction confirmation information includes: the merchant account information of the merchant, the current transaction amount and the merchant signature, and the merchant signature is obtained by signing the merchant account information and the current transaction amount using the merchant private key;
[0234] The second generating module 640 is specifically configured to verify the transaction confirmation information based on the merchant public key corresponding to the merchant private key;
[0235] If the verification is successful, an offline bill is generated based on the merchant account information, the current transaction amount and the wallet account information.
[0236] Corresponding to the above method embodiment, the present specification embodiment provides a payment collection device 700 for an offline device, which is applied to a payment collection device, and its schematic block diagram is as follows: Figure 7 As shown, the device comprises:
[0237] The third obtaining module 710 is configured to obtain a user certificate provided by an offline terminal device, wherein the user certificate is issued by a server and includes: wallet account information of an electronic wallet account corresponding to the terminal device, an amount that can be paid offline, an issuance time and a validity period of the user certificate, and an electronic wallet signature;
[0238] A first verification module 720, configured to verify the electronic wallet signature using the public key of the server;
[0239] The second judgment module 730 is configured to judge whether the user certificate is valid based on the transaction time of this transaction, the issuance time and the validity period if the verification is passed;
[0240] The third generating module 740 is configured to generate transaction confirmation information corresponding to the transaction when it is determined that the user certificate is valid;
[0241] The second providing module 750 is configured to provide the transaction confirmation information to the terminal device so that the terminal device generates a corresponding offline bill based on the transaction confirmation information.
[0242] In one possible implementation, the transaction confirmation information includes at least: the merchant account information of the merchant, the transaction amount of this transaction and the merchant signature, and the merchant signature is obtained by signing the merchant account information and the current transaction amount using the merchant private key.
[0243] In one possible implementation, the second providing module 750 is specifically configured to provide the transaction confirmation information to the terminal device via a short-distance transmission method.
[0244] In one possible implementation, the device further comprises:
[0245] A fourth generating module (not shown in the figure) is configured to generate transaction failure information when it is determined that the user certificate is invalid;
[0246] The fourth providing module (not shown in the figure) is configured to provide the transaction failure information to the terminal device.
[0247] The above device embodiments correspond to the method embodiments. For specific descriptions, please refer to the description of the method embodiments, which will not be repeated here. The device embodiments are obtained based on the corresponding method embodiments and have the same technical effects as the corresponding method embodiments. For specific descriptions, please refer to the corresponding method embodiments.
[0248] The embodiments of the present specification also provide a computer-readable storage medium on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the offline payment authorization method provided in the present specification.
[0249] The embodiment of the present specification also provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the offline payment authorization method provided in the present specification is implemented.
[0250] The embodiments of the present specification also provide a computer-readable storage medium on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the offline payment method provided in the present specification.
[0251] The embodiment of the present specification also provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the offline payment method provided in the present specification is implemented.
[0252] The embodiments of the present specification also provide a computer-readable storage medium on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the payment method for an offline device provided in the present specification.
[0253] The embodiment of the present specification also provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the payment method for an offline device provided in the present specification is implemented.
[0254] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the storage medium and computing device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0255] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present invention may be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions may be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.
[0256] The specific implementation methods described above further describe the purpose, technical solutions and beneficial effects of the embodiments of the present invention in detail. It should be understood that the above description is only a specific implementation method of the embodiments of the present invention and is not intended to limit the scope of protection of the present invention. Any modification, equivalent replacement, improvement, etc. made on the basis of the technical solution of the present invention shall be included in the scope of protection of the present invention.
Claims
1. An offline payment authorization method, applied to a server, comprising: Based on the current account balance and current credit information of the target electronic wallet account, the corresponding offline payment limit is evaluated, and then a user certificate with a validity period is generated; The user certificate is issued to the terminal device where the target electronic wallet account is located, so that the offline account corresponding to the target electronic wallet account can make offline payments within the offline payment limit based on the user certificate.
2. The method according to claim 1, further comprising: Obtaining an offline bill sent by the terminal device, wherein the offline bill is a bill generated by offline payment of the offline account, and at least includes the corresponding transaction amount and wallet account information of the target electronic wallet account; Based on the transaction amount and the wallet account information, deduct a corresponding amount from the target electronic wallet account; Sending credit limit recovery information to the terminal device so that the current upper limit of offline payment of the offline account is restored to the offline payment limit.
3. The method according to claim 2, wherein: The offline bill also includes: corresponding merchant account information and merchant signature, wherein the merchant signature is obtained by signing the merchant account information and the transaction amount using the merchant private key; The deducting a corresponding amount from the target electronic wallet account based on the transaction amount and the wallet account information includes: Verifying the offline bill using the merchant public key corresponding to the merchant private key; If the verification is successful, a corresponding amount is deducted from the target electronic wallet account based on the transaction amount and the wallet account information.
4. An offline payment method, applied to a terminal device, wherein the terminal device stores a user certificate with a validity period issued by a server, wherein the user certificate includes an offline payment limit of an electronic wallet account corresponding to the terminal device, and the method comprises: When receiving an offline payment instruction, determining whether the current transaction amount carried in the offline payment instruction is not greater than the upper limit of the current offline payment, wherein the upper limit of the current offline payment is determined based on the offline payment amount and the historical offline transaction amount; If it is determined that the current transaction amount is not greater than the upper limit of the current offline payment, providing the user certificate to a payment receiving device corresponding to the offline payment instruction; Obtaining transaction confirmation information provided by the payment receiving device, wherein the transaction confirmation information is sent when the payment receiving device determines that the user certificate is valid; An offline bill is generated based on the transaction confirmation information.
5. According to the method of claim 4, the terminal device is also provided with a hardware wallet application; the offline account is an account for logging into the hardware wallet application; and the offline payment is performed through the hardware wallet application.
6. The method of claim 4, wherein: Providing the user certificate to a payment device corresponding to the offline payment instruction includes: The user certificate is provided to the payment device corresponding to the offline payment instruction through a short-distance transmission method.
7. A payment collection method for an offline device, applied to a payment collection device, the method comprising: Obtaining a user certificate with a validity period provided by an offline terminal device, wherein the user certificate is issued by a server; If the user certificate is determined to be valid, generating transaction confirmation information corresponding to the transaction; The transaction confirmation information is provided to the terminal device, so that the terminal device generates a corresponding offline bill based on the transaction confirmation information.
8. An offline payment authorization device, applied to a server, comprising: An evaluation and generation module, configured to evaluate the corresponding offline payment limit of the target electronic wallet account based on the current account balance and current credit information of the target electronic wallet account, and then generate a user certificate with a validity period; The issuing module is configured to issue the user certificate to the terminal device where the target electronic wallet account is located, so that the offline account corresponding to the target electronic wallet account can make offline payments within the offline payment limit based on the user certificate.
9. An offline payment device, applied to a terminal device, wherein the terminal device stores a user certificate with a validity period issued by a server, wherein the user certificate includes an offline payment limit of an electronic wallet account corresponding to the terminal device, and the device comprises: A first judgment module is configured to, upon receiving an offline payment instruction, judge whether a current transaction amount carried in the offline payment instruction is not greater than an upper limit of a current offline payment, wherein the upper limit of the current offline payment is determined based on the available offline payment amount and a historical offline transaction amount; A first providing module is configured to provide the user certificate to a payment receiving device corresponding to the offline payment instruction if it is determined that the current transaction amount is not greater than the upper limit of the current offline payment; a transaction confirmation information obtaining module, configured to obtain transaction confirmation information provided by the payment receiving device, wherein the transaction confirmation information is sent when the payment receiving device determines that the user certificate is valid; The offline bill generation module is configured to generate an offline bill based on the transaction confirmation information.
10. A payment collection device for an offline device, applied to a payment collection device, the device comprising: A certificate obtaining module, configured to obtain a user certificate with a validity period provided by an offline terminal device; A transaction confirmation information generating module, configured to generate transaction confirmation information corresponding to the transaction when it is determined that the user certificate is valid; The second providing module is configured to provide the transaction confirmation information to the terminal device, so that the terminal device generates a corresponding offline bill based on the transaction confirmation information.
11. A computing device comprising a memory and a processor, wherein: The memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and system for providing authorization through mobile terminal
CN104063790A
Secure offline payment system
CN106133769A
Method and device for realizing dual offline payment
CN110880106A
Secure offline payment system
US20150278795A1
Reserving account balance for concurrent payments in secure offline payment system
US20150278796A1
Cited By
Payment method and device
CN115170119A