Accounting data processing method and device, electronic device, and storage medium

By aggregating account data and processing transaction requests for multi-level account structures, the problem of low performance of the account system in high concurrency scenarios is solved, efficient account data update and fund management are achieved, and business and capital losses are avoided.

CN113886412BActive Publication Date: 2025-05-23CHINABANK PAYMENT (BEIJING) TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111288117.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-02
Publication Date
2025-05-23
Estimated Expiration
2041-11-02

AI Technical Summary

Technical Problem

In high concurrency scenarios, multi-level account structure leads to low performance of the accounting system, which may cause business call timeouts and unavailability of the accounting system, and at the same time, there are problems such as insufficient funds leading to business and capital losses.

Method used

By aggregating all account data of each user in advance, multiple account aggregation information are obtained. When receiving the transaction request, the target account is determined based on the transaction request, the account data is determined from the account aggregation information, and the account data is adjusted and updated based on the transaction amount to complete the update of the account balance.

Benefits of technology

During a transaction, you only need to aggregate information on one account, which avoids multiple accounting operations, improves system performance, and avoids business and capital losses caused by insufficient funds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113886412B_ABST
    Figure CN113886412B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for processing account data, an electronic device, and a storage medium, wherein the method for processing account data comprises: receiving a transaction request sent by a user; determining each target account according to the transaction request; wherein the target account is the account of the user whose account is to be activated for this transaction; determining the account data of each target account from the account aggregation information corresponding to each target account; wherein the account data of the target account at least includes the balance of the target account; one piece of account aggregation information is obtained by aggregating the account data of all accounts of a user; adjusting the balance in the account data of each target account based on the transaction amount in the transaction request; and updating the account aggregation information using the adjusted account data of each target account.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of accounting processing, and in particular to a method and device for processing accounting data, an electronic device, and a storage medium. Background Art

[0002] Different from the traditional single-user single-account structure, the multi-level account (account tree) is a structure that classifies and manages accounts in layers, that is, a single user has multiple multi-level accounts. Therefore, during a transaction, it is necessary to operate one or more leaf accounts of the user and their cascaded parent accounts, that is, it is necessary to perform multiple update operations on multiple accounts. This makes the accounting system performance poor in high-concurrency scenarios, causing upper-level business call timeouts, and even affecting the availability of the accounting system.

[0003] To this end, there are two main ways to record accounts. One is to record the leaf account synchronously during the transaction, and then record the cascaded parent account asynchronously, thereby reducing the number of accounts operated during the transaction. The other way is to record only the root account synchronously during the transaction, and then asynchronously record the cascaded sub-accounts, so that only one account is operated during the transaction.

[0004] However, the first method also requires operations on multiple accounts when a transaction involves many user accounts, and the above problems still exist. In the second case, it is easy for the user to have sufficient total funds, but when the subordinate accounts are subsequently recorded, there will be insufficient funds in the subordinate accounts, resulting in business and capital loss problems. Summary of the invention

[0005] Based on the above-mentioned deficiencies of the prior art, the present application provides a method and device for processing accounting data, an electronic device, and a storage medium to solve the problem that the prior art has an impact on system performance or is prone to business and asset losses.

[0006] In order to achieve the above objectives, this application provides the following technical solutions:

[0007] The first aspect of the present application provides a method for processing accounting data, comprising:

[0008] Receive transaction requests sent by users;

[0009] Determine each target account according to the transaction request; wherein the target account is the account of the user whose account is to be moved in this transaction;

[0010] Determining account data of each target account from the account aggregation information corresponding to each target account; wherein the account data of the target account at least includes the balance of the target account; one piece of account aggregation information is obtained by aggregating the account data of all accounts of a user;

[0011] Adjusting the balance in the account data of each of the target accounts based on the transaction amount in the transaction request;

[0012] The account aggregation information is updated using the adjusted account data of each of the target accounts.

[0013] Optionally, in the above-mentioned method for processing account data, after determining the account data of each target account from the account aggregation information corresponding to each target account, the method further includes:

[0014] Determining whether the account aggregation information includes account data of each of the target accounts;

[0015] If it is determined that the account aggregation information includes the account data of each of the target accounts, then determining whether the balances in the account data of each of the target accounts are not less than 0 after the balances in the account data of each of the target accounts are adjusted based on the transaction amount in the transaction request;

[0016] If it is determined that after adjusting the balance in the account data of each of the target accounts based on the transaction amount in the transaction request, the balance in the account data of each of the target accounts is not less than 0, then the balance in the account data of each of the target accounts based on the transaction amount in the transaction request is adjusted.

[0017] Optionally, in the above-mentioned method for processing account data, after updating the account aggregation information using the adjusted account data of each of the target accounts, the method further includes:

[0018] Synchronously updating the updated account aggregation information to the cache;

[0019] The cache is asynchronously updated using the updated account aggregation information.

[0020] Optionally, in the above-mentioned method for processing accounting data, the method further includes:

[0021] Receiving a query request from a user; wherein the query request at least includes the account number of the account to be queried;

[0022] Based on the account number of the account to be queried, query the balance of the account to be queried from the account aggregation information corresponding to the account to be queried in the cache;

[0023] Based on the account number of the account to be queried, searching for target information of the account to be queried from the account details in the database;

[0024] The balance of the account to be queried is combined with the target information of the account to be queried and then fed back.

[0025] Optionally, in the above-mentioned method for processing account data, after updating the account aggregation information using the adjusted account data of each of the target accounts, the method further includes:

[0026] The updated account aggregation information is used to asynchronously update the account detail information and the flow library information.

[0027] A second aspect of the present application provides a device for processing accounting data, comprising:

[0028] A first receiving unit, configured to receive a transaction request sent by a user;

[0029] A target account determination unit, configured to determine each target account according to the transaction request; wherein the target account is the account of the user whose account is to be moved in this transaction;

[0030] An account data determination unit, configured to determine the account data of each of the target accounts from the account aggregation information corresponding to each of the target accounts; wherein the account data of the target account at least includes the balance of the target account; and one piece of the account aggregation information is obtained by aggregating the account data of all accounts of a user;

[0031] an adjusting unit, configured to adjust the balance in the account data of each of the target accounts based on the transaction amount in the transaction request;

[0032] The aggregate information updating unit is used to update the account aggregate information using the adjusted account data of each of the target accounts.

[0033] Optionally, the above-mentioned accounting data processing device further includes:

[0034] A first determination unit, configured to determine whether the account aggregation information includes account data of each of the target accounts;

[0035] The second judgment unit is used to judge whether the balances in the account data of each target account are not less than 0 after the balances in the account data of each target account are adjusted based on the transaction amount in the transaction request when it is judged that the account aggregation information includes the account data of each target account; wherein, if it is judged that the balances in the account data of each target account are not less than 0 after the balances in the account data of each target account are adjusted based on the transaction amount in the transaction request, the balances in the account data of each target account based on the transaction amount in the transaction request are adjusted.

[0036] Optionally, the above-mentioned accounting data processing device further includes:

[0037] A cache synchronization update unit, used to synchronize and update the updated account aggregation information into the cache;

[0038] The cache asynchronous updating unit is used to asynchronously update the cache using the updated account aggregation information.

[0039] Optionally, the above-mentioned accounting data processing device further includes:

[0040] A second receiving unit, configured to receive a query request sent by a user; wherein the query request at least includes an account number of an account to be queried;

[0041] A first query unit, configured to query the balance of the account to be queried from the account aggregation information corresponding to the account to be queried in the cache based on the account number of the account to be queried;

[0042] A second query unit, configured to search for target information of the account to be queried from the account details in the database based on the account number of the account to be queried;

[0043] The feedback unit is used to combine the balance of the account to be queried with the target information of the account to be queried and then provide feedback.

[0044] Optionally, the above-mentioned accounting data processing device further includes:

[0045] The information updating unit is used to asynchronously update the account detail information and the flow library information respectively using the updated account aggregation information.

[0046] A third aspect of the present application provides an electronic device, including:

[0047] Memory and processor;

[0048] Wherein, the memory is used to store programs;

[0049] The processor is used to execute the program, and when the program is executed, it is specifically used to implement the accounting data processing method as described in any one of the above items.

[0050] A fourth aspect of the present application provides a computer storage medium for storing a computer program, which, when executed, is used to implement the accounting data processing method as described in any one of the above.

[0051] The present application provides a method for processing account data, which aggregates the account data of all accounts of each user in advance to obtain multiple account aggregation information. When receiving a transaction request sent by a user, the target account of each user to be moved in this transaction is determined according to the transaction request. Then, the account data of each target account is determined from the account aggregation information corresponding to each target account. Among them, the account data of the target account at least includes the balance of the target account. Therefore, the balance in the account data of each target account is adjusted based on the transaction amount in the transaction request, and finally the account aggregation information is updated using the adjusted account data of each target account to complete the update of the account balance. Therefore, in a transaction process, only one operation is performed on one account aggregation information, and the accounts of each moving account can be recorded, without the need to perform multiple accounting operations on each account, which effectively avoids the impact on system performance and does not cause business and asset loss problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0053] Figure 1 A flowchart of a method for processing accounting data provided in an embodiment of the present application;

