A catering sales data clearing processing method suitable for multi-platform access

By employing SQL query processing and a multi-branch tree structure for data clearing in a multi-platform access system for catering enterprises, the problems of low accounting efficiency and data silos in traditional financial management systems have been solved. This has enabled unified data processing and real-time accounting, ensuring the accuracy and compliance of transaction data.

CN120807187BActive Publication Date: 2026-02-03BIG HEAD (GUANGZHOU) SOFTWARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511229614.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2026-02-03
Estimated Expiration
2045-08-29

AI Technical Summary

Technical Problem

Traditional financial management systems suffer from problems such as low revenue sharing efficiency, data silos in heterogeneous systems, tax compliance risks, and outdated business and financial data in catering enterprises with multiple platform access. In particular, the accuracy of reconciliation is insufficient in complex promotional bundled orders, and it is unable to identify differences in billing statistical standards and changes in calculation logic among various platforms.

Method used

The system employs standardized SQL query processing technology to normalize and preprocess restaurant sales data. It also uses a multi-branch tree structure for fixed and non-fixed fees to separate data, monitor abnormal orders in real time, verify the accuracy and rationality of transaction data, and establish the corresponding relationships among the participants through the multi-branch tree structure to achieve unified data storage and automatic revenue sharing.

Benefits of technology

It enables unified processing of data across multiple platforms, improves the speed of revenue sharing, synchronizes financial accounting with business operations, ensures the accuracy and security of transaction data, reduces tax compliance risks, and improves the timeliness of business and financial data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807187B_ABST
    Figure CN120807187B_ABST
Patent Text Reader

Abstract

The application discloses a kind of dining and sales data clearing processing methods suitable for multi-platform access, belong to the technical field of financial management of catering enterprises;The method comprises the following steps of: extracting dining and sales data of each platform, transmitting dining and sales data to data clearing processing center;Data clearing processing center first saves dining and sales data according to fixed fee and non-fixed fee on fixed fee multibranched tree and non-fixed fee multibranched tree;And after first data verification and second data verification, the amount corresponding to the participating party is distributed to each participating party;The method verifies whether the total amount of the transaction exists a problem before the transaction data is distributed by first data verification;Through second data verification, it is verified whether the amount of distribution exists a problem after the transaction data is distributed;Through the mode of double verification, the accuracy and security of the amount obtained by each participating party are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of financial management of catering enterprises, and particularly relates to a catering sales data clearing processing method suitable for multi-platform access. BACKGROUND

[0002] The chain rate of the Chinese 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, Douyin group purchase verification), and the complexity of account splitting rules increases exponentially; 2. Heterogeneous system data island: Orders of systems such as POS, takeout middle platform and supply chain ERP are calculated separately; there is a lack of unique identification correlation among 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 flows in one" principle, and the behavior of secondary distribution of funds after collection into 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 standards, frequent changes in calculation logic and state changes of part of the refund order of each platform; sampling shows that the accuracy rate of manual reconciliation in complex promotion combination orders is less than 65%; 5. Time lag of industry and financial data: The financial accounting period is seriously out of sync with the business operation rhythm, and the traditional mode needs T+10 to complete the reconciliation and then notify the store to handle the differences, which causes time lag in processing 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:

[0004] Extracting catering sales data of each platform and transmitting the catering sales data to a data clearing processing center; the each platform includes: an online platform and an offline platform; the online platform is a platform for establishing online catering service transactions, including: Meituan, Jingdong, Douyin and Taobao, etc.; the offline platform refers to a platform 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 the catering sales data.

[0005] The method for processing the catering sales data by the data clearing processing center comprises:

[0006] 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.

[0007] 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.

[0008] 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.

[0009] 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.

[0010] 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.

[0011] 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.

[0012] After the verification is successful, a second data verification is performed: a total fixed amount that a corresponding employee should obtain is calculated through a fixed fee multi-ary tree of the same employee number; a total amount that the headquarters, the franchisee and the platform should obtain is calculated through a 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 of each participant should be obtained in the total amount to be paid are allocated to the headquarters, the franchisee, the platform and all employees; the total fixed amount that the corresponding employee should obtain is calculated through the 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 of 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 amount that the headquarters, the franchisee and the platform should obtain is calculated through the corresponding relationship of each layer node of the non-fixed fee multi-ary tree, which includes: first, the amount that the platform should pay in each node of the lowest layer structure of the non-fixed fee multi-ary tree is calculated through the algorithm including the ladder draw and the bottom guarantee share calculation; and all amounts that the same platform should obtain are added to obtain the total amount that each 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 to-be-processed difference, the to-be-processed difference is the sum of the amount of the corresponding franchisee and the amount of the management fee that 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 to-be-processed difference of the corresponding franchisee; the management fee that should be given to the headquarters is obtained by multiplying the to-be-processed difference of the corresponding franchisee by the management fee sharing ratio; all the management fees that the franchisee should give to the headquarters are added to obtain the amount that the headquarters should obtain.

