Off-line payment data processing method, device, equipment, medium and program product
By categorizing and storing transaction credentials in payment devices according to transaction type and forming a chain of transaction credentials, the problem of relying on a single device for uploading transaction credentials in existing offline payments is solved. This achieves efficient and reliable offline payment data processing, improving fund clearing efficiency and user experience.
Patent Information
- Application Number
- CN202511311484.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-15
- Publication Date
- 2026-01-13
AI Technical Summary
In existing offline payment solutions, the asynchronous upload path for transaction vouchers is singular and depends on the network status of the receiving device, resulting in low clearing efficiency and a deteriorating user experience, especially with severe latency in high-concurrency scenarios.
By storing transaction vouchers in payment devices according to transaction type and forming a chain of transaction vouchers, and uploading them in batches to the acceptance device and cloud server when the devices are connected to the network, the dependence on a single device is broken. Offline transactions are established using near-field wireless communication, and encryption and decryption are performed when connected online.
It improves the efficiency and reliability of offline payment transactions, reduces fund clearing delays, optimizes the user experience, supports asynchronous uploads from multiple channels, and ensures data security and integrity.
Smart Images

Figure CN121329408A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing, specifically to an offline payment data processing method, apparatus, device, medium, and program product. Background Technology
[0002] In existing technologies, supporting offline payment transactions has become a critical requirement to ensure payment security and availability. Offline payments typically rely on direct interaction between the payment device and the acceptance device in an environment without network connectivity. After the transaction is completed, the resulting transaction credentials are stored in a chain-like structure in the security module of the payment device. When a component in the payment environment subsequently connects to the network, the temporarily stored transaction credentials are asynchronously uploaded to the backend server for settlement.
[0003] However, existing offline payment solutions have significant drawbacks. First, the asynchronous upload path for transaction vouchers is singular and entirely dependent on the network status of the original receiving device, resulting in low system clearing efficiency. According to the typical process of existing methods, after an offline transaction is completed, the upload of its transaction vouchers depends entirely on the original receiving device that conducted the transaction first restoring its network connection. If that receiving device remains offline, all transaction vouchers it holds cannot be submitted to the back-end system for clearing in a timely manner, leading to problems such as the inability to update user account fund status and delays in merchant fund recovery.
[0004] Secondly, the processing time for offline transactions increases significantly with the accumulation of transaction credentials on payment devices, leading to a sharp deterioration in user experience. As the frequency of offline transactions increases, the chain of locally stored transaction credentials continues to grow, causing the verification time and data processing volume required for a single transaction to rise continuously. Consequently, users must wait for increasingly lengthy interaction times between devices when executing each payment, severely impacting the real-time nature and smoothness of payments, making this technology unsuitable for high-concurrency, fast-paced payment scenarios. Summary of the Invention
[0005] In view of the above problems, this application provides an offline payment data processing method, apparatus, device, medium and program product, which can solve the transaction delay problem caused by the accumulation of transaction vouchers and eliminate the dependence of the asynchronous upload process on a single device, thereby comprehensively improving the transaction efficiency and reliability of offline payment.
[0006] According to a first aspect of this application, an offline payment data processing method is provided, applied to a payment device. The offline payment data processing method includes: in response to establishing an offline payment transaction with a receiving device, receiving a transaction voucher corresponding to the offline payment transaction issued by the receiving device, the transaction voucher including the transaction type of the offline payment transaction; executing the offline payment transaction according to the transaction voucher, obtaining an execution result, the execution result indicating whether the offline payment transaction was successfully executed; if the execution result indicates that the offline payment transaction was successfully executed, storing the transaction vouchers in different storage spaces of the payment device according to different transaction types; forming a transaction voucher chain from at least one transaction voucher in the same storage space and storing them in the same storage space, the transaction voucher chain being used to send to the receiving device when an online connection is established between the payment device and the receiving device; and feeding back the execution result to the receiving device.
[0007] According to an embodiment of this application, the offline payment data processing method further includes: establishing an offline payment transaction with a payment device via near-field wireless communication.
[0008] According to an embodiment of this application, an offline payment transaction is executed based on a transaction voucher to obtain an execution result, including: obtaining the balance of the payment device; if the balance is greater than or equal to the transaction amount in the transaction voucher, determining the execution result, wherein the execution result indicates that the offline payment transaction was successfully executed, and updating the balance according to the transaction amount.
[0009] According to an embodiment of this application, storing transaction vouchers in different storage spaces where the payment device is located according to different transaction types includes: encrypting the transaction voucher to obtain an encrypted transaction voucher; and storing the encrypted transaction voucher in different storage spaces according to different transaction types.
[0010] According to an embodiment of this application, the offline payment data processing method further includes: in response to receiving feedback information sent by the accepting device, releasing the storage space where the transaction voucher chain is located. The feedback information is sent when the accepting device and the payment device establish an online connection, and the transaction voucher obtained by decrypting the transaction voucher chain received from the payment device is uploaded to the cloud server.
[0011] According to a second aspect of this application, an offline payment data processing method is provided, applied to a receiving device. The offline payment data processing method includes: receiving a transaction voucher chain stored in the payment device when an online connection is established with the payment device, decrypting the transaction voucher chain to obtain the transaction voucher stored in the transaction voucher chain, wherein the transaction voucher chain is formed by the payment device and the receiving device through an offline payment transaction; uploading the stored transaction voucher to a cloud server, and sending feedback information to the payment device.
[0012] According to an embodiment of this application, decrypting a transaction certificate chain includes: when there are multiple transaction certificate chains, determining the certificate chain length of each transaction certificate chain, where the certificate chain length represents the number of transaction certificates in the stored transaction certificate chain; determining the priority of the multiple stored transaction certificate chains based on the certificate chain length, and decrypting the multiple transaction certificate chains based on the priority.
[0013] A third aspect of this application provides a payment device, comprising: a transaction voucher receiving module, configured to receive a transaction voucher corresponding to an offline payment transaction issued by a receiving device in response to establishing an offline payment transaction with a receiving device, the transaction voucher including a transaction type of the offline payment transaction; an offline transaction module, configured to execute the offline payment transaction according to the transaction voucher and obtain an execution result, the execution result indicating whether the offline payment transaction can be successfully executed; a transaction voucher storage module, configured to store transaction vouchers in different storage spaces of the payment device according to different transaction types if the execution result indicates that the offline payment transaction has been successfully executed; a voucher chain forming module, configured to form a transaction voucher chain from at least one transaction voucher in the same storage space and store it in the same storage space, the transaction voucher chain being used to send to the receiving device when an online connection is established between the payment device and the receiving device; and a feedback module, configured to feed back the execution result to the receiving device.
[0014] The fourth aspect of this application provides a receiving device, comprising: a credential chain decryption module, used to receive a transaction credential chain stored in the payment device and decrypt the transaction credential chain to obtain the transaction credential stored in the transaction credential chain when an online connection is established with the payment device; the transaction credential chain is formed by the payment device and the receiving device through an offline payment transaction; and a cloud feedback module, used to upload the stored transaction credential to a cloud server and send feedback information to the payment device.
[0015] A fifth aspect of this application provides an electronic device comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.
[0016] A sixth aspect of this application also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.
[0017] A seventh aspect of this application also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.
[0018] The offline payment data processing method, apparatus, device, medium, and program product in this application embodiment store transaction voucher information in the payment device in the form of a transaction voucher chain according to the transaction type. When connected to the acceptance device in the future, the transaction voucher can be transmitted according to the transaction voucher chain, which can solve the problems of transaction vouchers not being updated in a timely manner and the long waiting time when uploading transaction vouchers. Attached Figure Description
[0019] The above-mentioned contents, other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0020] Figure 1 The illustration shows an application scenario diagram of the offline payment data processing method, apparatus, device, medium, and program product according to embodiments of this application;
[0021] Figure 2 A flowchart illustrating an offline payment data processing method applied to a payment device according to an embodiment of this application is shown schematically.
[0022] Figure 3 This illustration schematically shows a structural diagram of multiple transaction certificate chains according to embodiments of this application;
[0023] Figure 4 A flowchart illustrating an offline payment data processing method applied to a payment acceptance device according to an embodiment of this application is shown schematically.
[0024] Figure 5 This illustration schematically shows a flowchart of uploading transaction credentials and sending feedback information according to an embodiment of this application;
[0025] Figure 6 A schematic block diagram of a payment device according to an embodiment of this application is shown.
[0026] Figure 7 This schematic diagram illustrates the structure of a receiving device according to an embodiment of the present application;
[0027] Figure 8 A block diagram schematically illustrates an electronic device suitable for implementing an offline payment data processing method according to an embodiment of this application. Detailed Implementation
[0028] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0029] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0030] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0031] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0032] Figure 1 The diagram illustrates an application scenario of the offline payment data processing method according to an embodiment of this application.
[0033] like Figure 1 As shown, application scenario 100 according to this embodiment may include a payment device 101, a receiving device 102, a receiving device 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the payment device 101, the receiving device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0034] Users can use payment device 101 and acceptance device 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on payment device 101 and acceptance device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (for example only).
[0035] Payment device 101 can be any device with payment function, including but not limited to smartphones, smart cards, wearable devices, and other terminals held by the user and used to initiate payments.
[0036] The payment receiving device 102 can be any electronic device with payment receiving function, including but not limited to fixed or mobile devices such as POS terminals, vending machines and turnstiles that accept payment operations.
[0037] The receiving device 103 can be any electronic device with a display screen and support for web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers, etc., or any electronic device with payment collection function, including but not limited to POS terminals, vending machines, and turnstiles, etc., which are fixed or mobile devices that accept payment operations.
[0038] Server 105 can be a server that provides various services, such as a back-end management server that supports websites browsed by users using payment device 101 and acceptance device 103 (for example only). The back-end management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0039] Please continue reading. Figure 1 When payment device 101 establishes an offline payment transaction with receiving device 102, payment device 101 can receive transaction vouchers issued by receiving device 102 and execute the current offline payment transaction based on the transaction vouchers to obtain the execution result. If the current execution result indicates that the current offline payment transaction has been successfully executed, payment device 101 will store the transaction vouchers in different storage spaces of the payment device according to different transaction types, and form a transaction voucher chain with at least one transaction voucher in the same storage space and store it in the same storage space. Finally, the execution result is fed back to receiving device 102.
[0040] After completing an offline payment transaction, payment device 101 can establish an online connection with acceptance device 103 via network 104. Acceptance device 103 can then decrypt the transaction voucher chain stored in payment device 101 to obtain the transaction voucher from the chain. Acceptance device 103 then uploads the transaction voucher to server 105 via network 104 and sends feedback information to payment device 101.
[0041] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of devices, networks, and servers can be included.
[0042] The following will be based on Figure 1The described scene, through Figures 2-5 The offline payment data processing method according to the embodiments of this application will be described in detail.
[0043] Figure 2 A flowchart illustrating an offline payment data processing method according to an embodiment of this application is shown.
[0044] like Figure 2 As shown, the offline payment data processing method of this embodiment includes operations S210 to S230, and the transaction processing method is executed by the payment device.
[0045] In operation S210, in response to establishing an offline payment transaction with the receiving device, the system receives a transaction voucher corresponding to the offline payment transaction issued by the receiving device. The transaction voucher includes the transaction type of the offline payment transaction.
[0046] In some embodiments, the receiving device may be a smart device used by a merchant to collect business payments, and the payment device may be a smart device used by a user to pay business payments, or it may be a hardware wallet.
[0047] Hardware wallets, serving as the carrier of bank accounts, are the medium for reaching users and support security modules that embed bank account payment credentials into various physical media. Leveraging mobile terminals, wearable devices, and IoT devices, they provide services to users, offering more inclusive and convenient digital financial services and avoiding the digital divide and financial exclusion.
[0048] The transaction voucher can be the payment billing information for this offline payment transaction, such as the transaction type, receiving device number, and transaction amount.
[0049] Transaction type is used to distinguish different offline payment transaction scenarios, such as public transportation, retail consumption, and catering services.
[0050] In operation S220, an offline payment transaction is executed based on the transaction voucher, and the execution result is obtained. The execution result indicates whether the offline payment transaction can be successfully executed.
[0051] In some embodiments, the process of executing an offline payment transaction may involve first parsing and verifying the received transaction voucher. The verification process includes, but is not limited to: verifying the legality of the transaction voucher, checking the validity of the random number to prevent replay attacks, and verifying the payer's balance or credit limit based on local offline transaction records. The execution result may be a status code that explicitly indicates the transaction was successful, or that it failed for a specific reason (such as insufficient balance or incorrect voucher format).
[0052] In operation S230, if the execution result indicates that the offline payment transaction has been successfully executed, the transaction voucher is stored in a different storage space where the payment device is located, depending on the different transaction types.
[0053] In some embodiments, the payment device is pre-divided into multiple independent logical or physical storage spaces, each associated with a specific transaction type. For example, all public transportation-related transaction vouchers are allocated to a first storage space, while all retail consumption-related transaction vouchers are allocated to a second storage space.
[0054] In operation S240, at least one transaction credential in the same storage space is formed into a transaction credential chain and stored in the same storage space. The transaction credential chain is used to send to the acceptance device when the payment device and the acceptance device establish an online connection.
[0055] When operating the S250, the execution result is fed back to the receiving device.
[0056] In some embodiments, multiple transaction credentials stored in the same space are not simply arranged, but organized into a chain of transaction credentials using a cryptographic hash function. Each new credential in each chain contains a reference to the hash value of the previous credential, thus forming an immutable and traceable chain structure. This credential chain greatly improves the efficiency of data integrity verification. When the payment device subsequently connects to the network in any way, it transmits the entire transaction credential in the designated storage space to the current receiving device via the network. After processing by the receiving device, it is uploaded to the cloud server, thereby achieving efficient batch uploading and clearing.
[0057] The offline payment data processing method in this embodiment breaks the dependence on a single device for transaction voucher uploading, supports asynchronous uploading from multiple channels, significantly reduces fund clearing delays caused by offline terminals, and optimizes user experience and system fund flow efficiency. Furthermore, the offline payment data processing method in this embodiment achieves classified storage and chained management of transaction vouchers based on transaction type, avoiding verification delays caused by excessively long chains of single vouchers, and laying the foundation for subsequent efficient batch clearing.
[0058] Figure 3 The diagram illustrates the structure of a chain of multiple transaction credentials according to an embodiment of this application.
[0059] like Figure 3 As shown, transaction credential chain A, transaction credential chain B, and transaction credential chain C correspond to three different transaction types. For example, transaction credential chain A can correspond to public transportation transactions, transaction credential chain B can correspond to retail consumption transactions, and transaction credential chain C can correspond to food and beverage service transactions.
[0060] Each transaction certificate chain stores multiple transaction certificates, such as transaction certificates A1~A3 stored in transaction certificate chain A, transaction certificates B1~B3 stored in transaction certificate chain B, and transaction certificates C1~C3 stored in transaction certificate chain C. The transaction type of each transaction certificate is consistent with the transaction type of the corresponding transaction certificate chain.
[0061] According to an embodiment of this application, the offline payment data processing method further includes: establishing an offline payment transaction with a payment device via near-field wireless communication.
[0062] In some embodiments, an offline payment transaction can be established with the receiving device via near-field wireless communication (such as NFC and Bluetooth), and a secure encrypted channel can be built at the beginning of the transaction through a key negotiation mechanism to ensure the confidentiality and integrity of transaction credentials and other data transmitted subsequently.
[0063] The offline payment data processing method in this embodiment ensures that offline payment transactions can be initiated and executed securely and reliably in a completely offline environment, providing an underlying communication foundation for subsequent voucher generation and classified storage.
[0064] According to an embodiment of this application, an offline payment transaction is executed based on a transaction voucher to obtain an execution result, including: obtaining the balance of the payment device; if the balance is greater than or equal to the transaction amount in the transaction voucher, determining the execution result, wherein the execution result indicates that the offline payment transaction was successfully executed, and updating the balance according to the transaction amount.
[0065] In some embodiments, the received transaction credentials may be securely verified before obtaining the balance of the payment device. The verification process may include: verifying whether the digital signature in the transaction credentials was generated by a trusted payment device, checking whether the transaction timestamp in the transaction credentials is within a valid time window, and confirming the legality and validity of the transaction type identifier.
[0066] After verifying the transaction voucher, the balance voucher information of the payment device can be extracted, and the current balance stored in the payment device can be determined based on the balance voucher information. Once the balance of the payment device is obtained, it is compared with the transaction amount in the transaction voucher to obtain the comparison result. For example, if the comparison shows that the balance of the payment device is greater than the transaction amount, the current transaction execution result is analyzed based on the comparison result. For example, if the current balance of the payment device is greater than or equal to the transaction amount, the transaction is executed successfully; if the current balance of the payment device is less than the transaction amount, the transaction fails. During the amount comparison process, various processing logics can be employed, such as supporting the comparison and conversion of multiple currency types and handling exchange rate conversions.
[0067] The offline payment data processing method in this embodiment enables the determination of the current offline payment transaction execution result based on the payment device balance and transaction amount, and allows updating the payment device balance according to the transaction amount. This method ensures that offline transactions are performed based on the balance, preventing payment devices from exceeding their balance limits.
[0068] According to an embodiment of this application, storing transaction vouchers in different storage spaces where the payment device is located according to different transaction types includes: encrypting the transaction voucher to obtain an encrypted transaction voucher; and storing the encrypted transaction voucher in different storage spaces according to different transaction types.
[0069] In some embodiments, a multi-layered encryption mechanism can be used to encrypt plaintext transaction credentials before storage. For example, the plaintext transaction credentials can be symmetrically encrypted using a session key, and an integrity check code can be added during the encryption process to ensure data integrity.
[0070] The offline payment data processing method in this embodiment can encrypt the transaction voucher before storing it, ensuring the secure storage of the transaction voucher.
[0071] According to an embodiment of this application, the offline payment data processing method further includes: in response to receiving feedback information sent by the accepting device, releasing the storage space where the transaction voucher chain is located. The feedback information is sent when the accepting device and the payment device establish an online connection, and the transaction voucher obtained by decrypting the transaction voucher chain received from the payment device is uploaded to the cloud server.
[0072] In some embodiments, this feedback information originates from the complete cloud clearing process: First, after the payment device and the acceptance device establish an online connection, the payment device transmits the locally stored transaction voucher chain to the acceptance device. The acceptance device decrypts and verifies the received voucher chain. After confirming the data is complete and valid, it uploads it to the cloud server for subsequent clearing processing. After the cloud server successfully receives and processes these transaction vouchers, the acceptance device sends a confirmation feedback message to the payment device.
[0073] Upon receiving feedback from the acceptance device, the payment device automatically triggers a storage space release process. First, multiple verifications are performed to ensure the authenticity and validity of the feedback information. After successful verification, the storage area occupied by the transaction credential chain uploaded to the acceptance device is automatically located, and a secure data erasure procedure is initiated. This process not only releases the occupied storage space but also simultaneously updates the storage management index, ensuring the payment device can accurately identify available storage resources. Simultaneously, the payment device retains necessary operation logs, recording the storage space release time, the corresponding transaction credential chain identifier, and the operation result for subsequent auditing and querying.
[0074] The offline payment data processing method provided in this embodiment enables intelligent management of storage resources in payment devices. This mechanism ensures that storage space in the payment device is only reclaimed and reused after the acceptance device uploads the transaction voucher to the cloud server, effectively avoiding the risk of accidental deletion of important transaction data. The offline payment data processing method provided in this embodiment guarantees the security of offline payment data and improves the utilization rate of storage resources.
[0075] Figure 4 A flowchart illustrating an offline payment data processing method applied to a payment acceptance device according to an embodiment of this application is shown.
[0076] like Figure 4 As shown, the offline payment data processing method of this embodiment includes operations S410 to S420, and the transaction processing method is executed by the accepting device.
[0077] When operating S410, with an online connection established with the payment device, the transaction voucher chain stored in the payment device is received and decrypted to obtain the transaction voucher stored in the transaction voucher chain. The transaction voucher chain is formed by the payment device and the receiving device through an offline payment transaction.
[0078] When operating the S420, the stored transaction credentials are uploaded to the cloud server, and feedback information is sent to the payment device.
[0079] In some embodiments, once a stable online connection is established between the accepting device and the payment device, the accepting device begins receiving transaction credential chains transmitted from the payment device. These transaction credential chains can be complete records gradually formed over multiple offline payment transactions between the payment device and various collection devices in a previous offline environment.
[0080] During the receiving process, the receiving device can perform a preliminary verification of the data integrity of the transaction certificate chain to ensure that no data loss or damage occurred during transmission. Subsequently, the receiving device can use a pre-configured decryption key to decrypt the received encrypted transaction certificate chain. This decryption process employs a secure and reliable decryption algorithm, ensuring that only authorized devices can access the original transaction certificate.
[0081] After successful decryption, the system obtains a complete and readable transaction credential. The receiving device then uploads the decrypted transaction credential to the cloud server for processing via a secure network connection. During the upload process, a chunked transmission and verification mechanism is employed to ensure that data is not lost due to network fluctuations during the transmission of large amounts of data. For example, a transaction credential chain for a specific transaction type can be uploaded first, followed by the upload of other transaction credential chains. Furthermore, when the receiving device is a merchant payment device, multiple transaction credential chains can be uploaded intermittently during online transactions with the payment device. This ensures that the current transaction's waiting time is not excessive while all transaction credentials are uploaded to the cloud server.
[0082] Once the upload is complete, the receiving device will immediately generate and send feedback information to the payment device. This feedback information may include key information such as a unique identifier for this upload task, a processing timestamp, and the processing result status, so that the payment device can accurately identify and record the corresponding processing status.
[0083] The offline payment data processing method in this embodiment establishes a complete offline transaction data upload and confirmation mechanism, ensuring that offline payment transaction data can be synchronized to the cloud processing system in a timely and secure manner. This method guarantees the reliability of the data processing process and significantly improves the overall operational efficiency of the offline payment system, providing merchants and users with a smoother payment experience.
[0084] Figure 5 The flowchart illustrating the process of uploading transaction credentials and sending feedback information according to an embodiment of this application is shown in the illustration.
[0085] like Figure 5 As shown in the above embodiment, the payment device first sends the transaction credential chain stored internally to the acceptance device. Upon receiving the transaction credential chain, the acceptance device decrypts it to obtain the transaction credential stored within. Then, it asynchronously uploads the transaction credential to the cloud server. After the upload is complete, it sends feedback information to the payment device, which then releases the storage space containing the transaction credential chain based on the feedback information.
[0086] According to an embodiment of this application, decrypting a transaction certificate chain includes: when there are multiple transaction certificate chains, determining the certificate chain length of each transaction certificate chain, where the certificate chain length represents the number of transaction certificates in the stored transaction certificate chain; determining the priority of the multiple stored transaction certificate chains based on the certificate chain length, and decrypting the multiple transaction certificate chains based on the priority.
[0087] In some embodiments, the decryption process of transaction credential chains employs an intelligent priority processing mechanism. Specifically, when multiple transaction credential chains need to be processed, the characteristic parameters of each transaction credential chain are first analyzed, with the most important being the chain length. Chain length refers to the number of transaction credentials contained in a single transaction credential chain; this value directly reflects the data scale and processing complexity of the chain. The number of transaction credentials contained in each transaction credential chain is calculated one by one. Based on the calculated chain length values, the multiple transaction credential chains are sorted and processed according to a preset priority rule. In a preferred embodiment, transaction credential chains with longer chain lengths are processed first, because these chains typically contain more transaction records, and timely processing can free up a significant amount of storage space more quickly. In another embodiment, shorter transaction credential chains may also be processed first, allowing for the rapid processing of multiple small-scale transaction credential chains and improving the response speed of the payment device.
[0088] The offline payment data processing method in this embodiment realizes intelligent credential chain decryption processing, effectively optimizes the processing order of the decryption process, and enables the acceptance device to achieve the best decryption processing effect under limited computing resources and time constraints.
[0089] Based on the aforementioned method for processing offline payment data applied to payment devices, this application also provides a payment device. The following will be combined with... Figure 6 Provide a detailed description of the payment device.
[0090] Figure 6 A schematic block diagram of a payment device according to an embodiment of this application is shown.
[0091] like Figure 6 As shown, the payment device 600 in this embodiment includes a transaction voucher receiving module 610, an offline transaction module 620, a transaction voucher storage module 630, a voucher chain forming module 640, and a feedback module 650.
[0092] The transaction voucher receiving module 610 is used to receive the transaction voucher corresponding to the offline payment transaction issued by the receiving device in response to establishing an offline payment transaction with the receiving device. The transaction voucher includes the transaction type of the offline payment transaction. In one embodiment, the transaction voucher receiving module 610 can be used to perform the operation S210 described above, which will not be repeated here.
[0093] The offline transaction module 620 is used to execute the offline payment transaction based on the transaction voucher and obtain an execution result, which indicates whether the offline payment transaction can be successfully executed. In one embodiment, the offline transaction module 620 can be used to execute the operation S220 described above, which will not be repeated here.
[0094] The transaction voucher storage module 630 is used to store transaction vouchers in different storage spaces of the payment device according to different transaction types when the execution result indicates that the offline payment transaction has been successfully executed. In one embodiment, the transaction voucher storage module 630 can be used to perform the operation S230 described above, which will not be repeated here.
[0095] The credential chain forming module 640 is used to form a transaction credential chain from at least one transaction credential in the same storage space and store it in the same storage space. The transaction credential chain is used to send to the acceptance device when an online connection is established between the payment device and the acceptance device. In one embodiment, the credential chain forming module 640 can be used to perform the operation S240 described above, which will not be repeated here.
[0096] The feedback module 650 is used to send the execution result back to the payment device. In one embodiment, the feedback module 650 can be used to perform the operation S250 described above, which will not be repeated here.
[0097] According to embodiments of this application, any multiple modules among the transaction receipt receiving module 610, offline transaction module 620, transaction receipt storage module 630, receipt chain formation module 640, and feedback module 650 can be merged into one module, or any one of these modules can be split into multiple modules. Alternatively, at least some of the functions of one or more of these modules can be combined with at least some of the functions of other modules and implemented in one module. According to embodiments of this application, at least one of the transaction receipt receiving module 610, offline transaction module 620, transaction receipt storage module 630, receipt chain formation module 640, and feedback module 650 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the transaction voucher receiving module 610, offline transaction module 620, transaction voucher storage module 630, voucher chain forming module 640, and feedback module 650 may be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.
[0098] Based on the aforementioned offline payment data processing method applied to payment acceptance devices, this application also provides a payment acceptance device. The following will combine... Figure 7 Provide a detailed description of the receiving equipment.
[0099] Figure 7 A schematic block diagram of a receiving device according to an embodiment of this application is shown.
[0100] like Figure 7 As shown, the acceptance device 700 in this embodiment includes a credential chain decryption module 710 and a cloud feedback module 720.
[0101] The credential chain decryption module 710 is used to receive the transaction credential chain stored in the payment device when an online connection is established with the payment device, and to decrypt the transaction credential chain to obtain the transaction credential stored in the transaction credential chain. The transaction credential chain is formed by the payment device and the receiving device through an offline payment transaction. In one embodiment, the credential chain decryption module 710 can be used to perform the operation S410 described above, which will not be repeated here.
[0102] The cloud feedback module 720 is used to upload the stored transaction voucher to the cloud server and send feedback information to the payment device. In one embodiment, the cloud feedback module 720 can be used to perform the operation S420 described above, which will not be repeated here.
[0103] According to embodiments of this application, any plurality of modules in the credential chain decryption module 710 and the cloud feedback module 720 can be merged into one module, or any one of these modules can be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules can be combined with at least a portion of the functionality of other modules and implemented in one module. According to embodiments of this application, at least one of the credential chain decryption module 710 and the cloud feedback module 720 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any appropriate combination of any of these three implementation methods. Alternatively, at least one of the credential chain decryption module 710 and the cloud feedback module 720 can be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.
[0104] Figure 8 A block diagram schematically illustrates an electronic device suitable for implementing an offline payment data processing method according to an embodiment of this application.
[0105] like Figure 8 As shown, an electronic device 800 according to an embodiment of this application includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage portion 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.
[0106] RAM 803 stores various programs and data required for the operation of electronic device 800. Processor 801, ROM 802, and RAM 803 are interconnected via bus 804. Processor 801 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 802 and / or RAM 803. It should be noted that the programs may also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in said one or more memories.
[0107] According to embodiments of this application, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to a bus 804. The electronic device 800 may also include one or more of the following components connected to the input / output (I / O) interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output (I / O) interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.
[0108] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0109] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include ROM 802 and / or RAM 803 and / or one or more memories other than ROM 802 and RAM 803 described above.
[0110] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code enables the computer system to implement the offline payment data processing method provided in the embodiments of this application.
[0111] When the computer program is executed by the processor 801, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0112] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 809, and / or installed from a removable medium 811. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0113] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, it performs the functions defined in the system of this application embodiment. According to the embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0114] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0115] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0116] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
Claims
1. A method for processing offline payment data, applied to a payment device, characterized in that, The method includes: In response to establishing an offline payment transaction with the receiving device, the system receives a transaction voucher corresponding to the offline payment transaction issued by the receiving device, the transaction voucher including the transaction type of the offline payment transaction; The offline payment transaction is executed based on the transaction voucher, and an execution result is obtained, which indicates whether the offline payment transaction can be successfully executed. If the execution result indicates that the offline payment transaction has been successfully executed, the transaction voucher is stored in a different storage space where the payment device is located, depending on the different transaction types. At least one transaction voucher in the same storage space is formed into a transaction voucher chain and stored in the same storage space. The transaction voucher chain is used to send to the acceptance device when the payment device and the acceptance device establish an online connection. The execution result is then fed back to the payment receiving device.
2. The method according to claim 1, characterized in that, The method further includes: An offline payment transaction is established with the receiving device via near-field wireless communication.
3. The method according to claim 1, characterized in that, The step of executing the offline payment transaction based on the transaction voucher and obtaining the execution result includes: Obtain the balance of the payment device; If the balance is greater than or equal to the transaction amount in the transaction voucher, the execution result is determined to indicate that the offline payment transaction was successfully executed, and the balance is updated according to the transaction amount.
4. The method according to claim 1, characterized in that, The step of storing the transaction voucher in different storage spaces of the payment device according to different transaction types includes: The transaction voucher is encrypted to obtain an encrypted transaction voucher; The encrypted transaction credentials are stored in different storage spaces according to different transaction types.
5. The method according to claim 1, characterized in that, The method further includes: In response to receiving feedback information from the acceptance device, the storage space where the transaction credential chain is located is released. The feedback information is sent when the acceptance device and the payment device establish an online connection and the transaction credential obtained by decrypting the transaction credential chain received from the payment device is uploaded to the cloud server.
6. A method for processing offline payment data, applied to a payment acceptance device, characterized in that, The method includes: When an online connection is established with a payment device, the transaction voucher chain stored in the payment device is received and the transaction voucher chain is decrypted to obtain the transaction voucher stored in the transaction voucher chain. The transaction voucher chain is formed by the payment device and the receiving device through an offline payment transaction. The stored transaction credentials are uploaded to the cloud server, and feedback information is sent to the payment device.
7. The method according to claim 6, characterized in that, The process of decrypting the transaction certificate chain includes: When there are multiple transaction certificate chains, the certificate chain length of each transaction certificate chain is determined, and the certificate chain length represents the number of transaction certificates in the stored transaction certificate chain; The priority of the multiple stored transaction credential chains is determined based on the length of the credential chain, and the multiple transaction credential chains are decrypted according to the priority.
8. A payment device, characterized in that, include: The transaction voucher receiving module is used to receive the transaction voucher corresponding to the offline payment transaction issued by the payment device in response to establishing an offline payment transaction with the payment device. The transaction voucher includes the transaction type of the offline payment transaction. The offline transaction module is used to store the transaction voucher in different storage spaces of the payment device according to different transaction types, when the execution result indicates that the offline payment transaction has been successfully executed. The transaction voucher storage module is used to store the transaction voucher in different storage spaces where the payment device is located, according to different transaction types, when the execution result indicates that the offline payment transaction has been successfully executed. A transaction voucher chain forming module is used to form a transaction voucher chain from at least one transaction voucher in the same storage space and store it in the same storage space. The transaction voucher chain is used to send to the acceptance device when the payment device and the acceptance device establish an online connection. The feedback module is used to send the execution result back to the payment receiving device.
9. A receiving device, characterized in that, include: The credential chain decryption module is used to receive the transaction credential chain stored in the payment device when an online connection is established with the payment device, and to decrypt the transaction credential chain to obtain the transaction credential stored in the transaction credential chain. The transaction credential chain is formed by the payment device and the receiving device through an offline payment transaction. The cloud feedback module is used to upload the stored transaction vouchers to the cloud server and send feedback information to the payment device.
10. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
11. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.
12. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.