Accounting method and device, electronic equipment and computer readable medium

Through unified accounting interface and custom accounting processing methods, target accounting processing implementation classes are generated, which solves the problems of high coupling and poor scalability of the banking business system in different accounting scenarios, and achieves more efficient accounting processing .

CN119006196APending Publication Date: 2024-11-22CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411185298.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

When existing banking business systems deal with different bookkeeping scenarios, they have high coupling and poor scalability, making it difficult for the system to meet multiple bookkeeping needs.

Method used

By receiving accounting requests, obtaining account identification, determining account type, calling the unified accounting interface for interface matching, determining accounting scenarios based on the matching results, obtaining custom accounting processing methods, generating target accounting processing implementation classes and adding new cores The system accounting interface executes accounting requests to complete accounting.

Benefits of technology

It reduces the coupling degree of the accounting system, improves the scalability of the system, and allows the banking business system to handle different accounting scenarios more flexibly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119006196A_ABST
    Figure CN119006196A_ABST
Patent Text Reader

Abstract

The invention discloses an accounting method and device, electronic equipment and a computer readable medium, and relates to the technical field of computers, one specific embodiment comprises the steps of receiving an accounting request, obtaining a corresponding account identifier, and determining an account type according to the account identifier; calling a unified bookkeeping interface to execute an interface matching method based on the account type, and obtaining matching result data; in response to the fact that the matching result data is null, determining an accounting scene based on the account type; obtaining an abstract class of the accounting processing implementation class, obtaining a corresponding custom accounting processing method according to the abstract class, generating a target accounting processing implementation class based on the accounting scene and the custom accounting processing method, and newly adding a corresponding core system accounting interface; and executing the target accounting processing implementation class to call a core system accounting interface to process the accounting request so as to complete accounting. Therefore, the coupling degree of the bookkeeping system is reduced, and the expandability is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an accounting method, device, electronic device and computer-readable medium. Background Art

[0002] At present, large-scale banking business systems usually need to meet the accounting needs of various accounting scenarios. Since the core banking system provides different accounting interfaces for different accounting scenarios, the banking business system needs to design and develop corresponding accounting scenarios when dealing with the accounting needs of different accounting scenarios. The existing accounting methods have high system coupling and poor scalability. Summary of the invention

[0003] In view of this, the embodiments of the present application provide an accounting method, device, electronic device and computer-readable medium, which can solve the problems of high system coupling and poor scalability of existing accounting methods.

[0004] To achieve the above-mentioned purpose, according to one aspect of an embodiment of the present application, there is provided an accounting method, including: receiving an accounting request, obtaining a corresponding account identifier, and determining an account type according to the account identifier; calling a unified accounting interface to execute an interface matching method based on the account type, and obtaining matching result data; in response to the matching result data being empty, determining an accounting scenario based on the account type; obtaining an abstract class of an accounting processing implementation class, obtaining a corresponding custom accounting processing method according to the abstract class, generating a target accounting processing implementation class and adding a corresponding core system accounting interface based on the accounting scenario and the custom accounting processing method; executing the target accounting processing implementation class to call the core system accounting interface to process the accounting request to complete the accounting.

[0005] Optionally, execute the target accounting processing implementation class to call the core system accounting interface to process the accounting request to complete the accounting, including: obtaining the accounting element corresponding to the accounting request, and obtaining the pre-processing identifier corresponding to the core system accounting interface; in response to the pre-processing identifier being non-empty, call the pre-processing method corresponding to the pre-processing identifier to pre-process the accounting element to obtain the pre-processed accounting element; based on the design specification of the core system accounting interface, assemble the pre-processing accounting elements to generate an outbound call request message; and use the outbound call request message to call the core system for accounting.

[0006] Optionally, the pre-processing method corresponding to the pre-processing identifier is called to pre-process the accounting element to obtain the pre-processed accounting element, including: searching for the pre-processing method corresponding to the pre-processing identifier from the target accounting processing implementation class; and calling the pre-processing method to pre-process the accounting element.

[0007] Optionally, the method further includes: obtaining accounting results, updating the pre-recorded accounting flow according to the accounting results, and saving and returning the accounting results.

[0008] Optionally, the method also includes: obtaining a post-processing identifier corresponding to the core system accounting interface; in response to the post-processing identifier being non-empty, after calling the core system and before returning the accounting result, calling a post-processing method corresponding to the post-processing identifier to perform post-processing on the accounting result.

[0009] Optionally, the target accounting processing implementation class inherits an abstract class that defines a custom accounting processing method.