[0054] Figure 2 A schematic diagram of a multi-level account structure is provided as an example of an embodiment of the present application;

[0055] Figure 3 A flowchart of another method for processing accounting data provided in another embodiment of the present application;

[0056] Figure 4 A flowchart of a method for querying account data provided by another embodiment of the present application;

[0057] Figure 5 A schematic diagram of the structure of an accounting data processing device provided in another embodiment of the present application;

[0058] Figure 6 A schematic diagram of the structure of an electronic device provided in another embodiment of the present application. DETAILED DESCRIPTION

[0059] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0060] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0061] The present application embodiment provides a method for processing accounting data, such as Figure 1 As shown, the specific steps include:

[0062] S101. Receive a transaction request sent by a user.

[0063] Specifically, the user may send a transaction request when confirming the transaction through the front end, and the transaction request sent by the user is received accordingly.

[0064] Optionally, the transaction request may include the transaction amount, the identifier or account number of the target account to be transferred, etc.

[0065] S102: Determine each target account according to the transaction request.

[0066] Among them, the target account is the account of the user whose account is to be moved in this transaction, so the target account specifically includes the leaf account that needs to be moved and the cascaded upper parent account.

[0067] It should be noted that the method for processing account data provided in the embodiment of the present application is mainly aimed at multi-level accounts, that is, one user corresponds to multiple accounts at different levels. For example, the structure of a user's multi-level account can be as follows: Figure 2 shown.

[0068] Among them, in a transaction process, at least one leaf account is involved, and of course multiple leaf accounts may be involved.

[0069] Optionally, the transaction request may include the identifier of each leaf account that needs to be moved, such as an account number or a configured unique identifier, and then all the parent accounts associated with each leaf account are determined based on the identifier of each leaf account, and then all the leaf accounts and the determined parent accounts are determined as target accounts.

[0070] Of course, this is just one of the optional methods. The target account may also be determined in other ways. For example, the transaction request includes the identifier of each target account, so that each target account can be directly determined from the transaction request.

[0071] S103: Determine the account data of each target account from the account aggregation information corresponding to each target account.

[0072] First of all, it should be noted that in the embodiment of the present application, the account data of all accounts of each user are aggregated in advance to obtain multiple aggregate information, that is, one account aggregate information is obtained by aggregating the account data of all accounts of a user, and each user corresponds to one account aggregate information.

[0073] The account data of the target account at least includes the balance of the target account. Of course, in addition to the balance of the account, the aggregated information may also include other information such as the account serial number, whether to compress the identifier, etc. according to the needs.

[0074] Optionally, since account details are usually maintained in the accounting system, generally in the form of a table, an account details table is set and maintained to store the details of each account. Therefore, the account data of each account of the same user can be extracted from the account details table, and account aggregation information can be generated based on the extracted account data. Similarly, account aggregation information can also be stored in a table.

[0075] For example, in the account detail information table shown in Table 1, there is account detail information of multiple levels of accounts of two users.

[0076] Table 1

[0077] Account Number lump sum Frozen amount Account Level Serial Number 100001 100 0 1 1 10000101 100 0 2 2 1000010101 100 0 3 3 100002 50 50 1 1 10000201 50 50 2 2 1000020101 50 50 3 3

[0078] The account data in the detailed information of each account of the two users in Table 1 are aggregated respectively to obtain two pieces of account aggregation information as shown in Table 2.

[0079] Table 2

[0080]

[0081] It should be noted that in order to support multi-level account structure and reduce the size of account aggregate information, only some fields in the account detail information table are used to generate account aggregate information. For example, as shown in Table 2 of the above example, only the serial number, total amount, and frozen amount are saved in the account data.

[0082] Among them, the serial number is used to distinguish different accounts. Since the serial number occupies a relatively small storage space, it can effectively reduce the size of data storage. Of course, other forms of identification can also be used to distinguish accounts. The total amount and frozen amount are the balance of the account, so they must exist.

[0083] Optionally, the account aggregation information may also include a version number, and since different versions of account aggregation information are distinguished, errors in obtaining account aggregation information can be effectively avoided. In addition, a compression flag may also be included to determine whether to compress it before storage, so as to reduce storage space and network interaction and improve system performance.

