A processing method and device for settlement factors

Through the Python script processing of the settlement factor interface of the remuneration system, the flexible processing and calculation decoupling of factor data is realized, and the stability and efficiency problems during the factor change and upgrading of the remuneration system are solved, thereby improving the stability and development efficiency of the system.

CN113537908BActive Publication Date: 2024-12-06ASIAINFO TECH CHINA INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010284649.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-13
Publication Date
2024-12-06
Estimated Expiration
2040-04-13

AI Technical Summary

Technical Problem

When the existing remuneration system is updated, it is necessary to frequently develop new settlement factor interfaces, resulting in unstable system version, difficult positioning problems, low development efficiency and poor stability.

Method used

Generate the target calling interface through python scripts, obtain and process the target data, determine the target settlement factor, use python scripts for calculation, support the configurable loading of factor dependency tables, encapsulate the shared memory interface for python script calls to dynamic libraries, realize factor processing and decoupling of calculations.

Benefits of technology

There is no need to reconstruct the settlement module in system design. You only need to replace the python script to upgrade the factor, which improves factor development efficiency and system stability, and reduces the complexity and risks of factor interface development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113537908B_ABST
    Figure CN113537908B_ABST
Patent Text Reader

Abstract

The present invention discloses a processing method and device for settlement factors, the method comprises obtaining target data, determining a processing scheme matching the target data, determining a target settlement factor according to the processing scheme, calling the target settlement factor according to a target calling interface, so that the target stage factor obtained by calling calculates the target data according to the processing scheme to obtain a calculation result, wherein the target calling interface is generated by a python script. When the system design factor is changed and upgraded, there is no need to reconstruct the settlement requirement, only to replace the python script, thereby improving the system's processing efficiency for the factor, and the factor can be implemented separately using a python script, decoupling the factor processing and calculation process, and improving the system stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information processing technology, and in particular to a method and device for processing settlement factors. Background Art

[0002] With the continuous development of information technology, business commission settlement systems have emerged. The emergence of business remuneration settlement systems (remuneration systems for short) has replaced manual settlement of business commissions and improved the efficiency of business commission settlement. At present, the remuneration system mainly uses distributed computing engines and cloud scheduling frameworks to achieve horizontal expansion of remuneration computing capabilities. In the remuneration system, remuneration batch pricing is the core module. It mainly processes the regularized data sources into corresponding remuneration factors according to business requirements. At the same time, the batch pricing engine is used to calculate the results of the remuneration scheme based on the remuneration factor configuration, and outputs the remuneration that should be paid for each user order. If the order does not meet the remuneration payment requirements, the reason for the unsettled remuneration is output.

[0003] As the remuneration scheme is constantly updated, new settlement factors will be formulated in the new remuneration scheme according to new rules. In order to support the batch price settlement of remuneration for the remuneration scheme, the remuneration system needs to frequently develop new settlement factor interfaces.

[0004] Most of the settlement factor interfaces in the current remuneration system are developed in C++, which is the same language as the remuneration system. The settlement factor interfaces are embedded in the remuneration system in the form of static functions. Although this settlement factor processing method is efficient, since the entire system compilation process uses static library links and finally generates executable files, as long as there is a new settlement factor interface, all dependent factor executable programs and intermediate files (static libraries) need to be recompiled and generated. Each change in factor requirements requires frequent upgrades of all files, which will make the version of the fundraising system unstable. If problems are encountered, it is difficult for on-site operation and maintenance personnel to locate the problems, resulting in low factor development efficiency and poor system stability. Summary of the invention

[0005] In view of the above problems, the present invention provides a method and device for processing settlement factors, which achieves the purpose of improving factor development efficiency and system stability.

[0006] In order to achieve the above object, the present invention provides the following technical solutions:

[0007] A method for processing a settlement factor, the method comprising:

[0008] Acquiring target data, wherein the target data represents a data source that can be used for calculation of a remuneration system;

[0009] Determining a processing solution that matches the target data;

[0010] Determining a target settlement factor based on the treatment plan;

[0011] According to the target calling interface, the target settlement factor is called, so that the target stage factor obtained by the call is used to calculate the target data according to the processing scheme to obtain a calculation result, wherein the target calling interface is generated by a python script.

[0012] Optionally, calling the target settlement factor according to the target calling interface includes:

[0013] Reading a factor dependency table through the target calling interface, wherein the factor dependency table includes configuration information of a settlement factor;

[0014] Obtaining configuration information in the factor dependency table that matches the target calling interface;

[0015] Based on the configuration information, a target settlement factor is determined.

[0016] Optionally, the configuration information matching the target calling interface in the acquisition factor dependency table includes:

[0017] Obtaining a specified loading column matching the factor dependency table;

[0018] Calculating a string length based on the specified loading column, and determining a class model according to the string length;

[0019] The configuration information matching the target calling interface in the factor dependency table is called by using the class model to obtain the configuration information.

[0020] Optionally, the method further comprises:

[0021] According to the configuration information, each field of the factor dependency table is parsed to obtain a data value matching each field, so that the data value is applied to the calculation of the target data.

[0022] Optionally, the method further comprises:

[0023] Determine the factor value of the settlement factor, so that the Python script settlement factor class object is called and obtained through the factor value;

[0024] The settlement factor script based on the python script makes an interface call to the calculation factor corresponding to the identification parameter according to the identification parameter of the factor passed into the calling function, and obtains the target settlement factor;

[0025] In response to the settlement factor requiring shared memory access, the interface class of the shared memory is encapsulated and compiled into a dynamic library form that can be imported by the Python script for calling by the Python script.

[0026] A processing device for a settlement factor, the device comprising:

[0027] An acquisition unit, used for acquiring target data, wherein the target data represents a data source that can be used for calculation of the remuneration system;

[0028] A first determining unit, used to determine a processing solution matching the target data;

[0029] A second determining unit, configured to determine a target settlement factor according to the processing scheme;

[0030] A calling unit is used to call the target settlement factor according to a target calling interface, so that the target stage factor obtained by calling calculates the target data according to the processing scheme to obtain a calculation result, wherein the target calling interface is generated by a python script.

[0031] Optionally, the calling unit includes:

[0032] A reading subunit, used to read a factor dependency table through the target calling interface, wherein the factor dependency table includes configuration information of a settlement factor;

[0033] A first acquisition subunit is used to acquire configuration information in the factor dependency table that matches the target calling interface;

[0034] The first determining subunit is used to determine a target settlement factor based on the configuration information.

[0035] Optionally, the first acquiring subunit is specifically used for:

[0036] Obtaining a specified loading column matching the factor dependency table;

[0037] Calculating a string length based on the specified loading column, and determining a class model according to the string length;

[0038] The configuration information matching the target calling interface in the factor dependency table is called by using the class model to obtain the configuration information.

[0039] Optionally, the device further comprises:

[0040] The parsing subunit is used to parse each field of the factor dependency table according to the configuration information to obtain a data value matching each field, so that the data value is applied to the calculation of the target data.

[0041] Optionally, the device further comprises:

[0042] The third determining subunit is used to determine the factor value of the settlement factor, so that the Python script settlement factor class object is called and obtained through the factor value;

[0043] An interface calling unit is used for the settlement factor script based on the python script to perform an interface call on the calculation factor corresponding to the identification parameter according to the identification parameter of the factor passed into the calling function, so as to obtain the target settlement factor;

[0044] The encapsulation unit is used to encapsulate and compile the shared memory interface class into a dynamic library form that can be imported by the Python script for the Python script to call when the settlement factor needs to access the shared memory.

[0045] Compared with the prior art, the present invention provides a processing method and device for settlement factors, which includes obtaining target data, determining a processing scheme matching the target data, determining a target settlement factor according to the processing scheme, and calling the target settlement factor according to a target calling interface, so that the target stage factor obtained by calling calculates the target data according to the processing scheme to obtain a calculation result, wherein the target calling interface is generated by a python script. When the system design factor is changed and upgraded, there is no need to reconstruct the settlement requirement, only to replace the python script, which improves the system's processing efficiency for the factor, and the factor can be implemented separately using a python script, decoupling the factor processing and calculation process, and improving the system stability. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0047] Figure 1 A schematic diagram of the relationship between a remuneration rating module and a remuneration processing flow provided in an embodiment of the present invention;

[0048] Figure 2 A schematic diagram of the calling relationship between the batch price engine module and external data provided by an embodiment of the present invention;

[0049] Figure 3 A flowchart of a method for processing a settlement factor provided by an embodiment of the present invention;

[0050] Figure 4 A schematic diagram of the structure of a processing device for settlement factors provided in an embodiment of the present invention. DETAILED DESCRIPTION

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

[0052] The terms "first" and "second" and the like in the specification and claims of the present invention and the above drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.

[0053] In an embodiment of the present invention, a processing method for settlement factors is provided, which is applied to a remuneration system. In a remuneration system, remuneration batch pricing is a core module, which mainly processes the regularized data source into the remuneration factor required by the remuneration rule according to the business requirements, and realizes the result calculation of the remuneration scheme based on the remuneration factor configuration through the batch pricing engine. Figure 1 , is a schematic diagram showing the relationship between a remuneration batch pricing module and a remuneration processing flow. The batch pricing engine module will call the remuneration factor processing interface, directly or indirectly obtain the corresponding information from the order-related shared memory data, and according to the requirements of the factor processing rules, form the result value of the factor and output it to the batch pricing function as the input condition of each remuneration settlement rule. The calling relationship between the batch pricing engine module and external data is shown in the figure. Figure 2 shown.

[0054] See also Figure 3 , which shows a flow chart of a method for processing a settlement factor provided by an embodiment of the present invention. The method may include the following steps:

[0055] S101. Obtain target data, where the target data represents a data source that can be used for calculation of a remuneration system.

[0056] The standardization and preprocessing modules in the remuneration system can be used to extract, filter and regularize the batch price source data, provide data used by the subsequent remuneration calculation process module, and obtain the target data, which is the data basis for subsequent calculations of the target data.

[0057] S102: Determine a processing solution that matches the target data.

[0058] The corresponding processing scheme can be matched according to the data information in the target data. For example, the remuneration settlement calculation module mainly performs order data source batch pricing and matches the remuneration scheme of the approximate order business according to the order data information.

[0059] S103, determining a target settlement factor according to the processing scheme;

[0060] S104. Call the target settlement factor according to the target calling interface, so that the target stage factor obtained by calling calculates the target data according to the processing scheme to obtain a calculation result, wherein the target calling interface is generated by a python script.

[0061] The target settlement factor is the basis for calculation. For example, all matching remuneration plans are obtained, and then the remuneration settlement calculation is performed once according to the remuneration plan, and finally the batch price result is generated. The tariff conditions and tariff logic in the remuneration plan are composed of settlement factors and operators. When performing settlement, all settlement factor interfaces involved will be called for calculation.

[0062] In the embodiment of the present invention, calling the target settlement factor according to the target calling interface includes:

[0063] Through the target calling interface, read the factor dependency table, the factor dependency table includes the configuration information of the settlement factor; obtain the configuration information in the factor dependency table that matches the target calling interface; and determine the target settlement factor based on the configuration information.

[0064] In order to make up for the lack of factor implementation interface in the prior art, an embodiment of the present invention provides a settlement factor implementation interface method based on the python scripting language. In order to achieve the above purpose, the factor dependency table loading and acquisition support is configurable. Since there are many factor dependency tables involved in the settlement factor (for example, in some systems, there may be more than 40 dependency tables), the loading fields corresponding to each table are inconsistent, but the loaded primary key (m_lKey) and the offset of the next data area with the same primary key (m_iNumNexSet) are basically the same for each dependency table. The different parts are the loading columns of each table. The loading program reads the columns that need to be loaded in each table of the factor dependency table through configuration, and then splices them into column strings according to the specified splicing order and separator and saves them as the loading class member (m_szTableData) corresponding to the dependency table. Since the total length of the strings spliced ​​by all specified columns of different loading tables is inconsistent, in order to save shared memory space, a certain number of dependency table loading classes are constructed according to the column string length modulo 50. All factor dependency table loadings calculate the column string length according to the specified loading column, thereby automatically selecting the constructed class model as the loading class of the table to load the dependency table data. That is, in the embodiment of the present invention, the configuration information in the factor dependency table that matches the target call interface is obtained, including: obtaining the specified loading column that matches the factor dependency table; calculating the string length based on the specified loading column, and determining the class model according to the string length; using the class model to call the configuration information in the factor dependency table that matches the target call interface to obtain the configuration information. The corresponding configuration information can be obtained by determining the class model of the string length.

[0065] Since the loading data model is abstracted, the data structure of the tables that the reward system depends on is loaded into the memory and remains consistent. This allows you to configure a new table that depends on reward factors.

[0066] Correspondingly, in the embodiment of the present invention, each field of the factor dependency table is parsed according to the configuration information to obtain a data value matching each field, so that the data value can be applied to the calculation of the target data.

[0067] The standardized memory structure provides a standard data access interface for the remuneration factor. The Python factor processing interface can read the remuneration dependency data table through a standard data interface and parse each field of the remuneration dependency data according to the configuration information. The obtained dependency table data is in a standard row-level format. Each column of the dependency table is concatenated and saved in a standard format with the name m_szTableDate. The specific values ​​of the columns are required to participate in the calculation of the remuneration factor, so the concatenated column string needs to be parsed to obtain the specific values ​​of all columns.

[0068] In the embodiment of the present invention, the method further includes:

[0069] Determine the factor value of the settlement factor, so that the Python script settlement factor class object is called and obtained through the factor value;

[0070] The settlement factor script based on the python script makes an interface call to the calculation factor corresponding to the identification parameter according to the identification parameter of the factor passed into the calling function, and obtains the target settlement factor;

[0071] In response to the settlement factor requiring shared memory access, the interface class of the shared memory is encapsulated and compiled into a dynamic library form that can be imported by the Python script for calling by the Python script.

[0072] The Python-based settlement factor development interface has made significant improvements in the development and release of new factors. It provides Python embedded and C++ extension function support through the boost.Python library. New factors can be developed and implemented through Python scripts. When the remuneration system involves the upgrade of new factors, it is responsible for publishing the factor script to complete the release.

[0073] In an embodiment of the present invention, a method for a batch pricing engine to call a settlement factor is also provided, and the method may include the following steps:

[0074] S201. Extract, filter and regularize the batch price source data through the standardization and preprocessing module for use by the subsequent remuneration calculation and settlement process module.

[0075] S202, the remuneration settlement calculation module mainly performs order data source batch pricing, and first matches the remuneration plan of the order business according to the order source data information.

[0076] S203, obtain all matched remuneration plans, then perform remuneration settlement calculations in sequence according to the remuneration plans, and finally generate batch pricing results. The tariff conditions and tariff logic in the remuneration plan are composed of settlement factors and operators. When performing settlement, all settlement factor interfaces involved will be called for calculation.

[0077] S204, when the python factor class of the wholesale price engine is initialized, the factor script implemented in python is embedded into the c++ factor class through the python script embedding function provided by the boost.Python library, and the factor class object calculated by the python script is obtained. After that, when the factor value needs to be obtained, it can be called and obtained through the class object.

[0078] S205. The remuneration settlement calculation sub-process calls the factor value interface function of the settlement factor class object to obtain the settlement factor value result, and at the same time passes the dependent data required in the factor implementation logic as function parameters.

[0079] S206. The Python-based settlement factor script calls the specific factor implementation interface according to the factor ID parameter passed into the calling function.

[0080] S207. When the settlement factor implementation logic needs to access shared memory, the C++ extension technology provided by the boost.Python library needs to be used to encapsulate and compile the C++ interface class for accessing shared memory into a dynamic library form that can be imported by the Python script for the Python script to call.

[0081] S208, the settlement factor obtains the user-related data from the shared memory and performs other related logical processing to calculate the final result.

[0082] S209, the calculation factors return the results through multiple layers and are finally obtained by the settlement calculation sub-process module.

[0083] S210, after the settlement calculation sub-process completes the calculation of the settlement factors involved in all remuneration plans, the final pricing result is obtained and recorded in the database, thus completing the remuneration pricing.

[0084] The example of the present invention provides an application example of a certain remuneration settlement system using a python-based settlement factor development interface in settling month-end work order remuneration.

[0085] Since there are obvious business differences among the current remuneration systems, the settlement rules used for different business remunerations are basically different, and the settlement factors involved are also inconsistent. Therefore, in the example of the present invention, the batch price processing flow of the remuneration system of a specific business (for example, 4G customer development business) is used as a reference for explanation.

[0086] The steps for appraising the price of a work order in the remuneration system are as follows:

[0087] (1) Obtain the business order data and factor dependency data through data collection and regularization processes. The order data mainly includes relevant information of the user's order, which is used as source data for the subsequent pricing engine and settlement factors.

[0088] (2) The remuneration settlement plan for 4G customer development services is configured through the web. The plan mainly configures the corresponding factors based on the business settlement conditions. The pricing engine settles the remuneration based on the settlement conditions and tariffs of the plan.

[0089] (3) Load information from the web-side configuration factor dependency table and save it to the database.

[0090] (4) The remuneration settlement plan and factor dependency data for 4G customer development services are loaded into shared memory for access by the pricing engine and settlement factors.

[0091] (5) Start the remuneration rating engine to rate the business order, and save the rated list or wrong order in the database for subsequent processes.

[0092] The remuneration system is based on the functions of C++ extended python interface and python embedded C++ program provided by boost.python library, and implements the settlement factor interface in the form of python script. When the system design factor is changed and upgraded, there is no need to reconstruct the settlement calculation module sub-process program. You only need to replace the python factor script to achieve the upgrade. When implementing the factor interface through python, when processing complex logic, with the help of the flexibility of python's own language and rich third-party support libraries, it can greatly improve the development efficiency and performance advantages, shorten the factor interface development cycle and development difficulty. The shared memory loading support of the settlement factor dependency table is configurable. New factor dependency tables can be loaded by adding the table configuration without modifying the program.

[0093] The present invention can achieve:

[0094] 1. Use scripting language to implement factor processing logic and improve factor development efficiency.

[0095] As a high-level language, Python's flexibility and rich standard and third-party libraries can greatly improve development efficiency and performance advantages, shorten development cycles and reduce development difficulty when processing complex logic.

[0096] 2. Decouple factor processing and batch price calculation to improve system stability.

[0097] The factor implementation is extracted from the remuneration batch pricing to form an independent factor processing module. The factors are implemented separately using python scripts. When the program is upgraded and released, there is no need to compile all the batch pricing programs involving factor calls. Only the factor interface script needs to be replaced, reducing the risks brought by the replacement of C++ programs.

[0098] 3. The settlement factor dependency table supports configurable shared memory loading.

[0099] The relevant configuration information of the settlement factor dependency table is loaded and saved in the database. The loader automatically loads all factor dependency table data into the shared memory by reading the configuration. When the program accessing the shared memory is running, it first reads the loading configuration information and then reads the memory data of the specified table.

[0100] See also Figure 4In an embodiment of the present invention, a processing device for a settlement factor is also provided, the device comprising:

[0101] An acquisition unit 10, used to acquire target data, wherein the target data represents a data source that can be used for calculation of the remuneration system;

[0102] A first determining unit 20, configured to determine a processing scheme matching the target data;

[0103] A second determining unit 30 is used to determine a target settlement factor according to the processing scheme;

[0104] The calling unit 40 is used to call the target settlement factor according to the target calling interface, so that the target stage factor obtained by calling calculates the target data according to the processing scheme to obtain a calculation result, wherein the target calling interface is generated by a python script.

[0105] Based on the above embodiment, the calling unit includes:

[0106] A reading subunit, used to read a factor dependency table through the target calling interface, wherein the factor dependency table includes configuration information of a settlement factor;

[0107] A first acquisition subunit is used to acquire configuration information in the factor dependency table that matches the target calling interface;

[0108] The first determining subunit is used to determine a target settlement factor based on the configuration information.

[0109] Based on the above embodiment, the first acquisition subunit is specifically used for:

[0110] Obtaining a specified loading column matching the factor dependency table;

[0111] Calculating a string length based on the specified loading column, and determining a class model according to the string length;

[0112] The configuration information matching the target calling interface in the factor dependency table is called by using the class model to obtain the configuration information.

[0113] Based on the above embodiment, the device further includes:

[0114] The parsing subunit is used to parse each field of the factor dependency table according to the configuration information to obtain a data value matching each field, so that the data value is applied to the calculation of the target data.

[0115] Based on the above embodiment, the device further includes:

[0116] The third determining subunit is used to determine the factor value of the settlement factor, so that the Python script settlement factor class object is called and obtained through the factor value;

[0117] An interface calling unit is used for the settlement factor script based on the python script to perform an interface call on the calculation factor corresponding to the identification parameter according to the identification parameter of the factor passed into the calling function, so as to obtain the target settlement factor;

[0118] The encapsulation unit is used to encapsulate and compile the shared memory interface class into a dynamic library form that can be imported by the Python script for the Python script to call when the settlement factor needs to access the shared memory.

