CN114996281A - Data processing system, method, device, electronic equipment and storage medium - Google Patents

Data processing system, method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114996281A
CN114996281A CN202110231028.6A CN202110231028A CN114996281A CN 114996281 A CN114996281 A CN 114996281A CN 202110231028 A CN202110231028 A CN 202110231028A CN 114996281 A CN114996281 A CN 114996281A
Authority
CN
China
Prior art keywords
account
accounting
data
server
nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110231028.6A
Other languages
Chinese (zh)
Inventor
关成龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202110231028.6A priority Critical patent/CN114996281A/en
Publication of CN114996281A publication Critical patent/CN114996281A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2358Change logging, detection, and notification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/06Asset management; Financial planning or analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/12Accounting

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Human Resources & Organizations (AREA)
  • Operations Research (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the invention discloses a data processing system, a data processing method, a data processing device, electronic equipment and a storage medium. The system comprises: the system comprises a business side server, an application server and a database server; the service side server sends an accounting interface calling request to an application server corresponding to a current service side, and when the application server receives the accounting interface calling request, the application server determines a corresponding database server from a database cluster so as to read corresponding configuration data from the database server, perform verification processing and update processing on account data of a plurality of accounting nodes, so that accounting operation is executed by the independently deployed application server and is completely decoupled from the service side server, and further pressure of the service side server is relieved. Moreover, the service side server can complete the accounting operation of each level node through one-time interface calling without calling a plurality of services for accounting respectively, thereby improving the processing efficiency and the resource utilization rate of transaction accounting.

Description

Data processing system, method, device, electronic equipment and storage medium
Technical Field
Embodiments of the present invention relate to the field of computer technologies, and in particular, to a data processing system, method, apparatus, electronic device, and storage medium.
Background
With the continuous development of the internet technology, a user can perform transaction operations such as purchase of financial products through an APP installed on an intelligent terminal, the transaction operation business system needs to process the transaction and perform accounting processing, accounting needs to be performed on a plurality of accounting dimensions respectively when accounting processing is performed, for example, when the user purchases a plurality of fund products on the APP, accounting needs to be performed on the user dimensions in a background, and accounting needs to be performed on product dimensions of each purchased fund product respectively.
In the process of implementing the invention, at least the following problems are found in the prior art:
in the scheme, transaction processing and accounting processing are coupled to be executed in the business system, the pressure of the business system is high, the problem of reduction of processing efficiency of the business system is caused, accounting needs to be performed respectively aiming at a plurality of accounting dimensions, accounts with different dimensions are dispersed in different accounting systems, a plurality of accounting services need to be called for accounting, and the processing efficiency and the utilization rate of resources are low.
Disclosure of Invention
The embodiment of the invention provides a data processing system, a data processing method, a data processing device, electronic equipment and a storage medium, which are used for relieving the pressure of a service system and improving the accounting processing efficiency and the resource utilization rate.
In a first aspect, an embodiment of the present invention provides a data processing system, where the system includes:
the service party server is used for generating an accounting calling parameter according to the current transaction record and sending an accounting interface calling request carrying a service party identifier and the accounting calling parameter to an application server corresponding to the current service party; the accounting calling parameters comprise identification information and updating mode information corresponding to each account node needing to be updated;
the application server is used for receiving the accounting interface calling request, determining a database server corresponding to the business party identifier from a database cluster, reading configuration data of an account hierarchical structure corresponding to the business party identifier from the database server, verifying the accounting calling parameters according to the configuration data, and updating the account data of a plurality of account nodes in the account hierarchical structure stored in the database server according to the accounting calling parameters after the verification is passed;
and the database server is used for storing the account data of each account node in the account hierarchy structure.
In a second aspect, an embodiment of the present invention further provides a data processing method, where the method includes:
receiving an accounting interface calling request which is sent by a service party server and carries a service party identifier and an accounting calling parameter; the service side server generates accounting calling parameters according to the current transaction record, wherein the accounting calling parameters comprise identification information and updating mode information corresponding to each account node needing to be updated;
determining a database server corresponding to the business party identifier from a database cluster, and reading configuration data of an account hierarchical structure corresponding to the business party identifier from the database server;
verifying the accounting calling parameters according to the configuration data, and updating the account data of the plurality of account nodes in the account hierarchical structure stored in the database server according to the accounting calling parameters after the accounting calling parameters pass the verification; the database server is used for storing account data of each account node in the account hierarchy.
In a third aspect, an embodiment of the present invention further provides a data processing apparatus, where the apparatus includes:
the request receiving module is used for receiving an accounting interface calling request which is sent by the service party server and carries the service party identification and the accounting calling parameter; the service side server generates accounting calling parameters according to the current transaction record, wherein the accounting calling parameters comprise identification information and updating mode information corresponding to each account node needing to be updated;
the configuration reading module is used for determining a database server corresponding to the business party identifier from a database cluster and reading configuration data of an account hierarchical structure corresponding to the business party identifier from the database server;
the data updating module is used for verifying the accounting calling parameters according to the configuration data and updating the account data of the plurality of account nodes in the account hierarchical structure stored in the database server according to the accounting calling parameters after the accounting calling parameters pass the verification; the database server is used for storing account data of each account node in the account hierarchy.
In a fourth aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a data processing method as provided by any of the embodiments of the invention.
In a fifth aspect, the embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the data processing method provided in any embodiment of the present invention.
The embodiment of the invention has the following advantages or beneficial effects:
the data processing system of the embodiment of the invention comprises a service side server, an application server and a database server; the service side server sends an accounting interface calling request to an application server corresponding to a current service side, and when the application server receives the accounting interface calling request, the application server determines a database server corresponding to a service side identifier from a database cluster so as to read configuration data of an account hierarchical structure corresponding to the service side identifier from the database server, verify the configuration data and update the account data of a plurality of accounting nodes, so that accounting operation is executed by the application server which is independently deployed, the accounting operation is completely decoupled from the service side server, and pressure of the service side server is relieved. Moreover, the service side server can complete the accounting operation of each level node through one-time interface calling without calling a plurality of services for accounting respectively, thereby improving the processing efficiency and the resource utilization rate of transaction accounting.
Drawings
In order to more clearly illustrate the technical solution of the exemplary embodiment of the present invention, a brief introduction will be made to the drawings required for describing the embodiment. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1A is a schematic structural diagram of a data processing system according to an embodiment of the present invention;
FIG. 1B is a schematic view of an account hierarchy according to an embodiment of the present invention;
FIG. 1C is a schematic view of another account hierarchy according to an embodiment of the present invention;
FIG. 1D is a block diagram of a data processing system according to an embodiment of the present invention;
FIG. 1E illustrates a hierarchical account subject according to an embodiment of the present invention;
FIG. 1F is a schematic diagram of an interaction process of a billing process according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an application server according to a second embodiment of the present invention;
fig. 3 is a schematic diagram illustrating an interaction process of the offset processing according to a third embodiment of the present invention;
fig. 4 is a schematic diagram illustrating an interaction process of balance inquiry processing according to a fourth embodiment of the present invention;
fig. 5 is a schematic diagram illustrating an interaction process of pipelined account query processing according to a fifth embodiment of the present invention;
FIG. 6A is a schematic diagram of a configuration of an accounting unit and a configuration of accounting items according to a sixth embodiment of the present invention;
fig. 6B is a schematic diagram of a summary configuration according to a sixth embodiment of the present invention;
fig. 6C is a schematic diagram of a summary configuration sample according to a sixth embodiment of the present invention;
fig. 6D is a schematic diagram of a basic configuration of an accounting system according to a sixth embodiment of the present invention;
fig. 6E is a schematic diagram of an example of basic accounting configuration according to a sixth embodiment of the present invention;
fig. 6F is a schematic diagram of a basic transaction configuration according to a sixth embodiment of the present invention;
fig. 6G is a schematic diagram of an example of basic accounting configuration according to a sixth embodiment of the present invention;
fig. 6H is a schematic diagram of configuration data according to a sixth embodiment of the present invention;
fig. 6I is a schematic diagram illustrating an access process of a data processing system according to a sixth embodiment of the present invention;
fig. 6J is a schematic view of an account opening process according to a sixth embodiment of the present invention;
fig. 7 is a flowchart illustrating a data processing method according to a seventh embodiment of the present invention;
fig. 8 is a schematic structural diagram of a data processing apparatus according to an eighth embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to a ninth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1A is a schematic structural diagram of a data processing system according to an embodiment of the present invention, which is applicable to a case where a current transaction record is subjected to an accounting process, and is particularly applicable to a case where a service server sends an accounting interface call request to an independently deployed application server to enable the application server to perform an accounting process on the current transaction record, where the system may be implemented by hardware and/or software. As shown in fig. 1A, the system specifically includes:
the service party server 110 is configured to generate an accounting call parameter according to the current transaction record, and send an accounting interface call request carrying a service party identifier and the accounting call parameter to the application server 120 corresponding to the current service party; the accounting calling parameters comprise identification information and updating mode information corresponding to each account node needing to be updated;
the application server 120 is configured to receive the accounting interface call request, determine the database server 130 corresponding to the service party identifier from the database cluster, read configuration data of an account hierarchy corresponding to the service party identifier from the database server 130, verify the accounting call parameter according to the configuration data, and update account data of a plurality of account nodes in the account hierarchy stored in the database server 130 according to the accounting call parameter after the verification is passed;
and the database server 130 is used for storing the account data of each account node in the account hierarchy.
Wherein, different service parties may have their corresponding service party servers 110; for example, the first service corresponds to a service side server a, the third service corresponds to a service side server B, and the third service corresponds to a service side server C. The business party server 110 may receive the transaction processing request sent by the client, perform transaction processing according to the transaction processing request, and generate a current transaction record. For example, the client may be an application program in the kyoto technology, such as kyoto finance, and the client may also be a WeChat applet, which is not limited in this application, and the client may be any program that provides a transaction service to a user.
In this embodiment, the current service party may be a service party corresponding to the current transaction record, and the service party identifier may be identification information of the current service party. The service provider server 110 is further configured to determine the application server 120 corresponding to the current service provider. Specifically, the service side server 110 may determine the application server 120 corresponding to the current service side from the application server cluster according to the service side identifier of the current service side. Illustratively, the service party of the a service is identified as "account _ xjk". In one embodiment, the service side server 110 may determine the application server 120 corresponding to the current service side from the application server cluster according to the service side identifier of the current service side, including: the service side server 110 generates a corresponding hash value according to the service side identifier of the current service side, and determines the application server 120 corresponding to the current service side according to the pre-established correspondence between the hash value and each application server identifier.
In this embodiment, deploying the application server cluster so that the service server 110 determines the application server corresponding to the current service party from the application server cluster has the following advantages: under the scene that the service side server receives a large number of current transaction records, the plurality of application servers respectively carry out accounting processing on each current transaction record, so that the accounting processing efficiency is improved, and the instantaneity of the accounting processing is ensured.
The service party server 110 is further configured to generate an accounting call parameter according to the current transaction record, and send an accounting interface call request carrying the service party identifier and the accounting call parameter to the application server 120 corresponding to the current service party. The accounting calling parameters include, but are not limited to, identification information and updating mode information corresponding to each account node that needs to be updated. Note that the account node may be a node determined according to the hierarchy of each account. As shown in fig. 1B, an account hierarchy is shown, where the account hierarchy includes 3 layers, where a tertiary account belongs to a sub-account of a secondary account, and a secondary account belongs to a sub-account of a root node account, and then account nodes include a root account node, each secondary account node, and each tertiary account node.
It is understood that the hierarchy of each account may be determined according to the service type of the account. Taking a first service as an example, as shown in fig. 1C, an account hierarchy structure diagram is shown, where the first service may be divided into two types of accounts, namely a personal account and a product account, where the product account belongs to a sub-account of the personal account, and the personal account and the product account belong to different levels, and the account nodes include a personal account node, a product account 1 node, and a product account 2 node.
In this embodiment, the accounting call parameter is generated by identification information corresponding to each account node that needs to be updated and update mode information. The identification information corresponding to the account node to be updated may be identification information of the account node to be updated. Optionally, the identification information includes hierarchical account information, and the hierarchical account information includes an account code; wherein the account code may be a hierarchical code of the account node.
The update mode information may include change amount information and change operators of each account node that needs to be updated. Wherein the change operators include plus (+) and minus (-); that is, the add change operator indicates that the change amount is added to the original amount of the account node, and the subtract change operator indicates that the change amount is subtracted from the original amount of the account node. In one embodiment, the updating mode information further includes amount limit information, wherein the amount limit information may be a limit for the changed amount, including but not limited to the changed amount being larger than a preset value, the changed amount being smaller than the preset value, the changed amount being fixed to the preset value, and the like. For example, the change amount is greater than zero, less than ten thousand dollars, or one thousand dollars.
In one embodiment, the accounting call parameters include not only identification information and update mode information corresponding to each account node to be updated, but also user account information, transaction codes, amount information and product codes. Wherein the product code may be a code of a product associated with the current transaction record.
After the service party server 110 sends the billing interface call request carrying the service party identifier and the billing call parameter to the application server 120, the application server 120 receives the billing interface call request and determines the database server 130 corresponding to the service party identifier from the database cluster. In one embodiment, application server 120 may determine the Database server 130 corresponding to the business party identifier from the Database cluster based on a Dynamic data source (Dynamic Database source) and a Content Distribution (CDS) module. Or determining a cache server based on the R2M Client; the cache server is used for caching hot spot data in the database server, and the hot spot data refers to data with the queried frequency higher than a set threshold value within a preset time period. For example, as shown in fig. 1D, a schematic structural diagram of a data processing system is shown by taking a service server a and a service server b as examples. In fig. 1D, the service side servers respectively determine the application server corresponding to the current service side in the application server cluster corresponding to the service side server. The determined application server can determine a database server in the database cluster based on the Dynamic DataSource and CDS module; or, determining the cache server based on the R2M Client. Wherein, the CDS module is deployed on an application server; the CDS module may be middleware for database pooling. Each application server may also provide standard call (JSF) services.
In this embodiment, each database server may further store configuration data of an account hierarchy corresponding to each service party identifier. After determining the database server 130 corresponding to the business party identifier from the database cluster, the application server 120 reads the configuration data of the account hierarchy corresponding to the business party identifier of the current business party from the database server 130. Wherein, the account hierarchy can be a hierarchy of each account node; the configuration data of the account-level interface may include configuration information for each account node.
Specifically, after reading the configuration data of the account hierarchy corresponding to the service party identifier from the database server 130, the application server 120 verifies the accounting call parameter according to the configuration data, for example, verifies the hierarchy account code in the accounting call parameter. If the verification of the accounting calling parameters is passed, updating the account data of the plurality of account nodes in the account hierarchical structure stored in the database server according to the accounting calling parameters; the account data may include amount information and running information of each account node. That is, when the verification of the accounting calling parameters passes, accounting processing of a plurality of account nodes needing to be updated can be completed according to the accounting calling parameters.
Illustratively, the accounting call parameters include identification information corresponding to a product account 1 account node, identification information corresponding to a personal account node, a change amount of 1 element, and a change operator to increase; the account data of the product account 1 account node stored in the database server includes an amount of 200 m, and the account data of the personal account node includes an amount of 500 m, so that the updated account data of the product account 1 account node includes an amount of 201 m, and the updated account data of the personal account node includes an amount of 501 m.
Optionally, the hierarchical account information in the identification information further includes a hierarchical account subject; wherein, the hierarchical account subject may be a business subject of the account node. As shown in fig. 1E, a hierarchical account subject is illustrated, which may be, for example, a total amount, an available amount, a blocked amount, etc.
Taking the a service as an example, the hierarchical account subject includes at least one of a total amount, an available amount, a frozen amount, and a cumulative benefit. Correspondingly, the account data of a plurality of account nodes in the account hierarchy stored in the database server is updated according to the accounting calling parameters, and the account data of the hierarchy account department of each account node can also be updated. For example, the billing calling parameter includes an available balance of the product account 1 account node, an available balance corresponding to the personal account node, a change amount of 2 yuan, and a change operator is an increase, the account data of the available balance of the product account 1 account node stored in the database server includes an amount of 100 yuan, the account data of the available balance of the personal account node includes an amount of 300 yuan, the account data of the updated available balance of the product account 1 account node includes an amount of 102 yuan, and the account data of the updated available balance of the personal account node includes an amount of 302 yuan.
In one embodiment, updating account data for a plurality of account nodes in an account hierarchy stored in a database server according to an accounting call parameter comprises: invoking the database server 130 to open a database transaction, and updating the account data of the plurality of account nodes in the account hierarchy through the opened database transaction and the accounting invocation parameter. In another embodiment, an account core processing layer may be deployed in the application server, the operation of updating account data of a plurality of account nodes in an account hierarchy stored in the database server according to the accounting call parameter is performed by the account core processing layer in the application server,
considering that the account hierarchy of some accounts is simple and the account hierarchy of some accounts is complex, different accounting modes can be respectively adopted for account hierarchies of different complexity degrees. For example, an account hierarchical structure with complex hierarchy can adopt an asynchronous accounting mode to reduce the processing time of a synchronous accounting mode, thereby improving the accounting efficiency and ensuring the real-time performance of accounting; the account hierarchy with simple hierarchy can adopt a synchronous accounting mode to realize the synchronism of accounting by each account node. Thus, optionally, updating the account data of the plurality of account nodes in the account hierarchy stored in the database server 130 according to the accounting call parameter comprises: traversing the account nodes of each level in the account level structure according to the sequence from the root account node to the leaf account node if the synchronous accounting mode is determined to be adopted according to the transaction codes in the accounting calling parameters; for the traversed account nodes needing to be updated, determining a data table for recording account data of the account nodes according to account codes of the account nodes, and updating the account data of the account nodes recorded in the data table according to updating mode information of the account nodes; an accounting completion notification message is sent to the business party server 110 after the update is completed.
In this alternative embodiment, the billing invocation parameter includes a transaction code; the transaction code is generated based on the transaction type of the current transaction record and the accounting mode of each account node. For example, the transaction type may be a transfer amount, a transfer-out amount, a frozen amount, etc.; the accounting mode comprises a synchronous accounting mode and an asynchronous accounting mode. Alternatively, the accounting mode of each account node may be determined based on the number of levels of the account hierarchy. For example, if the level number of the account hierarchy does not exceed a set level threshold, determining each account node of the account hierarchy as a synchronous accounting mode; or if the number of the account nodes corresponding to the account hierarchy does not exceed the set number threshold, determining that each account node of the account hierarchy is in a synchronous accounting mode. The set level threshold and the set quantity threshold may be determined according to the real-time requirement of the call by the actual service, which is not limited in the present application. In one embodiment, the accounting mode of each account node with the transaction type of the transfer amount can be configured to be a synchronous accounting mode, so as to ensure synchronous updating of the account data of each account node.
Note that each account node of the account hierarchy forms a tree-like hierarchical relationship, as shown in fig. 1B. The leaf account node is a sub-account of the root account node. The account code of the traversed account node that needs to be updated may be determined based on the billing invocation parameters. Specifically, the data table corresponding to the traversed account node to be updated may be determined according to the pre-stored account codes of the account nodes and the correspondence between the data tables recording the account data of the account nodes; and the data tables are stored in the database server and store account data of the account nodes. And after the traversed data table of the account nodes needing to be updated is determined, updating the account data in the data table based on the updating mode information of the account nodes.
The optional implementation mode exemplifies a billing process in a synchronous billing mode, and the benefit of completing the billing processing by adopting the synchronous billing mode is as follows: for each account node with a simpler account hierarchical structure, the synchronism of the account of each account node can be ensured through a synchronous accounting mode.
Optionally, updating the account data of the plurality of account nodes in the account hierarchy stored in the database server 130 according to the accounting call parameter includes: if the asynchronous accounting mode is determined to be adopted according to the transaction code in the accounting calling parameter, determining a leaf account node needing to be updated in the account hierarchical structure according to the accounting calling parameter, determining a data table for recording account data of the leaf account node according to an account code of the leaf account node, updating the account data of the leaf account node recorded in the data table according to the updating mode information of the leaf account node, and sending an accounting completion notification message to the service party server 110 after the updating is completed; and starting an asynchronous accounting thread, and updating the account data of other account nodes except the leaf account nodes needing to be updated in the account hierarchical structure through the asynchronous accounting thread.
Specifically, in this optional embodiment, if the accounting mode of each account node is an asynchronous accounting mode, the account data of the leaf account node that needs to be updated is updated, and after the update of the account data of the leaf account node is completed, the account data of other account nodes except for the leaf account node that needs to be updated in the account hierarchy structure is updated by starting an asynchronous accounting thread. For example, as shown in fig. 1B, if each account node is in an asynchronous accounting mode, the account data of each tertiary account node is updated first, after the update is completed, an asynchronous accounting thread is started, and the account data of each secondary account node and the account data of the root account node are updated through the asynchronous accounting thread.
In one embodiment, the accounting mode of each account node with the transaction type of the transfer amount can be configured to be an asynchronous accounting mode so as to ensure the instantaneity of accounting processing. In this alternative embodiment, the benefit of using a synchronized billing method to perform the billing process is: the processing time of the synchronous bookkeeping mode is shortened, the bookkeeping efficiency is improved, and the real-time performance of bookkeeping is guaranteed. Optionally, the updating, by the asynchronous accounting thread, the account data of other account nodes, except for the leaf account node, in the account hierarchy that need to be updated includes: creating an asynchronous billing task, and sending task information of the asynchronous billing task to a preset message queue MQ; and reading the task information from the MQ through the started asynchronous accounting thread, and executing an asynchronous accounting task according to the task information so as to update the account data of other account nodes except the leaf account nodes which need to be updated in the account hierarchical structure.
Wherein the asynchronous accounting task may be a task for processing account data updates of other account nodes than the leaf account node. And the preset Message Queue (MQ) is used for caching task information of each asynchronous accounting task. Optionally, the preset message queue may be a preset globally shared cache space, and is used for caching task information of each asynchronous accounting task. In one embodiment, the asynchronous accounting thread may periodically read task information from the MQ, execute a corresponding asynchronous accounting task according to the read task information, and further update account data of other account nodes except leaf account nodes in the account hierarchy structure that need to be updated.
The data processing system of the embodiment comprises a service side server, an application server and a database server; the business side server sends an accounting interface calling request to an application server corresponding to a current business side, when the application server receives the accounting interface calling request, the application server determines a database server corresponding to a business side identifier from a database cluster, so that configuration data of an account hierarchical structure corresponding to the business side identifier are read from the database server, verification processing is carried out, and updating processing of account data of a plurality of accounting nodes is carried out, therefore, accounting operation is executed by the application server which is independently deployed, the application server is completely decoupled from the business side server, pressure of the business side server is relieved, zero development of a business line is helped to have accounting capacity, and business requirements are quickly responded. Meanwhile, the transaction and the accounting are separated through the decoupling with the service server, and then the application server can access the existing information of the service party to carry out the accounting processing. And the service side server can complete the accounting operation of each level node through one-time interface calling without calling a plurality of services for respectively accounting, if the service side server is a level account, the service side server only needs to call one-time accounting, and the system automatically accounts to each level account and performs statistical processing, thereby improving the processing efficiency and the resource utilization rate of transaction accounting.
Taking fig. 1F as an example, a schematic diagram of an interaction process of the service server and the application server performing accounting processing is shown. Specifically, the service side server generates an accounting interface calling request according to the requirements of the application server and sends the accounting interface calling request to the application server, the application server calls the account inquiry service and performs entry verification, after the verification is passed, the accounting service is called to update the account data, and the accounting result is fed back to the service side server.
Example two
Based on the foregoing embodiments, optionally, the verifying the billing invocation parameter according to the configuration data includes: and verifying whether the account levels in the accounting calling parameters are matched, whether the account nodes needing to be updated exist and whether the updating mode information of the account nodes in the accounting calling parameters meets the rules according to the configuration data.
Wherein explanations of the same or corresponding terms as those of the above embodiments are omitted. The data processing system provided by the embodiment comprises:
the business side server is used for generating an accounting calling parameter according to the current transaction record and sending an accounting interface calling request carrying a business side identifier and the accounting calling parameter to the application server corresponding to the current business side; the accounting calling parameters comprise identification information and updating mode information corresponding to each account node needing to be updated;
the application server is used for receiving the bookkeeping interface calling request, determining a database server corresponding to the business party identifier from the database cluster, reading configuration data of an account hierarchical structure corresponding to the business party identifier from the database server, verifying at least one of whether account hierarchies in the bookkeeping calling parameters are matched, whether account nodes needing to be updated exist and whether updating mode information of the account nodes in the bookkeeping calling parameters meet rules according to the configuration data, and updating the account data of a plurality of account nodes in the account hierarchical structure stored in the database server according to the bookkeeping calling parameters after the verification is passed;
and the database server is used for storing the account data of each account node in the account hierarchy structure.
That is, the application server of the present embodiment needs to perform entry verification on the accounting call parameter before updating the account data of the plurality of account nodes in the account hierarchy stored in the database server.
In the present embodiment, the configuration data includes model configuration data; the model configuration data may include a tree hierarchy relationship between the account nodes; for example, as shown in fig. 1B-1C. The account hierarchy in the billing invocation parameters may be determined based on the account code of the account node in the billing invocation parameters that needs to be updated. Specifically, whether the account levels in the accounting call parameters are matched is verified according to the account levels in the accounting call parameters and the model configuration data in the configuration data.
Or, the configuration data comprises node configuration data; the node configuration data may include account nodes. Specifically, whether the account node needing to be updated exists can be verified according to the account level in the accounting calling parameter and the node configuration data in the configuration data.
Alternatively, the configuration data comprises transaction accounting configuration data; the transaction billing configuration data may include, among other things, change operators for each level of accounts and amount limit information. Specifically, whether the update mode information of the account node in the accounting calling parameter conforms to the rule or not can be verified according to the update mode information of the account node in the accounting calling parameter and the transaction accounting configuration data in the configuration data.
In this embodiment, at least one of whether the account levels in the accounting call parameters are matched, whether an account node that needs to be updated exists, and whether the update mode information of the account node in the accounting call parameters meets the rule may be verified. The number of items to be verified is not limited in this embodiment, and the verification accuracy or the verification time can be adjusted according to the actual service.
Optionally, at least one of whether the accounting call parameter is null data, whether the length of each field in the accounting call parameter meets a preset length requirement, and whether each account node that needs to be updated in the accounting call parameter is abnormal may be verified.
In one embodiment, a data verification layer may be deployed in an application server; and the data verification layer of the application server performs at least one of verification on whether the account levels in the accounting calling parameters are matched, whether account nodes needing to be updated exist and whether the updating mode information of the account nodes in the accounting calling parameters meets the rules according to the configuration data.
The application server in the data processing system provided in this embodiment verifies, according to the configuration data, at least one of whether the account levels in the accounting call parameters are matched, whether the account nodes to be updated exist, and whether the update mode information of the account nodes in the accounting call parameters conforms to the rules, so as to avoid an account data update error caused by mismatching of the account levels, absence of the account nodes, or non-conformance of the update mode to the rules when the account data of the account nodes are updated, thereby ensuring the accuracy of the account data update, and further improving the experience of the user.
Considering the situation that the configuration data of the existing account hierarchy does not contain part of account nodes needing to be updated, for example, a user newly buys a product account. Optionally, the application server is further configured to: before updating the account data of a plurality of account nodes in the account hierarchical structure stored in the database server according to the accounting calling parameters, if any account node needing to be updated does not exist in the account hierarchical structure, determining whether a new account can be automatically created according to the configuration data, and if so, adding any account node needing to be updated in the account hierarchical structure.
For example, a user of the first service may subscribe a plurality of product accounts, account codes of the plurality of product accounts do not need to be preset in configuration data, and after the user subscribes a new product account, a new account corresponding to the product account may be automatically created, that is, an account node of the product account is added in an account hierarchy. In an alternative embodiment, the configuration data may include a subscription identifier; the subscription identifier is used for indicating whether a new account can be created or not, and whether the new account can be automatically created or not can be determined according to the subscription identifier in the configuration data.
In one embodiment, a billing model processing layer may be deployed in the application server. And when any account node needing to be updated and included in the accounting calling parameter does not exist in the account hierarchical structure, the accounting model processing layer determines whether a new account can be automatically created or not according to the configuration data, and if so, the operation of adding any account node needing to be updated in the account hierarchical structure is carried out.
In these optional embodiments, in a scenario where the configuration data of the account hierarchy does not include part of account nodes that need to be updated, a manner of adding account nodes that need to be updated in the account hierarchy according to the configuration data is provided, so that a situation that a user cannot complete corresponding accounting processing when purchasing a new product is avoided, and thus accounting accuracy is ensured.
In view of each accounting interface call request, a corresponding transaction record may also be generated and stored when performing the update process of the account data of the multi-account node. Optionally, the application server is further configured to: before updating the account data of a plurality of account nodes in an account hierarchical structure stored in a database server according to an accounting calling parameter, generating a transaction record according to the accounting calling parameter, writing the transaction record into a transaction table of the database server, and recording a transaction state in the transaction table as processing; and after updating the account data of the plurality of account nodes, marking the transaction state in the transaction table as successful.
The transaction table is used for storing transaction records and transaction states corresponding to the transaction records; the transaction table may be stored in a database server. Optionally, the transaction record includes transaction time, user account number, transaction code, amount information, product code, account code, hierarchical account subject, change operator, and the like.
In other words, in this optional embodiment, after the verification of the accounting call parameter in one accounting interface call request is passed, the corresponding transaction record may be generated according to the accounting call parameter and stored in the transaction table, the transaction state is marked as processing, and after the update of the account data of the account node that needs to be updated is completed, the transaction state in the transaction table is marked as success.
In one embodiment, a database transaction can be started through the database server, a transaction record is generated as the transaction record according to the accounting calling parameter through the started database transaction, the transaction record is written into a transaction table of the database server, and the transaction state is recorded in the transaction table as processing; and after updating the account data of the plurality of account nodes, marking the transaction state in the transaction table as successful.
In another alternative embodiment, a billing order handling layer may also be deployed in the application server. Generating a transaction record according to the accounting calling parameter by the accounting order processing layer, writing the transaction record into a transaction table of the database server, and recording the transaction state in the transaction table as processing; and after updating the account data of the plurality of account nodes, marking the transaction state in the transaction table as successful operation.
In these alternative embodiments, generating a transaction record according to the accounting call parameter, writing the transaction record into a transaction table in the database server, and recording the transaction status in the transaction table has the advantages of: when the updating processing of the account data of the multi-account node of each accounting calling parameter is carried out, the monitoring of accounting processing in the transaction process can be realized by generating the corresponding transaction record and marking the corresponding transaction state, so that the transaction with incomplete accounting can be monitored conveniently, and the situations that the transaction is successful but the accounting is failed are avoided. Meanwhile, by generating and storing each transaction record, the subsequent inquiry of each transaction record is facilitated.
It is contemplated that after updating the account data of the account node that needs to be updated, corresponding account pipelining data may be generated to facilitate recording of each accounting process of the account node. Optionally, the application server is further configured to: after the account data of a plurality of account nodes in the account hierarchical structure stored in the database server are updated according to the accounting calling parameters, the account flow data of each account node is generated according to the updating operation of each account data, and the account flow data is written into the flow table of the database server.
The account flow data may include core fields such as an account code, the amount of the current transaction, the amount before the transaction, a transaction code, an account flow ID, an operation version, billing time, and an external account alias. Optionally, the account flow data may further include a product code, a user account number, a hierarchical account subject, and the like. The account running data can be stored in a running water meter of the database server, and before the account running data is inquired, account participation can be verified, such as whether an account exists or not, whether the account state is normal or not and the like; and after the verification is passed, inquiring the account running water data.
In one embodiment, a database transaction is started through a database server, account flow data of each account node is generated according to updating operation on each account data through the started database transaction, and the account flow data is written into a flow table of the database server.
In another embodiment, an account core processing layer may be deployed in the application server, and the account core processing layer performs the steps of generating account pipelining data of each account node according to an update operation on each account data, and writing the account pipelining data into a pipelining table of the database server.
In these alternative embodiments, the advantage of generating the account flow data of each account node according to the update operation on each account data, and writing the account flow data into the flow meter of the database server is that: through recording the accounting processing of the account nodes each time, the follow-up inquiry of the running data of each account is facilitated.
The embodiment also provides a preferred application server, and the application server comprises a data verification layer, a billing model processing layer, a billing order processing layer and an account core processing layer. Illustratively, as shown in fig. 2, there is shown a schematic diagram of an application server deployed with a data verification layer, a billing model processing layer, a billing order processing layer, and an account core processing layer.
Wherein the data check layer is configured to: and verifying whether the account levels in the accounting calling parameters are matched, whether the account nodes needing to be updated exist and whether the updating mode information of the account nodes in the accounting calling parameters meets the rules according to the configuration data.
The accounting model processing layer is used for: before updating the account data of a plurality of account nodes in the account hierarchical structure stored in the database server according to the accounting calling parameters, if any account node needing to be updated does not exist in the account hierarchical structure, determining whether a new account can be automatically created according to the configuration data, and if so, adding any account node needing to be updated in the account hierarchical structure.
And a billing order processing layer: the system comprises a database server, a transaction table and a data processing module, wherein the database server is used for storing account data of a plurality of account nodes in an account hierarchical structure stored in the database server according to an accounting calling parameter, generating a transaction record according to the accounting calling parameter before updating the account data of the plurality of account nodes in the account hierarchical structure stored in the database server according to the accounting calling parameter, writing the transaction record into the transaction table of the database server, and recording a transaction state in the transaction table as processing; and after updating the account data of the plurality of account nodes, marking the transaction state in the transaction table as successful.
The account core processing layer is used for: updating the account data of a plurality of account nodes in the account hierarchical structure stored in the database server according to the accounting calling parameters; and generating the account flow data of each account node according to the updating operation of each account data, and writing the account flow data into the flow table of the database server.
EXAMPLE III
On the basis of the foregoing embodiments, in this embodiment, optionally, the application server is further configured to: and when an offset request from the service side server is received, performing rollback operation according to the update operation of the historical account data executed by the offset request.
Wherein explanations of the same or corresponding terms as those of the above embodiments are omitted. The data processing system provided by the embodiment comprises:
the service party server is used for generating an accounting calling parameter according to the current transaction record and sending an accounting interface calling request carrying a service party identifier and the accounting calling parameter to an application server corresponding to the current service party; the accounting calling parameters comprise identification information and updating mode information corresponding to each account node needing to be updated;
the application server is used for receiving the bookkeeping interface calling request, determining a database server corresponding to the business party identifier from the database cluster, reading the configuration data of the account hierarchical structure corresponding to the business party identifier from the database server, verifying the bookkeeping calling parameters according to the configuration data, and updating the account data of a plurality of account nodes in the account hierarchical structure stored in the database server according to the bookkeeping calling parameters after the verification is passed; when an offset request from a service side server is received, performing rollback operation on the historically executed update operation of the account data according to the offset request;
and the database server is used for storing the account data of each account node in the account hierarchy structure.
The offset request can be sent by the service side server and used for offsetting the original billing request. Optionally, the reimbursement request includes an original billing request number, an reimbursement request number, a billing amount, a reimbursement reason, and the like. The original accounting request number can be an original accounting number which needs to be subjected to balance cancellation. It should be noted that, the cancellation request can be performed according to the cancellation request to perform rollback operation on the historically executed update operation of the account data on the premise of ensuring the success of the original accounting,
illustratively, the rollback operation is performed according to the update operation of the reimbursement request on the account data executed in the history, and includes: and determining each account node updated in the historically executed updating operation of the account data, and gradually carrying out deduction accounting processing from the root account node in each determined account node to the leaf account node. Optionally, the step-by-step deduction accounting processing includes: and taking reverse accounting operation for the hierarchical account subjects of the account nodes. It should be noted that, when performing reverse accounting operation on a level account, some level account accounts which are configured with values other than the amplitude value in advance may be verified, and if the amount is a negative value, an error prompt indicating that the amount of the level account is insufficient needs to be returned.
In an embodiment, in the process of gradually performing the deduction accounting processing from the root account node to the leaf account node in the determined account nodes, corresponding account pipelining data operated in the reverse direction may also be generated.
Taking fig. 3 as an example, an interaction process diagram of the offset processing between the service server and the application server is shown. Specifically, the service side server sorts the cancellation data according to the transaction cancellation processing, generates a cancellation request and sends the cancellation request to the application server, and the application server calls the cancellation service to perform rollback operation according to the cancellation request.
In the data processing system of this embodiment, when receiving the cancellation request from the service server, the application server performs a rollback operation on the update operation of the account data that is historically executed according to the cancellation request, so that the cancellation processing is executed by the application server that is independently deployed, and is completely decoupled from the service server, thereby relieving the pressure of the service server. Moreover, the business side server can complete the cancellation operation of each level node through one-time interface calling without calling a plurality of services to respectively cancel, thereby improving the processing efficiency and the resource utilization rate of transaction cancellation.
Example four
On the basis of the foregoing embodiments, in this embodiment, optionally, the application server is further configured to: when a balance inquiry request from a service side server is received, determining a target account level needing to be inquired according to the balance inquiry request; and inquiring the account data of the account node of the target account level in the account level structure from the database server, and returning an inquiry result to the service side server.
Wherein explanations of the same or corresponding terms as those of the above embodiments are omitted. The data processing system provided by the embodiment comprises:
the business side server is used for generating an accounting calling parameter according to the current transaction record and sending an accounting interface calling request carrying a business side identifier and the accounting calling parameter to the application server corresponding to the current business side; the accounting calling parameters comprise identification information and updating mode information corresponding to each account node needing to be updated;
the application server is used for receiving the bookkeeping interface calling request, determining a database server corresponding to the business party identifier from the database cluster, reading the configuration data of the account hierarchical structure corresponding to the business party identifier from the database server, verifying the bookkeeping calling parameters according to the configuration data, and updating the account data of a plurality of account nodes in the account hierarchical structure stored in the database server according to the bookkeeping calling parameters after the verification is passed; when a balance inquiry request from a service side server is received, determining a target account level needing to be inquired according to the balance inquiry request; inquiring account data of an account node of a target account level in an account level structure from a database server, and returning an inquiry result to a service side server;
and the database server is used for storing the account data of each account node in the account hierarchy structure.
The balance inquiry request may be a request sent by the service side server and used for inquiring account data of the account node. Optionally, the balance inquiry request includes an account number; correspondingly, determining the target account level to be queried according to the balance query request comprises the following steps: and determining the target account level needing to be inquired according to the account number in the balance inquiry request. It should be noted that the number of the determined target account levels may be one or multiple, that is, the account data of the account nodes of one or more account levels may be queried at a time. And after determining the target account level needing to be inquired, inquiring account data of account nodes of the target account level in the account level structure from the database server.
Optionally, the balance inquiry request may further include a hierarchical account subject; and when the application server receives the balance inquiry request, inquiring account data of the hierarchy account subject of the account node of the target account hierarchy in the account hierarchy structure from the database server according to the account number and the hierarchy account subject.
Taking fig. 4 as an example, an interaction process diagram of the business side server and the application server for balance inquiry processing is shown. Specifically, the business side server generates balance inquiry requests of accounts of different levels according to actual needs and sends the balance inquiry requests to the application server, the application server calls a balance inquiry service to inquire account data of account nodes from the database server according to the balance inquiry requests, and returns inquiry results to the business side server.
In the data processing system of the embodiment, when the application server receives a balance inquiry request from the service side server, the application server determines a target account level to be inquired according to the balance inquiry request; the account data of the account node of the target account level in the account level structure is inquired from the database server, and the inquiry result is returned to the service side server, so that the balance inquiry is executed by the independently deployed application server and is completely decoupled from the service side server, and further the pressure of the service side server is relieved. In addition, the business side server can complete the balance inquiry operation of each level node through one-time interface calling without calling a plurality of services to respectively inquire the balance, thereby improving the processing efficiency and the resource utilization rate of the balance inquiry. Meanwhile, account balances of different levels can be flexibly inquired.
EXAMPLE five
On the basis of the foregoing embodiments, in this embodiment, optionally, the application server is further configured to: when an account pipelining query request from a service side server is received, determining a target account level needing to be queried according to the account pipelining query request; and inquiring the account flow data of the account node of the target account level in the account level structure from the database server, and returning an inquiry result to the service side server.
Wherein explanations of the same or corresponding terms as those of the above embodiments are omitted. The data processing system provided by the embodiment comprises:
the service party server is used for generating an accounting calling parameter according to the current transaction record and sending an accounting interface calling request carrying a service party identifier and the accounting calling parameter to an application server corresponding to the current service party; the accounting calling parameters comprise identification information and updating mode information corresponding to each account node needing to be updated;
the application server is used for receiving the accounting interface calling request, determining a database server corresponding to the business party identifier from the database cluster, reading configuration data of an account hierarchical structure corresponding to the business party identifier from the database server, verifying accounting calling parameters according to the configuration data, and updating the account data of a plurality of account nodes in the account hierarchical structure stored in the database server according to the accounting calling parameters after the accounting calling parameters pass the verification; when an account flow query request from a service side server is received, determining a target account level to be queried according to the account flow query request; inquiring account flow data of an account node of a target account level in an account level structure from a database server, and returning an inquiry result to a service side server;
and the database server is used for storing the account data of each account node in the account hierarchical structure.
The account pipelining query request may be a request sent by the service side server to query the banker pipelining data. The account flow data may include core fields such as account code, amount of this transaction, amount before transaction, transaction code, account flow ID, operation version, billing time, external account alias, etc. Optionally, the account flow data may further include a product code, a user account number, a hierarchical account subject, and the like.
In another embodiment, the account pipelining query request may be used to: and inquiring the account flow data of a certain account, or inquiring the account flow data of a root account node, and the like.
Specifically, the account flow query request may include an account number; correspondingly, the step of determining the target account level needing to be inquired according to the account pipelining inquiry request comprises the following steps: and determining the target account level needing to be inquired according to the account number in the account flow inquiry request. It should be noted that the number of the determined target account levels may be one or multiple, that is, the account pipelining data of the account nodes of one or more account levels may be queried at a time. And after the target account level needing to be inquired is determined, inquiring account flow data of account nodes of the target account level in the account level structure from the database server.
In one embodiment, the account pipelining data for each account node is stored in a pipelining table of the database server; accordingly, querying the database server for account pipelining data for account nodes of a target account level in the account hierarchy includes: and inquiring account flow data of account nodes of a target account level in the account level structure from the flow meter of the database server.
Optionally, querying, from the database server, account flow data of account nodes of a target account hierarchy in the account hierarchy, includes: and verifying the parameters in the account flow query request, and if the parameters pass the verification, querying the account flow data of the account nodes of the target account level in the account level structure from the database server. The verifying the parameters in the account pipelined query request may include at least one of the following: and verifying whether the account exists or not and whether the account state is normal or not.
Taking fig. 5 as an example, a schematic diagram of an interaction process of the business side server and the application server performing the account pipelining query processing is shown. Specifically, the service side server generates an account flow query request according to actual needs and sends the account flow query request to the application server, the application server calls an account flow query service to determine a target account level to be queried, queries account flow data of an account node from the database server, and returns a query result to the service side server.
In the data processing system of the embodiment, when the application server receives an account flow query request from the service server, a target account level to be queried is determined according to the account flow query request; and inquiring the account flow data of the account node of the target account level in the account level structure from the database server, and returning an inquiry result to the service side server, so that the account flow inquiry request is executed by an independently deployed application server and is completely decoupled from the service side server, and further the pressure of the service side server is relieved. Moreover, the business side server can complete the account flow inquiry operation of each level node through one-time interface calling without calling a plurality of services to respectively inquire, thereby improving the processing efficiency and the resource utilization rate of the account flow inquiry. Meanwhile, account flow data of different levels can be flexibly inquired.
Optionally, the data processing system further includes a cache server, configured to cache hot spot data in the database server, where the hot spot data is data whose queried frequency is higher than a set threshold within a preset time period.
Such as the caching server shown in fig. 1D, may be used to cache hotspot data in a database server. The hotspot data may be account data of an account node, account pipelining data, or the like. In one embodiment, whether to enable the cache server may be configured according to the access amount of the database server. Illustratively, when the business side server sends an account flow query request to the application server for multiple times, the cache server is started to cache the account flow data into the cache server so as to query corresponding data in the cache server, and then query efficiency is improved. Illustratively, the cache server may be a redis server.
In one embodiment, after the cache server is started, if an account running query request or a balance query request received by an application server is a first request, querying is performed from a database server, and a query result is cached to the cache server, and meanwhile, when cached data is changed, cached data in the cache server needs to be updated; when the application server receives a non-first account flow query request or a balance query request, corresponding data can be queried from the cache server.
In this alternative embodiment, the caching server is configured to: by setting the cache server and caching the hot spot data in the cache server, the access amount of the database server is reduced, and the query efficiency is improved.
EXAMPLE six
On the basis of the foregoing embodiments, in this embodiment, optionally, the application server is further configured to: receiving input configuration data of an account hierarchical structure, and storing the configuration data into a database server; wherein the configuration data comprises: at least one of home configuration data, account set configuration data, business account configuration data, node configuration data, model configuration data, accounting unit configuration data, accounting item configuration data, summary configuration data, transaction configuration data, and transaction accounting configuration data.
Wherein explanations of the same or corresponding terms as those of the above embodiments are omitted. The data processing system provided by the embodiment comprises:
the service party server is used for generating an accounting calling parameter according to the current transaction record and sending an accounting interface calling request carrying a service party identifier and the accounting calling parameter to an application server corresponding to the current service party; the accounting calling parameters comprise identification information and updating mode information corresponding to each account node needing to be updated;
the application server is used for receiving the input configuration data of the account hierarchical structure and storing the configuration data into the database server; wherein the configuration data comprises: at least one of home party configuration data, account set configuration data, business subject configuration data, node configuration data, model configuration data, accounting unit configuration data, accounting item configuration data, summary configuration data, transaction configuration data, and transaction accounting configuration data; receiving an accounting interface calling request, determining a database server corresponding to a business party identifier from a database cluster, reading configuration data of an account hierarchical structure corresponding to the business party identifier from the database server, verifying accounting calling parameters according to the configuration data, and updating account data of a plurality of account nodes in the account hierarchical structure stored in the database server according to the accounting calling parameters after the verification is passed;
and the database server is used for storing the account data of each account node in the account hierarchy structure.
The home party configuration may be to configure a service party, such as a service a, a service c, a service b, and the like. The account set configuration may be the configuration of the asset type of the accounting, such as capital account, share account, red pack, points, etc. The business subject configuration may be the configuration of business subjects, such as total amount, available amount, frozen amount, etc. The node configuration may be to configure each account node, such as a personal account, a product account, and the like. The model configuration may be a configuration of a tree hierarchy between account nodes, as shown in fig. 1B-1C.
The configuration of the accounting unit can be the configuration of the minimum unit participating in accounting, and the accounting unit can be the minimum accounting unit participating in accounting and consists of an account node and a business subject. As shown in fig. 6A, a schematic diagram of the configuration of the accounting unit and the configuration of the accounting items is shown, and the accounting unit can be a personal account-asset amount, or a personal account-available amount. The configuration of the accounting project can be the configuration of the project directly participating in accounting, and it should be noted that the accounting project needs to be a leaf account node. For example, in fig. 6A, if the product account node is a leaf account node in the first service, the accounting item is a product account-asset amount, or a product account-available amount.
The aggregation configuration may be to configure an aggregation policy of account data of each account node. As shown in fig. 6B, a schematic diagram of a summarization configuration is shown, and since the leaf account node (the third-level account node) directly participates in billing, the second-level account node and the root account node may perform automatic summarization processing through a summarization policy. For example, the summarizing policy may be an asynchronous summarizing manner, as shown in fig. 6C, a summarizing configuration sample diagram is shown, and for some scenes where service accounts have multiple hierarchies and a number of layers summarized upwards, asynchronous summarizing manner configuration may be performed, so as to reduce the problem of processing time for synchronous summarizing.
The transaction configuration may be to configure the transaction type; such as a transfer amount, a transfer-out amount, a frozen amount, etc. The transaction accounting configuration can be the configuration of the change operator and/or the amount limit information of the accounting item needing to be operated corresponding to each transaction type, such as adding, subtracting, being greater than zero, being less than zero, fixing any value, and the like.
In one embodiment, the home party configuration data, the account set configuration data, the business account configuration data, the node configuration data, the model configuration data, and the accounting unit configuration data may constitute basic accounting configuration data, as shown in fig. 6D, which illustrates a basic accounting configuration diagram. For example, fig. 6E shows a schematic diagram of a basic configuration sample of account, taking a business a as an example, the subjects include total amount, available amount, blocked amount, and accumulated profit, and the account level is 2; the number of the corresponding models of the layer 1 is 1, namely, the A business + the total amount, or the available amount, the frozen amount and the accumulated income; the model corresponding to the layer 2 comprises 2 models, wherein the model 1 can be the first business + the product + the total amount, or the available amount, the frozen amount and the accumulated profit, and the model 2 can be the first business + the frozen pool + the product + the total amount, or the available amount, the frozen amount and the accumulated profit.
In one embodiment, the configuration data further includes a transaction code configuration. Optionally, the billing item configuration data, the summary configuration data, the transaction billing configuration data, and the transaction code configuration data may form basic transaction configuration data, as shown in fig. 6F, which illustrates a basic transaction configuration diagram. For example, fig. 6G shows a schematic diagram of a basic configuration example of an accounting, taking a business a as an example, accounting items are bottom sub-nodes of a tree structure that only allows transaction operations, that is, total amount of product account, and the like; the summary configuration comprises child nodes allowing transaction operations and parent nodes for automatic summary; if the transaction code is configured for transfer, the transaction accounting configuration includes transfer, product available +, total product +.
In a preferred embodiment, the configuration data includes home party configuration data, ledger configuration data, business account configuration data, node configuration data, model configuration data, accounting unit configuration data, accounting item configuration data, summary configuration data, transaction configuration data, and transaction accounting configuration data. As shown in fig. 6H, a configuration data is presented.
Optionally, the configuration data may be data configured by an operator of the application server according to requirements of the service party. Illustratively, as shown in fig. 6I, a schematic diagram of an access process of a data processing system is shown. Specifically, the business party sorts out subjects, account levels, corresponding transaction scenes and the like which need to be booked according to product requirements, and sends the subjects, the account levels, the corresponding transaction scenes and the like to an operator of the application server, so that the operator of the application server performs corresponding configuration (generates configuration data), performs online verification according to a test sample provided by the business party, feeds back verification results and the configuration data to the business party, and the business party can call interfaces such as account opening, bookkeeping, reimbursement, inquiry and the like in a follow-up mode and then goes online. The account opening process can refer to fig. 6J, and fig. 6J shows an account opening process schematic diagram.
In the data processing system of this embodiment, the application server is further configured to receive input configuration data of the account hierarchy structure, and store the configuration data in the database server; wherein the configuration data comprises: at least one item of attribution party configuration data, account set configuration data, business subject configuration data, node configuration data, model configuration data, accounting unit configuration data, accounting project configuration data, summary configuration data, transaction configuration data and transaction accounting configuration data is realized, flexible configuration of account levels, accounting subjects, account nodes and the like is realized, and rapid expansion of business is facilitated.
EXAMPLE seven
Fig. 7 is a flowchart of a data processing method according to a seventh embodiment of the present invention, where this embodiment is applicable to a case where an accounting process is performed on a current transaction record, and is particularly applicable to a case where a service server sends an accounting interface call request to an independently deployed application server to enable the application server to perform an accounting process on the current transaction record, where the method may be performed by the application server. As shown in fig. 7, the method specifically includes the following steps:
s710, receiving an accounting interface calling request which is sent by a service party server and carries a service party identifier and an accounting calling parameter; the service side server generates the accounting calling parameters according to the current transaction record, and the accounting calling parameters comprise identification information and updating mode information corresponding to each account node needing to be updated.
S720, determining a database server corresponding to the business party identification from the database cluster, and reading configuration data of an account hierarchical structure corresponding to the business party identification from the database server.
S730, verifying the accounting calling parameters according to the configuration data, and updating the account data of the plurality of account nodes in the account hierarchical structure stored in the database server according to the accounting calling parameters after the accounting calling parameters pass the verification; the database server is used for storing account data of each account node in the account hierarchy.
Optionally, updating the account data of the plurality of account nodes in the account hierarchy stored in the database server according to the accounting call parameter includes: traversing the account nodes of each level in the account level structure according to the sequence from the root account node to the leaf account node if the synchronous accounting mode is determined to be adopted according to the transaction codes in the accounting calling parameters; for the traversed account nodes needing to be updated, determining a data table for recording account data of the account nodes according to account codes of the account nodes, and updating the account data of the account nodes recorded in the data table according to the updating mode information of the account nodes; and sending an accounting completion notification message to the service side server after the updating is completed.
Optionally, updating the account data of the plurality of account nodes in the account hierarchy stored in the database server according to the accounting call parameter includes: if an asynchronous accounting mode is determined to be adopted according to the transaction codes in the accounting calling parameters, leaf account nodes needing to be updated in the account hierarchical structure are determined according to the accounting calling parameters, a data table used for recording account data of the leaf account nodes is determined according to account codes of the leaf account nodes, the account data of the leaf account nodes recorded in the data table are updated according to the updating mode information of the leaf account nodes, and an accounting completion notification message is sent to the service party server after the updating is completed; and starting an asynchronous accounting thread, and updating the account data of other account nodes except the leaf account nodes needing to be updated in the account hierarchical structure through the asynchronous accounting thread.
Optionally, the updating, by the asynchronous accounting thread, the account data of other account nodes, except for the leaf account node, in the account hierarchy that need to be updated includes: creating an asynchronous billing task, and sending task information of the asynchronous billing task to a preset message queue MQ; and reading the task information from the MQ through the started asynchronous accounting thread, and executing an asynchronous accounting task according to the task information so as to update the account data of other account nodes except the leaf account nodes which need to be updated in the account hierarchical structure.
Optionally, verifying the billing invocation parameter according to the configuration data includes: and verifying whether the account levels in the accounting calling parameters are matched, whether the account nodes needing to be updated exist and whether the updating mode information of the account nodes in the accounting calling parameters meets the rules according to the configuration data.
Optionally, before updating the account data of the plurality of account nodes in the account hierarchy stored in the database server according to the accounting call parameter, the method further includes: and if any account node needing to be updated and included in the accounting call parameter does not exist in the account hierarchical structure, determining whether a new account can be automatically created or not according to the configuration data, and if so, adding any account node needing to be updated in the account hierarchical structure.
Optionally, before updating the account data of the plurality of account nodes in the account hierarchy stored in the database server according to the accounting call parameter, the method further includes: generating a transaction record according to the accounting calling parameter, writing the transaction record into a transaction table of the database server, and recording the transaction state in the transaction table as processing; and after updating the account data of the plurality of account nodes, marking the transaction state in the transaction table as successful.
Optionally, after updating the account data of the plurality of account nodes in the account hierarchy stored in the database server according to the accounting call parameter, the method further includes: and generating the account flow data of each account node according to the updating operation of each account data, and writing the account flow data into the flow table of the database server.
Optionally, the method further includes: and when an offset request from the service side server is received, performing rollback operation according to the update operation of the historical account data executed by the offset request.
Optionally, the method further includes: when a balance inquiry request from a service side server is received, determining a target account level needing to be inquired according to the balance inquiry request; and inquiring the account data of the account node of the target account level in the account level structure from the database server, and returning an inquiry result to the service side server.
Optionally, the method further includes: when an account pipelining query request from a service side server is received, determining a target account level needing to be queried according to the account pipelining query request; and inquiring the account flow data of the account node of the target account level in the account level structure from the database server, and returning an inquiry result to the service side server.
Optionally, the method further includes: when a balance inquiry request from a service side server is received, determining a target account level needing to be inquired according to the balance inquiry request; inquiring account data of an account node of a target account level in the account level structure from the cache server, and returning an inquiry result to the service side server; the cache server is used for caching hotspot data in the database server, the hotspot data refers to data with the queried frequency higher than a set threshold value within a preset time period, and the hotspot data comprises account data of each account node.
Optionally, the method further includes: when an account pipelining query request from a service side server is received, determining a target account level needing to be queried according to the account pipelining query request; inquiring account flow data of an account node of a target account level in an account level structure from a cache server, and returning an inquiry result to a service side server; the cache server is used for caching hotspot data in the database server, the hotspot data refer to data with the queried frequency higher than a set threshold value within a preset time period, and the hotspot data comprise account flow data of account nodes.
Optionally, the method further includes: receiving input account hierarchy configuration data, and storing the configuration data in the database server; wherein the configuration data comprises: at least one of home configuration data, account set configuration data, business account configuration data, node configuration data, model configuration data, accounting unit configuration data, accounting item configuration data, summary configuration data, transaction configuration data, and transaction accounting configuration data.
According to the technical scheme, when the accounting interface calling request is received, the application server determines the database server corresponding to the business party identifier from the database cluster, so that the configuration data of the account hierarchical structure corresponding to the business party identifier is read from the database server, verification processing is performed, and the account data of the multiple accounting nodes are updated, so that the accounting operation is executed by the independently deployed application server and is completely decoupled from the business party server, and further the pressure of the business party server is relieved. Moreover, the service side server can complete the accounting operation of each level node through one-time interface calling without calling a plurality of services for accounting respectively, thereby improving the processing efficiency and the resource utilization rate of transaction accounting.
Example eight
Fig. 8 is a schematic structural diagram of a data processing apparatus according to an eighth embodiment of the present invention, where this embodiment is applicable to a case where an accounting process is performed on a current transaction record, and is particularly applicable to a case where a service server sends an accounting interface call request to an independently deployed application server to enable the application server to perform an accounting process on the current transaction record, where the apparatus specifically includes: a request receiving module 810, a configuration reading module 820, and a data updating module 830.
A request receiving module 810, configured to receive an accounting interface call request carrying a service party identifier and an accounting call parameter and sent by a service party server; the service side server generates accounting calling parameters according to the current transaction record, wherein the accounting calling parameters comprise identification information corresponding to each account node needing to be updated and updating mode information;
a configuration reading module 820, configured to determine a database server corresponding to the service party identifier from the database cluster, and read configuration data of an account hierarchical structure corresponding to the service party identifier from the database server;
the data updating module 830 is configured to verify the accounting call parameter according to the configuration data, and update the account data of the plurality of account nodes in the account hierarchy stored in the database server according to the accounting call parameter after the verification is passed; the database server is used for storing account data of each account node in the account hierarchy.
Optionally, the data updating module 830 includes a verifying unit configured to verify the accounting call parameter according to the configuration data, and an updating unit configured to update the account data of the plurality of account nodes in the account hierarchy stored in the database server according to the accounting call parameter after the verification is passed.
Optionally, the updating unit includes a synchronous updating subunit, where the synchronous updating subunit is configured to traverse account nodes of each level in the account level structure according to an order from the root account node to the leaf account node if it is determined that a synchronous accounting mode is adopted according to the transaction code in the accounting call parameter; for the traversed account nodes needing to be updated, determining a data table for recording account data of the account nodes according to account codes of the account nodes, and updating the account data of the account nodes recorded in the data table according to updating mode information of the account nodes; and sending an accounting completion notification message to the service side server after the updating is completed.
Optionally, the updating unit includes an asynchronous updating subunit, where the asynchronous updating subunit is configured to determine, if an asynchronous accounting mode is determined to be used according to the transaction code in the accounting call parameter, a leaf account node that needs to be updated in the account hierarchy structure according to the accounting call parameter, determine, according to an account code of the leaf account node, a data table for recording account data of the leaf account node, update, according to update mode information of the leaf account node, the account data of the leaf account node recorded in the data table, and send an accounting completion notification message to the service provider server after the update is completed; and starting an asynchronous accounting thread, and updating the account data of other account nodes except the leaf account nodes needing to be updated in the account hierarchical structure through the asynchronous accounting thread.
Optionally, the asynchronous update subunit is specifically configured to create an asynchronous accounting task, and send task information of the asynchronous accounting task to the preset message queue MQ; and reading the task information from the MQ through the opened asynchronous billing thread, and executing an asynchronous billing task according to the task information so as to update the account data of other account nodes except the leaf account node which need to be updated in the account hierarchical structure.
Optionally, the verifying unit is specifically configured to verify, according to the configuration data, at least one of whether the account levels in the accounting call parameters are matched, whether an account node that needs to be updated exists, and whether the update mode information of the account node in the accounting call parameters meets the rule.
Optionally, the data updating module 830 further includes a node adding unit, configured to determine whether a new account can be automatically created according to the configuration data if there is no account node that needs to be updated and is included in the accounting call parameter in the account hierarchical structure, and if yes, add any account node that needs to be updated in the account hierarchical structure.
Optionally, the data updating module 830 further includes a transaction record generating unit, configured to generate a transaction record according to the accounting call parameter, write the transaction record into a transaction table of the database server, and record the transaction status in the transaction table as processing; and after updating the account data of the plurality of account nodes, marking the transaction state in the transaction table as successful.
Optionally, the data updating module 830 further includes a flow generation unit, configured to generate account flow data of each account node according to an updating operation on each account data, and write the account flow data into a flow table of the database server.
Optionally, the data processing apparatus further includes a data cancellation module, configured to perform a rollback operation according to an update operation performed on the account data by the cancellation request when the cancellation request is received from the service server.
Optionally, the data processing apparatus further includes a balance inquiry module, configured to determine, when receiving a balance inquiry request from the service provider server, a target account level to be inquired according to the balance inquiry request; and inquiring the account data of the account node of the target account level in the account level structure from the database server, and returning an inquiry result to the service side server.
Optionally, the data processing apparatus further includes a pipelined query module, configured to determine, when receiving an account pipelined query request from the service server, a target account level to be queried according to the account pipelined query request; and inquiring the account flow data of the account node of the target account level in the account level structure from the database server, and returning an inquiry result to the service side server.
Optionally, the balance inquiry module further includes a cache database inquiry unit, configured to determine, when receiving a balance inquiry request from the service side server, a target account level to be inquired according to the balance inquiry request; inquiring account data of an account node of a target account level in an account level structure from a cache server, and returning an inquiry result to a service side server; the cache server is used for caching hotspot data in the database server, the hotspot data refers to data with the queried frequency higher than a set threshold value within a preset time period, and the hotspot data comprises account data of each account node.
Optionally, the flow query module further includes a cache database query unit, configured to determine, when receiving an account flow query request from the service server, a target account level to be queried according to the account flow query request; inquiring account flow data of an account node of a target account level in an account level structure from the cache server, and returning an inquiry result to the service side server; the cache server is used for caching hotspot data in the database server, the hotspot data refer to data with the queried frequency higher than a set threshold value within a preset time period, and the hotspot data comprise account flow data of account nodes.
Optionally, the data processing apparatus further includes a configuration receiving module, configured to receive input configuration data of the account hierarchy, and store the configuration data in the database server; wherein the configuration data comprises: at least one of a home configuration data, an account set configuration data, a business account configuration data, a node configuration data, a model configuration data, an accounting unit configuration data, an accounting project configuration data, a summary configuration data, a transaction configuration data, and a transaction accounting configuration data.
In this embodiment, the business side server sends the accounting interface call request to the application server corresponding to the current business side, so that when the application server receives the accounting interface call request, the database server corresponding to the business side identifier is determined from the database cluster, the configuration data of the account hierarchy structure corresponding to the business side identifier is read from the database server, verification processing is performed, and the account data of the multiple accounting nodes is updated, thereby realizing that the accounting operation is executed by the application server deployed independently, and is completely decoupled from the business side server, and further relieving the pressure of the business side server. Moreover, the service side server can complete the accounting operation of each level node through one-time interface calling without calling a plurality of services for accounting respectively, thereby improving the processing efficiency and the resource utilization rate of transaction accounting. The data processing device provided by the embodiment of the invention can execute the data processing method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the system are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
Example nine
Fig. 9 is a schematic structural diagram of an electronic device according to a ninth embodiment of the present invention. FIG. 9 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention. Device 12 is typically an electronic device that assumes accounting processing functions.
As shown in fig. 9, electronic device 12 is embodied in the form of a general purpose computing device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 that couples the various components (including the memory 28 and the processing unit 16).
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer-readable media. Such media may be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer device readable media in the form of volatile Memory, such as Random Access Memory (RAM) 30 and/or cache Memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only, the storage device 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 9, commonly referred to as a "hard drive"). Although not shown in FIG. 9, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk-Read Only Memory (CD-ROM), a Digital Video disk (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product 40, with program product 40 having a set of program modules 42 configured to carry out the functions of embodiments of the invention. Program product 40 may be stored, for example, in memory 28, and such program modules 42 include, but are not limited to, one or more application programs, other program modules, and program data, each of which examples or some combination may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, mouse, camera, etc., and display), one or more devices that enable a user to interact with electronic device 12, and/or any devices (e.g., network card, modem, etc.) that enable electronic device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), and/or a public Network such as the internet) via the Network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, Redundant processing units, external disk drive Arrays, disk array (RAID) devices, tape drives, and data backup storage devices, to name a few.
The processor 16 executes various functional applications and data processing by executing programs stored in the memory 28, for example, implementing the data processing method provided by the above-described embodiment of the present invention, including:
receiving an accounting interface calling request which is sent by a service party server and carries a service party identifier and an accounting calling parameter; the service side server generates accounting calling parameters according to the current transaction record, wherein the accounting calling parameters comprise identification information and updating mode information corresponding to each account node needing to be updated;
determining a database server corresponding to the business party identifier from a database cluster, and reading configuration data of an account hierarchical structure corresponding to the business party identifier from the database server;
verifying the accounting calling parameters according to the configuration data, and updating the account data of the plurality of account nodes in the account hierarchical structure stored in the database server according to the accounting calling parameters after the accounting calling parameters pass the verification; the database server is used for storing account data of each account node in the account hierarchy.
Of course, those skilled in the art can understand that the processor can also implement the technical solution of the data processing method provided by any embodiment of the present invention.
Example ten
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the data processing method provided in any embodiment of the present invention, where the method includes:
receiving an accounting interface calling request which is sent by a service party server and carries a service party identifier and an accounting calling parameter; the service side server generates accounting calling parameters according to the current transaction record, wherein the accounting calling parameters comprise identification information and updating mode information corresponding to each account node needing to be updated;
determining a database server corresponding to the business party identifier from a database cluster, and reading configuration data of an account hierarchical structure corresponding to the business party identifier from the database server;
verifying the accounting calling parameters according to the configuration data, and updating the account data of the plurality of account nodes in the account hierarchical structure stored in the database server according to the accounting calling parameters after the accounting calling parameters pass the verification; the database server is used for storing account data of each account node in the account hierarchy.
Computer storage media for embodiments of the present invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (15)

