Transaction data processing method, system, device and program for off-line state

Processing offline transaction data through hash function and asymmetric encryption algorithm solves the problem of low security of offline transaction data in the existing technology, realizes data integrity and reliability verification in offline state, and simplifies data processing. Synchronization process.

CN118691279AInactive Publication Date: 2024-09-24UNIFOU TECH CO LTD

Patent Information

Application Number
CN202411156874.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2024-09-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology has problems in offline transaction data processing, such as low data security, easy loss or tampering, and difficulty in data synchronization.

Method used

A digest of offline transaction data is generated through a hash function and digitally signed using a pre-stored private key of an asymmetric encryption algorithm. It is temporarily stored in the cache and written to the non-volatile storage medium periodically. When the transaction terminal resumes While online, data, digests, and signatures are uploaded to the server for verification, ensuring data integrity and source reliability.

Benefits of technology

While reducing the amount of calculation and storage space, it also improves the security of transaction data, ensures the integrity and reliability of data in an offline state, and simplifies the subsequent data synchronization process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118691279A
    Figure CN118691279A
Patent Text Reader

Abstract

The invention discloses a transaction data processing method, system, device and program for an offline state, and the method comprises the steps: judging the connection state of a transaction terminal when a transaction request is received; wherein when the transaction terminal is in an off-line state, the transaction terminal receives off-line transaction data generated by a transaction request end, and generates a unique abstract for the off-line transaction data through a hash function; performing digital signature on the abstract based on a private key of an asymmetric encryption algorithm pre-stored locally; and temporarily storing the offline transaction data, the abstract and the digital signature in a local cache, and periodically writing the offline transaction data, the abstract and the digital signature into a nonvolatile storage medium according to a preset period. Through the processing scheme disclosed by the invention, the security of the transaction can be ensured while the calculation amount and the storage space are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a transaction data processing method, system, device and program for offline state. Background Art

[0002] In the prior art, the processing of transaction data usually relies on real-time network connection. However, in situations where the network is unavailable or unstable, such as in remote areas, underground locations, or when the network fails, offline transaction data processing becomes a problem that needs to be solved urgently.

[0003] Traditional offline transaction processing methods often have defects such as low data security, easy loss or tampering, and difficulty in data synchronization after resuming online, such as handwritten bills, signed bills, etc.

[0004] It can be seen that the above existing offline transaction methods are still inconvenient and defective in use, and are in urgent need of further improvement. How to create a new offline transaction data processing method has become a goal that the industry urgently needs to improve. Summary of the invention

[0005] In view of this, an embodiment of the present disclosure provides a transaction data processing method for an offline state, which at least partially solves the problems existing in the prior art.

[0006] In a first aspect, an embodiment of the present disclosure provides a transaction data processing method for an offline state, the method comprising the following steps: When receiving a transaction request, determining the connection status of the transaction terminal; wherein, when the transaction terminal is in an offline state, the transaction terminal receives offline transaction data generated by the transaction request end, and generates a unique summary of the offline transaction data through a hash function; Digitally signing the summary based on a private key of an asymmetric encryption algorithm pre-stored locally; The offline transaction data, the summary and the digital signature are temporarily stored in a local high-speed cache and written to a non-volatile storage medium periodically as preset.

[0007] According to a specific implementation method of an embodiment of the present disclosure, the offline transaction data includes: the original digital currency of the transaction requester, the payment amount, the timestamp, the transaction terminal identifier, the transaction requester identifier and the transaction unique identifier; wherein the transaction unique identifier includes a transaction index, a random number and a transaction count value.

[0008] According to a specific implementation of the embodiment of the present disclosure, the method further includes: When the trading terminal comes back online, the stored offline transaction data, digest and digital signature are uploaded to the server; The server verifies the digital signature based on the public key corresponding to the transaction terminal to confirm the integrity of the offline transaction data and the reliability of the source; wherein, when the offline transaction data is verified to be complete and reliable, the server processes the verified offline transaction data and feeds back the processing results to the transaction terminal and the transaction request end.

