WO2021082466A1 - 离线支付 - Google Patents

离线支付 Download PDF

Info

Publication number
WO2021082466A1
WO2021082466A1 PCT/CN2020/096019 CN2020096019W WO2021082466A1 WO 2021082466 A1 WO2021082466 A1 WO 2021082466A1 CN 2020096019 W CN2020096019 W CN 2020096019W WO 2021082466 A1 WO2021082466 A1 WO 2021082466A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
electronic device
payment
public key
digital certificate
Prior art date
Application number
PCT/CN2020/096019
Other languages
English (en)
French (fr)
Inventor
付超群
Original Assignee
北京三快在线科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京三快在线科技有限公司 filed Critical 北京三快在线科技有限公司
Publication of WO2021082466A1 publication Critical patent/WO2021082466A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3821Electronic credentials
    • G06Q20/38215Use of certificates or encrypted proofs of transaction rights
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/32Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
    • G06Q20/327Short range or proximity payments by means of M-devices
    • G06Q20/3274Short range or proximity payments by means of M-devices using a pictured code, e.g. barcode or QR-code, being displayed on the M-device

Definitions

  • the embodiments of this application relate to the field of computer technology, in particular to offline payment.
  • the offline payment technology commonly used in the prior art usually requires the payer and the receiver to establish a communication link based on communication methods such as Bluetooth and near field communication, and then transfer payment data based on the established communication link to complete the payment.
  • an offline payment method in the prior art uses the accounts of the payer and the payee as the identification ID, and maps the corresponding public and private key pair according to the business subdomain identifier; the payee selects a random number and uses The private key signs the random number to generate a QR code; the payer scans the QR code, maps the public key with the payee ID and business subdomain identifier, and verifies the signature information; if the verification is successful, the payer follows the transaction The information is successfully paid; after payment, the payer uses the private key to sign a random number to generate a QR code; the payee scans the QR code, maps the public key with the payer ID and business subdomain identifier, and verifies the signature information; if If the verification is successful, the payee will successfully enter the account.
  • an offline payment method including:
  • At the first electronic device generating a first information code according to the pre-stored first digital certificate and the first encrypted information, and displaying the first information code;
  • At the second electronic device obtain the first digital certificate and the first encrypted information carried in the first information code by scanning the first information code;
  • At the second electronic device parsing the first encrypted information through the first public key to obtain the payment information
  • At the second electronic device generating a second information code by using a pre-stored second digital certificate and the first encrypted information, and displaying the second information code;
  • At the first electronic device acquiring the second digital certificate and the second encrypted information carried in the second information code by scanning the second information code;
  • At the first electronic device parse the second digital certificate by using a pre-stored third public key to obtain a second public key
  • the second digital certificate and the second encrypted information are stored at the first electronic device as an offline payment record, and offline payment success information is output .
  • an offline payment device including:
  • the first encrypted information generating module is configured to, in response to the operation of initiating an offline payment, encrypt the payment information by using the pre-stored first private key at the first electronic device to generate the first encrypted information;
  • the first information code display module is configured to generate a first information code based on the pre-stored first digital certificate and the first encrypted information at the first electronic device, and display the first information code;
  • the first digital certificate and encrypted information obtaining module is used to obtain the first digital certificate and the first encrypted information carried in the first information code by scanning the first information code at the second electronic device ;
  • the first public key obtaining module is configured to obtain the first public key by parsing the first digital certificate through the pre-stored third public key at the second electronic device;
  • a collection information acquisition module configured to parse the first encrypted information through the first public key at the second electronic device to obtain the collection information
  • the second encrypted information generating module is configured to, in response to a confirmation operation on the obtained payment information, encrypt the parsed payment information at the second electronic device by using a pre-stored second private key , Generate the second encrypted information;
  • the second information code display module is configured to generate a second information code by using a pre-stored second digital certificate and the first encrypted information at the second electronic device, and display the second information code;
  • the second digital certificate and encrypted information obtaining module is used to obtain the second digital certificate and the second digital certificate carried in the second information code by scanning the second information code at the first electronic device. Encrypted information;
  • the second public key obtaining module is configured to parse the second digital certificate by using a pre-stored third public key at the first electronic device to obtain a second public key;
  • a payment information verification module configured to parse the second encrypted information by the second public key at the first electronic device to obtain payment information to be verified;
  • the offline payment module is configured to store the second digital certificate and the second encrypted information as an offline payment record in the first electronic device in response to the confirmation operation of the payment information to be verified, And output the offline payment success information.
  • an embodiment of the present application also discloses an electronic device, including a memory, a processor, and a computer program stored on the memory and capable of running on the processor.
  • the processor implements the computer program when the computer program is executed.
  • an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored.
  • the program is executed by a processor, the steps of the offline payment method disclosed in the embodiment of the present application are provided.
  • the payment information in response to an operation of initiating an offline payment, is encrypted by the first private key stored in advance at the first electronic device to generate the first encrypted information;
  • a first information code is generated according to the pre-stored first digital certificate and the first encrypted information, and the first information code is displayed;
  • at a second electronic device by scanning the first information code Obtain the first digital certificate and the first encrypted information carried in the first information code;
  • at the second electronic device parse the first digital certificate through a pre-stored third public key to obtain the first digital certificate A public key;
  • the first encrypted information is parsed by the first public key to obtain the payment information; in response to the confirmation operation on the received payment information,
  • the second electronic device encrypts the parsed payment information with a pre-stored second private key to generate second encrypted information;
  • at the second electronic device a pre-stored second digital certificate And the first encrypted information to generate a second information code, and display the second information code;
  • at the first information code is generated according to the pre-stored first digital certificate
  • FIG. 1 is a flowchart of an offline payment method in Embodiment 1 of the present application.
  • FIG. 2 is a schematic flowchart of an offline payment method shown in Embodiment 2 of the present application;
  • FIG. 3 is one of the schematic structural diagrams of the offline payment device according to the second embodiment of the present application.
  • FIG. 5 is the third schematic diagram of the structure of the offline payment device in the second embodiment of the present application.
  • Fig. 6 shows a block diagram of an electronic device for executing the method according to the present application.
  • Fig. 7 shows a storage unit for holding or carrying program codes for implementing the method according to the present application.
  • An offline payment method disclosed in an embodiment of the present application includes: step 101 to step 111.
  • Step 101 In response to an operation of initiating an offline payment, encrypt the payment information by using a pre-stored first private key at the first electronic device to generate first encrypted information.
  • the offline payment method disclosed in the embodiments of the present application is applicable to a payment scenario where the payee and the payer are both offline, and also applicable to a payment scenario where the payee is online.
  • a payment scenario in which both the payee and the payer are in an offline state is used as an example to illustrate the specific technical solutions of the offline payment method disclosed in this application.
  • the first electronic device represents the electronic device of the payee
  • the second electronic device represents the electronic device of the payer.
  • the electronic device may be an electronic device capable of scanning information codes such as a two-dimensional code and a barcode, such as a smart phone, a smart watch, a tablet computer, and the like.
  • the payee inputs payment information, such as the payment amount, through the payment client preset in the first electronic device, and then triggers an offline payment operation.
  • the payment client obtains the first private key pre-stored locally in the first electronic device in response to the operation of the payee initiating an offline payment.
  • the method in response to the operation of initiating an offline payment, before the first electronic device is used to encrypt the payment information by using the pre-stored first private key to generate the first encrypted information, the method further includes : At the first electronic device, obtain a first private key, a third public key, and a first digital certificate through a first preset server, and store the first private key, The third public key and the first digital certificate, wherein the first digital certificate includes a first public key and a signature of the first public key by the first preset server.
  • the first preset server can be a digital certificate issuing authority or a third-party payment platform.
  • the payee first applies to the first preset server through the payment client on the first electronic device for relevant authentication information required for offline payment.
  • the relevant authentication information required for offline payment includes but is not limited to: public key, private key, digital certificate, etc.
  • the public key is used to parse the data encrypted by the private key issued by the first preset server; the private key and the digital certificate are matched with the user one by one, the private key is used to encrypt the user's data; the digital certificate is used to The user data is signed to identify the source of the data, and the public key usually sent to the payee or payer is included in the digital certificate.
  • the public key, private key, and digital certificate obtained by the payee through the first preset server are respectively referred to as: the first public key, the first private key, and the first digital certificate, where, The first public key is included in the first digital certificate, and the first digital certificate further includes the signature of the first public key by the first preset server.
  • the first preset server also issues a first preset server public key for the payee or payer, which is used to parse the digital certificate issued by the first preset server.
  • the first preset server public key is referred to as the third public key.
  • the payment client on the first electronic device encrypts the payment information input by the payee by using the pre-stored first private key to generate first encrypted information.
  • Step 102 At the first electronic device, generate a first information code according to a pre-stored first digital certificate and the first encrypted information, and display the first information code.
  • the payment client on the first electronic device signs the first encrypted information through the first digital certificate pre-stored on the first electronic device, and generates and carries the information code according to a preset information code generation protocol.
  • the first encrypted information and the information code of the first digital certificate are included in the payment client on the first electronic device.
  • the information code described in the embodiment of the present application may be a two-dimensional code, a barcode, or the like.
  • the payment client on the first electronic device displays the generated first information code.
  • Step 103 At the second electronic device, obtain the first digital certificate and the first encrypted information carried in the first information code by scanning the first information code.
  • the payer scans the first information code through a second electronic device, and then parses the first information code according to the preset information code generation protocol to obtain the first encryption carried in the first information code Information and the first digital certificate.
  • Step 104 At the second electronic device, parse the first digital certificate through a pre-stored third public key to obtain a first public key.
  • the digital certificate contains the public key information, the identity information of the digital certificate owner (subject), and the digital signature of the digital certificate certification authority (issuer).
  • the payee uses the third public key (ie, digital certificate) pre-stored on the second electronic device.
  • the public key of the certification authority verifies the first digital certificate, and after the verification is passed, the first digital certificate is parsed to obtain the first public key, that is, the public key of the payee.
  • the third public key is the public key of the first digital certificate and the second digital certificate issuing authority.
  • the method before the second electronic device parses the first digital certificate through the pre-stored third public key to obtain the first public key, the method further includes: At the device, obtain the second private key, the third public key, and the second digital certificate through the first preset server, and store the second private key, the third public key, and the second digital certificate at the second electronic device.
  • a second digital certificate wherein the second digital certificate includes a second public key and a signature of the second public key by the first preset server.
  • the payer before performing offline payment, the payer first applies to the first preset server through the payment client on the second electronic device for relevant authentication information required for offline payment.
  • the relevant authentication information required for offline payment includes but is not limited to: public key, private key, digital certificate, etc.
  • the public key is used to parse the data encrypted by the private key issued by the first preset server; the private key and the digital certificate are matched with the user one by one, the private key is used to encrypt the user's data; the digital certificate is used to Sign user data to identify the source of the data.
  • the public key, private key, and digital certificate obtained by the payer through the first preset server are respectively referred to as the second public key, the second private key, and the second digital certificate.
  • the two public keys are included in the second digital certificate, and the second digital certificate also includes the signature of the first preset server to the second public key.
  • the payer and the payee obtain public key, private key, digital certificate and other relevant authentication information required for offline payment through a unified platform.
  • the method when parsing the first digital certificate to obtain the first public key through the pre-stored third public key, the method further includes: obtaining the first public key
  • the payment failure information is output at the second electronic device.
  • the third public key and the first public key are public keys issued by different platforms, the first digital certificate cannot be parsed by the third public key, and it will fail to obtain the first public key.
  • the second electronic The payment client on the device will output payment failure information at the second electronic device and end the currently executed offline payment.
  • Step 105 At the second electronic device, analyze the first encrypted information through the first public key to obtain the payment information.
  • the payment client on the second electronic device parses the first encrypted information through the first public key to obtain the payment information.
  • the collection information includes information such as the payment amount.
  • Step 106 in response to the confirmation operation on the obtained payment information, encrypt the parsed payment information at the second electronic device by using a pre-stored second private key to generate second encrypted information .
  • the payment client on the second electronic device can also obtain the identity information of the digital certificate owner (that is, the identity information of the payee) in the process of parsing the first digital certificate through the pre-stored third public key. Further, the payment client on the second electronic device displays the parsed collection information (such as the payment amount), the identity information of the payee, etc., on the second electronic device, so as to facilitate verification by the payer.
  • the identity information of the digital certificate owner that is, the identity information of the payee
  • the payment client on the second electronic device displays the parsed collection information (such as the payment amount), the identity information of the payee, etc., on the second electronic device, so as to facilitate verification by the payer.
  • the payer After verifying that the payment information, the identity information of the recipient, etc. are correct, the payer can perform a confirmation operation to confirm the execution of this offline payment.
  • the payment client on the second electronic device detects that the payer confirms the payment information, it is obtained by analyzing the second private key pair pre-stored on the second electronic device
  • the collection information is encrypted to generate second encrypted information.
  • the method further includes: responding to obtaining The cancellation operation of the said payment information ends the offline payment.
  • the payer finds that the information is inaccurate, and can perform a cancellation operation to cancel the offline payment.
  • the payer does not want to perform the offline payment, and may perform a cancel operation to cancel the offline payment.
  • the payment client on the second electronic device detects the cancellation operation performed by the payer, the offline payment will be ended.
  • Step 107 At the second electronic device, generate a second information code through a pre-stored second digital certificate and the first encrypted information, and display the second information code.
  • the payment client on the second electronic device signs the first encrypted information through the second digital certificate stored locally in the second electronic device, and signs the first encrypted information according to the preset information code
  • the generation protocol generates a second information code, and the second information code carries the second digital certificate and the first encryption information. After that, the payment client on the second electronic device displays the second information code on the second electronic device.
  • the second information code can be a two-dimensional code, a barcode, or the like.
  • Step 108 At the first electronic device, obtain the second digital certificate and the second encrypted information carried in the second information code by scanning the second information code.
  • the payee scans the second information code displayed by the payer on the second electronic device through the payment client on the first electronic device, and then parses the second information code according to the preset information code generation protocol, and extracts all information codes.
  • the second digital certificate and the second encrypted information carried in the second information code are examples of the second information code.
  • Step 109 At the first electronic device, parse the second digital certificate through a pre-stored third public key to obtain a second public key.
  • the payment client on the first electronic device passes the first electronic device.
  • the third public key ie, the platform public key stored on the device parses the second digital certificate, performs signature verification on the second public key included in the second digital certificate, and the verification is successful, and the second public key (ie, payment Party’s public key).
  • Step 110 At the first electronic device, the second encrypted information is parsed by the second public key to obtain payment information to be verified.
  • the payment client on the first electronic device parses the second encrypted information through the second public key (that is, the public key of the payer) to obtain the payment information to be verified.
  • the payment information to be checked and accepted may include: payment amount and the like.
  • the payment client on the first electronic device obtains the public key of the payer by parsing the second digital certificate.
  • the payment client on the first electronic device analyzes the second encrypted information carried in the second information code of the payer through the public key of the payer to obtain payment information, where the payment information includes at least the payment amount. After that, the payment information of the payment client on the first electronic device is for the payee to confirm.
  • the identity information of the payer when the second digital certificate is parsed through the pre-stored third public key, the identity information of the payer can also be obtained.
  • the second digital certificate further includes offline payment quota information
  • the offline payment quota information of the payer can also be obtained .
  • the method further includes: displaying the offline payment at the first electronic device
  • the quota information and the payment information to be checked and accepted are used to check the payment ability.
  • the payment client on the first electronic device obtains the offline payment limit information of the payer and the public key of the payer by parsing the second digital certificate.
  • the payment client on the first electronic device analyzes the second encrypted information carried in the second information code of the payer through the public key of the payer to obtain payment information, the payment information including at least the payment amount. After that, the payment client on the first electronic device can display the offline payment limit information and payment amount of the payer at the same time, so that the payee can confirm whether the payment amount is correct and whether the payer has the ability to pay the current offline payment amount.
  • Step 111 In response to the confirmation operation of the payment information to be verified, store the second digital certificate and the second encrypted information as an offline payment record at the first electronic device, and output the offline payment record. Payment success information.
  • the payment client on the first electronic device stores the second digital certificate and the second encrypted information as an offline payment record in the first electronic device To facilitate subsequent settlement.
  • the payment information in response to an operation of initiating an offline payment, is encrypted by the first private key stored in advance at the first electronic device to generate the first encrypted information;
  • a first information code is generated according to the pre-stored first digital certificate and the first encrypted information, and the first information code is displayed;
  • at a second electronic device by scanning the first information code Obtain the first digital certificate and the first encrypted information carried in the first information code;
  • at the second electronic device parse the first digital certificate through a pre-stored third public key to obtain the first digital certificate A public key;
  • the first encrypted information is parsed by the first public key to obtain the payment information; in response to the confirmation operation on the received payment information,
  • the second electronic device encrypts the parsed payment information with a pre-stored second private key to generate second encrypted information;
  • at the second electronic device a pre-stored second digital certificate And the first encrypted information to generate a second information code, and display the second information code;
  • at the first information code is generated according to the pre-stored first digital certificate
  • the payee identifier and the offline payment service subdomain carried in the QR code are used to map offline to obtain the public key, and the mapping code is executed offline through decompilation technology. It is easy to get the mapping algorithm, and then to know the entire mapping process, you can also get the private key. Therefore, the security of offline payment cannot be guaranteed.
  • the payee and the payer obtain the platform public key, private key, and digital certificate from the same platform in advance through the client terminal on the electronic device.
  • the digital certificate includes the public key and the digital certificate issued by the platform. Sign the public key, and then each use its own digital certificate and private key to encrypt and/or sign the payment information transmitted to the other party, and then generate an information code to display to the other party for the other party to scan and confirm; the other party uses their own electronic equipment
  • the platform public key stored on the platform verifies and parses the counterparty's digital certificate, obtains the counterparty's public key, and decrypts the encrypted information obtained by scanning the information code through the counterparty's public key, thereby completing offline payment.
  • the public key, private key, and digital certificate used to encrypt, decrypt, and verify the transmitted payment data are obtained in advance from a platform with certification qualifications and stored in the electronic device Locally, data encryption has higher security and is not easy to be cracked, which can greatly improve the security of offline payments.
  • the offline payment method disclosed in another embodiment of the present application will be described in further detail below in conjunction with FIG. 2 from the perspective of information interaction between the execution subjects of the offline payment.
  • the offline payment method includes step 201 to step 216.
  • Step 201 At the first electronic device, obtain a first private key, a third public key, and a first digital certificate through a first preset server, and store the first private key at the first electronic device. Key, third public key and first digital certificate.
  • the first digital certificate includes a first public key and a signature of the first public key by the first preset server.
  • Step 202 In response to the operation of initiating an offline payment, encrypt the payment information by using a pre-stored first private key at the first electronic device to generate first encrypted information.
  • Step 203 At the first electronic device, generate a first information code according to the pre-stored first digital certificate and the first encrypted information, and display the first information code.
  • Step 204 At the second electronic device, obtain a second private key, a third public key, and a second digital certificate through the first preset server, and store the first digital certificate in the second electronic device.
  • the second private key, the third public key, and the second digital certificate are stored in the second electronic device.
  • the second digital certificate includes a second public key and a signature of the second public key by the first preset server.
  • Step 205 At the second electronic device, obtain the first digital certificate and the first encrypted information carried in the first information code by scanning the first information code.
  • Step 206 At the second electronic device, parse the first digital certificate through a pre-stored third public key to obtain a first public key.
  • Step 207 At the second electronic device, parse the first encrypted information through the first public key to obtain the payment information.
  • Step 208 Display the payment information at the second electronic device.
  • Step 209 In response to the confirmation operation on the obtained payment information, encrypt the parsed payment information with a second private key stored in advance at the second electronic device to generate second encrypted information .
  • Step 210 At the second electronic device, generate a second information code by using a pre-stored second digital certificate and the first encrypted information, and display the second information code.
  • Step 211 At the first electronic device, obtain the second digital certificate and the second encrypted information carried in the second information code by scanning the second information code.
  • Step 212 At the first electronic device, parse the second digital certificate through a pre-stored third public key to obtain a second public key.
  • Step 213 At the first electronic device, the second encrypted information is parsed by the second public key to obtain the payment information to be verified.
  • Step 214 At the first electronic device, display the payment information to be checked and accepted.
  • the information about the payment to be checked and accepted includes the payment amount.
  • the second digital certificate includes an offline payment amount
  • the payment client on the first electronic device parses the third public key pre-stored on the first electronic device.
  • the offline payment amount of the payer can also be obtained.
  • the payment information to be checked and accepted also includes the offline payment amount of the payer.
  • Step 215 In response to the confirmation operation on the payment information to be verified, store the second digital certificate and the second encrypted information as an offline payment record at the first electronic device, and output the offline payment record. Payment success information.
  • Step 216 Upload the stored offline payment record to the second preset server at the first electronic device to complete the offline payment record settlement.
  • the payment client on the first electronic device uploads the offline payment record locally stored in the first electronic device to the second preset.
  • the second preset server determines the identity of the payer according to the second digital certificate in each offline payment record, and obtains the public key of the payer according to the second digital certificate, and then passes the public key of the payer Decrypt the second encrypted information in the offline payment record, obtain the payment amount, and complete the settlement of each offline payment record.
  • the first preset server and the second preset server described in the embodiments of the present application may be the same server or different servers.
  • the payee and the payer obtain the platform public key, private key, and digital certificate from the same platform in advance through the client on the electronic device.
  • the digital certificate includes the public key issued by the platform and the signature of the public key, and then use each Your own digital certificate and private key encrypt and/or sign the payment information transmitted to the other party, and then generate an information code and display it to the other party for scanning and confirmation; the other party uses the platform public key stored on their electronic device to verify the other party’s digital
  • the certificate performs signature verification and analysis, obtains the public key of the other party, and decrypts the encrypted information obtained by scanning the information code by the public key of the other party, thereby completing offline payment.
  • the public key, private key, and digital certificate used to encrypt, decrypt, and verify the transmitted payment data are obtained in advance from a certified platform and stored in the electronic device Locally, data encryption has higher security and is not easy to be cracked, which can greatly improve the security of offline payments.
  • the offline payment record can be completed Settlement, and finally complete the transfer of currency or other resources from the payer’s account to the payee’s account.
  • An offline payment device disclosed in an embodiment of the present application, as shown in FIG. 3, includes:
  • the first encrypted information generating module 301 is configured to, in response to an operation of initiating an offline payment, encrypt the payment information by using a pre-stored first private key at the first electronic device to generate first encrypted information;
  • the first information code display module 302 is configured to generate a first information code according to a pre-stored first digital certificate and the first encrypted information at the first electronic device, and display the first information code;
  • the first digital certificate and encrypted information obtaining module 303 is configured to obtain the first digital certificate and the first encrypted information carried in the first information code by scanning the first information code at the second electronic device information;
  • the first public key obtaining module 304 is configured to obtain the first public key by parsing the first digital certificate through the pre-stored third public key at the second electronic device;
  • the collection information acquisition module 305 is configured to parse the first encrypted information through the first public key at the second electronic device to obtain the collection information;
  • the second encrypted information generating module 306 is configured to, in response to a confirmation operation on the received payment information, perform a pre-stored second private key on the parsed payment information at the second electronic device Encrypt, generate second encrypted information;
  • the second information code display module 307 is configured to generate a second information code by using a pre-stored second digital certificate and the first encrypted information at the second electronic device, and display the second information code;
  • the second digital certificate and encrypted information obtaining module 308 is configured to obtain the second digital certificate and the first digital certificate carried in the second information code by scanning the second information code at the first electronic device 2. Encrypted information;
  • the second public key obtaining module 309 is configured to parse the second digital certificate by using a pre-stored third public key at the first electronic device to obtain a second public key;
  • the payment information verification module 310 is configured to parse the second encrypted information through the second public key at the first electronic device to obtain the payment information to be verified;
  • the offline payment module 311 is configured to store the second digital certificate and the second encrypted information as an offline payment record in the first electronic device in response to the confirmation operation of the payment information to be verified , And output the offline payment success information.
  • the device further includes:
  • the first payment-related information acquisition module 312 is configured to encrypt the payment information by using the pre-stored first private key at the first electronic device in response to the operation of initiating an offline payment, and generate the first encrypted information before generating the first encrypted information.
  • a first private key, a third public key, and a first digital certificate are obtained through a first preset server, and the first private key, third public key and the first digital certificate are stored in the first electronic device.
  • Key and a first digital certificate where the first digital certificate includes a first public key and a signature of the first public key by the first preset server;
  • the second payment-related information acquisition module 313 is configured to, at the second electronic device, parse the first digital certificate through the pre-stored third public key to obtain the first public key, and then at the second electronic device , Obtain the second private key, the third public key and the second digital certificate through the first preset server, and store the second private key, the third public key and the second digital certificate in the second electronic device.
  • the device further includes:
  • the payment failure prompt module 314 is configured to obtain the first public key after parsing the first digital certificate by using the pre-stored third public key at the second electronic device, and when the first public key fails to be obtained Next, output payment failure information at the second electronic device.
  • the device further includes:
  • the payment cancellation module 315 is configured to parse the first encrypted information through the first public key at the second electronic device to obtain the payment information, and then respond to the request to the received payment information Cancel the operation and end the offline payment.
  • the second digital certificate includes offline payment quota information, as shown in FIG. 4, the device further includes:
  • the payment capability verification module 316 is configured to parse the second encrypted information through the second public key at the first electronic device to obtain the payment information to be verified, and then display the information on the first electronic device.
  • the offline payment quota information and the payment information to be verified are used to verify the payment ability.
  • the second digital certificate includes offline payment quota information, as shown in FIG. 4, the device further includes:
  • the offline payment settlement module 317 is configured to use the second digital certificate and the second encrypted information as an offline payment record at the first electronic device in response to the confirmation operation of the payment information to be checked and accepted After storing and outputting the offline payment success information, at the first electronic device, upload the stored offline payment record to the second preset server to complete the offline payment record settlement.
  • modules of the offline payment device disclosed in some embodiments of the present application may all be distributed in the same electronic device, as shown in FIG. 4.
  • the above-mentioned modules of the offline payment apparatus disclosed in other embodiments of the present application may also be partially distributed on the first electronic device, and the other part may be distributed on the second electronic device, as shown in FIG. 5.
  • the collection information verification module 310, the offline payment module 311, the first payment associated information acquisition module 312, the payment capability verification module 316, and the offline payment settlement module 317 are provided at the first electronic device;
  • the payment failure prompt module 314 and the payment cancellation module 315 are provided at the second electronic device.
  • the offline payment device disclosed in the embodiment of the present application is used to implement the offline payment method described in the first embodiment or the second embodiment of the present application.
  • the specific implementation of each module of the device will not be described in detail, and please refer to the corresponding steps of the method embodiment Detailed ways.
  • the payment information in response to an operation of initiating an offline payment, is encrypted by the first private key stored in advance at the first electronic device to generate the first encrypted information;
  • a first information code is generated according to the pre-stored first digital certificate and the first encrypted information, and the first information code is displayed;
  • at a second electronic device by scanning the first information code Obtain the first digital certificate and the first encrypted information carried in the first information code;
  • at the second electronic device parse the first digital certificate through a pre-stored third public key to obtain the first digital certificate A public key;
  • the first encrypted information is parsed by the first public key to obtain the payment information; in response to the confirmation operation on the received payment information,
  • the second electronic device encrypts the parsed payment information with a pre-stored second private key to generate second encrypted information;
  • at the second electronic device a pre-stored second digital certificate And the first encrypted information to generate a second information code, and display the second information code;
  • the payee identifier and the offline payment service subdomain carried in the QR code are used to map offline to obtain the public key, and the mapping code is executed offline through decompilation technology. It is easy to get the mapping algorithm, and then to know the entire mapping process, you can also get the private key. Therefore, the security of offline payment cannot be guaranteed.
  • the payee and the payer obtain the platform public key, private key, and digital certificate from the same platform in advance through the client on the electronic device.
  • the digital certificate includes the public key and the digital certificate issued by the platform. Sign the public key, and then each use its own digital certificate and private key to encrypt and/or sign the payment information transmitted to the other party, and then generate an information code to display to the other party for the other party to scan and confirm; the other party uses their own electronic equipment
  • the platform public key stored on the platform verifies and parses the counterparty's digital certificate, obtains the counterparty's public key, and decrypts the encrypted information obtained by scanning the information code through the counterparty's public key, thereby completing offline payment.
  • the public key, private key, and digital certificate used to encrypt, decrypt, and verify the transmitted payment data are obtained in advance from an authentication platform and stored in the electronic device Locally, data encryption has higher security and is not easy to be cracked, which can greatly improve the security of offline payments.
  • this application also discloses an electronic device, including a memory, a processor, and a computer program stored on the memory and capable of running on the processor.
  • the processor executes the computer program, the implementation is as in this application.
  • the electronic device may be a PC, a mobile terminal, a personal digital assistant, a tablet computer, etc.
  • the application also discloses a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the offline payment method as described in Embodiment 1 or Embodiment 2 of the present application are realized.
  • the device embodiments described above are merely illustrative.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments. Those of ordinary skill in the art can understand and implement without creative work.
  • each implementation manner can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware.
  • the above technical solution essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic A disc, an optical disc, etc., include a number of instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiment.
  • a microprocessor or a digital signal processor may be used in practice to implement some or all of the functions of some or all of the components in the electronic device according to the embodiments of the present application.
  • the present invention can also be implemented as a device or device program (for example, a computer program and a computer program product) for executing part or all of the methods described herein.
  • a program for realizing the present application may be stored on a computer-readable medium, or may have the form of one or more signals.
  • Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
  • FIG. 6 shows an electronic device that can implement the method according to the present application.
  • the electronic device traditionally includes a processor 620 and a computer program product in the form of a memory 610 or a computer-readable medium.
  • the memory 610 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the memory 610 has a storage space 6101 for executing the program code 6102 of any method step in the foregoing method.
  • the storage space 6101 for program codes may include various program codes 6102 for respectively implementing various steps in the above method. These program codes can be read from or written into one or more computer program products.
  • These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards, or floppy disks.
  • Such a computer program product is usually a portable or fixed storage unit as described with reference to FIG. 7.
  • the storage unit may have storage segments, storage spaces, etc. arranged similarly to the storage 620 in the electronic device of FIG. 6.
  • the program code can be compressed in an appropriate form, for example.
  • the storage unit includes computer-readable codes 6102', that is, codes that can be read by, for example, a processor such as 610. These codes, when run by an electronic device, cause the electronic device to execute each of the methods described above. step.
  • any reference signs placed between parentheses should not be constructed as a limitation to the claims.
  • the word “comprising” does not exclude the presence of elements or steps not listed in the claims.
  • the word “a” or “an” preceding an element does not exclude the presence of multiple such elements.
  • the application can be realized by means of hardware including several different elements and by means of a suitably programmed computer. In the unit claims that list several devices, several of these devices may be embodied in the same hardware item.
  • the use of the words first, second, and third, etc. do not indicate any order. These words can be interpreted as names.

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