1. A data processing system, comprising:
the business side server is used for generating an accounting calling parameter according to the current transaction record and sending an accounting interface calling request carrying a business side identifier and the accounting calling parameter to an application server corresponding to the current business side; the accounting calling parameters comprise identification information and updating mode information corresponding to each account node needing to be updated;
the application server is used for receiving the accounting interface calling request, determining a database server corresponding to the business party identifier from a database cluster, reading configuration data of an account hierarchical structure corresponding to the business party identifier from the database server, verifying the accounting calling parameters according to the configuration data, and updating the account data of a plurality of account nodes in the account hierarchical structure stored in the database server according to the accounting calling parameters after the verification is passed;
and the database server is used for storing the account data of each account node in the account hierarchy structure.
2. The system of claim 1, wherein updating the account data stored in the database server for the plurality of account nodes in the account hierarchy according to the billing invocation parameter comprises:
traversing the account nodes of each level in the account hierarchical structure according to the sequence from the root account node to the leaf account node if a synchronous accounting mode is determined to be adopted according to the transaction codes in the accounting calling parameters;
for the traversed account nodes needing to be updated, determining a data table for recording account data of the account nodes according to account codes of the account nodes, and updating the account data of the account nodes recorded in the data table according to updating mode information of the account nodes;
and after the updating is completed, sending an accounting completion notification message to the service side server.
3. The system of claim 1, wherein updating the account data stored in the database server for the plurality of account nodes in the account hierarchy according to the billing invocation parameter comprises:
if an asynchronous accounting mode is determined to be adopted according to the transaction codes in the accounting calling parameters, leaf account nodes needing to be updated in the account hierarchical structure are determined according to the accounting calling parameters, a data table used for recording account data of the leaf account nodes is determined according to account codes of the leaf account nodes, the account data of the leaf account nodes recorded in the data table are updated according to updating mode information of the leaf account nodes, and an accounting completion notification message is sent to the service party server after the updating is completed;
and starting an asynchronous accounting thread, and updating the account data of other account nodes except the leaf account nodes needing to be updated in the account hierarchical structure through the asynchronous accounting thread.
4. The system of claim 3, wherein updating, by the asynchronous accounting thread, account data of other account nodes in the account hierarchy that need to be updated except leaf account nodes comprises:
creating an asynchronous billing task, and sending task information of the asynchronous billing task to a preset message queue MQ;
and reading the task information from the MQ through the opened asynchronous accounting thread, and executing an asynchronous accounting task according to the task information so as to update the account data of other account nodes except leaf account nodes needing to be updated in the account hierarchical structure.
5. The system of claim 1, wherein validating the billing invocation parameters based on the configuration data comprises:
and verifying at least one of whether the account levels in the accounting calling parameters are matched, whether account nodes needing to be updated exist and whether the updating mode information of the account nodes in the accounting calling parameters meets rules according to the configuration data.
6. The system of claim 1, wherein the application server is further configured to: before updating the account data of the plurality of account nodes in the account hierarchical structure stored in the database server according to the accounting calling parameters, if any account node needing to be updated does not exist in the account hierarchical structure, determining whether a new account can be automatically created according to the configuration data, and if so, adding any account node needing to be updated in the account hierarchical structure.
7. The system of claim 1, wherein the application server is further configured to:
before updating the account data of a plurality of account nodes in the account hierarchical structure stored in the database server according to the accounting calling parameter, generating a transaction record according to the accounting calling parameter, writing the transaction record into a transaction table of the database server, and recording a transaction state as processing in the transaction table; and the number of the first and second groups,
and after updating the account data of the plurality of account nodes, marking the transaction state in the transaction table as successful.
8. The system of claim 1, wherein the application server is further configured to: after the account data of the plurality of account nodes in the account hierarchical structure stored in the database server are updated according to the accounting calling parameters, the account pipelining data of each account node is generated according to the updating operation of each account data, and the account pipelining data is written into the pipelining table of the database server.
9. The system of claim 1, wherein the application server is further configured to:
when a balance inquiry request from the service side server is received, determining a target account level needing to be inquired according to the balance inquiry request;
and inquiring the account data of the account node of the target account level in the account level structure from the database server, and returning an inquiry result to the business side server.
10. The system of claim 1, wherein the application server is further configured to:
when an account pipelining query request from the service side server is received, determining a target account level needing to be queried according to the account pipelining query request;
and inquiring the account pipelining data of the account node of the target account level in the account level structure from the database server, and returning an inquiry result to the business side server.
11. The system of any of claims 1-10, wherein the application server is further configured to:
receiving input account hierarchy configuration data, storing the configuration data in the database server;
wherein the configuration data comprises: at least one of home configuration data, account set configuration data, business account configuration data, node configuration data, model configuration data, accounting unit configuration data, accounting item configuration data, summary configuration data, transaction configuration data, and transaction accounting configuration data.
12. A data processing method, comprising:
receiving an accounting interface calling request which is sent by a service party server and carries a service party identifier and an accounting calling parameter; the service side server generates accounting calling parameters according to the current transaction record, wherein the accounting calling parameters comprise identification information and updating mode information corresponding to each account node needing to be updated;
determining a database server corresponding to the business party identifier from a database cluster, and reading configuration data of an account hierarchical structure corresponding to the business party identifier from the database server;
verifying the accounting calling parameters according to the configuration data, and updating the account data of the plurality of account nodes in the account hierarchical structure stored in the database server according to the accounting calling parameters after the accounting calling parameters pass the verification; the database server is used for storing account data of each account node in the account hierarchy.
13. A data processing apparatus, comprising:
the request receiving module is used for receiving an accounting interface calling request which is sent by the service party server and carries the service party identification and the accounting calling parameter; the service side server generates accounting calling parameters according to the current transaction record, wherein the accounting calling parameters comprise identification information and updating mode information corresponding to each account node needing to be updated;
the configuration reading module is used for determining a database server corresponding to the business party identifier from a database cluster and reading configuration data of an account hierarchical structure corresponding to the business party identifier from the database server;
the data updating module is used for verifying the accounting calling parameters according to the configuration data and updating the account data of the plurality of account nodes in the account hierarchical structure stored in the database server according to the accounting calling parameters after the accounting calling parameters pass the verification; the database server is used for storing account data of each account node in the account hierarchy.
14. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device to store one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the data processing method of claim 12.
15. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the data processing method of claim 12.
CN202110231028.6A 2021-03-02 2021-03-02 Data processing system, method, device, electronic equipment and storage medium Pending CN114996281A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110231028.6A CN114996281A (en) 2021-03-02 2021-03-02 Data processing system, method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110231028.6A CN114996281A (en) 2021-03-02 2021-03-02 Data processing system, method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114996281A true CN114996281A (en) 2022-09-02