[0009] According to a specific implementation of the embodiment of the present disclosure, the confirmation of the integrity of the offline transaction data and the reliability of the source further includes the following steps: After receiving the offline transaction data, the summary and the digital signature, the server generates a unique summary of the offline transaction data through the same hash function; The received digest is compared with the generated digest; when the two are consistent, it indicates that the data has not been tampered with.

[0010] According to a specific implementation manner of an embodiment of the present disclosure, a transaction terminal receives offline transaction data generated by a transaction request end through a QR code / barcode, NFC and a storage card.

[0011] According to a specific implementation of the embodiment of the present disclosure, the method further includes: When the transaction request end generates offline transaction data, freezing the corresponding transaction request end digital currency original text and payment amount at the transaction request end according to the information recorded in the offline transaction data; When the successful processing result sent by the server is received, the frozen original digital currency of the transaction requester and the payment amount will be deducted.

[0012] In a second aspect, an embodiment of the present disclosure provides a transaction data processing method system for an offline state, the system comprising: A hash module is configured to determine the connection status of the transaction terminal when receiving a transaction request; wherein, when the transaction terminal is in an offline state, the transaction terminal receives offline transaction data generated by the transaction request end, and generates a unique summary of the offline transaction data through a hash function; A digital signature module, configured to digitally sign the digest based on a private key of an asymmetric encryption algorithm pre-stored locally; The storage module is configured to temporarily store the offline transaction data, the summary and the digital signature in a local high-speed cache, and write them to a non-volatile storage medium periodically according to a preset period.

[0013] According to a specific implementation of the embodiment of the present disclosure, the system further includes: a verification module configured to upload the stored offline transaction data, digest and digital signature to the server when the transaction terminal is restored online; The server verifies the digital signature based on the public key corresponding to the transaction terminal to confirm the integrity of the offline transaction data and the reliability of the source; wherein, when the offline transaction data is verified to be complete and reliable, the server processes the verified offline transaction data and feeds back the processing result to the transaction terminal and the transaction request end; and, After receiving the offline transaction data, the summary and the digital signature, the server generates a unique summary of the offline transaction data through the same hash function; The received digest is compared with the generated digest; when the two are consistent, it indicates that the data has not been tampered with.

[0014] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor implements the transaction data processing method for an offline state as described in any one of the first aspect or any one of the implementations of the first aspect.

[0015] In a fourth aspect, an embodiment of the present disclosure further provides a non-transitory computer-readable storage medium, which stores computer instructions, and when the computer instructions are executed by at least one processor, the at least one processor executes the transaction data processing method for an offline state in the aforementioned first aspect or any implementation of the first aspect.

[0016] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, comprising a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer executes the transaction data processing method for an offline state in the aforementioned first aspect or any implementation of the first aspect.

[0017] The transaction data processing method for offline state in the embodiment of the present disclosure calculates the summary of offline transaction data through a hash function, and then digitally signs the summary through an asymmetric encryption algorithm, which can ensure the security of transactions while reducing the amount of calculation and storage space. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0019] Figure 1A flowchart of a transaction data processing method for an offline state provided by an embodiment of the present disclosure; Figure 2 A schematic diagram of the system structure of a transaction data processing method for an offline state provided by an embodiment of the present disclosure; and Figure 3 A schematic diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0021] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0022] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement a device and / or practice a method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.

[0023] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.

[0024] The embodiment of the present invention provides a transaction data processing method for offline state, which receives offline transaction data generated by a transaction request end, generates a unique summary of the offline transaction data through a hash function, digitally signs the summary based on a private key of an asymmetric encryption algorithm pre-stored locally, temporarily stores the offline transaction data, the summary and the digital signature in a local high-speed cache, and writes them to a non-volatile storage medium periodically according to a preset period. Thus, the transaction security is ensured while reducing the amount of calculation and storage space.

