An information processing method and device, electronic equipment and storage medium
By unifying the transaction result notification, batch verification, and asynchronous task processing methods in the transaction chain, the consistency problem between nodes in the transaction chain is solved, and timely synchronization and efficient verification of transaction results are achieved, thereby improving the stability and reliability of the transaction chain.
Patent Information
- Application Number
- CN202510821866.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-06-19
AI Technical Summary
The inconsistent notification methods for transaction results among nodes in the transaction chain affect the stability and reliability of the transaction chain, and make it difficult to detect and repair transaction anomalies in a timely manner, increasing maintenance costs and failure risks.
By unifying the transaction result notification method, batch verification method, and asynchronous task processing method in the transaction chain, timely message synchronization and efficient verification are ensured. This includes obtaining transaction requests, updating processing results based on the transaction log, and calling batch verification interfaces and asynchronous task scheduling instructions between nodes to ensure the accuracy and consistency of the transaction log.
It improves the stability and reliability of the transaction chain, ensures that transaction results are synchronized to relevant business parties in a timely manner, reduces system maintenance costs, and improves business continuity and customer experience.
Smart Images

Figure CN120317985B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, and particularly relates to an information processing method and device, electronic equipment and storage medium. BACKGROUND
[0002] At present, multiple important nodes are often involved in the transaction link in different fields, for example, the transaction link in the financial field may have an account center, an exchange center and a payment system, etc.; the transaction link in the e-commerce field may have an order processing center, an inventory management center and a payment system, etc.
[0003] However, due to inconsistent transaction result notification methods between nodes in the transaction link and differences in processing details, the stability and reliability of the entire transaction link are affected. For example, in the transaction process, if an abnormal situation such as timeout occurs, there may be a situation that the transaction has reached the final state, but the transaction result cannot be synchronized to the related business scenario in time. In this case, state updating is often required through manual methods, which not only affects the continuity of the business, but also reduces the customer experience; or when a node in the transaction link is optimized or modified, due to inconsistent logic between nodes, new defects are easily caused, and these defects are often difficult to find and repair in time, which not only increases the maintenance cost of the transaction system, but also increases the risk of transaction failure. SUMMARY
[0004] The present disclosure provides an information processing method and device, electronic equipment and storage medium to at least solve the above technical problems in the prior art.
[0005] According to a first aspect of the present disclosure, an information processing method is provided, comprising: acquiring a transaction request; processing the transaction request based on each node in a transaction link; during the processing of the transaction request, for each node of the transaction link, receiving a transaction message sent by a previous node; based on the transaction message, querying a transaction flow table to determine a transaction state after processing by the previous node; in response to the transaction state indicating that a corresponding target transaction is not completed, updating the transaction flow table based on a processing result of the target transaction; marking a current processing state when updating the transaction flow table; in response to at least one row of data in the transaction flow table being successfully updated, sending a transaction result notification message to a target business party; the transaction result notification message comprises the updated processing result in the transaction flow table, and the target business party is a business party that needs to acquire the transaction result notification message.
[0006] In an implementation, the information processing method further comprises: in response to the fact that there is no data successfully updated in the transaction log, determining a target cause leading to the fact that there is no data successfully updated in the transaction log; in response to the target cause being an update database exception, not capturing the update database exception, and waiting for re-processing of the target transaction; and in response to the target cause not being the update database exception, determining that the processing operation of the target transaction ends.
[0007] In an implementation, there is a batch verification interface between each node of the transaction link; the information processing method further comprises: during processing of the transaction request, for each node of the transaction link, in response to receiving a batch verification instruction, extracting a specified number of target to-be-verified data; generating a verification request message based on the target to-be-verified data; and calling the batch verification interface based on the verification request message, and performing batch verification on the target to-be-verified data through the batch verification interface.
[0008] In an implementation, the extracting a specified number of target to-be-verified data comprises: in response to a target channel being empty, extracting a specified number of target to-be-verified data from to-be-verified data corresponding to all channels except the target channel; and in response to the target channel not being empty, extracting a specified number of target to-be-verified data from to-be-verified data corresponding to the target channel.
[0009] In an implementation, the performing batch verification on the target to-be-verified data through the batch verification interface comprises: receiving a verification result message for the target to-be-verified data sent by the batch verification interface; in response to the verification result message being non-empty, sequentially determining a state of each verification transaction based on the verification result message, and updating a transaction log based on the state of each verification transaction.
[0010] In an implementation, the updating the transaction log based on the state of each verification transaction comprises: in response to the state of the verification transaction being successful, updating the transaction log based on the state of the verification transaction; marking a current processing state as processing when updating the transaction log; in response to at least one row of data in the transaction log being successfully updated, sending a transaction result notification message to the target business party; and the transaction result notification message comprises a state of the updated verification transaction in the transaction log.
[0011] In an implementation, the information processing method further includes: during processing of the transaction request, for each node of the transaction link, in response to receiving an asynchronous task scheduling instruction, querying the transaction log table according to the asynchronous task scheduling instruction to determine a transaction state after processing of the previous node; in response to the transaction state indicating that a corresponding target transaction is not completed, updating the transaction log table based on a processing result of the target transaction; marking a current processing state when updating the transaction log table; and in response to at least one row of data in the transaction log table being successfully updated, sending a transaction result notification message to a target service provider.
[0012] According to a second aspect of the present disclosure, an information processing apparatus is provided, including: an acquisition module configured to acquire a transaction request; a processing module configured to process the transaction request based on each node in a transaction link; the processing module is further configured to, during processing of the transaction request, for each node of the transaction link, receive a transaction message sent by a previous node; the processing module is further configured to query a transaction log table based on the transaction message to determine a transaction state after processing of the previous node; the processing module is further configured to, in response to the transaction state indicating that a corresponding target transaction is not completed, update the transaction log table based on a processing result of the target transaction; mark a current processing state when updating the transaction log table; the processing module is further configured to, in response to at least one row of data in the transaction log table being successfully updated, send a transaction result notification message to a target service provider; the transaction result notification message includes the updated processing result in the transaction log table, and the target service provider is a service provider in need of the transaction result notification message.
[0013] According to a third aspect of the present disclosure, an electronic device is provided, including:
[0014] at least one processor; and
[0015] a memory in communication with the at least one processor; wherein
[0016] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of the present disclosure.
[0017] According to a fourth aspect of the present disclosure, a non-transitory computer readable storage medium storing computer instructions is provided, and the computer instructions are used to enable the computer to perform the method of the present disclosure.
[0018] The information processing method, device, electronic equipment and storage medium of one embodiment of the present disclosure unify the transaction result notification mode, batch verification mode and asynchronous task processing mode between each node in the transaction link. The transaction result notification mode, batch verification mode and asynchronous task processing mode proposed by the present disclosure can ensure the timely synchronization of messages and the efficiency of verification, thereby ensuring the stability and reliability of the transaction link.
[0019] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0020] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will be more apparent from the following detailed description read in conjunction with the accompanying drawings, in which:
[0021] In the drawings, identical or corresponding reference numerals indicate identical or corresponding parts.
[0022] Figure 1 A flowchart of an information processing method according to an embodiment of the present disclosure is shown. Figure One ;
[0023] Figure 2 A flowchart of an information processing method according to an embodiment of the present disclosure is shown. Figure Two ;
[0024] Figure 3 A flowchart of an information processing method according to an embodiment of the present disclosure is shown. Figure Three ;
[0025] Figure 4 A flowchart of an information processing method according to an embodiment of the present disclosure is shown. Figure Four ;
[0026] Figure 5 A structural diagram of an information processing device according to an embodiment of the present disclosure is shown.
[0027] Figure 6 A structural diagram of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0028] To make the objectives, features, and advantages of this disclosure more apparent and understandable, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.
[0029] Figure 1 A flowchart illustrating an information processing method according to an embodiment of this disclosure is shown. Figure One ,like Figure 1 As shown, an information processing method includes:
[0030] Step S101: Obtain a transaction request.
[0031] In this embodiment, a transaction request from a user or external system is first received. The information contained in transaction requests may differ across different sectors. For example, a transaction request in the financial sector may include the transaction type (such as transfer, payment, etc.), transaction amount, account information of both parties, and transaction time; a transaction request in the e-commerce sector may include user information, product information, payment information, and logistics information.
[0032] Step S102: Process transaction requests based on each node in the transaction chain.
[0033] In this embodiment, transaction requests are jointly processed by all nodes in the transaction chain to ultimately complete the transaction. The nodes included in a transaction chain may differ across different fields. For example, a transaction chain in the financial field may include an accounting center, an exchange center, and a payment system; a transaction chain in the e-commerce field may include an order processing center, an inventory management center, and a payment system. Each node in the transaction chain processes the transaction request according to its own responsibilities and may generate new transaction status information or instructions requiring further processing. Every two nodes in the transaction chain can perform operations such as message notification, batch verification, and asynchronous task handling of exceptions. For example, after message notification between two nodes, batch verification is performed to verify the legality and accuracy of the transaction between the two nodes, and finally, exceptions between the two nodes are handled asynchronously.
[0034] Step S103: During the processing of the transaction request, for each node in the transaction link, the transaction message sent by the previous node is received.
[0035] In the embodiment, in the process of the transaction request being processed by each node, each node sends a transaction message to the next node after completing its own processing task. The transaction message can include a unique identifier of the transaction, a processing result of the transaction by the node, an updated transaction state of the node, and an error or warning information in the processing of the node. Each node can receive the transaction message sent by the previous node.
[0036] In step S104, the transaction flow table is queried based on the transaction message to determine the transaction state after processing by the previous node.
[0037] In the embodiment, after receiving the transaction message from the previous node, the current node determines the latest state of the transaction by querying the transaction flow table based on the unique identifier of the transaction in the transaction message. The transaction flow table is a database table recording all processing steps and state changes of the transaction. By querying the transaction flow table, the current node can obtain the transaction state after processing by the previous node, including whether the transaction has been successfully processed, whether the transaction has unresolved problems or errors, and the current progress and state of the transaction.
[0038] In step S105, in response to the transaction state indicating that the corresponding target transaction is not completed, the transaction flow table is updated based on the processing result of the target transaction.
[0039] In the embodiment, if the transaction state indicates that the corresponding target transaction is not completed, i.e., the target transaction is not in a successful or failed state, the current node needs to process the target transaction according to its own responsibilities and update the transaction flow table based on the processing result of the target transaction. When updating the transaction flow table, the current processing state needs to be marked, including processing and timeout states. For example, if the current node generates a processing result when processing the target transaction, the current processing state is processing. If the current node generates a processing result due to timeout, the current processing state is timeout.
[0040] In step S106, in response to at least one row of data in the transaction flow table being successfully updated, a transaction result notification message is sent to the target business party.
[0041] In the embodiment, if at least one row of data in the transaction flow table is successfully updated, it indicates that the target transaction processing has made substantial progress. The current node needs to generate a transaction result notification message and send it to the target business party. The transaction result notification message includes the updated processing result in the transaction flow table, and the target business party is a business party that needs to obtain the transaction result notification message.
[0042] In the present disclosure, the transaction result notification manner between each node in the transaction link is unified, which can avoid the stability and reliability of the entire transaction link from being affected, can ensure that the transaction result can be synchronized to the related business party in time, and improves the business continuity and customer experience.
[0043] Figure 2 A flowchart of an information processing method is shown Figure Two As shown in Figure 2 An information processing method includes:
[0044] Step S201, receiving a transaction message.
[0045] Step S202, querying a transaction log table based on the transaction message to determine the transaction state after processing by the previous node.
[0046] The specific implementation details of steps S201-S202 are similar to steps S103-S104, and will not be repeated here.
[0047] If there is no target transaction corresponding to the transaction state, step S203 is performed, and the message processing ends.
[0048] If there is a target transaction corresponding to the transaction state, it is determined whether the target transaction is successful or failed, and if the target transaction is successful or failed, the processing ends. If the target transaction has been successfully completed or explicitly failed, all related processing procedures of the target transaction have ended and do not need to be processed again.
[0049] If the target transaction is not in a successful or failed state, step S204 is performed to update the transaction log table based on the processing result of the target transaction.
[0050] If at least one row of data is successfully updated, step S205 is performed to send a transaction result notification message to the target business party.
[0051] The specific implementation details of steps S204-S205 are similar to steps S105-S106, and will not be repeated here.
[0052] If there is no successfully updated data in the transaction log, a target cause leading to no successfully updated data in the transaction log is determined, if the target cause is an update database exception, step S206 is performed, the update database exception is not captured, and the target transaction is waited to be processed again. If no successfully updated data in the transaction log is caused by an update database exception, it is proved that the exception can be caused by a temporary problem, such as a database connection problem or a network delay, at this time, reprocessing can improve the chance of successful transaction update, therefore, the update database exception is not captured, and the target transaction is waited to be processed again, so as to avoid data error or loss caused by improper exception processing.
[0053] If the target cause is not an update database exception, step S207 is performed, and the message processing is ended. If the cause of no successfully updated data in the transaction log is not an update database exception, it is possible that no transaction result needs to be written into the transaction log after the current node processes the target transaction, therefore, the message processing can be directly ended.
[0054] Figure 3 A flowchart of an information processing method according to an embodiment of the present disclosure is shown Figure Three As shown in Figure 3 There is a batch verification interface between each node of the transaction link, and an information processing method includes the following steps.
[0055] In step S301, a batch verification instruction is received.
[0056] In the embodiment, in the process of processing a transaction request, a batch verification instruction can be received for each node of the transaction link, the batch verification instruction can include a data list to be verified, verification content, and priority of verification, etc., if the batch verification instruction is received, it is determined whether a target channel is empty, data in the target channel needs to be verified separately, for example, there is data to be verified in channel A, channel B, and channel C, if channel A is the target channel, the data to be verified in channel A needs to be verified separately, and the data to be verified in channel B and channel C can be verified together. In an example, the target channel can be specified by itself, the target channel can be determined based on priority and type of data in the channel, and the target channel can be determined based on load of the channel, quantity of data, etc.
[0057] If the target channel is empty, steps S302 and S303 are performed: step S302, extracting a specified number of target to-be-investigated data from the to-be-investigated data corresponding to all channels except the target channel; and step S303, generating an investigation request message. If the target channel is empty, a specified number of target to-be-investigated data is extracted from different data sources or channels, and the specified number represents the number of target to-be-investigated data. The specified number can be a value set in advance, that is, the specified number is the same for all batch investigation instructions. Alternatively, the specified number can be a value extracted from the batch investigation instruction, that is, the specified number corresponding to different batch investigation instructions can be the same or different. The specified number can be 500 or 1000, and the investigation request message can be generated based on the target to-be-investigated data. The investigation request message can include a list of target to-be-investigated data, an investigation type and parameters, a timestamp of the investigation request message, and the like.
[0058] If the target channel is not empty, steps S304 and S303 are performed: step S304, extracting a specified number of target to-be-investigated data from the to-be-investigated data corresponding to the target channel; and step S303, generating an investigation request message. If the target channel is not empty, a specified number of target to-be-investigated data needs to be extracted from the to-be-investigated data corresponding to the target channel, and the specified number can be 500 or 1000. Then, the investigation request message can be generated based on the target to-be-investigated data.
[0059] After the investigation request message is generated, step S305 is performed to call a batch investigation interface. The batch investigation interface is set between each node of the transaction link, and can verify multiple transaction data. The batch investigation interface can be implemented by using message queuing and distributed computing technologies. If the current node communicates with the previous node, the batch investigation interface is the batch investigation interface set between the current node and the previous node. If the current node communicates with the next node, the batch investigation interface is the batch investigation interface set between the current node and the next node.
[0060] The batch investigation interface is called based on the investigation request message, and the target to-be-investigated data is batch investigated through the batch investigation interface.
[0061] If the calling fails, step S312 is performed to assign a value of null to the target to-be-investigated data, and the batch investigation task ends. If the batch investigation interface fails to be called, the value of null is assigned to the target to-be-investigated data, and the batch investigation task ends. For example, the target to-be-investigated data queue is cleared, or the data is marked as investigation failure, so as to ensure the release of system resources and provide preparation for possible subsequent operations or retries.
[0062] If the call is successful, the batch verification interface receives a verification result message for the target to-be-verified data, and determines whether the verification result message is empty. The verification result message contains the verification result of each piece of target to-be-verified data, such as verification success, verification failure, or the need for further verification, etc.
[0063] If the verification result message is empty, step S311 is performed, and the batch verification task ends.
[0064] If the verification result message is not empty, step S306 is performed, and the state of each piece of verification transaction is determined based on the verification result message.
[0065] If the state of the verification transaction is not successful, step S310 is performed, and the verification transaction is discarded. For example, the verification transaction is removed from the to-be-processed queue, or the verification transaction is marked as invalid. Discarding the verification transaction is an important risk management step, which can prevent invalid or suspicious transactions from being further processed.
[0066] If the state of the verification transaction is successful, step S307 is performed, and the transaction flow table is updated based on the state of the verification transaction. The current node can update the state of all target to-be-verified data in the transaction flow table based on the state of the verification transaction, and mark the current processing state as processing when updating the transaction flow table, indicating that the transaction flow table is updated when the current node processes the batch verification transaction, rather than the update under the timeout state or abnormal state of the current node, ensuring the accuracy of the updated data.
[0067] If at least one row of data in the transaction flow table is successfully updated, that is, at least one piece of target to-be-verified data in the transaction flow table is successfully updated, step S308 is performed, and a transaction result notification message is sent to the target business party. The transaction result notification message includes the state of the updated verification transaction in the transaction flow table.
[0068] If there is no successfully updated data, the target reason for causing the transaction flow table to have no successfully updated data is determined, and if the target reason is an update database exception, step S309 is performed, and the update database exception is not captured, and the batch verification task ends. If the transaction flow table has no successfully updated data due to an update database exception, it is proved that the exception may be caused by a temporary problem, such as a database connection problem or network delay, and at this time, reattempting processing can improve the opportunity for transaction successful update, so the update database exception is not captured, and the batch verification task ends.
[0069] If the target reason is not an update database exception, the verification ends.
[0070] In the present disclosure, the batch verification manner between each node in the transaction link is unified, which can improve the verification efficiency and accuracy, and ensure the stability and reliability of the transaction link.
[0071] Figure 4 A flowchart of an information processing method according to an embodiment of the present disclosure is shown Figure Four As shown in Figure 4 An information processing method further includes:
[0072] In step S401, an asynchronous task scheduling instruction is received.
[0073] In the present embodiment, during the processing of a transaction request, an asynchronous task scheduling instruction may be received for each node of the transaction link, the asynchronous task scheduling instruction may be triggered by a transaction management system, an external API or internal business logic, and the asynchronous task scheduling instruction usually contains information such as the type of the task, the data identifier to be processed, and the processing priority.
[0074] In step S402, the transaction flow table is queried based on the asynchronous task scheduling instruction to determine the transaction state after processing by the previous node. After receiving the asynchronous task scheduling instruction, the current node will query the transaction flow table according to the data identifier in the asynchronous task scheduling instruction to determine the transaction state after processing by the previous node. The transaction state includes whether the transaction has been successfully processed, whether the transaction has unresolved problems or errors, and the current progress and state of the transaction, etc.
[0075] If there is no target transaction corresponding to the transaction state, step S403 is performed, and the asynchronous task is ended.
[0076] If there is a target transaction corresponding to the transaction state, it is determined whether the target transaction corresponding to the transaction state is successful or failed. If the target transaction is successful or failed, it proves that the target transaction has been completed, and the asynchronous task is ended.
[0077] If the target transaction is not in the successful or failed state, step S404 is performed to update the transaction flow table based on the processing result of the target transaction. In response to the transaction state showing that the corresponding target transaction is not completed, the transaction flow table is updated based on the processing result of the target transaction; and the current processing state is marked when updating the transaction flow table. If the target transaction is not in the successful or failed state, i.e., the target transaction is not completed, the current node needs to process the target transaction according to its own responsibilities, and update the transaction flow table based on the processing result of the target transaction. The current processing state needs to be marked when updating the transaction flow table, and the current processing state includes processing and timeout states. For example, the current processing state is processing when the current node generates a processing result while processing the target transaction; and the current processing state is timeout when the current node generates a processing result due to timeout.
[0078] If at least one row of the transaction log table is successfully updated, the step S405 is performed to send a transaction result notification message to the target business party. If at least one row of the transaction log table is successfully updated, it indicates that the target transaction processing has made substantial progress, and the current node needs to generate a transaction result notification message and send it to the target business party, wherein the transaction result notification message includes the updated processing result in the transaction log table, and the target business party is a business party that needs to obtain the transaction result notification message.
[0079] If there is no data successfully updated in the transaction log table, the target cause leading to no data successfully updated in the transaction log table is determined, and if the target cause is an update database exception, the step S406 is performed to not capture the update database exception and wait for re-performing the asynchronous processing. If there is no data successfully updated in the transaction log table due to an update database exception, it proves that the exception can be caused by a temporary problem, such as a database connection problem or a network delay, and at this time, re-trying the processing can improve the opportunity of transaction successful update, so the update database exception is not captured and the asynchronous processing is waited to be re-performed, thereby avoiding data errors or loss caused by improper exception processing.
[0080] If the target cause is not an update database exception, the step S407 is performed to end the asynchronous task.
[0081] In the present disclosure, the asynchronous task processing mode between the nodes in the transaction link is unified, which can improve the asynchronous processing capability, more effectively process the load, improve the response speed and throughput, and adapt to the growing transaction volume and business demand.
[0082] Figure 5 A structural schematic diagram of an information processing apparatus according to an embodiment of the present disclosure is shown in FIG. 1. As shown in FIG. 1, an information processing apparatus includes: Figure 5
[0083] The acquisition module 10 is configured to acquire a transaction request; the processing module 11 is configured to process the transaction request based on each node in a transaction link; the processing module 11 is further configured to, in the process of processing the transaction request, receive a transaction message sent by a previous node for each node in the transaction link; the processing module 11 is further configured to query a transaction flow table based on the transaction message to determine a transaction state after processing by the previous node; the processing module 11 is further configured to, in response to the transaction state indicating that a corresponding target transaction is not completed, update the transaction flow table based on a processing result of the target transaction; and mark a current processing state when updating the transaction flow table; the processing module 11 is further configured to, in response to at least one row of data in the transaction flow table being successfully updated, send a transaction result notification message to a target business party; the transaction result notification message includes the updated processing result in the transaction flow table, and the target business party is a business party that needs to acquire the transaction result notification message.
[0084] In an implementation, the processing module 11 is further configured to, in response to the transaction flow table not having successfully updated data, determine a target cause for the transaction flow table not having successfully updated data; in response to the target cause being an update database exception, not capture the update database exception and wait for reprocessing of the target transaction; and in response to the target cause not being the update database exception, determine that processing of the target transaction is completed.
[0085] In an implementation, there is a batch verification interface between each node in the transaction link, and the processing module 11 is further configured to, in the process of processing the transaction request, for each node in the transaction link, in response to receiving a batch verification instruction, extract a specified number of target to-be-verified data; generate a verification request message based on the target to-be-verified data; and call the batch verification interface based on the verification request message to perform batch verification on the target to-be-verified data through the batch verification interface.
[0086] In an implementation, the processing module 11 is further configured to, in response to the target channel being empty, extract a specified number of target to-be-verified data from to-be-verified data corresponding to all channels except the target channel; the data corresponding to the target channel needs to be separately batch-verified; and in response to the target channel not being empty, extract a specified number of target to-be-verified data from to-be-verified data corresponding to the target channel.
[0087] In an implementation, the processing module 11 is further configured to receive a verification result message for the target to-be-verified data sent by the batch verification interface; in response to the verification result message being non-empty, sequentially determine a state of each piece of verification transaction based on the verification result message, and update the transaction flow table based on the state of each piece of verification transaction.
[0088] In an implementation, the processing module 11 is further configured to: in response to verifying that the status of the transaction is successful, update the transaction flow table based on the status of the verified transaction; mark the current processing status as processing when updating the transaction flow table; in response to at least one row of data in the transaction flow table being successfully updated, send a transaction result notification message to the target business party; the transaction result notification message includes the status of the updated verified transaction in the transaction flow table.
[0089] In an implementation, the processing module 11 is further configured to: in the process of processing the transaction request, for each node of the transaction link, in response to receiving an asynchronous task scheduling instruction, query the transaction flow table according to the asynchronous task scheduling instruction to determine the transaction status after processing of the previous node; in response to the transaction status indicating that the corresponding target transaction is not completed, update the transaction flow table based on the processing result of the target transaction; mark the current processing status when updating the transaction flow table; in response to at least one row of data in the transaction flow table being successfully updated, send a transaction result notification message to the target business party.
[0090] According to embodiments of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.
[0091] Figure 6 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present disclosure described and / or claimed in this document.
[0092] As shown in Figure 6 The device 800 includes a computing unit 801 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. Various programs and data required for operation of the device 800 can also be stored in the RAM 803. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0093] A plurality of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a magnetic disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0094] The computing unit 801 can be various general and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 801 performs various methods and processes described above, such as an information processing method. For example, in some embodiments, an information processing method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded onto the RAM 803 and executed by the computing unit 801, one or more steps of an information processing method described above can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured to perform an information processing method by any other appropriate means, such as by means of firmware.
[0095] Various implementations of the systems and techniques described above herein can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application-specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0096] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a standalone software package, or entirely on a remote machine or server.
[0097] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0098] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0099] The systems and techniques described herein can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described herein), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0100] The computer system can include clients and servers. The clients and the servers are generally remote from each other and typically interact through a communication network. The relationship of client and server can arise by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The servers can be cloud servers, servers of a distributed system, or servers combined with a blockchain.
[0101] It should be understood that the steps shown in the above-mentioned various forms of flowcharts can be reordered, added, or deleted. For example, each step described in the present disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions of the present disclosure can be achieved, and the present disclosure is not limited herein.
[0102] In addition, the terms "first", "second" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "a plurality of" is two or more, unless otherwise explicitly and specifically limited.
[0103] The above description is merely a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present disclosure, which should be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.
Claims
1. An information processing method characterized by comprising: The method comprises: acquiring a transaction request; processing the transaction request based on each node in a transaction link; during processing of the transaction request, for each node of the transaction link, receiving a transaction message sent by a previous node; based on the transaction message, querying a transaction flow table to determine a transaction state after processing by the previous node; in response to the transaction state indicating that a corresponding target transaction is not completed, updating the transaction flow table based on a processing result of the target transaction; and marking a current processing state during updating of the transaction flow table; in response to at least one row of data in the transaction flow table being successfully updated, sending a transaction result notification message to a target business party; the transaction result notification message comprising the updated processing result in the transaction flow table, and the target business party being a business party that needs to acquire the transaction result notification message; wherein the method further comprises: in response to there being no successfully updated data in the transaction flow table, determining a target cause for the absence of successfully updated data in the transaction flow table; in response to the target cause being an update database exception, not capturing the update database exception and waiting to re-process the target transaction; in response to the target cause not being an update database exception, determining that processing of the target transaction is complete.
2. The method of claim 1, wherein, There is a batch verification interface between each node of the transaction link; the method further comprises: during processing of the transaction request, for each node of the transaction link, in response to receiving a batch verification instruction, extracting a specified number of target to-be-verified data; generating a verification request message based on the target to-be-verified data; calling the batch verification interface based on the verification request message, and performing batch verification of the target to-be-verified data through the batch verification interface.
3. The method of claim 2, wherein, The extraction of the specified number of target to-be-verified data comprises: in response to a target channel being empty, extracting a specified number of target to-be-verified data from to-be-verified data corresponding to all channels except the target channel; the data corresponding to the target channel needing to be separately batch verified; in response to the target channel not being empty, extracting a specified number of target to-be-verified data from to-be-verified data corresponding to the target channel.
4. The method of claim 2, wherein, The batch verification of the target to-be-verified data through the batch verification interface comprises: receiving a verification result message for the target to-be-verified data sent by the batch verification interface; in response to the verification result message being non-empty, sequentially determining a state of each verification transaction based on the verification result message, and updating a transaction flow table based on the state of each verification transaction.
5. The method of claim 4, wherein, The updating of the transaction flow table based on the state of each verification transaction comprises: in response to the state of the verification transaction being successful, updating the transaction flow table based on the state of the verification transaction; and marking a current processing state as processing during updating of the transaction flow table; in response to at least one row of data in the transaction flow table being successfully updated, sending a transaction result notification message to the target business party; the transaction result notification message comprising the updated state of the verification transaction in the transaction flow table.
6. The method of claim 1, wherein, The method further includes: In the process of processing the transaction request, for each node of the transaction link, in response to receiving an asynchronous task scheduling instruction, querying the transaction flow table according to the asynchronous task scheduling instruction to determine the transaction state after processing of the previous node; In response to the transaction state showing that a corresponding target transaction is not completed, updating the transaction flow table based on the processing result of the target transaction; and marking the current processing state when updating the transaction flow table; In response to at least one row of data in the transaction flow table being successfully updated, sending a transaction result notification message to a target business party.
7. An information processing apparatus, characterized by comprising: The device includes: An acquisition module configured to acquire a transaction request; A processing module configured to process the transaction request based on each node in a transaction link; The processing module is further configured to, in the process of processing the transaction request, receive a transaction message sent by a previous node for each node of the transaction link; The processing module is further configured to query a transaction flow table based on the transaction message to determine a transaction state after processing of the previous node; The processing module is further configured to, in response to the transaction state showing that a corresponding target transaction is not completed, update the transaction flow table based on a processing result of the target transaction; and mark a current processing state when updating the transaction flow table; The processing module is further configured to, in response to at least one row of data in the transaction flow table being successfully updated, send a transaction result notification message to a target business party; the transaction result notification message includes an updated processing result in the transaction flow table, and the target business party is a business party that needs to acquire the transaction result notification message; The processing module is further configured to, in response to there being no successfully updated data in the transaction flow table, determine a target cause of causing there being no successfully updated data in the transaction flow table; in response to the target cause being an update database exception, not capturing the update database exception and waiting to reprocess the target transaction; and in response to the target cause not being the update database exception, determining that a processing operation on the target transaction is ended.
8. An electronic device, comprising: includes: At least one processor; and A memory connected in communication with the at least one processor; wherein The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
9. A non-transitory computer-readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable a computer to perform the method of any one of claims 1-6.
Citation Information
Patent Citations
Distributed service transaction processing method and device, electronic equipment and medium
CN112288577A