Transaction processing method and device, equipment, storage medium and program product
By generating transaction result verification instructions during the Hong Kong account remittance process and pushing them into the delay queue, the problem of transaction result return time in the existing technology is solved, timely querying transaction results and database updates are achieved, and user experience is improved.
Patent Information
- Application Number
- CN202411373861.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-07
AI Technical Summary
During the Hong Kong account remittance process, the existing technology cannot return transaction results in a short period of time, resulting in users being unable to know the transaction results in a timely manner.
When no successful transaction response is received within the preset time period after sending transaction information to the second device, a transaction result verification instruction corresponding to the transaction information is generated and pushed into the delay queue, and the order in the queue is arranged in the queue Query transaction results and update transaction information in the local database.
Even if the transaction success response is not received within the preset time period, the transaction results can still be queried through the delay queue, ensuring that users can obtain transaction results in a timely manner, and improving the verification and update efficiency of transaction results.
Smart Images

Figure CN119273466A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of big data technology, and in particular, relates to a transaction processing method, device, equipment, storage medium and program product. Background Art
[0002] In the process of remitting money to Hong Kong accounts, transactions are usually carried out through three methods: wire transfer, Real-Time Gross Settlement System (RTGS), Central Payment System (Clearing House Automated Transfer System, CHATS), and Faster Payment System (FPS).
[0003] Among them, telegraphic transfer is used to realize remittance between banks in the Mainland and Hong Kong, and it takes 1 to 3 working days for the remittance to arrive; RTGS and CHATS systems are used to realize transaction remittance between local banks in Hong Kong; FPS system is used to realize quasi-real-time arrival between banks in the Mainland and Hong Kong. However, since the response time of the FPS system is usually half an hour to two hours, that is, the FPS system cannot return the transaction results in a short time, users cannot know the transaction results. Summary of the invention
[0004] The embodiments of the present application provide a transaction processing method, apparatus, device, storage medium and program product, which can return transaction results in a timely manner to ensure that users are informed of transaction results in a timely manner.
[0005] In a first aspect, an embodiment of the present application provides a transaction processing method, which is applied to a first device, and the method includes:
[0006] If a successful transaction response corresponding to the transaction information sent by the second device is not received within a preset time after the transaction information is sent to the second device, generating a first transaction result verification instruction corresponding to the transaction information;
[0007] Pushing the first transaction result verification instruction into a delay queue, and querying the first transaction result corresponding to the first transaction result verification instruction according to the arrangement order of the transaction result verification instructions in the delay queue;
[0008] The transaction result corresponding to the transaction information in the local database is updated according to the first transaction result.
[0009] In a possible implementation, pushing the first transaction result verification instruction into a delay queue, and querying the first transaction result corresponding to the first transaction result verification instruction according to the arrangement order of the transaction result verification instructions in the delay queue, includes:
[0010] Pushing the first transaction result verification instruction into the delay queue for the first time, and querying the second transaction result corresponding to the first transaction result verification instruction according to the first preset query time;
[0011] If the second transaction result does not include the transaction success response, pushing the first transaction result verification instruction into the delay queue for the second time, and querying the third transaction result corresponding to the first transaction result verification instruction according to the second preset query time;
[0012] If the third transaction result does not include the transaction success response, pushing the first transaction result verification instruction into the delay queue for the third time, and querying the fourth transaction result corresponding to the first transaction result verification instruction according to the third preset query time;
[0013] The fourth transaction result is used as the first transaction result.
[0014] In a possible implementation manner, after updating the transaction result corresponding to the transaction information in the local database according to the first transaction result, the method further includes:
[0015] Receiving a first input from a user on a query page, wherein the first input includes the transaction information identifier;
[0016] searching the local database for a transaction result corresponding to the transaction information according to the transaction information identifier;
[0017] In the case where the transaction result is a first status result, the first status result is displayed on the query page, and the first status result is other status results except for a transaction success status result and a transaction failure status result.
[0018] In a possible implementation manner, after searching the local database for a transaction result corresponding to the transaction information according to the transaction information identifier, the method further includes:
[0019] In the case where the transaction result is the transaction success status result or the transaction failure status result, the transaction success information or the transaction failure information is displayed on the query page.
[0020] In a possible implementation manner, after searching the local database for a transaction result corresponding to the transaction information according to the transaction information identifier, the method further includes:
[0021] Using the delay queue to verify the transaction result to obtain a second transaction result;
[0022] updating the transaction result in the local database according to the second transaction result;
[0023] The preset waiting information is displayed on the query page, and the preset waiting information is used to prompt the user to wait for the verified transaction result.
[0024] In a possible implementation, the verifying the transaction result by using the delay queue includes:
[0025] Generate a second transaction result verification instruction corresponding to the transaction information identifier;
[0026] The second transaction result verification instruction is pushed into the delay queue, and the second transaction result corresponding to the second transaction result verification instruction is queried according to the arrangement order of the transaction result verification instructions in the delay queue.
[0027] In a possible implementation manner, before generating a first transaction result verification instruction corresponding to the transaction information, the method further includes:
[0028] receiving a second input from a user on a resource exchange page, wherein the second input includes the transaction information;
[0029] Sending the transaction information to the second device, so that the second device updates data of an account in the transaction information based on the transaction information;
[0030] When a successful transaction response is received from the second device, a corresponding relationship between the transaction information identifier and the successful transaction response is stored in the local database.
[0031] In a second aspect, an embodiment of the present application provides a transaction processing apparatus, applied to a first device, the apparatus comprising:
[0032] a generating module, configured to generate a first transaction result verification instruction corresponding to the transaction information if no transaction success response corresponding to the transaction information sent by the second device is received within a preset time after the transaction information is sent to the second device;
[0033] A query module, configured to push the first transaction result verification instruction into a delay queue, and query the first transaction result corresponding to the first transaction result verification instruction according to the arrangement order of the transaction result verification instructions in the delay queue;
[0034] An updating module is used to update the transaction result corresponding to the transaction information in the local database according to the first transaction result.
[0035] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the transaction processing method as described in any one of the first aspects is implemented.
[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the transaction processing method as described in any one of the first aspects is implemented.
[0037] In a fifth aspect, an embodiment of the present application provides a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device can perform a transaction processing method as described in any one of the first aspects.
[0038] The transaction processing method, apparatus, device, storage medium and program product of the embodiments of the present application, when the first device does not receive a successful transaction response corresponding to the transaction information sent by the second device within a preset time period, generates a transaction result verification instruction corresponding to the transaction information. Then the transaction result verification instruction is pushed into the delay queue, and the first device queries and obtains the first transaction result according to the arrangement order of the transaction result verification instructions in the delay queue. In this way, even if the first device does not receive a successful transaction response within the preset time period, the first device can subsequently use the delay queue to query the transaction result and update the transaction result in the database, providing a transaction result verification function for the fast payment system. The first device automatically triggers the transaction result verification process, updates the transaction result in the database, and ensures that the user can obtain the transaction result in a timely manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0040] Figure 1 It is a flowchart of a transaction processing method provided by an embodiment of the present application;
[0041] Figure 2 It is a flowchart of another transaction processing method provided by an embodiment of the present application;
[0042] Figure 3 is an exemplary schematic diagram of a transaction processing method provided by an embodiment of the present application;
[0043] Figure 4It is a flowchart of a method for verifying transaction results provided by an embodiment of the present application;
[0044] Figure 5 is an exemplary schematic diagram of a method for verifying transaction results provided by an embodiment of the present application;
[0045] Figure 6 This is a flowchart of a method for querying transaction results provided by an embodiment of the present application.
[0046] Figure 7 This is an exemplary schematic diagram of a transaction result query method provided by an embodiment of the present application;
[0047] Figure 8 This is an exemplary schematic diagram of a refund processing method provided by an embodiment of the present application.
[0048] Fig. 9 is a structural diagram of a transaction processing device provided by another embodiment of the present application;
[0049] Fig.10 It is a structural schematic diagram of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0050] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0051] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0052] It should be noted that the acquisition, storage, use and processing of data in the embodiments of the present application are in compliance with the relevant provisions of national laws and regulations.
[0053] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0054] In order to solve the problems of the prior art, embodiments of the present invention provide a transaction processing method, apparatus, device, storage medium and program product.
[0055] The following first introduces the transaction processing method provided by the embodiment of the present invention.
[0056] Figure 1 FIG. 1 is a flow chart showing a transaction processing method provided by an embodiment of the present invention. The method is applied to a first device. Figure 1 As shown, the method may include the following steps:
[0057] S101. If no transaction result response corresponding to the transaction information is received from the second device within a preset time period after the transaction information is sent to the second device, a first transaction result verification instruction corresponding to the transaction information is generated.
[0058] The first device and the second device are electronic devices connected to the transaction system. The first device is used to send transaction information to the second device, and the second device can be used to modify the transaction data of the transaction object according to the transaction information, thereby completing the transaction.
[0059] The preset time is pre-set based on experience. If the first device completes the transaction based on the transaction information within the preset time after sending the transaction information to the second device, the second device can feed back a transaction result response to the first device, and the transaction result response can be used to indicate a successful transaction or a failed transaction. If the first device does not receive the transaction result response sent by the second device within the preset time after sending the transaction information to the second device, that is, the first device does not obtain the transaction result of the transaction, the first device generates a first transaction result verification instruction, and the first transaction result verification instruction is used to instruct the first device to verify the transaction result of the transaction.
[0060] For example, the first device sends transaction information to the second device, and the transaction information is used to indicate that 20 yuan is to be remitted to the transaction object. After receiving the transaction information, the second device modifies the amount data in the transaction account according to the transaction object account provided in the transaction information, and adds 20 to the original amount data, thereby completing the transaction. Then the second device feeds back a transaction result response to the first device, and the transaction result response is used to indicate that the transaction is successful.
[0061] S102: Push the first transaction result verification instruction into a delay queue, and query the first transaction result corresponding to the first transaction result verification instruction according to the arrangement order of the transaction result verification instructions in the delay queue.
[0062] Among them, pushing the first transaction result verification instruction into the delay queue refers to setting the query waiting time of the first transaction result verification instruction. For example, the query waiting time of the first transaction result verification instruction is 10 seconds, and the first device responds to the first transaction result verification instruction after 10 seconds to query the transaction details data of each transaction node.
[0063] Specifically, the transaction information also includes a transaction information identifier. In the process of the first device sending the transaction information to the second device, the transaction system will record the transaction information identifier and the transaction details of each transaction node. After the first device subsequently generates a first transaction result query instruction corresponding to the transaction information identifier, the transaction information identifier carried in the first transaction result query instruction can be used to query the transaction details data corresponding to the transaction information identifier, and the first transaction result can be determined based on the found transaction details data.
[0064] For example, the transaction system includes three transaction nodes, namely transaction node 1, transaction node 2 and transaction node 3. After each transaction node processes the transaction information, it records the transaction information identifier in the transaction information and the transaction details of its own node. If the first device responds to the first transaction result query instruction and finds the transaction details of transaction node 1, it means that the above transaction information has not been forwarded to the second device. Therefore, the first transaction result can be "processing". If the first device finds the transaction details of transaction node 3, it means that the above transaction information has been forwarded to the second device. If the second device does not feedback the transaction result response within the preset time, the first device can determine that the first transaction result is a transaction failure.
[0065] S103: Update the transaction result corresponding to the transaction information in the local database according to the first transaction result.
[0066] It can be understood that the above transaction information includes a transaction information identifier, and the first device stores the corresponding relationship between the transaction information identifier and the transaction result in the local database.
[0067] By adopting the above method, when the first device does not receive a successful transaction response corresponding to the transaction information sent by the second device within a preset time period, a transaction result verification instruction corresponding to the transaction information is generated. Then the transaction result verification instruction is pushed into the delay queue, and the first device queries and obtains the first transaction result according to the arrangement order of the transaction result verification instructions in the delay queue. In this way, even if the first device does not receive a successful transaction response within the preset time period, the first device can still use the delay queue to query the transaction result later, and update the transaction result in the database, providing a transaction result verification function for the fast payment system. The first device automatically triggers the verification process of the transaction result, updates the transaction result in the database, and ensures that the user can obtain the transaction result in time.
[0068] In some embodiments of the present application, a user may initiate a transaction on the resource exchange page. Specifically, in the above S101, if a successful transaction response corresponding to the transaction information sent by the second device is not received within a preset time after the transaction information is sent to the second device, before generating a first transaction result verification instruction corresponding to the transaction information, such as Figure 2 As shown, the method also includes:
[0069] S201: Receive a second input from a user on a resource replacement page.
[0070] The second input includes transaction information. The resource exchange page is used to receive the transaction object identity information and the corresponding transaction amount information input by the user. The transaction information is the transaction object identity information and the corresponding transaction amount information. For example, the resource exchange page can be a loan transfer page, and the user can configure the loan amount and the transfer account of the loan amount on the loan transfer page.
[0071] S202. Send the transaction information to the second device, so that the second device updates the account data in the transaction information based on the transaction information.
[0072] S203: When receiving the transaction result response sent by the second device, store the corresponding relationship between the transaction information identifier of the transaction information and the transaction result response in the local database.
[0073] By adopting the method provided in the embodiment of the present application, the first device can receive the second input of the user on the resource exchange page, wherein the second data includes transaction information. In this way, the first device initiates a transaction to the second device based on the transaction information, that is, sends the transaction information to the second device, and the second device can update the account data in the transaction information according to the transaction information, thereby completing the transaction. Then the second device sends a successful transaction response to the first device. If the first device receives the successful transaction response sent by the second device, the correspondence between the transaction information identifier and the transaction result response is stored in the local database. If the first device does not receive a successful transaction response, the above-mentioned steps are executed. Figure 1 In this way, the first device can be triggered to query the transaction result, and the transaction result can be updated in time.
[0074] The following combination Figure 3 The transaction process in the credit remittance scenario shown in FIG. 1 introduces the transaction processing method provided by the embodiment of the present application, such as Figure 3 As shown, the method specifically includes:
[0075] S301. Verify the fast payment system FPS collection elements.
[0076] The FPS system is the transaction system mentioned above. Users can enter payment elements on the display interface provided by the FPS system, and the payment elements may include payment account information and amount information. The FPS system stores the account information of the opened accounts, so the FPS system can call the locally stored account information to verify the payment elements entered by the user to determine whether the payment elements are correct.
[0077] S302: Open an account.
[0078] Among them, after the above-mentioned verification of the collection elements is passed, in the scenario of credit remittance, the user needs to first complete the opening of the loan account, and then transfer the loan funds from the loan account to the bank account.
[0079] S303. Open a loan account and make disbursements.
[0080] After the loan platform receives the account opening information entered by the user in the loan platform client, the loan funds are issued to the loan account.
[0081] S304. Transfer the loan to the internal account of the bank.
[0082] Among them, loan transfer refers to transferring the loan funds in the loan account to a bank account, which is an internal account of the above-mentioned bank.
[0083] S305. Make a credit remittance through the FPS system.
[0084] Among them, the FPS system determines the remittance amount and remittance account according to the above-mentioned collection elements, and remits the funds in the bank account to the remittance account according to the remittance amount.
[0085] S306: Get the remittance status.
[0086] It should be noted that for each transaction, the FPS system includes multiple transaction nodes. The FPS system determines the remittance status by monitoring the transaction details of each transaction node, and the remittance status is the above transaction result.
[0087] Specifically, the remittance status includes a final state and an intermediate state. The final state is a successful transaction or a failed transaction. The intermediate state is a remittance in progress, a timeout, or other unknown states.
[0088] S307: Determine whether the remittance result is a failure.
[0089] If yes, execute S308, if no, execute S309.
[0090] The FPS system determines whether the remittance result is a failure based on the remittance status.
[0091] S308. Correct the previous transaction process.
[0092] Specifically, the previous transaction process is the above S301 to S307. Reversal refers to the first device sending a transaction cancellation instruction to the second device, and the transaction cancellation instruction is used to instruct the second device to cancel the remittance to the remittance account. After completing the return of the above remittance funds, the first device deletes the transaction details data saved by each transaction node in the previous transaction process.
[0093] S309: Save transaction details data.
[0094] S310: Determine whether it is necessary to verify the remittance result.
[0095] If yes, execute S311, if no, end the process.
[0096] S311, using the delay queue to verify.
[0097] By adopting the method provided in the embodiment of the present application, when transferring money through the FPS system, the process of loan funds is from the loan account to the internal bank account, and then the internal bank account is transferred to the remittance account through the FPS system. In addition, when it is necessary to verify the remittance result, the remittance result can be verified by using the delay queue, and the transaction details data in the transaction node can be monitored by the delay queue, so as to determine the transaction result in time, and ensure the timely update of the remittance result.
[0098] With respect to the above S102, the first transaction result verification instruction is pushed into the delay queue, and the first transaction result corresponding to the first transaction result verification instruction is queried according to the arrangement order of the transaction result verification instructions in the delay queue. The delay queue can be used to query the transaction result multiple times, and as the number of verifications increases, the waiting time for each verification is also extended. Specifically, Figure 4 As shown, it can be implemented as follows:
[0099] S1021. Push the first transaction result verification instruction into the delay queue for the first time, and query the second transaction result corresponding to the first transaction result verification instruction according to the first preset query time.
[0100] The method for pushing the first transaction result verification instruction into the delay queue for the first time is as follows:
[0101] The first device sets the waiting query time of the first transaction result verification instruction to the first preset query time for the first time, obtains the transaction detail data of each transaction node in the transaction system after the first preset query time, and determines the second transaction result according to the transaction detail data.
[0102] Specifically, the first device can determine whether the transaction information is sent to the second device based on the transaction details data. If the transaction information is still being processed in the above-mentioned transaction node, the transaction result corresponding to the transaction information is an intermediate state.
[0103] For example, the first preset query time is 10 seconds. After 10 seconds, the first device responds to the first transaction result verification instruction, obtains the transaction details data of each transaction node in the transaction system, and determines the second transaction result according to the transaction details data.
[0104] S1022. When the second transaction result does not include a transaction result response, push the first transaction result verification instruction into the delay queue for the second time, and query the third transaction result corresponding to the first transaction result verification instruction according to the second preset query time.
[0105] The first device sets the waiting query time of the first transaction result verification instruction to the second preset query time for the second time.
[0106] S1023. When the third transaction result does not include a transaction result response, push the first transaction result verification instruction into the delay queue for the third time, and query the fourth transaction result corresponding to the first transaction result verification instruction according to the third preset query time.
[0107] The first device sets the waiting query time of the first transaction result verification instruction as the third preset query time for the third time.
[0108] S1024. Use the fourth transaction result as the first transaction result.
[0109] The first preset query time is less than the second preset query time, and the second preset query time is less than the third preset query time. The first preset query time, the second preset query time, and the third preset query time are set based on experience.
[0110] It should be noted that the total duration of the first preset query time, the second preset query time and the third preset query time added together is less than the preset time threshold. For scenarios where cross-region transfers or transfer processes are complex and the waiting time for arrival is long, if the total duration of the first device and the second device processing the transfer process normally is in a time interval. For example, the time interval can be 35 minutes to 40 minutes. Therefore, the first preset query time, the second preset query time and the third preset query time can be set according to the actual time interval. For example, the first preset query time is 10 seconds, the second preset query time is 5 minutes, and the third preset query time is 30 minutes.
[0111] According to the method provided by the embodiment of the present application, after the first transaction result query instruction is pushed into the delay queue, the second transaction result is queried according to the first preset query time. If the first device still does not query the transaction result response fed back by the second device, the first transaction result query instruction is pushed into the delay queue for the second time, and the third transaction result is queried according to the second preset query time. If the third transaction result still does not include the transaction result response fed back by the second device, the first transaction result query instruction is pushed into the delay queue for the third time, and the fourth transaction result is queried according to the third preset query time, and the fourth transaction result is used as the first transaction result. Among them, the first preset query time is less than the second preset query time, and the second preset query time is less than the third preset query time, that is, as the number of queries increases, the preset query time is also extended. In this way, as the query time is extended, the possibility of obtaining the transaction result response fed back by the second device can be increased.
[0112] Regarding the above method of using the delayed queue to query transaction results, the following takes the FSP system as an example and combines Figure 5 The transaction result query method provided by the embodiment of the present application is introduced, such as Figure 5 As shown, the method includes:
[0113] S501. System startup.
[0114] The system startup refers to restarting the FPS system after the FPS system is shut down.
[0115] S502: Push the data to be verified in the database into a delay queue.
[0116] It is understandable that after the above-mentioned system is shut down, the user will still initiate transactions through the first device. Therefore, in response to the transaction initiated by the user through the first device, the first device generates a transaction result verification instruction and stores it in the database. When the FPS system is restarted, the transaction result verification instruction stored in the database is pushed into the delay queue. The data to be verified is the transaction result verification instruction in the above-mentioned embodiment.
[0117] Specifically, the method of pushing the transaction result verification instruction into the delay queue refers to the relevant description in the above embodiment, which will not be repeated here.
[0118] S503: Determine verification requirements.
[0119] The verification requirement is a transaction result verification instruction generated in real time by the first device in response to a transaction initiated by a user during the operation of the FPS system.
[0120] S504: Use the delay queue to verify.
[0121] Specifically, the method of using the delay queue for verification is described in the above embodiment and will not be repeated here.
[0122] S505: Determine whether the remittance result is found.
[0123] If yes, execute S508; if no, push the data to be verified and the verification requirements into the delay queue again, wait for the second preset query time, and execute S506.
[0124] The remittance result is the transaction result response fed back by the second device.
[0125] S506: Determine whether the remittance result is found.
[0126] If yes, execute S508; if no, push the data to be verified and the verification requirements into the delay queue again, wait for the third preset query time, and execute S507.
[0127] S507: Determine whether the remittance result is found.
[0128] If yes, execute S508, if no, execute S509.
[0129] S508. Update the FPS remittance result.
[0130] S509: End the query.
[0131] Among them, after the query is completed, the remittance result of FPS is updated to transaction failure.
[0132] By adopting the method provided in the embodiment of the present application, a delay queue is used to perform multiple inquiries on the remittance results, and the first preset query time is less than the second preset query time, and the second preset query time is less than the third preset query time, that is, as the number of queries increases, the preset query time is also extended. In this way, as the query time is extended, the possibility of obtaining a transaction result response fed back by the second device can be increased.
[0133] In some embodiments of the present application, after the transaction result corresponding to the transaction information in the local database is updated according to the first transaction result, the user can also query the transaction result on the query page. Specifically, in the above S103, after the transaction result corresponding to the transaction information in the local database is updated according to the first transaction result, such as Figure 6 As shown, the method also includes:
[0134] S601: Receive the first input of the user on the query page.
[0135] The first input includes a transaction information identifier of the transaction information. For example, the transaction information identifier may be a transaction code or a verification code agreed upon by both parties to the transaction.
[0136] S602: Search the local database for a transaction result corresponding to the transaction information according to the transaction information identifier.
[0137] S603: When the transaction result is a first status result, the first status result is displayed on the query page.
[0138] The first status result is other status results except the transaction success status result and the transaction failure status result, that is, the intermediate state in the above embodiment.
[0139] It should be noted that, after searching the local database for the transaction result corresponding to the transaction information according to the transaction information identifier in the above S602, if the first device finds the transaction result response fed back by the second device, it can display it on the display page based on the found transaction result, specifically including the following two situations:
[0140] Case 1: When the transaction result is a successful transaction, the transaction success information is displayed on the query page.
[0141] Case 2: When the transaction result is a transaction failure status result, the transaction failure information is displayed on the query page.
[0142] In this way, when the local database stores the transaction success status result or transaction failure status result corresponding to the above-mentioned transaction information feedback by the second device, the first device displays the transaction success information or transaction failure information on the query page according to the searched transaction success status result or transaction failure status result, and provides the transaction result to the user.
[0143] In addition, after searching the local database for the transaction result corresponding to the transaction information according to the transaction information identifier in the above S602, if the transaction result is a first status result, the first device can also use the delay queue to verify the transaction result to obtain a second transaction result, and then update the transaction result in the local database according to the second transaction result. Finally, the preset waiting information is displayed on the query page.
[0144] The preset waiting information is used to prompt the user to wait for the verified transaction result.
[0145] In this way, when the transaction result is the first status result, it means that the first device has not yet received the transaction result response sent by the second device. Therefore, the first device needs to continuously monitor the transaction status. The first device uses the delay queue to verify the transaction result, and finally obtains the second transaction result, wherein the second transaction result is the transaction result response sent by the second device. In addition, since the waiting time for verifying the transaction result using the delay queue is long, the first device can display a preset waiting information on the query page when it finds that the transaction result is the first status result, so as to prompt the user to wait for the verified transaction result.
[0146] Using the method provided in the embodiment of the present application, after the first device updates the transaction result corresponding to the transaction information, the user can enter a first input in the query interface, and the first input includes a transaction information identifier. In this way, the first device can query the transaction result corresponding to the transaction information in the local database according to the transaction information identifier. Among them, when the transaction result is a first status result, the first device directly displays the first status result to the user on the query page. In this way, the user can obtain the transaction result on the query page.
[0147] It should be noted that after searching for a transaction result that is a first status result, the first device uses a delay queue to verify the transaction result. Specifically, the transaction result can be verified according to the following steps:
[0148] Step 1: Generate a second transaction result verification instruction corresponding to the transaction information identifier.
[0149] Step 2: Push the second transaction result verification instruction into the delay queue, and query the second transaction result corresponding to the second transaction result verification instruction according to the arrangement order of the transaction result verification instructions in the delay queue.
[0150] It can be understood that the first device searches for a transaction result in the first state, that is, the transaction result is in an intermediate state, and needs to determine the final state of the transaction information identifier, that is, determine the transaction result response corresponding to the transaction information identifier. Therefore, the first device uses the above-mentioned delay queue to query the transaction result of the second transaction result verification instruction.
[0151] The specific method of using the delay queue to query transaction results is referred to the relevant description in the above embodiment and will not be repeated here.
[0152] Using the method of the embodiment of the present application, when the transaction result stored in the local database is a first status result, that is, the transaction result is a status result other than a successful transaction status result and a failed transaction status result, it indicates that the second device has not yet fed back a transaction result response. Therefore, the first device uses a delayed queue to query the transaction result and monitors each node in the transaction process to obtain the transaction status in a timely manner, and updates the transaction results in the local database in real time to ensure that the user can promptly query whether the transaction is successful.
[0153] The following combination Figure 7 The query page display method provided by the embodiment of the present application is introduced, such as Figure 7 As shown, the method includes:
[0154] S701. Input query conditions.
[0155] The user enters a query condition on the query page, and the query condition is the first input in the above embodiment.
[0156] S702. Search for transaction details.
[0157] Among them, the first input includes the above-mentioned transaction information identifier, and the first device searches for transaction detail data corresponding to the transaction information identifier according to the transaction information identifier, thereby determining the transaction information.
[0158] S703: Determine whether it is a final state.
[0159] If yes, execute S704, if no, execute S705.
[0160] The final state refers to the transaction result corresponding to the transaction information identifier, which is a transaction failure or a transaction success. Other transaction results other than transaction failure and transaction success are intermediate states.
[0161] S704, end the query and output the final state data.
[0162] The first device displays the final state data on the query page, that is, the first device displays transaction failure or transaction success on the query page.
[0163] S705: Determine whether verification is required.
[0164] If yes, execute S706, if no, execute S708.
[0165] S706: Initiate a verification request.
[0166] The verification request is the second transaction result verification request mentioned above.
[0167] S707, end the query, and display the preset waiting information on the query page.
[0168] It is understandable that since the waiting time for querying the transaction results using the delay queue is relatively long, the first device may display preset waiting information on the query page to prompt the user to query again later.
[0169] S708. Output transaction details data.
[0170] The transaction detail data is the transaction detail data saved by each transaction node that is searched by the first device based on the transaction information identifier.
[0171] S709, end the query, and display the intermediate data on the query page.
[0172] Among them, based on the above transaction details data, the first device can determine the transaction node where the current transaction process is located, so as to display the intermediate data on the query page.
[0173] For example, the intermediate data may be "transfer in progress" or "request timed out".
[0174] In some embodiments of the present application, after the first device initiates a transaction to the second device, the user can refund the transaction on the second device. Figure 8 As shown, the method includes:
[0175] S801. User initiates a refund.
[0176] S802. Refund the ticket to the refunding party according to the refund information.
[0177] Among them, the second device responds to the refund operation initiated by the user, obtains the refund information entered by the user, determines the refund receiving account, and then refunds the refund to the refund account according to the refund information.
[0178] S803: Determine whether the refund is successful.
[0179] If yes, execute S804, if no, execute S806.
[0180] S804. Refund to the corresponding account.
[0181] S805. Synchronize FPS remittance status.
[0182] Among them, the FPS remittance status is determined based on the transaction details data of each transaction node in the FPS system. The specific determination method refers to the relevant description in the above embodiment and will not be repeated here.
[0183] S806. Refund to failed accounts.
[0184] It should be noted that the corresponding account and the failed account are special accounts within the bank for receiving refunds. Through the above corresponding account and failed account, refund information can be sent to the refund receiving account.
[0185] S807. Manual adjustment by business personnel.
[0186] S808. Complete the refund.
[0187] By adopting the method provided in the embodiment of the present application, by monitoring the transaction detail data of each transaction node in the FPS system, the transaction interruption point in the transaction process can be obtained, thereby making it easier for business personnel to determine the transaction interruption point, quickly complete manual account adjustment, and ensure the safety of funds.
[0188] Based on the same concept, the embodiment of the present application provides a transaction processing device, which is applied to a first device, such as Fig. 9 As shown, the device comprises:
[0189] A generating module 901 is configured to generate a first transaction result verification instruction corresponding to the transaction information if no transaction success response corresponding to the transaction information sent by the second device is received within a preset time after the transaction information is sent to the second device;
[0190] A query module 902, configured to push the first transaction result verification instruction into a delay queue, and query the first transaction result corresponding to the first transaction result verification instruction according to the arrangement order of the transaction result verification instructions in the delay queue;
[0191] The updating module 903 is used to update the transaction result corresponding to the transaction information in the local database according to the first transaction result.
[0192] In a possible implementation, the query module 902 is specifically configured to:
[0193] Pushing the first transaction result verification instruction into the delay queue for the first time, and querying the second transaction result corresponding to the first transaction result verification instruction according to the first preset query time;
[0194] In the case that the second transaction result does not include the transaction result response, pushing the first transaction result verification instruction into the delay queue for the second time, and querying the third transaction result corresponding to the first transaction result verification instruction according to the second preset query time;
[0195] If the third transaction result does not include the transaction result response, pushing the first transaction result verification instruction into the delay queue for the third time, and querying the fourth transaction result corresponding to the first transaction result verification instruction according to the third preset query time;
[0196] Using the fourth transaction result as the first transaction result;
[0197] The first preset query time is shorter than the second preset query time, and the second preset query time is shorter than the third preset query time.
[0198] In a possible implementation, the device further includes:
[0199] A receiving module, configured to receive a first input from a user on a query page, wherein the first input includes a transaction information identifier of the transaction information;
[0200] A search module, configured to search the local database for a transaction result corresponding to the transaction information according to the transaction information identifier;
[0201] The display module is used to display the first status result on the query page when the transaction result is a first status result, and the first status result is other status results except the transaction success status result and the transaction failure status result.
[0202] In a possible implementation, the display module is further used for:
[0203] In the case where the transaction result is the transaction success status result, displaying transaction success information on the query page;
[0204] In the case where the transaction result is the transaction failure status result, the transaction failure information is displayed on the query page.
[0205] In a possible implementation, the query module 902 is further configured to verify the transaction result using the delay queue to obtain a second transaction result when the transaction result is a first status result;
[0206] The updating module 903 is further configured to update the transaction result in the local database according to the second transaction result;
[0207] The display module is also used to display preset waiting information on the query page, and the preset waiting information is used to prompt the user to wait for the verified transaction result.
[0208] In a possible implementation, the query module 902 is further configured to:
[0209] Generate a second transaction result verification instruction corresponding to the transaction information identifier;
[0210] The second transaction result verification instruction is pushed into the delay queue, and the second transaction result corresponding to the second transaction result verification instruction is queried according to the arrangement order of the transaction result verification instructions in the delay queue.
[0211] In a possible implementation, the device further includes:
[0212] The receiving module is further used to receive a second input from the user on the resource exchange page, wherein the second input includes the transaction information;
[0213] a sending module, configured to send the transaction information to the second device, so that the second device updates the account in the transaction information based on the transaction information;
[0214] The storage module is used to store the corresponding relationship between the transaction information identifier of the transaction information and the transaction result response in the local database when receiving the transaction result response sent by the second device.
[0215] Each module of the transaction processing device provided in the embodiment of the present application can realize Figure 1 The functions of each step of the transaction processing method are provided, and the corresponding technical effects can be achieved. For the sake of brevity, they will not be repeated here.
[0216] Fig.10 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.
[0217] The electronic device 1000 may include a processor 1001 and a memory 1002 storing computer program instructions.
[0218] Specifically, the processor 1001 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0219] The memory 1002 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 1002 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 1002 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 1002 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 1002 is a non-volatile solid-state memory.
[0220] In certain embodiments, the memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of the present application.
[0221] The processor 1001 implements any one of the transaction processing methods in the above embodiments by reading and executing computer program instructions stored in the memory 1002 .
[0222] In some examples, the electronic device 1000 may further include a communication interface 1003 and a bus 1004. Fig.10 As shown, the processor 1001, the memory 1002, and the communication interface 1003 are connected via a bus 1004 and communicate with each other.
[0223] The communication interface 1003 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0224] Bus 1004 includes hardware, software or both, and the parts of electronic equipment are coupled to each other.For example, but not limitation, bus 1004 may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 1004 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0225] Exemplarily, the electronic device 1000 may be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA).
[0226] The electronic device 1000 can execute the data transmission method in the embodiment of the present application, thereby realizing the combination Figure 1 and Fig. 9 A method and apparatus for transaction processing are described.
[0227] The transaction processing method in the above embodiment can be implemented by providing a computer storage medium in the embodiment of the present invention. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any transaction processing method in the above embodiment is implemented.
[0228] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed, implements any one of the transaction processing methods in the above embodiments.
[0229] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0230] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0231] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A transaction processing method, characterized in that: Applied to a first device, the method includes: If no transaction result response corresponding to the transaction information sent by the second device is received within a preset time after the transaction information is sent to the second device, generating a first transaction result verification instruction corresponding to the transaction information; Pushing the first transaction result verification instruction into a delay queue, and querying the first transaction result corresponding to the first transaction result verification instruction according to the arrangement order of the transaction result verification instructions in the delay queue; The transaction result corresponding to the transaction information in the local database is updated according to the first transaction result.
2. The method according to claim 1, characterized in that The step of pushing the first transaction result verification instruction into a delay queue and querying the first transaction result corresponding to the first transaction result verification instruction according to the arrangement order of the transaction result verification instructions in the delay queue includes: Pushing the first transaction result verification instruction into the delay queue for the first time, and querying the second transaction result corresponding to the first transaction result verification instruction according to the first preset query time; In the case that the second transaction result does not include the transaction result response, pushing the first transaction result verification instruction into the delay queue for the second time, and querying the third transaction result corresponding to the first transaction result verification instruction according to the second preset query time; If the third transaction result does not include the transaction result response, pushing the first transaction result verification instruction into the delay queue for the third time, and querying the fourth transaction result corresponding to the first transaction result verification instruction according to the third preset query time; Using the fourth transaction result as the first transaction result; The first preset query time is shorter than the second preset query time, and the second preset query time is shorter than the third preset query time.
3. The method according to claim 1, characterized in that After updating the transaction result corresponding to the transaction information in the local database according to the first transaction result, the method further includes: Receiving a first input from a user on a query page, wherein the first input includes a transaction information identifier of the transaction information; searching the local database for a transaction result corresponding to the transaction information according to the transaction information identifier; In the case where the transaction result is a first status result, the first status result is displayed on the query page, and the first status result is other status results except for a transaction success status result and a transaction failure status result.
4. The method according to claim 3, characterized in that After searching the local database for a transaction result corresponding to the transaction information according to the transaction information identifier, the method further includes: In the case where the transaction result is the transaction success status result, displaying transaction success information on the query page; In the case where the transaction result is the transaction failure status result, the transaction failure information is displayed on the query page.
5. The method according to claim 3, characterized in that: After searching the local database for a transaction result corresponding to the transaction information according to the transaction information identifier, the method further includes: When the transaction result is a first status result, the transaction result is verified by using the delay queue to obtain a second transaction result; updating the transaction result in the local database according to the second transaction result; The preset waiting information is displayed on the query page, and the preset waiting information is used to prompt the user to wait for the verified transaction result.
6. The method according to claim 5, characterized in that The using the delay queue to verify the transaction result to obtain a second transaction result includes: Generate a second transaction result verification instruction corresponding to the transaction information identifier; The second transaction result verification instruction is pushed into the delay queue, and the second transaction result corresponding to the second transaction result verification instruction is queried according to the arrangement order of the transaction result verification instructions in the delay queue.
7. The method according to claim 1, characterized in that Before generating a first transaction result verification instruction corresponding to the transaction information, the method further includes: receiving a second input from a user on a resource exchange page, wherein the second input includes the transaction information; Sending the transaction information to the second device, so that the second device updates data of an account in the transaction information based on the transaction information; When receiving the transaction result response sent by the second device, the corresponding relationship between the transaction information identifier of the transaction information and the transaction result response is stored in the local database.
8. A transaction processing device, characterized in that: Applied to a first device, the apparatus comprises: a generating module, configured to generate a first transaction result verification instruction corresponding to the transaction information if no transaction success response corresponding to the transaction information sent by the second device is received within a preset time after the transaction information is sent to the second device; A query module, configured to push the first transaction result verification instruction into a delay queue, and query the first transaction result corresponding to the first transaction result verification instruction according to the arrangement order of the transaction result verification instructions in the delay queue; An updating module is used to update the transaction result corresponding to the transaction information in the local database according to the first transaction result.
9. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the transaction processing method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the transaction processing method according to any one of claims 1 to 7 is implemented.
11. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to perform the transaction processing method as described in any one of claims 1 to 7.