[0013] The second data verification also includes: when the total amount to be disbursed and the total amount of the orders are not the same, 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 orders; the verification process is as follows: 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 with the original catering sales data and modify the fixed fees, non-fixed fees, and total amount of the orders in the multi-branch tree; the modification method is as follows: first, compare the total amount of the orders with the total amount of the original catering sales data according to the order number. If they are not the same, modify the total amount and non-fixed fees of the corresponding order information in the non-fixed fee multi-branch tree according to the original catering sales data, and at the same time modify the fixed fees of the corresponding order information in the fixed fee multi-branch tree; if they are the same... If the fixed fees are the same, compare the fixed fees of the orders corresponding to the fixed-fee multi-branch tree with the fixed fees of the original catering sales data. If they are different, modify the fixed fees of the orders corresponding to the fixed-fee multi-branch tree to match the fixed fees of the original catering sales data. If the fixed fees of the orders corresponding to the fixed-fee multi-branch tree are the same as the fixed fees of the original catering sales data, modify the non-fixed fees of the orders corresponding to the non-fixed-fee multi-branch trees. Obtain the non-fixed fees of the corresponding orders by subtracting the fixed fees from the total order amount of the original catering sales data. Modify the non-fixed fees of the orders corresponding to the non-fixed multi-branch trees using the obtained non-fixed fees. After modification, re-obtain the amount to be distributed according to the modified data in the same way as above, and perform the second data verification again until the second data verification is successful. Then, allocate the amount to the headquarters, franchisees, platform, and all employees according to the amount due to each participant in the re-obtained amount to be distributed.

[0014] The beneficial effects of this invention are:

[0015] This invention provides a method for processing catering sales data across multiple platforms. This method has the following advantages: 1) Through the intelligent accounting algorithm of this invention, data is uniformly stored on a multi-branch tree during the accounting process, solving the problem of data silos in heterogeneous systems; the processing of data on the multi-branch tree is entirely automated by the data processing center, greatly improving the accounting speed; 2) The data processing center of this invention can process data in real time, achieving synchronization between the financial accounting cycle and the business operation rhythm, and realizing a high degree of consistency in the timeliness of business and financial data; 3) This invention introduces a multi-branch tree structure and utilizes this structure... A fixed-fee multi-branch tree was established, with the root to the bottom child node in the order of Headquarters-Franchisee-Platform-Order Number and Employee Number-Fixed Fee. A non-fixed-fee multi-branch tree was established, with the root to the bottom child node in the order of Headquarters-Algorithm Classification-Franchisee-Platform-Order Information. This makes the correspondence of each participant clearly visible, facilitating subsequent analysis. 4) This invention verifies whether there are any problems with the total transaction amount before the transaction data is allocated through the first data verification. At the same time, it verifies whether there are any problems with the allocated amount after the transaction data is allocated through the second data verification. Through the dual verification method, the accuracy and security of the amount obtained by each participant are guaranteed. Attached Figure Description

[0016] Figure 1 This is a flowchart of a catering sales data clearing and processing method applicable to multiple platforms according to the present invention.

[0017] Figure 2 This is a schematic diagram of the fixed-cost multi-branch tree of the present invention.

[0018] Figure 3 This is a schematic diagram of the non-fixed-cost multi-branch tree of the present invention. Detailed Implementation

[0019] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments given herein are for illustration and explanation only and are not intended to limit the present invention.

[0020] like Figure 1 The diagram shows a flowchart of a catering sales data clearing and processing method applicable to multiple platforms according to the present invention. The flowchart includes: step S1, extracting catering sales data from each platform and transmitting the catering sales data to a data clearing and processing center, wherein the data clearing and processing center is used to process the catering sales data.

[0021] Step S2, the method by which the data clearing and processing center processes catering sales data:

