CN108446989B - Method for determining commission charge and terminal equipment - Google Patents
Method for determining commission charge and terminal equipment Download PDFInfo
- Publication number
- CN108446989B CN108446989B CN201810121707.6A CN201810121707A CN108446989B CN 108446989 B CN108446989 B CN 108446989B CN 201810121707 A CN201810121707 A CN 201810121707A CN 108446989 B CN108446989 B CN 108446989B
- Authority
- CN
- China
- Prior art keywords
- commission
- forms
- proportion
- service
- size
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 48
- 230000006870 function Effects 0.000 claims description 15
- 238000004590 computer program Methods 0.000 claims description 14
- 238000004364 calculation method Methods 0.000 abstract description 21
- 230000010365 information processing Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 8
- 238000012545 processing Methods 0.000 description 8
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 238000013500 data storage Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000002035 prolonged effect Effects 0.000 description 2
- 238000012550 audit Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/08—Insurance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/04—Billing or invoicing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/12—Accounting
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Physics & Mathematics (AREA)
- Development Economics (AREA)
- Databases & Information Systems (AREA)
- General Business, Economics & Management (AREA)
- Strategic Management (AREA)
- Marketing (AREA)
- Economics (AREA)
- Technology Law (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Computational Linguistics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention is applicable to the technical field of information processing, and provides a commission charge determining method and terminal equipment. The method comprises the following steps: acquiring all forms in a preset time period of a target system; inquiring the corresponding commission charge proportion of each form from a prestored commission charge proportion table according to the acquired salesman, service source and service type of each form; storing the acquired business form number and business cost of each form and the inquired corresponding handling fee proportion of each form into the HIVE; determining the size of each obtained form, and grouping all the obtained forms according to the determined size of each form; according to the business sheet number, the business cost and the handling fee proportion of the forms stored in the HIVE, the handling fee of each group of forms after grouping is calculated in parallel, the problems that the database operation speed is slow and the performance of the database is reduced when the handling fee is calculated based on the database in the prior art can be solved, meanwhile, the handling fee calculation time is reduced, and the handling fee calculation efficiency is improved.
Description
Technical Field
The invention belongs to the technical field of information processing, and particularly relates to a method for determining a commission charge and a terminal device.
Background
The existing commission charge calculation depends on a database, namely, relevant data needs to be obtained from the database to calculate the commission charge. Taking the insurance commission as an example, all insurance fee data of the previous transaction day including online and offline insurance application data and online and offline insurance refund data are acquired from three system databases of contract, claim settlement and insurance, then the commission fee is calculated according to the proportion of the commission fee set in the system, and the corresponding commission fee data is written into the financial system for the financial system to settle the fee.
However, as more data need to be obtained from the database and the data in the database is continuously updated, the data which needs to be obtained from the database is more and more, the running speed of the database is reduced, the performance of the database is reduced, the calculation period of the commission charge is prolonged, the calculation efficiency of the commission charge is reduced, and the existing business needs cannot be met.
Disclosure of Invention
The embodiment of the invention provides a method for determining a commission charge and a terminal device, and aims to solve the problems that the conventional commission charge calculation depends on a database, so that the commission charge calculation period is prolonged, and the commission charge calculation efficiency is reduced.
A first aspect of an embodiment of the present invention provides a method for determining a commission fee, including:
acquiring all forms in a preset time period of a target system, wherein each form comprises a service operator, a service source, a service type, a service order number and service cost;
inquiring the corresponding commission charge proportion of each form from a prestored commission charge proportion table according to the acquired salesman, service source and service type of each form;
storing the acquired business form number and business cost of each form and the inquired corresponding handling fee proportion of each form into the HIVE;
determining the size of each obtained form, and grouping all the obtained forms according to the determined size of each form;
and according to the business sheet number, the business cost and the handling fee proportion of the forms stored in the HIVE, parallelly calculating the handling fees of each group of forms after grouping.
Optionally, each obtained form further includes an intermediary;
the method further comprises the following steps:
determining the broker commission ratio corresponding to each form according to the obtained broker in each form and a prestored broker commission ratio table;
detecting whether the number of the intermediaries in each form is multiple;
if a plurality of intermediaries in the target form are detected, determining the corresponding commission charge split ratio of each intermediary in the target form according to the corresponding relationship between the prestored intermediaries and the commission charge split ratio, wherein the target form is any one form in the obtained forms;
according to the commission charge split ratio corresponding to each intermediary in the target form, splitting the intermediary commission charge ratio corresponding to the target form, and determining the intermediary commission charge ratio corresponding to each intermediary in the target form.
Optionally, the determining the size of each obtained form, and grouping all the obtained forms according to the determined size of each form includes:
determining the size of each acquired form, acquiring the size sum of all acquired forms according to the determined size of each form, and checking whether the size sum of all acquired forms exceeds a preset grouping size upper limit or not;
and if the sum of the sizes of all the forms obtained through auditing exceeds the preset grouping size upper limit, grouping all the forms obtained according to the preset grouping size upper limit, so that the size of each group of forms after grouping does not exceed the preset grouping size upper limit.
Optionally, the storing, into the HIVE, the obtained service order number and service fee of each form, and the queried handling fee ratio corresponding to each form includes:
taking the obtained business form number of each form as a key, and the obtained business expense and the handling expense proportion of each form as values, and storing the obtained business form number and business expense of each form and the inquired handling expense proportion corresponding to each form into the HIVE in a key-value pair mode;
the parallel calculation of the commission fees of each group of forms after grouping according to the business order number, the business fee and the commission fee proportion of the forms stored in the HIVE comprises the following steps:
and extracting key value pairs from the HIVE, and transferring each key value pair as a parameter to a map function to calculate the commission charge of each group of grouped forms in parallel.
Optionally, the pre-stored commission fee ratio table includes a pre-stored operator commission fee ratio table, a service source commission fee ratio table and a service type commission fee ratio table;
the inquiring of the commission charge proportion corresponding to each form from the pre-stored commission charge proportion table according to the obtained salesman, service source and service type in each form comprises:
determining the operator fee proportion corresponding to each form according to the obtained operators in each form and a prestored operator fee proportion table;
determining the service source commission charge proportion corresponding to each form according to the acquired service source in each form and a prestored service source commission charge proportion table;
and determining the service type fee proportion corresponding to each form according to the obtained service type in each form and a prestored service type fee proportion table.
A second aspect of an embodiment of the present invention provides a commission fee determination terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
acquiring all forms in a preset time period of a target system, wherein each form comprises a service operator, a service source, a service type, a service order number and service cost;
inquiring the corresponding commission charge proportion of each form from a prestored commission charge proportion table according to the acquired salesman, service source and service type of each form;
storing the acquired business form number and business cost of each form and the inquired corresponding handling fee proportion of each form into the HIVE;
determining the size of each obtained form, and grouping all the obtained forms according to the determined size of each form;
and according to the business sheet number, the business cost and the handling fee proportion of the forms stored in the HIVE, parallelly calculating the handling fees of each group of forms after grouping.
Optionally, each obtained form further includes an intermediary;
the processor, when executing the computer program, further implements the steps of:
determining the broker commission ratio corresponding to each form according to the obtained broker in each form and a prestored broker commission ratio table;
detecting whether the number of the intermediaries in each form is multiple;
if a plurality of intermediaries in the target form are detected, determining the corresponding commission charge split ratio of each intermediary in the target form according to the corresponding relationship between the prestored intermediaries and the commission charge split ratio, wherein the target form is any one form in the obtained forms;
according to the commission charge split ratio corresponding to each intermediary in the target form, splitting the intermediary commission charge ratio corresponding to the target form, and determining the intermediary commission charge ratio corresponding to each intermediary in the target form.
Optionally, the determining the size of each obtained form, and grouping all the obtained forms according to the determined size of each form includes:
determining the size of each acquired form, acquiring the size sum of all acquired forms according to the determined size of each form, and checking whether the size sum of all acquired forms exceeds a preset grouping size upper limit or not;
and if the sum of the sizes of all the forms obtained through auditing exceeds the preset grouping size upper limit, grouping all the forms obtained according to the preset grouping size upper limit, so that the size of each group of forms after grouping does not exceed the preset grouping size upper limit.
Optionally, the storing, into the HIVE, the obtained service order number and service fee of each form, and the queried handling fee ratio corresponding to each form includes:
taking the obtained business form number of each form as a key, and the obtained business expense and the handling expense proportion of each form as values, and storing the obtained business form number and business expense of each form and the inquired handling expense proportion corresponding to each form into the HIVE in a key-value pair mode;
the parallel calculation of the commission fees of each group of forms after grouping according to the business order number, the business fee and the commission fee proportion of the forms stored in the HIVE comprises the following steps:
and extracting key value pairs from the HIVE, and transferring each key value pair as a parameter to a map function to calculate the commission charge of each group of grouped forms in parallel.
A third aspect of embodiments of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method of commission determination as described above.
Compared with the prior art, the embodiment of the invention has the following beneficial effects: the embodiment of the invention stores the acquired schedule proportions of all the forms in the preset time period of the target system and each inquired form into the HIVE, namely, the relevant data for calculating the schedule is stored in the HIVE, thereby solving the problems of slow database operation speed and reduced database performance in the prior art for calculating the schedule based on the database.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic flow chart diagram of a commission fee determination method provided by an embodiment of the invention;
FIG. 2 is a schematic flow chart diagram of a commission fee determination method according to another embodiment of the invention;
FIG. 3 is a schematic flow chart diagram of a commission fee determination method according to yet another embodiment of the invention;
FIG. 4 is a schematic flow chart diagram of a commission fee determination method according to yet another embodiment of the invention;
FIG. 5 is a schematic flow chart diagram of a commission fee determination method according to yet another embodiment of the invention;
FIG. 6 is a schematic block diagram of a commission determination routine provided by an embodiment of the present invention;
fig. 7 is a schematic block diagram of a commission fee determination terminal device according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Referring to fig. 1, fig. 1 is a schematic flowchart of a method for determining a commission fee according to an embodiment of the present invention, in the embodiment, a terminal angle trigger is taken as an example for description, where the terminal may be a mobile terminal such as a smart phone and a tablet computer. As shown in fig. 1, in this embodiment, the processing procedure of the terminal may include the following steps:
s101: and acquiring all forms in a preset time period of the target system, wherein each form comprises a service operator, a service source, a service type, a service order number and service cost.
Here, the target system may be a system that specifies in advance that the commission fee needs to be calculated, such as a contract system, a claim settlement system, a security system, or the like, and the preset time period may also be specified in advance, such as a previous transaction day, a previous hour, or the like. The target system and the preset time period can be specified according to actual needs, after the specification is completed, the system modification instruction and the time period modification instruction can be received, the specified target system is modified according to the system modification instruction, and the specified preset time period is modified according to the time period modification instruction until the requirements are met.
The form is a data sheet containing a variety of collected data, such as a policy. After all forms within the preset time period of the target system are obtained, whether all obtained forms contain preset keywords or not can be detected, if all forms contain the preset keywords, the subsequent steps can be executed, if some forms do not contain the preset keywords, the forms which do not contain the preset keywords are deleted, and the remaining forms are used as all newly obtained forms to execute the subsequent steps. Specifically, the preset keywords are set according to the actual situation, so that the acquired form is detected by setting the preset keywords, and the form passing the detection can execute the subsequent steps, thereby ensuring that the form in the subsequent steps conforms to the actual situation.
S102: and inquiring the corresponding commission charge proportion of each form from a prestored commission charge proportion table according to the acquired operator, service source and service type of each form.
Specifically, the pre-stored commission fee ratio table can be generated by the following method:
the method comprises the steps of obtaining the salesmen, the service source and the service type of a plurality of forms, determining the commission charge proportion of each form according to the salesmen, the service source and the service type of the obtained forms based on the RETE algorithm, and generating a commission charge proportion table.
If the handling fee proportion corresponding to some forms is not inquired from the prestored handling fee proportion table, inquiry failure information can be generated, and meanwhile, the situation can be conveniently known by a user, the handling fee proportion of specific forms can also be displayed without being inquired, then a handling fee proportion generation process can be given, a handling fee proportion generation interface is entered, and the user is prompted to provide corresponding data according to the handling fee proportion generation process on the interface to generate the handling fee proportion.
S103: and storing the acquired business form number and business cost of each form and the inquired corresponding handling fee proportion of each form into the HIVE.
Here, HIVE is a data warehouse tool based on Hadoop, and can map a structured data file into a database table, provide a structured query language query function, and convert a structured statement into a MapReduce task for running.
The step of storing the obtained service order number and service fee of each form and the inquired handling fee ratio corresponding to each form into the HIVE may include: firstly, according to the acquired service order number and service cost of each form and the inquired handling fee proportion corresponding to each form, establishing the corresponding relation among the service order number, the service cost and the handling fee proportion of each form, and storing the established corresponding relation of each form into the HIVE, namely storing the relevant data for calculating the handling fee into the HIVE.
S104: and determining the size of each acquired form, and grouping all the acquired forms according to the determined size of each form.
Here, after determining the size of each obtained form, the determined sizes of the forms may be recorded, and the obtained forms may be sorted according to the size of the forms, thereby facilitating subsequent form grouping.
The grouping of all the obtained forms according to the determined size of each form may include: firstly, grouping all the acquired forms for the first time according to the fact that each form contains a service operator, a service source, a service type, a service order number or service cost, then determining the size of each acquired form, acquiring the size of each group of forms after the first grouping according to the determined size of each form, and grouping for the second time according to the preset upper limit of the grouping size and the size of each group of forms after the first grouping.
S105: and according to the business sheet number, the business cost and the handling fee proportion of the forms stored in the HIVE, parallelly calculating the handling fees of each group of forms after grouping.
Specifically, the commission charge is calculated according to the service charge and the commission charge ratio, that is, the commission charge ratio corresponding to each service order number is multiplied by the service charge corresponding to the service order number, and the commission charge corresponding to the service order number is calculated. The handling fee of each group of forms after grouping is calculated in parallel, the speed of calculating the handling fee is improved, and the period of calculating the handling fee is shortened.
As can be seen from the above description, the method for determining the commission charge of the embodiment of the present invention stores the acquired commission charge ratios of all the forms in the preset time period of the target system and each form that is queried in the HIVE, that is, the relevant data for calculating the commission charge is stored in the HIVE, thereby solving the problems of slow database operation speed and reduced database performance in the prior art for calculating the commission charge based on the database.
Referring to fig. 2, fig. 2 is a schematic flow chart of a commission fee determination according to another embodiment of the present invention. The difference between the present embodiment and the above embodiment is S203 to S207, where S201 to S202 are the same as S101 to S102 in the previous embodiment, and S208 to S209 are the same as S104 to S105 in the previous embodiment, and specific reference is made to the description of S101 to S102 and S104 to S105 in the above embodiment, which is not repeated herein. The determining of the commission fee in this embodiment may further include:
s203: and determining the broker commission ratio corresponding to each form according to the obtained brokers in each form and a prestored broker commission ratio table, wherein each obtained form also comprises the brokers.
In addition to the above-mentioned commission ratio corresponding to the operator, the service source and the service type of each form, the commission ratio corresponding to the intermediary of each form is further obtained, so that the form commission calculation requirements in various application scenarios are met.
S204: it is detected whether there are more intermediaries in each form.
S205: if a plurality of intermediaries in the target form are detected, determining the corresponding commission charge split ratio of each intermediary in the target form according to the corresponding relationship between the prestored intermediaries and the commission charge split ratio, wherein the target form is any one form in the obtained forms.
Specifically, the target form is any one of the obtained forms, and if there are multiple intermediaries in the multiple forms in the obtained form, each form with the multiple intermediaries needs to be used as the target form in step S205, and the commission charge split ratio corresponding to each intermediary in each form is determined.
If a plurality of intermediaries in the target form are detected, such as an intermediary 0, an intermediary 1 and an intermediary 2, the corresponding commission charge split ratio of each intermediary in the target form is determined according to the corresponding relationship between the pre-stored intermediaries and the commission charge split ratio, for example, according to the corresponding relationship between the pre-stored intermediaries and the commission charge split ratio, the corresponding split ratio of the intermediary 0 is determined to be 1/3, the corresponding split ratio of the intermediary 1 is 1/6, and the corresponding split ratio of the intermediary 2 is 1/2. And further splitting the commission charge ratio of the intermediary according to the corresponding relation between the intermediary and the splitting ratio.
S206: according to the commission charge split ratio corresponding to each intermediary in the target form, splitting the intermediary commission charge ratio corresponding to the target form, and determining the intermediary commission charge ratio corresponding to each intermediary in the target form.
Here, if there are multiple intermediaries in a form, the commission charge split ratio corresponding to each intermediary in the form is determined first, and then the broker commission charge ratio corresponding to each intermediary in the form is determined according to the commission charge split ratio corresponding to each intermediary, which facilitates the subsequent calculation of broker commission charges.
S207: and storing the acquired business form number and business cost of each form, the inquired handling fee proportion corresponding to each form and the inquired intermediary handling fee proportion corresponding to each intermediary in the target form into the HIVE.
Referring to fig. 3, fig. 3 is a schematic flow chart of a commission fee determination method according to still another embodiment of the invention. The embodiment corresponding to fig. 1 differs in that: the determining the size of each obtained form, and grouping all the obtained forms according to the determined size of each form may include S304. S301 to S303 are the same as S101 to S103 in the previous embodiment, and S305 is the same as S105 in the previous embodiment, and reference is specifically made to the description related to S101 to S103 and S105 in the previous embodiment, which is not repeated herein. Specifically, S304 may include S3041 to S3042:
s3041: and determining the size of each acquired form, acquiring the sum of the sizes of all the acquired forms according to the determined size of each form, and checking whether the sum of the sizes of all the acquired forms exceeds a preset grouping size upper limit or not.
S3042: and if the sum of the sizes of all the forms obtained through auditing exceeds the preset grouping size upper limit, grouping all the forms obtained according to the preset grouping size upper limit, so that the size of each group of forms after grouping does not exceed the preset grouping size upper limit.
Specifically, the upper limit of the preset packet size may be set according to actual situations, for example, the upper limit of the preset packet size is 100. If all the obtained forms are form 1, form 2, form 3 and form 4, the size of the form 1 is 50, the size of the form 2 is 60, the size of the form 3 is 40, and the size of the form 4 is 50, the sum of the sizes of all the obtained forms is 200 and exceeds the preset upper limit of the grouping size, 100, all the obtained forms are grouped according to the preset upper limit of the grouping size, so that the size of each group of forms after grouping does not exceed the preset upper limit of the grouping size, namely, the form 1 and the form 4 are divided into one group, and the form 2 and the form 3 are divided into one group. After grouping is completed, the commission charge of each group of forms after grouping is calculated in parallel, so that the commission charge calculation is completed quickly, and the commission charge calculation efficiency is improved.
Referring to fig. 4, fig. 4 is a schematic flow chart of a commission fee determination according to another embodiment of the present invention. The difference between the above embodiments of the present embodiment is S403 to S405, where S401 to S402 are the same as S101 to S102 in the previous embodiment, and please refer to the description related to S101 to S102 in the above embodiments, which is not repeated herein. The determining of the commission fee in this embodiment may further include:
s403: and taking the acquired service order number of each form as a key and the acquired service cost and commission charge ratio of each form as values, and storing the acquired service order number and service cost of each form and the inquired commission charge ratio corresponding to each form into the HIVE in a key-value pair mode.
The service bill number of each form is taken as key, the acquired handling fee proportion corresponding to each form and the service fee of each form are taken as values and stored in the HIVE, namely, the relevant data for calculating the handling fee are stored in the HIVE, and the problem of long handling fee calculation period caused by the fact that the handling fee is calculated based on a database in the prior art is solved.
S404: and determining the size of each acquired form, and grouping all the acquired forms according to the determined size of each form.
S405: and extracting key value pairs from the HIVE, and transferring each key value pair as a parameter to a map function to calculate the commission charge of each group of grouped forms in parallel.
Specifically, key value pairs (service order numbers are keys, and handling fee ratios and service fees are used as values) are extracted from the HIVE, each key value pair is used as a parameter and is transmitted to a map function, the map function calculates handling fees of each group of forms after grouping in parallel, and the handling fees are calculated according to the service fees and the handling fee ratios, namely the handling fee ratio corresponding to each service order number is multiplied by the service fees corresponding to the service order number, and the handling fees corresponding to the service order number are calculated.
After the handling fees of each group of forms after grouping are calculated in parallel, the handling fees obtained through calculation can be cached, and the cached handling fees are periodically written into the HIVE.
The above manner of periodically writing the commission fees of the cache into the HIVE includes: and taking the service bill number of each form as key, and periodically writing the calculated commission charge corresponding to each form into HIVE as a value.
After the cached commission fees are periodically written into the HIVE, data can be imported into the relational database from the HIVE for subsequent financial settlement.
The problem that the database running speed is slow and the performance of the database is reduced when the handling fee is calculated based on the database in the prior art is solved by storing the relevant data for calculating the handling fee in the HIVE, and meanwhile, the handling fee is calculated in parallel by adopting the map function, so that the handling fee calculation time is reduced, and the handling fee calculation efficiency is improved.
Referring to fig. 5, fig. 5 is a schematic flow chart of a commission fee determination method according to still another embodiment of the invention. The embodiment corresponding to fig. 1 differs in that: the querying the commission fee ratio corresponding to each form from the pre-stored commission fee ratio table according to the obtained salesman, service source and service type in each form may include S502. S501 is the same as S101 in the previous embodiment, and S503 to S505 are the same as S103 to S105 in the previous embodiment, and reference is specifically made to the description related to S101 and S103 to S105 in the previous embodiment, which is not repeated herein. Specifically, S502 may include S5021 to S5023:
s5021: and determining the operator fee proportion corresponding to each form according to the obtained operators in each form and a prestored operator fee proportion table, wherein the prestored operator fee proportion table comprises a prestored operator fee proportion table, a prestored service source fee proportion table and a prestored service type fee proportion table.
S5022: and determining the service source commission charge ratio corresponding to each form according to the acquired service source in each form and a prestored service source commission charge ratio table.
S5023: and determining the service type fee proportion corresponding to each form according to the obtained service type in each form and a prestored service type fee proportion table.
The handling fee proportion corresponding to each form comprises a service member handling fee proportion, a service source handling fee proportion, a service type handling fee proportion and the like, and the handling fee proportion corresponding to the service member, the service source and the service type in each form is determined according to a prestored handling fee proportion table, so that the normal operation of subsequent processing is ensured, the calculation requirement of actual handling fee is met, and the method is suitable for practical application.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 6 shows a schematic operating environment of the commission fee determination program provided by the embodiment of the invention, corresponding to the commission fee determination method described in the above embodiment. For convenience of explanation, only the portions related to the present embodiment are shown.
In the present embodiment, the commission fee determination program 600 is installed and executed in the terminal device 60. The terminal device 60 may be a mobile terminal, a palm top computer, a server, etc. The terminal device 60 may include, but is not limited to, a memory 601, a processor 602, and a display 603. Fig. 6 only shows terminal device 60 with components 601 and 603, but it is to be understood that not all of the shown components are required and that more or fewer components may alternatively be implemented.
The storage 601 may in some embodiments be an internal storage unit of the terminal device 60, such as a hard disk or a memory of the terminal device 60. The memory 601 may also be an external storage device of the terminal device 60 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 60. Further, the memory 601 may also include both an internal storage unit and an external storage device of the terminal device 60. The memory 601 is used for storing application software installed in the terminal device 60 and various types of data, such as program codes of the commission fee determination program 600. The memory 601 may also be used to temporarily store data that has been output or is to be output.
The processor 602 may be, in some embodiments, a Central Processing Unit (CPU), microprocessor or other data Processing chip, which is used to run program codes stored in the memory 601 or process data, such as executing the commission fee determination program 600.
The display 603 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an Organic Light-Emitting Diode (OLED) touch panel, or the like in some embodiments. The display 603 is used for displaying information processed in the terminal device 60 and for displaying a visualized user interface, such as an application menu interface, an application icon interface, and the like. The components 601 and 603 of the terminal device 60 communicate with each other via a system bus.
Fig. 7 is a functional block diagram of a procedure 600 for determining a commission fee according to an embodiment of the present invention. In this embodiment, the commission determining program 600 can be divided into one or more modules, and the one or more modules are stored in the memory 601 and executed by one or more processors (in this embodiment, the processor 602) to implement the invention. For example, in fig. 7, the commission determining program 600 may be divided into a form acquiring unit 701, a commission proportion inquiring unit 702, a data storage unit 703, a form grouping unit 704, and a commission calculating unit 705. The unit referred to in the present invention is a series of computer program instruction segments capable of performing a specific function, and is more suitable than a program for describing the execution process of the commission fee determination program 600 in the terminal device 60. The following description will specifically describe the functions of the modules 701-705.
The form obtaining unit 701 is configured to obtain all forms in a preset time period of a target system, where each form includes a service operator, a service source, a service type, a service form number, and a service cost. And a commission charge ratio query unit 702, configured to query a commission charge ratio corresponding to each form from a pre-stored commission charge ratio table according to the obtained salesman, service source and service type of each form. And the data storage unit 703 is configured to store the acquired service order number and service fee of each form, and the queried handling fee ratio corresponding to each form in the HIVE. And the form grouping unit 704 is configured to determine the size of each obtained form, and group all the obtained forms according to the determined size of each form. And the commission charge calculation unit 705 is used for calculating the commission charges of each group of forms after grouping in parallel according to the service bill number, the service charge and the commission charge proportion of the forms stored in the HIVE.
Optionally, each acquired form further includes an intermediary. The commission determination procedure 600 may be further divided into a first broker commission ratio determination unit 706, an broker detection unit 707, a commission split ratio determination unit 708, and a second broker commission ratio determination unit 709.
The first broker fee proportion determining unit 706 is configured to determine a broker fee proportion corresponding to each form according to the obtained broker in each form and a pre-stored broker fee proportion table. An intermediary detecting unit 707 detects whether there are a plurality of intermediaries in each form. A commission charge splitting ratio determining unit 708, configured to determine, if multiple brokers are detected in the target form, a commission charge splitting ratio corresponding to each broker in the target form according to a correspondence between pre-stored brokers and commission charge splitting ratios, where the target form is any one of the obtained forms. A second broker commission ratio determination unit 709, configured to split the broker commission ratio corresponding to the target form according to the commission splitting ratio corresponding to each broker in the target form, and determine the broker commission ratio corresponding to each broker in the target form. The data storage unit 703 is further configured to store the obtained service order number and service fee of each form, the queried commission charge ratio corresponding to each form, and the broker commission charge ratio corresponding to each broker in the target form, in the HIVE.
Optionally, the form grouping unit 704 may be further divided into a form size examining unit 7041 and a form processing unit 7042.
The form size auditing unit 7041 is configured to determine the size of each obtained form, obtain the sum of the sizes of all obtained forms according to the determined size of each form, and audit whether the sum of the sizes of all obtained forms exceeds a preset upper limit of the packet size. The form processing unit 7042 is configured to, if the sum of the sizes of all the forms obtained through the auditing exceeds the preset upper limit of the grouping size, group all the obtained forms according to the preset upper limit of the grouping size, so that the size of each group of forms after grouping does not exceed the preset upper limit of the grouping size.
Optionally, the data storage unit 703 is further configured to store the acquired service form number and service cost of each form, and the queried commission proportion corresponding to each form into the HIVE in a form of key-value pairs, with the acquired service form number of each form as a key and the acquired service cost and commission proportion of each form as values. And the commission charge calculation unit 705 is further configured to extract key-value pairs from the HIVE, transfer each key-value pair as a parameter to a map function, and calculate commission charges of each group of grouped forms in parallel.
Optionally, the pre-stored commission fee ratio table includes a pre-stored operator commission fee ratio table, a service source commission fee ratio table and a service type commission fee ratio table. The commission proportion query unit 702 can be divided into a servicer commission proportion determination unit 7021, a service source commission proportion determination unit 7022, and a service type commission proportion determination unit 7023.
The operator fee proportion determining unit 7021 is configured to determine, according to the obtained operator in each form and a prestored operator fee proportion table, the operator fee proportion corresponding to each form. A service source commission charge ratio determining unit 7022, configured to determine, according to the obtained service source in each form and a prestored commission charge ratio table of the service source, a commission charge ratio of the service source corresponding to each form. A service type commission charge ratio determining unit 7023, configured to determine, according to the obtained service type in each form and a pre-stored service type commission charge ratio table, a service type commission charge ratio corresponding to each form.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.
Claims (6)
1. A commission fee determination method, comprising:
acquiring all forms in a preset time period of a target system, wherein each form comprises a service operator, a service source, a service type, a service order number and service cost; the target system is a system which is specified in advance and needs to calculate the commission charge;
inquiring the corresponding commission charge proportion of each form from a prestored commission charge proportion table according to the acquired salesman, service source and service type of each form;
and storing the acquired business form number and business cost of each form and the inquired corresponding handling fee proportion of each form into the HIVE, wherein the steps comprise: taking the obtained business form number of each form as a key, and the obtained business expense and the handling expense proportion of each form as values, and storing the obtained business form number and business expense of each form and the inquired handling expense proportion corresponding to each form into the HIVE in a key-value pair mode;
determining the size of each obtained form, and grouping all the obtained forms according to the determined size of each form, wherein the method comprises the following steps: determining the size of each acquired form, acquiring the size sum of all acquired forms according to the determined size of each form, and checking whether the size sum of all acquired forms exceeds a preset grouping size upper limit or not; if the sum of the sizes of all the forms obtained through auditing exceeds the preset grouping size upper limit, all the forms obtained through auditing are grouped according to the preset grouping size upper limit, so that the size of each group of forms after grouping does not exceed the preset grouping size upper limit;
according to the business sheet number, the business cost and the handling fee proportion of the forms stored in the HIVE, the handling fee of each group of forms after grouping is calculated in parallel, and the method comprises the following steps: and extracting key value pairs from the HIVE, and transferring each key value pair as a parameter to a map function to calculate the commission charge of each group of grouped forms in parallel.
2. The method of claim 1, wherein each of the obtained forms further comprises an intermediary;
the method further comprises the following steps:
determining the broker commission ratio corresponding to each form according to the obtained broker in each form and a prestored broker commission ratio table;
detecting whether the number of the intermediaries in each form is multiple;
if a plurality of intermediaries in the target form are detected, determining the corresponding commission charge split ratio of each intermediary in the target form according to the corresponding relationship between the prestored intermediaries and the commission charge split ratio, wherein the target form is any one form in the obtained forms;
according to the commission charge split ratio corresponding to each intermediary in the target form, splitting the intermediary commission charge ratio corresponding to the target form, and determining the intermediary commission charge ratio corresponding to each intermediary in the target form.
3. The method of claim 1, wherein the pre-stored commission ratio table comprises a pre-stored operator commission ratio table, a service source commission ratio table and a service type commission ratio table;
the inquiring of the commission charge proportion corresponding to each form from the pre-stored commission charge proportion table according to the obtained salesman, service source and service type in each form comprises:
determining the operator fee proportion corresponding to each form according to the obtained operators in each form and a prestored operator fee proportion table;
determining the service source commission charge proportion corresponding to each form according to the acquired service source in each form and a prestored service source commission charge proportion table;
and determining the service type fee proportion corresponding to each form according to the obtained service type in each form and a prestored service type fee proportion table.
4. A commission determination terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of:
acquiring all forms in a preset time period of a target system, wherein each form comprises a service operator, a service source, a service type, a service order number and service cost;
inquiring the corresponding commission charge proportion of each form from a prestored commission charge proportion table according to the acquired salesman, service source and service type of each form;
and storing the acquired business form number and business cost of each form and the inquired corresponding handling fee proportion of each form into the HIVE, wherein the steps comprise: taking the obtained business form number of each form as a key, and the obtained business expense and the handling expense proportion of each form as values, and storing the obtained business form number and business expense of each form and the inquired handling expense proportion corresponding to each form into the HIVE in a key-value pair mode;
determining the size of each obtained form, and grouping all the obtained forms according to the determined size of each form, wherein the method comprises the following steps: determining the size of each acquired form, acquiring the size sum of all acquired forms according to the determined size of each form, and checking whether the size sum of all acquired forms exceeds a preset grouping size upper limit or not; if the sum of the sizes of all the forms obtained through auditing exceeds the preset grouping size upper limit, all the forms obtained through auditing are grouped according to the preset grouping size upper limit, so that the size of each group of forms after grouping does not exceed the preset grouping size upper limit;
according to the business sheet number, the business cost and the handling fee proportion of the forms stored in the HIVE, the handling fee of each group of forms after grouping is calculated in parallel, and the method comprises the following steps: and extracting key value pairs from the HIVE, and transferring each key value pair as a parameter to a map function to calculate the commission charge of each group of grouped forms in parallel.
5. The commission determination terminal device of claim 4 wherein each of the acquired forms further includes an intermediary;
the processor, when executing the computer program, further implements the steps of:
determining the broker commission ratio corresponding to each form according to the obtained broker in each form and a prestored broker commission ratio table;
detecting whether the number of the intermediaries in each form is multiple;
if a plurality of intermediaries in the target form are detected, determining the corresponding commission charge split ratio of each intermediary in the target form according to the corresponding relationship between the prestored intermediaries and the commission charge split ratio, wherein the target form is any one form in the obtained forms;
according to the commission charge split ratio corresponding to each intermediary in the target form, splitting the intermediary commission charge ratio corresponding to the target form, and determining the intermediary commission charge ratio corresponding to each intermediary in the target form.
6. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the commission fee determination method according to any one of claims 1-3.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810121707.6A CN108446989B (en) | 2018-02-07 | 2018-02-07 | Method for determining commission charge and terminal equipment |
PCT/CN2018/082613 WO2019153483A1 (en) | 2018-02-07 | 2018-04-11 | Service charge determination method and apparatus, and terminal device and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810121707.6A CN108446989B (en) | 2018-02-07 | 2018-02-07 | Method for determining commission charge and terminal equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108446989A CN108446989A (en) | 2018-08-24 |
CN108446989B true CN108446989B (en) | 2021-04-30 |
Family
ID=63191671
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810121707.6A Active CN108446989B (en) | 2018-02-07 | 2018-02-07 | Method for determining commission charge and terminal equipment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108446989B (en) |
WO (1) | WO2019153483A1 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109377336A (en) * | 2018-09-28 | 2019-02-22 | 平安科技(深圳)有限公司 | Data processing method, device, device and storage medium for fee settlement |
CN110020944A (en) * | 2018-10-25 | 2019-07-16 | 阿里巴巴集团控股有限公司 | Calculation and object method, apparatus, electronic equipment and computer readable storage medium |
CN109598495A (en) * | 2018-10-26 | 2019-04-09 | 阿里巴巴集团控股有限公司 | Data processing method, device, server and computer readable storage medium |
CN109727060B (en) * | 2018-11-29 | 2024-04-02 | 平安科技(深圳)有限公司 | Day-to-day expense processing method, device, equipment and readable storage medium |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200511070A (en) * | 2003-09-12 | 2005-03-16 | Hon Hai Prec Ind Co Ltd | Forwarder stocktaking management system and method |
US20160071028A1 (en) * | 2014-09-10 | 2016-03-10 | Amadeus S.A.S. | Updating travel data in a server database of a centralized mid-back office system |
CN104318466B (en) * | 2014-10-20 | 2017-11-14 | 深圳市深信信息技术有限公司 | A kind of transaction system and transaction settlement method |
CN105719088A (en) * | 2016-01-25 | 2016-06-29 | 深圳市华阳信通科技发展有限公司 | Intelligent profit sharing settlement method and system |
-
2018
- 2018-02-07 CN CN201810121707.6A patent/CN108446989B/en active Active
- 2018-04-11 WO PCT/CN2018/082613 patent/WO2019153483A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
CN108446989A (en) | 2018-08-24 |
WO2019153483A1 (en) | 2019-08-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108446989B (en) | Method for determining commission charge and terminal equipment | |
CN108492195B (en) | Rule engine package parameter generalization method, equipment and storage medium | |
CN111427971B (en) | Business modeling method, device, system and medium for computer system | |
CN110264328A (en) | Account checking method, device, equipment, system and computer readable storage medium | |
CN109299164A (en) | A kind of data query method, computer readable storage medium and terminal device | |
US10963888B2 (en) | Payment complaint method, device, server and readable storage medium | |
CN112733531B (en) | Virtual resource allocation method and device, electronic equipment and computer storage medium | |
CN111612616A (en) | Block chain account evaluation method and device, terminal device and computer readable medium | |
CN113010542A (en) | Service data processing method and device, computer equipment and storage medium | |
CN111800292A (en) | Early warning method and device based on historical flow, computer equipment and storage medium | |
CN111752944A (en) | Data allocation method and device, computer equipment and storage medium | |
CN113312410B (en) | Data map construction method, data query method and terminal equipment | |
CN108830715A (en) | Batch file part disk returning processing method and system | |
CN111159183A (en) | Report generation method, electronic device and computer readable storage medium | |
CN117093619A (en) | Rule engine processing method and device, electronic equipment and storage medium | |
CN112182107A (en) | Method and device for acquiring list data, computer equipment and storage medium | |
CN115658345A (en) | Message notification method and device and electronic equipment thereof | |
CN113902574A (en) | Protocol data processing method, device, computer equipment and storage medium | |
CN109740130B (en) | Method and device for generating file | |
CN117633835A (en) | Data processing method, device, equipment and storage medium | |
CN109446054B (en) | Processing method and terminal equipment for override operation request based on big data | |
CN114092259A (en) | Processing method, device and equipment for exchange rate data and computer storage medium | |
CN114528443A (en) | Knowledge graph-based information mining method and related equipment thereof | |
CN113779198A (en) | Method, device, device and medium for generating electronic business card based on artificial intelligence | |
CN113626516A (en) | Data increment synchronization method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |