CN109685508B - Transaction data processing method and device, electronic equipment and readable storage medium - Google Patents

Transaction data processing method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN109685508B
CN109685508B CN201811612780.XA CN201811612780A CN109685508B CN 109685508 B CN109685508 B CN 109685508B CN 201811612780 A CN201811612780 A CN 201811612780A CN 109685508 B CN109685508 B CN 109685508B
Authority
CN
China
Prior art keywords
transaction information
unverified
server
unverified transaction
verification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811612780.XA
Other languages
Chinese (zh)
Other versions
CN109685508A (en
Inventor
李昕蕾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Microlive Vision Technology Co Ltd
Original Assignee
Beijing Microlive Vision Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Microlive Vision Technology Co Ltd filed Critical Beijing Microlive Vision Technology Co Ltd
Priority to CN201811612780.XA priority Critical patent/CN109685508B/en
Publication of CN109685508A publication Critical patent/CN109685508A/en
Application granted granted Critical
Publication of CN109685508B publication Critical patent/CN109685508B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/42Confirmation, e.g. check or permission by the legal debtor of payment

Abstract

The disclosure provides a transaction data processing method and device, electronic equipment and a readable storage medium, and relates to the technical field of data processing. The method comprises the following steps: when an operation request meeting preset conditions is received, determining whether unverified transaction information exists in a temporary cache or not, wherein the unverified transaction information comprises a first order number and first payment information; if the transaction information exists, the unverified transaction information is sent to the first server, so that the first server verifies the unverified transaction information; obtaining a verification result of the first server on the unverified information; and deleting the unverified transaction information in the temporary cache after the verification result of the first server on the unverified transaction information is obtained. According to the scheme, the unverified transaction information in the temporary cache can be automatically verified, the unverified transaction information can be timely processed, the influence on subsequent possible transactions is prevented, the success rate of the subsequent possible transactions is improved, and the use experience of a user is improved.

Description

Transaction data processing method and device, electronic equipment and readable storage medium
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a method and an apparatus for processing transaction data, an electronic device, and a readable storage medium.
Background
The In App Purchases (IAP) is an intelligent mobile terminal application program payment mode and is correspondingly realized In various intelligent mobile terminal operating systems.
When a user uses an IAP for payment, the transaction needs to be verified in the transaction process, but due to the fact that the use scene is complex, abnormal conditions such as abnormal exit of an application, network failure and the like can occur, the transaction verification can be failed, subsequent transactions are affected, and the use experience of the user is poor.
Disclosure of Invention
The present disclosure aims to solve at least one of the above technical drawbacks, and provides a method and an apparatus for processing transaction data, an electronic device, and a readable storage medium.
In a first aspect, a method for processing transaction information is provided, the method including:
when an operation request meeting preset conditions is received, determining whether unverified transaction information exists in a temporary cache or not, wherein the unverified transaction information comprises a first order number and first payment information;
if the transaction information exists, the unverified transaction information is sent to the first server, so that the first server verifies the unverified transaction information;
obtaining a verification result of the first server on the unverified information;
and deleting the unverified transaction information in the temporary cache after the verification result of the first server on the unverified transaction information is obtained.
Optionally, the preset condition includes any one of:
a merchandise purchase request of a user;
a request to enter a live interface;
a request for payment;
if the preset condition is that a commodity purchase request of a user is received, after it is determined that the unverified transaction information does not exist in the temporary cache, the method further comprises the following steps:
sending the commodity purchase request to a first server, and receiving a second order number returned by the first server based on the commodity purchase request;
based on the second order number, sending a corresponding transaction payment request to a second server;
receiving second payment information returned by the second server based on the transaction payment request;
sending the transaction information to be verified to a first server so that the first server verifies the transaction information to be verified, wherein the transaction information to be verified comprises a second order number and second payment information;
and acquiring a verification result of the transaction information to be verified returned by the first server.
Optionally, after receiving the second payment information returned by the second server based on the transaction payment request, the method further includes:
storing the transaction information to be verified as unverified transaction information into a temporary cache;
after obtaining the verification result of the unverified transaction information returned by the first server, the method further comprises the following steps:
and deleting the transaction information to be verified in the temporary cache.
Optionally, the sending the unverified transaction information to the first server includes:
sending the unverified transaction information to a first server until the sending times reach a preset retry time or obtaining a verification result of the first server on the unverified transaction information;
and/or the presence of a gas in the gas,
obtaining a verification result of the unverified transaction information returned by the first server, wherein the verification result comprises:
and inquiring the verification result of the unverified transaction information from the first server in a polling mode.
Optionally, the method further includes:
and if the abnormal exit occurs in the verification process of the unverified transaction information, receiving the unverified transaction information sent by the second server after restarting and caching the unverified transaction information into the temporary cache.
Optionally, the method further includes:
and if the verification result of the unverified transaction information is successful, sending a verification success notice of the unverified transaction information to the second server so that the second server deletes the unverified transaction information corresponding to the verification success notice.
Optionally, before sending the unverified transaction information to the first server, the method further includes:
determining that the unverified transaction information does not have a verification state mark, wherein the verification state mark is used for identifying that the unverified transaction information is in a verification state;
after sending the unverified transaction information to the first server, the method further includes:
setting a verification status flag of the unverified transaction information;
after obtaining the result of the first server verifying the unverified transaction information, the method further comprises the following steps: the verification status flag of the unverified transaction message is deleted.
In a second aspect, there is provided a transaction information processing apparatus, the apparatus comprising:
the system comprises an unverified transaction information confirming module, a temporary cache and a processing module, wherein the unverified transaction information confirming module is used for determining whether unverified transaction information exists in the temporary cache when an operation request meeting preset conditions is received, and the unverified transaction information comprises a first order number and first payment information;
the transaction information verification module is used for sending the transaction information to the first server when the transaction information is not verified in the temporary cache, so that the first server verifies the transaction information;
the verification result acquisition module is used for acquiring the verification result of the first server on the unverified information;
and the transaction information processing module is used for deleting the unverified transaction information in the temporary cache after the verification result of the first server on the unverified transaction information is obtained.
Optionally, the preset condition includes any one of:
a merchandise purchase request of a user;
a request to enter a live interface;
a request for payment;
if the preset condition is that a commodity purchase request of a user is received, the device further comprises:
the order number receiving module is used for sending the commodity purchase request to the first server after confirming that the unverified transaction information does not exist in the temporary cache, and receiving a second order number returned by the first server based on the commodity purchase request;
the transaction payment request sending module is used for sending a corresponding transaction payment request to the second server based on the second order number;
the payment information receiving module is used for receiving second payment information returned by the second server based on the transaction payment request;
the to-be-verified transaction information verification module is used for sending the to-be-verified transaction information to the first server so that the first server verifies the to-be-verified transaction information, and the to-be-verified transaction information comprises a second order number and second payment information;
and the verification result acquisition module is used for acquiring the verification result of the transaction information to be verified returned by the first server.
Optionally, the apparatus further comprises:
the transaction information to be verified cache module is used for storing the transaction information to be verified as the unverified transaction information into the temporary cache after receiving second payment information returned by the second server based on the transaction payment request;
and the to-be-verified transaction information deleting module is used for deleting the to-be-verified transaction information in the temporary cache after the verification result of the unverified transaction information returned by the first server is obtained.
Optionally, when the unverified transaction information verification module sends the unverified transaction information to the first server, the unverified transaction information verification module is specifically configured to:
sending the unverified transaction information to a first server until the sending times reach a preset retry time or obtaining a verification result of the first server on the unverified transaction information;
and/or the presence of a gas in the gas,
when obtaining the verification result of the unverified transaction information returned by the first server, the transaction information processing module is specifically configured to:
and inquiring the verification result of the unverified transaction information from the first server in a polling mode.
Optionally, the apparatus further comprises:
and the unverified transaction information caching module is used for receiving the unverified transaction information sent by the second server after restarting and caching the unverified transaction information into the temporary cache when the transaction information is abnormally quitted in the verification process.
Optionally, the apparatus further comprises:
and the verification success notification sending module is used for sending the verification success notification of the unverified transaction information to the second server when the verification result of the unverified transaction information is verification success, so that the second server deletes the unverified transaction information corresponding to the verification success notification.
Optionally, the apparatus further includes a verification status marking module, specifically configured to:
before the unverified transaction information is sent to the first server, determining that the unverified transaction information does not have a verification state mark, wherein the verification state mark is used for identifying that the unverified transaction information is in a verification state;
after obtaining the verification result of the unverified transaction information, setting a verification state mark of the unverified transaction information;
after the verification result of the first server on the unverified transaction information is obtained, the method further comprises the following steps:
the verification status flag of the unverified transaction message is deleted.
In a third aspect, an electronic device is provided, which includes:
a processor and a memory;
a memory for storing operating instructions;
the processor is used for executing the processing method of the transaction information as shown in any implementation mode of the first aspect of the disclosure by calling the operation instruction.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program is configured to, when executed by a processor, implement the method for processing transaction information as shown in any of the embodiments of the first aspect of the disclosure
The technical scheme provided by the disclosure has the following beneficial effects:
according to the scheme provided by the embodiment, when the request meeting the preset condition is received, the unverified transaction information in the temporary cache can be automatically verified, the unverified transaction information can be timely processed, the influence on subsequent possible transactions is prevented, the success rate of the subsequent possible transactions is improved, and the use experience of a user is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings used in the description of the embodiments of the present disclosure will be briefly described below.
Fig. 1 is a schematic flow chart illustrating a transaction data processing method according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart diagram illustrating an alternative embodiment of an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a device for processing transaction data according to yet another embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to yet another embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of illustrating the present disclosure and are not to be construed as limiting the present invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
To make the objects, technical solutions and advantages of the present disclosure more apparent, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
The following describes the technical solutions of the present disclosure and how to solve the above technical problems in specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
In one embodiment, a method for processing transaction data is provided, as shown in fig. 1, including:
and S101, when an operation request meeting preset conditions is received, determining whether unverified transaction information exists in the temporary cache, wherein the unverified transaction information comprises a first order number and first payment information.
In this embodiment, the unverified transaction information may be transaction information that fails in transaction verification when an abnormal condition occurs during a transaction process, such as an application abnormal exit, a network failure, or the like, and the unverified transaction information is stored in a temporary cache of the terminal device, so that the unverified transaction information is convenient to read, and a basis can be provided for timely verifying the unverified transaction information.
In this embodiment, when the client receives the operation request meeting the preset condition, it indicates that the user is likely to need to perform a purchase or payment transaction subsequently, and at this time, if the unverified transaction information exists in the temporary cache, the subsequent transaction may be affected, and in order to avoid that the existing unverified transaction information affects the subsequent transaction, the unverified transaction information may be preferentially verified.
Specifically, the verification of the unverified transaction information may be achieved through the first order number and the first payment information of the unverified transaction information.
And step S102, if the transaction information exists, sending the unverified transaction information to the first server so that the first server verifies the unverified transaction information.
In this embodiment, the first server may be a server corresponding to the client and providing a service to the user, and specifically, the service provided by the first server to the client may include providing commodity information, providing verification for unverified transaction information, and the like. The first server may perform verification of the unverified transaction information based on the first order number and the first payment information.
In practical applications, when the unverified transaction information does not exist in the temporary cache, no operation other than processing the received operation request of the user may be performed.
S103, acquiring a verification result of the first server on the unverified information;
and step S104, deleting the unverified transaction information in the temporary cache after the verification result of the unverified transaction information by the first server is obtained.
In this embodiment, the deleting of the unverified transaction information in the temporary cache may be deleting the unverified transaction information in the temporary cache when the unverified transaction information is successfully verified, or deleting the unverified transaction information in the temporary cache when the unverified transaction information is unsuccessfully verified.
In practical application, if multiple pieces of unverified transaction information may exist at the same time, the multiple pieces of unverified transaction information can be verified in sequence, and in order to ensure processing efficiency, each piece of unverified transaction information can be verified once each time a client receives an operation request meeting preset conditions, so that even if verification fails, subsequent verification or transaction can be timely performed.
The transaction data processing method provided by the embodiment can automatically verify the unverified transaction information in the temporary cache when a request meeting the preset condition is received, so that the unverified transaction information is timely processed, the influence on subsequent possible transactions is prevented, the success rate of the subsequent possible transactions is improved, and the use experience of a user is improved.
In an optional embodiment of the present disclosure, the preset condition includes any one of:
receiving a purchase request of a user;
entering a live broadcast interface;
a request for payment;
if the preset condition is that a commodity purchase request of a user is received, after it is determined that the unverified transaction information does not exist in the temporary cache, the method further comprises the following steps:
sending the commodity purchase request to a first server, and receiving a second order number returned by the first server based on the commodity purchase request;
based on the second order number, sending a corresponding transaction payment request to a second server;
receiving second payment information returned by the second server based on the transaction payment request;
sending the transaction information to be verified to a first server so that the first server verifies the transaction information to be verified, wherein the transaction information to be verified comprises a second order number and second payment information;
and acquiring a verification result of the transaction information to be verified returned by the first server.
In this embodiment, when a purchase request of a user is received, the user may be considered to have a tendency to continue purchasing goods; when entering a live broadcast interface, a user can be considered to have a tendency of giving gifts to a live broadcast room in a main broadcast mode; upon receiving a request for payment, the user may be deemed to have a tendency to continue the transaction.
For any one of the preset conditions, it indicates that the user is likely to need to perform a purchase or payment transaction subsequently, and therefore, when an operation request meeting the preset conditions is received, the verification of the unverified transaction information can be automatically completed under the condition that the unverified transaction information exists in the temporary cache, so that the influence of the unverified transaction information existing in the temporary cache on the subsequent transaction is avoided, and the normal transaction is ensured.
In this embodiment, if the preset condition is that a commodity purchase request of the user is received, after it is determined that the unverified transaction information does not exist in the temporary cache, the received commodity purchase request may be correspondingly processed.
In this embodiment, the second server may be a server providing payment service, for example, an apple server, and commodity information such as a commodity name, a consumption type, a commodity price, and a commodity identifier is pre-stored in the second server, and the second server can provide support for a client payment order and generate corresponding payment information after payment is completed.
The terminal device stores commodity information provided by the first server and commodity information provided by the second server so as to generate a commodity purchase request based on the commodity information provided by the first server and generate a payment request based on the commodity information provided by the second server. For the same commodity, the commodity information of the commodity provided by the first server and the second server is different, so that the commodity information can be acquired from the first server and the second server by the client respectively. In this embodiment, the specific process of correspondingly processing the commodity purchase request may be as follows:
the client sends the purchase request to the first server, the first server generates a corresponding order based on the purchase request, and sends a second order number of the order to the client.
The client sends the transaction payment request to the second server, the second server returns second payment information to the client after the client completes payment, and a second order number is correspondingly stored in the second server at the same time.
And the client sends the transaction information to be verified to the first server for verifying the transaction information to be verified.
Specifically, a second order number is stored in the first server, an order corresponding to the transaction information to be verified is determined according to the second order number, and the second payment information is checked with the order, so that the verification of the transaction information to be verified is realized.
And if the transaction information to be verified is successfully verified, finishing corresponding processing of the received commodity purchase request.
In this embodiment, the verification of the transaction information to be verified may be referred to as a verification mode of the unverified transaction information, which is not described herein again.
In this embodiment, the client may obtain and cache the commodity information provided by the second server from the second server in advance, so as to provide a basis for sending the transaction payment request to the server, but in practical applications, there may be a case that the commodity information provided by the second server corresponding to the purchase request does not exist in the temporary cache, which affects normal generation of the transaction payment request, and the client may determine whether the commodity information provided by the second server corresponding to the purchase request is cached when the user sends the purchase request; and if not, obtaining and caching from the second server.
In an optional embodiment of the disclosure, after receiving second unverified transaction information generated based on the second order request and sent by the second server, the method further includes:
storing the transaction information to be verified as unverified transaction information into a temporary cache;
after obtaining the verification result of the unverified transaction information returned by the first server, the method further comprises the following steps:
and deleting the transaction information to be verified in the temporary cache.
In this embodiment, after receiving the transaction information to be verified, the transaction information to be verified may be stored in the temporary cache as the unverified transaction information, so that after the transaction information to be verified is not verified or fails to be verified, when an operation request meeting a preset condition is received, the unverified transaction information stored in the temporary cache may be verified.
In this embodiment, when the verification result of the unverified transaction information returned by the first server is received, it may be considered that the verification of the transaction information to be verified has been completed, and the transaction information to be verified in the temporary cache may be deleted.
Specifically, after the verification result of the transaction information to be verified is successful, the second unverified transaction information in the temporary cache can be deleted, so that the space of the temporary cache is not occupied; after the verification result of the transaction information to be verified is verification failure, the corresponding unverified transaction information of the transaction information to be verified in the temporary cache can be reserved, so that when a request meeting the preset condition is received, the unverified transaction information can be verified again in time.
In practical application, after the verification of the transaction information to be verified is completed, only the transaction information to be verified, the verification result of which is verification failure, is stored in the temporary cache, and when a request meeting the preset condition is received, the transaction information to be verified is verified again.
In an optional embodiment of the disclosure, the sending the unverified transaction information to the first server may include:
sending the unverified transaction information to a first server until the sending times reach a preset retry time or obtaining a verification result of the first server on the unverified transaction information;
and/or the presence of a gas in the gas,
obtaining a verification result of the unverified transaction information returned by the first server, wherein the verification result comprises:
and inquiring the verification result of the unverified transaction information from the first server in a polling mode.
In practical application, the unauthenticated transaction information may be unsuccessfully sent to the first server due to network failure and the like, for the problem, the unauthenticated transaction information may be sent to the first server multiple times according to a preset time interval, that is, retransmission may be performed until a verification result of the first server on the unauthenticated transaction information is obtained, which indicates that the unauthenticated transaction information is successfully sent, or retry may be performed until the retry number reaches a preset retry number, at this time, it may be considered that the unauthenticated transaction information cannot be sent at present, retry continuation may be abandoned, and a specific value of the preset retry number may be set according to actual needs.
When the first server is queried about the verification result of the unverified transaction information, a polling mode may be adopted, the polling time interval is kept increasing when the polling frequency is not greater than a preset value, and is kept unchanged when the polling frequency is not less than the preset value, so as to ensure the polling efficiency, for example, the interval time is 1s, 2s, 3s, 4s, 5 s.
In an optional embodiment of the present disclosure, the method may further include:
if the transaction information is abnormally quitted in the verification process of the unverified transaction information, the unverified transaction information sent by the second server is received after the second server is restarted;
and storing the received unverified transaction information into a temporary cache.
In this embodiment, the process of verifying the unverified transaction information refers to a process between the client sending the unverified transaction information to the first server and the client obtaining the verification result of the unverified transaction information by the first server. If the unverified transaction information in the temporary cache is lost due to abnormal exit in the verification process, such as abnormal exit of an application program, system restart and the like, the unverified transaction information sent by the second server can be received again after the application is restarted, and the client stores the unverified transaction information into the temporary cache after receiving the unverified transaction information so as to perform verification again when receiving a request meeting preset conditions.
In an optional embodiment of the present disclosure, the method may further include:
and if the verification result of the unverified transaction information is successful, sending a verification success notice of the unverified transaction information to the second server so that the second server deletes the unverified transaction information corresponding to the verification success notice.
In this embodiment, after the verification of the unverified transaction information is successful, a verification success notification is sent to the second server, and after the second server receives the verification success notification of the unverified transaction information, the corresponding unverified transaction information is not sent to the client after the application is restarted.
In an optional embodiment of the disclosure, before sending the unverified transaction information to the first server, the method may further include:
determining that the unverified transaction information does not have a verification state mark, wherein the verification state mark is used for identifying that the unverified transaction information is in a verification state;
after sending the unverified transaction information to the first server, the method may further include:
setting a verification status flag of the unverified transaction information;
after obtaining the result of the first server verifying the unverified transaction information, the method further comprises the following steps: the verification status flag of the unverified transaction message is deleted.
In this embodiment, if the user is in the preset condition again in the process of verifying the unverified information, the unverified information may be repeatedly verified, and to avoid the repeated verification, the unverified transaction information entering the verification process may be marked as a verification state, before verifying the unverified transaction information, it is determined whether the unverified transaction information is in the verification state, if not, the verification is performed, and if the unverified transaction information is in the verification state, the processing may be performed after the current verification process is completed. And deleting the verification state mark of the unverified transaction information after the obtained verification result of the unverified transaction information.
Fig. 2 shows a schematic flow diagram of an optional specific implementation of an embodiment of the present disclosure, which may include:
when the client receives an operation request meeting the preset condition, a commodity purchase request, a request for entering a live interface or a request for payment of the user is received as shown in fig. 2. If the request received by the client is a commodity purchase request, determining whether the commodity information is cached or not when the client receives the commodity purchase request of the user, and if the commodity information is not cached, requesting the commodity information from the second server and caching; if the commodity information is cached, determining whether the temporary cache has unverified transaction information, if the temporary cache has the unverified transaction information, prompting a user that the unverified transaction information exists, determining whether the unverified transaction information has a verification state mark, and if the unverified transaction information has the verification state mark, indicating that the unverified transaction information is in a verification process, namely that the terminal device is executing the verification process of the unverified transaction information, and at the moment, ending the current process, namely not executing other operations except the verification process of the unverified transaction information;
if the unverified transaction information does not have the verification state mark, reading the unverified transaction information from the temporary cache, sending the unverified transaction information to the first server, so that the unverified transaction information of the first server is verified, inquiring the verification result of the unverified transaction information from the first server, and after the verification result is inquired, namely the verification result of the first server on the unverified transaction information is obtained, deleting the verification state mark of the unverified transaction information, at the moment, if the verification result is successful, sending a notification of successful verification of the unverified transaction information to the second server, deleting the unverified transaction information which is successfully verified from the temporary cache, and ending the current process; if the verification result is verification failure, a prompt of the verification failure is sent to the user; if the client is abnormally quitted in the verification process, the client receives the unverified transaction information sent by the second server after being restarted again, and the received unverified transaction information is stored in the temporary cache again.
When a client receives a commodity purchase request of a user, if the temporary cache does not contain unverified transaction information, sending the commodity purchase request to a first server, receiving a second order number returned by the first server, and sending a corresponding transaction payment request to a second server based on the second order number; receiving second payment information returned by the second server based on the transaction payment request; and storing the unverified transaction information (namely the second order number and the to-be-verified information corresponding to the second payment information) as unverified transaction information into a temporary cache, wherein the to-be-verified transaction information is the unverified transaction information, carrying out verification state marking on the unverified transaction information, and sending the unverified transaction information to a first server so as to ensure that the first server verifies the unverified transaction information, wherein the verification mode of the unverified transaction information is basically the same as the operation of verifying the verified transaction information.
If the request received by the client is a request for entering the live interface or a request for payment, determining whether the temporary cache has the unverified transaction information or not when the request for entering the live interface or the request for payment is received by the client, and if the temporary cache does not have the unverified transaction information, ending the current process, namely not executing other operations except processing the received operation request of the user.
If the client receives a request for entering a live broadcast interface or a request for entering a wallet payment page, the temporary cache has unverified transaction information, if the temporary cache has the unverified transaction information, the user can be prompted to have the unverified transaction information, whether the unverified transaction information has a verification state mark or not is determined, if the unverified transaction information has the verification state mark, the unverified transaction information is in a verification process, namely the terminal device is executing the verification process of the unverified transaction information, and at the moment, the current process can be ended, namely other operations except the verification process of the unverified transaction information can not be executed; and if the unverified transaction information does not have the verification state mark, reading the unverified transaction information from the temporary cache, and sending the unverified transaction information to the first server so as to verify the unverified transaction information by the first server, wherein the verification mode of the unverified transaction information is basically the same as the operation of verifying the verified transaction information.
One embodiment of the present disclosure provides a transaction information processing apparatus, as shown in fig. 3, the transaction information processing apparatus 20 may include:
an unverified transaction information confirmation module 201, configured to determine whether unverified transaction information exists in the temporary cache when a request meeting a preset operation condition is received, where the unverified transaction information includes a first order number and first payment information;
the unverified transaction information verification module 202 is configured to send the unverified transaction information to the first server when the unverified transaction information exists in the temporary cache, so that the first server verifies the unverified transaction information;
a verification result obtaining module 203, configured to obtain a verification result of the first server for the unverified information;
the transaction information processing module 204 is configured to delete the unverified transaction information in the temporary cache after obtaining the verification result of the unverified transaction information by the first server.
The transaction data processing device provided by this embodiment can automatically verify the unverified transaction information in the temporary cache when receiving a request meeting a preset condition, so as to ensure timely processing of the unverified transaction information, prevent subsequent possible transactions from being affected, improve the success rate of subsequent possible transactions, and improve the user experience.
Optionally, the preset condition includes any one of:
a merchandise purchase request of a user;
a request to enter a live interface;
a request for payment;
if the preset condition is that a commodity purchasing request of a user is received, the device further comprises:
the order number receiving module is used for sending the commodity purchase request to the first server after confirming that the unverified transaction information does not exist in the temporary cache, and receiving a second order number returned by the first server based on the commodity purchase request;
the transaction payment request sending module is used for sending a corresponding transaction payment request to the second server based on the second order number;
the payment information receiving module is used for receiving second payment information returned by the second server based on the transaction payment request;
the to-be-verified transaction information verification module is used for sending the to-be-verified transaction information to the first server so that the first server verifies the to-be-verified transaction information, and the to-be-verified transaction information comprises a second order number and second payment information;
and the verification result acquisition module is used for acquiring the verification result of the transaction information to be verified returned by the first server.
Optionally, the apparatus further comprises:
the transaction information to be verified cache module is used for storing the transaction information to be verified as the unverified transaction information into the temporary cache after receiving second payment information returned by the second server based on the transaction payment request;
and the to-be-verified transaction information deleting module is used for deleting the to-be-verified transaction information in the temporary cache after the verification result of the unverified transaction information returned by the first server is obtained.
Optionally, when the unverified transaction information verification module sends the unverified transaction information to the first server, the unverified transaction information verification module is specifically configured to:
sending the unverified transaction information to a first server until the sending times reach a preset retry time or obtaining a verification result of the first server on the unverified transaction information;
and/or the presence of a gas in the gas,
when obtaining the verification result of the unverified transaction information returned by the first server, the transaction information processing module is specifically configured to:
and inquiring the verification result of the unverified transaction information from the first server in a polling mode.
Optionally, the apparatus further comprises:
and the unverified transaction information caching module is used for receiving the unverified transaction information sent by the second server after restarting and caching the unverified transaction information into the temporary cache when the transaction information is abnormally quitted in the verification process.
Optionally, the apparatus further comprises:
and the verification success notification sending module is used for sending the verification success notification of the unverified transaction information to the second server when the verification result of the unverified transaction information is verification success, so that the second server deletes the unverified transaction information corresponding to the verification success notification.
Optionally, the apparatus further includes a verification status marking module, specifically configured to:
before the unverified transaction information is sent to the first server, determining that the unverified transaction information does not have a verification state mark, wherein the verification state mark is used for identifying that the unverified transaction information is in a verification state;
after obtaining the verification result of the unverified transaction information, setting a verification state mark of the unverified transaction information;
after the verification result of the first server on the unverified transaction information is obtained, the method further comprises the following steps:
the verification status flag of the unverified transaction message is deleted.
The transaction information processing apparatus of this embodiment can execute the transaction information processing method shown in any of the above embodiments of the present disclosure, and the implementation principles thereof are similar and will not be described herein again.
The disclosed embodiment also provides an electronic device, which comprises a processor and a memory;
a memory for storing operating instructions;
and the processor is used for executing the transaction information processing method by calling the operation instruction.
The disclosed embodiments also provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the above-mentioned transaction information processing method.
Referring now to fig. 4, a schematic diagram of an electronic device 800 (e.g., a terminal device for performing the transaction information processing method shown in fig. 1) suitable for implementing an embodiment of the disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, the electronic device 800 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 801 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage means 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the electronic apparatus 800 are also stored. The processing apparatus 801, the ROM802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
Generally, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 807 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage 808 including, for example, magnetic tape, hard disk, etc.; and a communication device 809. The communication means 809 may allow the electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While fig. 4 illustrates an electronic device 800 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 809, or installed from the storage means 808, or installed from the ROM 802. The computer program, when executed by the processing apparatus 801, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring at least two internet protocol addresses; sending a node evaluation request comprising at least two internet protocol addresses to node evaluation equipment, wherein the node evaluation equipment selects the internet protocol addresses from the at least two internet protocol addresses and returns the internet protocol addresses; receiving an internet protocol address returned by the node evaluation equipment; wherein the obtained internet protocol address indicates an edge node in the content distribution network.
Alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a node evaluation request comprising at least two internet protocol addresses; selecting an internet protocol address from at least two internet protocol addresses; returning the selected internet protocol address; wherein the received internet protocol address indicates an edge node in the content distribution network.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of 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 the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (10)

1. A method for processing transaction information, comprising:
when an operation request meeting preset conditions is received, determining whether unverified transaction information exists in a temporary cache or not, wherein the unverified transaction information comprises a first order number and first payment information;
if the transaction information exists, the unverified transaction information is sent to a first server, so that the first server verifies the unverified transaction information; obtaining a verification result of the first server on the unverified information; deleting the unverified transaction information in the temporary cache after obtaining a verification result of the unverified transaction information by the first server;
if the preset condition is that a commodity purchase request of a user is received, after it is determined that the unverified transaction information does not exist in the temporary cache, the method further comprises the following steps:
and processing the commodity purchase request.
2. The method for processing transaction information according to claim 1, wherein the processing of the merchandise purchase request includes:
sending the commodity purchase request to the first server, and receiving a second order number returned by the first server based on the commodity purchase request;
based on the second order number, sending a corresponding transaction payment request to the second server;
receiving second payment information returned by the second server based on the transaction payment request;
sending transaction information to be verified to the first server so that the first server verifies the transaction information to be verified, wherein the transaction information to be verified comprises the second order number and the second payment information;
and acquiring a verification result of the transaction information to be verified returned by the first server.
3. The method for processing transaction information according to claim 2, wherein after receiving second payment information returned by the second server based on the transaction payment request, the method further comprises:
storing the transaction information to be verified as unverified transaction information into a temporary cache;
after obtaining the verification result of the unverified transaction information returned by the first server, the method further comprises the following steps:
and deleting the transaction information to be verified in the temporary cache.
4. The method for processing the transaction information according to any one of claims 1 to 3, wherein the sending the unverified transaction information to the first server comprises:
sending the unverified transaction information to a first server until the sending times reach preset retry times or obtaining a verification result of the unverified transaction information by the first server;
and/or the presence of a gas in the gas,
obtaining a verification result of the unverified transaction information returned by the first server, including:
and inquiring the verification result of the unverified transaction information from the first server in a polling mode.
5. The method for processing transaction information according to any one of claims 1 to 3, further comprising:
and if the abnormal exit occurs in the verification process of the unverified transaction information, receiving the unverified transaction information sent by the second server after restarting and caching the unverified transaction information into the temporary cache.
6. The method for processing transaction information according to any one of claims 1 to 3, further comprising:
and if the verification result of the unverified transaction information is successful, sending a verification success notice of the unverified transaction information to the second server, so that the second server deletes the unverified transaction information corresponding to the verification success notice.
7. The method for processing transaction information according to any one of claims 1 to 3, wherein before sending the unverified transaction information to the first server, the method further comprises:
determining that the unverified transaction information does not have a verification status flag, the verification status flag being used to identify that the unverified transaction information is in a verified state;
after the sending the unverified transaction information to the first server, the method further includes:
setting a verification status flag of the unverified transaction information;
after the verification result of the first server on the unverified transaction information is obtained, the method further comprises the following steps:
and deleting the verification state mark of the unverified transaction information.
8. An apparatus for processing transaction information, comprising:
the system comprises an unverified transaction information confirming module, a temporary cache and a verification module, wherein the unverified transaction information confirming module is used for determining whether unverified transaction information exists in the temporary cache when an operation request meeting preset conditions is received, and the unverified transaction information comprises a first order number and first payment information;
the unverified transaction information verification module is used for sending the unverified transaction information to a first server when the unverified transaction information exists in the temporary cache, so that the first server verifies the unverified transaction information;
a verification result obtaining module, configured to obtain a verification result of the first server for the unverified information;
the transaction information processing module is used for deleting the unverified transaction information in the temporary cache after the verification result of the unverified transaction information by the first server is obtained;
if the preset condition is that a commodity purchase request of a user is received, the device further comprises:
and the purchase request processing module is used for processing the commodity purchase request after confirming that the unverified transaction information does not exist in the temporary cache.
9. An electronic device, characterized in that the electronic device comprises:
a processor and a memory;
the memory is used for storing operation instructions;
the processor is used for executing the transaction information processing method of any one of the claims 1 to 7 by calling the operation instruction.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of processing transaction information according to any one of claims 1 to 7.
CN201811612780.XA 2018-12-27 2018-12-27 Transaction data processing method and device, electronic equipment and readable storage medium Active CN109685508B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811612780.XA CN109685508B (en) 2018-12-27 2018-12-27 Transaction data processing method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811612780.XA CN109685508B (en) 2018-12-27 2018-12-27 Transaction data processing method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN109685508A CN109685508A (en) 2019-04-26
CN109685508B true CN109685508B (en) 2020-06-30

Family

ID=66190527

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811612780.XA Active CN109685508B (en) 2018-12-27 2018-12-27 Transaction data processing method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN109685508B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112926981B (en) * 2021-03-18 2022-10-28 腾讯科技(深圳)有限公司 Transaction information processing method, device and medium for block chain and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102708485A (en) * 2012-05-17 2012-10-03 东信和平智能卡股份有限公司 Things protection method of mobile phone payment card transactions and mobile phone payment card
CN106228367A (en) * 2016-07-27 2016-12-14 北京奇虎科技有限公司 The method and apparatus of payment verification

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102509213A (en) * 2011-11-16 2012-06-20 上海翰鑫信息科技有限公司 System and method for remote payment and trade, mobile terminal and subscriber identity module (SIM) card
CN111260343B (en) * 2014-12-24 2023-07-07 创新先进技术有限公司 Information authentication method, device and system based on confirmation code
CN107147643A (en) * 2017-05-10 2017-09-08 武汉票据交易中心有限公司 A kind of client login method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102708485A (en) * 2012-05-17 2012-10-03 东信和平智能卡股份有限公司 Things protection method of mobile phone payment card transactions and mobile phone payment card
CN106228367A (en) * 2016-07-27 2016-12-14 北京奇虎科技有限公司 The method and apparatus of payment verification

Also Published As

Publication number Publication date
CN109685508A (en) 2019-04-26

Similar Documents

Publication Publication Date Title
CN111991813B (en) Method and device for logging in game, electronic equipment and storage medium
CN108920257B (en) Transaction processing method, device, equipment and storage medium
CN112184196B (en) Data processing method, device, server and storage medium
CN110336592B (en) Data transmission method suitable for Bluetooth card reader, electronic equipment and storage medium
CN110618768B (en) Information presentation method and device
CN110543604A (en) information processing method and device
CN109685508B (en) Transaction data processing method and device, electronic equipment and readable storage medium
CN109218338B (en) Information processing system, method and device
CN109741069B (en) Transaction data processing method and device, electronic equipment and readable storage medium
CN114116247A (en) Redis-based message processing method, device, system, server and medium
CN110619101B (en) Method and apparatus for processing information
CN109542743B (en) Log checking method and device, electronic equipment and computer readable storage medium
CN113079085B (en) Business service interaction method, business service interaction device, business service interaction equipment and storage medium
CN112346661B (en) Data processing method and device and electronic equipment
CN110083283B (en) Method, device and system for managing information
CN109933556B (en) Method and apparatus for processing information
CN113283891A (en) Information processing method and device and electronic equipment
CN110351602B (en) Method for electronic device, information processing system and electronic device
CN111897620A (en) Interaction method and device and electronic equipment
CN112084114A (en) Method and apparatus for testing an interface
CN111786936A (en) Method and device for authentication
CN113807854B (en) Method, apparatus, system, electronic device and medium for electronic payment
US20240152504A1 (en) Data interaction method, apparatus, and electronic device
CN111383025B (en) Method and device for forwarding wind control data and electronic equipment
CN110781523B (en) Method and apparatus for processing information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant