Plug-in type interest fee calculation method and system
Through the plug-in interest fee calculation method, the interest fee calculation logic and business functions are decoupled, flexible configuration and high scalability are achieved, and the problem of strong coupling of interest fee calculation logic and business functions in the existing technology is solved.
Patent Information
- Application Number
- CN202411853454.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-25
AI Technical Summary
In the prior art, the interest and fee calculation logic is strongly coupled with business functions, resulting in complex code, high maintenance costs, and lack of flexible configuration and scalability.
The plug-in interest fee calculation method is adopted to achieve decoupling and flexible configuration of interest fee calculation through the interest fee plug-in and pre-configured interest fee model. The interest fee plug-in is encapsulated as a reusable unit, and matches the corresponding interest fee model from the database according to the preset matching conditions, and performs interest fee calculation.
It realizes decoupling of interest-based calculation logic, reduces code complexity and maintenance costs, and improves system flexibility and scalability.
Smart Images

Figure CN119884159A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software engineering, and in particular to a plug-in interest and fee calculation method and system. Background Art
[0002] In existing computer software systems, interest and fee services (usually referring to the calculation and management of various fees, interest, etc.) are mostly implemented as fixed function modules built into the system. These modules usually have fixed processing logic and operation processes, that is, pre-defined calculation rules and steps. However, with the diversification of business needs, changes in the industry and technological advances, the limitations of traditional interest and fee service modules have gradually become apparent.
[0003] For interest and fee calculation scenarios, existing business systems usually redundantly add calculation logic to business codes and calculate interest and fee information during the execution of business processes. This technical solution has the following specific defects:
[0004] Redundant business logic: The interest and fee calculation logic is directly embedded in the business code, forming an inseparable part of the business process. This redundant design couples the interest and fee calculation logic with specific business functions, making the code complex and difficult to manage. Due to the strong coupling between interest and fee calculation and specific business operations, system maintenance personnel often need to spend a lot of time adjusting and optimizing these calculation logics in different business processes, increasing maintenance costs.
[0005] Excessive code coupling: The same interest and fee calculations are often involved in different process nodes, and these calculations are repeatedly written into different code blocks. This duplication of code not only violates the design principle of high cohesion and low coupling (that is, the modules of the system should minimize dependencies and operate independently), but also requires adjustments to be made in multiple places when the logic of interest and fee calculation needs to be modified, which is prone to errors. Especially when the system is upgraded or the business changes, the complexity of maintenance and modification is greatly increased.
[0006] Lack of flexible configuration and scalability: In traditional interest and fee service modules, calculation rules are mostly hard-coded in the system, lacking the ability to be flexibly configured. If adjustments are required based on business needs, developers must modify the code directly, which brings considerable risks and workload. Moreover, since the interest and fee calculation model itself is not abstracted, new calculation logic or service requirements must be implemented by modifying existing code, which limits the scalability and flexibility of the system. Summary of the invention
[0007] In view of this, an embodiment of the present invention provides a plug-in interest and fee calculation method and system to eliminate or improve one or more defects existing in the prior art.
[0008] In one aspect, the present invention provides a plug-in interest and fee calculation method, the method comprising the following steps:
[0009] Initiating an interest and fee calculation request, and configuring interest and fee information according to the interest and fee calculation request;
[0010] According to the interest and fee information, the interest and fee plug-in matches the corresponding interest and fee model from the database according to the preset matching conditions; wherein the interest and fee plug-in is pre-encapsulated as a reusable unit and packaged for system call; the interest and fee model is pre-configured with an interest and fee model table and an interest and fee parameter mapping table and then stored in the database; the interest and fee model table is used to store the basic information of the interest and fee model, and the interest and fee parameter mapping table is used to map the relationship between the business entity parameters and the interest and fee calculation expression parameters in the interest and fee model table;
[0011] The interest and fee plug-in replaces the parameters in the interest and fee calculation expression with actual values according to the mapping relationship between the interest and fee information and the interest and fee parameter mapping table, and performs interest and fee calculation;
[0012] Output and save the calculated interest and fee results.
[0013] In some embodiments of the present invention, the interest and fee plug-in is pre-packaged as a reusable unit and packaged for system call, including:
[0014] The interest and fee plug-in is implemented based on SpringBoot starter, and each module of the interest and fee plug-in is encapsulated into a reusable unit and packaged in the form of a jar package, including: project object model file, resource directory and code directory; the module includes at least a business logic module, a functional module and a configuration module.
[0015] In some embodiments of the present invention, the interest and fee model is pre-configured with an interest and fee model table and an interest and fee parameter mapping table, including:
[0016] The interest and fee model table includes an interest and fee calculation expression, a fee name, a business line and the matching condition; the interest and fee calculation expression includes business parameters, and the interest and fee result is obtained by executing the operation;
[0017] The interest and fee parameter mapping table includes the interest and fee model table primary key, expression parameters and business parameters; the interest and fee model table primary key is used to associate the interest and fee model table.
[0018] In some embodiments of the present invention, in the interest and fee model table, the method further includes:
[0019] The interest and fee model table includes an interest and fee calculation expression, and the interest and fee calculation expression includes business parameters, operation symbols and brackets;
[0020] When configuring the interest and fee calculation expression, an infix expression is used. When performing the interest and fee calculation, the infix expression is converted into a postfix expression and the postfix expression is calculated.
[0021] In some embodiments of the present invention, when performing interest and fee calculation, converting the infix expression into a postfix expression includes:
[0022] Create an empty stack to store the values, operator symbols and brackets in the infix expression; create an empty string as the postfix expression string;
[0023] Traverse the infix expression, record the current character and make a judgment;
[0024] If the current character is a number, the suffix expression string is concatenated with the number; if the current character is a left bracket, the left bracket is pushed into the stack; if the current character is a right bracket, the element at the top of the stack is popped out cyclically and concatenated into the suffix expression string until the stack is empty or the left bracket is popped out; if the current character is an operation symbol, the operation symbol is compared with the element at the top of the stack in terms of priority according to a preset rule, the element at the top of the stack is popped out cyclically until the stack is empty or the priority of the element at the top of the stack is less than the priority of the current character, the popped element at the top of the stack is concatenated into the suffix expression string, and the current character is pushed into the stack;
[0025] After the traversal is completed, all elements in the stack are popped out and sequentially concatenated to the end of the suffix expression string.
[0026] In some embodiments of the present invention, the calculation of the suffix expression includes:
[0027] Create an empty stack for storing the numerical values and operation symbols in the postfix expression;
[0028] Traverse the suffix expression, record the current character and make a judgment;
[0029] If the current character is a number, the current character is pushed into the stack; if the current character is an operation symbol, two top elements of the stack are popped out successively, recorded as the first value and the second value, the operation symbol is used to operate the first value and the second value, and the operation result is obtained, and the operation result is pushed into the stack;
[0030] After the traversal is completed, the remaining value in the stack is the final result.
[0031] On the other hand, the present invention further provides a plug-in interest and fee calculation system, which, when executed, implements the steps of any of the plug-in interest and fee calculation methods mentioned above, and the system includes:
[0032] The interest and fee configuration module is used to configure interest and fee information according to the interest and fee calculation request initiated by the user;
[0033] The business system is used to obtain the interest and fee information, call the pre-configured interest and fee plug-in, and receive the final interest and fee result;
[0034] An interest and fee plug-in, used to match the corresponding interest and fee model from the database according to the interest and fee information, and perform interest and fee calculation;
[0035] Database for storing pre-configured interest and fee models.
[0036] On the other hand, the present invention provides an electronic device, comprising a processor, a memory, and a computer program / instructions stored in the memory, wherein the processor is used to execute the computer program / instructions, and when the computer program / instructions are executed, the electronic device implements the steps of any of the methods mentioned above.
[0037] On the other hand, the present invention further provides a computer-readable storage medium having a computer program / instruction stored thereon, which implements the steps of any of the methods mentioned above when executed by a processor.
[0038] On the other hand, the present invention further provides a computer program product, comprising a computer program / instruction, which implements the steps of any of the methods mentioned above when executed by a processor.
[0039] The present invention provides a plug-in interest and fee calculation method and system, the method comprising: a user initiates an interest and fee calculation request, calling an interest and fee configuration module to configure interest and fee information according to the interest and fee calculation request; calling a pre-configured interest and fee plug-in, so that it matches the corresponding interest and fee model from the database according to the interest and fee information and the preset matching conditions, and replaces the parameters in the interest and fee calculation expression in the interest and fee model table of the corresponding interest and fee model with the actual values of the business entity according to the mapping relationship between the interest and fee information and the interest and fee parameter mapping table, and performs interest and fee calculation; finally outputs and saves the calculated interest and fee results. The present invention can realize interest and fee calculation by calling an interest and fee plug-in, and the use of a plug-in can better achieve version control. The business can upgrade the plug-in version only when there is a demand, and the relative plug-in version update will not affect the use of the historical version. At the same time, the plug-in will not be down relative to the business service that can be started and stopped. When the interaction with the storage network is normal, the plug-in will not have abnormal calls.
[0040] Furthermore, different business systems can have special implementations for their unique logic, and interest and fee models can also be designed differently according to product lines. The calculation method can be adjusted using a configured approach without modifying the code, greatly improving the flexibility of the system.
[0041] Furthermore, compared with the existing technology, the business system will no longer couple the logic of calculating interest and fees into the code. It only needs to reference the plug-in to achieve the purpose of calculating interest and fees, which improves development efficiency, reduces the difficulty for developers to understand the service, and reduces the complexity of the business system.
[0042] Furthermore, the use of standard interfaces can make business design more standardized, different businesses no longer require personalized processing, and have stronger scalability. After unifying the interest and fee processing logic, when maintaining related codes, only the interest and fee module needs to be processed, which improves the scalability and maintainability of the system.
[0043] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically indicated in the specification and the accompanying drawings.
[0044] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of the present application, and do not constitute a limitation of the present invention. In the drawings:
[0046] Figure 1 The figure is a schematic diagram of the steps of a plug-in interest and fee calculation method in one embodiment of the present invention.
[0047] Figure 2 The present invention is a timing diagram of a plug-in interest and fee calculation system executing a plug-in interest and fee calculation method in one embodiment of the present invention. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0049] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.
[0050] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0051] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.
[0052] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0053] In order to solve the problems of business logic redundancy, code coupling, and inflexible configuration in the existing interest and fee calculation technical solutions, the present invention provides a plug-in interest and fee calculation method, such as Figure 1 As shown, the present invention includes the following steps S101 to S104:
[0054] Step S101: Initiate an interest and fee calculation request, and configure interest and fee information according to the interest and fee calculation request.
[0055] Step S102: According to the interest and fee information, the interest and fee plug-in matches the corresponding interest and fee model from the database according to the preset matching conditions. Among them, the interest and fee plug-in is pre-packaged as a reusable unit and packaged for system call; the interest and fee model is pre-configured with the interest and fee model table and the interest and fee parameter mapping table, and then stored in the database; the interest and fee model table is used to store the basic information of the interest and fee model, and the interest and fee parameter mapping table is used to map the relationship between the business entity parameters and the interest and fee calculation expression parameters in the interest and fee model table.
[0056] Step S103: the interest and fee plug-in replaces the parameters in the interest and fee calculation expression with actual values according to the mapping relationship between the interest and fee information and the interest and fee parameter mapping table, and performs interest and fee calculation;
[0057] Step S104: Output and save the calculated interest and fee results.
[0058] In step S101, the user initiates an interest and fee calculation request and configures interest and fee information according to the interest and fee calculation request.
[0059] The user initiates a request to the system that requires interest and fee calculation. The request may be a transaction request, a bill request, or other business scenarios that require fee calculation. The request data usually contains basic business information, such as transaction amount, transaction type, user ID, etc. The interest and fee information is configured based on the request data.
[0060] In step S102, based on the interest and fee information, the interest and fee plug-in matches the corresponding interest and fee model from the database according to the preset matching conditions.
[0061] The interest and fee model and interest and fee plug-in are both pre-configured and implemented, and the configuration of the two is further explained.
[0062] The interest and fee model is used to define the interest and fees themselves and their attributes. It supports visual configuration and can meet the real-time changes and dynamic loading of the business system after adjusting the model.
[0063] The configuration of the interest and fee model includes two parts: table structure design and specific implementation.
[0064] Table structure design: The interest and fee model has an interest and fee model table and an interest and fee parameter mapping table.
[0065] The design code of the interest and fee model table is as follows:
[0066] CREATE TABLE `charge_model`(
[0067] `id` bigint(20) NOT NULL,
[0068] `expression`varchar(500)NOT NULL COMMENT'Interest and fee calculation expression',
[0069] `fee_name`varchar(100)NOT NULLl COMMENT'Fee name',
[0070] `business`varchar(100)NOT NULL COMMENT'Business line',
[0071] `matching_condition`varchar(200)DEFAULT NULL COMMENT'matching condition',
[0072] PRIMARY KEY (`id`)
[0073] )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Interest and Fee Model Table';
[0074] Based on the above code, we can know that the interest and expense model table is used to describe the basic information of interest and expense, including interest and expense calculation expressions, expense names, business lines and matching conditions. Among them, the interest and expense calculation expression consists of business parameters, operation symbols (+, -, *, / ) and brackets, and the interest and expense results are obtained by performing operations; the expense name refers to the business name of the interest and expense, which is a unique identifier in the business and is used to describe a certain interest and expense; the business line refers to the business line to which the interest and expense records belong, which can be used to filter data when calculating interest and expense in the business; the matching condition is used to match the interest and expense model corresponding to the interest and expense information to be calculated. In the above code, only one field is used to simply indicate that a certain interest and expense model can be matched through the current field. In actual business, there should be more complex matching conditions.
[0075] The design code of the interest and fee parameter mapping table is as follows:
[0076] CREATE TABLE`charge_column_map`(
[0077] `id` bigint(20) NOT NULL,
[0078] `charge_model_id` bigint(20) NOT NULL COMMENT 'Primary key of the charge model table',
[0079] `expression_column`varchar(100)NOT NULLl COMMENT'expression parameter',
[0080] `business_column`varchar(100)NOT NULL COMMENT'Business parameters',
[0081] PRIMARY KEY (`id`)
[0082] )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Interest and fee parameter mapping table';
[0083] Based on the code, we can know that the interest and fee parameter mapping table is used to map the relationship between business entity parameters and the interest and fee calculation expression parameters in the interest and fee model table. Among them, the business entity parameters may not be the same as the parameter names in the expression. The mapping relationship between the business parameters and the expression parameters recorded in the current table is replaced when the interest and fees are finally calculated to obtain the result. The interest and fee parameter mapping table includes the primary key of the interest and fee model table, expression parameters, and business parameters. Among them, the primary key of the interest and fee model table is a foreign key, which is used to associate with the interest and fee model table, indicating that the current record is a mapping relationship of a record in the interest and fee model table; the expression parameter represents the parameter string in the interest and fee calculation expression field in the interest and fee model table, which is used to replace it with the real value in the business; the business parameter represents the parameter field name used to calculate the interest and fees in the business entity, which is used to obtain the real value in the business entity.
[0084] Therefore, by setting up the interest and fee model configuration page, the real-time configuration of the interest and fee model can be achieved. The backend is supported by services that can be started and stopped independently, and the configured information is stored in the database according to the contents of the above table.
[0085] It should be noted that when setting expression parameters, the strings cannot contain each other, otherwise there will be problems during replacement.
[0086] The interest and fee plug-in is used to support the business system functions. After the interest and fee plug-in is introduced, the business system can call the interface encapsulated in the plug-in to implement the interest and fee calculation function without worrying about the calculation logic of the interest and fee itself.
[0087] In some embodiments, the interest and fee plug-in is implemented based on SpringBoot starter, and each module of the interest and fee plug-in is encapsulated into a reusable unit and packaged in the form of a jar package, including: project object model file, resource directory and code directory; the module includes at least a business logic module, a functional module and a configuration module. Specifically:
[0088] Project Object Model (POM) file: responsible for introducing the dependencies required for the project, such as SpringBoot dependencies, database drivers, database connection pools, Mybatis dependencies, JSON serialization dependencies, packaging configurations, Maven packaging plug-ins, etc.
[0089] Resource directory: contains mapper.xml files, Spring.factories startup files, project configuration files, etc. It should be noted that the project configuration file name should be different from the common project configuration file name to prevent reading problems due to repeated names when other projects are introduced.
[0090] The code directory includes the configuration directory and the business directory.
[0091] Configuration directory: including Spring Bean scanning configuration, which can inject the Spring Bean of the interest and fee plug-in when the business service starts; Mybatis configuration, which configures a separate data source so that the interest and fee model information can be queried.
[0092] Business catalog: Contains the most important abstract class of the interest and fee plug-in, encapsulating the relevant interfaces and public methods required for calculation; the implementation of the abstract class can perform different logical processing according to different businesses, and the implementation class to be injected is ultimately marked by the Bean name during business injection.
[0093] Based on the above configuration, the interest and fee plug-in matches the corresponding interest and fee model from the database according to the interest and fee information and the matching conditions preset in the interest and fee model table.
[0094] In step S103, the interest and fee plug-in replaces the parameters in the interest and fee calculation expression with actual values according to the mapping relationship between the interest and fee information and the interest and fee parameter mapping table, and performs interest and fee calculation.
[0095] In some embodiments, when configuring the interest and fee calculation expression, an infix expression is used. When performing the interest and fee calculation, the infix expression is converted into a postfix expression and the postfix expression is calculated. Among them, infix expressions are more commonly used in daily teaching, and the operator is located between the operands. Postfix expressions, also called Reverse Polish Notation (RPN), are an expression form without brackets and priorities, and the operator is located after the operand.
[0096] In some embodiments, converting an infix expression into a postfix expression comprises the following steps:
[0097] Create an empty stack to store the values, operator symbols, and parentheses in the infix expression; create an empty string as the postfix expression string (Postfix Expression).
[0098] Traverse the infix expression, record the current character (Infix Current) and make a judgment.
[0099] If the current character is a number, the suffix expression string is concatenated with the number; if the current character is a left bracket, the left bracket is pushed into the stack; if the current character is a right bracket, the element at the top of the stack is popped out in a loop and concatenated into the suffix expression string until the stack is empty or the left bracket is popped out; if the current character is an operator, the operator and the element at the top of the stack are compared in priority according to preset rules, the top element of the stack is popped out in a loop until the stack is empty or the priority of the element at the top of the stack is less than the priority of the current character, the popped top element is concatenated into the suffix expression string, and the current character is pushed into the stack.
[0100] Among them, operators * and / have the highest priority, followed by + and -, and the rest have the lowest priority.
[0101] Among them, in the case where the current character is an operation symbol, the current character is finally pushed into the stack because there may be subsequent operations with higher priority that need to be calculated in advance. In this case, the current operation needs to be placed afterward.
[0102] After the traversal is completed, all elements in the stack are popped out and sequentially concatenated to the postfix expression string, thus completing the conversion of the infix expression to a postfix expression.
[0103] Here is the corresponding pseudo code:
[0104]
[0105]
[0106] In some embodiments, when calculating the suffix expression, the following steps are included:
[0107] Create an empty stack to store the values and operators in the postfix expression.
[0108] Traverse the suffix expression, record the current character (Postfix Current) and make a judgment.
[0109] If the current character is a number, push the current character into the stack; if the current character is an operation symbol, pop the two top elements of the stack in turn, record them as the first value a and the second value b, use the operation symbol to operate on the first value and the second value in the order of 'a''Postfix Current''b', get the operation result, and push the operation result into the stack.
[0110] After the traversal is completed, the remaining value in the stack is the final result.
[0111] Here is the corresponding pseudo code:
[0112]
[0113] In step S104, the calculated interest and fee results are saved.
[0114] Corresponding to the plug-in interest and fee calculation method, the present invention also provides a plug-in interest and fee calculation system, such as Figure 2 As shown, the system includes interest and fee configuration module, business system, interest and fee plug-in and database, specifically:
[0115] The interest and fee configuration module is used to configure interest and fee information based on the interest and fee calculation request initiated by the user.
[0116] The business system is used to obtain interest and fee information, call pre-configured interest and fee plug-ins, and receive the final interest and fee results.
[0117] The interest and fee plug-in is used to match the corresponding interest and fee model from the database according to the interest and fee information, and perform interest and fee calculations.
[0118] The database is used to store pre-configured interest and fee models.
[0119] Corresponding to the above method, the present invention also provides an electronic device, comprising a processor, a memory and a computer program / instructions stored in the memory, characterized in that the processor is used to execute the computer program / instructions, and when the computer program / instructions are executed, the electronic device implements the steps of the method described above.
[0120] The embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the aforementioned edge computing server deployment method are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.
[0121] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.
[0122] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0123] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.
[0124] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A plug-in interest and fee calculation method, characterized in that: The method comprises the following steps: Initiating an interest and fee calculation request, and configuring interest and fee information according to the interest and fee calculation request; According to the interest and fee information, the interest and fee plug-in matches the corresponding interest and fee model from the database according to the preset matching conditions; wherein the interest and fee plug-in is pre-encapsulated as a reusable unit and packaged for system call; the interest and fee model is pre-configured with an interest and fee model table and an interest and fee parameter mapping table and then stored in the database; the interest and fee model table is used to store the basic information of the interest and fee model, and the interest and fee parameter mapping table is used to map the relationship between the business entity parameters and the interest and fee calculation expression parameters in the interest and fee model table; The interest and fee plug-in replaces the parameters in the interest and fee calculation expression with actual values according to the mapping relationship between the interest and fee information and the interest and fee parameter mapping table, and performs interest and fee calculation; Output and save the calculated interest and fee results.
2. The plug-in interest and fee calculation method according to claim 1, characterized in that: The interest and fee plug-ins are pre-packaged as reusable units and packaged for system calls, including: The interest and fee plug-in is implemented based on SpringBoot starter, and each module of the interest and fee plug-in is encapsulated into a reusable unit and packaged in the form of a jar package, including: project object model file, resource directory and code directory; the module includes at least a business logic module, a functional module and a configuration module.
3. The plug-in interest and fee calculation method according to claim 1, characterized in that: The interest and fee model is pre-configured with an interest and fee model table and an interest and fee parameter mapping table, including: The interest and fee model table includes an interest and fee calculation expression, a fee name, a business line and the matching condition; the interest and fee calculation expression includes business parameters, and the interest and fee result is obtained by executing the operation; The interest and fee parameter mapping table includes the interest and fee model table primary key, expression parameters and business parameters; the interest and fee model table primary key is used to associate the interest and fee model table.
4. The plug-in interest and fee calculation method according to claim 1, characterized in that: In the interest and fee model table, the method further includes: The interest and fee model table includes an interest and fee calculation expression, and the interest and fee calculation expression includes business parameters, operation symbols and brackets; When configuring the interest and fee calculation expression, an infix expression is used. When performing the interest and fee calculation, the infix expression is converted into a postfix expression and the postfix expression is calculated.
5. The plug-in interest and fee calculation method according to claim 4, characterized in that: When performing interest and fee calculations, infix expressions are converted to postfix expressions, including: Create an empty stack to store the values, operator symbols and brackets in the infix expression; create an empty string as the postfix expression string; Traverse the infix expression, record the current character and make a judgment; If the current character is a number, the suffix expression string is concatenated with the number; if the current character is a left bracket, the left bracket is pushed into the stack; if the current character is a right bracket, the element at the top of the stack is popped out cyclically and concatenated into the suffix expression string until the stack is empty or the left bracket is popped out; if the current character is an operation symbol, the operation symbol is compared with the element at the top of the stack in terms of priority according to a preset rule, the element at the top of the stack is popped out cyclically until the stack is empty or the priority of the element at the top of the stack is less than the priority of the current character, the popped element at the top of the stack is concatenated into the suffix expression string, and the current character is pushed into the stack; After the traversal is completed, all elements in the stack are popped out and sequentially concatenated to the end of the suffix expression string.
6. The plug-in interest and fee calculation method according to claim 5, characterized in that: When calculating the suffix expression, it includes: Create an empty stack for storing the numerical values and operation symbols in the postfix expression; Traverse the suffix expression, record the current character and make a judgment; If the current character is a number, the current character is pushed into the stack; if the current character is an operation symbol, two top elements of the stack are popped out successively, recorded as the first value and the second value, the operation symbol is used to operate the first value and the second value, and the operation result is obtained, and the operation result is pushed into the stack; After the traversal is completed, the remaining value in the stack is the final result.
7. A plug-in interest and fee calculation system, characterized in that: When the system is executed, the steps of the plug-in interest and fee calculation method according to any one of claims 1 to 6 are implemented, and the system includes: The interest and fee configuration module is used to configure interest and fee information according to the interest and fee calculation request initiated by the user; The business system is used to obtain the interest and fee information, call the pre-configured interest and fee plug-in, and receive the final interest and fee result; An interest and fee plug-in, used to match the corresponding interest and fee model from the database according to the interest and fee information, and perform interest and fee calculation; Database for storing pre-configured interest and fee models.
8. An electronic device comprising a processor, a memory and a computer program / instruction stored in the memory, characterized in that: The processor is used to execute the computer program / instructions. When the computer program / instructions are executed, the electronic device implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.