[0010] In addition, the present application also provides an accounting device, including: a receiving unit, configured to receive an accounting request, obtain a corresponding account identifier, and determine an account type based on the account identifier; an interface matching unit, configured to call a unified accounting interface to execute an interface matching method based on the account type, and obtain matching result data; an accounting scenario determination unit, configured to determine an accounting scenario based on the account type in response to the matching result data being empty; an interface adding unit, configured to obtain an abstract class of an accounting processing implementation class, obtain a corresponding custom accounting processing method based on the abstract class, generate a target accounting processing implementation class based on the accounting scenario and the custom accounting processing method, and add a corresponding core system accounting interface; an accounting unit, configured to execute the target accounting processing implementation class to call the core system accounting interface to process the accounting request to complete the accounting.

[0011] Optionally, the accounting unit is further configured to: obtain the accounting elements corresponding to the accounting request, and obtain the pre-processing identifier corresponding to the core system accounting interface; in response to the pre-processing identifier being non-empty, call the pre-processing method corresponding to the pre-processing identifier to pre-process the accounting elements to obtain the pre-processed accounting elements; based on the design specifications of the core system accounting interface, assemble the pre-processing accounting elements to generate an outbound call request message; and use the outbound call request message to account for the outbound call to the core system.

[0012] Optionally, the accounting unit is further configured to: search for a pre-processing method corresponding to the pre-processing identifier from the target accounting processing implementation class; and call the pre-processing method to perform pre-processing on the accounting element.

[0013] Optionally, the device also includes an updating unit configured to: obtain an accounting result, update the pre-recorded account flow according to the accounting result, and save and return the accounting result.

[0014] Optionally, the device also includes a post-processing unit, which is configured to: obtain a post-processing identifier corresponding to the core system accounting interface; in response to the post-processing identifier being non-empty, after calling the core system and before returning the accounting result, call the post-processing method corresponding to the post-processing identifier to perform post-processing on the accounting result.

[0015] Optionally, the target accounting processing implementation class inherits an abstract class that defines a custom accounting processing method.

[0016] In addition, the present application also provides an accounting electronic device, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors implement the accounting method as described above.

[0017] In addition, the present application also provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the accounting method as described above is implemented.

[0018] To achieve the above objective, according to another aspect of the embodiments of the present application, a computer program product is provided.

[0019] A computer program product according to an embodiment of the present application includes a computer program, which implements the accounting method provided by the embodiment of the present application when the program is executed by a processor.

[0020] One embodiment of the above invention has the following advantages or beneficial effects: the application receives an accounting request, obtains the corresponding account identifier, and determines the account type according to the account identifier; calls the unified accounting interface to execute the interface matching method based on the account type and obtains the matching result data; in response to the matching result data being empty, determines the accounting scenario based on the account type; obtains the abstract class of the accounting processing implementation class, obtains the corresponding custom accounting processing method according to the abstract class, generates the target accounting processing implementation class and adds the corresponding core system accounting interface based on the accounting scenario and the custom accounting processing method; executes the target accounting processing implementation class to call the core system accounting interface to process the accounting request to complete the accounting. This reduces the coupling degree of the accounting system and improves the scalability.

[0021] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings are used to better understand the present application and do not constitute an improper limitation on the present application.

[0023] Figure 1 It is a schematic diagram of the main process of the accounting method according to an embodiment of the present application;

[0024] Figure 2 It is a schematic diagram of the main process of the accounting method according to an embodiment of the present application;

[0025] Figure 3 is a schematic diagram of the system architecture of a bookkeeping method according to an embodiment of the present application;

[0026] Figure 4 It is a schematic diagram of the unified accounting module workflow of the accounting method according to one embodiment of the present application;

[0027] Figure 5 is a schematic diagram of the main units of the accounting device according to an embodiment of the present application;

[0028] Figure 6 is an exemplary system architecture diagram to which the embodiments of the present application can be applied;

[0029] Figure 7 It is a structural diagram of a computer system of a terminal device or server suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION

[0030] The following is a description of the exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, and they should be considered as 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 application. Similarly, for the sake of clarity and conciseness, the description of known functions and structures is omitted in the following description. It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of the present application are in compliance with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of the present application, certain software, components, models, and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or must have used the solution. In the technical solution of the present application, the collection, analysis, use, transmission, storage, and other aspects of the user's personal information involved are in compliance with the provisions of relevant laws and regulations, and are used for legal and reasonable purposes, and are not shared, leaked, or sold outside of these legal uses, and are subject to supervision and management by regulatory authorities. Take necessary measures to prevent illegal access to such personal information, ensure that persons with access to personal information comply with relevant laws and regulations, and ensure the security of personal information. Once such personal information is no longer needed, risks should be minimized by limiting or even prohibiting data collection and / or deleting data.

[0031] When used, including in certain related applications, user privacy is protected by de-identifying data, such as by removing specific identifiers when used, controlling the amount or specificity of data stored, controlling how data is stored, and / or other methods of de-identification.

[0032] Figure 1 is a schematic diagram of the main process of the accounting method according to an embodiment of the present application, such as Figure 1 As shown, the accounting method mainly includes the following steps S101-S105.

[0033] Step S101, receiving an accounting request, obtaining a corresponding account identifier, and determining an account type according to the account identifier.

[0034] In this embodiment, the execution subject of the accounting method (for example, it can be a server of the business system) can receive the accounting request through a wired connection or a wireless connection. After receiving the accounting request, the execution subject can obtain the account identifier corresponding to the accounting request. The account identifier is used to represent the account number or account name of the user who initiated the accounting request, etc. The embodiment of the present application does not specifically limit the form and content of the account identifier. The account identifier may include an account type identifier, and the execution subject can determine the account type corresponding to the account identifier based on the account type identifier. Specifically, the account type may include a cash account, a personal account, a public account, a credit card account, a digital currency account, and an account of another bank, etc. The embodiment of the present application does not specifically limit the account type.

[0035] Step S102, calling the unified accounting interface to execute the interface matching method based on the account type and obtain matching result data.

[0036] After determining the account type, the execution subject can call the unified accounting interface of the unified accounting module of the business system to match the interface matching methods of all accounting processing implementation classes based on the account type. Specifically, the interface matching method of each accounting processing implementation class determines whether it matches according to the account types of the two accounting parties and obtains the matching result data. When the matching result data is not empty, it indicates that there is an interface matching method that matches the account type, and the matching interface matching method can be directly called to perform the corresponding accounting.

[0037] Step S103, in response to the matching result data being empty, determining the accounting scenario based on the account type.

[0038] If the matching result data is empty, it indicates that there is no interface matching method that matches the account type. The execution entity can determine the accounting scenario corresponding to the account type based on the account type.

[0039] Specifically, the execution subject may obtain the account name corresponding to the account type and determine the accounting scenario according to the account name. For example, when the account name is a cash account, the corresponding accounting scenario may be a cash transaction scenario, when the account name is a private account, the corresponding accounting scenario may be a private transaction scenario, and when the account name is a public account, the corresponding accounting scenario may be a public transaction scenario. The present application embodiment does not specifically limit the accounting scenario.

[0040] Step S104, obtain the abstract class of the accounting processing implementation class, obtain the corresponding custom accounting processing method according to the abstract class, generate the target accounting processing implementation class based on the accounting scenario and the custom accounting processing method, and add the corresponding core system accounting interface.

[0041] In some embodiments, if the account type does not match the accounting processing implementation class, the execution subject can add a new accounting scenario and call a new core system accounting interface. Specifically, the execution subject only needs to transform the unified accounting module, and obtain the abstract class of the accounting processing implementation class configured by the unified accounting module. This abstract class, as the parent class, customizes four accounting processing methods, that is, the basic composition of the abstract class as the parent class contains four customized accounting processing methods, namely: interface matching (match) method, pre-processing (preDeal) method, outbound accounting (outBound) method and post-processing (postDeal) method. By inheriting the abstract class as the parent class to implement the four customized accounting processing methods of the abstract class, and combining the accounting elements sent by the caller corresponding to the obtained accounting scenario, a new accounting processing implementation class, namely the target accounting processing implementation class, is developed, and a core system accounting interface corresponding to the target accounting processing implementation class is added to the core system. It is realized that when it is necessary to add an accounting scenario and call a new core system accounting interface, only the unified accounting module needs to be transformed, and the transformation of the business module is extremely small. The unified accounting module reduces the coupling between business modules and core systems in the business system, greatly improving the scalability of the business system to accounting scenarios.

[0042] The execution subject can determine the functions that can be realized by the accounting scenario according to the accounting scenario, and generate the corresponding account processing implementation class according to the functions that can be realized, that is, the target accounting processing implementation class. A core system accounting interface corresponding to the target accounting processing implementation class is added to the core system.

[0043] Step S105, executing the target accounting processing implementation class to call the core system accounting interface to process the accounting request to complete the accounting.

[0044] Specifically, the target accounting processing implementation class inherits the abstract class that defines the custom accounting processing method.

[0045] By way of example, the above-mentioned preset method may include an interface matching method, a pre-processing method, an outbound call accounting method and a post-processing method. The embodiments of the present application do not specifically limit the preset method.