[0084] Since the account aggregation information includes the account data of all accounts of the user, but not all accounts need to be moved for one transaction, it is necessary to first determine the corresponding account aggregation information, and then determine the account data of each target account from the account aggregation information.

[0085] Optionally, the serial number of the target account may be determined from the account detail information according to the account number of each target account, and then the account data of the target account may be determined from the account aggregation information based on the serial number of the target account.

[0086] S104: Adjust the balance in the account data of each target account based on the transaction amount in the transaction request.

[0087] It should be noted that if a transaction request involves multiple leaf accounts, the transaction request should include the transaction amount corresponding to each leaf account.

[0088] Optionally, when the transaction request is to make a payment, the corresponding amount is subtracted from the balance in the account data of each target account. Specifically, the corresponding transaction amount is directly subtracted from the leaf account, and for the parent account, the sum of the amounts subtracted from each sub-account under it should be subtracted. Similarly, if the transaction request is to receive a transfer, the corresponding amount is added.

[0089] S105: Update the account aggregation information using the adjusted account data of each target account.

[0090] Specifically, after the balance in the account data of each determined target account is adjusted, the adjusted balance needs to be aggregated into account information.

[0091] The embodiment of the present application provides a method for processing account data, which aggregates all account data of each user in advance to obtain multiple account aggregation information. When receiving a transaction request sent by a user, the target account of each user to be activated in this transaction is determined according to the transaction request. Then, the account data of each target account is determined from the account aggregation information corresponding to each target account. Among them, the account data of the target account at least includes the balance of the target account. Therefore, the balance in the account data of each target account is adjusted based on the transaction amount in the transaction request, and finally the account aggregation information is updated using the adjusted account data of each target account to complete the update of the account balance. Therefore, in a transaction process, only one operation is performed on one account aggregation information, and the accounts of each activated account can be recorded without the need to perform multiple accounting operations on each account, which effectively avoids the impact on system performance and does not cause business and asset loss problems.

[0092] Another embodiment of the present application provides another method for processing accounting data, such as Figure 3 As shown, the following steps are included:

[0093] S301. Receive a transaction request sent by a user.

[0094] It should be noted that the specific implementation of step S301 may refer to step S101 in the above method embodiment, and will not be described in detail here.

[0095] S302: Determine each target account according to the transaction request.

[0096] The target account is the account of the user whose account is to be moved in this transaction.

[0097] It should be noted that the specific implementation of step S302 may refer to step S102 in the above method embodiment, and will not be described in detail here.

[0098] S303: Determine the account data of each target account from the account aggregation information corresponding to each target account.

[0099] The account data of the target account at least includes the balance of the target account. An account aggregation information is obtained by aggregating the account data of all accounts of a user.

[0100] It should be noted that the specific implementation of step S303 may refer to step S103 in the above method embodiment, and will not be described in detail here.

[0101] S304: Determine whether the account aggregation information includes the account data of each target account.

[0102] Since accurate accounting cannot be performed when the account aggregation information does not include the account data of the target account, step S305 is performed only when it is determined that the account aggregation information includes the account data of each target account.

[0103] S305: Determine whether the balances in the account data of each target account are not less than 0 after the balances in the account data of each target account are adjusted based on the transaction amount in the transaction request.

[0104] Since the balance in the target account is less than zero after adjustment, it means that the balance of the target account cannot support this transaction. In order to avoid problems such as asset loss, it is necessary to perform step S306 only when it is determined that the balance in the account data of each target account is not less than 0 after adjusting the balance in the account data of each target account based on the transaction amount in the transaction request.

[0105] S306: Adjust the balance in the account data of each target account based on the transaction amount in the transaction request.

[0106] S307: Update the account aggregation information using the adjusted account data of each target account.

[0107] S308: Synchronously update the updated account aggregation information to the cache.

[0108] Optionally, in order to facilitate users to query the information of each account immediately after the transaction, in an embodiment of the present application, the updated account aggregation information will be synchronously updated to the cache, so that the account balance information can be found in time through the cache.

[0109] S309: Asynchronously update the cache using the updated account aggregation information.

[0110] Taking into account the possibility that the update of the account aggregation information in the synchronous update cache may fail, in order to ensure that the account aggregation information in the cache is completely consistent with that in the database and to ensure the accuracy of the query results, in an embodiment of the present application, after executing step S308, the cache is subsequently updated asynchronously using the updated account aggregation information, thereby ensuring the accuracy of the query results and not affecting the performance of the system.