[0025] Figure 1 A schematic diagram of the process of a transaction data processing method for an offline state provided in an embodiment of the present disclosure.

[0026] like Figure 1 As shown, at step S110, when a transaction request is received, the connection status of the transaction terminal is determined; wherein, when the transaction terminal is in an offline state, the transaction terminal receives the offline transaction data generated by the transaction request end, and generates a unique summary of the offline transaction data through a hash function.

[0027] In an embodiment of the present invention, the offline transaction data includes: the original digital currency of the transaction requesting end, the payment amount, the timestamp, the transaction terminal identifier, the transaction requesting end identifier and the transaction unique identifier; wherein the transaction unique identifier includes a transaction index, a random number and a transaction count value.

[0028] In the embodiment of the present invention, the transaction terminal receives the offline transaction data generated by the transaction request end through a QR code / barcode, NFC and a storage card.

[0029] More specifically, the present invention is suitable for use in scenarios where the network status is unstable, such as underground parking lots, underground shopping malls, and areas without signal coverage. When the network status is detected to be good, online transactions are used first; when the network status is not sufficient to support online transactions, offline transactions are used.

[0030] In offline transactions, there are mainly the following ways of data transmission between the transaction terminal and the transaction request end: 1. QR code / barcode The transaction requester generates a QR code or barcode containing transaction information.

[0031] The transaction terminal reads and obtains transaction data through a scanning device.

[0032] 2. Near Field Communication (NFC) When the two devices are close together, the transaction data is directly transmitted via NFC technology.

[0033] 3. Bluetooth The devices at the transaction request end and the transaction terminal are connected via Bluetooth pairing to exchange data.

[0034] 4. Memory Card The transaction requester stores the transaction data on a storage card and hands it over to the transaction terminal, which then reads it through the corresponding device.

[0035] Furthermore, the offline transaction data is processed by a hash function (such as SHA-256) to generate a summary of a fixed length.

[0036] In the embodiment of the present invention, when the transaction request end is a smart device such as a mobile phone, tablet, or computer for offline transaction, offline consumption verification can be performed on the transaction request end in the following manner: 1. Password verification The transaction requester enters a pre-set password when making offline purchases, and the system verifies the legitimacy of the purchase by comparing the password.

[0037] 2. Signature Verification The transaction requester signs the consumption voucher, and the merchant or service provider compares the signature with the reserved signature when subsequently connected online.

[0038] 3. Verification code verification Before offline consumption, the system generates a specific verification code for this consumption, and the transaction requester needs to provide the verification code for verification during consumption.

[0039] 4. Device identification verification Verification is based on the unique identification of the consumer device, such as the device serial number, IMEI code, etc.

[0040] 5. Consumption limit control Set a certain amount limit for offline consumption. When the consumption amount is within the limit, no additional verification is required; if it exceeds the limit, online verification is required.

[0041] 6. Timestamp Verification Record the timestamp of offline consumption and check the rationality of the time when you go online later to prevent expired or abnormal consumption records.

[0042] 7. Data encryption and hash verification Encrypt or generate hash values ​​for offline consumption data, and decrypt or compare hash values ​​when online to ensure that the data has not been tampered with.

[0043] 8. Biometric Verification For example, fingerprint recognition, facial recognition, etc. The transaction requester provides biometrics for verification during offline consumption.

[0044] More specifically, the process proceeds to step S120.

[0045] At step S120, a digital signature is generated for the digest based on the private key of the asymmetric encryption algorithm pre-stored locally.

[0046] More specifically, the public key and the private key are generated based on the following algorithm: First, select two large random prime numbers p and q.

[0047] Calculate n = p * q.

[0048] Calculate the Euler's totient function φ(n) = (p - 1) * (q - 1).

[0049] Select an integer e such that 1 < e < φ(n) and e is relatively prime to φ(n). e is usually referred to as the public key exponent.