[0046] Specifically, the accounting method also includes: obtaining accounting results, updating the pre-recorded accounting flow according to the accounting results, and saving and returning the accounting results.

[0047] For example, update the accounting flow: according to the accounting result, update the pre-recorded accounting flow, save the accounting result and return the accounting result to the user.

[0048] Specifically, the accounting method also includes: obtaining a post-processing identifier corresponding to the core system accounting interface; in response to the post-processing identifier being non-empty, after calling the core system and before returning the accounting result, calling the post-processing method corresponding to the post-processing identifier to perform post-processing on the accounting result.

[0049] If the post-processing identifier is not empty, it indicates that the accounting result needs to be post-processed, such as deduplication, marking, etc. The embodiment of the present application does not specifically limit the post-processing. The user can customize the post-processing logic and bind it to the post-processing identifier, and then obtain the corresponding customized post-processing logic according to the post-processing identifier to post-process the accounting result.

[0050] This embodiment receives an accounting request, obtains the corresponding account identifier, determines the account type according to the account identifier; calls the unified accounting interface to execute the interface matching method based on the account type and obtains the matching result data; in response to the matching result data being empty, determines the accounting scenario based on the account type; obtains the abstract class of the accounting processing implementation class, obtains the corresponding custom accounting processing method according to the abstract class, generates the target accounting processing implementation class and adds the corresponding core system accounting interface based on the accounting scenario and the custom accounting processing method; executes the target accounting processing implementation class to call the core system accounting interface to process the accounting request to complete the accounting. This reduces the coupling degree of the accounting system and improves the scalability.

[0051] Figure 2 is a schematic diagram of the main process of the bookkeeping method according to an embodiment of the present application, such as Figure 2 As shown, the accounting method mainly includes the following steps S201-S208.

[0052] Step S201, receiving an accounting request, obtaining a corresponding account identifier, and determining an account type according to the account identifier.

[0053] The accounting request can be triggered at a fixed time or by a user operation. The embodiment of the present application does not specifically limit the timing of triggering the accounting request. The account identifier obtained from the accounting request can be an account number or an account name. The embodiment of the present application does not specifically limit the form and content of the account identifier.

[0054] The execution subject can determine the account level according to the account identifier, and then accurately determine the account type according to the account level. For example, the account level can be a member level or a general user level. The account type corresponding to the member level is a first-level account, that is, an account associated with customized benefits, and the account type corresponding to the general user level is a second-level account, that is, an account not associated with customized benefits.

[0055] Step S202, calling the unified accounting interface to execute the interface matching method based on the account type and obtain matching result data.

[0056] After determining the account type, the execution entity can call the unified accounting interface to execute the interface matching method based on the customized rights and interests associated with the determined account type to achieve accurate interface matching and improve accounting accuracy. After interface matching, the matching result data is obtained.

[0057] Step S203, in response to the matching result data being empty, determining the accounting scenario based on the account type.

[0058] If the matching result data is empty, the process of adding a new core system accounting interface is triggered to determine the corresponding accounting scenario based on the account type. Accounting scenarios may include credit card transaction scenarios, debit card transaction scenarios, digital currency transaction scenarios, etc. The present application embodiment does not specifically limit the accounting scenario. For example, if the account type is a primary account, the accounting scenario may be a credit card transaction scenario. If the account type is a secondary account, the accounting scenario may be a debit card transaction scenario.

[0059] Step S204, obtain the abstract class of the accounting processing implementation class, obtain the corresponding custom accounting processing method according to the abstract class, generate the target accounting processing implementation class based on the accounting scenario and the custom accounting processing method, and add the corresponding core system accounting interface.

[0060] Define an abstract class of the accounting processing implementation class, and implement the four custom accounting processing methods of the abstract class by inheriting the abstract class as the parent class. Combined with the accounting elements sent by the caller corresponding to the acquired accounting scenario, a new accounting processing implementation class is developed, namely the target accounting processing implementation class, and a core system accounting interface corresponding to the target accounting processing implementation class is added in the core system.

[0061] For example, accounting elements may include a payment account, a receiving account, and an accounting amount. After obtaining the accounting elements sent by the caller corresponding to the accounting scenario, the accounting elements may be pre-processed, specifically by querying and determining the account types of the payment account and the receiving account for subsequent use when needed.

[0062] Step S205, obtaining the accounting element corresponding to the accounting request, and obtaining the pre-processing identifier corresponding to the core system accounting interface.

