Catering sales data clearing processing method suitable for multi-platform access
Through SQL query processing and multi-branch tree structure of catering sales data, the low efficiency of account distribution and data silos in traditional financial management systems for catering companies connected to multiple platforms are solved, unified data management and real-time accounting are achieved, the accuracy of amount allocation and tax compliance are ensured, and the timeliness of business operations is improved.
Patent Information
- Application Number
- CN202511229614.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-29
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-08-29
AI Technical Summary
Traditional financial management systems in catering companies with multi-platform access suffer from problems such as inefficient account splitting, data silos in heterogeneous systems, tax compliance risks, and delayed timeliness of business and financial data. In particular, the reconciliation accuracy in complex promotional combination orders is insufficient, resulting in a disconnect between management models and business operations.
The catering sales data is normalized and pre-processed using database standardized SQL query processing technology, and data clearing and processing are carried out through a fixed-fee and non-fixed-fee multi-branch tree structure. Abnormal orders are monitored in real time, and the accuracy and rationality of transaction data are verified in real time. The corresponding relationship between each participant is established through the multi-branch tree structure to realize automatic data division and synchronous accounting.
It achieves unified management of multi-platform data, improves the speed and accuracy of account splitting, ensures the synchronization of financial accounting and business operations, makes the amount allocation of each participant clear and visible, and reduces tax compliance risks.
Smart Images

