A method and server for processing account consistency
By building an account consumption system and an account service system, and using a unique flow number to obtain transaction status, the problem of complex and resource consumption of cross-system accounting consistency in the existing technology is solved, and simplified account consistency processing and resource conservation are achieved.
Patent Information
- Application Number
- CN202110688082.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-21
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2041-06-21
AI Technical Summary
When the prior art achieves consistency of cross-system accounting, three parties are required. The model is complex and there is a large amount of system resource consumption, especially in the polling process of continuously monitoring and comparing transaction status of each system.
By building an accounting consumption system and an accounting service system, the transaction status of transaction requests is obtained in the accounting service system using a unique flow number, so that the accounting consumption system can directly synchronize the transaction status, reducing the number of system participants and reducing the polling process.
The consistency of accounts is achieved, the system resource consumption is reduced, the model structure is simplified, the number of participants is reduced, and the additional resource consumption is avoided during the polling process.
Smart Images

Figure CN113297281B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of banking transaction technology, and in particular to an account consistency processing method and a server. Background Art
[0002] With the development of banking system business, cross-system business is becoming more and more common. In order to avoid financial risks in banks, it is particularly important to achieve consistency in cross-system accounts.
[0003] At present, the consistency of accounts between systems is usually achieved through the collaboration between the front-end system, the core service system and the third-party system. When achieving account consistency, the transaction status of the front-end system and the transaction status of the core service system are compared by monitoring the account transaction request information initiated by the customer. When the transaction status is found to be inconsistent, the front-end system is ordered to resend or correct until the account status of the two systems is the same. After that, the transaction status of the front-end system and the third-party system is synchronized.
[0004] However, the inventors found in the process of studying the above-mentioned current technology that the current technology has the following disadvantages: three parties are required to achieve the consistency of accounts, and the overall model is relatively complex. In addition, the polling process of constantly monitoring and comparing the consistency of the account status of each system consumes a lot of additional system resources. Summary of the invention
[0005] The embodiment of the present application provides an accounting consistency processing method and server to solve the problem that in the process of achieving accounting consistency, there are a large number of participants and continuous polling is required, resulting in excessive consumption of system resources.
[0006] In a first aspect, the present application provides a method for processing accounting consistency, comprising:
[0007] The account consumption system sends a first transaction request to the account service system to request the account service system to perform a transaction operation according to the first transaction request; the first transaction request includes: a first serial number for identifying the first transaction request; wherein the account service system is used to provide a transaction interface, and the account consumption system is a system that consumes the interface of the account service system;
[0008] The account consumption system receives the transaction status of the first transaction request from the account service system;
[0009] The account consumption system synchronizes the transaction status corresponding to the first transaction request locally based on the received transaction status.
[0010] Optionally, the first transaction request includes a positive transaction entry request, and the transaction status includes a transaction success or a transaction failure.
[0011] Optionally, the first transaction request includes a verification request, and the verification request is used to request the accounting service system to verify the transaction status of a second transaction request sent before the first transaction request, the second transaction request is a positive transaction entry request, and the first transaction request also includes a second serial number for identifying the second transaction request, and the transaction status includes: feedback on the transaction status of the second transaction request or no feedback on the transaction status of the second transaction request.
[0012] Optionally, the first transaction request is sent when the account consumption system does not receive any feedback from the account service system regarding the second transaction request.
[0013] Optionally, the transaction status is a transaction status in which no feedback is given to the second transaction request, and the method further includes:
[0014] The account consumption system sends the first transaction request to the account service system again.
[0015] Optionally, the transaction status is a transaction status of the second transaction request, and the transaction status of the second transaction request is failure, and the method further includes:
[0016] The account consumption system modifies the second serial number into a third serial number;
[0017] The account consumption system sends a second transaction request carrying the third serial number to the account service system.
[0018] Based on the above solution, the consistency of accounts is achieved by building an account consumption system and an account service system, which reduces the number of system participants. At the same time, the transaction status of the transaction request can be obtained in the account service system through the unique serial number used between the account consumption system and the account service system, so that the account consumption system can directly synchronize the transaction status, without polling to specifically monitor whether the transaction status of the two systems is consistent, and without polling to send requests to achieve the consistency of the transaction status of the two systems, which reduces the additional system resource consumption.
[0019] In a second aspect, the present application also provides a method for processing accounting consistency, including:
[0020] The account service system receives a first transaction request sent by the account consumption system, wherein the first transaction request is used to request the account service system to perform a transaction operation; the first transaction request includes a first serial number used to identify the first transaction request; wherein the account service system is used to provide a transaction interface, and the account consumption system is a system that consumes the interface of the account service system;
[0021] The account service system sends a transaction status for the first transaction request to the account consumption system based on a result of the transaction operation, and the transaction status is used for local synchronization of the account consumption system.
[0022] Optionally, the first transaction request includes a positive transaction entry request, and the transaction status includes a transaction success or a transaction failure.
[0023] Optionally, the first transaction request includes a verification request, and the verification request is used to request the accounting service system to verify the transaction status of a second transaction request sent before the first transaction request, the second transaction request is a positive transaction entry request, and the first transaction request also includes a second serial number for identifying the second transaction request.
[0024] Optionally, the method further comprises:
[0025] The accounting service system queries the transaction status of the second transaction request in a local database; wherein the database stores the corresponding relationship between each serial number and the transaction status.
[0026] Optionally, the method further comprises:
[0027] When the account service system fails to find the transaction status of the second transaction request in the local database, the transaction status of the second transaction request is registered in the database as a failed state.
[0028] Optionally, the method further comprises:
[0029] When the transaction status registration of the second transaction request fails, the accounting service system queries the transaction status of the second transaction request again in the local database.
[0030] In a third aspect, the present application provides a server, including a module for implementing any one of the methods for processing accounting consistency in the first aspect. It should be understood that each module can implement corresponding functions by executing a computer program.
[0031] In a fourth aspect, the present application provides another server, comprising a module for implementing any one of the methods for processing account consistency in the second aspect. Similarly, each module can also implement corresponding functions by executing a computer program.
[0032] In a fifth aspect, the present application provides a chip system comprising at least one processor for supporting the implementation of the functions involved in the above-mentioned first aspect or second aspect and any possible implementation method of the first aspect or second aspect, for example, receiving or processing the data and / or information involved in the above-mentioned method.
[0033] In one possible design, the chip system also includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.
[0034] The chip system may be composed of the chip, or may include the chip and other discrete devices.
[0035] In a sixth aspect, the present application provides a computer-readable storage medium, comprising a computer program, which, when executed on a computer, enables the computer to implement the accounting consistency processing method of the first aspect and any possible implementation of the first aspect, or enables the computer to implement the accounting consistency processing method of the second aspect and any possible implementation of the second aspect.
[0036] In the seventh aspect, the present application provides a computer program product, comprising: a computer program (also referred to as code, or instruction), which, when executed, enables a computer to execute the accounting consistency processing method of the first aspect and any possible implementation of the first aspect, or enables a computer to execute the accounting consistency processing method of the second aspect and any possible implementation of the second aspect.
[0037] It should be understood that the second to seventh aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 This is a flow chart of an accounting consistency processing method provided by an embodiment of the present application;
[0039] Figure 2 It is a schematic diagram of the interaction between the account consumption system and the account service system in the scenario of a successful transaction provided by an embodiment of the present application;
[0040] Figure 3 It is a schematic diagram of the interaction between the account consumption system and the account service system in the scenario of transaction failure provided by the embodiment of the present application;
[0041] Figure 4 It is a schematic diagram of the interaction between the account consumption system and the account service system in the scenario of normal verification return provided by the embodiment of the present application;
[0042] Figure 5 It is a schematic diagram of the interaction between the account consumption system and the account service system in the scenario where the verification is not returned provided by the embodiment of the present application;
[0043] Figure 6 This is a flow chart of another method for processing accounting consistency provided by an embodiment of the present application;
[0044] Figure 7 It is a structural diagram of a server provided in an embodiment of the present application;
[0045] Figure 8 It is a structural diagram of another server provided in an embodiment of the present application;
[0046] Fig. 9 This is another schematic block diagram of the server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] The technical solution in this application will be described below in conjunction with the accompanying drawings.
[0048] To facilitate understanding, we first briefly explain an application scenario applicable to the accounting consistency processing method provided in this application.
[0049] At present, in cross-bank transactions, the front-end system, core service system and third-party system are usually used to realize account transactions. Among them, the front-end system is responsible for message conversion, the core service system is responsible for bank transactions and transaction processing, and the third-party system is responsible for recording transaction results.
[0050] For example, let's take user deposits as an example. When a user has a deposit demand, a deposit request will be initiated to the front-end system. After receiving the deposit request, the front-end system will convert the deposit request to achieve normal communication with the core service system, and send the converted deposit request to the core service system. After the core service system processes the deposit request, it will feedback the response to the front-end system to inform the front-end system of the transaction result. Then, the front-end system sends the transaction result to the third-party system, and the third-party system records the transaction result locally and feeds back the recorded result to the front-end system. The front-end system then notifies the user, thus completing the entire deposit process.
[0051] However, in the entire deposit transaction process mentioned above, due to the large number of required links, if a certain node has a problem, a large-scale unilateral account may occur, and the consistency of accounts between systems cannot be guaranteed. For example, after the front-end system sends the deposit request to the core service system, the core service system will record the transaction status as a successful transaction locally after the local transaction is successful. However, in the process of the core service system feeding back the response to the front-end system, if the feedback response fails and the front-end system does not receive the response fed back by the core service system. At this time, the front-end system may think that the deposit has failed and record the transaction status as a failed transaction locally. Furthermore, when the front-end system sends the result of the failed transaction to the third-party system, if the third-party system does not receive the transaction result sent by the front-end system, the transaction status will also be recorded as a failed transaction locally. Obviously, in the entire deposit process mentioned above, as long as there is a problem in any link, the accounts of the front-end system, the core service system and the third-party system will not be consistent.
[0052] In order to solve the above problems, the consistency of accounts across systems is achieved. At present, a monitoring module is set up in the front-end system, and the monitoring module is ordered to monitor the account transaction requests initiated by the customer. Once it is detected that the customer has initiated a deposit request, the transaction status of the front-end system and the transaction status of the core service system are obtained, and the transaction status of the two are compared to see if they are consistent. If the transaction status is found to be inconsistent, the front-end system will resend the request to the core service system at intervals until the monitoring module detects that the transaction status of the two is the same. Then, the transaction status of the front-end system and the third-party system is synchronized to achieve consistency in the transaction status of the three. Similarly, for the withdrawal scenario, it is only necessary to take the form of reversal to achieve consistency in the transaction status of the front-end system and the core service system. The rest of the process will not be repeated here.
[0053] However, the inventors of the present application discovered during the research process that the above technical means have the following problems: On the one hand, in the process of achieving account consistency, the front-end system, the core service system and the third-party system are all required to participate, and the number of system participants in achieving account consistency is relatively large. On the other hand, once a customer initiates an account transaction request, the monitoring module needs to compare whether the transaction status between the systems is consistent, that is, there is a process of constantly monitoring transaction requests and comparing the transaction status of each system. Moreover, in the process of achieving account consistency, each time the front-end system resends a request to the core service system, the monitoring module needs to compare the transaction status between the systems again. That is, there is a continuous polling process, and the system resource consumption is relatively large.
[0054] In order to solve the above problems, the present application provides an account consistency processing method, which only needs to construct two systems, an account consumption system and an account service system. The account service system provides an interface for providing transactions, and the account consumption system is a system that consumes the interface of the account service system. In the process of using the above two systems to achieve account consistency, it is only necessary for the account consumption system to send a transaction request to the account service system, and this transaction request carries a serial number that identifies the transaction request. After the account service system receives the transaction request, the transaction status of the transaction request can be obtained according to the serial number carried, and then the transaction status is fed back to the account consumption system, so that the account consumption system directly synchronizes the transaction status corresponding to the local transaction request according to the transaction status. As a result, there is no need to poll to specifically monitor whether the transaction status of the two systems is consistent, and there is no need to poll to send requests to achieve the consistency of the transaction status of the two systems, and the number of participants is reduced, reducing additional system resource consumption.
[0055] It should be noted that the embodiments of the present application are not limited to the scenarios indicated above, and all cross-system business scenarios are within the protection scope of this application.
[0056] Reference Figure 1 , shows an account consistency processing method of an embodiment of the present invention, which is applied to an account consumption system and specifically includes the following S101 to S103, which are described in detail below Figure 1 The various steps in .
[0057] In S101, the account consumption system sends a first transaction request to the account service system to request the account service system to perform a transaction operation according to the first transaction request. Correspondingly, the account service system receives the first transaction request from the account consumption system.
[0058] Among them, the account service system is used to provide a transaction interface, and the account consumption system is a system that consumes the interface of the account service system.
[0059] In the embodiment of the present application, the account service system is a system that provides an interface for transactions for the account consumption system, and can provide two types of transactions: positive transaction entry and verification. The account consumption system is a system that consumes the interface of the account service system, and the account consumption system can initiate a positive transaction entry request or a verification request through the interface provided by the account service system. Among them, the positive transaction entry request and the verification request are two possible examples of the first transaction request.
[0060] The account service system can learn the type of transaction that the user wants to implement through the account consumption system based on the transaction entry request, such as whether the user wants to make a deposit, withdraw money, transfer or other business. The account service system can also learn that the account consumption system wants to verify the transaction status of a previous transaction request based on the verification request.
[0061] In order to facilitate the consistency of accounts between the account consumption system and the account service system, a serial number can be used to identify the same transaction request. For example, the first transaction request mentioned above can be identified by the first serial number. The first serial number can be carried in the first transaction request. The account service system can record the transaction status of this transaction through the first serial number carried in the transaction entry request. The account service system can also query the transaction status of this transaction through the serial number carried in the verification request.
[0062] It can be understood that the request sent by the account consumption system is different, and the transaction operation requested to be executed by the account service system is also different.
[0063] Optionally, the first transaction request includes a positive transaction entry request, and the transaction status includes transaction success or transaction failure.
[0064] In the embodiment of the present application, when the first transaction request is a positive transaction entry request, the positive transaction entry request includes: a business type and a first serial number. The business type includes but is not limited to deposit, withdrawal, transfer and other business types. The first serial number is used to identify the positive transaction entry request.
[0065] Exemplarily, when a user has a deposit demand, the account consumption system will send a positive transaction entry request to the account service system. The positive transaction entry request includes: a deposit service and a serial number corresponding to the deposit service. The account service system can learn from the received positive transaction entry request that the user wants to conduct a deposit service, and then execute the deposit operation accordingly, and enter the following S102. It should be noted that the above is an exemplary description of the business scenario of deposits, and the business scenarios of other business types are similar. For the sake of brevity, they are not described in detail here.
[0066] In the embodiment of the present application, after the deposit operation is executed, the accounting service system will store the transaction status corresponding to the first serial number in the local database according to the first serial number, and the transaction status includes transaction success or transaction failure.
[0067] Optionally, the first transaction request includes a verification request, which is used to request the accounting service system to verify the transaction status of a second transaction request sent before the first transaction request, the second transaction request is a positive transaction entry request, and the first transaction request also includes a second serial number for identifying the second transaction request. The transaction status includes: feedback on the transaction status of the second transaction request or no feedback on the transaction status of the second transaction request.
[0068] Optionally, the first transaction request is sent when the account consumption system does not receive any feedback from the account service system regarding the second transaction request.
[0069] In an embodiment of the present application, when the first transaction request is a verification request, the first transaction request includes: a first serial number for identifying the first transaction request, and a second serial number for identifying the second transaction request. Among them, the second transaction request is a positive transaction entry request. That is, the first transaction request contains its own serial number for verification this time, and also contains the serial number of the positive transaction entry request to be verified. The transaction operation performed by the accounting service system is a verification operation. Among them, when the second transaction request sent by the accounting consumption system does not receive a response from the accounting service system, the first transaction request will be sent to the accounting service system again to request the accounting service system to verify the transaction status of the second transaction request. In addition, when the accounting consumption system does not receive feedback from the accounting service system for the second transaction request, it records the transaction status corresponding to the serial number of the second transaction request as an unknown state.
[0070] Exemplarily, when a user has a deposit demand, the account consumption system will send a second transaction request (i.e., a positive transaction entry request) to the account service system. The second transaction request includes: a deposit service and a serial number corresponding to the deposit service. The account service system learns from the received second transaction request that the user wants to conduct a deposit service and performs the corresponding deposit operation. Regardless of whether the transaction is successful or failed, if the account service system fails, or the account service system is affected by the communication signal when responding to the transaction result to the account consumption system, resulting in an interruption of the response, it is possible that the account consumption system does not receive feedback from the account service system for the second transaction request, thereby causing the user to be unable to know the transaction result, and the account consumption system is unable to record the transaction status, resulting in inconsistent accounts of the two systems. After the deposit operation is executed, the account service system stores the transaction status corresponding to the serial number of the second transaction request in the local database, such as storing it as a successful transaction or a failed transaction.
[0071] At this time, the account consumption system records the transaction status corresponding to the serial number of this deposit business as an unknown state, and sends the first transaction request (i.e., verification request) to the account service system again. Among them, the first transaction request includes: the serial number identifying this verification request, and the serial number corresponding to the previous deposit business. After receiving the first transaction request, the account service system can query the corresponding transaction status in the local database according to the serial number corresponding to the previous deposit business included in the first transaction request, and return the transaction status according to the queried transaction result, that is, enter the following S102. It should be noted that after the verification operation is executed, the account service system will also store the transaction status corresponding to the serial number of the first transaction request in the local database, such as storing it as a transaction status queried or a transaction status not queried.
[0072] In S102, the account consumption system receives the transaction status of the first transaction request from the account service system.
[0073] For example, after the first transaction request includes a positive transaction entry request and the account service system executes the positive transaction entry operation according to the first transaction request, the account consumption system will receive the transaction status returned from the account service system for the first transaction request.
[0074] For example, if the deposit fails when the account service system performs a deposit operation, the transaction status corresponding to the serial number of the deposit business will be stored in the local database as a transaction failure, and the result of the transaction failure will be returned to the account consumption system. If the deposit is successful when the account service system performs a deposit operation, the transaction status corresponding to the serial number of the deposit business will be stored in the local database as a transaction success, and the result of the transaction success will be returned to the account consumption system.
[0075] For another example, when the first transaction request includes a verification request and the account service system performs a verification operation according to the first transaction request, the account consumption system will receive a transaction status fed back from the account service system for the first transaction request. The transaction status includes: a transaction status fed back to the second transaction request or a transaction status not fed back to the second transaction request.
[0076] In the embodiment of the present application, when the account service system executes the verification request, if the transaction status corresponding to the second serial number of the second transaction request identified in the first transaction request is queried, the transaction status of the second transaction request is fed back to the account consumption system, and the process goes to S103. If the transaction status corresponding to the second serial number of the second transaction request identified in the first transaction request is not queried, the transaction status of the second transaction request is not fed back to the account consumption system.
[0077] For example, in the aforementioned deposit scenario, when the account consumption system sends a second transaction request to the account service system to request verification of the transaction status of the previous deposit business, if the account service system finds the transaction status corresponding to the serial number of the previous deposit business in the local database, such as transaction success or transaction failure, it will feedback the transaction status to the account consumption system, such as transaction success or transaction failure, so that the account consumption system receives the transaction status of the first transaction request from the account service system as transaction success or transaction failure, and enters S103. Correspondingly, if the account service system does not find the transaction status corresponding to the serial number of the previous deposit business in the local database, such as whether the transaction is successful or failed, it will not feedback the transaction status to the account service system.
[0078] In S103, the account consumption system synchronizes the transaction status corresponding to the first transaction request locally based on the received transaction status.
[0079] For example, after the first transaction request includes a positive transaction entry request and the account consumption system receives the transaction status of the first transaction request from the account service system, the transaction status corresponding to the first transaction request can be synchronized locally.
[0080] Exemplarily, if the transaction status received by the account consumption system is a successful transaction, the transaction status corresponding to the first serial number is also synchronously modified to a successful transaction locally. Figure 2 , which shows the interaction process between the account consumption system and the account service system in the scenario of successful transaction. If the transaction status received by the account consumption system is transaction failure, the transaction status corresponding to the first serial number is also synchronously modified to transaction failure locally. Figure 3 , which shows the interaction process between the account consumption system and the account service system in the scenario of transaction failure.
[0081] For another example, when the first transaction request includes a verification request, and the account consumption system receives the transaction status of the first transaction request from the account service system, such as transaction success or transaction failure, different execution operations can be performed according to different transaction statuses. Optionally, when the transaction status received by the account consumption system is the transaction status of the second transaction request, and the transaction status of the second transaction request is successful, the transaction status corresponding to the second transaction request is synchronized locally as transaction success.
[0082] For example, if the account service system finds in the local database that the transaction status corresponding to the serial number of the previous deposit business is a successful transaction, the successful transaction result will be fed back to the account consumption system, and the account consumption system will also modify the transaction status corresponding to the serial number of the previous deposit business to a successful transaction locally.
[0083] When the transaction status received by the account consumption system is the transaction status of the feedback second transaction request, and the transaction status of the second transaction request is failure, the account consumption system displays a selection control, and the selection control is used for the user to select whether to continue to execute the transaction until success. Optionally, when the selection control of the account consumption system receives a selection operation of giving up continuing to execute the transaction, the account consumption system locally synchronizes the transaction status corresponding to the second transaction request as transaction failure.
[0084] When the selection control of the account consumption system receives the selection operation of continuing to execute the transaction, the account consumption system modifies the second serial number to the third serial number; the account consumption system sends a second transaction request carrying the third serial number to the account service system.
[0085] In the embodiment of the present application, when the account consumption system receives the transaction status of the second transaction request fed back by the account service system as transaction failure, a selection control is displayed on the display screen of the account consumption system, and the selection control includes two options, one option is to continue to execute the transaction, and the other option is to give up continuing to execute the transaction. If the user does not want to continue the operation of the transaction to be credited, the option "give up continuing to execute the transaction" is triggered, and if the user still wants to continue to make the operation of the transaction to be credited successful, the option "continue to execute the transaction" is triggered.
[0086] Exemplarily, if the accounting service system finds in the local database that the transaction status corresponding to the serial number of the previous deposit business is a failed transaction, the result of the failed transaction will be fed back to the accounting consumption system. At this time, a selection control will be displayed on the display screen of the accounting consumption system to remind the user whether the deposit business transaction needs to be successful. If the user does not want to continue the previous deposit business, the option "Abandon continuing the transaction" is triggered, and the accounting consumption system will locally modify the transaction status of the second transaction request to a failed transaction. If the user wants the previous deposit business to be executed successfully, the option "Continue to execute the transaction" is triggered, and the accounting consumption system will modify the second serial number of the previous second transaction request (positive transaction entry request) to a third serial number, and send the second transaction request carrying the third serial number to the accounting service system. That is, the accounting consumption system regenerates a positive transaction entry request, and sends the new positive transaction entry request to the accounting service system to request the accounting service system to perform a deposit operation according to the new positive transaction entry request. Reference Figure 4 , which shows the interaction process between the account consumption system and the account service system in the scenario where the verification is returned normally.
[0087] In the embodiment of the present application, when the transaction status is a case where the transaction status of the second transaction request is not fed back, that is, when the accounting service system does not query the transaction status of the second transaction request in the local database, the method further includes:
[0088] The account consumption system sends the first transaction request to the account service system again.
[0089] For example, if the account service system does not find the transaction status corresponding to the serial number of the previous deposit business in the local database, it will not feedback the transaction status to the account service system. At this time, the account consumption system will send a verification request to the account service system again because it has not received the transaction status feedback from the account service system, requesting the account service system to query the transaction status corresponding to the serial number of the previous deposit business again, until the account service system finds the transaction status corresponding to the serial number of the previous deposit business. Figure 5 , which shows the interaction process between the account consumption system and the account service system in the scenario where the verification does not return.
[0090] In the embodiment of the present application, the consistency of accounts is achieved by constructing an account consumption system and an account service system, thereby reducing the number of system participants. At the same time, the transaction status of the transaction request can be obtained in the account service system through the unique serial number used between the account consumption system and the account service system, so that the account consumption system can directly synchronize the transaction status, without the need to poll to specifically monitor whether the transaction status of the two systems is consistent, and without the need to poll to send requests to achieve the consistency of the transaction status of the two systems, thereby reducing the consumption of additional system resources.
[0091] Reference Figure 6 , shows another method for processing account consistency according to an embodiment of the present invention, which is applied to an account service system and specifically includes S201 and S202. Figure 6 The various steps in .
[0092] In S201, the account service system receives a first transaction request sent by the account consumption system, where the first transaction request is used to request the account service system to perform a transaction operation.
[0093] The first transaction request includes a first serial number for identifying the first transaction request. The account service system is used to provide an interface for transactions, and the account consumption system is a system that consumes the interface of the account service system.
[0094] In the embodiment of the present application, when the account consumption system sends the first transaction request to the account service system through the interface, the account consumption system correspondingly receives the first transaction request sent by the account consumption system through the interface.
[0095] It can be understood that the transaction operations performed by the accounting service system are different depending on the first transaction request received by the accounting service system.
[0096] Optionally, the first transaction request includes a positive transaction entry request, and the transaction status includes transaction success or transaction failure.
[0097] In the embodiment of the present application, when the first transaction request includes a positive transaction entry request, the accounting service system performs the positive transaction entry operation locally, records the transaction result of the positive transaction entry operation in the local database, and enters S202.
[0098] For example, when a user has a deposit demand, the account service system will receive a positive transaction entry request sent by the account consumption system. The positive transaction entry request includes: a deposit service and a serial number corresponding to the deposit service. The account service system can execute the deposit service locally, and after the deposit service is completed, it will also store the corresponding transaction status in the local database according to the serial number corresponding to the deposit service, such as transaction success or transaction failure.
[0099] It should be noted that, when the first transaction request includes a positive transaction entry request, the specific implementation process may refer to the description in the aforementioned S101, and will not be described in detail here.
[0100] Optionally, the first transaction request includes a verification request, which is used to request the accounting service system to verify the transaction status of a second transaction request sent before the first transaction request, the second transaction request is a positive transaction entry request, and the first transaction request also includes a second serial number for identifying the second transaction request.
[0101] Optionally, the accounting service system queries the transaction status of the second transaction request in a local database, wherein the database stores the corresponding relationship between each serial number and the transaction status.
[0102] In the embodiment of the present application, when the second transaction request is a positive transaction entry request, and the account service system does not return the transaction status of the positive transaction entry to the account consumption system after executing the positive transaction entry operation, the account consumption system will send the first transaction request again to request verification of the transaction status of the previous positive transaction entry. After receiving the first transaction request, the account service system will perform the verification operation in the local database, and also record the transaction result of the verification operation in the local database, and enter S202. It should be noted that when the first transaction request includes a verification request, the specific implementation process can refer to the description in the aforementioned S101, and no detailed description is given here.
[0103] In the embodiment of the present application, in order to ensure the uniqueness of the account transaction status, a local database is set up in the account service system, and the corresponding relationship between each serial number and the transaction status is stored in the database. Among them, the transaction status includes: transaction success or transaction failure. The account service system can find the corresponding transaction status in the local database according to the serial number in the first transaction request sent by the account consumption system.
[0104] It can be understood that when the first transaction request includes a verification request, the verification process of the accounting service system can be implemented in the following ways:
[0105] Optionally, when the account service system finds the transaction status of the second transaction request in the local database, the account service system sends the found transaction status of the second transaction request to the account consumption system, and then enters the following S202.
[0106] In the embodiment of the present application, if the account service system finds that the transaction status of the second transaction request is a successful transaction in the local database, the transaction result of the successful transaction is fed back to the account consumption system. If the account service system finds that the transaction status of the second transaction request is a failed transaction in the local database, the transaction result of the failed transaction is fed back to the account consumption system.
[0107] Optionally, when the accounting service system fails to find the transaction status of the second transaction request in the local database, the transaction status of the second transaction request is registered in the database as a failed state.
[0108] In the embodiment of the present application, in order to ensure the uniqueness of the account transaction status, when the account service system fails to find the transaction status of the second transaction request in the local database, the transaction status of the second transaction request is still registered in the local database as a failed state. It can be understood that in the process of registering in the local database, the following situations exist:
[0109] Optionally, when the account service system successfully registers in the local database, it feeds back the result of the transaction failure to the account consumption system, and then enters S202.
[0110] Optionally, when the transaction status registration of the second transaction request fails, the accounting service system queries the transaction status of the second transaction request in the local database again.
[0111] In the embodiment of the present application, when the accounting service system registers the transaction status of the second transaction request in the local database as a failed status, if the local database returns a reminder of duplicate registration, it means that the transaction status of the second transaction request has been registered as a failed status before, and the accounting service system does not need to register again, and queries the transaction status of the second transaction request in the local database again until the transaction status of the second transaction request is found, and then enters S202. If the registration fails due to a system failure, at this time, the accounting service system cannot know whether the registration is successful. In order to avoid duplicate registration, the accounting service system still queries the transaction status of the second transaction request in the local database again until the transaction status of the second transaction request is found, and then enters S202.
[0112] In S202, the account service system sends a transaction status for the first transaction request to the account consumption system based on the result of the transaction operation, and the transaction status is used for local synchronization of the account consumption system.
[0113] For example, when the first transaction request includes a request for a positive transaction entry, after the account service system executes the positive transaction entry operation, the account service system will send the transaction status for the first transaction request to the account consumption system based on the result of the positive transaction entry operation, so that the account consumption system performs corresponding operations according to the received transaction status.
[0114] Exemplarily, when the account service system executes a deposit business, if the deposit result is a successful transaction, the status of the positive transaction entry request is sent to the account consumption system as a successful transaction, so that the account consumption system also synchronizes the transaction status of the positive transaction entry request locally as a successful transaction. Correspondingly, if the deposit result is a failed transaction, the status of the positive transaction entry request is sent to the account consumption system as a failed transaction, so that the account consumption system also synchronizes the transaction status of the positive transaction entry request locally as a failed transaction.
[0115] For another example, when the first transaction request includes a verification request, after executing the verification operation, the account service system will feedback the transaction status of the second transaction request that the first transaction request wants to verify to the account consumption system based on the result of the verification operation. When the feedback transaction status is a successful transaction, the account consumption system locally synchronizes the transaction status of the second transaction request to a successful transaction. When the feedback transaction status is a failed transaction, the account consumption system displays a selection control for the user to select, and the account consumption system performs corresponding operations according to the user's selection. Among them, the selection control is used for the user to select whether to continue to execute the transaction until it succeeds. When the user chooses to continue to execute the transaction until it succeeds, the account consumption system generates a new positive transaction entry request and resends it to the account consumption system. When the user chooses to give up continuing to execute the transaction, the account consumption system locally synchronizes the transaction status of the second transaction request to a failed transaction. It should be noted that S202 can be understood by reference to S102~S103 in the aforementioned method, and no detailed description is given here.
[0116] In the embodiment of the present application, the consistency of accounts is achieved by constructing an account consumption system and an account service system, thereby reducing the number of system participants. At the same time, the transaction status of the transaction request can be obtained in the account service system through the unique serial number used between the account consumption system and the account service system, so that the account consumption system can directly synchronize the transaction status, without the need to poll to specifically monitor whether the transaction status of the two systems is consistent, and without the need to poll to send requests to achieve the consistency of the transaction status of the two systems, thereby reducing the consumption of additional system resources.
[0117] Reference Figure 7 , showing a schematic diagram of the structure of a server according to an embodiment of the present invention. Applied to an account consumption system, such as Figure 7 As shown, the server 300 may include: a sending module 310 , a receiving module 320 and a processing module 330 .
[0118] The sending module 310 is used to send a first transaction request to the account service system to request the account service system to perform a transaction operation according to the first transaction request. The first transaction request includes: a first serial number for identifying the first transaction request. The account service system is used to provide an interface for transactions, and the account consumption system is a system that consumes the interface of the account service system.
[0119] The receiving module 320 is used to receive the transaction status of the first transaction request from the accounting service system.
[0120] The processing module 330 is used to synchronize the transaction status corresponding to the first transaction request locally based on the received transaction status.
[0121] Optionally, the first transaction request includes a positive transaction entry request, and the transaction status includes transaction success or transaction failure.
[0122] Optionally, the first transaction request includes a verification request, which is used to request the accounting service system to verify the transaction status of a second transaction request sent before the first transaction request, the second transaction request is a positive transaction entry request, and the first transaction request also includes a second serial number for identifying the second transaction request. The transaction status includes: feedback on the transaction status of the second transaction request or no feedback on the transaction status of the second transaction request.
[0123] Optionally, the first transaction request is sent when the account consumption system does not receive any feedback from the account service system regarding the second transaction request.
[0124] Optionally, the transaction status is a transaction status in which no second transaction request is fed back, and the sending module 310 is further configured to send the first transaction request to the accounting service system again.
[0125] Optionally, the transaction status is the transaction status of the second transaction request, and the transaction status of the second transaction request is failure, and the processing module 330 is further used to modify the second serial number to a third serial number. The sending module 310 is further used to send the second transaction request carrying the third serial number to the accounting service system.
[0126] In the embodiment of the present application, the consistency of accounts is achieved by constructing an account consumption system and an account service system, thereby reducing the number of system participants. At the same time, the transaction status of the transaction request can be obtained in the account service system through the unique serial number used between the account consumption system and the account service system, so that the account consumption system can directly synchronize the transaction status, without the need to poll to specifically monitor whether the transaction status of the two systems is consistent, and without the need to poll to send requests to achieve the consistency of the transaction status of the two systems, thereby reducing the consumption of additional system resources.
[0127] Reference Figure 8, shows a schematic diagram of the structure of another server according to an embodiment of the present invention. Applied to an accounting service system, such as Figure 8 As shown, the server 400 may include: a receiving module 410 and a sending module 420 .
[0128] The receiving module 410 is used to receive a first transaction request sent by the account consumption system, and the first transaction request is used to request the account service system to perform a transaction operation. The first transaction request includes a first serial number for identifying the first transaction request. The account service system is used to provide an interface for transactions, and the account consumption system is a system that consumes the interface of the account service system.
[0129] The sending module 420 is used to send the transaction status for the first transaction request to the account consumption system based on the result of the transaction operation, and the transaction status is used for local synchronization of the account consumption system.
[0130] Optionally, the first transaction request includes a positive transaction entry request, and the transaction status includes transaction success or transaction failure.
[0131] Optionally, the first transaction request includes a verification request, which is used to request the accounting service system to verify the transaction status of a second transaction request sent before the first transaction request, the second transaction request is a positive transaction entry request, and the first transaction request also includes a second serial number for identifying the second transaction request.
[0132] Optionally, the server 400 further includes a query module, which is used to query the transaction status of the second transaction request in a local database, wherein the database stores the corresponding relationship between each serial number and the transaction status.
[0133] Optionally, the server 400 further includes a registration module, which is used to register the transaction status of the second transaction request in a failed state in the database when the transaction status of the second transaction request is not found in the local database.
[0134] Optionally, the receiving module 410 is further configured to query the transaction status of the second transaction request in the local database again when the transaction status registration of the second transaction request fails.
[0135] In the embodiment of the present application, the consistency of accounts is achieved by constructing an account consumption system and an account service system, thereby reducing the number of system participants. At the same time, the transaction status of the transaction request can be obtained in the account service system through the unique serial number used between the account consumption system and the account service system, so that the account consumption system can directly synchronize the transaction status, without the need to poll to specifically monitor whether the transaction status of the two systems is consistent, and without the need to poll to send requests to achieve the consistency of the transaction status of the two systems, thereby reducing the consumption of additional system resources.
[0136] Fig. 9 5 is another schematic block diagram of a server provided in an embodiment of the present application. The server 500 can be used to implement the functions of the account service system or the account consumption system in the above method. The server 500 can be a chip system. In the embodiment of the present application, the chip system can be composed of a chip, or can include a chip and other discrete devices.
[0137] like Fig. 9 As shown, the server 500 may include at least one processor 510, which is used to implement the functions of the account service system or the account consumption system in the method provided in the embodiment of the present application.
[0138] Exemplarily, when the server 500 is used to implement the function of the account consumption system in the method provided in the embodiment of the present application, the processor 510 can be used to send a first transaction request to the account service system to request the account service system to perform a transaction operation according to the first transaction request; receive a transaction status for the first transaction request from the account service system; based on the received transaction status, synchronize the transaction status corresponding to the first transaction request locally. The first transaction request includes: a first serial number for identifying the first transaction request; the account service system is used to provide an interface for the transaction, and the processor 510 is a system for the interface of the consumption account service system. Please refer to the detailed description in the method example for details, which will not be repeated here.
[0139] As another example, when the server 500 is used to implement the function of the account service system in the method provided in the embodiment of the present application, the processor 510 can be used to receive a first transaction request sent by the account consumption system, and the first transaction request is used to request the processor 510 to perform a transaction operation; based on the result of the transaction operation, the transaction status for the first transaction request is sent to the account consumption system, and the transaction status is used for local synchronization of the account consumption system. The first transaction request includes a first serial number for identifying the first transaction request; the processor 510 is used to provide an interface for the transaction, and the account consumption system is a system that consumes the interface of the processor 510. Please refer to the detailed description in the method example for details, which will not be repeated here.
[0140] The server 500 may also include at least one memory 520 for storing program instructions and / or data. The memory 520 is coupled to the processor 510. The coupling in the embodiment of the present application is an indirect coupling or communication connection between devices, units or modules, which may be electrical, mechanical or other forms, for information exchange between devices, units or modules. The processor 510 may operate in conjunction with the memory 520. The processor 510 may execute program instructions stored in the memory 520. At least one of the at least one memory may be included in the processor.
[0141] The server 500 may also include a communication interface 530 for communicating with other devices via a transmission medium, so that the device in the server 500 can communicate with other devices. Exemplarily, when the server 500 is used to implement the function of the account consumption system in the method provided in the embodiment of the present application, the other device may be an account service system; when the server 500 is used to implement the function of the account service system in the method provided in the embodiment of the present application, the other device may be an account consumption system; the communication interface 530 may be, for example, a transceiver, an interface, a bus, a circuit, or a device capable of implementing a transceiver function. The processor 510 may use the communication interface 530 to send and receive data and / or information, and to implement Figure 1 , Figure 6 The method executed by the account consumption system or the account service system in the corresponding embodiment.
[0142] The specific connection medium between the processor 510, the memory 520 and the communication interface 530 is not limited in the embodiment of the present application. Fig. 9 In the embodiment, the processor 510, the memory 520 and the communication interface 530 are connected via a bus 540. The bus 540 is Fig. 9 The connection between other components is only for illustration and is not intended to be limiting. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0143] The present application also provides a computer-readable storage medium, which includes a computer program. When the computer program is run on a computer, the computer executes the following Figure 1 In the embodiment shown, the accounting consistency processing method is used, or the computer is made to execute the following Figure 6 The accounting consistency processing method in the illustrated embodiment.
[0144] The present application also provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes Figure 1 In the embodiment shown, the accounting consistency processing method is used, or the computer is made to execute the following Figure 6 The accounting consistency processing method in the illustrated embodiment.
[0145] It should be understood that the processor in the embodiment of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application may be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0146] It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0147] The terms "unit", "module" and the like used in this specification may be used to represent a computer-related entity, hardware, firmware, a combination of hardware and software, software, or software in execution.
[0148] It will be appreciated by those skilled in the art that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or in combination with computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. In the several embodiments provided in this application, it should be understood that the disclosed devices, equipment and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the unit is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0149] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0150] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0151] In the above embodiments, the functions of each functional unit can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0152] If this function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0153] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for processing accounting consistency, characterized in that: include: The account consumption system sends a first transaction request to the account service system to request the account service system to perform a transaction operation according to the first transaction request; When the first transaction request is a verification request, the verification request includes: a first serial number for identifying the verification request and a second serial number for identifying a second transaction request, the second transaction request is a positive transaction entry request sent before the verification request, the verification request is used to request the account service system to verify the transaction status of the second transaction request, and the transaction status of the second transaction request includes a successful transaction or a failed transaction; wherein, after requesting the account service system to perform a transaction operation according to the first transaction request, it also includes: enabling the account service system to send the transaction status for the second transaction request to the account consumption system based on the result of the transaction operation, and based on the result of the transaction operation, storing the corresponding relationship between the transaction status of the verification request and the first serial number in a local database, and the local database is used to store the correspondence between the serial number and the transaction status of each verification request. The corresponding relationship between the serial number of each positive transaction entry request and the transaction status is stored, and the transaction status of the verification request includes: the transaction status of the second transaction request is queried or the transaction status of the second transaction request is not queried; wherein, when the account service system fails to query the transaction status of the second transaction request according to the verification request, the transaction status of the second transaction request is registered in the local database as a transaction failure status; if the registration in the local database is successful, the result of the transaction failure is fed back to the account consumption system; if the local database returns a reminder of repeated registration or registration failure, the account service system queries the transaction status of the second transaction request in the local database again until the transaction status of the second transaction request is queried; wherein, the account service system is used to provide an interface for transactions, and the account consumption system is a system that consumes the interface of the account service system; The account consumption system receives the transaction status of the second transaction request from the account service system; The account consumption system synchronizes the transaction status corresponding to the second transaction request locally based on the received transaction status; When the transaction status of the second transaction request received by the account consumption system is failed, the account consumption system modifies the second serial number to a third serial number; and the account consumption system sends the second transaction request carrying the third serial number to the account service system.
2. The method according to claim 1, characterized in that: The first transaction request is sent when the account consumption system does not receive any feedback from the account service system regarding the second transaction request.
3. The method according to claim 1 or 2, characterized in that: If the account consumption system does not receive the transaction status of the second transaction request from the account service system, the method further includes: The account consumption system sends the first transaction request to the account service system again.
4. A method for processing accounting consistency, characterized in that: include: The account service system receives a first transaction request sent by the account consumption system, wherein the first transaction request is used to request the account service system to perform a transaction operation; When the first transaction request is a verification request, the verification request includes a first serial number for identifying the verification request and a second serial number for identifying a second transaction request, the second transaction request is a positive transaction entry request sent before the verification request, the verification request is used to request the account service system to verify the transaction status of the second transaction request, and the transaction status of the second transaction request includes transaction success or transaction failure; wherein the account service system is used to provide a transaction interface, and the account consumption system is a system that consumes the interface of the account service system; Based on the result of the transaction operation, the account service system sends the transaction status of the second transaction request to the account consumption system, and based on the result of the transaction operation, stores the correspondence between the transaction status of the verification request and the first serial number in a local database; wherein the transaction status is used for local synchronization of the account consumption system, and the local database is used to store the correspondence between the serial number and the transaction status of each verification request, and to store the correspondence between the serial number and the transaction status of each positive transaction entry request, and the transaction status of the verification request includes: the transaction status of the second transaction request is queried or the transaction status of the second transaction request is not queried; wherein, when the account service system fails to query the transaction status of the second transaction request according to the verification request, the transaction status of the second transaction request is registered in the local database as a transaction failure status; if the registration in the local database is successful, the result of the transaction failure is fed back to the account consumption system; if the local database returns a reminder of duplicate registration or registration failure, the account service system queries the transaction status of the second transaction request in the local database again until the transaction status of the second transaction request is queried; Among them, when the transaction status of the second transaction request sent by the account service system to the account consumption system is failed, the account service system will receive a second transaction request carrying a third serial number sent by the account consumption system, and the third serial number is obtained by modifying the second serial number by the account consumption system.
5. The method according to claim 4, characterized in that The method further comprises: The accounting service system queries the local database for a transaction status of the second transaction request.
6. An accounting consistency processing device, characterized in that: include: A sending module, configured to send a first transaction request to the accounting service system to request the accounting service system to perform a transaction operation according to the first transaction request; When the first transaction request is a verification request, the verification request includes: a first serial number for identifying the verification request and a second serial number for identifying a second transaction request, the second transaction request is a positive transaction entry request sent before the verification request, the verification request is used to request the account service system to verify the transaction status of the second transaction request, and the transaction status of the second transaction request includes a successful transaction or a failed transaction; wherein, after requesting the account service system to perform a transaction operation according to the first transaction request, it also includes: enabling the account service system to send the transaction status for the second transaction request to the device based on the result of the transaction operation, and based on the result of the transaction operation, storing the corresponding relationship between the transaction status of the verification request and the first serial number in a local database, and the local database is used to store the serial number and transaction status of each verification request , and the corresponding relationship between the serial number of each positive transaction entry request and the transaction status is stored, the transaction status of the verification request includes: the transaction status of the second transaction request is queried or the transaction status of the second transaction request is not queried; wherein, when the account service system fails to query the transaction status of the second transaction request according to the verification request, the transaction status of the second transaction request is registered in the local database as a transaction failure status; if the registration in the local database is successful, the result of the transaction failure is fed back to the device; if the local database returns a reminder of repeated registration or registration failure, the account service system queries the transaction status of the second transaction request in the local database again until the transaction status of the second transaction request is queried; wherein, the account service system is used to provide an interface for transactions, and the device is a system that consumes the interface of the account service system; A receiving module, configured to receive a transaction status of the second transaction request from the accounting service system; a processing module, configured to locally synchronize the transaction status corresponding to the second transaction request based on the received transaction status; Among them, when the transaction status of the second transaction request received by the receiving module is failed, the processing module is also used to modify the second serial number to a third serial number; the sending module is also used to send the second transaction request carrying the third serial number to the accounting service system.
7. An accounting consistency processing device, characterized in that: include: A receiving module, used to receive a first transaction request sent by the account consumption system, wherein the first transaction request is used to request the device to perform a transaction operation; When the first transaction request is a verification request, the verification request includes a first serial number for identifying the verification request and a second serial number for identifying a second transaction request, the second transaction request is a positive transaction entry request sent before the verification request, the verification request is used to request the device to verify the transaction status of the second transaction request, and the transaction status of the second transaction request includes transaction success or transaction failure; wherein the device is used to provide a transaction interface, and the account consumption system is a system that consumes the interface of the device; a sending module, configured to send the transaction status of the second transaction request to the account consumption system based on the result of the transaction operation, and store the correspondence between the transaction status of the verification request and the first serial number in a local database based on the result of the transaction operation; wherein the transaction status is used for local synchronization of the account consumption system, and the local database is used to store the correspondence between the serial number and the transaction status of each verification request, and to store the correspondence between the serial number and the transaction status of each positive transaction entry request, and the transaction status of the verification request includes: the transaction status of the second transaction request being queried or the transaction status of the second transaction request not being queried; Wherein, when the device fails to query the transaction status of the second transaction request according to the verification request, the transaction status of the second transaction request is registered in the local database as a transaction failure status; if the registration in the local database is successful, the result of the transaction failure is fed back to the account consumption system; if the local database returns a reminder of repeated registration or registration failure, the device queries the transaction status of the second transaction request in the local database again until the transaction status of the second transaction request is queried; Among them, when the transaction status of the second transaction request sent by the sending module to the account consumption system is failed, the receiving module is also used to receive a second transaction request carrying a third serial number sent from the account consumption system, and the third serial number is obtained by modifying the second serial number by the account consumption system.
8. A server, characterized in that: The method comprises modules for implementing the method as claimed in any one of claims 1 to 3.
9. A server, characterized in that: The method comprises modules for implementing the method according to claim 4 or 5.
10. A computer-readable storage medium, characterized in that: It includes a computer program, which, when running on a computer, enables the computer to execute the accounting consistency processing method described in any one of claims 1 to 3, or enables the computer to execute the accounting consistency processing method described in claim 4 or 5.
11. A computer program product, characterized in that It comprises a computer program, which, when executed, enables a computer to execute the accounting consistency processing method as claimed in any one of claims 1 to 3, or enables the computer to execute the accounting consistency processing method as claimed in claim 4 or 5.
Citation Information
Patent Citations
Method and system for monitoring data consistency between plurality of databases
CN101625686A
Distributed transaction processing method, distributed system and computer readable storage medium
CN109669809A
Data processing method and device, equipment and storage medium
CN111796946A