[0063] For example, the accounting elements corresponding to the accounting request may include the payment account, the receiving account, and the accounting amount, etc., and the embodiments of the present application do not specifically limit the accounting elements. If the pre-processing identifier corresponding to the obtained core system accounting interface is empty, it means that there is no need to pre-process the accounting elements before calling the core system. For example, the pre-processing of accounting elements may include the unification of accounting element units, data cleaning, weight determination, etc., and the embodiments of the present application do not specifically limit the content of the pre-processing.

[0064] Step S206, in response to the pre-processing identifier being non-empty, calling the pre-processing method corresponding to the pre-processing identifier to pre-process the accounting element to obtain the pre-processed accounting element.

[0065] If the pre-processing indicator is not empty, it indicates that the accounting element needs to be pre-processed.

[0066] Specifically, the pre-processing method corresponding to the pre-processing identifier is called to pre-process the accounting element to obtain the pre-processed accounting element, including: searching the pre-processing method corresponding to the pre-processing identifier from the target accounting processing implementation class; and calling the pre-processing method to pre-process the accounting element.

[0067] The pre-processing method can be customized by the user and bound to the pre-processing identifier, so that the corresponding pre-processing method can be obtained based on the pre-processing identifier, and the accounting elements can be customized for pre-processing to obtain the pre-processed accounting elements after pre-processing. Accounting can be performed based on the pre-processing accounting elements to improve the accuracy of accounting.

[0068] Step S207, based on the design specification of the core system accounting interface, assemble the pre-processing accounting elements to generate an outbound call request message.

[0069] The design specifications of the core system accounting interface define the order, form, and format of the accounting element assembly. The execution entity can automatically convert the pre-processing accounting elements into outbound call request messages corresponding to the design specifications based on the design specifications of the core system accounting interface.

[0070] Step S208: Accounting the outbound call request message to the outbound call core system.

[0071] After generating the outbound call request message, the execution subject can generate an outbound call task based on the outbound call request message, call the thread pool to execute the outbound call task and perform accounting in the outbound call core system, thereby improving the accounting response speed and improving the accounting efficiency.

[0072] Figure 3 It is a schematic diagram of the system architecture of the accounting method according to an embodiment of the present application. At present, the banking system can generally be divided into a core system and a business system. The core system is mainly responsible for the functional implementation of the bank's core business, such as bank account management and account processing. This type of system only focuses on the processing of core accounts and will not intervene in the processing of specific businesses; the business system is mainly responsible for the functional implementation of various other businesses outside the bank's core business, such as acting as an agent for the collection and payment of funds by external units. This type of system focuses on the implementation of specific business logic and will not implement the processing of core accounts. However, as a bank's business system, it often involves accounting needs in different scenarios, and the business system will call the interface provided by the core system to complete the accounting.

[0073] The banking business system must meet the accounting needs in different scenarios. The accounting scenarios depend on the account types of both parties. Common account types include cash, personal accounts, corporate accounts, credit cards, digital currencies, and other bank accounts. For account transfers between various account types, the bank's core system will provide corresponding accounting interfaces for the business system to call.

[0074] The present application embodiment provides a banking system accounting method that automatically adapts to multiple scenarios, such as Figure 3 As shown, a unified accounting module is developed in the business system. The unified accounting module provides a unified accounting interface. The business system calls this interface for accounting when encountering any accounting scenario (such as accounting scenarios of business A, business B, business C, etc.). This unified accounting module will automatically adapt the corresponding core system accounting interface (such as one or more of the intra-bank transfer interface, inter-bank transfer interface, cash deposit interface, and credit card repayment interface) according to the accounting elements sent by the caller (such as one or more of business A, business B, business C, etc.), thereby completing the accounting.

[0075] The unified accounting module provides a unified accounting interface and standardized input and output design. When various businesses in the business system need to account, they only need to call this unified accounting interface and input various accounting elements according to the design of the unified accounting interface provided by the unified accounting module. After receiving the accounting request sent by the business module, the unified accounting module automatically adapts and determines the core system accounting interface that needs to be called according to the accounting elements, then assembles the outbound call request message according to the core system accounting interface and calls the core system accounting interface, and finally returns the accounting result to the business module. The code is concise, highly readable and easy to maintain. When any business in the business system encounters any accounting scenario, it calls the accounting interface of the unified accounting module, which can greatly simplify the accounting-related code. The accounting interface is unified and the development difficulty is reduced. When the business system develops any accounting-related functions, there is no need to pay attention to which core accounting interface corresponds to the accounting scenario, nor to how the corresponding core accounting interface is designed. Reduce the coupling between business processes and accounting processes and improve system scalability. When a new accounting scenario is needed, you only need to develop the new core accounting interface in the unified accounting module. The business process code still calls the interface of the unified accounting module without the need for extensive modifications.