[0050] Calculate d such that e * d ≡ 1 (mod φ(n)). d is called the private key exponent.

[0051] The public key is (n, e), and the private key is (n, d).

[0052] The digital signature for the digest is generated based on the following method: Group the digest m such that the value of each group is less than n.

[0053] Encryption process based on the private key: Ciphertext c = m^e (mod n).

[0054] Decryption process based on the public key: Digest m = c^d (mod n).

[0055] Next, go to step S130.

[0056] At step S130, the offline transaction data, the digest, and the digital signature are temporarily stored in the local cache and written to the non-volatile storage medium periodically according to a preset schedule.

[0057] More specifically, temporarily storing the digital signature in the local cache and writing it to the non-volatile storage medium periodically according to a preset schedule has the following advantages: 1. Improve performance The access speed of the cache is generally much higher than that of the non-volatile storage medium (such as a hard disk or a flash memory). When transactions occur frequently, the digital signature can be quickly read and stored, reducing the waiting time and improving the response speed and transaction processing efficiency of the system.

[0058] 2. Reduce frequent write wear Non-volatile storage media (especially some flash memory types) have a limited number of write cycles. Periodic writing can reduce the frequency of write operations and extend the service life of the storage media.

[0059] 3. Ensure data persistence Although cache memory is fast, data can be lost due to power failure or system crash. Periodically writing digital signatures to non-volatile storage media ensures that data is preserved in the long term and can be recovered even in the event of an unexpected situation.

[0060] 4. Optimize storage resources Multiple digital signatures can be temporarily stored in a cache and then written in batches to a non-volatile storage medium at one time, reducing the overhead caused by a single write operation and making more efficient use of storage resources.

[0061] 5. Flexibly adjust strategies The preset cycle can be adjusted according to actual needs. For example, during peak trading periods, the cycle can be shortened to increase the frequency of data storage, while during low trading periods, the cycle can be appropriately extended to reduce write operations.

[0062] Next, go to step S140.

[0063] At step S140, when the transaction terminal is back online, the stored offline transaction data, summary and digital signature are uploaded to the server; the server verifies the digital signature based on the public key corresponding to the transaction terminal to confirm the integrity of the offline transaction data and the reliability of the source; wherein, when the offline transaction data is verified to be complete and reliable, the server processes the verified offline transaction data and feeds back the processing results to the transaction terminal and the transaction request end.

[0064] In the embodiment of the present invention, the confirmation of the integrity of offline transaction data and the reliability of the source also includes the following steps: after the server receives the offline transaction data, summary and digital signature, it generates a unique summary for the offline transaction data through the same hash function; compares the received summary with the generated summary; wherein, when the two are consistent, it indicates that the data has not been tampered with.

[0065] More specifically, offline transaction data connection can be achieved in the following ways: 1. Local storage and delayed synchronization The trading terminal temporarily stores offline transaction data in a local device (such as a hard disk or flash memory), and when the device is reconnected to the network, it synchronizes the stored transaction data to the server in batches.

[0066] 2. Bluetooth connection Pair the mobile device for offline transactions with a nearby device with network connection (such as a mobile phone or tablet) via Bluetooth. Upload transaction data with the help of the network of the paired devices.

[0067] 3. Wi-Fi Direct The offline device establishes a direct connection with a Wi-Fi Direct device that has a network connection, and transmits the transaction data through the connection to the Internet-enabled device for subsequent processing.

[0068] 4. Near Field Communication (NFC) Applicable to short-distance data transmission. For example, an offline transaction device exchanges data with a payment terminal that supports NFC, and the payment terminal then uploads the data online.

[0069] 5. Memory card transfer Store offline transaction data on a removable storage card (such as an SD card), insert the storage card into a device with a network connection, read and upload the data.

[0070] 6. Satellite communication connection In special scenarios, such as remote areas or at sea, connections are established through satellite communication equipment to enable offline transaction data transmission.