[0111] Optionally, based on the cache update method of step S308 and step S309 in the embodiment of the present application, the embodiment of the present application also provides a method for querying account data, such as Figure 4As shown, the following steps are included:

[0112] S401: Receive a query request from a user.

[0113] Wherein, the query request at least includes the account number of the account to be queried.

[0114] S402: Based on the account number of the account to be queried, the balance of the account to be queried is queried from the account aggregation information corresponding to the account to be queried in the cache.

[0115] Optionally, the sequence number of the account to be queried may be determined from the account details based on the account number of the account to be queried, and then the balance of the account to be queried may be found from the corresponding account aggregation information based on the sequence of the account to be queried.

[0116] S403: Based on the account number of the account to be queried, target information of the account to be queried is found from the account details in the database.

[0117] Because, usually when making a query, not only the account balance can be queried, but also other account information can be queried, such as account status information, account holder information, etc., and this information is stored in the account details information in the database, so it is possible to further find the target information of the account to be queried from the account details information in the database based on the account number of the account to be queried.

[0118] The target information is the information specified for query, which can be the default information to be queried, or the information specified for query by the user.

[0119] S404: Combine the balance of the account to be queried with the target information of the account to be queried and then provide feedback.

[0120] Optionally, in another embodiment of the present application, the account details and the flow library information may be asynchronously updated through configuration, so after executing step S307, the following may be further included:

[0121] The updated account aggregation information is used to asynchronously update the account detail information and the flow library information respectively.

[0122] Another embodiment of the present application provides a device for processing account data, such as Figure 5 As shown, it includes the following units:

[0123] The first receiving unit 501 is used to receive a transaction request sent by a user.

[0124] The target account determination unit 502 is used to determine each target account according to the transaction request.

[0125] The target account is the account of the user whose account is to be moved in this transaction.

[0126] The account data determination unit 503 is used to determine the account data of each target account from the account aggregation information corresponding to each target account.

[0127] The account data of the target account at least includes the balance of the target account. An account aggregation information is obtained by aggregating the account data of all accounts of a user.

[0128] The adjustment unit 504 is configured to adjust the balance in the account data of each target account based on the transaction amount in the transaction request.

[0129] The aggregate information updating unit 505 is used to update the account aggregate information using the adjusted account data of each target account.

[0130] Optionally, in the accounting data processing device provided in another embodiment of the present application, the device further includes:

[0131] The first determination unit is used to determine whether the account aggregation information includes the account data of each target account.

[0132] The second judgment unit is used to judge whether the balances in the account data of each target account are not less than 0 after the balances in the account data of each target account are adjusted based on the transaction amount in the transaction request when it is determined that the account aggregation information includes the account data of each target account.

[0133] Among them, if it is determined that after the balance in the account data of each target account is adjusted based on the transaction amount in the transaction request, the balance in the account data of each target account is not less than 0, the adjustment unit executes the adjustment of the balance in the account data of each target account based on the transaction amount in the transaction request.

[0134] Optionally, in the accounting data processing device provided in another embodiment of the present application, the device further includes:

[0135] The cache synchronization update unit is used to synchronize the updated account aggregation information to the cache.

[0136] The cache asynchronous update unit is used to asynchronously update the cache using the updated account aggregation information.

[0137] Optionally, in the accounting data processing device provided in another embodiment of the present application, the device further includes:

[0138] The second receiving unit is used to receive a query request sent by a user.

[0139] The query request at least includes the account number of the account to be queried.

[0140] The first query unit is used to query the balance of the account to be queried from the account aggregation information corresponding to the account to be queried in the cache based on the account number of the account to be queried.

[0141] The second query unit is used to find target information of the account to be queried from the account details in the database based on the account number of the account to be queried.

[0142] The feedback unit is used to combine the balance of the account to be queried with the target information of the account to be queried and then provide feedback.

[0143] Optionally, in the accounting data processing device provided in another embodiment of the present application, the device further includes:

[0144] The information updating unit is used to asynchronously update the account detail information and the flow library information respectively using the updated account aggregation information.

[0145] It should be noted that the specific working process of each unit provided in the above embodiments of the present application can refer to the corresponding steps in the above method embodiments, which will not be repeated here.

[0146] Another embodiment of the present application provides an electronic device, such as Figure 6 As shown, including:

[0147] Memory 601 and processor 602 .

[0148] The memory 601 is used to store programs.

[0149] The processor 602 is used to execute the program stored in the memory 601, and when the program is executed, it is specifically used to implement the accounting data processing method provided in any one of the above embodiments.