[0076] Figure 4 It is a schematic diagram of the unified accounting module workflow of the accounting method according to an embodiment of the present application. The functions implemented in each step of the workflow are introduced as follows: accounting element preprocessing: accounting elements include payment accounts, collection accounts and accounting amounts, etc. The main work of accounting element preprocessing is to query and determine the account types of payment accounts and collection accounts; automatic adaptation of accounting interface: according to the account types of the accounts of both parties of accounting, automatically adapt the corresponding accounting processing implementation class of the core system accounting interface; accounting pre-processing: before calling the core system, some special processing is performed. The pre-processing of different accounting interfaces is different, and there may be no pre-processing; pre-recorded accounting flow: pre-record an accounting flow in the database; call the core system: according to the specific design of the core system accounting interface, assemble the request message, call the core system accounting interface, and parse the response message; update the accounting flow: according to the accounting results, update the pre-recorded accounting flow and save the accounting results; accounting post-processing: after calling the core system, before returning the processing results to the business module, some special processing is performed. The post-processing of different accounting interfaces varies, and there may be no post-processing.

[0077] The implementation method of the unified accounting module program code is as follows: define an abstract class of the accounting processing implementation class. This abstract class, as the parent class, defines four methods: interface matching (match), pre-processing (preDeal), outbound accounting (outBound), and post-processing (postDeal). For each accounting interface of the core system, a corresponding accounting processing implementation class is developed. These accounting processing implementation classes all inherit the parent class mentioned above. Due to the rewriting characteristics of Java, each accounting processing implementation class needs to implement the above four methods.

[0078] The unified accounting module provides a unified accounting interface. The unified accounting main process corresponding to the unified accounting interface is as follows: Accounting element preprocessing: implemented by a unified method in the main process. Automatic adaptation accounting interface: implemented by a unified method in the main process. First, obtain all accounting processing implementation classes, and call the interface matching (match) methods of these accounting processing implementation classes one by one. The interface matching (match) method of each accounting processing implementation class determines whether it matches according to the account types of the accounts of both parties to the accounting, and returns the matching result. When the match is successful, the main process will use the successfully matched accounting processing implementation class as the implementation carrier for the subsequent steps of the accounting main process; when the accounting processing implementation class cannot be matched, the accounting main process ends directly. Accounting pre-processing: implemented by the pre-processing (preDeal) method of each accounting processing implementation class. Pre-recording accounting flow: implemented by a unified method in the main process. Calling the core system: This is implemented by the outbound accounting (outBound) method of each accounting processing implementation class. Each accounting processing implementation class corresponds to a core system accounting interface. According to the design specifications of the core system accounting interface, the received accounting elements are assembled into an outbound call request message, and the outbound core system performs accounting. Updating the accounting flow: This is implemented by a unified method in the main process. Accounting post-processing: This is implemented by the post-processing (postDeal) method of each accounting processing implementation class.

[0079] The embodiment of the present application can realize the accounting of the banking business system that automatically adapts to multiple scenarios. A unified accounting module is developed in the business system, and the unified accounting module uniformly completes the accounting function. The unified accounting module encapsulates various accounting interfaces of the core system. When the business module of the business system needs to account, there is no need to pay attention to the specific design of various accounting interfaces of the core system. It only needs to call the accounting interface of the unified accounting module. It greatly simplifies the accounting-related codes in the business system, improves the readability of the code, and reduces the difficulty of system operation and maintenance. When the business system accounts, it only needs to call the unified accounting interface, which reduces the difficulty of system development. When it is necessary to add a new accounting scenario and call a new core system accounting interface, it only needs to modify the unified accounting module, and the modification of the business module is extremely small. The unified accounting module reduces the coupling degree between the business module and the core system in the business system, greatly improving the scalability of the business system to accounting scenarios.

[0080] Figure 5 Schematic diagram of the main units of the accounting device according to an embodiment of the present application. Figure 5 As shown, the accounting device 500 includes a receiving unit 501, an interface matching unit 502, an accounting scenario determining unit 503, an interface adding unit 504 and an accounting unit 505.

[0081] The receiving unit 501 is configured to receive an accounting request, obtain a corresponding account identifier, and determine an account type according to the account identifier.

[0082] The interface matching unit 502 is configured to call the unified accounting interface to execute the interface matching method based on the account type and obtain matching result data.

[0083] The accounting scenario determining unit 503 is configured to determine an accounting scenario based on the account type in response to the matching result data being empty.