[0022] Step S21: Divide the amount data of each transaction 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 partner, which needs to be calculated; the calculation is an addition and subtraction calculation. Step S22: Create a fixed fee multi-branch tree and a non-fixed fee multi-branch tree. The fixed fee multi-branch tree, from the root to the bottom-level child node, is in the order of Headquarters-Franchisee-Platform-Order Number and Employee Number-Fixed Fee. The non-fixed fee multi-branch tree, from the root to the bottom-level child node, is in the order of Headquarters-Algorithm Classification-Franchisee-Platform-Order Information. The order information includes: order number, non-fixed fee, and total order amount. Step S23: Perform the first data verification in real time: calculate the sum of all fixed fees in the bottom-level child node of the fixed fee multi-branch tree, and calculate the non-fixed fee multi-branch tree. The sum of all non-fixed fees for the bottom-level child nodes of the multi-branch tree is calculated, and the sum of the total order amount for the bottom-level child nodes of the multi-branch tree with non-fixed fees is calculated. The sum of fixed fees plus the sum of non-fixed fees is verified in real time to see if they equal the total order amount. If they are equal, the first data verification is completed. Step S24: After successful verification, the second data verification is performed: the total fixed amount due to the corresponding employee is calculated using the same employee number in the fixed fee multi-branch tree; the total amount due to the headquarters, franchisees, and platform is calculated using the corresponding relationship of each level of nodes in the multi-branch tree with non-fixed fees; the total amount due to the headquarters, franchisees, platform, and all employees is added together to obtain the total amount to be distributed. When the total amount due to the headquarters and the sum of the total order amount are the same, the amount is allocated to the headquarters, franchisees, platform, and all employees according to the amount due to each participant in the amount due to the headquarters.

[0023] In step S1, the platforms include: online platforms and offline platforms; online platforms are platforms for establishing online catering service transactions, including: Meituan, JD.com, Douyin, and Taobao; offline platforms refer to platforms where customers and franchisees conduct transactions directly, including: QR code payment, cash payment, and facial recognition payment.

[0024] In step S2, before dividing the amount data of each transaction into fixed fees and non-fixed fees, the catering sales data is preprocessed using standardized SQL query processing technology to normalize the data and convert all catering sales data into a unified format. The fixed fees refer to the fixed fees agreed upon in each transaction, including the agreed delivery fee for the courier and the agreed marketing fee for the employee. The non-fixed fees refer to the sum of the amounts due to the partners that need to be calculated, including the partners being the headquarters, franchisees, and the platform.

[0025] In step S21, let's assume the fixed fee for each transaction is X. 固 If the total order amount is X0, then the amount of the non-fixed fee is: X 非固 =X0-X 固 .

[0026] In step S22, a multi-branch tree is a tree-shaped data structure consisting of a root node, branches, and multiple child nodes. The root node forms the first layer, and multiple child nodes branch out to form the second layer. Each child node becomes a parent node and branches out to form the third layer. This process continues iterating to form multi-level parent-child relationships until a complete tree structure is constructed. The branches are structures that connect adjacent levels of parent-child relationships.

[0027] like Figure 2 The diagram shows a schematic of the fixed-fee multi-branch tree of the present invention. As can be seen from the diagram, the fixed-fee multi-branch tree, from the root to the bottommost child node, is structured as follows: Headquarters - Franchisee - Platform - Order Number and Employee Number - Fixed Fee. The Headquarters serves as the root layer of the fixed-fee multi-branch tree, the Franchisee as the second-level child node, the Platform as the third-level child node, the Order Number and Employee Number as the fourth-level child node, and the Fixed Fee as the bottommost child node. The child nodes of lower-level structures are all connected to their parent nodes in adjacent upper-level structures through branch structures, establishing a close relationship. The entire fixed-fee multi-branch tree structure establishes the relationships between Headquarters, Franchisee, Platform, Fixed Fee, and Order Number. The overall correspondence between the order number and employee number is as follows: The headquarters acts as the root layer, with the lower layers being Franchisee 1, Franchisee 2, and Franchisee 3, etc. Each franchisee establishes connections with the next lower layer of the structure platform. For example, Franchisee 1 connects with Platform 1 and Platform 2, etc. Subsequently, each platform branches out and connects with the lower layer of order and employee number. The final layer is set as the fixed fee corresponding to the order number and employee number. If we take order and employee number a1 as the target of consideration, the nodes of the upper and lower layers that connect with it are as follows: Headquarters - Franchisee 1 - Platform 1 - Order and Employee Number a1 - Fixed Fee A1.