[0071] 7. Offline data collection equipment Use dedicated offline data collection equipment to collect transaction data when offline, and the collection equipment will summarize and upload the data when it is connected to the Internet.

[0072] Next, go to step S150.

[0073] At step S150, when the transaction request end generates offline transaction data, the corresponding digital currency original text and payment amount of the transaction request end are frozen at the transaction request end according to the information recorded in the offline transaction data; when the successful processing result sent by the server is received, the frozen digital currency original text and payment amount of the transaction request end are deducted.

[0074] Figure 2 The present invention shows a transaction data processing method system 200 for offline state, which includes a hash module 210 , a digital signature module 220 and a storage module 230 .

[0075] The hash module 210 is used to determine the connection status of the transaction terminal when receiving a transaction request; wherein, when the transaction terminal is in an offline state, the transaction terminal receives the offline transaction data generated by the transaction request end, and generates a unique summary of the offline transaction data through a hash function; The digital signature module 220 is used to digitally sign the summary based on a private key of an asymmetric encryption algorithm pre-stored locally; The storage module 230 is used to temporarily store the offline transaction data, the summary and the digital signature in a local cache, and write them to a non-volatile storage medium periodically according to a preset period.

[0076] In an embodiment of the present invention, the system further includes: a verification module configured to upload the stored offline transaction data, digest and digital signature to the server when the transaction terminal is restored online; The server verifies the digital signature based on the public key corresponding to the transaction terminal to confirm the integrity of the offline transaction data and the reliability of the source; wherein, when the offline transaction data is verified to be complete and reliable, the server processes the verified offline transaction data and feeds back the processing result to the transaction terminal and the transaction request end; and, After receiving the offline transaction data, the summary and the digital signature, the server generates a unique summary of the offline transaction data through the same hash function; The received digest is compared with the generated digest; when the two are consistent, it indicates that the data has not been tampered with.

[0077] See also Figure 3 The embodiment of the present disclosure further provides an electronic device 30, the electronic device comprising: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the transaction data processing method for an offline state in the aforementioned method embodiment.

[0078] The embodiment of the present disclosure also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the transaction data processing method for offline state in the aforementioned method embodiment.

[0079] The embodiments of the present disclosure also provide a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, which, when executed by a computer, enable the computer to execute the transaction data processing method for an offline state in the aforementioned method embodiment.

[0080] Reference below Figure 3, which shows a schematic diagram of the structure of an electronic device 30 suitable for implementing the embodiment of the present disclosure. The electronic device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0081] like Figure 3 As shown, the electronic device 30 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 to a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 30 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0082] Typically, the following devices may be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 308 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication device 309 may allow the electronic device 30 to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device 30 with various devices, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have alternatively.

[0083] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0084] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0085] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0086] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains at least two Internet Protocol addresses; sends a node evaluation request including the at least two Internet Protocol addresses to a node evaluation device, wherein the node evaluation device selects an Internet Protocol address from the at least two Internet Protocol addresses and returns it; receives the Internet Protocol address returned by the node evaluation device; wherein the obtained Internet Protocol address indicates an edge node in a content distribution network.

[0087] Alternatively, the computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device: receives a node evaluation request including at least two Internet Protocol addresses; selects an Internet Protocol address from the at least two Internet Protocol addresses; and returns the selected Internet Protocol address; wherein the received Internet Protocol address indicates an edge node in a content distribution network.

[0088] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0089] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0090] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0091] It should be understood that various parts of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof.

[0092] The above is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present disclosure should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A transaction data processing method for offline state, characterized in that: The method comprises the following steps: When receiving a transaction request, determining the connection status of the transaction terminal; wherein, when the transaction terminal is in an offline state, the transaction terminal receives offline transaction data generated by the transaction request end, and generates a unique summary of the offline transaction data through a hash function; Digitally signing the summary based on a private key of an asymmetric encryption algorithm pre-stored locally; The offline transaction data, the summary and the digital signature are temporarily stored in a local high-speed cache and written to a non-volatile storage medium periodically as preset.