[0084] The interface adding unit 504 is configured to obtain the abstract class of the accounting processing implementation class, obtain the corresponding custom accounting processing method according to the abstract class, generate the target accounting processing implementation class based on the accounting scenario and the custom accounting processing method, and add the corresponding core system accounting interface.

[0085] The accounting unit 505 is configured to execute the target accounting processing implementation class to call the core system accounting interface to process the accounting request to complete the accounting.

[0086] In some embodiments, the accounting unit 505 is further configured to: obtain the accounting elements corresponding to the accounting request, and obtain the pre-processing identifier corresponding to the core system accounting interface; in response to the pre-processing identifier being non-empty, call the pre-processing method corresponding to the pre-processing identifier to pre-process the accounting elements to obtain the pre-processed accounting elements; based on the design specifications of the core system accounting interface, assemble the pre-processing accounting elements to generate an outbound call request message; and use the outbound call request message to perform accounting for the outbound call to the core system.

[0087] In some embodiments, the accounting unit 505 is further configured to: search for a pre-processing method corresponding to the pre-processing identifier from the target accounting processing implementation class; and call the pre-processing method to perform pre-processing on the accounting element.

[0088] In some embodiments, the accounting device further includes Figure 5 The updating unit not shown in the figure is configured to: obtain the accounting result, update the pre-recorded account flow according to the accounting result, save and return the accounting result.

[0089] In some embodiments, the accounting device further includes Figure 5 The post-processing unit not shown in the figure is configured to: obtain the post-processing identifier corresponding to the accounting interface of the core system; in response to the post-processing identifier being non-empty, after calling the core system and before returning the accounting result, call the post-processing method corresponding to the post-processing identifier to post-process the accounting result.

[0090] In some embodiments, the target accounting processing implementation class inherits an abstract class that defines a custom accounting processing method.

[0091] It should be noted that the accounting method and accounting device of the present application have a corresponding relationship in terms of specific implementation content, so the repeated content will not be explained again.

[0092] Figure 6 An exemplary system architecture 600 to which the accounting method or accounting device according to the embodiment of the present application can be applied is shown.

[0093] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, 603, network 604 and server 605. Network 604 is used to provide a medium for communication links between terminal devices 601, 602, 603 and server 605. Network 604 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0094] The user can use the terminal devices 601, 602, 603 to interact with the server 605 through the network 604 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 601, 602, 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0095] The terminal devices 601, 602, 603 may be various electronic devices having an accounting processing screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0096] Server 605 can be a server that provides various services, such as a background management server that provides support for accounting requests submitted by users using terminal devices 601, 602, and 603 (only as an example). The background management server can receive accounting requests, obtain the corresponding account identifier, and determine the account type based on the account identifier; call the unified accounting interface to execute the interface matching method based on the account type and obtain the matching result data; in response to the matching result data being empty, determine the accounting scenario based on the account type; obtain the abstract class of the accounting processing implementation class, obtain the corresponding custom accounting processing method based on the abstract class, generate the target accounting processing implementation class based on the accounting scenario and the custom accounting processing method, and add the corresponding core system accounting interface; execute the target accounting processing implementation class to call the core system accounting interface to process the accounting request to complete the accounting. This reduces the coupling degree of the accounting system and improves scalability.

[0097] It should be noted that the accounting method provided in the embodiment of the present application is generally executed by the server 605, and accordingly, the accounting device is generally set in the server 605.

[0098] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0099] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of a terminal device suitable for implementing an embodiment of the present application. Figure 7 The terminal device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0100] like Figure 7As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 to a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the computer system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0101] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed so that a computer program read therefrom is installed into the storage section 708 as needed.

[0102] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present application are executed.

[0103] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. Computer-readable storage media may include, for example, but are not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples of computer-readable storage media may 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 application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may 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 may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0104] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0105] The units involved in the embodiments described in the present application may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes a receiving unit, an interface matching unit, an accounting scenario determination unit, an interface addition unit, and an accounting unit. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0106] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently 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 a device, the device receives an accounting request, obtains a corresponding account identifier, and determines the account type according to the account identifier; calls a unified accounting interface to execute an interface matching method based on the account type, and obtains matching result data; in response to the matching result data being empty, determines the accounting scenario based on the account type; obtains an abstract class of the accounting processing implementation class, obtains the corresponding custom accounting processing method according to the abstract class, generates a target accounting processing implementation class based on the accounting scenario and the custom accounting processing method, and adds a corresponding core system accounting interface; executes the target accounting processing implementation class to call the core system accounting interface to process the accounting request to complete the accounting.

[0107] The computer program product of the present application includes a computer program, and the computer program implements the accounting method in the embodiment of the present application when executed by a processor.