[0028] like Figure 3The diagram shows a non-fixed-fee multi-way tree of the present invention. As can be seen from the diagram, the non-fixed-fee multi-way tree, from the root to the bottommost child node, is structured as Headquarters - Algorithm Classification - Franchisee - Platform - Order Information. The entire non-fixed-fee multi-way tree structure establishes the overall correspondence between Headquarters, Algorithm Classification, Franchisee, Platform, and Order Information. Specifically, the lower-level structure of Headquarters (the root layer) includes Classification Algorithm 1, Classification Algorithm 2, and Classification Algorithm 3, etc. The Classification Algorithms are revenue-sharing algorithms agreed upon by Headquarters and Franchisees through contracts, including tiered commission and guaranteed commission, among others. The lower-level structure of each Classification Algorithm is the Franchisee, meaning they share the same Classification Algorithm as Headquarters. There are often more than one franchisee; for example, franchisees who establish classification algorithm 1 with the headquarters are Franchisee 1 and Franchisee 2, etc. Subsequently, each franchisee establishes connections with multiple platforms. As shown in the figure, Franchisee 1 has established connections with Platform 1 and Platform 2, etc. The last layer is set as order information, which means the consumption information made through the corresponding platform. Order information x1, x2, and x3, etc., represent multiple order information, each order information representing a child node. Here, due to space limitations, the order information is described uniformly. In reality, order information x1, order information x2, and order information x3, etc., each represent a child node under Platform 1. If we take Franchisee 1 as the target of analysis, Figure 3 One of the paths in the hierarchical structure that connects the headquarters to the classification algorithm is: Headquarters - Classification Algorithm 1 - Franchisee 1 - Platform 1 - Order Information x1. The other paths are described in the same way as above. The overall correspondence between the headquarters, algorithm classification, franchisee, platform and order information is established through the corresponding paths.

[0029] Specifically, it also includes: real-time monitoring of abnormal order information, and real-time updating of fixed fee, order number, and employee number in the fixed fee multi-branch tree, and real-time updating of order information in the non-fixed fee multi-branch tree; the method is as follows: if the abnormal order is a refund order, extract the order number from the abnormal order information, lock the child nodes with the same order number stored in the fixed fee multi-branch tree and the non-fixed fee multi-branch tree according to the order number; refund the total amount of the order in the corresponding non-fixed fee multi-branch tree to the user according to the order number, and delete the corresponding order record in the fixed fee multi-branch tree and the non-fixed fee multi-branch tree.

[0030] In step S23, the method for calculating the sum of all fixed fees of the bottom-level child nodes of the fixed-fee multi-way tree is as follows: the sum of fixed fees of all child nodes in the bottom-level child node of the fixed-fee multi-way tree is obtained by adding up the fixed fees of all child nodes in the bottom-level child node of the fixed-fee multi-way tree; the method for calculating the sum of all non-fixed fees of the bottom-level child nodes of the non-fixed-fee multi-way tree is as follows: the sum of non-fixed fees of all child nodes in the bottom-level child node of the non-fixed-fee multi-way tree is obtained by adding up the non-fixed fees of all child nodes in the bottom-level child node of the non-fixed-fee multi-way tree; the method for calculating the sum of all order amounts of the bottom-level child nodes of the non-fixed-fee multi-way tree is as follows: the sum of all order amounts of all child nodes in the bottom-level child node of the non-fixed-fee multi-way tree is obtained by adding up the total order amount.

[0031] Further, the real-time verification of whether the sum of fixed fees plus the sum of non-fixed fees equals the total order amount includes: if the sum of fixed fees plus the sum of non-fixed fees does not equal the total order amount, then the fixed fees and non-fixed fees for the same order number on the fixed fee multi-branch tree and the non-fixed fee multi-branch tree are added together, and the sum of fixed fees and non-fixed fees is verified to be equal to the total amount of the corresponding order. If they are not equal, then the original catering sales data is compared, and the fixed fees, non-fixed fees, and total order amount of the corresponding order in the multi-branch tree are modified. The modification method is as follows: first, compare whether the total order amount is the same as the total amount in the original catering sales data. If they are not the same, then modify the total amount and non-fixed fees of the corresponding order information in the non-fixed fee multi-branch tree according to the original catering sales data, and at the same time modify the fixed fees of the corresponding order information in the fixed fee multi-branch tree; if... If they are the same, compare the fixed fee of the order corresponding to the fixed-fee multi-branch tree with the fixed fee of the original catering sales data. If they are different, 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. Then compare the non-fixed fee of the order corresponding to the non-fixed-fee multi-branch tree with the non-fixed fee of the original catering sales data. Only if they are different, replace the non-fixed fee of the order corresponding to the non-fixed-fee multi-branch tree with 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, modify the non-fixed fee of the corresponding order of the non-fixed-fee multi-branch tree. 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 with the obtained non-fixed fee.