2. The transaction data processing method for offline state according to claim 1, characterized in that: The offline transaction data includes: the original digital currency of the transaction request end, the payment amount, the timestamp, the transaction terminal identifier, the transaction request end identifier and the transaction unique identifier; wherein the transaction unique identifier includes a transaction index, a random number and a transaction count value.

3. The transaction data processing method for offline state according to claim 1, characterized in that: The method further comprises: When the trading terminal comes back online, the stored offline transaction data, digest and digital signature are uploaded to the server; The server verifies the digital signature based on the public key corresponding to the transaction terminal to confirm the integrity of the offline transaction data and the reliability of the source; wherein, when the offline transaction data is verified to be complete and reliable, the server processes the verified offline transaction data and feeds back the processing results to the transaction terminal and the transaction request end.

4. The transaction data processing method for offline state according to claim 3, characterized in that: The confirmation of the integrity of offline transaction data and the reliability of the source also includes the following steps: After receiving the offline transaction data, the summary and the digital signature, the server generates a unique summary of the offline transaction data through the same hash function; The received digest is compared with the generated digest; when the two are consistent, it indicates that the data has not been tampered with.

5. The transaction data processing method for offline state according to claim 1, characterized in that: The transaction terminal receives offline transaction data generated by the transaction request end through QR code / barcode, NFC and storage card.

6. The transaction data processing method for offline state according to any one of claims 1 to 4, characterized in that: The method further comprises: When the transaction request end generates offline transaction data, freezing the corresponding transaction request end digital currency original text and payment amount at the transaction request end according to the information recorded in the offline transaction data; When the successful processing result sent by the server is received, the frozen original digital currency of the transaction requester and the payment amount will be deducted.

7. A transaction data processing method system for offline state, characterized in that: The system comprises: A hash module is configured to determine the connection status of the transaction terminal when receiving a transaction request; wherein, when the transaction terminal is in an offline state, the transaction terminal receives offline transaction data generated by the transaction request end, and generates a unique summary of the offline transaction data through a hash function; A digital signature module, configured to digitally sign the digest based on a private key of an asymmetric encryption algorithm pre-stored locally; The storage module is configured to temporarily store the offline transaction data, the summary and the digital signature in a local high-speed cache, and write them to a non-volatile storage medium periodically according to a preset period.

8. The transaction data processing method system for offline state according to claim 7, characterized in that: The system further comprises: a verification module configured to upload the stored offline transaction data, digest and digital signature to the server when the transaction terminal is restored online; The server verifies the digital signature based on the public key corresponding to the transaction terminal to confirm the integrity of the offline transaction data and the reliability of the source; wherein, when the offline transaction data is verified to be complete and reliable, the server processes the verified offline transaction data and feeds back the processing result to the transaction terminal and the transaction request end; and, After receiving the offline transaction data, the summary and the digital signature, the server generates a unique summary of the offline transaction data through the same hash function; The received digest is compared with the generated digest; when the two are consistent, it indicates that the data has not been tampered with.

9. An electronic device, characterized in that: The electronic device includes: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor executes the transaction data processing method for an offline state as described in any one of claims 1 to 6.

10. A computer program product, characterized in that The computer program product comprises a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises program instructions, which, when executed by a computer, enable the computer to execute the transaction data processing method for an offline state as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Digital currency risk management and control method and system

    CN111639937A

  • Transaction payment method and device and electronic equipment

    CN116433239A

  • Offline charging method and device, computer equipment and storage medium

    CN117196613A

  • Payment method, account configuration method, system, device, equipment and medium

    CN117350715A

  • Offline transaction method and related device

    CN118071356A

Cited By

  • Riding transaction verification method and device, equipment and storage medium

    CN119784392A

  • Urban traffic offline two-dimensional code generation and verification method and system

    CN120746563A