[0108] According to the technical solution of the embodiment of the present application, the coupling degree of the accounting system can be reduced and the scalability can be improved.

[0109] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A method of accounting, It is characterized in that include: Receiving an accounting request, obtaining a corresponding account identifier, and determining an account type according to the account identifier; Calling the unified accounting interface to execute the interface matching method based on the account type and obtain matching result data; In response to the matching result data being empty, determining a bookkeeping scenario based on the account type; Obtain an abstract class of an accounting processing implementation class, obtain a corresponding custom accounting processing method according to the abstract class, generate a target accounting processing implementation class based on the accounting scenario and the custom accounting processing method, and add a corresponding core system accounting interface; Execute the target accounting processing implementation class to call the core system accounting interface to process the accounting request to complete the accounting.

2. The method according to claim 1, It is characterized in that The executing the target accounting processing implementation class to call the core system accounting interface to process the accounting request to complete the accounting includes: Obtaining the accounting element corresponding to the accounting request, and obtaining the pre-processing identifier corresponding to the core system accounting interface; In response to the pre-processing identifier being non-empty, calling the pre-processing method corresponding to the pre-processing identifier to pre-process the accounting element to obtain the pre-processed accounting element; Based on the design specification of the core system accounting interface, assembling the pre-processing accounting elements to generate an outbound call request message; The outbound call request message is used to record the outbound call core system.

3. The method according to claim 2, It is characterized in that The calling of the pre-processing method corresponding to the pre-processing identifier to pre-process the accounting element to obtain the pre-processed accounting element includes: Searching for a pre-processing method corresponding to the pre-processing identifier from the target account processing implementation class; The pre-processing method is called to perform pre-processing on the accounting element.

4. The method according to claim 1, It is characterized in that The method further comprises: Obtain accounting results, update the pre-recorded accounting flow according to the accounting results, save and return the accounting results.

5. The method according to claim 4, It is characterized in that The method further comprises: Obtaining a post-processing identifier corresponding to the core system accounting interface; In response to the post-processing identifier being non-empty, after the outbound call to the core system and before the accounting result is returned, the post-processing method corresponding to the post-processing identifier is called to perform post-processing on the accounting result.

6. The method according to claim 1, It is characterized in that The target accounting processing implementation class inherits the abstract class defining the user-defined accounting processing method.

7. A bookkeeping device, It is characterized in that include: A receiving unit configured to receive an accounting request, obtain a corresponding account identifier, and determine an account type according to the account identifier; An interface matching unit is configured to call a unified accounting interface to execute an interface matching method based on the account type and obtain matching result data; a bookkeeping scenario determination unit, configured to determine a bookkeeping scenario based on the account type in response to the matching result data being empty; The interface adding unit is configured to obtain an abstract class of the accounting processing implementation class, obtain a corresponding custom accounting processing method according to the abstract class, generate a target accounting processing implementation class based on the accounting scenario and the custom accounting processing method, and add a corresponding core system accounting interface; The accounting unit is configured to execute the target accounting processing implementation class to call the core system accounting interface to process the accounting request to complete the accounting.

8. The device according to claim 7, It is characterized in that The accounting unit is further configured to: Obtaining the accounting element corresponding to the accounting request, and obtaining the pre-processing identifier corresponding to the core system accounting interface; In response to the pre-processing identifier being non-empty, calling the pre-processing method corresponding to the pre-processing identifier to pre-process the accounting element to obtain the pre-processed accounting element; Based on the design specification of the core system accounting interface, assembling the pre-processing accounting elements to generate an outbound call request message; The outbound call request message is used to record the outbound call core system.

9. The device according to claim 8, It is characterized in that The accounting unit is further configured to: Searching for a pre-processing method corresponding to the pre-processing identifier from the target account processing implementation class; The pre-processing method is called to perform pre-processing on the accounting element.

10. The device according to claim 7, It is characterized in that The apparatus further comprises an updating unit configured to: Obtain accounting results, update the pre-recorded accounting flow according to the accounting results, save and return the accounting results.

11. The device according to claim 10, It is characterized in that The device also includes a post-processing unit configured to: Obtaining a post-processing identifier corresponding to the core system accounting interface; In response to the post-processing identifier being non-empty, after the outbound call to the core system and before the accounting result is returned, the post-processing method corresponding to the post-processing identifier is called to perform post-processing on the accounting result.

12. The device according to claim 7, It is characterized in that The target accounting processing implementation class inherits the abstract class defining the user-defined accounting processing method.

13. An electronic accounting device, It is characterized in that include: 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 to 6.

14. A computer readable medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

15. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.