[0150] Another embodiment of the present application provides a computer storage medium for storing a computer program, which, when executed, is used to implement any of the above-mentioned methods for processing accounting data.

[0151] Computer storage media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be 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 disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0152] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may 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.

[0153] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for processing accounting data, It is characterized in that include: Receiving a transaction request sent by a user; wherein the user corresponds to multiple accounts at different levels; Determine each target account from multiple accounts of different levels corresponding to the user according to the transaction request; wherein the target account is the account of the user of the pending account for this transaction, including the leaf account of the pending account and the upper-level account associated with the leaf account; Determine account aggregation information corresponding to the user, and determine account data of each of the target accounts from the account aggregation information; wherein the account data of the target account at least includes the balance of the target account; one piece of account aggregation information is obtained by aggregating account data of all accounts of a user; Adjusting the balance in the account data of each of the target accounts based on the transaction amount in the transaction request; Updating the account aggregation information using the adjusted account data of each of the target accounts; Synchronously updating the updated account aggregation information to the cache; The cache is asynchronously updated using the updated account aggregation information.

2. The method according to claim 1, It is characterized in that After determining the account data of each of the target accounts from the account aggregation information, the method further includes: Determining whether the account aggregation information includes account data of each of the target accounts; If it is determined that the account aggregation information includes the account data of each of the target accounts, then determining whether the balances in the account data of each of the target accounts are not less than 0 after the balances in the account data of each of the target accounts are adjusted based on the transaction amount in the transaction request; If it is determined that after adjusting the balance in the account data of each of the target accounts based on the transaction amount in the transaction request, the balance in the account data of each of the target accounts is not less than 0, then the balance in the account data of each of the target accounts based on the transaction amount in the transaction request is adjusted.

3. The method according to claim 1, It is characterized in that Also includes: Receiving a query request from a user; wherein the query request at least includes the account number of the account to be queried; Based on the account number of the account to be queried, query the balance of the account to be queried from the account aggregation information corresponding to the account to be queried in the cache; Based on the account number of the account to be queried, searching for target information of the account to be queried from the account details in the database; The balance of the account to be queried is combined with the target information of the account to be queried and then fed back.

4. The method according to claim 1, It is characterized in that After the account aggregation information is updated using the adjusted account data of each of the target accounts, the method further includes: The updated account aggregation information is used to asynchronously update the account detail information and the flow library information.

5. A device for processing accounting data, It is characterized in that include: A first receiving unit is used to receive a transaction request sent by a user; wherein the user corresponds to multiple accounts at different levels; a target account determination unit, configured to determine each target account from a plurality of accounts of different levels corresponding to the user according to the transaction request; wherein the target account is the account of the user whose account is to be moved for this transaction, including a leaf account of the account to be moved and an upper-level account associated with the leaf account; an account data determination unit, configured to determine account aggregation information corresponding to the user, and determine account data of each of the target accounts from the account aggregation information; wherein the account data of the target account at least includes the balance of the target account; one piece of account aggregation information is obtained by aggregating account data of all accounts of a user; an adjusting unit, configured to adjust the balance in the account data of each of the target accounts based on the transaction amount in the transaction request; an aggregate information updating unit, configured to update the account aggregate information using the adjusted account data of each of the target accounts; A cache synchronization update unit, used to synchronize and update the updated account aggregation information into the cache; The cache asynchronous updating unit is used to asynchronously update the cache using the updated account aggregation information.

6. The device according to claim 5, It is characterized in that Also includes: A first determination unit, configured to determine whether the account aggregation information includes account data of each of the target accounts; The second judgment unit is used to judge whether the balances in the account data of each target account are not less than 0 after the balances in the account data of each target account are adjusted based on the transaction amount in the transaction request when it is judged that the account aggregation information includes the account data of each target account; wherein, if it is judged that the balances in the account data of each target account are not less than 0 after the balances in the account data of each target account are adjusted based on the transaction amount in the transaction request, the adjustment unit executes the adjustment of the balances in the account data of each target account based on the transaction amount in the transaction request.

7. An electronic device, It is characterized in that include: Memory and processor; Wherein, the memory is used to store programs; The processor is used to execute the program, and when the program is executed, it is specifically used to implement the accounting data processing method as described in any one of claims 1 to 4.

8. A computer storage medium, It is characterized in that Used to store a computer program, which, when executed, is used to implement the method for processing accounting data as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Shared capital data processing device and use method thereof

    CN103366306A