Family

ID=83018047

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110231028.6A Pending CN114996281A (en) 2021-03-02 2021-03-02 Data processing system, method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114996281A (en)

Similar Documents

Publication Publication Date Title
US8577795B2 (en) System and method for revenue and authorization management
US8825798B1 (en) Business event tracking system
CN108509392B (en) Multi-mechanism account checking method, system, computer equipment and storage medium
US20180091583A1 (en) Multi-party updates to distributed systems
US8626612B2 (en) Consolidating leads into a lead group
CN106529953B (en) Method and device for risk identification of business attributes
CN111127181A (en) Voucher bookkeeping method and device
CN112651826B (en) Credit line management and control system, method and readable storage medium
WO2017133570A1 (en) Invoice title information change method and apparatus and invoice management system
CN112491900B (en) Abnormal node identification method, device, equipment and medium
CN112965986B (en) Service consistency processing method, device, equipment and storage medium
CN110991992B (en) Processing method and device of business process information, storage medium and electronic equipment
CN113760500A (en) Service processing method, device, server and medium
CN111833037A (en) Account management method and device
CN111127224B (en) Information processing method, information processing device, electronic equipment and storage medium
CN114996281A (en) Data processing system, method, device, electronic equipment and storage medium
CN114265633A (en) Application parameter configuration and query method of self-service equipment, equipment and storage medium
CN115640457A (en) Information management method, apparatus, device, medium, and program product
US11582345B2 (en) Context data management interface for contact center
US20210240516A1 (en) Distributed transaction management
CN114169887A (en) Reconciliation system based on distributed data nodes
CN110060128B (en) Data management method and system
US20100169198A1 (en) Billing a lister for leads received from potential renters within a lead threshold
CN113077241B (en) Approval processing method, device, equipment and storage medium
CN117271850B (en) User data matching method, platform, equipment and medium based on client data platform

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination