A profit sharing calculation method and system
By inputting data at the front end and using the automated profit-sharing calculation method based on the taskctl and congons models, the problems of low efficiency and high error rate in traditional profit-sharing calculations are solved, achieving efficient and secure profit-sharing data processing.
Patent Information
- Application Number
- CN202011055384.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-29
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2040-09-29
AI Technical Summary
Traditional profit-sharing calculations are inefficient, have a high error rate, are not very secure, and consume a lot of manpower.
By inputting rule data and agent data through the front end, the taskctl is used to periodically call the shell script to synchronize Oracle transaction data to CDH, forming a detailed profit sharing table and finally a profit sharing summary statistics table, and then using the Congons model to obtain profit sharing data.
It enables automated calculations, improves efficiency, reduces error rates, enhances data security, and increases the flexibility and versatility of rules.
Smart Images

Figure CN112163023B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and more specifically, to a profit sharing calculation method and system. Background Art
[0002] Traditional profit calculation is a pure manual calculation based on raw data. The operation profit calculation personnel and the market profit calculation personnel import the transaction flow that needs to be calculated for profit every month from congnos, and calculate the profit of each agent according to the merchant's agreed rate. The entire calculation process is manually processed except for the transaction flow, which is not manually processed. There are a large number of special rules in the profit calculation rules. Manual calculation is inefficient, prone to errors, and consumes a lot of manpower. In order to solve the above problems, a profit calculation system was proposed and implemented.
[0003] SUMMARY OF THE INVENTION
[0004] In order to overcome the deficiencies of the prior art, the present invention provides a profit sharing calculation method for solving the problems of low efficiency, high error rate and low security of manual calculation.
[0005] The technical solution adopted by the present invention to solve the technical problem is: to provide a profit sharing calculation method, comprising the following steps:
[0006] Step 1: Enter rule data and agent data through the front end;
[0007] Step 2: When processing the rule data and the agent data, taskctl periodically calls the shell script to synchronize the oracle transaction data to cdh;
[0008] Step 3: Count the profit data of each agent in the agent data according to the profit detailed table, and finally form a profit summary statistics table;
[0009] Step 4: Obtain profit sharing data through profit sharing model according to congons.
[0010] Preferably, after entering the rule data and agent data through the front end, the steps further include:
[0011] The network server receives the rule data and the agent data entered by the front end;
[0012] The network server verifies the rule data and the agent data entered from the front end.
[0013] Preferably, after the network server verifies the rule data and the agent data entered from the front end, the step further includes:
[0014] The network server sends the verified rule data and agent data to the logic server;
[0015] The logic server processes the verified rule data and agent data.
[0016] Preferably, after the logic server processes the verified rule data and agent data, the step further includes:
[0017] The logic server synchronously responds the processed rule data and agent data to the front end.
[0018] Preferably, after the logic server synchronously responds the processed rule data and agent data to the front end, before regularly calling the shell script to synchronize the oracle transaction data to the cdh, the steps further include:
[0019] The logic server sends the rule data and agent data after logic processing to MySQL for storage.
[0020] Preferably, after the shell script is called regularly to synchronize the oracle transaction data to the cdh, the steps further include:
[0021] After synchronously processing the rule data and the agent data of MySQL, the taskctl performs etl processing on the rule data of MySQL according to the agreed logic to form a rule wide table.
[0022] Preferably, after forming the rule wide table, the step further includes:
[0023] A detailed table of transaction rules is formed based on the transaction data and the broad table of rules.
[0024] Preferably, after forming the detailed table of transaction rules, before performing profit sharing data statistics for each agent in the agent data according to the detailed table of profit sharing, the step further includes:
[0025] The profit sharing is calculated for the detailed table of transaction rules to form a detailed table of profit sharing.
[0026] Preferably, after forming the profit sharing detailed table, the steps further include:
[0027] Use Sqoop to synchronize the profit sharing details table and the profit sharing summary statistics table to Oracle for display.
[0028] A profit sharing calculation system, comprising:
[0029] Input unit, used to input rule data and agent data through the front end;
[0030] A calling unit, used for calling a shell script regularly to synchronize the oracle transaction data to the cdh when taskctl executes the rule data and the agent data;
[0031] A statistical unit, used to perform profit sharing statistics on each agent in the agent data according to the profit sharing detailed table, and finally form a profit sharing summary statistical table;
[0032] The acquisition unit is used to obtain profit sharing data through the profit sharing model according to congons.
[0033] The beneficial effects of the present invention are as follows: by entering rule data and agent data through the front end, taskctl, when processing the rule data and the agent data, periodically calls the shell script to synchronize the oracle transaction data to the cdh, and performs profit data statistics for each agent in the agent data according to the profit detailed table, and finally forms a profit summary statistics table, and obtains profit data through the profit model according to congons. The automatic calculation efficiency of the system in the embodiment of the present invention is higher, the error rate is lower, and at the same time, the data security is improved and the flexibility and versatility of the rules are increased. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a flowchart of the profit sharing calculation method.
[0035] Figure 2 It is a functional module diagram of a profit-sharing calculation system.
[0036] Figure 3 This is a diagram showing the principle implementation of the profit sharing calculation method. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0038] The specific implementation of the present invention is described in detail below in conjunction with specific embodiments:
[0039] Embodiment 1:
[0040] Figure 1 The following is a flow chart of a profit sharing calculation method according to the first embodiment of the present invention. For ease of explanation, only the part related to the embodiment of the present invention is shown. The details are as follows:
[0041] In step S101: input rule data and agent data through the front end;
[0042] In the embodiment of the present application, rule data and agent data are entered through the front end.
[0043] Preferably, after entering the rule data and agent data through the front end, the steps further include:
[0044] The network server receives the rule data and the agent data entered by the front end;
[0045] The network server verifies the rule data and the agent data entered from the front end.
[0046] Preferably, after the network server verifies the rule data and the agent data entered from the front end, the step further includes:
[0047] The network server sends the verified rule data and agent data to the logic server;
[0048] The logic server processes the verified rule data and agent data.
[0049] Preferably, after the logic server processes the verified rule data and agent data, the step further includes:
[0050] The logic server synchronously responds the processed rule data and agent data to the front end.
[0051] In step S102: when processing the rule data and the agent data, taskctl periodically calls the shell script to synchronize the oracle transaction data to cdh;
[0052] In the embodiment of the present application, when processing the rule data and the agent data, taskctl periodically calls the shell script to synchronize the oracle transaction data to the cdh.
[0053] Preferably, after the logic server synchronously responds the processed rule data and agent data to the front end, before regularly calling the shell script to synchronize the oracle transaction data to the cdh, the steps further include:
[0054] The logic server sends the rule data and agent data after logic processing to MySQL for storage.
[0055] Preferably, after the shell script is called regularly to synchronize the oracle transaction data to the cdh, the steps further include:
[0056] After synchronously processing the rule data and the agent data of MySQL, the taskctl performs etl processing on the rule data of MySQL according to the agreed logic to form a rule wide table.
[0057] Preferably, after forming the rule wide table, the step further includes:
[0058] A detailed table of transaction rules is formed based on the transaction data and the broad table of rules.
[0059] In step S103: the profit sharing data of each agent in the agent data is counted according to the profit sharing detailed table, and finally a profit sharing summary statistics table is formed;
[0060] In the embodiment of the present application, the profit data of each agent in the agent data is counted according to the profit detailed table, and finally a profit summary statistics table is formed.
[0061] Preferably, after forming the detailed table of transaction rules, before performing profit sharing data statistics for each agent in the agent data according to the detailed table of profit sharing, the step further includes:
[0062] The profit sharing is calculated for the detailed table of transaction rules to form a detailed table of profit sharing.
[0063] In step S104: the profit sharing data is obtained through the profit sharing model according to congons.
[0064] In the embodiment of the present application, profit sharing data is obtained through a profit sharing model according to congons.
[0065] Preferably, after forming the profit sharing detailed table, the steps further include:
[0066] Use Sqoop to synchronize the profit sharing details table and the profit sharing summary statistics table to Oracle for display.
[0067] A person skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, such as ROM / RAM, disk, CD-ROM, etc.
[0068] Embodiment 2:
[0069] Figure 2 The structure of a profit sharing calculation system provided by the second embodiment of the present invention is shown. For the convenience of explanation, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:
[0070] An input unit 201, used to input rule data and agent data through the front end;
[0071] The calling unit 202 is used for calling the shell script regularly to synchronize the oracle transaction data to the cdh when taskctl uses the rule data and the agent data;
[0072] A statistical unit 203 is used to perform profit sharing statistics on each agent in the agent data according to the profit sharing detailed table, and finally form a profit sharing summary statistical table;
[0073] The acquisition unit 204 is used to acquire profit sharing data according to congons through a profit sharing model.
[0074] In the embodiment of the present invention, the rule data and agent data are entered through the front end. When taskctl processes the rule data and the agent data, it periodically calls the shell script to synchronize the oracle transaction data to cdh. According to the detailed profit table, the profit data of each agent in the agent data is counted, and finally a profit summary statistics table is formed. The profit data is obtained through the profit model according to congons. The automatic calculation efficiency of the system in the embodiment of the present invention is higher, the error rate is low, and the data security is improved and the flexibility and versatility of the rules are increased. The specific implementation methods of each unit can refer to the description of Example 1, which will not be repeated here.
[0075] Embodiment three:
[0076] Figure 3 The following is a diagram showing the principle implementation of a profit sharing calculation method provided by Embodiment 3 of the present invention. For ease of explanation, only the part related to the embodiment of the present invention is shown, including:
[0077] 1. Basic logical relationship between business personnel input rules, agent information and processing rules and agents
[0078] (1) Business personnel enter rule information and agent information through the rule front-end service.
[0079] Rule information: The rule information here mainly refers to which rules are used for profit sharing calculation. When calculating transaction profit sharing, it is necessary to determine the proportion of fees to be charged based on some factors in the transaction. The rule information is the registration of transaction factor information and the proportion of fees and calculation mode determined by these factors.
[0080] Agent information: Agent information mainly includes the agent number and rule information ID, which determines the rule the agent will use to calculate the profit.
[0081] (2) The webserver receives the front-end entry rules and agent entry requests from business personnel and performs basic data verification on the requested data; the webserver sends the verified rule data and agent data requests to the logicserver, waits for the processing results of the logicserver, and responds to the front-end service synchronously after receiving the processing results from the logicserver.
[0082] (4) The logic server receives the rules from the webserver and the logic processing request from the agent. The logic server sends the final processed rules and agent information to the MySQL data storage, and returns a response to the webservice to indicate successful processing.
[0083] 2. ETL synchronizes MySQL's rule agent data, Oracle's transaction flow, calculates profit sharing, and synchronizes the calculated profit sharing data to Oracle:
[0084] (1) taskctl periodically calls the shell script to synchronize the mysql profit-sharing rules entered into the system to cdh.
[0085] (2) taskctl processes the MySQL rule agent data synchronization and periodically calls the script to synchronize the Oracle transaction flow data to the CDH.
[0086] (3) After taskctl synchronizes the MySQL rule agent data and transaction flow data, it performs etl processing on the MySQL rule data according to the agreed logic to form a rule wide table.
[0087] (4) After the broad rule table is formed, a detailed trading rule table is formed based on the transaction flow and the broad rule table. The profit sharing is then calculated on the detailed trading rule table to form a detailed profit sharing table.
[0088] The profit sharing calculation is realized by calling the hive sql corresponding to the profit sharing calculation logic through the shell script; using hive, Mapreduce, yarn and other components in the hadoop platform (cdh platform) to achieve T-level calculation, thereby improving the calculation efficiency from the original 3 man-days to 0.5 man-days
[0089] (5) Based on the detailed profit sharing table, the profit sharing data of each agent is statistically analyzed, and finally a profit sharing summary statistical table is formed.
[0090] (6) Finally, use Sqoop to synchronize the profit distribution details table and profit distribution summary statistics table to Oracle and display them.
[0091] 3. congno requests profit sharing data:
[0092] (1) The operator logs in to congons and obtains profit sharing data through the corresponding profit sharing model;
[0093] In an embodiment of the present invention, rule data and agent data are entered through the front end. When taskctl processes the rule data and the agent data, it periodically calls the shell script to synchronize the oracle transaction data to the cdh. According to the detailed profit table, profit data statistics are performed on each agent in the agent data, and finally a profit summary statistics table is formed. The profit data is obtained through the profit model according to congons. The system automatic calculation efficiency of the embodiment of the present invention is higher, the error rate is lower, and at the same time, data security is improved and the flexibility and versatility of the rules are increased.
[0094] In an embodiment of the present invention, a profit sharing calculation system may be implemented by corresponding hardware or software units. Each unit may be an independent software or hardware unit or may be integrated into one software or hardware unit, which is not intended to limit the present invention.
[0095] Those skilled in the art will appreciate that the units and algorithm steps of the embodiments described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware or in a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.
[0096] Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. The above is only a specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. Any person familiar with the technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A profit sharing calculation method, characterized in that: The following steps are involved: Step 1: Enter rule data and agent data through the front end; Step 2: When processing the rule data and the agent data, taskctl periodically calls the shell script to synchronize the oracle transaction data to cdh; Step 3: Count the profit data of each agent in the agent data according to the profit detailed table, and finally form a profit summary statistics table; Step 4: Obtain profit sharing data through profit sharing model according to congons; After the shell script is called regularly to synchronize the oracle transaction data to the cdh, the steps further include: After synchronously processing the rule data and the agent data of MySQL, the taskctl performs etl processing on the rule data of MySQL according to the agreed logic to form a rule wide table; After forming the rule wide table, the step further includes: Forming a detailed table of transaction rules based on the transaction data and the broad table of rules; After forming the detailed table of transaction rules, and before performing profit sharing statistics on each agent in the agent data according to the detailed table of profit sharing, the step further includes: The profit sharing is calculated for the detailed table of transaction rules to form a detailed table of profit sharing.
2. A profit sharing calculation method according to claim 1, characterized in that: After entering the rule data and agent data through the front end, the steps further include: The network server receives the rule data and the agent data entered by the front end; The network server verifies the rule data and the agent data entered from the front end.
3. A profit sharing calculation method according to claim 2, characterized in that: After the network server verifies the rule data and the agent data entered from the front end, the step further includes: The network server sends the verified rule data and agent data to the logic server; The logic server processes the verified rule data and agent data.
4. A profit sharing calculation method according to claim 3, characterized in that: After the logic server processes the verified rule data and agent data, the step further includes: The logic server synchronously responds the processed rule data and agent data to the front end.
5. A profit sharing calculation method according to claim 4, characterized in that: After the logic server sends the processed rule data and agent data to the front end synchronously, the shell script is called regularly to synchronize the oracle transaction data to the CDH. The steps also include: The logic server sends the rule data and agent data after logic processing to MySQL for storage.
6. A profit sharing calculation method according to claim 5, characterized in that: After forming the profit sharing details table, the steps further include: Use Sqoop to synchronize the profit sharing details table and the profit sharing summary statistics table to Oracle for display.
7. A profit sharing calculation system, characterized in that: The system comprises: Input unit, used to input rule data and agent data through the front end; A calling unit, used for calling a shell script regularly to synchronize the oracle transaction data to the cdh when taskctl executes the rule data and the agent data; A statistical unit, used to perform profit sharing statistics on each agent in the agent data according to the profit sharing detailed table, and finally form a profit sharing summary statistical table; The acquisition unit is used to obtain profit sharing data through the profit sharing model according to congons; After the shell script is called regularly to synchronize the oracle transaction data to the cdh, it also includes: After synchronously processing the rule data and the agent data of MySQL, the taskctl performs etl processing on the rule data of MySQL according to the agreed logic to form a rule wide table; After forming the rule wide table, the method further includes: Forming a detailed table of transaction rules based on the transaction data and the broad table of rules; After forming the detailed table of transaction rules, and before performing profit sharing statistics on each agent in the agent data according to the detailed table of profit sharing, the step further includes: The profit sharing is calculated for the detailed table of transaction rules to form a detailed table of profit sharing.
Citation Information
Patent Citations
Management method, management system for bill receiving commercial customers and management server equipment for commercial customers
CN101777148A
Agent management system
CN104463611A
Big data collection and profit sharing method and system, recording medium and computer program product
CN109754276A
Profit sharing system based on clusters
CN111598699A
Batch task generation method and device
CN111651262A
