An account quota checking method and device, a checking system and a storage medium
By using multiple execution nodes in the verification system to process account limit verification in parallel, the problem of high server performance and low efficiency in the existing technology is solved, and efficient and reliable limit allocation flow data verification is achieved.
Patent Information
- Application Number
- CN202011498722.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-17
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2040-12-17
AI Technical Summary
The existing quota allocation flow verification method has high requirements on server performance, low verification efficiency, and is prone to memory overflow and downtime, affecting the verification process.
The execution nodes in the verification system are used to verify account limits. The basic verification data is obtained from the account database and sent to the associated execution node to determine the verification results. This avoids reading all data into the memory of a single server and uses multiple execution nodes for parallel processing.
It reduces the requirements for server performance, improves verification efficiency, avoids memory overflow and downtime, and ensures the integrity and consistency of quota allocation flow data.
Smart Images

Figure CN114648408B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of finance, in particular to an account quota checking method and device, a checking system and a storage medium. BACKGROUND
[0002] The existing reserve fund system is a distributed account system, and the quota is dispersed in various levels of accounts. Figure 1 As shown in the figure, in order to ensure the stable and efficient transaction, the quota received by the incoming sub-account through the incoming business needs to be collected into the IDC account, and then the quota is distributed from the IDC account to multiple outgoing sub-accounts, so that the outgoing sub-account can undertake the outgoing business, and this process is also called quota allocation.
[0003] In the above quota allocation process, since it is a cross-database operation, the quota may fail to be stored due to uncontrollable factors such as network, so in order to check the completeness of the quota allocation, the quota allocation needs to be checked to check whether the loan is balanced.
[0004] However, the inventors found that the existing quota allocation process checking method has a high requirement on the server performance for performing the checking task, and the checking efficiency is not high. SUMMARY
[0005] The embodiments of the present application provide an account quota checking method, device, checking system and storage medium to reduce the requirement of the checking task on the server performance and improve the checking efficiency.
[0006] The embodiments of the present application adopt the following technical solutions:
[0007] In a first aspect, the embodiments of the present application provide an account quota checking method, wherein the method is performed by an execution node in a checking system, and the method comprises:
[0008] Obtaining checking basis data of a first account from an account database of the first account, wherein the checking basis data of the first account refers to quota allocation process data used for checking the account quota;
[0009] Sending the checking basis data of the first account to a first associated execution node, and receiving a counterparty account checking result of the first account returned by the first associated execution node;
[0010] According to the counterparty account checking result of the first account, determining an account quota checking result of the first account.
[0011] Optionally, the step of obtaining the quota allocation process data used for checking the account quota from the account database of the first account as the checking basis data of the first account comprises:
[0012] Finding, from the account database of the first account, quota allocation flow data matching the batch identification to be checked as the checking basis data of the first account.
[0013] Optionally, the batch identification to be checked is determined according to the checking time of the first account; and the method further comprises:
[0014] After obtaining the account quota checking result of the first account, updating the checking time of the first account.
[0015] Optionally, the method further comprises:
[0016] determining whether the checking time of the first account meets the checking condition;
[0017] In the case where the checking condition is met, performing the step of obtaining, from the account database of the first account, quota allocation flow data for checking the account quota as the checking basis data of the first account.
[0018] Optionally, the method further comprises:
[0019] if the counterparty account checking result of the first account returned by the first associated execution node is failed, determining first difference flow data in the checking basis data of the first account according to the counterparty account checking result of the first account;
[0020] recording the first difference flow data into a checking compensation table of the first account, so that the account quota compensation can be performed according to the checking compensation table.
[0021] Optionally, the method further comprises:
[0022] determining the state of an account database of a second account corresponding to the first associated execution node;
[0023] if the state of the account database of the second account is an offline state, recording the checking basis data of the first account into a checking basis data cache table of the first account, so that the account quota checking of the first account can be performed according to the checking basis data cache table in the case where the account database of the second account is an online state.
[0024] Optionally, the first account is a centralized platform account or a special account, and the method further comprises, before sending the checking basis data of the first account to the first associated execution node:
[0025] determining a self-checking result of the centralized platform account or the special account according to the checking basis data of the centralized platform account or the special account;
[0026] If the self-checking result is passed, the account checking result of the centralized platform account or the special account is directly determined as passed;
[0027] If the self-checking result is failed, second difference serial data in the checking basis data indicated by the self-checking result is taken as data to be sent to the first correlation execution node, or the second difference serial data is recorded in a checking compensation table of the centralized platform account or the special account, so that account quota compensation can be performed according to the checking compensation table.
[0028] Optionally, the method further comprises:
[0029] The checking task of the account quota is received, so as to perform the step of obtaining the quota appropriation serial data for performing account quota checking as the checking basis data of the first account from the account database of the first account according to the checking task of the account quota.
[0030] In a second aspect, the embodiments of the present application further provide a checking method of account quota, wherein the method is performed by an execution node in a checking system, and the method comprises:
[0031] The checking basis data of a third account sent by a second correlation execution node is received, wherein the checking basis data of the third account is the quota appropriation serial data for performing account quota checking.
[0032] The checking basis data of the third account is checked according to the quota appropriation serial data stored in the account database of the first account, so as to obtain a counterparty account checking result of the third account.
[0033] The counterparty account checking result of the third account is returned to the second correlation execution node.
[0034] Optionally, the checking of the checking basis data of the third account according to the quota appropriation serial data stored in the account database of the first account, so as to obtain the counterparty account checking result of the third account comprises:
[0035] If the serial identification of each piece of quota appropriation serial data in the checking basis data of the third account can be found in the quota appropriation serial data of the first account, it is determined that the counterparty account checking result of the third account is passed, otherwise, it is determined that the counterparty account checking result of the third account is failed.
[0036] In a third aspect, the embodiments of the present application further provide a checking device of account quota, which is applied to an execution node in a checking system, and the device is used to implement any of the foregoing methods.
[0037] In a fourth aspect, the embodiments of the present application further provide a reconciliation system, comprising a plurality of account balance reconciliation apparatuses as described above.
[0038] In a fifth aspect, the embodiments of the present application further provide a computer readable storage medium storing one or more programs, which when executed by an execution node in a reconciliation system comprising a plurality of application programs, cause the execution node in the reconciliation system to perform any of the above-mentioned methods.
[0039] The above-mentioned at least one technical scheme adopted by the embodiments of the present application can achieve the following beneficial effects: the account balance reconciliation method of the embodiments of the present application can be executed by an execution node in a reconciliation system, and when performing account balance reconciliation, the account balance reconciliation method can first acquire, from an account database of a first account, balance allocation flow data used for performing account balance reconciliation as reconciliation base data of the first account; then send the reconciliation base data of the first account to a first associated execution node, receive a counterparty account reconciliation result of the first account returned by the first associated execution node; and finally determine an account balance reconciliation result of the first account according to the counterparty account reconciliation result of the first account. The embodiments of the present application perform account balance reconciliation according to the dimension of an account database, without reading all balance allocation flow data of all account databases into the memory of a single server for reconciliation, thereby avoiding memory overflow of the server and greatly improving the reconciliation efficiency of the balance allocation flow data. BRIEF DESCRIPTION OF DRAWINGS
[0040] The accompanying drawings, which are included to provide a further understanding of the present application and constitute a part of this application, illustrate embodiments of the present application and together with the description serve to explain the present application. In the drawings:
[0041] Figure 1 FIG. 1 is a schematic diagram of an account balance allocation process in the prior art;
[0042] Figure 2 FIG. 2 is a schematic diagram of the structure of a reserve fund system in the prior art;
[0043] Figure 3 FIG. 3 is a schematic diagram of an account balance reconciliation method of balance allocation flow data in the prior art;
[0044] Figure 4 FIG. 4 is a schematic diagram of an account balance reconciliation method in the embodiments of the present application;
[0045] Figure 5 FIG. 5 is a schematic diagram of the correspondence between a reconciliation system and an account database in the embodiments of the present application;
[0046] Figure 6A logic block diagram of an account quota reconciliation in an embodiment of the present application;
[0047] Figure 7 A flowchart of another account quota reconciliation method in an embodiment of the present application;
[0048] Figure 8 A flowchart of an account quota reconciliation when a first account assumes different roles in an embodiment of the present application;
[0049] Figure 9 A structural diagram of an account quota reconciliation device in an embodiment of the present application;
[0050] Figure 10 A structural diagram of another account quota reconciliation device in an embodiment of the present application;
[0051] Figure 11 A structural diagram of a reconciliation system in an embodiment of the present application. DETAILED DESCRIPTION
[0052] To make the objectives, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described below in conjunction with specific embodiments of the present application and corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0053] The technical solutions provided by the embodiments of the present application will be described in detail below with reference to the drawings.
[0054] The account quota reconciliation method of the present application is mainly implemented based on an existing reserve fund system. As shown in Figure 2 a hierarchical structure diagram of a reserve fund system is provided, which mainly includes a first-level account, a second-level account and a third-level account. The first-level account is a platform-level master account, mainly used to receive external incoming quota, and can allocate the external incoming quota to the second-level account; the second-level account is used to receive the quota allocated by the first-level account, and can allocate the received quota allocated by the first-level account to the third-level account; the third-level account is used to undertake transaction business facing users. The reserve fund system can also include a special account, which is used to collect part or all of the quota from the above-mentioned second-level account, and release the collected quota to the above-mentioned first-level account.
[0055] Generally, the first level account can also be referred to as a centralized platform account, and is hereinafter collectively referred to as a centralized platform account. The second level account can also be referred to as an IDC account (i.e., an Internet Data Center account), and is hereinafter collectively referred to as an IDC account. The IDC account can be subjected to horizontal quota allocation and vertical quota allocation, wherein the vertical quota allocation includes receiving the quota of the centralized platform account, allocating the quota to the pay-out sub-account, and receiving the quota of the pay-in sub-account. The horizontal quota allocation is the quota transfer between different IDC accounts, that is, the second level account can include multiple accounts, and the multiple second level accounts can transfer the quota to each other. The third level account can include the pay-out sub-account and the pay-in sub-account. The pay-out sub-account directly undertakes the pay-out business and can receive the quota allocated by the IDC account. The pay-in sub-account directly undertakes the pay-in business and can collect the quota to the IDC account.
[0056] In order to check the integrity of the quota transfer between different accounts, it is necessary to check the quota transfer. The prior art provides a checking method for the quota transfer log data, as shown in Figure 3 When checking the quota transfer log data, the prior checking method is directed to all databases that need to be checked for the quota transfer log data. The server performing the checking task collects the quota transfer log data of all databases and reads all the data into the memory for unified checking according to the received quota transfer log checking task. However, the following problems can exist in the prior method:
[0057] 1) Reading the quota transfer log data of all databases into the memory at the same time can easily trigger the memory overflow in the case of a large amount of data.
[0058] 2) The quota transfer log data of the entire reserve fund system is checked by only one checking task on one server. In the case of a large amount of data, the task time consumption is increased, and the server performing the task can be down in the abnormal condition, which can cause the checking of the quota transfer log data of the entire system to fail.
[0059] Therefore, the embodiments of the present application provide a checking method for the account quota, which is performed by an execution node in a checking system, as shown in Figure 4 The method includes the following steps S410 to S430:
[0060] Step S410: obtaining the checking basis data of the first account from the account database of the first account, wherein the checking basis data of the first account is the quota transfer log data used for checking the account quota.
[0061] As shown in Figure 5As shown, the reconciliation system of the embodiment of the present application can be a server cluster, which includes multiple execution nodes, each of which can be regarded as a reconciliation server, and each of which interfaces with an account database of an account. The reconciliation system of the embodiment of the present application can be a server cluster deployed separately for the reconciliation task of the account balance, and of course, the existing application server can also be used for implementation in consideration of cost. The reconciliation method of the account balance of the embodiment of the present application can be executed in parallel by multiple execution nodes in the reconciliation system to disperse the memory pressure faced by a server in the prior art when performing the reconciliation task. It should be noted that the account in the embodiment of the present application can be any account at any level in the reserve fund system, and each account corresponds to an account database for recording and storing the balance allocation flow data of the account. For ease of understanding, the account database corresponding to the incoming sub-account in the subsequent description can be collectively referred to as the incoming database, the account database corresponding to the outgoing sub-account can be collectively referred to as the outgoing database, and the account database corresponding to the IDC account can be collectively referred to as the IDC database.
[0062] When reconciling the account balance, the balance allocation flow data used for reconciling the account balance can be obtained from the account database of the first account as the basic data of the first account. In actual business scenarios, when the balance is allocated between different databases, a corresponding flow is generated. For example, when the balance of the incoming sub-account is successfully aggregated to the IDC account, the incoming database generates a flow of balance deduction, and the IDC database generates a flow of balance increase. When the balance of the IDC account is successfully allocated to the outgoing sub-account, the IDC database generates a flow of balance deduction, and the outgoing database generates a flow of balance increase. Therefore, the data specifically reconciled in the embodiment of the present application can be the balance allocation flow data in the account database.
[0063] In step S420, the reconciliation basic data of the first account is sent to the first associated execution node, and the counterparty reconciliation result of the first account returned by the first associated execution node is received.
[0064] Generally, a balance allocation flow data carries information such as target account ID, counterparty account ID, balance, balance allocation type (addition / subtraction), and allocation time. In the embodiment of the present application, the target account can be understood as the account currently to be reconciled, the counterparty account can be understood as the associated account having a balance allocation relationship with the target account, and the concepts of the two are relative, that is, any account in the reserve fund system can be a target account or a counterparty account of the target account. The balance is the size of the allocated balance, the balance allocation type is whether to increase the balance or subtract the balance, and the allocation time is the time when the balance is successfully transferred from the account.
[0065] Therefore, after obtaining the basic data of the first account, the embodiment of the present application can send the basic data of the first account to the execution node where the counterparty account ID is located, that is, the first associated execution node, according to the counterparty account ID carried in the basic data of the first account. The execution node where the counterparty account is located will verify it, and then receive the counterparty verification result of the first account returned by the first associated execution node, thereby avoiding the problem of memory overflow caused by reading all the quota allocation flow data into the memory of a server.
[0066] It should be noted that the "first associated execution node" mentioned above refers to the execution node where the counterparty account of the first account is located. The concept of "associated execution node" is also relative. For example, if there is a credit transfer relationship between the first account and the second account, for the first account, the execution node where the second account is located is the associated execution node of the first account, and for the second account, the execution node where the first account is located is the associated execution node of the second account.
[0067] Step S430: Determine the account balance verification result of the first account based on the counterparty account verification result of the first account.
[0068] In specific implementation, the counterparty account verification result of the first account returned by the first associated execution node can specifically be a pass or fail result, and then the account limit verification result of the first account can be determined to be a pass or fail result based on the counterparty account verification result of the first account.
[0069] For example, for a deposit sub-account and an IDC account, after the deposit sub-account transfers its balance to the IDC account, the deposit database will record a deduction of the balance. After the IDC account receives the balance from the deposit sub-account, it will add the balance to the IDC account, and the IDC database will record a balance increase. When verifying the balance transfer transaction data, if the IDC database contains data that corresponds to the balance transfer transaction data recorded in the deposit database, it indicates that the balance was successfully transferred from the deposit sub-account to the IDC account. Otherwise, it indicates that the balance was not successfully transferred to the IDC account, and subsequent measures must be taken to ensure the integrity and consistency of the balance transfer transaction data.
[0070] As described above, the existing reconciliation scheme is to read all the quota allocation flow data into the memory of a server for unified reconciliation, which may face the problem of server memory overflow, affecting the data reconciliation process, and may also cause server downtime, resulting in the failure of the reconciliation of all the quota allocation flow data, which needs to be reconciled again. According to the account database dimension, the account quota reconciliation of the embodiments of the present application does not need to read all the quota allocation flow data of the account database into the memory for reconciliation, avoiding server memory overflow, and the downtime of one execution node does not affect the reconciliation process of other execution nodes, thereby improving the reconciliation efficiency of the quota allocation flow data as a whole.
[0071] In an embodiment of the present application, the step of obtaining the quota allocation flow data for account quota reconciliation from the account database of the first account as the reconciliation basis data of the first account comprises: finding the quota allocation flow data matching the to-be-reconciled batch identifier from the account database of the first account as the reconciliation basis data of the first account.
[0072] In order to improve the reconciliation efficiency of the quota allocation flow data, the embodiments of the present application can reconcile the quota allocation flow data in each account database in multiple reconciliation batches. The length of the reconciliation batch can be flexibly set according to actual needs, for example, it can be set as every 5 minutes as a reconciliation batch. The current reconciled batch identifier is recorded in each account database, so when obtaining the quota allocation flow data for account quota reconciliation from the account database of the first account, the current to-be-reconciled batch identifier can be determined first, and then the quota allocation flow data matching the to-be-reconciled batch identifier is found from the account database of the first account as the data to be reconciled of the first account, i.e. the reconciliation basis data.
[0073] In an embodiment of the present application, the to-be-reconciled batch identifier is determined according to the reconciliation time of the first account; and the method further comprises: updating the reconciliation time of the first account after obtaining the account quota reconciliation result of the first account.
[0074] The reconciliation batch identifier of the embodiments of the present application can be generated according to the reconciliation time of the account. Since each flow data carries the allocation time, after completing the data reconciliation of each reconciliation batch, the reconciliation time of the first account can be updated according to the quota allocation flow data of the reconciled batch, as the basis for the next batch reconciliation. For example, assuming that the reconciliation time of the first account is 10:00 am, it means that the quota allocation flow data in the first account before 10:00 am has been reconciled, and this time the quota allocation flow data with the allocation time within 10:00-10:05 am can be reconciled, and so on.
[0075] In an embodiment of the present application, the method further comprises: determining whether the reconciliation time of the first account meets a reconciliation condition; and performing the step of obtaining, from the account database of the first account, the quota allocation flow data for account quota reconciliation as the reconciliation basis data of the first account if the reconciliation condition is met.
[0076] In an actual business scenario, when the account quota is allocated from the first account to the second account, the account database of the first account records a flow of quota deduction, and the corresponding actual time is t1. However, due to the time difference between the execution nodes, the corresponding actual time becomes t2 (t2>t1) when the account database of the second account records a flow of quota increase. Therefore, if the quota allocation flow data of the first account is to be reconciled at the t1 time node, the quota of the first account has not actually fallen into the second account due to the delay of the corresponding execution node of the second account, and the account database of the second account has not generated the corresponding flow record, which will result in that the quota allocation flow data of the first account cannot find matching data in the account database of the second account at the t1 time node, and further result in that the reconciliation cannot be performed. Therefore, in order to avoid the above situation, a buffer time, such as 5 minutes, can be appropriately reserved to ensure that the quota allocation flow data in a reconciliation batch can be reconciled.
[0077] In a specific implementation, if the time interval between the reconciliation time of the first account and the current actual time is greater than 5 minutes, the step of obtaining, from the account database of the first account, the quota allocation flow data for account quota reconciliation as the reconciliation basis data of the first account can be continuously performed; if the time interval is not greater than 5 minutes, the step is not performed, so as to avoid that individual quota allocation flow data cannot be reconciled.
[0078] In an embodiment of the present application, the method further comprises: if the counterparty account reconciliation result of the first account returned by the received first associated execution node is failed, determining first difference flow data in the reconciliation basis data of the first account according to the counterparty account reconciliation result of the first account; and recording the first difference flow data in a reconciliation compensation table of the first account, so that account quota compensation can be performed according to the reconciliation compensation table.
[0079] If the counterpart account check result of the first account returned by the second account corresponding first associated execution node is failed, it means that at least one flow data identifier of the quota allocation flow data in the first account is not found in the account database of the second account, that is, the second account has not successfully increased / decreased the quota carried in the quota allocation flow data, so at this time, the quota allocation flow data not found can be determined as the first difference flow data of the first account according to the counterpart account check result of the first account returned by the first associated execution node, and then the first difference flow data is recorded in the check compensation table of the first account, so that the account quota of the corresponding account can be compensated according to the check compensation table in the subsequent, to ensure the integrity and consistency of the quota allocation.
[0080] In an embodiment of the present application, the method further comprises: determining the state of the account database of the second account corresponding to the first associated execution node; if the state of the account database of the second account is offline, recording the check basis data of the first account in the check basis data cache table of the first account, so that the account quota check of the first account can be performed according to the check basis data cache table when the account database of the second account is online.
[0081] In actual business scenarios, due to account database failure and other reasons, the account database may need to be offline for maintenance from time to time. For the embodiment of the present application, only when the account database is online, the quota allocation flow data can be retrieved and checked, so before checking the check basis data of the first account, the state of the account database of the second account corresponding to the first associated execution node can be determined first. If the state of the account database of the second account is offline, it means that the account database cannot be accessed at this time, and thus the check basis data of the first account cannot be checked. Therefore, the check basis data of the first account can be recorded in the check basis data cache table of the first account, so that when the account database of the second account is restored for use, the check basis data of the first account can be checked according to the check basis data cache table. The advantage of recording the check basis data of the first account in the check basis data compensation table is that when the account database of the second account is restored for use later, the check basis data of the first account does not need to be read into the memory again, and the data in the check basis data compensation table can be directly called, which is more efficient.
[0082] The state of each account database can be monitored by a common server, so that each execution node can obtain the state of each account database from the common server at any time, without the need for mutual state notification between execution nodes, improving the processing efficiency of the entire check process.
[0083] Of course, if it is found that the state of the account database of the first account is offline before the reconciliation of the reconciliation base data of the first account is performed, at this time, the data in the account database of the first account cannot be obtained, and the account quota of the account database can not be reconciled first, and the reconciliation can be performed after the subsequent recovery.
[0084] It should be noted that the reconciliation compensation table and the reconciliation base data cache table mentioned in the above embodiments are set for each account. In actual implementation, the reconciliation compensation table and the reconciliation base data cache table can be set in a total table of an account to be uniformly managed, or the two tables can be set respectively. How to set is flexible and can be adjusted by a person skilled in the art according to actual needs, which is not limited here.
[0085] In an embodiment of the present application, the first account is a centralized platform account or a special account, and the method further comprises the following steps before the reconciliation base data of the first account is sent to the first associated execution node: determining a self-reconciliation result of the centralized platform account or the special account according to the reconciliation base data of the centralized platform account or the special account; if the self-reconciliation result is passed, directly determining that the account reconciliation result of the centralized platform account or the special account is passed; and if the self-reconciliation result is not passed, taking second difference serial data in the reconciliation base data indicated by the self-reconciliation result as data to be sent to the first associated execution node, or recording the second difference serial data in a reconciliation compensation table of the centralized platform account or the special account, so that account quota compensation can be performed according to the reconciliation compensation table.
[0086] For the deposit sub-account, the IDC account and the withdrawal sub-account, the quota allocation of these accounts is a cross-database operation, so if the account to be reconciled is any of the above types of accounts, the quota allocation serial data used for reconciliation can be directly sent to the execution node of the counterparty account according to the counterparty account ID carried in the quota allocation serial data used for reconciliation.
[0087] For the centralized platform account, the quota allocation of the centralized platform account not only involves cross-database operations, but also involves intra-database quota allocation. Specifically, as described above, the reserve fund system also includes a special account, and in actual business scenarios, the special account and the centralized platform account usually share a database, so the quota allocation between the special account and the centralized platform account is recorded in a database. Therefore, if the account to be reconciled is a centralized platform account or a special account, the quota allocation serial data recorded in the database can be divided into two categories according to the quota allocation identifier, and then intra-database reconciliation, i.e. self-reconciliation, is performed. If the self-reconciliation is passed, it is directly determined that the account reconciliation result of the centralized platform account or the special account is passed.
[0088] If the self-verification fails, there may be two situations: one possibility is that the second difference flow data is the quota allocation flow within the centralized platform account or the special account, and it is directly recorded in the verification and compensation table corresponding to the centralized platform account or the special account to perform account quota compensation; the other possibility is that the second difference flow data is the flow data that has a quota allocation relationship with other hierarchical account databases (such as secondary accounts, tertiary accounts, etc.), then the second difference flow data can be used as data to be sent to the first associated execution node, so that the first associated execution node can perform external verification on the second difference flow data.
[0089] In one embodiment of the present application, the method further includes: receiving an account limit verification task, and executing a step of obtaining limit allocation flow data for account limit verification from the account database of the first account as the verification basic data of the first account according to the account limit verification task.
[0090] The account limit verification method of the embodiment of the present application can be executed in response to the issuance of an account limit verification task. During specific implementation, the task server can issue an account limit verification task to the execution node where each account database is located according to a certain task issuance frequency, such as 5 minutes. Each execution node can execute the account limit verification in parallel based on the received account limit verification task. Compared with processing the limit verification tasks of all account databases by only one execution node, this avoids memory overflow of the execution node and also avoids the situation where the execution node crashes under abnormal circumstances, resulting in the failure of the limit verification of all account databases, thereby greatly improving the account limit verification efficiency.
[0091] like Figure 6 As shown, a logic block diagram for verifying an account limit is provided. First, the status of the account database of a first account is determined. If the account database of the first account is offline, the account limit in the database is not verified. If the account database of the first account is online, the limit transfer flow data used for verifying the account limit is obtained from the account database of the first account as the basic verification data for the first account.
[0092] If the first account is any one of the incoming sub-account, the IDC account or the outgoing sub-account, the account quota can be checked directly according to the account database of the second account corresponding to the first account. Here, the state of the account database of the second account can be judged first. If the state of the account database of the second account is offline state, the checking basis data of the first account cannot be checked at this time, and the checking basis data of the first account can be recorded in the checking basis data cache table of the first account, so as to be checked again after the account database of the second account is recovered. If the state of the account database of the second account is online state, the checking basis data of the first account is sent to the first associated execution node corresponding to the second account, and then the counterparty account checking result of the first account returned by the first associated execution node corresponding to the second account is received. If the counterparty account checking result of the first account is passed, the checking time of the account database of the first account is updated. If it is not passed, the first difference flow data is determined according to the counterparty account checking result and recorded in the compensation checking table of the first account.
[0093] If the first account is a centralized platform account or a special account, the quota appropriation flow data recorded in the account database of the centralized platform account or the special account can be divided into two categories according to the quota appropriation identifier, and then internal checking (self-checking) is performed. If the self-checking is passed, the account checking result of the centralized platform account or the special account is directly determined to be passed. If the self-checking is not passed, it can be further determined whether the second difference flow data is the quota appropriation flow within the centralized platform account or the special account, or the flow data having the quota appropriation relationship with other hierarchical account databases. If it is the quota appropriation flow within the centralized platform account or the special account, it is directly recorded in the checking compensation table corresponding to the centralized platform account or the special account for account quota compensation. If it is the flow data having the quota appropriation relationship with other hierarchical account databases, it can be sent to the first associated execution node as data to be sent to the first associated execution node, so that the first associated execution node performs external checking on the second difference flow data.
[0094] After updating the checking time of the account database once, the checking time of the account database can be compared with the current actual time to determine whether the checking time of the account database still satisfies the checking condition. If it does not satisfy, the checking of the account quota of the account database is ended. If it satisfies, the above checking process is continued to be executed.
[0095] The embodiment of the application further provides another account quota checking method, which is executed by an execution node in a checking system, as shown in the following Figure 7 The method comprises the following steps S710 to S730:
[0096] Step S710, receiving the third account's collation basis data sent by the second associated execution node, wherein the third account's collation basis data refers to the quota allocation flow data used for account quota collation.
[0097] Step S720, collating the third account's collation basis data according to the quota allocation flow data stored in the first account's account database, to obtain the third account's counterparty account collation result.
[0098] Step S730, returning the third account's counterparty account collation result to the second associated execution node.
[0099] As mentioned above, since the concepts of target account and counterparty account are relative, the first account's account database in the first execution node can not only send the first account's collation basis data to the first associated execution node where the second account is located, but also receive the third account's collation basis data sent by the second associated execution node where the third account is located. Then, the third account's collation basis data received is searched and matched in the first account's account database in the execution node, to obtain the third account's counterparty account collation result. Finally, the third account's counterparty account collation result is returned to the second associated execution node.
[0100] In an embodiment of the present application, the collating the third account's collation basis data according to the quota allocation flow data stored in the first account's account database, to obtain the third account's counterparty account collation result comprises: if the flow serial number of each piece of quota allocation flow data in the third account's collation basis data can be found in the quota allocation flow data of the first account, it is determined that the third account's counterparty account collation result is passed, otherwise, it is determined that the third account's counterparty account collation result is failed.
[0101] Typically, the credit transfer transaction data also carries a transaction ID (UUID), which can be considered a unique identifier generated for a credit transfer record. For example, if deposit sub-account A transfers a credit of 100,000 to IDC account B, a transaction ID such as 000000001 will be generated in the deposit database, and a credit deduction transaction will be generated based on this. This transaction ID will then be pushed to the IDC account. After the IDC account receives the credit of 100,000 and successfully adds it to the IDC account, it will use the transaction ID pushed by deposit sub-account A as its own transaction ID to generate a credit increase transaction. In this way, when subsequently verifying the credit transfer transaction data, it can be verified based on the transaction ID in the credit transfer transaction data. Similarly, the transfer time recorded in the credit transfer flow is also generated by deposit sub-account A and pushed to the IDC account. The IDC account directly uses the transfer time pushed by deposit sub-account A as the actual time of its own credit transfer, thereby ensuring that the transfer time recorded in the two flows is consistent, that is, they are both within the same verification batch.
[0102] In specific implementation, if the transaction ID of each credit limit transfer transaction data in the verification basic data of the third account can be found in the credit limit transfer transaction data of the first account, then it is determined that the credit limit transfer transaction data verification of the third account has passed; otherwise, it is determined that the credit limit transfer transaction data verification of the third account has failed. In other words, for a credit limit transfer, under the premise that the credit limit transfer is successful, the transaction IDs recorded in the account databases of both parties should be the same, so that when performing the verification, only the transaction IDs need to be verified to ensure verification efficiency. Other transaction information in the credit limit transfer transaction, such as the credit limit, credit limit adjustment ID, etc., can be omitted or can be selectively verified, because in actual business scenarios, these transaction information generally do not cause problems.
[0103] It should be noted that the “first account”, “second account” and “third account” mentioned in the above embodiments do not have fixed meanings, but are only set to distinguish different accounts when they assume different roles. Similarly, the “first associated execution node” and the “second associated execution node” are also set to distinguish accounts on different execution nodes when they assume different roles. For example, when the “first account” acts as the sender of the basic verification data, it can send the basic verification data of the first account to the first associated execution node where the “second account” is located for verification, and receive the verification results returned by the first associated execution node; when the “first account” acts as the receiver of the basic verification data, it can receive the basic verification data of the third account sent by the second associated execution node where the “third account” is located for verification, and return the verification results to the second associated execution node. For ease of understanding, such as Figure 8As shown, a first account account quota reconciliation process block diagram when assuming different roles is provided.
[0104] The embodiment of the present application further provides an account quota reconciliation device 900, which is applied to an execution node in a reconciliation system. Figure 9 As shown, the device 900 comprises a reconciliation basic data acquisition unit 910, a reconciliation basic data sending unit 920 and a first reconciliation result determination unit 930.
[0105] The reconciliation basic data acquisition unit 910 is configured to acquire, from an account database of a first account, reconciliation basic data of the first account, wherein the reconciliation basic data of the first account refers to quota allocation serial data used for account quota reconciliation.
[0106] The reconciliation basic data sending unit 920 is configured to send the reconciliation basic data of the first account to a first associated execution node and receive a counterparty account reconciliation result of the first account returned by the first associated execution node.
[0107] The first reconciliation result determination unit 930 is configured to determine an account quota reconciliation result of the first account according to the counterparty account reconciliation result of the first account.
[0108] In an embodiment of the present application, the reconciliation basic data acquisition unit 910 is specifically configured to find, from the account database of the first account, quota allocation serial data matching a to-be-reconciled batch identifier as the reconciliation basic data of the first account.
[0109] In an embodiment of the present application, the to-be-reconciled batch identifier is determined according to a reconciliation time of the first account; and the device further comprises an updating unit configured to update the reconciliation time of the first account after obtaining the account quota reconciliation result of the first account.
[0110] In an embodiment of the present application, the device further comprises a reconciliation condition determination unit configured to determine whether the reconciliation time of the first account satisfies a reconciliation condition; and an execution unit configured to execute the step of acquiring, from the account database of the first account, quota allocation serial data used for account quota reconciliation as the reconciliation basic data of the first account in the case that the reconciliation condition is satisfied.
[0111] In an embodiment of the present application, the device further comprises: a reconciliation basis data receiving unit configured to receive reconciliation basis data of a second account sent by the first associated execution node, the second account being a counterparty account that can be allocated credit with the first account; a second reconciliation result determining unit configured to determine a counterparty account reconciliation result of the second account according to the reconciliation basis data of the second account and credit allocation flow data stored in the account database of the first account; and a reconciliation result returning unit configured to return the counterparty account reconciliation result of the second account to the first associated execution node.
[0112] In an embodiment of the present application, the second reconciliation result determining unit is specifically configured to: if the flow data identifier of each piece of credit allocation flow data in the reconciliation basis data of the second account can be found in the credit allocation flow data of the first account, determine that the counterparty account reconciliation result of the second account is passed, otherwise, determine that the counterparty account reconciliation result of the second account is failed.
[0113] In an embodiment of the present application, the device further comprises: a first difference flow data determining unit configured to, if the counterparty account reconciliation result of the first account returned by the first associated execution node is failed, determine first difference flow data in the reconciliation basis data of the first account according to the counterparty account reconciliation result of the first account; and a difference flow data recording unit configured to record the first difference flow data into a reconciliation compensation table of the first account, so that account credit compensation can be performed according to the reconciliation compensation table.
[0114] In an embodiment of the present application, the device further comprises: an account database state determining unit configured to determine a state of an account database of a second account corresponding to the first associated execution node; and a reconciliation basis data recording unit configured to, if the state of the account database of the second account is an offline state, record the reconciliation basis data of the first account into a reconciliation basis data cache table of the first account, so that the account credit reconciliation of the first account can be performed according to the reconciliation basis data cache table when the account database of the second account is an online state.
[0115] In one embodiment of the present application, the first account is a centralized platform account or a dedicated account, and the device further includes: a self-verification result determination unit, which is used to determine the self-verification result of the centralized platform account or the dedicated account based on the verification basic data of the centralized platform account or the dedicated account; an account verification result determination unit of the centralized platform, which is used to directly determine that the account verification result of the centralized platform account or the dedicated account is passed if the self-verification result is passed; a second difference flow data determination unit, which is used to use the second difference flow data in the verification basic data indicated by the self-verification result as data to be sent to the first associated execution node if the self-verification result is failed, or to record the second difference flow data in the verification compensation table of the centralized platform account or the dedicated account, so that the account limit compensation can be performed according to the verification compensation table.
[0116] In one embodiment of the present application, the device also includes: a verification task receiving unit, used to receive an account limit verification task, so as to execute the step of obtaining the limit allocation flow data used for account limit verification from the account database of the first account as the verification basic data of the first account according to the account limit verification task.
[0117] The present application embodiment also provides another account balance verification device 1000, such as Figure 10 As shown, the apparatus 1000 is executed by an execution node in the verification system, and the apparatus 1000 includes: a verification basic data receiving unit 1010, a verification basic data verification unit 1020, and a verification result returning unit 1030, wherein:
[0118] The verification basic data receiving unit 1010 is configured to receive the verification basic data of the third account sent by the second associated execution node, wherein the verification basic data of the third account refers to the credit limit transfer flow data used for account credit verification;
[0119] A basic verification data verification unit 1020 is configured to verify the basic verification data of the third account based on the quota transfer transaction data stored in the account database of the first account, and obtain a counterparty account verification result of the third account;
[0120] The verification result returning unit 1030 is configured to return the counterparty account verification result of the third account to the second association execution node.
[0121] In an embodiment of the present application, the account balance reconciliation unit 1020 is specifically configured to: if each of the serial numbers of the credit appropriation serial data in the reconciliation basis data of the third account can be found in the credit appropriation serial data of the first account, determining that the counterparty account reconciliation result of the third account is passed, otherwise, determining that the counterparty account reconciliation result of the third account is failed.
[0122] It can be understood that the account balance reconciliation device described above can implement each step of the account balance reconciliation method provided in the foregoing embodiments and performed by the execution node in the reconciliation system, and the related explanations of the account balance reconciliation method are all applicable to the account balance reconciliation device, which will not be described here again.
[0123] Figure 11 is a structural schematic diagram of a reconciliation system according to an embodiment of the present application, the reconciliation system comprising a plurality of account balance reconciliation devices as described above, and the account balance reconciliation devices are specifically configured to perform:
[0124] obtaining the reconciliation basis data of the first account from the account database of the first account, wherein the reconciliation basis data of the first account refers to the credit appropriation serial data used for account balance reconciliation;
[0125] sending the reconciliation basis data of the first account to the first associated execution node, and receiving the counterparty account reconciliation result of the first account returned by the first associated execution node;
[0126] determining the account balance reconciliation result of the first account according to the counterparty account reconciliation result of the first account. Alternatively, configured to perform:
[0127] receiving the reconciliation basis data of a third account sent by a second associated execution node, wherein the reconciliation basis data of the third account refers to the credit appropriation serial data used for account balance reconciliation;
[0128] performing reconciliation on the reconciliation basis data of the third account according to the credit appropriation serial data stored in the account database of the first account, to obtain the counterparty account reconciliation result of the third account;
[0129] returning the counterparty account reconciliation result of the third account to the second associated execution node.
[0130] The present application also provides a computer readable storage medium storing one or more programs, the one or more programs comprising instructions which, when executed by an execution node in a reconciliation system comprising a plurality of application programs, can cause the execution node in the reconciliation system to perform Figure 9 or Figure 10The method executed by the account quota checking device in the illustrated embodiment, and specifically for executing:
[0131] From the account database of the first account, obtain the checking basis data of the first account, wherein the checking basis data of the first account refers to the quota allocation flow data used for account quota checking;
[0132] Send the checking basis data of the first account to the first associated execution node, and receive the counterparty account checking result of the first account returned by the first associated execution node;
[0133] According to the counterparty account checking result of the first account, determine the account quota checking result of the first account. Or, for executing:
[0134] Receive the checking basis data of the third account sent by the second associated execution node, wherein the checking basis data of the third account refers to the quota allocation flow data used for account quota checking;
[0135] According to the quota allocation flow data stored in the account database of the first account, check the checking basis data of the third account, and obtain the counterparty account checking result of the third account;
[0136] Return the counterparty account checking result of the third account to the second associated execution node.
[0137] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0138] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system), and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the computer or other programmable data processing apparatus produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The device that implements the functions specified in one flow or multiple flows and / or blocks. Figure 1 The device that implements the functions specified in one block or multiple blocks.
[0139] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the Figure 1 function specified in the flow or flows and / or blocks Figure 1 of the block or blocks.
[0140] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the Figure 1 function specified in the flow or flows and / or blocks Figure 1 of the block or blocks.
[0141] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0142] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, non-volatile memory, such as read-only memory (ROM), EPROM, and / or flash memory, etc. The memory is an example of computer readable media.
[0143] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to computing devices. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.
[0144] It is also to be noted that the terms "comprising", "including", and any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises a... " does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the recited element.
[0145] Those skilled in the art will appreciate that embodiments of the present application can be devised for a method, a system, or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer readable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable program code thereon.
[0146] The embodiments of the present application described above are only used to explain the technical solutions of the present application and not to limit the present application. Although the present application has been described in detail, those skilled in the art will understand that the present application can make various modifications and changes without departing from the spirit and scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.
Claims
1. A method for checking an account balance, wherein: The method is executed by an execution node in the verification system, and the method includes: Obtaining verification basic data of the first account from the account database of the first account, wherein the verification basic data of the first account refers to credit limit transfer flow data used for account credit verification; Sending the verification basic data of the first account to the first association execution node, and receiving the counterparty account verification result of the first account returned by the first association execution node; Determining an account limit verification result of the first account based on a counterparty account verification result of the first account; The first account and its counterparty account are both accounts at any level in the reserve fund system, and the counterparty account of the first account is an associated account with which the first account has a credit line transfer relationship; The verification system includes a plurality of execution nodes, each of which is a verification server. Each of the execution nodes is connected to the account database of an account, and the first associated execution node is the execution node where the counterparty account of the first account is located. The method further comprises: If the counterparty account verification result of the first account returned by the first association execution node is failed, determining first difference transaction data in the verification basic data of the first account according to the counterparty account verification result of the first account; The first difference transaction data is recorded in the verification and compensation table of the first account, so that the account limit compensation can be performed according to the verification and compensation table.
2. The method according to claim 1, wherein: The step of obtaining the credit transfer flow data for verifying the account credit as basic verification data for the first account from the account database of the first account includes: The quota allocation flow data matching the batch identifier to be verified is searched from the account database of the first account as the verification basic data of the first account.
3. The method according to claim 2, wherein: The identification of the batch to be checked is determined according to the checking time of the first account; the method further includes: After obtaining the account balance verification result of the first account, the verification time of the first account is updated.
4. The method according to claim 3, wherein: The method further comprises: determining whether the verification time of the first account satisfies the verification condition; When the verification condition is met, a step is performed of acquiring credit transfer flow data for account credit verification from the account database of the first account as verification basic data of the first account.
5. The method of claim 1, wherein: The method further comprises: Determining a status of an account database of a second account corresponding to the first associated execution node; If the status of the account database of the second account is offline, the verification basic data of the first account is recorded in the verification basic data cache table of the first account, so that when the account database of the second account is online, the account limit of the first account can be verified according to the verification basic data cache table.
6. The method of claim 1, wherein: The first account is a centralized platform account or a dedicated account. Before sending the verification basic data of the first account to the first associated execution node, the method further includes: Determining a self-verification result of the centralized platform account or the dedicated account based on the verification basic data of the centralized platform account or the dedicated account; If the self-verification result is passed, the account verification result of the centralized platform account or the dedicated account is directly determined to be passed; If the self-verification result is failed, the second difference flow data in the verification basic data indicated by the self-verification result will be used as the data to be sent to the first associated execution node, or the second difference flow data will be recorded in the verification compensation table of the centralized platform account or the special account, so that the account limit compensation can be performed according to the verification compensation table.
7. The method according to any one of claims 1 to 6, wherein: The method further comprises: An account limit verification task is received, and a step of obtaining limit allocation flow data for account limit verification from an account database of the first account as verification basic data for the first account is executed according to the account limit verification task.
8. A method for checking an account balance, wherein: The method is executed by an execution node in the verification system, and the method includes: receiving basic verification data of a third account sent by the second associated execution node, wherein the basic verification data of the third account refers to credit limit transfer flow data used for account credit verification; Verifying the verification basic data of the third account based on the quota transfer transaction data stored in the account database of the first account to obtain a counterparty account verification result of the third account; Return the counterparty account verification result of the third account to the second association execution node, so that the second association execution node performs the following operations: If the counterparty account verification result of the third account is unsuccessful, determining the difference transaction data in the verification basic data of the third account based on the counterparty account verification result of the third account; Recording the difference transaction data in the verification basic data of the third account into the verification compensation table of the third account, so that the account limit compensation can be performed according to the verification compensation table; The first account and the third account are both accounts at any level in the reserve fund system, and the third account and the first account are associated accounts with a credit line transfer relationship; The verification system includes multiple execution nodes, each of which is a verification server. Each of the execution nodes is connected to the account database of an account, and the second associated execution node is the execution node where the third account is located.
9. The method of claim 8, wherein: The step of verifying the basic verification data of the third account based on the quota transfer flow data stored in the account database of the first account to obtain the counterparty account verification result of the third account includes: If the transaction identifier of each credit limit allocation transaction data in the verification basic data of the third account can be found in the credit limit allocation transaction data of the first account, then the counterparty account verification result of the third account is determined to be passed; otherwise, the counterparty account verification result of the third account is determined to be failed.
10. An account balance verification device, applied to an execution node in a verification system, wherein: The device is used to implement any one of the methods described in claims 1 to 7, or any one of the methods described in claims 8 to 9.
11. A verification system comprising a plurality of the account balance verification devices according to claim 10.
12. A computer-readable storage medium storing one or more programs, which, when executed by an execution node in a verification system including multiple application programs, causes the execution node in the verification system to execute any one of the methods of claims 1 to 7, or execute any one of the methods of claims 8 to 9.
Citation Information
Patent Citations
Data reconciliation based on computer analysis of data
CN110869962A
Fund checking method and device based on blockchain, electronic equipment and medium
CN111192147A