Method, apparatus, device, and computer-readable medium for processing service data
A distributed architecture with asynchronous processing separates transaction and accounting functions in banking systems, reducing failure risks and enhancing efficiency by allowing parallel data processing, thus addressing database locking issues and improving system performance.
Patent Information
- Application Number
- CN202210715420.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-23
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-06-23
AI Technical Summary
In the prior art, the binding of transactions and accounting causes database locking, resulting in high risk of failure in processing business data when the concurrency is huge, and the system development reusability is poor, making it difficult to meet the efficient and stable needs of the banking system.
Using distributed architecture and microservices, transaction information is recorded in accounting flow data through asynchronous processing methods of business components, computing engines and accounting components, and accounting conditions are obtained through the calculation engine. The accounting components asynchronously process the amount of accounting flow data, realizing the separation of transactions and accounting.
It reduces the risk of failure in processing business data, improves the processing speed and stability of the system, reduces system resource expenditure, simplifies system maintenance and parameter configuration, and complies with the management system of the banking department.
Smart Images

Figure CN114969082B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and in particular, to a method, apparatus, device, and computer-readable medium for processing business data. Background Art
[0002] With the country's strong promotion of inclusive finance, the market demand is increasing day by day, the product variety is becoming increasingly rich, and the personalized needs are changing with each passing day, which puts forward higher requirements for the functions and version cycles of the banking system. As the most core basic module of the banking system, the design of accounting is a key factor in whether the entire system architecture can be advanced and stable and whether the project can be fast and agile.
[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art: Since transactions are bound to accounting, a large amount of newly added data and updated data are inserted into the database, resulting in database locking. When the concurrency is extremely large, the blocking caused by the database increases the risk of failure in processing business data. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a method, apparatus, device, and computer-readable medium for processing business data, which can reduce the risk of business processing failure.
[0005] To achieve the above object, according to one aspect of the embodiments of the present invention, there is provided a method for processing business data, including:
[0006] Invoking a business component to record transaction information of the business data into accounting transaction data according to the business data and accounting type;
[0007] Sending, by the business component, the accounting type, the amount of the accounting transaction data, and the atomic action of the accounting transaction data to a computing engine in an asynchronous manner determined by the accounting transaction data;
[0008] The computing engine obtains accounting conditions in a database based on the accounting type, the atomic action of the accounting transaction data, and the type of the amount;
[0009] Invoking an accounting component to calculate the amount of the accounting transaction data based on the accounting conditions.
[0010] Before the step of invoking a business component to record transaction information of the business data into accounting transaction data according to the business data and accounting type, the method further includes:
[0011] Determining a product type of the business data by a business system to which the business data belongs;
[0012] The business system queries conditions of the accounting type in a database according to the product type.
[0013] The business system maps to obtain the accounting type according to the conditions of the product type to which the business data belongs and the accounting type.
[0014] The number of conditions of the accounting type is greater than 1.
[0015] After the business system maps to obtain the accounting type according to the conditions of the product type to which the business data belongs and the accounting type, it includes:
[0016] In response to a request to update the accounting type, update the accounting type according to the type parameter in the request to update the accounting type.
[0017] The sending of the accounting type, the amount of the accounting transaction data, and the atomic actions of the accounting transaction data to the computing engine asynchronously includes:
[0018] Send the accounting type, the amount of the accounting transaction data, and the atomic actions of the accounting transaction data to the computing engine asynchronously through a standard interface.
[0019] The accounting transaction data belongs to an online transaction, and the asynchronous method determined by the accounting transaction data includes a message queue.
[0020] After the accounting transaction data belongs to online transaction data and the sending using the message queue fails,
[0021] The method further includes:
[0022] Send the accounting type, the amount of the accounting transaction data, and the atomic actions of the accounting transaction data to the computing engine by means of asynchronously sending a file.
[0023] The accounting transaction data belongs to a batch transaction, and the asynchronous method determined by the accounting transaction data includes the method of asynchronously sending a file.
[0024] The accounting transaction data belongs to summary data, and the asynchronous method determined by the accounting transaction data includes a message queue.
[0025] The atomic actions include one or more of the following: transaction actions, interest actions, loan actions, institutional actions, and product actions.
[0026] The computing engine obtains accounting conditions in the database through the accounting type, the atomic actions of the accounting transaction data, and the type of the amount, including:
[0027] The computing engine queries entry information in the database through the accounting type, the atomic actions of the accounting transaction data, and the type of the amount;
[0028] The calculation engine maps and obtains accounting subjects according to the entry information.
[0029] The calculation engine determines accounting conditions based on the accounting subjects.
[0030] The business data involves fund transactions, and the amount of the accounting transaction data is calculated by the netting method.
[0031] The business data involves balance transactions, and the amount of the accounting transaction data is configured according to the amount type.
[0032] According to the second aspect of the embodiments of the present invention, there is provided an apparatus for processing business data, the apparatus including a service component, a calculation engine, and an accounting component.
[0033] The service component records the transaction information of the business data into the accounting transaction data according to the business data and the accounting type, and sends the accounting type, the amount of the accounting transaction data, and the atomic action of the accounting transaction data to the calculation engine in an asynchronous manner determined by the accounting transaction data.
[0034] The calculation engine obtains accounting conditions in a database through the accounting type, the atomic action of the accounting transaction data, and the type of the amount.
[0035] The accounting component calculates the amount of the accounting transaction data based on the accounting conditions.
[0036] The accounting transaction data belongs to online transactions, and the asynchronous manner determined by the accounting transaction data includes a message queue.
[0037] The accounting transaction data belongs to batch transactions, and the asynchronous manner determined by the accounting transaction data includes an asynchronous file sending method.
[0038] The accounting transaction data belongs to summary data, and the asynchronous manner determined by the accounting transaction data includes a message queue.
[0039] According to the third aspect of the embodiments of the present invention, there is provided an electronic device for processing business data, including:
[0040] One or more processors;
[0041] A storage device for storing one or more programs.
[0042] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.
[0043] According to a fourth aspect of an embodiment of the present invention, there is provided a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the above-described method is implemented.
[0044] According to a fifth aspect of an embodiment of the present invention, there is provided a computer program product including a computer program, and when the program is executed by a processor, the method as described above provided by the embodiment of the present invention is implemented.
[0045] One embodiment of the above invention has the following advantages or beneficial effects: The business component is called to record the transaction information of the business data into the accounting transaction data according to the business data and the accounting type; the accounting type, the amount of the accounting transaction data, and the atomic action of the accounting transaction data are sent to the computing engine in an asynchronous manner determined by the accounting transaction data through the business component; the computing engine obtains accounting conditions in the database through the accounting type, the atomic action of the accounting transaction data, and the type of the amount; the accounting component is called to calculate the amount of the accounting transaction data based on the accounting conditions. By using the business component, the computing engine, and the accounting component to separately process business data, accounting conditions, and the accounting process, even if the concurrency is huge, since the business component, the computing engine, and the accounting component can perform asynchronous processing concurrently, the risk of business processing failure can be reduced.
[0046] The further effects of the above non-conventional optional manner will be described in conjunction with specific embodiments hereinafter. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The drawings are used to better understand the present invention and do not constitute an improper limitation to the present invention. Among them:
[0048] Figure 1 is a main flowchart diagram of a method for processing business data according to an embodiment of the present invention;
[0049] Figure 2 is a flowchart diagram for determining an accounting type according to an embodiment of the present invention;
[0050] Figure 3 is a flowchart diagram for obtaining accounting conditions in a database according to an embodiment of the present invention;
[0051] Figure 4 is a schematic diagram of the main structure of a device for processing business data according to an embodiment of the present invention;
[0052] Figure 5 is an exemplary system architecture diagram to which an embodiment of the present invention can be applied;
[0053] Figure 6It is a schematic structural diagram of a computer system of a terminal device or a server suitable for implementing the embodiments of the present invention. Detailed implementation manners
[0054] The following describes exemplary embodiments of the present invention with reference to the accompanying drawings. Various details of the embodiments of the present invention are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted below. The acquisition, storage, use, processing, etc. of data in the technical solution of this application all comply with the relevant regulations of national laws and regulations.
[0055] Most traditional banking systems follow the method of binding transactions with accounting. From an accounting perspective, for different transactions, different products, different regions, different banks, and even the same transaction under different state conditions, the specific accounting rules are all different.
[0056] If the method of binding transactions with accounting is adopted, system developers often need to face the situation that as long as transactions, products, or other factors change, a set of system components need to be developed again for the changed part. The data involved is relatively fragmented and complex, and the component development cycle is long.
[0057] However, in fact, because the accounting standards have high stability and universality, the newly developed components will have a large number of duplicate codes with the previous system, resulting in poor code reusability, weak readability, and excessive redundancy of the system. After development, system testing and parameter maintenance also face the problems of exponential growth in workload, easy errors, and low fault tolerance.
[0058] Accounting belongs to the internal management of the bank. From the perspective of bank customers, customers do not care about the steps their transactions need to go through, the accounting conditions and specific accounts into which they are split. They only need to get the return result after the transaction. In other words, accounting is transparent to customers relative to transactions.
[0059] Transaction accounting binding sums up and records accounts based on the values of classification fields, which is not convenient for tracing the specific accounting information corresponding to transactions. Having only an overall accounting during accounting also makes it difficult to trace the original transactions. When day transactions and batch processing involve other business components, an off-balance account transition is generally chosen, which makes it difficult to find the reasons for off-balance accounts during hanging and difficult to identify the counterparty. For general ledger reconciliation, since it reconciles the occurrence amount rather than the balance, if there are unprocessed uneven accounts, continuous tracking will be impossible. Binding transactions and accounting will extend the transaction processing process and reduce efficiency. And because banking operations and accounting belong to different departments, it is difficult to manage. Separating transactions and accounting requires the business system to understand the entry rules of accounting. Each time a new product is added, entry configuration may be required, and the separation of transactions and accounting is not well achieved.
[0060] Since transactions are bound to accounting, it will reduce the processing speed of the system and degrade the user experience. From a technical perspective, inserting a large amount of new data and updated data into the database results in database locking. When the concurrency is extremely high, the blocking caused by the database increases the risk of failure in processing business data.
[0061] To reduce the risk of failure in processing business, the technical solutions in the embodiments of the present invention can be adopted.
[0062] See Figure 1 , Figure 1 which is a schematic diagram of the main process of the method for processing business data according to the embodiments of the present invention. Call the business components, computing engine, and accounting components to process business data in sequence. As Figure 1 shown, it specifically includes the following steps:
[0063] High concurrency is one of the bottleneck problems that need to be focused on solving. Shortening the transaction processing process is an important technical means to solve this problem. Separating transaction accounting and adopting an asynchronous processing method can effectively achieve this goal.
[0064] Distributed architecture and microservices are the development directions and trends of technology. Horizontally divide a large centrally deployed system into several distributedly deployed subsystems or microservices.
[0065] Processing business data is achieved through a distributed architecture. It can be understood that using a distributed architecture can process multiple types of businesses and multiple types of data simultaneously. For the embodiments of the present invention, when processing business data in a distributed architecture, in one subsystem, call the business components to record the transaction information of business data into the accounting transaction data. In another subsystem, use the computing engine and accounting components to reconcile the occurrence amount of the accounting transaction data. Adopting a distributed architecture can improve the speed of processing business data.
[0066] Business data processing is achieved through microservices. Specifically, one microservice is used to record the transaction information of business data into accounting transaction data by calling business components. Another microservice is used to calculate the amount of accounting transaction data by using a calculation engine and an accounting component. Using multiple microservices can improve the speed of processing business data.
[0067] The accounting conditions are separately extracted to form an independent accounting component, which is more in line with the efficient and loosely coupled enterprise system architecture and can better support the upper-level business components.
[0068] S101. Call the business component to record the transaction information of the business data into the accounting transaction data according to the business data and the accounting type.
[0069] In an embodiment of the present invention, the business component is used to process business data. It can be understood that there are corresponding business components responsible for processing different types of business. As an example, business component 1 is used to process business data 1; business component 2 is used to process business data 2. In the case of a large amount of similar business data, multiple business components can also be used to process similar but different business data. As an example, business component 1 is used to process business data 1; business component 2 is used to process business data 2. Among them, business data 1 and business data 2 belong to similar business data.
[0070] In an embodiment of the present invention, the essence of accounting is to perform operations involving amounts on products. For example: the products include housing loans or consumer loans; the amounts involve normal principal or accrued interest; the operations include disbursement or repayment. Business data is the data involved in the accounting process. As an example, business data includes the balance of housing loans. The accounting type is the way to account for business data.
[0071] To process business data, call the business component to record the transaction information of the business data into the accounting transaction data according to the business data and the accounting type. Among them, the accounting transaction data is the data involved in accounting transactions.
[0072] See Figure 2 , Figure 2 is a schematic flowchart of determining the accounting type according to an embodiment of the present invention. Specifically, it includes the following steps:
[0073] S201. Determine the product type of the business data based on the business system to which the business data belongs.
[0074] The role of the accounting type is to isolate products from accounting subjects. The accounting type supports the inconsistency between the granularity of products and accounting subjects, making the product design more flexible and not affected by accounting subjects. The accounting type describes the conditions of the accounting type from the side. Different product types often correspond to the same conditions of the accounting type, and using the same accounting type can reduce a large amount of parameter configuration. Different products can have different accounting conditions, and there can be multiple accounting conditions. That is, the number of conditions of the accounting type is greater than 1.
[0075] In the embodiments of the present invention, the determination of the accounting type is implemented by respective business systems. For business data, it has a belonging business system. To determine the accounting type of business data, it is first necessary to query in the business system to determine the product type. As an example, product types include personal consumption loans and housing mortgage loans, etc.
[0076] S202. The business system queries the conditions of the accounting type in the database according to the product type.
[0077] After the business system determines the product type of the business data, it can query the conditions of the accounting type in the database according to the above product type. It can be understood that the corresponding relationship between the product type and the conditions of the accounting type is stored in the database, and the conditions of the accounting type can be queried in the database based on the product type.
[0078] S203. The business system maps to obtain the accounting type according to the product type to which the business data belongs and the conditions of the accounting type.
[0079] When the product type to which the business data belongs has been determined and the conditions of the accounting type are known, the business system maps to obtain the accounting type according to the product type to which the business data belongs and the conditions of the accounting type.
[0080] As an example, the business system includes an individual loan system. The business data includes individual loan business data. As shown in Table 1, the product type and the conditions of the accounting type are mapped to obtain the accounting type.
[0081] The conditions of the accounting type in Table 1 include: loan status, whether it is a trust loan, and whether it has been sold, etc. Among them, the loan status includes accrued loans, non-accrued loans, and written-off loans.
[0082] Table 1
[0083]
[0084] In an embodiment of the present invention, business data can be pre-loaded asynchronously to improve the speed of processing business data. As an example, business data is pre-loaded asynchronously. Pre-loading business data includes checking the format of business data and loading business data that meets the format requirements.
[0085] In one embodiment of the present invention, although the accounting type can be applicable to most transaction scenarios, it cannot meet special scenarios. In special scenarios, the accounting type can be updated by sending a request to update the accounting type.
[0086] Specifically, in response to the request to update the accounting type, the accounting type is updated according to the type parameter in the request to update the accounting type. Thereby making the accounting type applicable to special scenarios. As an example, prepayment requires a fee, but for premium customers, it can be waived. By using the request to update the accounting type, the above-mentioned fee can be waived by updating the accounting type.
[0087] S102: Send the accounting type, the amount of the accounting transaction data, and the atomic action of the accounting transaction data to the calculation engine in an asynchronous manner determined by the accounting transaction data through the business component.
[0088] In the embodiment of the present invention, the business component is related to the business and is responsible for recording the transaction information of the business data into the accounting transaction data. The mapping of the accounting type is implemented by each respective business system, and the calculation engine is responsible for processing the accounting type.
[0089] As the information carrier for communication between the business component and the calculation engine, the accounting transaction data plays a connecting role. As an example, the accounting type, the amount of the accounting transaction data, and the atomic action of the accounting transaction data are sent to the calculation engine in an asynchronous manner through the standard interface. The standard interface can be applicable to various types of business components and calculation engines, improving the applicability of the data interaction between the business component and the calculation engine.
[0090] In the embodiment of the present invention, the main information items recorded in the accounting transaction data include the global transaction number, account number, product, accounting type, atomic action, type of amount, and amount, etc. The amount type is obtained by analyzing the commonalities of each product, institution, and accounting conditions according to business rules and the current system status. For example, the amount type includes loan principal, interest, and fees, etc.
[0091] In one embodiment of the present invention, the atomic action is a refinement of summarizing all actions that generate amounts in the business system. The atomic action includes one or more of the following: transaction action, interest action, loan action, institution action, and product action. For example, the transaction action includes loan disbursement, repayment, and account adjustment. The interest action includes interest accrual. The loan action includes loan status transfer. The institution action includes institution merger and acquisition. The product action includes product conversion.
[0092] In one embodiment of the present invention, there are the following two ways to obtain the amount of the accounting transaction data.
[0093] The business data involves fund transactions, and the amount of accounting transaction data is calculated by the netting method. Netting refers to using legal systems such as offset and contract novation to ultimately obtain a net claim or net debt of one party against the other party in an amount.
[0094] The business data involves balance transactions. For example, balance transactions include transactions where an institution withdraws without an amount, and the amount of accounting transaction data is configured according to the amount type.
[0095] In the embodiment of the present invention, the accounting type, the amount of accounting transaction data, and the atomic actions of accounting transaction data are sent asynchronously. The purpose is to reduce the pressure of processing business data to avoid blocking caused by the database. As an example, the asynchronous method includes a message queue (MQ) and / or the method of sending files.
[0096] The following combines specific application scenarios to exemplarily illustrate the accounting type, the amount of accounting transaction data, and the atomic actions of accounting transaction data sent asynchronously.
[0097] In the embodiment of the present invention, the asynchronous method is determined by the accounting transaction data. That is, the accounting transaction data corresponds to the asynchronous method. Different accounting transaction data has different characteristics. Determining the asynchronous method according to the accounting transaction data can meet the requirements of quickly processing accounting transaction data.
[0098] In an embodiment of the present invention, the accounting transaction data belongs to online transactions, and the asynchronous method determined by the accounting transaction data includes a message queue. The accounting type, the amount of accounting transaction data, and the atomic actions of accounting transaction data are sent to the calculation engine using the message queue.
[0099] Specifically, MQ push belongs to the method of online asynchronous message processing, which not only meets the requirements of quasi-real-time general ledger, speeds up the exposure of accounting imbalance problems, but also greatly reduces the pressure of night batch processing and compresses the processing time of night reporting. This method is mainly applicable to online transactions, such as online loan disbursement, repayment, and account adjustment of individual loans.
[0100] In the case where the accounting type, the amount of accounting transaction data, and the atomic actions of accounting transaction data sent through the message queue fail, the asynchronous file sending method can also be used as a supplement. That is, the accounting type, the amount of accounting transaction data, and the atomic actions of accounting transaction data are sent to the calculation engine using the asynchronous file sending method.
[0101] That is to say, the data generated by online transactions fails to be successfully sent through MQ due to various uncertain factors, and finally can be sent through the asynchronous file sending method.
[0102] In one embodiment of the present invention, the asynchronous file sending method is mainly for the scenario of batch transactions. For example: batch interest accrual, batch transfer listing, and accounting transaction data generated in the individual loan batch processing. A large amount of data is generated in the above scenarios in a short period of time, which is more suitable for the asynchronous file sending method.
[0103] Specifically, the accounting transaction data belongs to batch transactions, and the asynchronous method determined by the accounting transaction data includes the method of asynchronously sending files. That is, the accounting type, the amount of the accounting transaction data, and the atomic actions of the accounting transaction data are sent to the computing engine by the method of asynchronously sending files.
[0104] In one embodiment of the present invention, the accounting transaction data belongs to summary data, and the asynchronous method determined by the accounting transaction data includes a message queue. The summary data is data determined by dimensions such as institution, date, and transaction type. Sending the summary data through the message queue meets the time limit requirements for regularly reporting the summary data.
[0105] S103. The computing engine obtains accounting conditions in the database based on the accounting type, the atomic actions of the accounting transaction data, and the type of the amount.
[0106] The computing engine is responsible for obtaining accounting conditions. Specifically, the computing engine obtains accounting conditions in the database based on the accounting type, the atomic actions of the accounting transaction data, and the type of the amount.
[0107] See Figure 3 , Figure 3 is a schematic flow chart of obtaining accounting conditions in the database according to an embodiment of the present invention. Specifically, it includes the following steps:
[0108] S301. The computing engine queries entry information in the database based on the accounting type, the atomic actions of the accounting transaction data, and the type of the amount.
[0109] After receiving the accounting type, the atomic actions of the accounting transaction data, and the type of the amount, the computing engine obtains entry information by querying the database. The entry information is a kind of record information that lists the corresponding two accounts and their amounts for each business according to the requirements of the double-entry bookkeeping principle.
[0110] See Table 2. Table 2 is a schematic diagram of querying entry information in the database based on the accounting type, the atomic actions of the accounting transaction data, and the type of the amount.
[0111] Table 2
[0112]
[0113] S302. The computing engine maps and obtains accounting subjects according to the entry information.
[0114] The classification information corresponds to the accounting subjects. Accounting subjects are categories for classifying and accounting for the specific contents of accounting element objects. The calculation engine can map to obtain accounting subjects according to the classification information.
[0115] Referring to Table 3, the calculation engine maps and obtains accounting subjects based on the amount type in the classification information.
[0116] Table 3
[0117]
[0118] In an embodiment of the present invention, although different products have the same accounting type, their account codes are different. In view of the above situation, the product priority principle is introduced to configure the mapping of the product amount type parameter to the account code.
[0119] Specifically, the calculation engine maps and obtains accounting subjects according to the entry information and the product amount type parameter. As an example, the calculation engine first maps and obtains accounting subjects according to the amount type in the classification information; then, it updates the accounting subjects using the product amount type. Updating the accounting subjects with the product amount type can improve the accuracy of the accounting subjects.
[0120] S303. The calculation engine determines the accounting conditions based on the accounting subjects.
[0121] There is a corresponding relationship between the accounting subjects and the accounting conditions. For example: Accounting subject 1 corresponds to accounting condition a, and accounting subject 2 corresponds to accounting condition b. After the accounting subjects are determined, the calculation engine can determine the accounting conditions based on the accounting subjects.
[0122] In Figure 3 In the embodiment, the calculation engine obtains the accounting conditions from the database to achieve the isolation of business data and the accounting process.
[0123] S104. Call the accounting component to calculate the amount of the accounting transaction data based on the accounting conditions.
[0124] The accounting component is used to perform accounting. The accounting component calculates the amount of the accounting transaction data based on the accounting conditions. Specifically, the accounting component combines the unilateral accounts of each business component through the global serial number, and detects whether the overall debit and credit are balanced based on the accounting conditions, realizes quasi-real-time reconciliation, exposes problems more quickly, and locates the problem more effectively.
[0125] Adopting the technical solution in the embodiment of the present invention, as an example, the accounting of housing loans can be realized.
[0126] Specifically, first call the business component of the housing loan data, and record the transaction information of the business data into the accounting transaction data according to the business data of the housing loan, that is, the balance and accounting type of the housing loan.
[0127] Secondly, the accounting type, the amount of accounting transaction data, and the atomic actions of the accounting transaction data are sent to the computing engine asynchronously through the business component of the housing loan data. Sending the accounting type, the amount of accounting transaction data, and the atomic actions of the accounting transaction data asynchronously can reduce the pressure of processing business data to avoid blocking caused by the database.
[0128] The computing engine obtains the accounting conditions in the database based on the accounting type, the atomic actions of the accounting transaction data, and the type of the amount.
[0129] Finally, the accounting component calculates the amount of the accounting transaction data based on the accounting conditions. During the accounting process, the accounting component detects whether the housing loan is balanced.
[0130] In the above embodiments of the present invention, the business component records the transaction information of the business data into the accounting transaction data according to the business data and the accounting type; the business component sends the accounting type, the amount of the accounting transaction data, and the atomic actions of the accounting transaction data to the computing engine in an asynchronous manner determined by the accounting transaction data; the computing engine obtains the accounting conditions in the database based on the accounting type, the atomic actions of the accounting transaction data, and the type of the amount; the accounting component calculates the amount of the accounting transaction data based on the accounting conditions. By using the business component, the computing engine, and the accounting component to process business data, accounting conditions, and the accounting process respectively, even when the concurrency is huge, since the business component, the computing engine, and the accounting component can handle asynchronously, the risk of business processing failure can be reduced.
[0131] The business component does not need to understand the accounting entries, and the accounting component can perform real-time accounting based on the accounting conditions, thus realizing the separation of transactions and accounting. The separation of transaction accounting allows a component to uniformly process all transactions sent by the systems. This not only saves the system resource expenditure, reduces the calculation time, but also saves the effort of maintaining the account parameters between different systems.
[0132] From the perspective of the division of bank functional departments, accounting and specific operations are managed by different departments. The separation of transaction accounting makes the accounting conditions transparent, enabling the business system to focus more on the implementation of the business level without excessive concern about the accounting conditions, which is more in line with the architecture of the bank department system and can effectively reduce the difficulty of project implementation.
[0133] See Figure 4 , Figure 4 is a schematic diagram of the main structure of the device for processing business data according to an embodiment of the present invention. The device for processing business data can implement the method for processing business data, such as Figure 5As shown in the figure, the device for processing service data specifically includes:
[0134] The device includes a service component, a computing engine, and an accounting component.
[0135] The service component 401 records the transaction information of the service data into the accounting transaction data according to the service data and the accounting type, and sends the accounting type, the amount of the accounting transaction data, and the atomic action of the accounting transaction data to the computing engine in an asynchronous manner determined by the accounting transaction data.
[0136] The computing engine 402 obtains accounting conditions in the database through the accounting type, the atomic action of the accounting transaction data, and the type of the amount.
[0137] The accounting component 403 calculates the amount of the accounting transaction data based on the accounting conditions.
[0138] In an embodiment of the present invention, the business system to which the service data belongs determines the product type of the service data.
[0139] The business system queries the conditions of the accounting type in the database according to the product type.
[0140] The business system maps to obtain the accounting type according to the product type to which the service data belongs and the conditions of the accounting type.
[0141] In an embodiment of the present invention, the number of conditions of the accounting type is greater than 1.
[0142] In an embodiment of the present invention, in response to a request for updating the accounting type, the service component 401 updates the accounting type according to the type parameter in the request for updating the accounting type.
[0143] In an embodiment of the present invention, the service component 401 is specifically configured to send the accounting type, the amount of the accounting transaction data, and the atomic action of the accounting transaction data to the computing engine in an asynchronous manner through a standard interface.
[0144] In an embodiment of the present invention, the asynchronous manner includes a message queue and / or a file sending method.
[0145] In an embodiment of the present invention, the accounting transaction data belongs to an online transaction, and the asynchronous manner determined by the accounting transaction data includes a message queue.
[0146] In an embodiment of the present invention, after the sending using the message queue fails,
[0147] The service component 401 is further configured to send the accounting type, the amount of the accounting transaction data, and the atomic actions of the accounting transaction data to the computing engine in the form of asynchronously sending files.
[0148] In an embodiment of the present invention, the accounting transaction data belongs to batch transactions, and the asynchronous manner determined by the accounting transaction data includes the manner of asynchronously sending files.
[0149] In an embodiment of the present invention, the accounting transaction data belongs to summary data, and the asynchronous manner determined by the accounting transaction data includes a message queue.
[0150] In an embodiment of the present invention, the atomic actions include one or more of the following: transaction actions, interest actions, loan actions, institutional actions, and product actions.
[0151] In an embodiment of the present invention, the computing engine 402 is specifically configured to query entry information in the database through the accounting type, the atomic actions of the accounting transaction data, and the type of the amount;
[0152] Map and obtain accounting subjects according to the entry information;
[0153] Determine accounting conditions based on the accounting subjects.
[0154] In an embodiment of the present invention, the computing engine 402 maps and obtains accounting subjects according to the entry information and the product amount type parameter.
[0155] In an embodiment of the present invention, the service data involves fund transactions, and the amount of the accounting transaction data is calculated by the method of netting.
[0156] In an embodiment of the present invention, the service data involves balance transactions, and the amount of the accounting transaction data is configured according to the amount type.
[0157] Figure 5 An exemplary system architecture 500 for a method of processing service data or a device for processing service data to which embodiments of the present invention can be applied is shown.
[0158] As Figure 5 shown, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 is used to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. The network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0159] Users can use terminal devices 501, 502, and 503 to interact with server 505 via network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, and 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (for example only).
[0160] Terminal devices 501, 502, and 503 can be various electronic devices with a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop computers, and desktop computers, etc.
[0161] Server 505 can be a server that provides various services, such as a background management server that supports shopping websites browsed by users using terminal devices 501, 502, and 503 (for example only). The background management server can analyze and process data such as product information query requests received, and feedback the processing results (such as target push information, product information - for example only) to the terminal device.
[0162] It should be noted that the method for processing service data provided by the embodiments of the present invention is generally executed by server 505. Correspondingly, the device for processing service data is generally set in server 505.
[0163] It should be understood that Figure 5 the numbers of terminal devices, networks, and servers in
[0164] are merely illustrative. According to the implementation requirements, there can be any number of terminal devices, networks, and servers.
[0165] Next, referring to Figure 6 which shows a schematic structural diagram of a computer system 600 of a terminal device suitable for implementing the embodiments of the present invention. Figure 6 The shown terminal device is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present invention.
[0166] As Figure 6As shown, computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 602 or programs loaded into a random access memory (RAM) 603 from a storage section 608. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0167] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed so that a computer program read therefrom can be installed into the storage section 608 as needed.
[0168] Specifically, according to the embodiments disclosed in the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above functions defined in the system of the present invention are executed.
[0169] It should be noted that the computer-readable medium shown in the present invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in conjunction with an instruction execution system, apparatus, or device. And in the present invention, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which the computer-readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0170] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0171] The modules involved in the embodiments of the present invention can be implemented in software or in hardware. The described modules can also be provided in a processor. For example, it can be described as: a processor includes a service component, a computing engine, and an accounting component. Among them, the names of these components do not constitute a limitation on the module itself in some cases. For example, the accounting component can also be described as "calculating the amount of the accounting transaction data based on the accounting conditions".
[0172] On the other hand, the present invention also provides a computer-readable medium. The computer-readable medium can be included in the device described in the above embodiments; it can also exist alone without being assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by such a device, the device includes:
[0173] Invoking the service component to record the transaction information of the service data into the accounting transaction data according to the service data and the accounting type;
[0174] Sending the accounting type, the amount of the accounting transaction data, and the atomic action of the accounting transaction data to the computing engine in an asynchronous manner determined by the accounting transaction data through the service component;
[0175] The computing engine obtains accounting conditions in the database through the accounting type, the atomic action of the accounting transaction data, and the type of the amount;
[0176] Invoking the accounting component to calculate the amount of the accounting transaction data based on the accounting conditions.
[0177] According to the technical solution of the embodiments of the present invention, invoking the service component to record the transaction information of the service data into the accounting transaction data according to the service data and the accounting type; sending the accounting type, the amount of the accounting transaction data, and the atomic action of the accounting transaction data to the computing engine in an asynchronous manner determined by the accounting transaction data through the service component; the computing engine obtains accounting conditions in the database through the accounting type, the atomic action of the accounting transaction data, and the type of the amount; invoking the accounting component to calculate the amount of the accounting transaction data based on the accounting conditions. By using the service component, the computing engine, and the accounting component to process service data, accounting conditions, and the accounting process respectively, even when the concurrency is extremely large, since the service component, the computing engine, and the accounting component can perform asynchronous processing, the risk of service processing failure can be reduced.
[0178] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for processing service data, characterized in that, Including: Invoking a business component to record transaction information of the business data into accounting transaction data according to the business data and the accounting type; Sending, by the business component, the accounting type, the amount of the accounting transaction data, and the atomic action of the accounting transaction data to a computing engine through a standard interface in an asynchronous manner determined by the accounting transaction data; the accounting transaction data belongs to an online transaction, and the asynchronous manner determined by the accounting transaction data includes a message queue; The computing engine obtains accounting conditions from a database based on the accounting type, the atomic action of the accounting transaction data, and the type of the amount; Invoking an accounting component to calculate the amount of the accounting transaction data based on the accounting conditions; 2. The method for processing service data according to claim 1, characterized in that Before the invoking the business component records the transaction information of the business data into the accounting transaction data according to the business data and the accounting type, it further includes: The business system to which the business data belongs determines the product type of the business data; The business system queries the conditions of the accounting type in the database according to the product type; The business system maps to obtain the accounting type according to the product type to which the business data belongs and the conditions of the accounting type; 3. The method for processing service data according to claim 2, wherein The number of conditions of the accounting type is greater than 1; 4. The method for processing service data according to claim 2, wherein, After the business system maps to obtain the accounting type according to the product type to which the business data belongs and the conditions of the accounting type, it includes: In response to a request to update the accounting type, updating the accounting type according to the type parameter in the request to update the accounting type; 5. The method for processing service data according to claim 1, characterized in that After the accounting transaction data belongs to online transaction data and the sending by using the message queue fails, The method further includes: Sending the accounting type, the amount of the accounting transaction data, and the atomic action of the accounting transaction data to the computing engine in an asynchronous file sending manner; 6. The method for processing service data according to claim 1, wherein The accounting transaction data belongs to a batch transaction, and the asynchronous manner determined by the accounting transaction data includes an asynchronous file sending manner; 7. The method for processing service data according to claim 1, wherein The accounting transaction data belongs to summary data, and the asynchronous manner determined by the accounting transaction data includes a message queue; 8. The method for processing service data according to claim 1, wherein The atomic action includes one or more of the following: transaction action, interest action, loan action, institution action, and product action; 9. The method for processing service data according to claim 1, wherein The computing engine obtains accounting conditions from a database based on the accounting type, the atomic action of the accounting transaction data, and the type of the amount, including: The computing engine queries entry information in the database based on the accounting type, the atomic action of the accounting transaction data, and the type of the amount; The computing engine maps to obtain accounting subjects according to the entry information; The computing engine determines accounting conditions based on the accounting subjects; 10. The method for processing service data according to claim 1, characterized in that, The business data involves a fund transaction, and the amount of the accounting transaction data is calculated by a netting method; 11. The method for processing service data according to claim 1, wherein The business data involves a balance transaction, and the amount of the accounting transaction data is configured according to the amount type; 12. An apparatus for processing service data, characterized in that, The device includes a business component, a computing engine, and an accounting component. A business component that, according to business data and accounting types, records transaction information of the business data into accounting transaction data, and sends the accounting type, the amount of the accounting transaction data, and the atomic actions of the accounting transaction data to a computing engine in an asynchronous manner determined by the accounting transaction data through a standard interface; the accounting transaction data belongs to online transactions, and the asynchronous manner determined by the accounting transaction data includes a message queue; The computing engine obtains accounting conditions in a database based on the accounting type, the atomic actions of the accounting transaction data, and the type of the amount; An accounting component that, based on the accounting conditions, calculates the amount of the accounting transaction data.
13. The apparatus for processing service data according to claim 12, wherein The accounting transaction data belongs to batch transactions, and the asynchronous manner determined by the accounting transaction data includes an asynchronous file sending method.
14. The method for processing service data according to claim 12, wherein The accounting transaction data belongs to summary data, and the asynchronous manner determined by the accounting transaction data includes a message queue.
15. An electronic device for processing service data, characterized in that, Comprising: One or more processors; A storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-11.
16. A computer-readable medium having a computer program stored thereon, characterized in that, The program, when executed by a processor, implements the method according to any one of claims 1-11.
17. A computer program product comprising a computer program, characterized in that, The computer program, when executed by a processor, implements the method according to any one of claims 1-11.
Citation Information
Patent Citations
Capital clearing processing method and device
CN108985923A
Transaction accounting test method and device, accounting engine and storage medium
CN111797019A