一种离线支付方法,属于计算机技术领域。所述方法包括:收款方和付款方通过电子设备上的客户端预先从同一平台获取平台公钥、私钥和数字证书,数字证书中包括平台发放的公钥和对公钥的签名,并各自用自己的数字证书和私钥对传输给对方的支付信息进行加密和/或签名,生成信息码展示给对方,供对方扫描;对方通过各自电子设备上存储的平台公钥对对方数字证书进行验证、解析,得到对方公钥,并通过该公钥对扫描信息码得到的加密信息进行解密,从而完成离线支付,其中,公钥、私钥和数字证书是预先从具有认证资格的平台获取并存储在电子设备本地,数据加密安全性更高,不易被破解,能够提升离线支付的安全性。

Description

离线支付
本申请要求在2019年11月01日提交中国专利局、申请号为201911061324.5、发明名称为“离线支付方法、装置、电子设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及计算机技术领域,特别是涉及离线支付。
背景技术
随着互联网和通信技术的发展,移动支付的应用场景越来越多。离线支付的需求也越来越多。现有技术中常用的离线支付技术,通常需要支付方和接收方基于蓝牙、近场通信等通信方式建立通信链路,然后,基于建立的通信链路传输支付数据,以完成支付。例如,现有技术中的一种离线支付方式法,以付款方和收款方的账号作为标识ID,根据业务子域标识映射出对应的公、私钥对;收款方选取随机数,用私钥对随机数签名,生成二维码;付款方扫描二维码,用收款方ID和业务子域标识映射出公钥,对签名信息验签;若验签成功,则付款方按照交易信息成功付款;付款后付款方用私钥对随机数签名,生成二维码;收款方扫描二维码,用付款方ID和业务子域标识映射出公钥,对签名信息验签;若验签成功,则收款方成功入账。
上述支付方法中,需要经过多次握手,建立通信链路,进行支付数据的传输。
发明内容
第一方面,本申请实施例提供了一种离线支付方法,包括:
响应于发起离线支付的操作,在第一电子设备处通过预先存储的第一私钥对收款信息进行加密,生成第一加密信息;
在所述第一电子设备处,根据预先存储的第一数字证书和所述第一加密信息生成第一信息码,并展示所述第一信息码;
在第二电子设备处,通过扫描所述第一信息码获取所述第一信息码中携 带的所述第一数字证书和所述第一加密信息;
在所述第二电子设备处,通过预先存储的第三公钥解析所述第一数字证书获取第一公钥;
在所述第二电子设备处,通过所述第一公钥解析所述第一加密信息,得到所述收款信息;
响应于对得到的所述收款信息的确认操作,在所述第二电子设备处通过预先存储的第二私钥对解析得到的所述收款信息进行加密,生成第二加密信息;
在所述第二电子设备处,通过预先存储的第二数字证书和所述第一加密信息生成第二信息码,并展示所述第二信息码;
在所述第一电子设备处,通过扫描所述第二信息码获取所述第二信息码中携带的所述第二数字证书和所述第二加密信息;
在所述第一电子设备处,通过预先存储的第三公钥解析所述第二数字证书,获取第二公钥;
在所述第一电子设备处,通过所述第二公钥解析所述第二加密信息,得到待核验收款信息;
响应于对所述待核验收款信息的确认操作,在所述第一电子设备处将所述第二数字证书和所述第二加密信息作为一条离线支付记录进行存储,并输出离线支付成功信息。
第二方面,本申请实施例提供了一种离线支付装置,包括:
第一加密信息生成模块,用于响应于发起离线支付的操作,在第一电子设备处通过预先存储的第一私钥对收款信息进行加密,生成第一加密信息;
第一信息码展示模块,用于在所述第一电子设备处,根据预先存储的第一数字证书和所述第一加密信息生成第一信息码,并展示所述第一信息码;
第一数字证书和加密信息获取模块,用于在第二电子设备处,通过扫描所述第一信息码获取所述第一信息码中携带的所述第一数字证书和所述第一加密信息;
第一公钥获取模块,用于在所述第二电子设备处,通过预先存储的第三公钥解析所述第一数字证书获取第一公钥;
收款信息获取模块,用于在所述第二电子设备处,通过所述第一公钥解析所述第一加密信息,得到所述收款信息;
第二加密信息生成模块,用于响应于对得到的所述收款信息的确认操 作,在所述第二电子设备处通过预先存储的第二私钥对解析得到的所述收款信息进行加密,生成第二加密信息;
第二信息码展示模块,用于在所述第二电子设备处,通过预先存储的第二数字证书和所述第一加密信息生成第二信息码,并展示所述第二信息码;
第二数字证书和加密信息获取模块,用于在所述第一电子设备处,通过扫描所述第二信息码获取所述第二信息码中携带的所述第二数字证书和所述第二加密信息;
第二公钥获取模块,用于在所述第一电子设备处,通过预先存储的第三公钥解析所述第二数字证书,获取第二公钥;
收款信息核验模块,用于在所述第一电子设备处,通过所述第二公钥解析所述第二加密信息,得到待核验收款信息;
离线支付模块,用于响应于对所述待核验收款信息的确认操作,在所述第一电子设备处将所述第二数字证书和所述第二加密信息作为一条离线支付记录进行存储,并输出离线支付成功信息。
第三方面,本申请实施例还公开了一种电子设备,包括存储器、处理器及存储在所述存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现本申请实施例所述的离线支付方法。
第四方面,本申请实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时本申请实施例公开的离线支付方法的步骤。
本申请实施例公开的离线支付方法,通过响应于发起离线支付的操作,在第一电子设备处通过预先存储的第一私钥对收款信息进行加密,生成第一加密信息;在所述第一电子设备处,根据预先存储的第一数字证书和所述第一加密信息生成第一信息码,并展示所述第一信息码;在第二电子设备处,通过扫描所述第一信息码获取所述第一信息码中携带的所述第一数字证书和所述第一加密信息;在所述第二电子设备处,通过预先存储的第三公钥解析所述第一数字证书获取第一公钥;在所述第二电子设备处,通过所述第一公钥解析所述第一加密信息,得到所述收款信息;响应于对得到的所述收款信息的确认操作,在所述第二电子设备处通过预先存储的第二私钥对解析得到的所述收款信息进行加密,生成第二加密信息;在所述第二电子设备处,通过预先存储的第二数字证书和所述第一加密信息生成第二信息码,并展示所述第二信息码;在所述第一电子设备处,通过扫描所述第二信息码获取所 述第二信息码中携带的所述第二数字证书和所述第二加密信息;在所述第一电子设备处,通过预先存储的第三公钥解析所述第二数字证书,获取第二公钥;在所述第一电子设备处,通过所述第二公钥解析所述第二加密信息,得到待核验收款信息;响应于对所述待核验收款信息的确认操作,在所述第一电子设备处存储所述第二数字证书和所述第二加密信息,并输出离线支付成功信息,有助于提升离线支付的安全性。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例一的离线支付方法流程图;
图2是本申请实施例二所示的离线支付方法流程示意图;
图3是本申请实施例二的离线支付装置结构示意图之一;
图4是本申请实施例二的离线支付装置结构示意图之二;
图5是本申请实施例二的离线支付装置结构示意图之三;
图6示出了用于执行根据本申请的方法的电子设备的框图;以及,
图7示出了用于保持或者携带实现根据本申请的方法的程序代码的存储单元。
具体实施例
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
实施例一
本申请实施例公开的一种离线支付方法,如图1所示,所述方法包括:步骤101至步骤111。
步骤101,响应于发起离线支付的操作,在第一电子设备处通过预先存储的第一私钥对收款信息进行加密,生成第一加密信息。
本申请实施例中公开的离线支付方法适用于收款方和付款方均处于离 线状态的支付场景中,也适用于收款方处于在线状态的支付场景中。为了便于读者理解本申请解决的技术问题,本实施例中,以收款方和付款方均处于离线状态的支付场景举例说明本申请公开的离线支付方法的具体技术方案。
以下实施例中,第一电子设备代表收款方的电子设备,第二电子设备代表付款方的电子设备。所述电子设备可以为智能手机、智能手表、平板电脑等能够扫描二维码、条形码等信息码的电子设备。
具体实施时,收款方通过第一电子设备内预置的支付客户端输入支付信息,如支付金额,然后触发离线支付操作。通过所述支付客户端响应于收款方发起离线支付的操作,获取预先存储在所述第一电子设备本地的第一私钥。
本申请的一些实施例中,在响应于发起离线支付的操作,在第一电子设备处通过预先存储的第一私钥对收款信息进行加密,生成第一加密信息之前,所述方法还包括:在所述第一电子设备处,通过第一预设服务端获取第一私钥、第三公钥和第一数字证书,并在所述第一电子设备处存储所述第一私钥、第三公钥和第一数字证书,其中,所述第一数字证书包括第一公钥和所述第一预设服务端对所述第一公钥的签名。其中,所述第一预设服务端可以为数字证书颁发机构,也可以为第三方支付平台。例如,收款方在执行离线支付之前,首先通过第一电子设备上的支付客户端向所述第一预设服务端申请离线支付需要的相关认证信息。所述离线支付需要的相关认证信息包括但不限于:公钥、私钥、数字证书等。其中,公钥用于解析通过所述第一预设服务端颁发的私钥加密的数据;私钥和数字证书与用户一一匹配,私钥用于对用户的数据进行加密;数字证书用于对用户数据进行签名,以标识数据来源,通常发给收款方或付款方的公钥包含在数字证书中。本申请实施例中,将收款方通过所述第一预设服务端获取的公钥、私钥、数字证书分别称为:第一公钥、第一私钥和第一数字证书,其中,第一公钥包含在第一数字证书中,所述第一数字证书中还包括所述第一预设服务端对第一公钥的签名。
所述第一预设服务端还为收款方或付款方发放第一预设服务端公钥,用于解析所述第一预设服务端发放的数字证书。本申请实施例中,将第一预设服务端公钥称为第三公钥。
第一电子设备上的支付客户端通过预先存储的第一私钥对收款方输入的收款信息进行加密,生成第一加密信息。
步骤102,在所述第一电子设备处,根据预先存储的第一数字证书和所 述第一加密信息生成第一信息码,并展示所述第一信息码。
接下来,第一电子设备上的支付客户端通过所述第一电子设备上预先存储的第一数字证书对所述第一加密信息签名,并按照预设的信息码生成协议,生成携带所述第一加密信息和所述第一数字证书的信息码。
本申请实施例中所述的信息码,可以为二维码、条形码等。
之后,第一电子设备上的支付客户端展示生成的所述第一信息码。
步骤103,在第二电子设备处,通过扫描所述第一信息码获取所述第一信息码中携带的所述第一数字证书和所述第一加密信息。
付款方通过第二电子设备扫描所述第一信息码,然后,按照所述预设的信息码生成协议解析所述第一信息码,获取所述第一信息码中携带的所述第一加密信息和所述第一数字证书。
步骤104,在所述第二电子设备处,通过预先存储的第三公钥解析所述第一数字证书获取第一公钥。
数字证书中包含了公钥信息、数字证书拥有者身份信息(主体)、以及数字证书认证机构(发行者)对数字证书的数字签名。收款方通过第二电子设备上支付客户端获取到收款方的数字证书(即所述第一数字证书)之后,通过所述第二电子设备上预先存储的第三公钥(即数字证书认证机构的公钥)对所述第一数字证书进行验证,验证通过后,解析所述第一数字证书获取第一公钥,即收款方的公钥。其中,所述第三公钥是第一数字证书和第二数字证书发放机构的公钥。
本申请的一些实施例中,所述在所述第二电子设备处,通过预先存储的第三公钥解析所述第一数字证书获取第一公钥之前,还包括:在所述第二电子设备处,通过所述第一预设服务端获取第二私钥、第三公钥和第二数字证书,并在所述第二电子设备处存储所述第二私钥、第三公钥和第二数字证书,其中,所述第二数字证书包括第二公钥和所述第一预设服务端对所述第二公钥的签名。例如,付款方在执行离线支付之前,首先通过第二电子设备上的支付客户端向所述第一预设服务端申请离线支付需要的相关认证信息。所述离线支付需要的相关认证信息包括但不限于:公钥、私钥、数字证书等。其中,公钥用于解析通过所述第一预设服务端颁发的私钥加密的数据;私钥和数字证书与用户一一匹配,私钥用于对用户的数据进行加密;数字证书用于对用户数据进行签名,以标识数据来源。本申请实施例中,将付款方通过所述第一预设服务端获取的公钥、私钥、数字证书分别称为:第二公钥、第二 私钥和第二数字证书,其中,第二公钥包含在第二数字证书中,所述第二数字证书中还包括所述第一预设服务端对所述第二公钥的签名。付款方和收款方通过统一平台获取公钥、私钥、数字证书等离线支付需要的相关认证信息。
本申请的一些实施例中,在所述第二电子设备处,通过预先存储的第三公钥解析所述第一数字证书获取第一公钥时,还包括:在获取所述第一公钥失败的情况下,在所述第二电子设备处输出支付失败信息。例如,当第三公钥和第一公钥为不同平台发放的公钥时,通过第三公钥无法解析第一数字证书,会出现获取第一公钥失败的情况,此时,第二电子设备上的支付客户端将在所述第二电子设备处输出支付失败信息,并结束当前执行的离线支付。
步骤105,在所述第二电子设备处,通过所述第一公钥解析所述第一加密信息,得到所述收款信息。
进一步的,第二电子设备上支付客户端通过所述第一公钥解析所述第一加密信息,得到所述收款信息。其中,收款信息包括支付金额等信息。
步骤106,响应于对得到的所述收款信息的确认操作,在所述第二电子设备处通过预先存储的第二私钥对解析得到的所述收款信息进行加密,生成第二加密信息。
第二电子设备上支付客户端在通过预先存储的第三公钥解析所述第一数字证书的过程中,还可以得到数字证书拥有者身份信息(即收款方的身份信息)。进一步的,第二电子设备上的支付客户端在所述第二电子设备上展示解析得到的收款信息(如支付金额)、收款方的身份信息等,便于付款方核验。
付款方在核验所述收款信息、收款方的身份信息等无误之后,可以执行确认操作,以确认执行本次离线支付。
本申请的一些实施例中,第二电子设备上支付客户端在检测到付款方对所述收款信息的确认操作,通过所述第二电子设备上预先存储的第二私钥对解析得到的所述收款信息进行加密,生成第二加密信息。
本申请的另一些实施例中,所述在所述第二电子设备处,通过所述第一公钥解析所述第一加密信息,得到所述收款信息之后,还包括:响应于对得到的所述收款信息的取消操作,结束离线支付。例如,付款方在核验所述收款信息、收款方的身份信息等后,发现信息不准确,可以执行取消操作,以取消本次离线支付。或者,付款方在核验所述收款信息、收款方的身份信息等后,不希望执行离线支付,则可以执行取消操作,以取消本次离线支付。 当第二电子设备上的支付客户端检测到付款方执行的取消操作之后,将结束本次离线支付。
步骤107,在所述第二电子设备处,通过预先存储的第二数字证书和所述第一加密信息生成第二信息码,并展示所述第二信息码。
当付款方确认执行离线支付之后,第二电子设备上的支付客户端通过所述第二电子设备本地存储的第二数字证书对所述第一加密信息进行签名,并按照所述预设信息码生成协议生成第二信息码,所述第二信息码中携带第二数字证书和第一加密信息。之后,第二电子设备上的支付客户端在所述第二电子设备上展示所述第二信息码。
如前所述,第二信息码可以为二维码、条形码等。
步骤108,在所述第一电子设备处,通过扫描所述第二信息码获取所述第二信息码中携带的所述第二数字证书和所述第二加密信息。
收款方通过第一电子设备上的支付客户端扫描付款方在第二电子设备上展示的第二信息码,然后,按照预设信息码生成协议对所述第二信息码进行解析,提取所述第二信息码中携带的所述第二数字证书和所述第二加密信息。
步骤109,在所述第一电子设备处,通过预先存储的第三公钥解析所述第二数字证书,获取第二公钥。
在收款方通过第一电子设备获取到付款方的第二信息码中携带的所述第二数字证书和所述第二加密信息之后第一电子设备上的支付客户端通过所述第一电子设备上存储的第三公钥(即平台公钥)解析所述第二数字证书,对所述第二数字证书包括的第二公钥进行签名验证,验证成功,获取第二公钥(即付款方的公钥)。
步骤110,在所述第一电子设备处,通过所述第二公钥解析所述第二加密信息,得到待核验收款信息。
接下来,第一电子设备上的支付客户端通过所述第二公钥(即付款方的公钥)解析所述第二加密信息,得到待核验收款信息。其中,所述待核验收款信息可以包括:支付金额等。例如,第一电子设备上的支付客户端通过解析所述第二数字证书,获取到付款方的公钥。进一步的,第一电子设备上的支付客户端通过付款方的公钥,解析付款方的第二信息码中携带的第二加密信息,获取付款信息,所述付款信息中至少包括支付金额。之后,第一电子设备上的支付客户端付款信息,供收款方确认。
本申请的一些实施例中,通过预先存储的第三公钥解析所述第二数字证书时,还可以获取付款方身份信息。
本申请的另一些实施例中,所述第二数字证书中还包括离线支付额度信息,通过预先存储的第三公钥解析所述第二数字证书时,还可以获取付款方的离线支付额度信息。所述在所述第一电子设备处,通过所述第二公钥解析所述第二加密信息,得到待核验收款信息之后,还包括:在所述第一电子设备处展示所述离线支付额度信息和所述待核验收款信息,用于进行支付能力核验。例如,第一电子设备上的支付客户端通过解析所述第二数字证书,获取到付款方离线支付额度信息,以及付款方的公钥。进一步的,第一电子设备上的支付客户端通过付款方的公钥解析付款方的第二信息码中携带的第二加密信息,获取付款信息,所述付款信息中至少包括支付金额。之后,第一电子设备上的支付客户端可以同时展示付款方的离线支付额度信息和支付金额,供收款方确认支付金额是否正确,以及付款方是否有能力支付当前离线支付金额。
通过在付款方的数字证书携带离线支付额度信息(如单次最大离线支付金额),便于收款方核验付款方的支付能力,避免付款方没有能力执行后续的结算,而给收款方带来经济损失,进一步提升离线支付的可靠性。
步骤111,响应于对所述待核验收款信息的确认操作,在所述第一电子设备处将所述第二数字证书和所述第二加密信息作为一条离线支付记录进行存储,并输出离线支付成功信息。
在收款方确认待核验收款信息之后,所述第一电子设备上的支付客户端将所述第二数字证书和所述第二加密信息作为一条离线支付记录存储在所述第一电子设备上,便于后续进行结算。
本申请实施例公开的离线支付方法,通过响应于发起离线支付的操作,在第一电子设备处通过预先存储的第一私钥对收款信息进行加密,生成第一加密信息;在所述第一电子设备处,根据预先存储的第一数字证书和所述第一加密信息生成第一信息码,并展示所述第一信息码;在第二电子设备处,通过扫描所述第一信息码获取所述第一信息码中携带的所述第一数字证书和所述第一加密信息;在所述第二电子设备处,通过预先存储的第三公钥解析所述第一数字证书获取第一公钥;在所述第二电子设备处,通过所述第一公钥解析所述第一加密信息,得到所述收款信息;响应于对得到的所述收款信息的确认操作,在所述第二电子设备处通过预先存储的第二私钥对解析得 到的所述收款信息进行加密,生成第二加密信息;在所述第二电子设备处,通过预先存储的第二数字证书和所述第一加密信息生成第二信息码,并展示所述第二信息码;在所述第一电子设备处,通过扫描所述第二信息码获取所述第二信息码中携带的所述第二数字证书和所述第二加密信息;在所述第一电子设备处,通过预先存储的第三公钥解析所述第二数字证书,获取第二公钥;在所述第一电子设备处,通过所述第二公钥解析所述第二加密信息,得到待核验收款信息;响应于对所述待核验收款信息的确认操作,在所述第一电子设备处存储所述第二数字证书和所述第二加密信息,并输出离线支付成功信息,有助于提升离线支付的安全性。
现有技术中,付款方扫描收款方的二维码后,用二维码中携带的收款方标识和离线支付业务子域,离线映射得到公钥,映射代码离线执行,通过反编译技术很容易得到映射算法,进而获知整个映射过程,同样还可以拿到私钥,因此,离线支付安全性无法保障。
本申请实施例公开的离线支付方法,收款方和付款方通过电子设备上的客户端预先从同一平台获取平台公钥、私钥和数字证书,其中,数字证书中包括平台发放的公钥和对公钥的签名,然后,各自用自己的数字证书和私钥对传输给对方的支付信息进行加密和/或签名,然后生成信息码展示给对方,供对方扫描、确认;对方通过各自电子设备上存储的平台公钥对对方数字证书进行验证、解析,得到对方公钥,并通过对方公钥对扫描信息码得到的加密信息进行解密,从而完成离线支付。本申请实施例公开的离线支付方法中,用于对传输的支付数据进行加密、解密和签名验证的公钥、私钥和数字证书是预先从具有认证资格的平台获取的,并存储在电子设备本地,数据加密安全性更高,不易被破解,能够在很大程度上提升离线支付的安全性。
实施例二
下面结合图2,从离线支付的执行主体之间的信息交互的角度进一步详细说明本申请另一实施例公开的离线支付方法。如图2所示,所述离线支付方法包括步骤201至步骤216。
步骤201,在所述第一电子设备处,通过第一预设服务端获取第一私钥、第三公钥和第一数字证书,并在所述第一电子设备处存储所述第一私钥、第三公钥和第一数字证书。
其中,所述第一数字证书包括第一公钥和所述第一预设服务端对所述第一公钥的签名。
步骤202,响应于发起离线支付的操作,在第一电子设备处通过预先存储的第一私钥对收款信息进行加密,生成第一加密信息。
步骤203,在所述第一电子设备处,根据预先存储的第一数字证书和所述第一加密信息生成第一信息码,并展示所述第一信息码。
步骤204,在所述第二电子设备处,通过所述第一预设服务端获取第二私钥、第三公钥和第二数字证书,并在所述第二电子设备处存储所述第二私钥、第三公钥和第二数字证书。
其中,所述第二数字证书包括第二公钥和所述第一预设服务端对所述第二公钥的签名。
步骤205,在第二电子设备处,通过扫描所述第一信息码获取所述第一信息码中携带的所述第一数字证书和所述第一加密信息。
步骤206,在所述第二电子设备处,通过预先存储的第三公钥解析所述第一数字证书获取第一公钥。
步骤207,在所述第二电子设备处,通过所述第一公钥解析所述第一加密信息,得到所述收款信息。
步骤208,在所述第二电子设备处,展示所述收款信息。
步骤209,响应于对得到的所述收款信息的确认操作,在所述第二电子设备处通过预先存储的第二私钥对解析得到的所述收款信息进行加密,生成第二加密信息。
步骤210,在所述第二电子设备处,通过预先存储的第二数字证书和所述第一加密信息生成第二信息码,并展示所述第二信息码。
步骤211,在所述第一电子设备处,通过扫描所述第二信息码获取所述第二信息码中携带的所述第二数字证书和所述第二加密信息。
步骤212,在所述第一电子设备处,通过预先存储的第三公钥解析所述第二数字证书,获取第二公钥。
步骤213,在所述第一电子设备处,通过所述第二公钥解析所述第二加密信息,得到待核验收款信息。
步骤214,在所述第一电子设备处,展示所述待核验收款信息。
本申请的一些实施例中,所述待核验收款信息包括支付金额。
在本申请的另一些实施例中,所述第二数字证书中包括离线支付金额,在第一电子设备上的支付客户端通过所述第一电子设备上预先存储的第三公钥解析所述第二数字证书时,除了获取第二公钥之外,还可以获取到付款 方的离线支付金额。这种情况下,所述待核验收款信息还包括付款方的离线支付金额。
步骤215,响应于对所述待核验收款信息的确认操作,在所述第一电子设备处将所述第二数字证书和所述第二加密信息作为一条离线支付记录进行存储,并输出离线支付成功信息。
步骤216,在所述第一电子设备处,将存储的所述离线支付记录上传至第二预设服务端,完成离线支付记录结算。
当收款方处于在线状态时,即所述第一电子设备处于在线状态时,所述第一电子设备上的支付客户端将所述第一电子设备本地存储的离线支付记录上传至第二预设服务端,以完成离线支付记录的结算。具体实施时,所述第二预设服务端根据每条离线支付记录中的第二数字证书确定付款方的身份,并根据第二数字证书获取付款方的公钥,然后通过付款方的公钥对所述离线支付记录中的第二加密信息解密,获取支付金额,并完成每条离线支付记录的结算。
本申请实施例中所述的第一预设服务端和第二预设服务端可以为同一服务端,也可以为不同服务端。
收款方和付款方通过电子设备上的客户端预先从同一平台获取平台公钥、私钥和数字证书,其中,数字证书中包括平台发放的公钥和对公钥的签名,然后,各自用自己的数字证书和私钥对传输给对方的支付信息进行加密和/或签名,然后生成信息码展示给对方,供对方扫描、确认;对方通过各自电子设备上存储的平台公钥对对方的数字证书进行签名验证和解析,获取对方公钥,由对方公钥对扫描信息码得到的加密信息进行解密,从而完成离线支付。本申请实施例公开的离线支付方法中,用于对传输的支付数据进行加密、解密和签名验证的公钥、私钥和数字证书是预先从具有认证资格的平台获取的,并存储在电子设备本地,数据加密安全性更高,不易被破解,能够在很大程度上提升离线支付的安全性。
进一步的,通过在第一电子设备上存储离线支付记录,然后当第一电子设备在线时,通过第一电子设备将存储的第一电子设备上传至第二预设服务端,可以完成离线支付记录结算,最终完成货币或其他资源由付款方账户到收款方账户的转移。
实施例三
本申请实施例公开的一种离线支付装置,如图3所示,所述装置包括:
第一加密信息生成模块301,用于响应于发起离线支付的操作,在第一电子设备处通过预先存储的第一私钥对收款信息进行加密,生成第一加密信息;
第一信息码展示模块302,用于在所述第一电子设备处,根据预先存储的第一数字证书和所述第一加密信息生成第一信息码,并展示所述第一信息码;
第一数字证书和加密信息获取模块303,用于在第二电子设备处,通过扫描所述第一信息码获取所述第一信息码中携带的所述第一数字证书和所述第一加密信息;
第一公钥获取模块304,用于在所述第二电子设备处,通过预先存储的第三公钥解析所述第一数字证书获取第一公钥;
收款信息获取模块305,用于在所述第二电子设备处,通过所述第一公钥解析所述第一加密信息,得到所述收款信息;
第二加密信息生成模块306,用于响应于对得到的所述收款信息的确认操作,在所述第二电子设备处通过预先存储的第二私钥对解析得到的所述收款信息进行加密,生成第二加密信息;
第二信息码展示模块307,用于在所述第二电子设备处,通过预先存储的第二数字证书和所述第一加密信息生成第二信息码,并展示所述第二信息码;
第二数字证书和加密信息获取模块308,用于在所述第一电子设备处,通过扫描所述第二信息码获取所述第二信息码中携带的所述第二数字证书和所述第二加密信息;
第二公钥获取模块309,用于在所述第一电子设备处,通过预先存储的第三公钥解析所述第二数字证书,获取第二公钥;
收款信息核验模块310,用于在所述第一电子设备处,通过所述第二公钥解析所述第二加密信息,得到待核验收款信息;
离线支付模块311,用于响应于对所述待核验收款信息的确认操作,在所述第一电子设备处将所述第二数字证书和所述第二加密信息作为一条离线支付记录进行存储,并输出离线支付成功信息。
本申请的一些实施例中,如图4所示,所述装置还包括:
第一支付关联信息获取模块312,用于在响应于发起离线支付的操作,在第一电子设备处通过预先存储的第一私钥对收款信息进行加密,生成第一 加密信息之前,在所述第一电子设备处,通过第一预设服务端获取第一私钥、第三公钥和第一数字证书,并在所述第一电子设备处存储所述第一私钥、第三公钥和第一数字证书,所述第一数字证书包括第一公钥和所述第一预设服务端对所述第一公钥的签名;
第二支付关联信息获取模块313,用于在所述第二电子设备处,通过预先存储的第三公钥解析所述第一数字证书获取第一公钥之前,在所述第二电子设备处,通过所述第一预设服务端获取第二私钥、第三公钥和第二数字证书,并在所述第二电子设备处存储所述第二私钥、第三公钥和第二数字证书,所述第二数字证书包括第二公钥和所述第一预设服务端对所述第二公钥的签名。
本申请的一些实施例中,如图4所示,所述装置还包括:
支付失败提示模块314,用于在所述第二电子设备处,通过预先存储的第三公钥解析所述第一数字证书获取第一公钥之后,在获取所述第一公钥失败的情况下,在所述第二电子设备处输出支付失败信息。
本申请的一些实施例中,如图4所示,所述装置还包括:
取消支付模块315,用于在所述第二电子设备处,通过所述第一公钥解析所述第一加密信息,得到所述收款信息之后,响应于对得到的所述收款信息的取消操作,结束离线支付。
本申请的一些实施例中,所述第二数字证书中包括离线支付额度信息,如图4所示,所述装置还包括:
支付能力核验模块316,用于在所述第一电子设备处,通过所述第二公钥解析所述第二加密信息,得到待核验收款信息之后,在所述第一电子设备处展示所述离线支付额度信息和所述待核验收款信息,用于进行支付能力核验。
本申请的一些实施例中,所述第二数字证书中包括离线支付额度信息,如图4所示,所述装置还包括:
离线支付结算模块317,用于在响应于对所述待核验收款信息的确认操作,在所述第一电子设备处将所述第二数字证书和所述第二加密信息作为一条离线支付记录进行存储,并输出离线支付成功信息之后,在所述第一电子设备处,将存储的所述离线支付记录上传至第二预设服务端,完成离线支付记录结算。
本申请一些实施例公开的离线支付装置的上述各模块可以全部分布在 同一个电子设备中,如图4所示。
本申请另一些实施例公开的离线支付装置的上述各模块也可以部分分布在第一电子设备上,另一部分分布在第二电子设备上,如图5所示。如图5所示的离线支付装置中,所述第一加密信息生成模块301、所述第一信息码展示模块302、第二数字证书和加密信息获取模块308、第二公钥获取模块309、收款信息核验模块310、离线支付模块311,以及所述第一支付关联信息获取模块312、支付能力核验模块316和离线支付结算模块317设置在第一电子设备处;所述第一数字证书和加密信息获取模块303、第一公钥获取模块304、收款信息获取模块305、第二加密信息生成模块306、第二信息码展示模块307,以及,所述第二支付关联信息获取模块313、支付失败提示模块314和取消支付模块315设置在第二电子设备处。
本申请实施例公开的离线支付装置,用于实现本申请实施例一或实施例二中所述的离线支付方法,装置的各模块的具体实施方式不再赘述,可参见方法实施例相应步骤的具体实施方式。
本申请实施例公开的离线支付装置,通过响应于发起离线支付的操作,在第一电子设备处通过预先存储的第一私钥对收款信息进行加密,生成第一加密信息;在所述第一电子设备处,根据预先存储的第一数字证书和所述第一加密信息生成第一信息码,并展示所述第一信息码;在第二电子设备处,通过扫描所述第一信息码获取所述第一信息码中携带的所述第一数字证书和所述第一加密信息;在所述第二电子设备处,通过预先存储的第三公钥解析所述第一数字证书获取第一公钥;在所述第二电子设备处,通过所述第一公钥解析所述第一加密信息,得到所述收款信息;响应于对得到的所述收款信息的确认操作,在所述第二电子设备处通过预先存储的第二私钥对解析得到的所述收款信息进行加密,生成第二加密信息;在所述第二电子设备处,通过预先存储的第二数字证书和所述第一加密信息生成第二信息码,并展示所述第二信息码;在所述第一电子设备处,通过扫描所述第二信息码获取所述第二信息码中携带的所述第二数字证书和所述第二加密信息;在所述第一电子设备处,通过预先存储的第三公钥解析所述第二数字证书,获取第二公钥;在所述第一电子设备处,通过所述第二公钥解析所述第二加密信息,得到待核验收款信息;响应于对所述待核验收款信息的确认操作,在所述第一电子设备处存储所述第二数字证书和所述第二加密信息,并输出离线支付成功信息,有助于提升离线支付的安全性。
现有技术中,付款方扫描收款方的二维码后,用二维码中携带的收款方标识和离线支付业务子域,离线映射得到公钥,映射代码离线执行,通过反编译技术很容易得到映射算法,进而获知整个映射过程,同样还可以拿到私钥,因此,离线支付安全性无法保障。
本申请实施例公开的离线支付装置,收款方和付款方通过电子设备上的客户端预先从同一平台获取平台公钥、私钥和数字证书,其中,数字证书中包括平台发放的公钥和对公钥的签名,然后,各自用自己的数字证书和私钥对传输给对方的支付信息进行加密和/或签名,然后生成信息码展示给对方,供对方扫描、确认;对方通过各自电子设备上存储的平台公钥对对方数字证书进行验证、解析,得到对方公钥,并通过对方公钥对扫描信息码得到的加密信息进行解密,从而完成离线支付。本申请实施例公开的离线支付装置中,用于对传输的支付数据进行加密、解密和签名验证的公钥、私钥和数字证书是预先从具有认证资格的平台获取的,并存储在电子设备本地,数据加密安全性更高,不易被破解,能够在很大程度上提升离线支付的安全性。
相应的,本申请还公开了一种电子设备,包括存储器、处理器及存储在所述存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如本申请实施例一或实施例二所述的离线支付方法。所述电子设备可以为PC机、移动终端、个人数字助理、平板电脑等。
本申请还公开了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本申请实施例一或实施例二所述的离线支付方法的步骤。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上对本申请提供的一种离线支付方法及装置进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或 者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件实现。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本申请实施例的电子设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本申请的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
例如,图6示出了可以实现根据本申请的方法的电子设备。该电子设备传统上包括处理器620和以存储器610形式的计算机程序产品或者计算机可读介质。存储器610可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器610具有用于执行上述方法中的任何方法步骤的程序代码6102的存储空间6101。例如,用于程序代码的存储空间6101可以包括分别用于实现上面的方法中的各种步骤的各个程序代码6102。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图7所述的便携式或者固定存储单元。该存储单元可以具有与图6的电子设备中的存储器620类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码6102’,即可以由例如诸如610之类的处理器读取的代码,这些代码当由电子设备运行时,导致该电子设备执行上面所描述的方法中的各个步骤。
本文中所称的“一个实施例”、“实施例”或者“一个或者多个实施例”意味着,结合实施例描述的特定特征、结构或者特性包括在本申请的至少一个实施例中。此外,请注意,这里“在一个实施例中”的词语例子不一定全指同一个实施例。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本申请的实施例可以在没有这些具体细节的情况下被实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。
在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本申请可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (15)

  1. 一种离线支付方法,包括:
    响应于发起离线支付的操作,在第一电子设备处通过预先存储的第一私钥对收款信息进行加密,生成第一加密信息;
    在所述第一电子设备处,根据预先存储的第一数字证书和所述第一加密信息生成第一信息码,并展示所述第一信息码;
    在第二电子设备处,通过扫描所述第一信息码获取所述第一信息码中携带的所述第一数字证书和所述第一加密信息;
    在所述第二电子设备处,通过预先存储的第三公钥解析所述第一数字证书获取第一公钥;
    在所述第二电子设备处,通过所述第一公钥解析所述第一加密信息,得到所述收款信息;
    响应于对得到的所述收款信息的确认操作,在所述第二电子设备处通过预先存储的第二私钥对解析得到的所述收款信息进行加密,生成第二加密信息;
    在所述第二电子设备处,通过预先存储的第二数字证书和所述第一加密信息生成第二信息码,并展示所述第二信息码;
    在所述第一电子设备处,通过扫描所述第二信息码获取所述第二信息码中携带的所述第二数字证书和所述第二加密信息;
    在所述第一电子设备处,通过预先存储的第三公钥解析所述第二数字证书,获取第二公钥;
    在所述第一电子设备处,通过所述第二公钥解析所述第二加密信息,得到待核验收款信息;
    响应于对所述待核验收款信息的确认操作,在所述第一电子设备处将所述第二数字证书和所述第二加密信息作为一条离线支付记录进行存储,并输出离线支付成功信息。
  2. 根据权利要求1所述的方法,所述响应于发起离线支付的操作,在第一电子设备处通过预先存储的第一私钥对收款信息进行加密,生成第一加密信息的步骤之前,所述方法还包括:
    在所述第一电子设备处,通过第一预设服务端获取第一私钥、第三公钥和第一数字证书,并在所述第一电子设备处存储所述第一私钥、第三公钥和 第一数字证书,所述第一数字证书包括第一公钥和所述第一预设服务端对所述第一公钥的签名;
    所述在所述第二电子设备处,通过预先存储的第三公钥解析所述第一数字证书获取第一公钥的步骤之前,还包括:
    在所述第二电子设备处,通过所述第一预设服务端获取第二私钥、第三公钥和第二数字证书,并在所述第二电子设备处存储所述第二私钥、第三公钥和第二数字证书,所述第二数字证书包括第二公钥和所述第一预设服务端对所述第二公钥的签名。
  3. 根据权利要求2所述的方法,所述在所述第二电子设备处,通过预先存储的第三公钥解析所述第一数字证书获取第一公钥的步骤之后,还包括:
    在获取所述第一公钥失败的情况下,在所述第二电子设备处输出支付失败信息。
  4. 根据权利要求2所述的方法,所述在所述第二电子设备处,通过所述第一公钥解析所述第一加密信息,得到所述收款信息的步骤之后,还包括:
    响应于对得到的所述收款信息的取消操作,结束离线支付。
  5. 根据权利要求2所述的方法,所述第二数字证书中包括离线支付额度信息,所述在所述第一电子设备处,通过所述第二公钥解析所述第二加密信息,得到待核验收款信息之后,还包括:
    在所述第一电子设备处展示所述离线支付额度信息和所述待核验收款信息,用于进行支付能力核验。
  6. 根据权利要求1至5任一项所述的方法,所述响应于对所述待核验收款信息的确认操作,在所述第一电子设备处将所述第二数字证书和所述第二加密信息作为一条离线支付记录进行存储,并输出离线支付成功信息的步骤之后,还包括:
    在所述第一电子设备处,将存储的所述离线支付记录上传至第二预设服务端,完成离线支付记录结算。
  7. 一种离线支付装置,包括:
    第一加密信息生成模块,用于响应于发起离线支付的操作,在第一电子设备处通过预先存储的第一私钥对收款信息进行加密,生成第一加密信息;
    第一信息码展示模块,用于在所述第一电子设备处,根据预先存储的第一数字证书和所述第一加密信息生成第一信息码,并展示所述第一信息码;
    第一数字证书和加密信息获取模块,用于在第二电子设备处,通过扫描所述第一信息码获取所述第一信息码中携带的所述第一数字证书和所述第一加密信息;
    第一公钥获取模块,用于在所述第二电子设备处,通过预先存储的第三公钥解析所述第一数字证书获取第一公钥;
    收款信息获取模块,用于在所述第二电子设备处,通过所述第一公钥解析所述第一加密信息,得到所述收款信息;
    第二加密信息生成模块,用于响应于对得到的所述收款信息的确认操作,在所述第二电子设备处通过预先存储的第二私钥对解析得到的所述收款信息进行加密,生成第二加密信息;
    第二信息码展示模块,用于在所述第二电子设备处,通过预先存储的第二数字证书和所述第一加密信息生成第二信息码,并展示所述第二信息码;
    第二数字证书和加密信息获取模块,用于在所述第一电子设备处,通过扫描所述第二信息码获取所述第二信息码中携带的所述第二数字证书和所述第二加密信息;
    第二公钥获取模块,用于在所述第一电子设备处,通过预先存储的第三公钥解析所述第二数字证书,获取第二公钥;
    收款信息核验模块,用于在所述第一电子设备处,通过所述第二公钥解析所述第二加密信息,得到待核验收款信息;
    离线支付模块,用于响应于对所述待核验收款信息的确认操作,在所述第一电子设备处将所述第二数字证书和所述第二加密信息作为一条离线支付记录进行存储,并输出离线支付成功信息。
  8. 根据权利要求7所述的装置,还包括:
    第一支付关联信息获取模块,用于在所述第一电子设备处,通过第一预设服务端获取第一私钥、第三公钥和第一数字证书,并在所述第一电子设备处存储所述第一私钥、第三公钥和第一数字证书,所述第一数字证书包括第一公钥和所述第一预设服务端对所述第一公钥的签名;
    所述在所述第二电子设备处,通过预先存储的第三公钥解析所述第一数字证书获取第一公钥的步骤之前,还包括:
    第二支付关联信息获取模块,用于在所述第二电子设备处,通过所述第一预设服务端获取第二私钥、第三公钥和第二数字证书,并在所述第二电子设备处存储所述第二私钥、第三公钥和第二数字证书,所述第二数字证书包 括第二公钥和所述第一预设服务端对所述第二公钥的签名。
  9. 根据权利要求8所述的装置,还包括:
    支付失败提示模块,用于在获取所述第一公钥失败的情况下,在所述第二电子设备处输出支付失败信息。
  10. 根据权利要求8所述的装置,还包括:
    取消支付模块,用于响应于对得到的所述收款信息的取消操作,结束离线支付。
  11. 根据权利要求8所述的装置,还包括:
    支付能力核验模块,用于在所述第一电子设备处展示所述离线支付额度信息和所述待核验收款信息,用于进行支付能力核验。
  12. 根据权利要求7至11任一项所述的装置,还包括:
    离线支付结算模块,用于在所述第一电子设备处,将存储的所述离线支付记录上传至第二预设服务端,完成离线支付记录结算。
  13. 一种电子设备,包括存储器、处理器及存储在所述存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现权利要求1至6任意一项所述的离线支付方法。
  14. 一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现权利要求1至6任意一项所述的离线支付方法的步骤。
  15. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备上运行时,导致所述电子设备执行根据权利要求1至6中的任意一项所述的离线支付方法。
PCT/CN2020/096019 2019-11-01 2020-06-15 离线支付 WO2021082466A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911061324.5A CN110930147B (zh) 2019-11-01 2019-11-01 离线支付方法、装置、电子设备及计算机可读存储介质
CN201911061324.5 2019-11-01

Publications (1)

Publication Number Publication Date
WO2021082466A1 true WO2021082466A1 (zh) 2021-05-06

Family

ID=69850190

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/096019 WO2021082466A1 (zh) 2019-11-01 2020-06-15 离线支付

Country Status (2)

Country Link
CN (1) CN110930147B (zh)
WO (1) WO2021082466A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110930147B (zh) * 2019-11-01 2021-12-03 北京三快在线科技有限公司 离线支付方法、装置、电子设备及计算机可读存储介质
CN111461703B (zh) * 2020-03-31 2021-12-24 支付宝(杭州)信息技术有限公司 支付订单校验方法、支付订单校验设备及其激活方法及交易服务器
CN111768185A (zh) * 2020-09-01 2020-10-13 腾讯科技(深圳)有限公司 一种交易数据处理的方法、相关装置以及存储介质
CN112235261B (zh) * 2020-09-26 2023-04-07 建信金融科技有限责任公司 报文加密与解密方法、装置、电子设备及可读存储介质
CN112926960A (zh) * 2021-02-25 2021-06-08 新开普电子股份有限公司 一种双离线交易方法及服务平台
CN113744421B (zh) * 2021-09-17 2023-05-05 北京智芯原动科技有限公司 一种基于蓝牙的端云停车管理系统
WO2024040444A1 (zh) * 2022-08-23 2024-02-29 深圳市大疆创新科技有限公司 数据处理方法、装置、设备、可移动平台、无人机、存储介质及程序产品

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110004539A1 (en) * 2009-05-27 2011-01-06 Jesper Rorbye Angelo Method to enable secure anonymous offline electronic value exchange based on zero knowledge proof, blind signature schemes and double signed exchange history
CN106469370A (zh) * 2016-09-19 2017-03-01 天地融科技股份有限公司 一种交易方法、系统以及电子签名设备
CN109493016A (zh) * 2018-10-24 2019-03-19 中国工商银行股份有限公司 基于数字货币的离线支付方法、终端及代理投放设备
CN110930147A (zh) * 2019-11-01 2020-03-27 北京三快在线科技有限公司 离线支付方法、装置、电子设备及计算机可读存储介质

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230196328A1 (en) * 2013-02-14 2023-06-22 Advanced New Technologies Co., Ltd. Data interaction method and device, and offline credit payment method and device
CN105407079A (zh) * 2015-09-25 2016-03-16 中城智慧科技有限公司 一种新型的终端安全软密钥管理方法
CN105205664A (zh) * 2015-09-25 2015-12-30 中城智慧科技有限公司 一种新型的离线支付方法
CN106452756B (zh) * 2016-11-08 2018-03-30 王栋 可离线验证安全二维码构造验证方法与装置
CN108090761A (zh) * 2017-11-10 2018-05-29 杭州云象网络技术有限公司 基于可信二维码的区块链代币支付方法
CN109495445A (zh) * 2018-09-30 2019-03-19 青岛海尔科技有限公司 基于物联网的身份认证方法、装置、终端、服务器及介质
CN109547208B (zh) * 2018-11-16 2021-11-09 交通银行股份有限公司 金融电子设备主密钥在线分发方法及系统
CN110163598A (zh) * 2019-05-24 2019-08-23 广东飞企互联科技股份有限公司 移动离线支付方法及移动离线支付系统
CN110365472B (zh) * 2019-05-30 2023-08-04 如般量子科技有限公司 基于非对称密钥池对的量子通信服务站数字签名方法、系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110004539A1 (en) * 2009-05-27 2011-01-06 Jesper Rorbye Angelo Method to enable secure anonymous offline electronic value exchange based on zero knowledge proof, blind signature schemes and double signed exchange history
CN106469370A (zh) * 2016-09-19 2017-03-01 天地融科技股份有限公司 一种交易方法、系统以及电子签名设备
CN109493016A (zh) * 2018-10-24 2019-03-19 中国工商银行股份有限公司 基于数字货币的离线支付方法、终端及代理投放设备
CN110930147A (zh) * 2019-11-01 2020-03-27 北京三快在线科技有限公司 离线支付方法、装置、电子设备及计算机可读存储介质

