Transaction processing method and device, computer equipment, storage medium and program product
By asynchronously polling external settlement and account opening results, the transaction data inconsistency problem caused by financial institutions in resource transactions due to the unavailability of external institutions is solved, which improves transaction processing efficiency and ensures data consistency.
Patent Information
- Application Number
- CN202411521321.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2024-12-27
AI Technical Summary
Financial institutions have inconsistency in transaction data caused by the unavailability of external institutions in resource transactions. Traditional methods are inefficient and easy to miss transactions, making it difficult to ensure the consistency of transaction data of all parties.
Provide a transaction processing method, receive resource transaction requests and perform internal settlement. If external settlement is abnormal, the settlement result will be asynchronously polled, and the account will be recorded in the internal ledger system based on the polling result. If the account is failed, the account will be polled asynchronously As a result, ensure consistency of transaction data.
Through the asynchronous polling mechanism, there is no need to wait for the external settlement system to recover, and the settlement results are obtained in a timely manner and accounted for, ensuring the consistency of transaction data of all parties, improving transaction processing efficiency, and reducing the need for manual intervention.
Smart Images

Figure CN119205344A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data processing technology, and in particular to a transaction processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] With the development of the financial industry, there are some resource trading businesses. As secondary custodians, financial institutions, in addition to conducting transactions between financial institutions and customers internally (that is, changing the share of resources involved in the transaction internally first), also need to confirm the transaction settlement with external institutions (primary custodians) in real time after responding to customers' resource trading requests in real time. In this way, according to the feedback from external institutions, the subsequent transaction processing procedures are executed. For example, according to the feedback from external institutions, it is determined whether to update the share of resources involved in the transaction before recording it in the account, so that the transaction data in the accounts of financial institutions, customers, and external institutions are consistent. However, if the external institution is unavailable, it will cause a large number of transactions to be settled and confirmed by external institutions to accumulate in the financial institution, resulting in inconsistent transaction data in the accounts of all parties.
[0003] In traditional technology, it is generally necessary to manually re-trigger the external institution to confirm the transaction settlement after the external institution recovers. However, in the face of a large number of transactions to be confirmed, this processing method is inefficient and may miss some transactions, making it difficult to efficiently ensure the consistency of transaction data of all parties in resource transactions. Summary of the invention
[0004] Based on this, it is necessary to provide a transaction processing method, device, computer equipment, computer-readable storage medium and computer program product that can efficiently ensure the consistency of transaction data of all parties in resource transactions in response to the above technical problems.
[0005] In a first aspect, the present application provides a transaction processing method, comprising: receiving a resource transaction request for a target resource; performing internal settlement on the target resource according to the resource transaction request, obtaining an internal settlement result, and sending an external settlement request to an external settlement system according to the internal settlement result; if the external settlement system feedbacks a settlement abnormality, asynchronously polling the external settlement system for the external settlement result of the external settlement request, and based on the external settlement result obtained by polling within a first polling number, posting the transaction data associated with the resource transaction request in the internal ledger system; if the posting fails, asynchronously polling the posting result to the internal ledger system, and based on the posting result obtained by polling within a second polling number, feeding back the transaction processing result.
[0006] In one of the embodiments, internal settlement is performed on the target resource according to the resource transaction request to obtain an internal settlement result, including: determining the transaction object, transaction type and target resource transaction volume associated with the resource transaction request; updating the resource holding amount of the transaction object and the tradable amount of the target resource according to the target resource transaction volume and transaction type to obtain the internal settlement result.
[0007] In one of the embodiments, the resource holdings of the transaction object and the tradable quantity of the target resource are updated according to the target resource transaction volume and the transaction type to obtain an internal settlement result, including: if the transaction type is a first transaction type, according to the target resource transaction volume, the storage resources of the transaction object are deducted, the target resources held by the transaction object are increased, and the tradable quantity of the target resource is reduced to obtain an internal settlement result; if the transaction type is a second transaction type, according to the target resource transaction volume, the target resources held by the transaction object are reduced, and the tradable quantity of the target resource is increased to obtain an internal settlement result.
[0008] In one of the embodiments, transaction data associated with the resource transaction request is recorded in the internal ledger system according to the external settlement result obtained by polling within the first polling number, including: when an external settlement result indicating a successful settlement is received within the first polling number, polling is stopped, and the transaction data associated with the resource transaction request is recorded in the internal ledger system; when a settlement anomaly is determined according to the external settlement result obtained by polling within the first polling number, an external settlement anomaly prompt is fed back, until an external settlement result indicating a successful settlement is received in response to the external settlement anomaly prompt, and the transaction data associated with the resource transaction request is recorded in the internal ledger system.
[0009] In one embodiment, successful settlement includes: passing the internal settlement result and failing the internal settlement result. The transaction data associated with the resource transaction request is recorded in the internal ledger system, including: when the successful settlement indicates that the internal settlement result is passed, the transaction data associated with the resource transaction request is recorded in the internal ledger system; when the successful settlement indicates that the internal settlement result is not passed, a rollback operation is performed according to the internal settlement result, and the transaction data associated with the resource transaction request after the rollback operation is completed is recorded in the internal ledger system.
[0010] In one of the embodiments, when the settlement success indicates that the internal settlement result is passed, the transaction data associated with the resource transaction request is recorded in the internal ledger system, including: when the settlement success indicates that the internal settlement result is passed, determining the transaction type associated with the resource transaction request; when the transaction type is a first transaction type, recording the transaction data associated with the resource transaction request in the internal ledger system; when the transaction type is a second transaction type, increasing the storage resources of the transaction object associated with the resource transaction request according to the target transaction resource amount associated with the resource transaction request, and updating the transaction data associated with the resource transaction request. After the update is completed, recording the transaction data associated with the resource transaction request in the internal ledger system.
[0011] In one of the embodiments, the transaction processing result is fed back based on the account posting result obtained by polling within the second polling number, including: when an account posting result indicating successful account posting is received within the second polling number, polling is stopped and the transaction processing result is fed back; when the account posting failure is determined based on the account posting result obtained by polling within the second polling number, an account posting exception prompt is fed back, until an account posting result indicating successful account posting is received in response to the account posting exception prompt, and the transaction processing result is fed back.
[0012] In the second aspect, the present application also provides a transaction processing device, including: a transaction request receiving module, used to receive a resource transaction request for a target resource; an internal and external settlement processing module, used to perform internal settlement of the target resource according to the resource transaction request, obtain an internal settlement result, and send an external settlement request to the external settlement system according to the internal settlement result; an external settlement processing module, used to asynchronously poll the external settlement system for the external settlement result of the external settlement request if the external settlement system feedbacks a settlement abnormality, and based on the external settlement result obtained by polling within a first polling number, the transaction data associated with the resource transaction request is posted in the internal ledger system; an account posting result polling module, used to asynchronously poll the internal ledger system for the account posting result if the account posting fails, and feedback the transaction processing result based on the account posting result obtained by polling within a second polling number.
[0013] In one of the embodiments, the internal and external settlement processing module includes: an internal settlement unit, which is used to determine the transaction object, transaction type and target resource transaction volume associated with the resource transaction request; based on the target resource transaction volume and transaction type, the resource holding amount of the transaction object and the tradable amount of the target resource are updated to obtain the internal settlement result.
[0014] In one of the embodiments, the internal settlement unit is specifically used to: if the transaction type is the first transaction type, deduct the storage resources of the transaction object according to the target resource transaction volume, increase the target resources held by the transaction object, and reduce the tradable amount of the target resources to obtain an internal settlement result; if the transaction type is the second transaction type, reduce the target resources held by the transaction object according to the target resource transaction volume, and increase the tradable amount of the target resources to obtain an internal settlement result.
[0015] In one of the embodiments, the external settlement processing module includes: a first external settlement processing unit, which is used to stop polling when an external settlement result indicating a successful settlement is received within a first polling number, and to record the transaction data associated with the resource transaction request in an internal ledger system; a second external settlement processing unit, which is used to feedback an external settlement abnormality prompt when a settlement abnormality is determined based on the external settlement result obtained by polling within the first polling number, until an external settlement result indicating a successful settlement is received in response to the external settlement abnormality prompt, and the transaction data associated with the resource transaction request is recorded in the internal ledger system.
[0016] In one embodiment, successful settlement includes: passing the internal settlement result and failing the internal settlement result. The first external settlement processing unit and the second external settlement processing unit are specifically used to: when the successful settlement indicates that the internal settlement result is passed, the transaction data associated with the resource transaction request is recorded in the internal ledger system; when the successful settlement indicates that the internal settlement result is not passed, a rollback operation is performed according to the internal settlement result, and the transaction data associated with the resource transaction request after the rollback operation is completed is recorded in the internal ledger system.
[0017] In one of the embodiments, the first external settlement processing unit and the second external settlement processing unit are further specifically used to: when the settlement success indication is passed through the internal settlement result, determine the transaction type associated with the resource transaction request; when the transaction type is the first transaction type, post the transaction data associated with the resource transaction request in the internal ledger system; when the transaction type is the second transaction type, increase the storage resources of the transaction object associated with the resource transaction request according to the target transaction resource quantity associated with the resource transaction request, and update the transaction data associated with the resource transaction request. After the update is completed, post the transaction data associated with the resource transaction request in the internal ledger system.
[0018] In one of the embodiments, the account posting result polling module includes: a first transaction processing result feedback unit, which is used to stop polling and feedback the transaction processing result when an account posting result indicating successful account posting is received within a second polling number; a second transaction processing result feedback unit, which is used to feedback an account posting exception prompt when it is determined that the account posting has failed based on the account posting result obtained by polling within the second polling number, until an account posting result indicating successful account posting is received for the account posting exception prompt, and then feedback the transaction processing result.
[0019] In a third aspect, the present application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned transaction processing method when executing the computer program.
[0020] In a fourth aspect, the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned transaction processing method is implemented.
[0021] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the above-mentioned transaction processing method when executed by a processor.
[0022] The above-mentioned transaction processing method, device, computer equipment, computer-readable storage medium and computer program product first receive a resource transaction request for a target resource, and perform internal settlement on the target resource according to the resource transaction request to obtain an internal settlement result, and then send an external settlement request to the external settlement system according to the internal settlement result. If the external settlement system feedbacks a settlement abnormality, the external settlement result of the external settlement request can be asynchronously polled to the external settlement system, without waiting for the external settlement system to recover and then manually triggering the external settlement system to feedback the result, but the external settlement result can be asynchronously polled from the external settlement system by itself, and the external settlement result can be obtained and recorded in time, thereby quickly restoring the consistency of the transaction data of all parties. Furthermore, the transaction data associated with the resource transaction request can be recorded in the internal ledger system according to the external settlement result obtained by polling within the first polling number, that is, according to the polling result of the external settlement stage, the transaction data can be recorded, thereby ensuring the consistency of the transaction data of all parties. If the posting fails, there is no need to manually re-query the posting result. The posting result can be efficiently polled asynchronously to the internal ledger system, and the transaction processing result can be fed back promptly and accurately based on the posting result obtained by polling within the second polling number. That is, the transaction processing result is fed back based on the polling results of the external settlement stage and the posting stage, so that the transaction data in the transaction processing result is consistent among all parties. Based on this, the above transaction processing method can efficiently ensure the consistency of transaction data of all parties in resource transactions. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0024] FIG1 is an application environment diagram of a transaction processing method in one embodiment;
[0025] FIG2 is a flow chart of a transaction processing method in one embodiment;
[0026] FIG3 is a flow chart of a transaction processing method in another embodiment;
[0027] FIG4 is a flow chart of a transaction processing method including an internal settlement process in one embodiment;
[0028] FIG5 is a flow chart of a transaction processing method including an internal settlement process in another embodiment;
[0029] FIG6 is a flow chart of a transaction processing method including two account upload processes in one embodiment;
[0030] FIG7 is a schematic diagram of a process of posting accounts according to transaction types in one embodiment;
[0031] FIG8 is a flow chart of a transaction processing method including automatic account entry and manual account entry in one embodiment;
[0032] FIG9 is a schematic diagram of a complete transaction processing method in one embodiment;
[0033] Fig.10 is a structural block diagram of a transaction processing device in one embodiment;
[0034] FIG. 11 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. 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, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0036] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations. The acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with relevant provisions of national laws and regulations.
[0037] The transaction processing method provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 can receive the resource transaction request for the target resource triggered by the terminal 102, perform internal settlement on the target resource according to the resource transaction request, obtain the internal settlement result, and send the external settlement request to the external settlement system according to the internal settlement result. If the external settlement system feedbacks the settlement abnormality, the server 104 can asynchronously poll the external settlement result of the external settlement request to the external settlement system, and according to the external settlement result obtained by polling within the first polling number, the transaction data associated with the resource transaction request is recorded in the internal ledger system. If the account fails, the server 104 can asynchronously poll the account result to the internal ledger system, and according to the account result obtained by polling within the second polling number, feedback the transaction processing result. Among them, the terminal 102 can be, but not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices, etc. The server 104 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The server 104 may be a server of a financial institution, on which the internal ledger system of the financial institution may be deployed.
[0038] It should be noted that an internal settlement system (a resource transaction agent system within a financial institution) may also be deployed in the server 104 to perform internal settlement of the resources involved in the transaction and to feed back the internal settlement results to the external settlement system. Taking the transaction of virtual resources as an example, if the financial institution acts as a secondary custodian, the external settlement system is a primary custodian responsible for managing, settling and registering transactions reported by the secondary custodian. For example, the external settlement system may be used to register and confirm the internal settlement results fed back by the internal settlement system, and to feed back whether the internal settlement results are passed, that is, whether a certain transaction is approved.
[0039] In an exemplary embodiment, as shown in FIG2 , a transaction processing method is provided, which is described by taking the method applied to the server in FIG1 as an example, and includes the following steps 202 to 208. Among them:
[0040] Step 202: Receive a resource transaction request for a target resource.
[0041] The target resource specifically refers to: the resource selected by the user from various tradable resources represented by the financial institution. The tradable resource specifically refers to: the virtual resource in the financial field that can be bought or sold with the approval of the external settlement system. The resource transaction request can be a user's request to buy the target resource, or a user's request to sell the target resource held by the user. The resource transaction request can carry: the user's personal account information registered in the server of the financial institution, the target resource to be traded, the target resource transaction volume, the transaction time, the transaction remarks, the transaction type, etc.
[0042] For example, a user can use a terminal to log in to an application of a financial institution, and select at least one tradable resource on sale from various tradable resources displayed on the application page, and after confirming the purchase, trigger a resource transaction request to buy the target resource, or select at least one tradable resource held by an individual, and after confirming the sale, trigger a resource transaction request to sell the target resource. Further, the server of the financial institution can receive and respond to the triggered resource transaction request.
[0043] Step 204: perform internal settlement on the target resource according to the resource transaction request, obtain an internal settlement result, and send an external settlement request to the external settlement system according to the internal settlement result.
[0044] Among them, internal settlement may include: settlement of resources held in user personal accounts in financial institutions, and settlement of tradable volumes of target resources in financial institutions.
[0045] Optionally, after the server of the financial institution receives the resource transaction request triggered by the user, the server may forward the resource transaction request to the internal settlement system deployed in the server, so that the internal settlement system first performs internal settlement between the user and the financial institution according to the information carried in the resource transaction request, thereby obtaining an internal settlement result. Furthermore, the server may control the internal settlement system to feed back the internal settlement result to the external settlement system, so that the external settlement system performs settlement confirmation on the internal settlement result.
[0046] Step 206, if the external settlement system reports a settlement exception, the external settlement system is asynchronously polled for the external settlement result of the external settlement request, and based on the external settlement result obtained by polling within the first polling number, the transaction data associated with the resource transaction request is recorded in the internal ledger system.
[0047] Among them, the feedback of settlement anomaly by the external settlement system can specifically refer to: the information fed back by the external settlement system indicates that the external settlement system is still confirming the transaction to which the internal settlement result belongs, and the status of the transaction is still "pending confirmation". That is, the external settlement system has not fed back a clear settlement result, and the financial institution cannot determine whether the internal settlement result has been passed based on the result fed back by the external settlement system, and cannot determine whether the transaction to which the internal settlement result belongs is successful. The feedback of settlement anomaly by the external settlement system usually occurs when there is no response after a timeout or the external settlement system is still confirming. Asynchronous polling is a mode in which one party periodically sends a query request to the other party to automatically query whether the status of a task has been updated regularly. The internal ledger system within a financial institution can be deployed on the server of the financial institution to store transaction data of various transactions within the financial institution. Accounting specifically refers to: importing transaction data into the internal ledger system. The first polling number can be flexibly configured according to actual needs.
[0048] Optionally, after the internal settlement system initiates an external settlement request to the external settlement system, the external settlement system may time out and fail to respond, or it may still be in the process of confirmation and feedback an external settlement result that indicates "pending confirmation". At this time, the internal settlement system can automatically trigger the asynchronous polling mechanism and determine the number of asynchronous polling. Furthermore, the internal settlement system can periodically send a settlement result query request associated with the external settlement request to the external settlement system through the asynchronous polling mechanism to poll the external settlement result of the external settlement request, and based on the external settlement result obtained by polling within the first number of polling times, the transaction data associated with the resource transaction request is recorded in the internal ledger system. Among them, each time the external settlement system receives a settlement result query request associated with the external settlement request, it will automatically check its own processing status of the external settlement request and feedback the latest processing status.
[0049] Step 208: If the posting fails, the internal ledger system is asynchronously polled for the posting result, and the transaction processing result is fed back based on the posting result obtained by polling within the second polling number.
[0050] The second polling times can be flexibly configured according to actual needs.
[0051] Optionally, if the posting fails, the server can asynchronously poll the internal ledger system for the posting result, and decide how to update the transaction data associated with the resource transaction request triggered by the user, such as transaction status, transaction flow, etc., based on the posting result obtained within the second polling number, and then feedback the transaction processing result to the user, so that the transaction processing result finally received by the user is consistent with the actual processing of the transaction data.
[0052] Based on the above steps 202 to 208, as shown in FIG3, a flow chart of another transaction processing method is provided, which mainly includes the following steps:
[0053] Step 302, receiving a resource transaction request for a target resource;
[0054] Step 304, performing internal settlement on the target resource according to the resource transaction request to obtain an internal settlement result;
[0055] Step 306, sending an external settlement request to the external settlement system according to the internal settlement result;
[0056] If the external settlement system reports a settlement exception, step 308 is executed to asynchronously poll the external settlement system for the external settlement result of the external settlement request; then step 310 is executed to post the transaction data associated with the resource transaction request in the internal ledger system according to the external settlement result obtained by polling within the first polling number;
[0057] If the external settlement system does not report a settlement anomaly, step 312 is executed to record the transaction data associated with the resource transaction request in the internal ledger system according to the external settlement result obtained;
[0058] Furthermore, if the posting fails, execute step 314 to asynchronously poll the internal ledger system for the posting result, and then execute step 316 to feedback the transaction processing result based on the posting result obtained by polling within the second polling number; if the posting is successful, execute step 318 to feedback the transaction processing result.
[0059] The above-mentioned transaction processing method first receives a resource transaction request for the target resource, and performs internal settlement on the target resource according to the resource transaction request to obtain an internal settlement result, and then sends an external settlement request to the external settlement system according to the internal settlement result. If the external settlement system feedbacks a settlement abnormality, the external settlement result of the external settlement request can be asynchronously polled to the external settlement system. There is no need to wait for the external settlement system to recover and then manually trigger the external settlement system to feedback the result. Instead, the external settlement result can be asynchronously polled from the external settlement system by itself, and the external settlement result can be obtained and recorded in time, thereby quickly restoring the consistency of the transaction data of all parties. Furthermore, the transaction data associated with the resource transaction request can be recorded in the internal ledger system according to the external settlement result obtained by polling within the first polling number, that is, according to the polling result of the external settlement stage, the transaction data can be recorded, thereby ensuring the consistency of the transaction data of all parties. If the posting fails, there is no need to manually re-query the posting result. The posting result can be efficiently polled asynchronously to the internal ledger system, and the transaction processing result can be fed back promptly and accurately based on the posting result obtained by polling within the second polling number. That is, the transaction processing result is fed back based on the polling results of the external settlement stage and the posting stage, so that the transaction data in the transaction processing result is consistent among all parties. Based on this, the above transaction processing method can efficiently ensure the consistency of transaction data of all parties in resource transactions.
[0060] In an exemplary embodiment, based on FIG. 3 , step 304 may further include steps 402 to 404, as shown in FIG. 4 , wherein:
[0061] Step 402: Determine the transaction object, transaction type, and target resource transaction amount associated with the resource transaction request.
[0062] The resource transaction request may include: the user's account information registered in the server of the financial institution, the target resource to be traded, the target resource transaction volume, the transaction type, the transaction time, the transaction notes, etc. The transaction type specifically refers to whether the target resource is bought or sold, and the target resource transaction volume specifically refers to how many shares of the target resource are bought or sold.
[0063] Optionally, the server may determine the transaction object, transaction type, and target resource transaction amount associated with the resource transaction request according to information carried in the resource transaction request.
[0064] For example, in a resource transaction request, the user's account information can be a user ID consisting of a string of numbers. The server can identify which user triggered the resource transaction request through the user ID carried in the resource transaction request, thereby determining the transaction object. In financial institutions, each tradable resource can also be configured with a resource identification code. Based on this, the server can determine which target resource the transaction object has selected for transaction through the resource identification code carried in the resource transaction request.
[0065] Step 404, based on the target resource transaction volume and transaction type, update the resource holdings of the transaction object and the tradable volume of the target resource to obtain an internal settlement result.
[0066] Optionally, the server can perform internal settlement between the transaction object and the financial institution based on the transaction volume and transaction type of the target resource, that is, how many shares of the target resource need to be bought or sold, and the real-time unit price corresponding to each share of the target resource, and update the resource holdings of the transaction object and the tradable volume of the target resource in the internal settlement system to obtain the internal settlement result.
[0067] In this embodiment, internal settlement between the transaction party and the financial institution can be automatically and accurately performed based on the information carried in the resource transaction request, which facilitates the subsequent external settlement system to confirm the settlement of the internal settlement result, and is conducive to the efficient online transactions of the financial institution.
[0068] In one embodiment, based on FIG. 4 , step 404 may further include steps 502 to 504, as shown in FIG. 5 , wherein:
[0069] If the transaction type is the first transaction type, execute step 502, deduct the storage resources of the transaction object according to the target resource transaction volume, increase the target resources held by the transaction object, and reduce the tradable volume of the target resources to obtain an internal settlement result.
[0070] Among them, the first transaction type is buying target resources.
[0071] Optionally, the server can deduct the storage resources of the transaction object in the internal settlement system according to the target resource transaction volume and the real-time unit price corresponding to each share of the target resource, and increase the target resources held by the transaction object according to the target resource transaction volume, and reduce the tradable amount of the target resource, thereby obtaining the internal settlement result. Among them, the deduction amount of the storage resources of the transaction object = the target resource transaction volume × the real-time unit price corresponding to each share of the target resource.
[0072] If the transaction type is the second transaction type, step 504 is executed to reduce the target resources held by the transaction object and increase the tradable amount of the target resources according to the target resource transaction volume, thereby obtaining an internal settlement result.
[0073] Among them, the second transaction type is selling the target resource.
[0074] Optionally, the server may reduce the target resources held by the transaction object and increase the tradable amount of the target resources in the internal settlement system according to the transaction volume of the target resources, thereby obtaining an internal settlement result.
[0075] In this embodiment, internal settlement can be accurately performed according to the actual transaction type, ensuring the consistency of transaction data of all parties, protecting the security of personal resources stored by customers in financial institutions, and ensuring that no wrong accounts are made.
[0076] In a possible implementation, based on FIG. 3 , as shown in FIG. 6 , step 310 may further include steps 602 to 604, wherein:
[0077] When an external settlement result indicating successful settlement is received within the first polling number, step 602 is executed to stop polling and post the transaction data associated with the resource transaction request in the internal ledger system.
[0078] Optionally, within the first polling number (the high-frequency asynchronous polling number is less than the first polling number), if the external settlement result indicating a successful settlement is not received, the server may automatically continue to send high-frequency asynchronous settlement result query requests to the external settlement system through the internal settlement system until an external settlement result indicating a successful settlement is received within the first polling number, thereby stopping polling, and based on the external settlement result indicating a successful settlement, promptly posting the transaction data associated with the resource transaction request in the internal ledger system, so that the settlement registration records in the customer account, the financial institution account, and the external settlement system remain consistent.
[0079] Exemplarily, when polling stops, the server can update the transaction status in the transaction data associated with the resource transaction request based on the external settlement result indicating a successful settlement. For example, the transaction status can be updated from an ambiguous state of "pending confirmation" to a clear state of "transaction successful" or "transaction failed", and based on "transaction successful" or "transaction failed".
[0080] When a settlement anomaly is determined based on the external settlement result obtained by polling within the first polling number, step 604 is executed to feedback an external settlement anomaly prompt until an external settlement result indicating a successful settlement is received for the external settlement anomaly prompt, and the transaction data associated with the resource transaction request is recorded in the internal ledger system.
[0081] Optionally, if the first polling times are exhausted and the server still has not polled the external settlement result that indicates a successful settlement, the server can determine the settlement anomaly based on the external settlement result obtained by polling within the first polling times, that is, determine that the external settlement system is temporarily unable to feedback a clear settlement result. In order to avoid a large number of settlement results to be confirmed piling up in financial institutions, resulting in a large number of inconsistencies in the transaction data of all parties, the server can feedback an external settlement anomaly prompt to the terminal or server used by the staff of the financial institution to prompt manual intervention to assist in completing the external settlement. Based on this, the server can, after receiving the external settlement result that indicates a successful settlement that is manually fed back for the external settlement anomaly prompt, post the transaction data associated with the resource transaction request in the internal ledger system to restore the consistency of the transaction data of all parties as soon as possible.
[0082] Exemplarily, the step of the server feeding back an external settlement anomaly prompt may be performed in real time after the settlement anomaly is determined, or may be performed uniformly at the end of the day.
[0083] In this embodiment, for the high-frequency asynchronous polling guarantee mechanism for obtaining external settlement results, manual intervention can be introduced after the first polling times are exhausted to provide a guarantee for abnormalities in the external settlement stage, which is conducive to restoring the consistency of transaction data of all parties as soon as possible.
[0084] In some embodiments, successful settlement includes: passing the internal settlement result and failing the internal settlement result. Based on this, for the transaction data associated with the resource transaction request in the flow chart shown in FIG6 , the following may be specifically included:
[0085] (1) When the settlement is successful and the internal settlement result is passed, the transaction data associated with the resource transaction request will be recorded in the internal ledger system.
[0086] Among them, passing the internal settlement result may specifically mean: after being confirmed and registered by the external settlement system, the transaction to which the internal settlement result belongs is successful.
[0087] Optionally, when confirming that the transaction to which the internal settlement result belongs is successful, the server does not need to roll back, that is, there is no need to withdraw the previous internal settlement, and the transaction data associated with the resource transaction request is promptly recorded in the internal ledger system.
[0088] (2) When the settlement success indication fails to pass the internal settlement result, a rollback operation is performed according to the internal settlement result, and the transaction data associated with the resource transaction request after the rollback operation is completed is recorded in the internal ledger system.
[0089] The failure to pass the internal settlement result may specifically refer to: after confirmation and registration by the external settlement system, the transaction to which the internal settlement result belongs fails.
[0090] Optionally, when confirming that the transaction to which the internal settlement result belongs is successful, the server needs to roll back to withdraw the previous internal settlement, but the rollback process is different for different transaction types (buy or sell).
[0091] For example, when the transaction type of the resource transaction request is the first transaction type (buy), during rollback, for the transaction to which the internal settlement result belongs, the server can return the storage resources of the transaction object that have been deducted during the internal settlement, reduce the target resources held by the transaction object, and increase the tradable amount of the target resources. Among them, the reduction in the target resources held by the transaction object = the increase in the tradable amount of the target resources = the target resource transaction volume during the internal settlement process.
[0092] For example, when the transaction type of the resource transaction request is the second transaction type (sell), when rolling back, for the transaction to which the internal settlement result belongs, the server can increase the target resource held by the transaction object and reduce the tradable amount of the target resource. Among them, the increase in the target resource held by the transaction object = the reduced tradable amount of the target resource = the target resource transaction volume during the internal settlement process.
[0093] In this embodiment, different rollback processes can be adopted for different transaction types, thereby ensuring that the user's personal resources stored in the financial institution are not wrongly accounted for, and ensuring the transaction accuracy of the target resources in the financial institution, thereby ensuring the consistency of the transaction data of all parties.
[0094] In some embodiments, according to the business characteristics of different transaction types, for example, transactions involving purchases need to deduct resources stored by the customer in the internal settlement process, while transactions involving sales need to remit resources to the customer after the external settlement is passed. Therefore, when the settlement success indicates the internal settlement result, the transaction data associated with the resource transaction request is recorded in the internal ledger system, as shown in FIG7, which may specifically include:
[0095] When the settlement success indicates that the internal settlement result is passed, step 702 is executed to determine the transaction type associated with the resource transaction request, wherein the transaction type includes: buying the target resource or selling the target resource.
[0096] When the transaction type is the first transaction type, step 704 is executed to record the transaction data associated with the resource transaction request in the internal ledger system.
[0097] Specifically, for transactions involving the purchase of target resources, since the resources stored in the transaction object have been deducted during the internal settlement process, after the external settlement system confirms that the transaction has passed, there is no need to process the resources stored in the transaction object. The transaction data associated with the resource transaction request can be directly recorded in the internal ledger system.
[0098] When the transaction type is the second transaction type, execute step 706, increase the storage resources of the transaction object associated with the resource transaction request according to the target transaction resource quantity associated with the resource transaction request, and update the transaction data associated with the resource transaction request. After the update is completed, the transaction data associated with the resource transaction request is recorded in the internal ledger system.
[0099] Specifically, for transactions involving the sale of target resources, since the resources stored by the transaction object are not processed during the internal settlement process, after the external settlement system confirms that the transaction has passed, it is necessary to increase the storage resources of the transaction object associated with the resource transaction request based on the target transaction resource volume associated with the resource transaction request and the real-time unit price per share of the target resource. That is, the resources obtained from the sale of the target resource are transferred to the personal account of the transaction object, and the transaction data associated with the resource transaction request is updated, for example, the change flow of the storage resources of the transaction object is increased. Finally, after the update is completed, the server can record the transaction data associated with the resource transaction request in the internal ledger system. Among them, the increase in the storage resources of the transaction object = the target transaction resource volume × the real-time unit price per share of the target resource.
[0100] In this embodiment, according to the characteristics of the transaction type, after the external settlement system confirms that the transaction has passed, the required accounting method can be accurately selected to ensure that the resources stored by the transaction object in the financial institution are not misappropriated, the resource security of the transaction object is guaranteed, and the consistency of the transaction data of all parties can be ensured.
[0101] In one embodiment, based on FIG. 3 , as shown in FIG. 8 , step 316 includes:
[0102] When the payment result indicating successful payment is received within the second polling number, step 802 is executed to stop polling and feedback the transaction processing result.
[0103] Optionally, within the second polling number (the high-frequency asynchronous polling number is less than the second polling number), if the posting result indicating successful posting is not received, the server can automatically send an posting result query request to the internal ledger system until the posting result indicating successful posting is received within the second polling number, thereby stopping polling, and based on the posting result indicating successful posting, promptly posting the transaction data associated with the resource transaction request in the internal ledger system, so that the settlement registration records in the customer account, financial institution account, and external settlement system remain consistent.
[0104] When it is determined that the posting fails according to the posting result obtained by polling within the second polling number, step 804 is executed to feedback an abnormal posting prompt until an posting result indicating successful posting is received for the abnormal posting prompt, and the transaction processing result is fed back.
[0105] Optionally, if the second polling times are exhausted and the server still has not polled the settlement result indicating successful posting, the server can determine that the posting has failed based on the posting results obtained by polling within the second polling times. In order to avoid a large number of inconsistencies in the transaction data in the accounts of all parties, the server can feedback an abnormal posting prompt to the terminal or server used by the staff of the financial institution to prompt manual intervention to assist in completing the posting. Based on this, the server can feedback the final feedback transaction processing result to the transaction object after receiving the manual feedback of the posting result indicating successful posting for the abnormal posting prompt.
[0106] Exemplarily, the step of the server feeding back an abnormal account entry prompt may be performed in real time after the abnormal account entry is determined, or may be performed uniformly at the end of the day.
[0107] In this embodiment, for the high-frequency asynchronous polling guarantee mechanism for obtaining the account posting results, manual intervention can be introduced after the second polling times are exhausted to provide a guarantee for abnormalities in the account posting stage, which is conducive to ensuring the consistency of transaction data in the accounts of all parties.
[0108] In a detailed embodiment, as shown in FIG9 , a flow chart of a complete transaction processing method is provided, which mainly includes the following steps:
[0109] Step 902, receiving a resource transaction request for a target resource;
[0110] Step 904, determining the transaction object, transaction type and target resource transaction amount associated with the resource transaction request;
[0111] Step 906, according to the transaction type and the target resource transaction volume, the resources held by the transaction object and the tradable volume of the target resource are settled to obtain an internal settlement result;
[0112] Step 908, sending an external settlement request to the external settlement system according to the internal settlement result;
[0113] If the external settlement system reports a settlement exception, step 910 is executed to asynchronously poll the external settlement system for the external settlement result of the external settlement request; when the external settlement result indicating successful settlement is received within the first polling number, step 912 is executed to stop polling; when the external settlement result indicating successful settlement is not received within the first polling number, step 914 is executed to report an external settlement exception prompt until an external settlement result indicating successful settlement is received in response to the external settlement exception prompt;
[0114] If the external settlement system does not report any settlement abnormality, execute step 916 to obtain an external settlement result indicating successful settlement;
[0115] When the settlement success indicates that the internal settlement result is passed, step 918 is executed to record the transaction data associated with the resource transaction request in the internal ledger system;
[0116] When the settlement success indication fails to pass the internal settlement result, step 920 is executed to perform a rollback operation according to the internal settlement result, and the transaction data associated with the resource transaction request after the rollback operation is completed is recorded in the internal ledger system;
[0117] If the posting fails, execute step 922 to asynchronously poll the internal ledger system for the posting result; when the posting result indicating successful posting is received within the second polling number, execute step 924 to stop polling and feedback the transaction processing result; when the posting failure is determined based on the posting result obtained by polling within the second polling number, execute step 926 to feedback an abnormal posting prompt, until the posting result indicating successful posting is received for the abnormal posting prompt, feedback the transaction processing result;
[0118] If the transfer is successful, execute step 928 and feedback the transaction processing result.
[0119] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0120] Based on the same inventive concept, the embodiment of the present application also provides a transaction processing device for implementing the transaction processing method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more transaction processing device embodiments provided below can refer to the limitations on the transaction processing method above, and will not be repeated here.
[0121] In an exemplary embodiment, Fig.10 As shown, a transaction processing device is provided, including: a transaction request receiving module 1002, an internal and external settlement processing module 1004, an external settlement processing module 1006 and an account result polling module 1008, wherein:
[0122] A transaction request receiving module, used for receiving a resource transaction request for a target resource;
[0123] The internal and external settlement processing module is used to perform internal settlement on the target resources according to the resource transaction request, obtain the internal settlement result, and send the external settlement request to the external settlement system according to the internal settlement result;
[0124] The external settlement processing module is used to asynchronously poll the external settlement system for the external settlement result of the external settlement request if the external settlement system reports a settlement exception, and to post the transaction data associated with the resource transaction request in the internal ledger system according to the external settlement result obtained by polling within the first polling number;
[0125] The posting result polling module is used to asynchronously poll the internal ledger system for the posting result if the posting fails, and to feedback the transaction processing result based on the posting result obtained within the second polling number.
[0126] The above-mentioned transaction processing device first receives a resource transaction request for the target resource, and performs internal settlement on the target resource according to the resource transaction request, obtains an internal settlement result, and then sends an external settlement request to the external settlement system according to the internal settlement result. If the external settlement system feedbacks a settlement abnormality, the external settlement result of the external settlement request can be asynchronously polled to the external settlement system. There is no need to wait for the external settlement system to recover and then manually trigger the external settlement system to feedback the result. Instead, the external settlement result can be asynchronously polled from the external settlement system by itself, and the external settlement result can be obtained and recorded in time, thereby quickly restoring the consistency of the transaction data of all parties. Furthermore, the transaction data associated with the resource transaction request can be recorded in the internal ledger system according to the external settlement result obtained by polling within the first polling number, that is, according to the polling result of the external settlement stage, the transaction data can be recorded, thereby ensuring the consistency of the transaction data of all parties. If the posting fails, there is no need to manually re-query the posting result. The posting result can be efficiently polled asynchronously to the internal ledger system, and the transaction processing result can be fed back promptly and accurately based on the posting result obtained by polling within the second polling number. That is, the transaction processing result is fed back based on the polling results of the external settlement stage and the posting stage, so that the transaction data in the transaction processing result is consistent among all parties. Based on this, the above transaction processing method can efficiently ensure the consistency of transaction data of all parties in resource transactions.
[0127] In one of the embodiments, the internal and external settlement processing module includes: an internal settlement unit, which is used to determine the transaction object, transaction type and target resource transaction volume associated with the resource transaction request; based on the target resource transaction volume and transaction type, the resource holding amount of the transaction object and the tradable amount of the target resource are updated to obtain the internal settlement result.
[0128] In one of the embodiments, the internal settlement unit is specifically used to: if the transaction type is the first transaction type, deduct the storage resources of the transaction object according to the target resource transaction volume, increase the target resources held by the transaction object, and reduce the tradable amount of the target resources to obtain an internal settlement result; if the transaction type is the second transaction type, reduce the target resources held by the transaction object according to the target resource transaction volume, and increase the tradable amount of the target resources to obtain an internal settlement result.
[0129] In one of the embodiments, the external settlement processing module includes: a first external settlement processing unit, which is used to stop polling when an external settlement result indicating a successful settlement is received within a first polling number, and to record the transaction data associated with the resource transaction request in an internal ledger system; a second external settlement processing unit, which is used to feedback an external settlement abnormality prompt when a settlement abnormality is determined based on the external settlement result obtained by polling within the first polling number, until an external settlement result indicating a successful settlement is received in response to the external settlement abnormality prompt, and the transaction data associated with the resource transaction request is recorded in the internal ledger system.
[0130] In one embodiment, successful settlement includes: passing the internal settlement result and failing the internal settlement result. The first external settlement processing unit and the second external settlement processing unit are specifically used to: when the successful settlement indicates that the internal settlement result is passed, the transaction data associated with the resource transaction request is recorded in the internal ledger system; when the successful settlement indicates that the internal settlement result is not passed, a rollback operation is performed according to the internal settlement result, and the transaction data associated with the resource transaction request after the rollback operation is completed is recorded in the internal ledger system.
[0131] In one of the embodiments, the first external settlement processing unit and the second external settlement processing unit are further specifically used to: when the settlement success indication is passed through the internal settlement result, determine the transaction type associated with the resource transaction request; when the transaction type is the first transaction type, post the transaction data associated with the resource transaction request in the internal ledger system; when the transaction type is the second transaction type, increase the storage resources of the transaction object associated with the resource transaction request according to the target transaction resource quantity associated with the resource transaction request, and update the transaction data associated with the resource transaction request. After the update is completed, post the transaction data associated with the resource transaction request in the internal ledger system.
[0132] In one of the embodiments, the account posting result polling module includes: a first transaction processing result feedback unit, which is used to stop polling and feedback the transaction processing result when an account posting result indicating successful account posting is received within a second polling number; a second transaction processing result feedback unit, which is used to feedback an account posting exception prompt when it is determined that the account posting has failed based on the account posting result obtained by polling within the second polling number, until an account posting result indicating successful account posting is received for the account posting exception prompt, and then feedback the transaction processing result.
[0133] Each module in the above transaction processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0134] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG11. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store transaction processing data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a transaction processing method is implemented.
[0135] Those skilled in the art will understand that the structure shown in FIG. 11 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0136] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0137] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0138] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0139] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0140] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0141] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A transaction processing method, characterized in that: The method comprises: receiving a resource transaction request for a target resource; Performing internal settlement on the target resource according to the resource transaction request, obtaining an internal settlement result, and sending an external settlement request to an external settlement system according to the internal settlement result; If the external settlement system reports a settlement exception, asynchronously poll the external settlement system for the external settlement result of the external settlement request, and based on the external settlement result obtained by polling within the first polling number, record the transaction data associated with the resource transaction request in the internal ledger system; If the posting fails, the internal ledger system is asynchronously polled for the posting result, and the transaction processing result is fed back based on the posting result obtained by polling within the second polling number.
2. The method according to claim 1, characterized in that The performing internal settlement on the target resource according to the resource transaction request to obtain an internal settlement result includes: Determine the transaction object, transaction type and target resource transaction amount associated with the resource transaction request; According to the target resource transaction volume and the transaction type, the resource holding amount of the transaction object and the tradable amount of the target resource are updated to obtain an internal settlement result.
3. The method according to claim 2, characterized in that The updating of the resource holding amount of the transaction object and the tradable amount of the target resource according to the target resource transaction amount and the transaction type to obtain the internal settlement result includes: If the transaction type is the first transaction type, the storage resources of the transaction object are deducted according to the transaction volume of the target resource, the target resources held by the transaction object are increased, and the tradable volume of the target resource is reduced to obtain an internal settlement result; If the transaction type is the second transaction type, the target resources held by the transaction object are reduced according to the transaction volume of the target resources, and the tradable volume of the target resources is increased to obtain an internal settlement result.
4. The method according to claim 1, characterized in that: The step of recording the transaction data associated with the resource transaction request in the internal ledger system according to the external settlement result obtained by polling within the first polling number includes: When an external settlement result indicating successful settlement is received within the first polling number, polling is stopped, and transaction data associated with the resource transaction request is recorded in the internal ledger system; When a settlement anomaly is determined based on the external settlement result obtained by polling within the first polling number, an external settlement anomaly prompt is fed back until an external settlement result indicating a successful settlement is received for the external settlement anomaly prompt, and the transaction data associated with the resource transaction request is recorded in the internal ledger system.
5. The method according to claim 4, characterized in that The successful settlement includes: passing the internal settlement result and failing the internal settlement result; The step of recording the transaction data associated with the resource transaction request in the internal ledger system includes: When the settlement success indication passes the internal settlement result, the transaction data associated with the resource transaction request is recorded in the internal ledger system; When the settlement success indication fails to pass the internal settlement result, a rollback operation is performed according to the internal settlement result, and the transaction data associated with the resource transaction request after the rollback operation is completed is recorded in the internal ledger system.
6. The method according to claim 5, characterized in that When the settlement success indication passes the internal settlement result, the transaction data associated with the resource transaction request is recorded in the internal ledger system, including: When the settlement success indication passes the internal settlement result, determining the transaction type associated with the resource transaction request; In the case where the transaction type is the first transaction type, recording the transaction data associated with the resource transaction request in the internal ledger system; In the case where the transaction type is the second transaction type, the storage resources of the transaction object associated with the resource transaction request are increased according to the target transaction resource quantity associated with the resource transaction request, and the transaction data associated with the resource transaction request is updated. After the update is completed, the transaction data associated with the resource transaction request is recorded in the internal ledger system.
7. The method according to claim 1, characterized in that The feedback of the transaction processing result based on the account entry result obtained by polling within the second polling number includes: When receiving an account entry result indicating successful account entry within the second polling number, stopping polling and feeding back a transaction processing result; When it is determined that the posting fails according to the posting result obtained by polling within the second polling number, a posting exception prompt is fed back until an posting result indicating successful posting is received for the posting exception prompt, and the transaction processing result is fed back.
8. A transaction processing device, characterized in that: The device comprises: A transaction request receiving module, used for receiving a resource transaction request for a target resource; An internal and external settlement processing module, used to perform internal settlement on the target resource according to the resource transaction request, obtain an internal settlement result, and send an external settlement request to an external settlement system according to the internal settlement result; An external settlement processing module is used to asynchronously poll the external settlement system for the external settlement result of the external settlement request if the external settlement system feedbacks a settlement exception, and based on the external settlement result obtained by polling within the first polling number, record the transaction data associated with the resource transaction request in the internal ledger system; The account posting result polling module is used to asynchronously poll the internal account system for the account posting result if the account posting fails, and to feedback the transaction processing result based on the account posting result obtained by polling within the second polling number.
9. The device according to claim 8, characterized in that The internal and external settlement processing module includes: The internal settlement unit is used to determine the transaction object, transaction type and target resource transaction volume associated with the resource transaction request; update the resource holding amount of the transaction object and the tradable amount of the target resource according to the target resource transaction volume and the transaction type, and obtain the internal settlement result.
10. The device according to claim 9, characterized in that The internal settlement unit is specifically used for: if the transaction type is the first transaction type, deducting the storage resources of the transaction object according to the transaction volume of the target resources, increasing the target resources held by the transaction object, and reducing the tradable amount of the target resources to obtain an internal settlement result; if the transaction type is the second transaction type, reducing the target resources held by the transaction object according to the transaction volume of the target resources, and increasing the tradable amount of the target resources to obtain an internal settlement result.
11. The device according to claim 8, characterized in that The external settlement processing module includes: A first external settlement processing unit, configured to stop polling and record the transaction data associated with the resource transaction request in the internal ledger system when receiving an external settlement result indicating successful settlement within the first polling number; The second external settlement processing unit is used to determine that a settlement anomaly is present based on the external settlement result obtained by polling within the first polling number, and to provide feedback on an external settlement anomaly prompt until an external settlement result indicating successful settlement is received for the external settlement anomaly prompt, and to record the transaction data associated with the resource transaction request in the internal ledger system.
12. The device according to claim 11, characterized in that The successful settlement includes: passing the internal settlement result and failing the internal settlement result; The first external settlement processing unit and the second external settlement processing unit are specifically used to: when the settlement success indication passes the internal settlement result, the transaction data associated with the resource transaction request is recorded in the internal ledger system; when the settlement success indication does not pass the internal settlement result, perform a rollback operation according to the internal settlement result, and after the rollback operation is completed, the transaction data associated with the resource transaction request is recorded in the internal ledger system.
13. The device according to claim 12, characterized in that The first external settlement processing unit and the second external settlement processing unit are also specifically used to: when the settlement success indication passes the internal settlement result, determine the transaction type associated with the resource transaction request; when the transaction type is the first transaction type, record the transaction data associated with the resource transaction request in the internal ledger system; when the transaction type is the second transaction type, increase the storage resources of the transaction object associated with the resource transaction request according to the target transaction resource amount associated with the resource transaction request, and update the transaction data associated with the resource transaction request. After the update is completed, record the transaction data associated with the resource transaction request in the internal ledger system.
14. The device according to claim 8, characterized in that The account result polling module includes: A first transaction processing result feedback unit is configured to stop polling and feedback the transaction processing result when receiving an account entry result indicating successful account entry within the second polling number; The second transaction processing result feedback unit is used to feedback an abnormal account posting prompt when it is determined that the account posting fails according to the account posting result obtained by polling within the second polling number, until an account posting result indicating successful account posting is received for the abnormal account posting prompt, and then feedback the transaction processing result.
15. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