[0119] The present invention provides a processing device for settlement factors, wherein an acquisition unit acquires target data, a first determination unit determines a processing scheme matching the target data, a second determination unit determines a target settlement factor according to the processing scheme, and a calling unit calls the target settlement factor according to a target calling interface, so that the target stage factor obtained by calling calculates the target data according to the processing scheme to obtain a calculation result, wherein the target calling interface is generated by a python script. When the system design factor is changed and upgraded, there is no need to reconstruct the settlement requirement, and only the python script needs to be replaced, thereby improving the system's processing efficiency for the factor, and the factor can be implemented separately using a python script, decoupling the factor processing and calculation process, and improving the system stability.

[0120] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

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

Claims

1. A method for processing a settlement factor, characterized in that: The method comprises: Acquiring target data, wherein the target data represents a data source that can be used for calculation of a remuneration system; Determining a processing solution that matches the target data; Determining a target settlement factor based on the treatment plan; According to the target calling interface, the target settlement factor is called, so that the target settlement factor obtained by the call is used to calculate the target data according to the processing scheme to obtain a calculation result, wherein the target calling interface is generated by a python script; The calling of the target settlement factor according to the target calling interface includes: Reading a factor dependency table through the target calling interface, wherein the factor dependency table includes configuration information of a settlement factor; Obtaining configuration information in the factor dependency table that matches the target calling interface; Based on the configuration information, determining a target settlement factor; The obtaining of configuration information in the factor dependency table that matches the target calling interface includes: Obtaining a specified loading column matching the factor dependency table; Concatenate the specified load columns into a column string according to the specified order and separator; Calculating a string length based on the specified loading column, and determining a class model according to the string length; The configuration information matching the target calling interface in the factor dependency table is called by using the class model to obtain the configuration information.

2. The method according to claim 1, characterized in that The method further comprises: According to the configuration information, each field of the factor dependency table is parsed to obtain a data value matching each field, so that the data value is applied to the calculation of the target data.

3. The method according to claim 1, characterized in that The method further comprises: Determine the factor value of the settlement factor, so that the Python script settlement factor class object is called and obtained through the factor value; The settlement factor script based on the python script makes an interface call to the calculation factor corresponding to the identification parameter according to the identification parameter of the factor passed into the calling function, and obtains the target settlement factor; In response to the settlement factor requiring shared memory access, the interface class of the shared memory is encapsulated and compiled into a dynamic library form that can be imported by the Python script for calling by the Python script.

4. A processing device for settlement factors, characterized in that: The device comprises: An acquisition unit, used for acquiring target data, wherein the target data represents a data source that can be used for calculation of the remuneration system; A first determining unit, used to determine a processing solution matching the target data; A second determining unit, configured to determine a target settlement factor according to the processing scheme; A calling unit, configured to call the target settlement factor according to a target calling interface, so that the target settlement factor obtained by calling calculates the target data according to the processing scheme to obtain a calculation result, wherein the target calling interface is generated by a python script; The calling unit comprises: A reading subunit, used to read a factor dependency table through the target calling interface, wherein the factor dependency table includes configuration information of a settlement factor; A first acquisition subunit is used to acquire configuration information in the factor dependency table that matches the target calling interface; A first determining subunit, configured to determine a target settlement factor based on the configuration information; The first acquisition subunit is specifically used for: Obtaining a specified loading column matching the factor dependency table; Concatenate the specified load columns into a column string according to the specified order and separator; Calculating a string length based on the specified loading column, and determining a class model according to the string length; The configuration information matching the target calling interface in the factor dependency table is called by using the class model to obtain the configuration information.

5. The device according to claim 4, characterized in that The device also includes: The parsing subunit is used to parse each field of the factor dependency table according to the configuration information to obtain a data value matching each field, so that the data value is applied to the calculation of the target data.

6. The device according to claim 4, characterized in that The device also includes: The third determining subunit is used to determine the factor value of the settlement factor, so that the Python script settlement factor class object is called and obtained through the factor value; An interface calling unit is used for the settlement factor script based on the python script to perform an interface call on the calculation factor corresponding to the identification parameter according to the identification parameter of the factor passed into the calling function, so as to obtain the target settlement factor; The encapsulation unit is used to encapsulate and compile the shared memory interface class into a dynamic library form that can be imported by the Python script for the Python script to call when the settlement factor needs to access the shared memory.

Citation Information

Patent Citations

  • Transaction system and transaction settlement method

    CN104318466A

  • Method and system for assisting operator development

    CN110928529A