Also Published As

Publication number Publication date
CN110930147A (zh) 2020-03-27
CN110930147B (zh) 2021-12-03

Similar Documents

Publication Publication Date Title
WO2021082466A1 (zh) 离线支付
US10643207B2 (en) Authentication of card-not-present transactions
US20200351272A1 (en) Unified identity verification
AU2018202542B2 (en) Automated account provisioning
US20170249633A1 (en) One-Time Use Password Systems And Methods
US9715686B2 (en) Secure identity authentication in an electronic transaction
CN106575416A (zh) 用于向装置验证客户端的系统和方法
US20120166309A1 (en) Authentication system and authentication method using barcodes
US10325260B2 (en) System, method and computer program product for secure peer-to-peer transactions
US11736476B2 (en) Biometric one touch system
JP6667498B2 (ja) リモート取引システム、方法およびpos端末
KR20150106198A (ko) 인증 방법, 인증 중계 서버 및 단말
TW201317911A (zh) 雲端信用卡交易系統及其交易方法
KR20110107311A (ko) 모바일 네트워크를 이용한 결제 서비스 시스템 및 그 방법, 그리고 이를 위한 컴퓨터 프로그램
KR102140708B1 (ko) 금융 서비스 제공 방법 및 서버
TWM595276U (zh) 使用快速反應碼驗證本人身分的付款系統
KR101770744B1 (ko) 웹을 기반으로 하는 모바일 결제 방법
US11810123B1 (en) System and method for card present account provisioning
TW201921306A (zh) 多維條碼行動支付方法及支付伺服系統
CN113971561A (zh) 一种智能合约处理方法、支付端、接收端、服务端及系统
TW202117625A (zh) 以實名制手機實現的行動交易櫃檯及其交易方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20880460

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20880460

Country of ref document: EP

Kind code of ref document: A1