Figure CN120807187A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of financial management of catering enterprises, and in particular to a catering sales data clearing processing method suitable for multi-platform access. BACKGROUND
[0002] The chain rate of China's catering industry has broken through 20%, and the contradiction between the traditional financial management system and the digital ecological adaptability has been exposed in the process of large-scale expansion. At present, chain catering enterprises generally adopt a three-dimensional operation framework of "headquarters-franchisee-multi-platform", involving more than ten types of transaction scenarios such as online payment, takeout platform and group purchase channel, and generating million-level order data per day. The traditional financial management system has the following structural defects: 1. Low efficiency of multi-subject account splitting: Franchisees and headquarters use a manual disassembly of turnover sharing mode, which requires manual checking of each platform's commission policy, proportion of deduction and promotion activities (such as Meituan discount and Douyin group purchase verification), and the complexity of account splitting rules increases exponentially; 2. Heterogeneous system data island: Orders from POS, takeout platform and supply chain ERP systems are calculated separately; there is no unique identifier correlation between management mode, fund flow and business order, and there are differences in fund calculation standards; 3. Accumulation of tax compliance risks: Private card collection and manual account splitting violate the "five-flow integration" principle, and the behavior of secondary distribution of funds collected to the headquarters account triggers the double taxation of value-added tax; 4. Low adaptability of reconciliation: Traditional EXCEL reconciliation relies on regular expression matching, which cannot identify differences in billing statistics, calculation logic changes frequently, and changes in the state of some refund orders; sampling shows that the accuracy rate of manual reconciliation in complex promotion combination orders is less than 65%; 5. Industry data timeliness lag: The financial accounting cycle is seriously out of sync with the business operation rhythm, and the traditional mode requires T+10 to complete the reconciliation and then notify the store to handle the differences, which causes processing time lag and difficulty in problem tracing. SUMMARY
[0003] In order to overcome the problems in the above technology, the present application provides a catering sales data clearing processing method suitable for multi-platform access, which comprises: Extracting catering sales data from each platform and transmitting the catering sales data to a data clearing processing center; the platforms include online platforms and offline platforms; the online platforms are platforms for establishing online catering service transactions, including Meituan, Jingdong, Douyin and Taobao, etc.; the offline platforms refer to platforms for direct transactions between customers and franchisees, including scan code payment, cash payment and face payment; the data clearing processing center is used for processing catering sales data.
[0004] The method for processing catering sales data by the data clearing processing center: The SQL query processing technology of database standardization is used to normalize the dining sales data, and all dining sales data is converted into a unified format.
[0005] The amount data of each transaction is divided into fixed fees and non-fixed fees; the fixed fees refer to the agreed fixed fees in each transaction; the non-fixed fees refer to the sum of the amounts that the partners should obtain through calculation; the calculation is addition and subtraction; the fixed fees refer to the agreed delivery fees given to the delivery personnel and the agreed marketing fees given to the employees; the partners refer to the headquarters, franchisees and the platform.
[0006] A fixed fee multi-tree and a non-fixed fee multi-tree are made; the multi-tree is a tree-shaped data structure composed of a tree root as a root node, branches and multiple child nodes; the tree root is the first layer, which branches out multiple child nodes to form the second layer, each child node as a parent node branches out more child nodes to form the third layer, and the iteration goes on and on to form a multi-level parent-child relationship until a complete tree structure is built; the branches are structures connecting the parent-child relationship of adjacent levels; the fixed fee multi-tree from the root to the bottom layer child node is in turn headquarters-franchisee-platform-order number and employee number-fixed fee, and the non-fixed fee multi-tree from the root to the bottom layer child node is in turn headquarters-algorithm classification-franchisee-platform-order information; the order information includes order number, non-fixed fee and order total amount.
[0007] Specifically, the fixed fee multi-tree from the root to the bottom layer child node is in turn headquarters-franchisee-platform-order number and employee number-fixed fee, including: the headquarters as the tree root layer, the franchisee as the second layer child node, the platform as the third layer child node, the order number and the employee number as the fourth layer child node, and the fixed fee as the bottom layer child node; the child nodes of the lower layer structure are connected to the parent nodes of the adjacent upper layer structure through the branch structure to establish a close relationship; the overall correspondence between the headquarters, the franchisee, the platform, the fixed fee, the order number and the employee number is established through the entire fixed fee multi-tree structure; the non-fixed fee multi-tree from the root to the bottom layer child node is in turn headquarters-algorithm classification-franchisee-platform-order information, including: the overall correspondence between the headquarters, the algorithm classification, the franchisee, the platform and the order information is established through the entire non-fixed fee multi-tree structure; the fixed fee multi-tree and the non-fixed fee multi-tree further include: real-time monitoring of abnormal order information, and real-time updating of the fixed fee, the order number and the employee number in the fixed fee multi-tree and the order information in the non-fixed fee multi-tree according to the abnormal information; the method is: the abnormal order is a refund order, the order number in the abnormal order information is extracted, the child nodes with the same order number saved in the fixed fee multi-tree and the non-fixed fee multi-tree are locked according to the order number; the order total amount of the corresponding non-fixed fee multi-tree is refunded to the user according to the order number, and the corresponding order records of the fixed fee multi-tree and the non-fixed fee multi-tree are deleted.
[0008] real-time first data verification: calculating the total fixed fee of all the fixed fee sub-nodes of the lowest layer of the fixed fee multi-ary tree, calculating the total non-fixed fee of all the non-fixed fee sub-nodes of the lowest layer of the non-fixed fee multi-ary tree, and calculating the total order amount of all the orders of the lowest layer of the non-fixed fee multi-ary tree, and verifying whether the total fixed fee plus the total non-fixed fee is equal to the total order amount in real time, and if so, completing the first data verification; the calculation of the total fixed fee of all the fixed fee sub-nodes of the lowest layer of the fixed fee multi-ary tree includes adding up the fixed fees of all the sub-nodes of the lowest layer of the fixed fee multi-ary tree to obtain the total fixed fee; the calculation of the total non-fixed fee of all the non-fixed fee sub-nodes of the lowest layer of the non-fixed fee multi-ary tree includes adding up the non-fixed fees of all the sub-nodes of the lowest layer of the non-fixed fee multi-ary tree to obtain the total non-fixed fee; and the calculation of the total order amount of all the orders of the lowest layer of the non-fixed fee multi-ary tree includes adding up the total order amounts of all the orders of the lowest layer of the non-fixed fee multi-ary tree to obtain the total order amount.
[0009] The real-time verification of whether the total fixed fee plus the total non-fixed fee is equal to the total order amount includes: if the total fixed fee plus the total non-fixed fee is not equal to the total order amount, then adding up the fixed fee and the non-fixed fee of the same order number on the fixed fee multi-ary tree and the non-fixed fee multi-ary tree, verifying whether the total fixed fee and the total non-fixed fee are equal to the total amount of the corresponding order, and if not, comparing the original catering sales data, modifying the fixed fee, the non-fixed fee and the order total amount of the corresponding order in the multi-ary tree; the method of modification is: first, comparing whether the order total amount and the total amount of the original catering sales data are the same, and if not, modifying the total amount and the non-fixed fee of the corresponding order information of the non-fixed fee multi-ary tree according to the original catering sales data, and at the same time, modifying the fixed fee of the corresponding order information of the fixed fee multi-ary tree; if they are the same, comparing whether the fixed fee of the corresponding order of the fixed fee multi-ary tree and the fixed fee of the original catering sales data are the same, and if not, modifying the fixed fee of the corresponding order of the fixed fee multi-ary tree to the fixed fee of the original catering sales data; and comparing whether the non-fixed fee of the corresponding order of the non-fixed fee multi-ary tree and the non-fixed fee of the original catering sales data are the same, and only when they are not the same, replacing the non-fixed fee of the corresponding order of the non-fixed fee multi-ary tree with the non-fixed fee of the original catering sales data; if the fixed fee of the corresponding order of the fixed fee multi-ary tree and the fixed fee of the original catering sales data are the same, then modifying the non-fixed fee of the corresponding order of the non-fixed fee multi-ary tree, obtaining the non-fixed fee of the corresponding order by subtracting the fixed fee from the order total amount of the original catering sales data of the corresponding order, and modifying the non-fixed fee of the corresponding order of the non-fixed multi-ary tree with the obtained non-fixed fee.
[0010] After the verification is successful, a second data verification is performed: the total fixed amount that a corresponding employee should obtain is calculated through a fixed fee multi-ary tree of the same employee number; the total amounts that the headquarters, the franchisee and the platform should obtain are respectively calculated through the corresponding relationship of each layer node of the non-fixed fee multi-ary tree; the amounts of the headquarters, the franchisee, the platform and all employees are added to obtain a total amount to be paid, and when the total amount to be paid and the total order amount are the same, the amounts that each participant should obtain in the amount to be paid are allocated to the headquarters, the franchisee, the platform and all employees; the total fixed amount that a corresponding employee should obtain is calculated through a fixed fee multi-ary tree of the same employee number, which includes: according to the same employee number, all fixed fees of the lowest layer child node on the fixed fee multi-ary tree corresponding to the employee number are extracted, and the extracted fixed fees are added to obtain the fixed amount that the corresponding employee should obtain; the total amounts that the headquarters, the franchisee and the platform should obtain are respectively calculated through the corresponding relationship of each layer node of the non-fixed fee multi-ary tree, which includes: first, the amounts that the platform should obtain in each child node in the lowest layer structure of the non-fixed fee multi-ary tree are calculated through algorithms including ladder draw and bottom line calculation; and the total amounts that each platform should obtain are obtained by adding all the amounts that the same platform should obtain; then, the total amount of all platform amounts corresponding to the franchisee is calculated through the corresponding relationship of the franchisee, the platform and the order information of the non-fixed fee multi-ary tree; and the total amount of all order non-fixed fees corresponding to the franchisee is calculated, and the total amount of all order non-fixed fees corresponding to the franchisee is subtracted from the total amount of all platform amounts corresponding to the franchisee to obtain a pending difference, the pending difference being the sum of the amounts that the corresponding franchisee and the corresponding franchisee should give to the headquarters; finally, the amount that the corresponding franchisee should obtain is obtained by subtracting the management fee that should be given to the headquarters from the pending difference corresponding to the franchisee; the management fee that should be given to the headquarters is obtained by multiplying the pending difference corresponding to the franchisee by the management fee distribution ratio; and the amount that the headquarters should obtain is obtained by adding the management fees that all franchisees should give to the headquarters.
[0011] The second data verification further comprises: when the total amount of the to-be-issued amount and the order total amount are not equal; then the fixed fee of the fixed fee multi-ary tree, the non-fixed fee of the non-fixed fee multi-ary tree and the order total amount need to be verified; the verification process is: adding the fixed fee and the non-fixed fee of the same order number on the fixed fee multi-ary tree and the non-fixed fee multi-ary tree, verifying whether the sum of the fixed fee and the non-fixed fee is equal to the total amount of the corresponding order, if not equal, comparing the original catering sales data, modifying the fixed fee, the non-fixed fee and the order total amount of the corresponding order in the multi-ary tree; the modification method is: first, comparing whether the order total amount and the total amount of the original catering sales data are the same according to the order number, if not the same, modifying the total amount and the non-fixed fee of the corresponding order information of the non-fixed fee multi-ary tree according to the original catering sales data, and modifying the fixed fee of the corresponding order information of the fixed fee multi-ary tree; if the same, comparing whether the fixed fee of the corresponding order of the fixed fee multi-ary tree and the fixed fee of the original catering sales data are the same, if not the same, modifying the fixed fee of the corresponding order of the fixed fee multi-ary tree to the fixed fee of the original catering sales data; if the fixed fee of the corresponding order of the fixed fee multi-ary tree and the fixed fee of the original catering sales data are the same, modifying the non-fixed fee of the corresponding order of the non-fixed fee multi-ary tree, obtaining the non-fixed fee of the corresponding order by subtracting the fixed fee from the order total amount of the original catering sales data of the corresponding order, and modifying the non-fixed fee of the corresponding order of the non-fixed multi-ary tree by the obtained non-fixed fee; after the modification is completed, the to-be-issued amount is reacquired according to the modified data in the above-mentioned same way, and the second data verification is performed again, until the second data verification is successful, and the amount of money of each participating party obtained from the reacquired to-be-issued amount is distributed to the headquarters, the franchisee, the platform and all employees.
[0012] The beneficial effects of the present application are:
[0013] The present invention provides a catering sales data clearing and processing method suitable for multi-platform access, which has the following advantages: 1) Through the intelligent account splitting algorithm of the present invention, the data is uniformly stored on a multi-branch tree during the account splitting process, which solves the problem of data islands in heterogeneous systems; when processing data on the multi-branch tree, all is automatically completed by the data clearing and processing center, which greatly improves the account splitting speed; 2) The data clearing and processing center of the present invention can clear and process data in real time, achieve the synchronization of financial accounting cycle and business operation rhythm, and realize the purpose of highly unified timeliness of business and financial data; 3) The present invention introduces a multi-branch tree structure and uses the multi-branch tree structure to realize the purpose of highly unified timeliness of business and financial data. A fixed fee multi-branch tree is established, with the relationship from the root to the bottom child node being headquarters-franchisee-platform-order number and employee number-fixed fee, and a non-fixed fee multi-branch tree is established, with the relationship from the root to the bottom child node being headquarters-algorithm classification-franchisee-platform-order information, so that the corresponding relationship between each participant is clearly visible, which is convenient for subsequent analysis; 4) The present invention verifies whether there is a problem with the total transaction amount before the transaction data is distributed through the first data verification; at the same time, it verifies whether there is a problem with the distributed amount after the transaction data is distributed through the second data verification; through the double verification method, the accuracy and security of the amount obtained by each participant are guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 This is a flow chart of a method for clearing and processing catering sales data suitable for multi-platform access according to the present invention.
[0015] Figure 2 Schematic diagram of the fixed fee multi-branch tree of the present invention.
[0016] Figure 3 Schematic diagram of the non-fixed fee multitree of the present invention. DETAILED DESCRIPTION
[0017] The following is a detailed description of the specific embodiments of the present invention in conjunction with the accompanying drawings. It should be understood that the specific embodiments given here are only used to illustrate and explain the present invention and cannot be used to limit the present invention.
[0018] like Figure 1 Shown is a flow chart of a catering sales data clearing and processing method suitable for multi-platform access according to the present invention; the flow chart includes: step S1, extracting the catering sales data of each platform, and transmitting the catering sales data to a data clearing and processing center, and the data clearing and processing center is used to process the catering sales data.
[0019] Step S2: The data clearing and processing center processes the catering sales data: Step S21, the amount data of each transaction is divided into fixed fees and non-fixed fees; the fixed fees refer to the agreed fixed fees in each transaction; the non-fixed fees refer to the sum of the amounts that the partners should obtain through calculation; the calculation is addition and subtraction calculation; step S22, a fixed fee multi-way tree and a non-fixed fee multi-way tree are made, the fixed fee multi-way tree is from the root to the bottom layer of the child node in turn: head office-franchisee-platform-order number and employee number-fixed fee, the non-fixed fee multi-way tree is from the root to the bottom layer of the child node in turn: head office-algorithm classification-franchisee-platform-order information; the order information includes: order number, non-fixed fee and total order amount; step S23, real-time first data verification: calculate the sum of all fixed fees of the bottom layer of the child node of the fixed fee multi-way tree, calculate the sum of all non-fixed fees of the bottom layer of the child node of the non-fixed fee multi-way tree, and calculate the sum of all order total amounts of the bottom layer of the child node of the non-fixed fee multi-way tree, real-time verification whether the sum of the fixed fee total and the non-fixed fee total is equal to the sum of the order total amount, if equal, the first data verification is completed; step S24, after the verification is successful, the second data verification is carried out: the total fixed amount that the corresponding employee should obtain is calculated through the fixed fee multi-way tree with the same employee number; the total amounts that the head office, the franchisee and the platform should obtain are respectively calculated through the corresponding relationship of each layer node of the non-fixed fee multi-way tree; the amounts of the head office, the franchisee, the platform and all employees are added up to obtain the total amount to be paid, when the total amount to be paid and the sum of the order total amount are the same, the amounts that each participant should obtain in the amount to be paid are allocated to the head office, the franchisee, the platform and all employees.
[0020] In step S1, each platform includes: an online platform and an offline platform; the online platform is an online catering service transaction platform established, including: Meituan, Jingdong, Douyin and Taobao, etc.; the offline platform refers to a platform for customers to directly transact with franchisees, including: code scanning payment, cash payment and face recognition payment, etc.
[0021] In step S2, before the amount data of each transaction is divided into fixed fees and non-fixed fees, the database standardized SQL query processing technology is used for normalized preprocessing of catering sales data, and all catering sales data is converted into a unified format; the fixed fees refer to the agreed fixed fees in each transaction, including: the agreed distribution fee given to the delivery personnel and the agreed marketing fee given to the employees; the non-fixed fees refer to the sum of the amounts that the partners should obtain through calculation, including: the partners refer to the head office, the franchisee and the platform.
[0022] In step S21, assuming that the fixed fee of each transaction is X 固 , and the total order amount is X0, then the amount of the non-fixed fee is: X 非固 =X0-X 固 .
[0023] In step S22, the multi-ary tree is a tree data structure composed of a tree root as a root node, a tree branch and multiple child nodes; the tree root is as the first layer, branches out multiple child nodes to form the second layer, each child node is as a parent node to branch out more child nodes to form the third layer, and the iteration is continued to form the parent-child relationship of multiple levels until the complete tree structure is constructed; the tree branch is a structure connecting the parent-child relationship of adjacent levels.
[0024] As shown in Figure 2 : a schematic diagram of the fixed fee multi-ary tree of the application; as can be seen from the figure, the fixed fee multi-ary tree from the root to the bottom layer of child nodes is in turn headquarters-franchisee-platform-order number and employee number-fixed fee; wherein the headquarters is as the tree root layer of the fixed fee multi-ary tree, the franchisee is as the second layer of child nodes, the platform is as the third layer of child nodes, the order number and the employee number are as the fourth layer of child nodes, and the fixed fee is as the bottom layer of child nodes; the child nodes of the lower layer structure are connected with the parent nodes of the adjacent upper layer structure through the tree branch structure to establish a close relationship; the overall corresponding relationship of the headquarters, the franchisee, the platform, the fixed fee, the order number and the employee number is established through the whole fixed fee multi-ary tree structure; the specific relationship is: the lower layer structure of the headquarters as the tree root layer is franchisee 1, franchisee 2 and franchisee 3, etc., each franchisee establishes contact with the platform layer of the lower layer structure, for example: franchisee 1 establishes contact with platform 1 and platform 2, etc., then each platform branches out and establishes contact with the order and employee number layer, and the last layer is set as the fixed fee corresponding to the order number and the employee number; if order and employee number a1 is the target for investigation, the nodes of the upper and lower layer structures connected with it are in turn: headquarters-franchisee 1-platform 1-order number and employee number a1-fixed fee A1; As shown in Figure 3As shown: it is a non-fixed fee multi-tree diagram of the application; from the figure, it can be seen that the non-fixed fee multi-tree is from the root to the bottom layer of the child node in turn headquarters-algorithm classification-franchisee-platform-order information; the overall corresponding relationship of the headquarters, algorithm classification, franchisee, platform and order information is established through the whole non-fixed fee multi-tree structure; the specific relationship is: the headquarters as the root layer of the lower structure is classification algorithm 1, classification algorithm 2 and classification algorithm 3, etc., the classification algorithm is the sharing algorithm established by the headquarters and the franchisee through signing a contract, including ladder draw and guaranteed sharing and other algorithms; the lower structure of each classification algorithm is the franchisee, which means that the franchisee with the same classification algorithm with the headquarters is not only one; for example: the franchisee with classification algorithm 1 with the headquarters is franchisee 1 and franchisee 2, etc., then each franchisee establishes contact with multiple platforms, such as platform 1 and platform 2 in the figure, the last layer is set as order information, which means that the consumption information through the corresponding platform, order information x1, x2 and x3 means multiple order information, each order information represents a child node, here the order information is uniformly described due to lack of space, in fact, order information x1, order information x2 and order information x3 etc. respectively represent a child node under platform 1; assuming that franchisee 1 is the target for investigation, Figure 3 One of the paths of the upper and lower structures connected with it is: headquarters-classification algorithm 1-franchisee 1-platform 1-order information x1, the description mode of the remaining paths is the same as the above description mode, the overall corresponding relationship of the headquarters, algorithm classification, franchisee, platform and order information is established through the corresponding path.
[0025] Specifically, it also includes: real-time monitoring of abnormal order information, and updating the fixed fee, order number and employee number in the fixed fee multi-tree in real time according to the abnormal information, and updating the order information in the non-fixed fee multi-tree in real time; the method is: if the abnormal order is a refund order, the order number in the abnormal order information is extracted, the child nodes with the same order number saved in the fixed fee multi-tree and the non-fixed fee multi-tree are locked according to the order number; the total amount of the corresponding non-fixed fee multi-tree order is refunded to the user according to the order number, and the corresponding order record of the fixed fee multi-tree and the non-fixed fee multi-tree is deleted.
[0026] In step S23, the method for calculating the total fixed fee of all the bottom-level child nodes of the fixed fee multi-ary tree comprises: adding up the fixed fees of all the child nodes of the bottom-level child nodes of the fixed fee multi-ary tree to obtain the total fixed fee; the method for calculating the total non-fixed fee of all the bottom-level child nodes of the non-fixed fee multi-ary tree comprises: adding up the non-fixed fees of all the child nodes of the bottom-level child nodes of the non-fixed fee multi-ary tree to obtain the total non-fixed fee; and the method for calculating the total order amount of all the bottom-level child nodes of the non-fixed fee multi-ary tree comprises: adding up the total order amounts of all the child nodes of the bottom-level child nodes of the non-fixed fee multi-ary tree to obtain the total order amount.
[0027] Further, the real-time verification of whether the total fixed fee plus the total non-fixed fee is equal to the total order amount comprises: if the total fixed fee plus the total non-fixed fee is not equal to the total order amount, then adding up the fixed fee and the non-fixed fee of the same order number on the fixed fee multi-ary tree and the non-fixed fee multi-ary tree, verifying whether the total fixed fee and the total non-fixed fee are equal to the total amount of the corresponding order, if not, comparing the original catering sales data, modifying the fixed fee, the non-fixed fee and the total order amount of the corresponding order in the multi-ary tree; the method for modification comprises: first comparing whether the total order amount is the same as the total amount of the original catering sales data, if not, modifying the total amount and the non-fixed fee of the corresponding order information of the non-fixed fee multi-ary tree according to the original catering sales data, and modifying the fixed fee of the corresponding order information of the fixed fee multi-ary tree; if the same, comparing whether the fixed fee of the corresponding order of the fixed fee multi-ary tree is the same as the fixed fee of the original catering sales data, if not, modifying the fixed fee of the corresponding order of the fixed fee multi-ary tree to the fixed fee of the original catering sales data; and comparing whether the non-fixed fee of the corresponding order of the non-fixed fee multi-ary tree is the same as the non-fixed fee of the original catering sales data, only when not the same, replacing the non-fixed fee of the corresponding order of the non-fixed fee multi-ary tree with the non-fixed fee of the original catering sales data; if the fixed fee of the corresponding order of the fixed fee multi-ary tree is the same as the fixed fee of the original catering sales data, modifying the non-fixed fee of the corresponding order of the non-fixed fee multi-ary tree, obtaining the non-fixed fee of the corresponding order by subtracting the fixed fee from the total order amount of the original catering sales data of the corresponding order, and modifying the non-fixed fee of the corresponding order of the non-fixed multi-ary tree with the obtained non-fixed fee.
[0028] For example, assuming that an order is saved in a fixed fee of a fixed fee multi-ary tree Y1, a non-fixed fee of a non-fixed fee multi-ary tree Y2, and the total amount of the order Y0; if Y1+Y2≠Y0, the fixed fee, the non-fixed fee and the total amount of the order are modified by comparing the original catering data information; assuming that the total amount of the order of the original catering data is X0, and the fixed fee is X1; the modification process is as follows: first, compare whether Y0 and X0 are the same, if Y0≠X0, directly replace Y0 of the non-fixed fee multi-ary tree with X0, replace the fixed fee Y1 of the fixed fee multi-ary tree with X1, and replace the non-fixed fee with the result of X0-X1; if Y0=X0, compare whether Y1 and X1 are the same, if Y1≠X1, replace X1 with Y1; and compare whether X0-X1 is equal to Y2, only when X0-X1≠Y2, replace Y2 with the result of X0-X1; when X0-X1=Y2, Y2 remains unchanged; if Y1=X1, because Y0=X0; the non-fixed fee of the original catering data is not equal to the non-fixed fee of the non-fixed fee multi-ary tree, that is: X0-X1≠Y0-Y1, then replace the non-fixed fee of the original order saved on the non-fixed fee multi-ary tree with X0-X1.
[0029] In step S24, the total fixed amount of the corresponding employee is calculated by the fixed fee multi-ary tree with the same employee number, which includes: according to the same employee number, extracting all fixed fees of the fixed fee multi-ary tree of the corresponding employee number at the bottom layer of the node, and adding up the extracted fixed fees to obtain the fixed amount of the corresponding employee; assuming that the order number and employee number a1 are the same as the employee number in the order number and employee number c1, the fixed fee amount of the employee should be: fixed fee A1+fixed fee C1.
[0030] Further, the total amount of the headquarters, the franchisee and the platform is calculated by the corresponding relationship of each layer node of the non-fixed fee multi-ary tree, which includes: first, the amount of money that each sub-node in the bottom layer structure of the non-fixed fee multi-ary tree should pay to the platform is calculated by including the algorithm of ladder draw and the algorithm of bottom guarantee; and the total amount of money of each platform is obtained by adding up all the amounts of money that should be obtained by the same platform; then, the sum of all the platform amounts of money corresponding to the franchisee is calculated by the corresponding relationship of the franchisee, the platform and the order information of the non-fixed fee multi-ary tree; and the sum of all the non-fixed fees of the orders corresponding to the franchisee is calculated, and the sum of all the non-fixed fees of the orders corresponding to the franchisee is subtracted from the sum of all the platform amounts of money corresponding to the franchisee to obtain a to-be-processed difference value, the to-be-processed difference value is the sum of the amount of money that the corresponding franchisee should give to the headquarters and the amount of money that the corresponding franchisee should give to the headquarters; finally, the amount of money that the corresponding franchisee should obtain is obtained by subtracting the management fee that should be given to the headquarters from the to-be-processed difference value corresponding to the franchisee; the management fee that should be given to the headquarters is obtained by multiplying the to-be-processed difference value corresponding to the franchisee by the management fee proportion; the amount of money that the headquarters should obtain is obtained by adding up the management fees that all the franchisees should give to the headquarters.
[0031] Specifically, assuming that the amount of money that platform 1 should obtain by the path of order information x1 and x2 is W11, the amount of money that platform 1 should obtain by the path of order information z1 and z2 is W21, the amount of money that platform 1 should obtain by the path of order information q1 and q2 is W31, and so on, assuming that Figure 3 There are n paths involving platform 1 in total; then the calculation formula W0 of the final amount of money that platform 1 should obtain is:
[0032] Wherein, i represents the amount of money that platform 1 should obtain by the i-th path, one path corresponds to one franchisee, and W i1 represents the amount of money that platform 1 should obtain on the i-th path.
[0033] Specifically, the platforms corresponding to the franchisee 1 are platform 1, 2 and 3, etc.; assuming that the amount of money that platform 1 should obtain corresponding to the franchisee 1 is W11, the amount of money that platform 2 should obtain corresponding to the franchisee 1 is W12, the amount of money that platform 3 should obtain corresponding to the franchisee 1 is W13, and so on, then the calculation formula of the amount of money W1 that all platforms should obtain corresponding to the franchisee 1 is:
[0034] Wherein, j represents the j-th platform that establishes a connection with the franchisee 1, m represents that there are m platforms that establish a connection with the franchisee 1, and W 1j represents the amount of money that the j-th platform that establishes a connection with the franchisee should obtain on the corresponding path.
[0035] Further, the order information corresponding to the franchisee 1 is: the path of order information x1 and x2, the path of order information y1 and y2, etc.; assuming that the non-fixed fee sum of all paths of these order information is U0, then the pending difference is: U0-W1; finally, the amount of money that the headquarters and each franchisee should obtain is obtained through the pending fee respectively.
[0036] Specifically, the second data verification further comprises: when the total amount of the to-be-issued amount and the order total amount is not equal; then the fixed fee of the fixed fee multi-way tree, the non-fixed fee of the non-fixed fee multi-way tree and the order total amount need to be verified; the verification process is: adding the fixed fee and the non-fixed fee of the same order number on the fixed fee multi-way tree and the non-fixed fee multi-way tree, verifying whether the sum of the fixed fee and the non-fixed fee is equal to the total amount of the corresponding order, if not, comparing the original catering sales data, modifying the fixed fee, the non-fixed fee and the order total amount of the corresponding order in the multi-way tree; the modification method is: first, comparing whether the order total amount and the total amount of the original catering sales data are the same according to the order number, if not, modifying the total amount and the non-fixed fee of the corresponding order information of the non-fixed fee multi-way tree according to the original catering sales data, and modifying the fixed fee of the corresponding order information of the fixed fee multi-way tree; if they are the same, comparing whether the fixed fee of the corresponding order of the fixed fee multi-way tree and the fixed fee of the original catering sales data are the same, if not, modifying the fixed fee of the corresponding order of the fixed fee multi-way tree to the fixed fee of the original catering sales data; and comparing whether the non-fixed fee of the corresponding order of the non-fixed fee multi-way tree and the non-fixed fee of the original catering sales data are the same, only when they are not the same, replacing the non-fixed fee of the corresponding order of the non-fixed fee multi-way tree with the non-fixed fee of the original catering sales data; if the fixed fee of the corresponding order of the fixed fee multi-way tree and the fixed fee of the original catering sales data are the same, modifying the non-fixed fee of the corresponding order of the non-fixed fee multi-way tree, obtaining the non-fixed fee of the corresponding order by subtracting the fixed fee from the order total amount of the original catering sales data of the corresponding order, and modifying the non-fixed fee of the corresponding order of the non-fixed multi-way tree by the obtained non-fixed fee; the modification process is the same as the first data verification; after the modification is completed, the to-be-issued amount is reacquired according to the modified data in the same way as above, and the second data verification is performed again until the second data verification is successful, and the amount of money each participant should get is allocated to the headquarters, the franchisee, the platform and all employees according to the reacquired to-be-issued amount.
[0037] Finally, after the second data verification is successful and the amount of money each participant should get is issued, the original fixed fee multi-way tree and the non-fixed fee multi-way tree structure are deleted to reduce the occupied memory; and the catering sales data not written into the multi-way tree is generated into a new fixed fee multi-way tree and a new non-fixed fee multi-way tree, and the amount of money each participant should get is allocated according to the verification method of the first data verification and the second data verification.
Claims
1. A method for clearing and processing catering sales data suitable for multi-platform access, characterized in that: The method comprises: Extracting catering sales data from each platform and transmitting the catering sales data to a data clearing and processing center, where the data clearing and processing center is used to process the catering sales data; The method used by the data clearing and processing center to process catering sales data: The amount data of each transaction is divided into fixed fees and non-fixed fees; the fixed fee refers to the fixed fee agreed upon in each transaction; the non-fixed fee refers to the sum of the amounts due to the partners, which needs to be calculated; the calculation is done by addition and subtraction; Create a fixed fee multitree and a non-fixed fee multitree, where the fixed fee multitree has the following sub-nodes from the root to the bottom layer: headquarters-franchisee-platform-order number and employee number-fixed fee; and the non-fixed fee multitree has the following sub-nodes from the root to the bottom layer: headquarters-algorithm classification-franchisee-platform-order information; the order information includes: order number, non-fixed fee, and total order amount; Performing a first data verification in real time: calculating the sum of all fixed fees of the bottom-most child nodes of the fixed fee multitree, calculating the sum of all non-fixed fees of the bottom-most child nodes of the non-fixed fee multitree, and calculating the sum of all order total amounts of the bottom-most child nodes of the non-fixed fee multitree, and verifying in real time whether the sum of the fixed fees plus the non-fixed fees equals the total order amount. If they are equal, completing the first data verification; After successful verification, the second data verification is performed: the total fixed amount that the corresponding employee should receive is calculated through the same employee number in the fixed fee multi-branch tree; the total amount that the headquarters, franchisees and platform should receive is calculated separately through the correspondence between the nodes of each layer of the non-fixed fee multi-branch tree; the amounts of the headquarters, franchisees, platform and all employees are added together to obtain the total amount to be paid. When the total amount to be paid is the same as the sum of the total order amount, the amount is allocated to the headquarters, franchisees, platform and all employees according to the amount that each participant should receive in the amount to be paid.
2. A method for clearing and processing catering sales data applicable to multi-platform access according to claim 1, characterized in that: The platforms include: online platforms and offline platforms; the online platform is a platform for online catering service transactions; the offline platform refers to a platform for direct transactions between customers and franchisees, including: QR code payment, cash payment and face recognition payment.
3. A method for clearing and processing catering sales data applicable to multi-platform access according to claim 1, characterized in that: The method for processing catering sales data by the data clearing and processing center includes: before dividing the amount data of each transaction into fixed fees and non-fixed fees, using database standardized SQL query processing technology to normalize and pre-process the catering sales data, and convert all catering sales data into a unified format; the fixed fee refers to the fixed fee agreed upon in each transaction, including: the delivery fee agreed to be given to the courier and the marketing fee agreed to be given to the employee; the non-fixed fee refers to the sum of the amounts that the partners should obtain through calculation, including: the partners refer to the headquarters, franchisees and platforms.
4. A method for clearing and processing catering sales data applicable to multi-platform access according to claim 1, characterized in that: The multi-branch tree includes: a multi-branch tree is a tree data structure, consisting of a tree root as a root node, branches and multiple child nodes; the tree root serves as the first layer, and multiple child nodes are divided into the second layer. Each child node serves as a parent node and then divides more child nodes to form the third layer. It continues to iterate to form multi-level parent-child relationships until a complete tree structure is constructed; the branches are structures that connect the parent-child relationships of adjacent levels.
5. A method for clearing and processing catering sales data applicable to multi-platform access according to claim 1, characterized in that: The fixed fee multi-branch tree from the root to the bottom child node is headquarters-franchisee-platform-order number and employee number-fixed fee, including: headquarters as the root layer, franchisee as the second-layer child node, platform as the third-layer child node, order number and employee number as the fourth-layer child node, and fixed fee as the bottom-layer child node; the child nodes of the lower structure are connected to the parent node of the adjacent upper structure through the branch structure to establish a close relationship; the overall correspondence between the headquarters, franchisee, platform, fixed fee, order number and employee number is established through the entire fixed fee multi-branch tree structure; the non-fixed fee multi-branch tree from the root to the bottom child node is headquarters-algorithm classification-franchisee-platform-order information, including: through The entire non-fixed fee multi-branch tree structure establishes an overall correspondence between the headquarters, algorithm classification, franchisees, platform and order information; the fixed fee multi-branch tree and the non-fixed fee multi-branch tree also include: real-time monitoring of abnormal order information, and real-time updating of the fixed fee, order number and employee number in the fixed fee multi-branch tree according to the abnormal information, and real-time updating of the order information in the non-fixed fee multi-branch tree; the method is: the abnormal order is a refund order, the order number in the abnormal order information is extracted, and the child nodes with the same order number stored in the fixed fee multi-branch tree and the non-fixed fee multi-branch tree are locked according to the order number; the total order amount corresponding to the non-fixed fee multi-branch tree is refunded to the user according to the order number, and the corresponding order records of the fixed fee multi-branch tree and the non-fixed fee multi-branch tree are deleted.
6. A method for clearing and processing catering sales data applicable to multi-platform access according to claim 1, characterized in that: The calculating of the sum of all fixed fees of the bottom-level child nodes of the fixed-fee multi-branch tree includes: obtaining the sum of fixed fees by adding up the fixed fees of all child nodes in the bottom-level child nodes of the fixed-fee multi-branch tree; the calculating of the sum of all non-fixed fees of the bottom-level child nodes of the non-fixed-fee multi-branch tree includes: obtaining the sum of non-fixed fees by adding up the non-fixed fees of all child nodes in the bottom-level child nodes of the non-fixed-fee multi-branch tree; the calculating of the sum of the total amount of all orders of the bottom-level child nodes of the non-fixed-fee multi-branch tree includes: obtaining the sum of the total amount of orders by adding up the total amount of all order of all child nodes in the bottom-level child nodes of the non-fixed-fee multi-branch tree.
7. A method for clearing and processing catering sales data applicable to multi-platform access according to claim 1, characterized in that: The real-time verification of whether the sum of the total fixed fees plus the sum of the non-fixed fees is equal to the sum of the total order amount includes: if the sum of the total fixed fees plus the sum of the non-fixed fees is not equal to the sum of the total order amount, then add up the fixed fees and non-fixed fees of the same order number on the fixed fee multi-branch tree and the non-fixed fee multi-branch tree, and verify whether the sum of the fixed fees and non-fixed fees is equal to the total amount of the corresponding order; if they are not equal, then compare the original catering sales data, and modify the fixed fees, non-fixed fees and total order amount of the corresponding order in the multi-branch tree; the modification method is: first compare the total order amount and the total amount of the original catering sales data to see if they are the same; if they are not the same, then modify the total amount and non-fixed fee of the corresponding order information of the non-fixed fee multi-branch tree according to the original catering sales data, and at the same time modify the fixed fee of the corresponding order information of the fixed fee multi-branch tree; if they are the same , then compare whether the fixed fee of the order corresponding to the fixed fee multi-branch tree is the same as the fixed fee of the original catering sales data. If they are not the same, modify the fixed fee of the order corresponding to the fixed fee multi-branch tree to the fixed fee of the original catering sales data; and compare whether the non-fixed fee of the order corresponding to the non-fixed fee multi-branch tree is the same as the non-fixed fee of the original catering sales data. Only when they are different, replace the non-fixed fee of the order corresponding to the non-fixed fee multi-branch tree by the non-fixed fee of the original catering sales data; if the fixed fee of the order corresponding to the fixed fee multi-branch tree is the same as the fixed fee of the original catering sales data, then modify the non-fixed fee of the corresponding order of the non-fixed fee multi-branch tree, and obtain the non-fixed fee of the corresponding order by subtracting the fixed fee from the total order amount of the original catering sales data of the corresponding order, and modify the non-fixed fee of the corresponding order of the non-fixed multi-branch tree according to the obtained non-fixed fee.
8. The method for clearing and processing catering sales data applicable to multiple platforms according to claim 1 is characterized in that: The method of calculating the total amount of fixed money that a corresponding employee should receive for the same employee number through the fixed fee multi-branch tree includes: extracting all the fixed fees of the bottom-level child nodes of the fixed fee multi-branch tree corresponding to the employee number according to the same employee number, and adding up the extracted fixed fees to obtain the fixed amount that the corresponding employee should receive; the method of calculating the total amount of money that the headquarters, franchisees and platforms should receive respectively through the correspondence between the nodes of each layer of the non-fixed fee multi-branch tree includes: first, calculating the amount that each child node in the bottom-level structure of the non-fixed fee multi-branch tree should pay to the platform through an algorithm including a step-by-step deduction calculation and a guaranteed minimum share calculation; and adding up all the amounts that should be received by the same platform to obtain the total amount that should be received by each platform; then, calculating the total amount of money that should be received by each platform through the addition of the non-fixed fee multi-branch tree. Based on the correspondence between the alliance merchants, platforms and order information, calculate the total amount of all platforms corresponding to the franchisees; and calculate the total non-fixed fees of all orders corresponding to the franchisees, and subtract the total amount of all platforms corresponding to the franchisees from the total non-fixed fees of all orders corresponding to the franchisees to obtain the pending difference, which is the sum of the corresponding franchisee and the management fee amount that the corresponding franchisee should pay to the headquarters; finally, subtract the management fee to be paid to the headquarters from the pending difference corresponding to the franchisee to obtain the amount that the corresponding franchisee should receive; the management fee to be paid to the headquarters is obtained by multiplying the pending difference of the corresponding franchisee by the management fee sharing ratio; add up the management fees that all franchisees should pay to the headquarters to obtain the amount that the headquarters should receive.
9. A method for clearing and processing catering sales data applicable to multi-platform access according to claim 1, characterized in that: The second data verification also includes: when the total amount to be issued is not the same as the sum of the total amount of the order; it is necessary to verify the fixed fee of the fixed fee multi-branch tree, the non-fixed fee of the non-fixed fee multi-branch tree and the total amount of the order; the verification process is: add up the fixed fees and non-fixed fees of the same order number on the fixed fee multi-branch tree and the non-fixed fee multi-branch tree, and verify whether the sum of the fixed fees and non-fixed fees is equal to the total amount of the corresponding order. If they are not equal, compare the original catering sales data and modify the fixed fees, non-fixed fees and total amount of the order of the corresponding order in the multi-branch tree; the modification method is: first compare the total amount of the order and the total amount of the original catering sales data according to the order number to see if they are the same. If they are not the same, modify the total amount and non-fixed fee of the corresponding order information of the non-fixed fee multi-branch tree according to the original catering sales data, and modify the fixed fee of the corresponding order information of the fixed fee multi-branch tree at the same time; if they are the same , then compare whether the fixed fee of the order corresponding to the fixed fee multi-branch tree is the same as the fixed fee of the original catering sales data. If they are not the same, modify the fixed fee of the order corresponding to the fixed fee multi-branch tree to the fixed fee of the original catering sales data; if the fixed fee of the order corresponding to the fixed fee multi-branch tree is the same as the fixed fee of the original catering sales data, then modify the non-fixed fee of the corresponding order of the non-fixed fee multi-branch tree, and subtract the fixed fee from the total order amount of the original catering sales data of the corresponding order to obtain the non-fixed fee of the corresponding order, and modify the non-fixed fee of the corresponding order of the non-fixed multi-branch tree according to the obtained non-fixed fee; after the modification is completed, re-obtain the amount to be paid out in the same manner as claim 8 based on the modified data, and perform the second data verification again until the second data verification is successful, and distribute the amount to the headquarters, franchisees, platform and all employees according to the amount that each participant should get in the re-obtained amount to be paid out.
10. A method for clearing and processing catering sales data applicable to multi-platform access according to claim 1, characterized in that: The second data verification also includes: after the second data verification is successful and the due amount is distributed to each participant, the original fixed fee multi-tree and non-fixed fee multi-tree structures are deleted, and a new fixed fee multi-tree and a new non-fixed fee multi-tree are generated through the catering sales data that is not written into the multi-tree, and the amount is allocated to each participant according to the verification method of the first data verification and the second data verification.
Citation Information
Patent Citations
Intelligent profit sharing settlement method and system
CN105719088A
ETC payment clearing method, device and apparatus based on alliance chain
CN112613865A
Automatic account checking and clearing method and device
CN114004687A
Acquisition method and device of clearing rule, electronic equipment and storage medium
CN114443720A
Method for distributing profits of selling price of products
KR1020130139457A