[0032] For example, suppose an order's fixed fee is Y1 stored in a fixed-fee multi-way tree, the non-fixed fee in a non-fixed-fee multi-way tree is Y2, and the total order amount is Y0. If Y1 + Y2 ≠ Y0, then the fixed fee, non-fixed fee, and total order amount are modified by comparing the original catering data. Let the total order amount in the original catering data be X0, and the fixed fee be X1. The modification process is as follows: First, compare whether Y0 and X0 are the same. If Y0 ≠ X0, then directly replace Y0 in the non-fixed-fee multi-way tree with X0, replace the fixed fee Y1 in the fixed-fee multi-way tree with X1, and replace the result of X0 - X1 with the fixed fee Y0 in the non-fixed-fee multi-way tree. For non-fixed-fee multi-branch trees, if Y0 = X0, compare whether Y1 is the same as X1. If Y1 ≠ X1, replace Y1 with X1. Then compare whether X0 - X1 equals Y2. Only when X0 - X1 ≠ Y2, replace Y2 with the result of X0 - X1. If X0 - X1 = Y2, keep Y2 unchanged. If Y1 = X1, since Y0 = X0, the non-fixed fee of the original catering data must not be equal to the non-fixed fee of the non-fixed-fee multi-branch tree, that is: X0 - X1 ≠ Y0 - Y1. Then replace the non-fixed fee of the original order stored in the non-fixed-fee multi-branch tree with X0 - X1.

[0033] In step S24, the calculation of the total fixed amount due to the corresponding employee through the fixed fee multi-branch tree for the same employee number includes: extracting all fixed fees of the bottom-level child nodes of the fixed fee multi-branch tree for the same employee number, and adding up the extracted fixed fees to obtain the fixed amount due to 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, then the fixed fee amount due to the employee is: fixed fee A1 + fixed fee C1.

[0034] Furthermore, by analyzing the correspondence between nodes at each level of the non-fixed-fee multi-way tree, the total amount due to the headquarters, franchisees, and the platform is calculated separately. This includes: First, using an algorithm that includes tiered commission calculation and guaranteed revenue sharing calculation, the amount payable to the platform by each child node in the lowest level structure of the non-fixed-fee multi-way tree is calculated; then, all the amounts due to the same platform are summed to obtain the total amount due to each platform; subsequently, by analyzing the correspondence between franchisees, platforms, and order information in the non-fixed-fee multi-way tree, the total amount due to all platforms corresponding to the franchisee is calculated; and the total amount due to the franchisee is calculated... The sum of all non-fixed fees for all orders is calculated by subtracting the sum of all platform fees owed to the franchisee from the sum of all non-fixed fees for all orders corresponding to the franchisee, resulting in a pending difference. This pending difference is the sum of the management fees owed by the franchisee to the headquarters. Finally, the amount owed to the headquarters by the franchisee is subtracted from the pending difference for each franchisee, yielding the amount owed to the franchisee. The management fee owed to the headquarters is calculated by multiplying the pending difference for each franchisee by the management fee sharing ratio. Finally, the amount owed to the headquarters by all franchisees is summed to obtain the amount owed to the headquarters.

[0035] Specifically, assume that the amount owed to Platform 1 by the path of order information x1 and x2 is W11, the amount owed to Platform 1 by the path of order information z1 and z2 is W21, the amount owed to Platform 1 by the path of order information q1 and q2 is W31, and so on. Figure 3 There are n paths involving platform 1; therefore, the formula W0 for calculating the final amount that platform 1 should receive is:

[0036]

[0037] Where i represents the amount that the platform 1 should receive from the i-th path, and one path corresponds to one franchisee, W i1 This represents the amount that platform 1 should receive on the i-th path.

[0038] Specifically, platform 1, 2, and 3 correspond to franchisee 1; assuming that the amount owed by platform 1 corresponding to franchisee 1 is W11, the amount owed by platform 2 corresponding to franchisee 1 is W12, the amount owed by platform 3 corresponding to franchisee 1 is W13, and so on, the formula for calculating the amount W1 owed by all platforms corresponding to franchisee 1 is as follows:

[0039]

[0040] Where j represents the j-th platform that has established contact with franchisee 1, m represents the total number of platforms that have established contact with franchisee 1, and W 1j This represents the amount that the j-th platform that establishes a connection with the franchisee should receive in the corresponding path.

[0041] Furthermore, the order information corresponding to franchisee 1 includes: the paths of order information x1 and x2, the paths of order information y1 and y2, etc.; assuming that the sum of the non-fixed fees for all paths of these order information is U0, then the pending difference is: U0 - W1; finally, the amount due to the headquarters and each franchisee is obtained through the pending fees.

[0042] Specifically, the second data verification also includes: when the total amount to be disbursed and the total amount of the orders are not the same, 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 orders; the verification process is as follows: 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 with the original catering sales data and modify the fixed fees, non-fixed fees, and total amount of the orders in the multi-branch tree; the modification method is as follows: first, compare the total amount of the orders with the total amount of the original catering sales data based on the order number. If they are not the same, modify the total amount and non-fixed fees of the corresponding order information in the non-fixed fee multi-branch tree based on the original catering sales data, and at the same time modify the fixed fees of the corresponding order information in the fixed fee multi-branch tree; if they are the same, compare the fixed fees of the corresponding orders in the fixed fee multi-branch tree with the fixed fees of the original catering sales data. If they are not the same, modify the fixed fees. The fixed fee for orders corresponding to multi-branch trees is modified to match the fixed fee in the original catering sales data. The non-fixed fee for orders corresponding to non-fixed-fee multi-branch trees is compared to the non-fixed fee in the original catering sales data. If they are different, the non-fixed fee for orders corresponding to non-fixed-fee multi-branch trees is replaced with the non-fixed fee from the original catering sales data. If the fixed fee for orders corresponding to fixed-fee multi-branch trees is the same as the fixed fee in the original catering sales data, the non-fixed fee for orders corresponding to non-fixed-fee multi-branch trees is modified by subtracting the fixed fee from the total order amount in the original catering sales data. This non-fixed fee is then used to modify the non-fixed fee for orders corresponding to non-fixed multi-branch trees. The modification process is the same as the first data verification. After modification, the amount to be distributed is re-acquired according to the modified data in the same way described above, and the second data verification is performed again. Once the second data verification is successful, the amount is allocated to the headquarters, franchisees, platform, and all employees according to the amount due to each participant in the re-acquired amount to be distributed.

[0043] Finally, after the second data verification is successful and the due amount is distributed to each participant, the original fixed-fee multi-branch tree and non-fixed-fee multi-branch tree structures are deleted to reduce memory usage; and the catering sales data that has not been written into the multi-branch tree is used to generate new fixed-fee multi-branch trees and new non-fixed-fee multi-branch trees, and the amount is allocated to each participant according to the verification methods of the first and second data verifications.

Claims

1. A method for sorting and processing catering sales data applicable to multiple platforms, characterized in that, The method includes: Extract catering sales data from various platforms and transmit the catering sales data to the data clearing and processing center, which is used to process the catering sales data; The data clearing and processing center processes catering sales data by dividing the amount of each transaction into fixed fees and non-fixed fees. The fixed fees refer to the fixed fees agreed upon in each transaction. The non-fixed fees refer to the sum of the amounts due to the partner, which needs to be calculated. The calculation is an addition and subtraction method. Construct a fixed-fee multi-branch tree and a non-fixed-fee multi-branch tree. The fixed-fee multi-branch tree, from the root to the bottom-level child node, is structured as Headquarters-Franchisee-Platform-Order Number and Employee Number-Fixed Fee. The non-fixed-fee multi-branch tree, from the root to the bottom-level child node, is structured as Headquarters-Algorithm Classification-Franchisee-Platform-Order Information. The order information includes: Order Number, Non-Fixed Fee, and Total Order Amount. Real-time first data verification: Calculate the sum of all fixed fees of the bottom-level child nodes of the fixed-fee multi-way tree, calculate the sum of all non-fixed fees of the bottom-level child nodes of the non-fixed-fee multi-way tree, and calculate the sum of all order amounts of the bottom-level child nodes of the non-fixed-fee multi-way tree. Real-time verification is performed to see if the sum of fixed fees plus the sum of non-fixed fees equals the sum of order amounts. If they are equal, the first data verification is completed. After successful verification, a second data verification is performed: the total fixed amount due to the corresponding employee is calculated using the fixed-fee multi-branch tree with the same employee number; the total amount due to the headquarters, franchisees, and platform is calculated separately using the corresponding relationship of each level node in 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 disbursed; when the total amount to be disbursed 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 due to each participant in the amount to be disbursed. The second data verification also includes: when the total amount to be disbursed and the total amount of the orders are not the same, 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 orders; the verification process is as follows: 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 with the original catering sales data and modify the fixed fees, non-fixed fees, and total amount of the orders in the multi-branch tree; the modification method is as follows: first, compare the total amount of the orders with the total amount of the original catering sales data based on the order number. If they are not the same, modify the total amount and non-fixed fees of the corresponding order information in the non-fixed fee multi-branch tree according to the original catering sales data, and at the same time modify the fixed fees of the corresponding order information in the fixed fee multi-branch tree. Modify; if they are the same, compare the fixed fee of the order corresponding to the fixed fee multi-branch tree with the fixed fee of the original catering sales data. If they are different, 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, modify the non-fixed fee of the corresponding order of the non-fixed fee multi-branch tree. 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. Modify the non-fixed fee of the corresponding order of the non-fixed multi-branch tree using the obtained non-fixed fee. After the modification is completed, re-obtain the amount to be distributed based on the modified data and perform the second data verification again. After the second data verification is successful, allocate the amount to the headquarters, franchisees, platform and all employees according to the amount due to each participant in the re-obtained amount to be distributed. 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-branch tree and non-fixed-fee multi-branch tree structures are deleted, and new fixed-fee multi-branch trees and new non-fixed-fee multi-branch trees are generated through catering sales data that have not been written into the multi-branch trees. The amount is then allocated to each participant according to the verification methods of the first data verification and the second data verification.

2. The method for sorting and processing catering sales data applicable to multiple platforms as described in claim 1, characterized in that, The platforms include: online platforms and offline platforms; the online platforms are established online catering service transaction platforms; the offline platforms refer to platforms where customers and franchisees conduct transactions directly, including: QR code payment, cash payment and facial recognition payment.

3. The method for sorting and processing catering sales data applicable to multiple platforms as described in claim 1, characterized in that, The data clearing and processing center processes restaurant sales data in the following ways: before dividing the amount of each transaction into fixed fees and non-fixed fees, it uses standardized SQL query processing technology to normalize and preprocess the restaurant sales data, converting all restaurant sales data into a unified format; the fixed fees refer to the fixed fees agreed upon in each transaction, including the agreed delivery fee paid to the courier and the agreed marketing fee paid to the employee; the non-fixed fees refer to the sum of the amounts due to the partners that need to be calculated, including: partners refer to the headquarters, franchisees, and the platform.

4. The method for sorting and processing catering sales data applicable to multiple platforms as described in claim 1, characterized in that, The multi-branch tree includes: a multi-branch tree is a tree-shaped data structure consisting of a root node, branches, and multiple child nodes; the root node is the first level, which branches out into multiple child nodes to form the second level, and each child node is the parent node, which then branches out into more child nodes to form the third level, and so on, forming multi-level parent-child relationships until a complete tree structure is constructed; the branches are structures that connect adjacent levels of parent-child relationships.

5. The method for sorting and processing catering sales data applicable to multiple platforms as described in claim 1, characterized in that, The fixed-fee multi-branch tree, from root to bottom, is structured as Headquarters-Franchisee-Platform-Order Number and Employee Number-Fixed Fee. Headquarters is the root, Franchisee is the second-level child node, Platform is the third-level child node, Order Number and Employee Number are the fourth-level child nodes, and Fixed Fee is the bottom-level child node. Lower-level child nodes are connected to their parent nodes in adjacent upper-level structures via branch structures, establishing close relationships. The entire fixed-fee multi-branch tree structure establishes the overall correspondence between Headquarters, Franchisee, Platform, Fixed Fee, Order Number, and Employee Number. The non-fixed-fee multi-branch tree, from root to bottom, is structured as Headquarters-Algorithm Classification-Franchisee-Platform-Order Information. The entire non-fixed-fee multi-branch tree structure establishes a general correspondence between headquarters, algorithm classification, franchisees, platform, and order information. The fixed-fee and non-fixed-fee multi-branch trees also include: real-time monitoring of abnormal order information, and real-time updating of fixed fees, order numbers, and employee numbers in the fixed-fee multi-branch tree, and real-time updating of order information in the non-fixed-fee multi-branch tree. The method is as follows: if the abnormal order is a refund order, extract the order number from the abnormal order information, and lock the child nodes with the same order number stored in both the fixed-fee and non-fixed-fee multi-branch trees; refund the total order amount in the corresponding non-fixed-fee multi-branch tree to the user based on the order number, and delete the corresponding order record in both the fixed-fee and non-fixed-fee multi-branch trees.

6. The method for sorting and processing catering sales data applicable to multi-platform access according to claim 1, characterized in that, The calculation of the sum of all fixed fees of the bottom-level child nodes of the fixed-fee multi-way tree includes: adding up the fixed fees of all child nodes in the bottom-level child node of the fixed-fee multi-way tree to obtain the sum of fixed fees; the calculation of the sum of all non-fixed fees of the bottom-level child nodes of the non-fixed-fee multi-way tree includes: adding up the non-fixed fees of all child nodes in the bottom-level child node of the non-fixed-fee multi-way tree to obtain the sum of non-fixed fees; the calculation of the sum of the total order amount of the bottom-level child nodes of the non-fixed-fee multi-way tree includes: adding up the total order amount of all child nodes in the bottom-level child node of the non-fixed-fee multi-way tree to obtain the sum of order amounts.

7. The method for clearing and processing catering sales data applicable to multiple platforms as described in claim 1, characterized in that, The real-time verification of whether the sum of fixed fees plus the sum of variable fees equals the total order amount includes: if the sum of fixed fees plus the sum of variable fees does not equal the total order amount, then the fixed fees and variable fees of the same order number on the fixed fee multi-branch tree and the variable fee multi-branch tree are added together, and the sum of fixed fees and variable fees is verified to be equal to the total amount of the corresponding order. If they are not equal, then the original catering sales data is compared, and the fixed fees, variable fees, and total order amount of the corresponding order in the multi-branch tree are modified. The modification method is as follows: first, compare whether the total order amount is the same as the total amount in the original catering sales data. If they are not the same, then modify the total amount and variable fees of the corresponding order information in the variable fee multi-branch tree according to the original catering sales data, and at the same time modify the fixed fees of the corresponding order information in the fixed fee multi-branch tree; if they are the same... Then, compare the fixed fee of the order corresponding to the fixed-fee multi-branch tree with the fixed fee of the original catering sales data. If they are different, 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. Then compare the non-fixed fee of the order corresponding to the non-fixed-fee multi-branch tree with the non-fixed fee of the original catering sales data. Only if they are different, replace the non-fixed fee of the order corresponding to the non-fixed-fee multi-branch tree with 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, modify the non-fixed fee of the corresponding order of the non-fixed-fee multi-branch tree. 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 with the obtained non-fixed fee.

8. The method for sorting and processing catering sales data applicable to multiple platforms as described in claim 1, characterized in that, The calculation of the total fixed amount due to the corresponding employee for the same employee ID using a fixed-fee multi-branch tree includes: extracting all fixed fees from the bottom-level child nodes of the fixed-fee multi-branch tree for the same employee ID, and adding up the extracted fixed fees to obtain the fixed amount due to the corresponding employee; the calculation of the total amount due to the headquarters, franchisees, and platform using the corresponding relationships of nodes at each level of the non-fixed-fee multi-branch tree includes: first, calculating the amount payable to the platform by each child node in the bottom-level structure of the non-fixed-fee multi-branch tree using an algorithm including tiered commission calculation and guaranteed revenue sharing calculation; and then adding up all the amounts due to the same platform to obtain the total amount due to each platform; subsequently, using the non-fixed-fee multi-branch tree... The system establishes a correspondence between franchisees, platforms, and order information. It calculates the total amount owed by all platforms to each franchisee; it also calculates the total non-fixed fees for all orders to each franchisee. The pending difference is obtained by subtracting the total amount owed by all platforms to each franchisee from the total non-fixed fees for all orders to each franchisee. This pending difference is the sum of the management fees owed by the franchisee to the headquarters. Finally, the amount owed by the franchisee is obtained by subtracting the management fees owed to the headquarters from the pending difference. The management fees owed to the headquarters are obtained by multiplying the pending difference by the franchisee's management fees by the management fee sharing ratio. Finally, the management fees owed by all franchisees to the headquarters are added together to obtain the amount owed to the headquarters.