Transaction data processing method, device, computer equipment and storage medium
By generating the first transaction instruction for preprocessing and further processing of the second transaction instruction, the problem of low timeliness of processing unknown transaction results is solved, and real-time and accurate processing of transaction data is realized.
Patent Information
- Application Number
- CN202211105688.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-09
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2042-09-09
AI Technical Summary
In the prior art, unknown transaction results are processed with low timeliness, resulting in the inability to process in real time during the transaction process, affecting the user experience.
By obtaining the transaction result, a first trading instruction is generated for preprocessing, a state of the second trading result is obtained, and a second trading instruction is generated based on the result state for further processing, ensuring the real-time and correctness of the transaction data.
Real-time processing of unknown transaction results is realized, and the timeliness and correctness of transaction data processing is improved.
Smart Images

Figure CN115599968B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial technology or other related fields, and in particular to a transaction data processing method, apparatus, computer equipment and storage medium. Background Art
[0002] In everyday transactions, querying and verifying transaction data is often necessary. Due to network timeouts or downstream processing failing to return transaction results, asynchronous access to transaction results can easily result in unknown transaction results. In such cases, the target terminal is often unable to proceed with the next transaction, negatively impacting the transaction experience.
[0003] Existing processing methods require manual or automated querying of results. After receiving the query instruction, the operator searches for the corresponding transaction results. Manual confirmation of transaction results is often cumbersome and time-consuming. For batch processing solutions, the timeliness of obtaining transaction result files is low, making it impossible to process unknown transactions in real time. Current processing methods cannot handle unknown transaction results in real time, resulting in low timeliness in processing unknown transaction results. Summary of the Invention
[0004] Based on this, it is necessary to provide a transaction data processing method, device, computer equipment and storage medium that can improve the timeliness of unknown transaction processing in response to the above technical problems.
[0005] In a first aspect, the present application provides a transaction data processing method, the method comprising:
[0006] In response to a transaction data processing instruction of the target terminal for the transaction data to be processed, obtaining a first transaction result for the transaction data to be processed;
[0007] When the status of the first transaction result is a preset status, receiving a pre-processing instruction sent by the target terminal for the transaction data to be processed, and obtaining a transaction type of the transaction data to be processed and an instruction type of the pre-processing instruction;
[0008] generating a first transaction instruction for the transaction data to be processed based on the transaction type and the instruction type; the first transaction instruction is used to perform a first transaction processing on the transaction data to be processed to obtain pre-processed transaction data;
[0009] In response to a transaction result query instruction for the pre-processed transaction data, obtaining a second transaction result for the pre-processed transaction data;
[0010] When the status of the second transaction result is a non-preset status, obtaining the transaction result status of the second transaction result;
[0011] A second transaction instruction for the transaction data to be processed is generated according to the transaction result status, the transaction type of the transaction data to be processed, and the instruction type of the pre-processing instruction; the second transaction instruction is used to perform a second transaction process on the pre-processed transaction data.
[0012] In one embodiment, the data to be processed is transaction data between the target terminal and a third-party platform;
[0013] In response to a transaction data processing instruction of the target terminal for the transaction data to be processed, obtaining a first transaction result for the transaction data to be processed includes:
[0014] Receive transaction data to be processed sent by the target terminal;
[0015] Send the transaction data to be processed to the third-party platform, and obtain the first transaction result for the transaction data to be processed sent by the third-party platform.
[0016] In one embodiment, when the status of the second transaction result is a non-preset status, obtaining the transaction result status of the second transaction result includes:
[0017] Obtain data interaction files from a third-party platform; data interaction files are used to store transaction result status containing multiple transaction data;
[0018] The transaction result status corresponding to the pre-processed transaction data is obtained from the transaction result statuses of the multiple transaction data included in the data interaction file, and the transaction result status corresponding to the pre-processed transaction data is used as the transaction result status of the second transaction result.
[0019] In one embodiment, after obtaining the data interaction file of the third-party platform, the method further includes:
[0020] When the data interaction file does not contain the data to be processed, the transaction result status of the second transaction result is confirmed as a transaction failure status.
[0021] In one embodiment, after obtaining the first transaction result for the transaction data to be processed, the method further includes:
[0022] When the status of the first transaction result is a non-preset status, the transaction result status of the first transaction result is sent to the target terminal; wherein the transaction result status of the first transaction result is a transaction success status or a transaction failure status.
[0023] In one embodiment, after generating the second transaction instruction for the transaction data to be processed based on the transaction result status, the transaction type of the transaction data to be processed, and the instruction type of the pre-processing instruction, the method further includes:
[0024] In response to a first query instruction of the target terminal for the pre-processed transaction data, a processing result of a second transaction processing corresponding to the pre-processed transaction data is obtained, and the processing result of the second transaction processing is sent to the target terminal.
[0025] In one embodiment, after generating the second transaction instruction for the transaction data to be processed based on the transaction result status, the transaction type of the transaction data to be processed, and the instruction type of the pre-processing instruction, the method further includes:
[0026] Responding to a second query instruction sent by the target terminal, obtaining a plurality of transaction data;
[0027] If pre-processed transaction data exists in the plurality of transaction data, the pre-processed transaction data and a processing result of the second transaction processing corresponding to the pre-processed transaction data are obtained from the plurality of transaction data, and the processing result of the second transaction processing is sent to the target terminal.
[0028] In a second aspect, the present application further provides a device for processing unknown transaction data, the device comprising:
[0029] a first transaction result obtaining module, configured to obtain a first transaction result for the transaction data to be processed in response to a transaction data processing instruction of the target terminal for the transaction data to be processed;
[0030] a type acquisition module, configured to receive, when the status of the first transaction result is a preset status, a pre-processing instruction sent by the target terminal for the transaction data to be processed, and acquire the transaction type of the transaction data to be processed and the instruction type of the pre-processing instruction;
[0031] a first transaction instruction acquisition module, which generates a first transaction instruction for the transaction data to be processed based on the transaction type and the instruction type; the first transaction instruction is used to perform a first transaction processing on the transaction data to be processed to obtain pre-processed transaction data;
[0032] a second transaction result obtaining module, configured to obtain a second transaction result for the pre-processed transaction data in response to a transaction result query instruction for the pre-processed transaction data;
[0033] a transaction result status acquisition module, configured to acquire the transaction result status of the second transaction result when the status of the second transaction result is not a preset status;
[0034] The second transaction instruction generation module is used to generate a second transaction instruction for the transaction data to be processed based on the transaction result status, the transaction type of the transaction data to be processed, and the instruction type of the pre-processing instruction; the second transaction instruction is used to perform a second transaction processing on the pre-processed transaction data.
[0035] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0036] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above method when executed by a processor.
[0037] In a fifth aspect, the present application further provides a computer program product, which includes a computer program that implements the steps of the above method when executed by a processor.
[0038] The above-mentioned transaction data processing method, device, computer equipment and storage medium obtain a first transaction result for the transaction data to be processed by responding to the transaction data processing instruction of the target terminal for the transaction data to be processed; when the status of the first transaction result is a preset state, receive the preprocessing instruction sent by the target terminal for the transaction data to be processed, and obtain the transaction type of the transaction data to be processed and the instruction type of the preprocessing instruction; can generate a first transaction instruction for the transaction data to be processed based on the transaction type and the instruction type; the first transaction instruction is used to perform a first transaction processing on the transaction data to be processed to obtain preprocessed transaction data; obtain a second transaction result for the preprocessed transaction data by responding to the transaction result query instruction for the preprocessed transaction data; when the status of the second transaction result is not a preset state, obtain the transaction result status of the second transaction result; generate a second transaction instruction for the transaction data to be processed according to the transaction result status, the transaction type of the transaction data to be processed and the instruction type of the preprocessing instruction; the second transaction instruction is used to perform a second transaction processing on the preprocessed transaction data. Compared with the existing technology, the present application can pre-process the transaction data to be processed when the first transaction result is in a preset state to obtain pre-processed transaction data, thereby realizing real-time processing of transaction data in an unknown state, and using the second transaction instruction to perform a second transaction processing on the pre-processed transaction data, which can ensure the correctness of the data processing of the pre-processed transaction data. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A diagram illustrating an application environment of a transaction data processing method in one embodiment;
[0040] Figure 2 1 is a flow chart of a transaction data processing method according to an embodiment;
[0041] Figure 3 is a flowchart of a transaction data processing method according to another embodiment;
[0042] Figure 4 A schematic diagram of a process for processing and pre-processing data to be processed in another embodiment;
[0043] Figure 5 1. A schematic diagram of a process for performing a first transaction process on pre-processed data in one embodiment;
[0044] Figure 6 A schematic diagram of a process for querying transaction data processing results in one embodiment;
[0045] Figure 7 is a structural block diagram of a transaction data processing device in one embodiment;
[0046] Figure 8 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0048] The transaction data processing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The data storage system can be, but is not limited to, storing transaction data processing instructions and pre-processing transaction data. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented as an independent server or a server cluster consisting of multiple servers.
[0049] In one embodiment, Figure 2 As shown, a transaction data processing method is provided, which is applied to Figure 1 Taking the server 104 in the example as an example, the following steps are included:
[0050] Step S201: In response to a transaction data processing instruction from a target terminal for transaction data to be processed, a first transaction result for the transaction data to be processed is obtained.
[0051] The target terminal refers to a terminal capable of interacting with virtual resources, such as a POS (Point of Sales) machine, an MIS (Management Information System) machine, or a mobile phone. The transaction data processing instruction refers to an instruction for obtaining transaction data. The first transaction result refers to the transaction result for the pending transaction data obtained in response to the instruction from the target terminal.
[0052] Specifically, the target terminal sends a transaction data processing instruction for pending transaction data to the server. The server may receive and respond to the transaction data processing instruction. Based on the transaction data processing instruction, the server obtains a first transaction result corresponding to the pending transaction data. The first transaction result may be in an unknown state, i.e., the server responds to the transaction data processing instruction but fails to obtain the first transaction result. Alternatively, the first transaction result may be in a known state, i.e., the server responds to the transaction data processing instruction and obtains the first transaction result.
[0053] Step S202: When the status of the first transaction result is a preset status, a pre-processing instruction sent by the target terminal for the transaction data to be processed is received, and the transaction type of the transaction data to be processed and the instruction type of the pre-processing instruction are obtained.
[0054] The preset state may be an unknown state. A pre-processing instruction refers to an instruction for performing preliminary processing on pending transaction data whose transaction results are in a preset state. A transaction type refers to the type of final destination of the transaction data, for example, whether the transaction data should ultimately be accepted by the target terminal or by the other party conducting a transaction with the target terminal. An instruction type refers to the transaction processing type corresponding to the processing of the transaction data, which may include a first transaction processing type and a second transaction processing type. The first transaction type may be a processing type for the target terminal to obtain transaction data, and the second transaction type may be a processing type for the target terminal to return transaction data.
[0055] Specifically, when obtaining the first transaction result, if the first transaction result is in a preset state, the target terminal may request preprocessing of the pending transaction data and send a preprocessing instruction for the pending transaction data. The server may receive the preprocessing instruction and obtain the transaction type of the pending transaction data and the instruction type of the preprocessing instruction. For example, if the status of the first transaction result is unknown, the server may receive the preprocessing instruction and obtain the transaction type of the pending transaction data and the instruction type of the preprocessing instruction. If the status of the first transaction result is known, the server may send the status of the first transaction result to the target terminal without further processing.
[0056] Step S203: Generate a first transaction instruction for the transaction data to be processed based on the transaction type and the instruction type; the first transaction instruction is used to perform a first transaction process on the transaction data to be processed to obtain pre-processed transaction data.
[0057] The term "first transaction instruction" refers to a transaction instruction that can be processed in real time. This first transaction instruction enables real-time processing when the status of the first transaction result is a preset state. Preprocessed transaction data refers to transaction data obtained after real-time preprocessing. In practical applications, data interactive processing may or may not be performed. In both cases, preprocessing is performed. In the absence of data interactive processing, the preprocessed transaction data is zero.
[0058] Specifically, based on the transaction type and instruction type, a corresponding first transaction instruction is generated. The first transaction instruction is used to perform first transaction processing on the pending transaction data, thereby obtaining preprocessed transaction data. By preprocessing the pending transaction data using the first transaction instruction, real-time processing can be achieved when the status of the first transaction result is in a preset state. For example, if the status of the first transaction result is unknown, real-time processing can be achieved by preprocessing the pending transaction data, thereby improving the timeliness of processing unknown transactions.
[0059] Step S204: In response to the transaction result query instruction for the pre-processed transaction data, a second transaction result for the pre-processed transaction data is obtained.
[0060] The specific response method may be a preset method, for example, responding within a preset period of time.
[0061] Specifically, the transaction result query instruction refers to an instruction for re-querying the transaction status of pending transaction data before pre-processing. It can be understood that the transaction query result corresponds to the pre-processed transaction data after pre-processing. The second transaction result refers to the transaction result after querying the pre-processed transaction data, which is equivalent to the transaction result after re-querying the pending transaction data.
[0062] Step S205: When the status of the second transaction result is a non-preset status, obtain the transaction result status of the second transaction result.
[0063] Specifically, a non-preset state refers to a state that is opposite to a preset state. For example, a preset state is an unknown state, while a non-preset state is a known state. The transaction result state refers to the result state of a transaction performed on the pending transaction data corresponding to the pre-processed transaction data. For example, it can be a successful transaction state or a failed transaction state. For example, if the state of the second transaction result is a known state, the successful transaction state or failed transaction state of the pending transaction data corresponding to the pre-processed transaction data is obtained.
[0064] Step S206: Generate a second transaction instruction for the transaction data to be processed based on the transaction result status, the transaction type of the transaction data to be processed, and the instruction type of the pre-processing instruction; the second transaction instruction is used to perform a second transaction process on the pre-processed transaction data.
[0065] The second transaction processing refers to the processing of transaction data again when the status of the second transaction result is not a preset status.
[0066] Specifically, a determination is made based on the transaction result status, the transaction type of the pending transaction data, and the instruction type of the pre-processing instruction to determine a processing method for the pre-processed transaction data. A second transaction instruction is generated for processing the pre-processed transaction data, and the second transaction processing is performed using the second transaction instruction. Using the second transaction instruction for the second transaction processing ensures the correctness of the data processing of the pre-processed transaction data.
[0067] In this embodiment, a first transaction result for the transaction data to be processed is obtained by responding to a transaction data processing instruction of the target terminal for the transaction data to be processed; when the status of the first transaction result is a preset status, a preprocessing instruction sent by the target terminal for the transaction data to be processed is received, and the transaction type of the transaction data to be processed and the instruction type of the preprocessing instruction are obtained; a first transaction instruction for the transaction data to be processed can be generated based on the transaction type and the instruction type; the first transaction instruction is used to perform a first transaction processing on the transaction data to be processed to obtain preprocessed transaction data; a second transaction result for the preprocessed transaction data is obtained by responding to a transaction result query instruction for the preprocessed transaction data; when the status of the second transaction result is not a preset status, a transaction result status of the second transaction result is obtained; a second transaction instruction for the transaction data to be processed is generated according to the transaction result status, the transaction type of the transaction data to be processed and the instruction type of the preprocessing instruction; the second transaction instruction is used to perform a second transaction processing on the preprocessed transaction data. Compared with the existing technology, the present application can pre-process the transaction data to be processed when the first transaction result is in a preset state to obtain pre-processed transaction data, thereby realizing real-time processing of transaction data in an unknown state, and using the second transaction instruction to perform a second transaction processing on the pre-processed transaction data, which can ensure the correctness of the data processing of the pre-processed transaction data.
[0068] In one embodiment, the data to be processed is transaction data between the target terminal and a third-party platform;
[0069] like Figure 3 As shown, in response to a transaction data processing instruction of the target terminal for the transaction data to be processed, obtaining a first transaction result for the transaction data to be processed includes:
[0070] Step S302, receiving the transaction data to be processed sent by the target terminal;
[0071] Step S304: Send the transaction data to be processed to the third-party platform, and obtain the first transaction result for the transaction data to be processed sent by the third-party platform.
[0072] Specifically, a target terminal has pending transaction data. The target terminal sends the pending transaction data to a server. The server records the pending transaction data and calls a data interface of a third-party platform to send the pending transaction data to the third-party platform. The third-party platform obtains transaction data records related to the pending transaction data and obtains a first transaction result for the pending transaction data based on the relevant records. The first transaction result can be a known result or an unknown result. The server receives the first transaction result corresponding to the pending transaction data returned by the third-party platform.
[0073] In this embodiment, by obtaining the first transaction result for the pending transaction data from the third-party platform, the transaction result of the pending transaction data can be known, which is conducive to knowing the transaction result of the transaction data and can achieve real-time processing of the transaction data.
[0074] In one embodiment, when the status of the second transaction result is a non-preset status, obtaining the transaction result status of the second transaction result includes:
[0075] Obtain data interaction files from a third-party platform; data interaction files are used to store transaction result status containing multiple transaction data;
[0076] The transaction result status corresponding to the pre-processed transaction data is obtained from the transaction result statuses of the multiple transaction data included in the data interaction file, and the transaction result status corresponding to the pre-processed transaction data is used as the transaction result status of the second transaction result.
[0077] The data interaction file refers to a file related to transaction data, which contains multiple transaction data, each of which carries a corresponding transaction result status. The transaction result status of the transaction data refers to the data status after the transaction is completed, for example, it can be a transaction success status or a transaction failure status.
[0078] Specifically, if the data interaction file includes a transaction result status corresponding to pre-processed transaction data, the pre-processed transaction is obtained from the transaction result statuses of multiple transaction data. The transaction result status corresponding to the pre-processed transaction data refers to the result status after the transaction of the pending transaction data corresponding to the pre-processed transaction data is performed, and can be a successful transaction status or a failed transaction status. This transaction result status is used as the transaction result status of the second transaction result, and further processing of the second transaction result can be performed.
[0079] In this embodiment, the transaction result status corresponding to the pre-processed transaction data is used as the transaction result status of the second transaction result, and subsequent steps for generating a second transaction instruction can be performed.
[0080] In one embodiment, after obtaining the data interaction file of the third-party platform, the method further includes:
[0081] When the data interaction file does not contain the data to be processed, the transaction result status of the second transaction result is confirmed as a transaction failure status.
[0082] Specifically, the data interaction file does not contain the data to be processed, that is, the data interaction file does not contain transaction data related to the transaction data to be processed. In this case, the transaction result status of the second transaction result is confirmed as a transaction failure status, which can ensure the correctness of the processing of the second transaction result.
[0083] In this embodiment, when the data interaction file does not contain the data to be processed, the transaction result status of the second transaction result is confirmed as a transaction failure status, which can ensure the correctness of the re-processing of the pre-processed transaction data.
[0084] In one embodiment, after obtaining the first transaction result for the transaction data to be processed, the method further includes:
[0085] When the status of the first transaction result is a non-preset status, the transaction result status of the first transaction result is sent to the target terminal; wherein the transaction result status of the first transaction result is a transaction success status or a transaction failure status.
[0086] Specifically, if the status of the first transaction result is known, the transaction success status or transaction failure status of the first transaction result can be sent to the target terminal. A non-preset status refers to a status opposite to the preset status. If the status of the first transaction result is known, the transaction result status of the first transaction result can be directly sent to the target terminal without subsequent processing, allowing the transaction result status of the pending transaction data to be known in real time.
[0087] In one embodiment, after generating the second transaction instruction for the transaction data to be processed according to the transaction result status, the transaction type of the transaction data to be processed, and the instruction type of the pre-processing instruction, the method further includes:
[0088] In response to a first query instruction of the target terminal for the pre-processed transaction data, a processing result of a second transaction processing corresponding to the pre-processed transaction data is obtained, and the processing result of the second transaction processing is sent to the target terminal.
[0089] The first query instruction refers to an instruction for querying the processing result of the second transaction processing. The processing result of the second transaction processing refers to the result of processing the pre-processed transaction data, and the processing result can ensure the correctness of the pre-processing of the transaction data to be processed.
[0090] Specifically, the target terminal can send a first query instruction to the server. The server obtains the first query instruction, and based on the first query instruction, obtains the processing result of the second transaction processing of the pre-processed transaction data corresponding to the first query instruction, and sends the processing result of the second transaction processing to the target terminal. The target terminal can display the processing result, thereby ensuring the correctness of subsequent processing of the transaction data.
[0091] In one embodiment, after generating the second transaction instruction for the transaction data to be processed according to the transaction result status, the transaction type of the transaction data to be processed, and the instruction type of the pre-processing instruction, the method further includes:
[0092] Responding to a second query instruction sent by the target terminal, obtaining a plurality of transaction data;
[0093] If pre-processed transaction data exists in the plurality of transaction data, the pre-processed transaction data and a processing result of the second transaction processing corresponding to the pre-processed transaction data are obtained from the plurality of transaction data, and the processing result of the second transaction processing is sent to the target terminal.
[0094] The second query instruction refers to an instruction for querying multiple transaction data.
[0095] Specifically, the target terminal can send a second query instruction to the server, and the server retrieves multiple transaction data based on the second query instruction. The server determines whether pre-processed transaction data exists in the multiple transaction data, for example, by determining whether an identifier used to mark the pre-processed transaction data exists in the multiple transaction data. If pre-processed transaction data exists in the multiple transaction data, the server extracts the pre-processed transaction data from the multiple transaction data, along with the processing result of the second transaction processing corresponding to the pre-processed transaction data, and sends the processing result of the second transaction processing to the target terminal. This allows the target terminal to display the processing result, thereby ensuring the accuracy of subsequent processing of the transaction data.
[0096] In a specific embodiment, Figure 4As shown, the target terminal can initiate three types of instructions, including instructions of the first transaction type, instructions of the second transaction type, and instructions of the query type. The server can receive and respond to the corresponding instructions, obtain the pending transaction data corresponding to the instructions sent by the target terminal, and call the data interface of the third-party platform to send the pending transaction data to the third-party platform. The third-party platform obtains the first transaction result for the pending transaction data based on the relevant records and transmits the first transaction result back to the server. If the status of the first transaction result is known, that is, the first transaction result is a success or failure, the server sends the first transaction result to the target terminal, indicating that the target terminal has obtained the transaction result of the pending transaction data as a success or failure. If the status of the first transaction result is unknown, the server sends the first transaction result to the target terminal. Upon learning that the status of the first transaction result is unknown, the target terminal can choose to perform preprocessing. If the target terminal chooses to perform preprocessing, it sends the preprocessing instruction for the pending transaction data to the server, along with the transaction type of the pending transaction data and the instruction type of the preprocessing instruction. In response to the preprocessing instruction, the server generates a first transaction instruction for the pending transaction data based on the transaction type and instruction type. The first transaction instruction instructs the target terminal to perform a first transaction process on the pending transaction data to obtain preprocessed transaction data, which the target terminal then transmits to the server. The first transaction process may involve, when the transaction type is the first transaction type and the preprocessing instruction type is to transfer virtual resources to the target terminal, additionally obtaining virtual resources from the target transaction terminal that are identical to the pending transaction data to obtain preprocessed transaction data. The first transaction process may involve, when the transaction type is the second transaction type and the preprocessing instruction type is to transfer virtual resources to the target terminal, additionally obtaining virtual resources from the target transaction terminal that are identical to the pending transaction data to obtain preprocessed transaction data. The target transaction terminal is the terminal conducting a transaction with the target terminal.
[0097] like Figure 5 As shown, the server responds to a transaction result query instruction for the pre-processed transaction data. The transaction result query instruction can be generated at a preset periodic time, for example, after a preset date is updated. The server obtains a data interaction file from the third-party platform. If the data interaction file contains a transaction result status corresponding to the pre-processed transaction data, and the transaction result status is a transaction success status or a transaction failure status, the transaction result status corresponding to the pre-processed transaction data is used as the transaction result status of the second transaction result. If the data interaction file contains a transaction result status corresponding to the pre-processed transaction data (i.e., there is no data record corresponding to the pre-processed transaction data in the data interaction file), the transaction result status of the second transaction result is confirmed as a transaction failure status.
[0098] If the transaction result status of the second transaction result is a transaction success status or a transaction failure status, the transaction type is determined to be the first transaction type or the second transaction type, and the instruction type is determined to be either transferring the virtual resource to the target terminal or returning the virtual resource to the target transaction terminal, and the corresponding second transaction processing is performed based on the transaction type and instruction type. For example, if the transaction result status of the second transaction result is a transaction success status, the transaction type is determined to be the first transaction type, and the instruction type is determined to be transferring the virtual resource to the target terminal, since the original transaction was successful, and an additional virtual resource of the target transaction terminal that is identical to the transaction data to be processed was obtained during the preprocessing process, the second transaction processing is performed to return the original virtual resource (the transaction data to be processed) to the target transaction terminal and transfer the additionally obtained virtual resource to the target terminal.
[0099] In a specific embodiment, Figure 6 As shown, the target terminal can send a query instruction, which includes a first query instruction and a second query instruction. The server obtains the first query instruction or the second query instruction. If the query instruction is the first query instruction, it obtains a first data list corresponding to the pre-processed transaction data and sends the first data list to the target terminal. The target terminal can select the pre-processed transaction data in the data list. The first data list carries the processing results of the second transaction processing corresponding to the pre-processed transaction data. If the query instruction is the second query instruction, the server obtains a second data list containing multiple transaction data and sends the second data list to the target terminal. If the second data list contains pre-processed transaction data, the server obtains the pre-processed transaction data and the processing results of the second transaction processing corresponding to the pre-processed transaction data from the multiple transaction data. The target terminal can then view the processing results of the second transaction processing.
[0100] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0101] Based on the same inventive concept, embodiments of the present application also provide a transaction data processing device for implementing the transaction data processing method described above. The solution provided by this device is similar to the solution described in the method described above. Therefore, the specific limitations of one or more transaction data processing device embodiments provided below can be found in the limitations of the transaction data processing method described above and will not be further elaborated here.
[0102] In one embodiment, Figure 7 As shown, a transaction data processing device 700 is provided, comprising: a first transaction result acquisition module 710, a type acquisition module 720, a first transaction instruction acquisition module 730, a second transaction result acquisition module 740, a transaction result status acquisition module 750, and a second transaction instruction generation module 760, wherein:
[0103] The first transaction result obtaining module 710 is configured to obtain a first transaction result for the transaction data to be processed in response to a transaction data processing instruction of the target terminal for the transaction data to be processed.
[0104] The type acquisition module 720 is configured to receive a pre-processing instruction sent by the target terminal for the transaction data to be processed when the status of the first transaction result is a preset status, and to acquire the transaction type of the transaction data to be processed and the instruction type of the pre-processing instruction.
[0105] The first transaction instruction acquisition module 730 generates a first transaction instruction for the transaction data to be processed based on the transaction type and the instruction type; the first transaction instruction is used to perform a first transaction process on the transaction data to be processed to obtain pre-processed transaction data.
[0106] The second transaction result obtaining module 740 is configured to obtain a second transaction result for the pre-processed transaction data in response to a transaction result query instruction for the pre-processed transaction data.
[0107] The transaction result status acquisition module 750 is configured to acquire the transaction result status of the second transaction result when the status of the second transaction result is not a preset status.
[0108] The second transaction instruction generation module 760 is used to generate a second transaction instruction for the transaction data to be processed based on the transaction result status, the transaction type of the transaction data to be processed, and the instruction type of the pre-processing instruction; the second transaction instruction is used to perform a second transaction processing on the pre-processed transaction data.
[0109] In one embodiment, the data to be processed is transaction data between the target terminal and the third-party platform; the first transaction result acquisition module includes a transaction data to be processed receiving unit and a first transaction result acquisition unit.
[0110] The pending transaction data receiving unit is used to receive the pending transaction data sent by the target terminal; the first transaction result obtaining unit is used to send the pending transaction data to the third-party platform and obtain the first transaction result for the pending transaction data sent by the third-party platform.
[0111] In one embodiment, the transaction result status acquisition module includes an interaction file acquisition unit and a transaction result status determination unit.
[0112] The interactive file acquisition unit is used to acquire the data interactive file of the third-party platform; the data interactive file is used to store the transaction result status of multiple transaction data;
[0113] The transaction result status determining unit is configured to obtain the transaction result status corresponding to the pre-processed transaction data from the transaction result statuses of the multiple transaction data included in the data interaction file, and use the transaction result status corresponding to the pre-processed transaction data as the transaction result status of the second transaction result.
[0114] In one embodiment, the transaction result status determining unit is further configured to, when the data interaction file does not contain the data to be processed, determine the transaction result status of the second transaction result as a transaction failure status.
[0115] In one embodiment, the device further includes a first transaction result status sending unit.
[0116] The first transaction result status sending unit is used to send the transaction result status of the first transaction result to the target terminal when the status of the first transaction result is a non-preset state; wherein the transaction result status of the first transaction result is a transaction success state or a transaction failure state.
[0117] In one embodiment, the device further includes a processing result obtaining unit.
[0118] The processing result obtaining unit is used to obtain the processing result of the second transaction processing corresponding to the pre-processed transaction data in response to the first query instruction of the target terminal for the pre-processed transaction data, and send the processing result of the second transaction processing to the target terminal.
[0119] In one embodiment, the device further includes a plurality of transaction data acquisition units and a second processing result acquisition unit.
[0120] The multiple transaction data acquisition unit is configured to acquire multiple transaction data in response to a second query instruction sent by the target terminal. The second processing result acquisition unit is configured to, if pre-processed transaction data exists in the multiple transaction data, acquire the pre-processed transaction data and a processing result of the second transaction processing corresponding to the pre-processed transaction data from the multiple transaction data, and transmit the processing result of the second transaction processing to the target terminal.
[0121] Each module in the transaction data processing device described above may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0122] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store transaction data processing instructions and pre-processed transaction data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When executed by the processor, the computer program implements a transaction data processing method.
[0123] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0124] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0125] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0126] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0127] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.
[0128] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0129] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A transaction data processing method, characterized in that: The method comprises: In response to a transaction data processing instruction of the target terminal for the transaction data to be processed, obtaining a first transaction result for the transaction data to be processed; When the status of the first transaction result is a preset status, receiving a pre-processing instruction sent by the target terminal for the transaction data to be processed, and obtaining a transaction type of the transaction data to be processed and an instruction type of the pre-processing instruction; generating a first transaction instruction for the transaction data to be processed based on the transaction type and the instruction type; the first transaction instruction is used to perform a first transaction processing on the transaction data to be processed to obtain pre-processed transaction data; In response to a transaction result query instruction for the pre-processed transaction data, obtaining a second transaction result for the pre-processed transaction data; When the status of the second transaction result is a non-preset status, obtaining the transaction result status of the second transaction result; A second transaction instruction for the transaction data to be processed is generated according to the transaction result status, the transaction type of the transaction data to be processed, and the instruction type of the pre-processing instruction; the second transaction instruction is used to perform a second transaction processing on the pre-processed transaction data.
2. The method according to claim 1, characterized in that The transaction data to be processed is the transaction data between the target terminal and the third-party platform; The obtaining, in response to the transaction data processing instruction of the target terminal for the transaction data to be processed, a first transaction result for the transaction data to be processed, includes: Receiving the transaction data to be processed sent by the target terminal; The transaction data to be processed is sent to the third-party platform, and a first transaction result for the transaction data to be processed sent by the third-party platform is obtained.
3. The method according to claim 2, characterized in that When the status of the second transaction result is a non-preset status, obtaining the transaction result status of the second transaction result includes: Obtaining a data interaction file of the third-party platform; the data interaction file is used to store transaction result status of multiple transaction data; The transaction result status corresponding to the pre-processed transaction data is obtained from the transaction result status of multiple transaction data included in the data interaction file, and the transaction result status corresponding to the pre-processed transaction data is used as the transaction result status of the second transaction result.
4. The method according to claim 3, characterized in that After obtaining the data interaction file of the third-party platform, the method further includes: When the data interaction file does not include the transaction data to be processed, the transaction result status of the second transaction result is confirmed as a transaction failure status.
5. The method according to claim 1, wherein After obtaining the first transaction result for the transaction data to be processed, the method further includes: When the status of the first transaction result is a non-preset status, the transaction result status of the first transaction result is sent to the target terminal; wherein the transaction result status of the first transaction result is a transaction success status or a transaction failure status.
6. The method according to claim 1, characterized in that After generating the second transaction instruction for the transaction data to be processed according to the transaction result status, the transaction type of the transaction data to be processed, and the instruction type of the pre-processing instruction, the method further includes: In response to a first query instruction of the target terminal for the pre-processed transaction data, a processing result of a second transaction processing corresponding to the pre-processed transaction data is obtained, and the processing result of the second transaction processing is sent to the target terminal.
7. The method according to claim 1, characterized in that After generating the second transaction instruction for the transaction data to be processed according to the transaction result status, the transaction type of the transaction data to be processed, and the instruction type of the pre-processing instruction, the method further includes: Responding to a second query instruction sent by the target terminal, obtaining a plurality of transaction data; If the pre-processed transaction data exists in the multiple transaction data, the pre-processed transaction data and a processing result of the second transaction processing corresponding to the pre-processed transaction data are obtained from the multiple transaction data, and the processing result of the second transaction processing is sent to the target terminal.
8. A device for processing unknown transaction data, characterized in that: The device comprises: a first transaction result obtaining module, configured to obtain a first transaction result for the transaction data to be processed in response to a transaction data processing instruction of the target terminal for the transaction data to be processed; a type acquisition module, configured to, when the status of the first transaction result is a preset status, receive a pre-processing instruction sent by the target terminal for the transaction data to be processed, and acquire the transaction type of the transaction data to be processed and the instruction type of the pre-processing instruction; a first transaction instruction acquisition module, configured to generate a first transaction instruction for the transaction data to be processed based on the transaction type and the instruction type; the first transaction instruction being used to perform a first transaction processing on the transaction data to be processed to obtain pre-processed transaction data; a second transaction result obtaining module, configured to obtain a second transaction result for the pre-processed transaction data in response to a transaction result query instruction for the pre-processed transaction data; a transaction result status acquisition module, configured to acquire the transaction result status of the second transaction result when the status of the second transaction result is not a preset status; A second transaction instruction generating module is configured to generate a second transaction instruction for the transaction data to be processed based on the transaction result status, the transaction type of the transaction data to be processed, and the instruction type of the pre-processing instruction; the second transaction instruction is configured to perform a second transaction processing on the pre-processed transaction data.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Data processing method, device and equipment and readable storage medium
CN114596153A
Transaction information checking method and device, storage medium and electronic equipment
CN114861634A