Take-out platform complaint data analysis method and system based on knowledge graph
By constructing a set of causal variables and a causal-enhanced knowledge graph, and parametrically learning a structured causal model, the problem of identifying causal relationships in food delivery platform complaint data was solved. This enabled the root cause mining of complaint events and the quantitative prediction of operational strategies, thereby improving the scientific nature and accuracy of operational decisions.
Patent Information
- Application Number
- CN202511989898.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-05-15
AI Technical Summary
Existing technologies cannot effectively reveal the causal relationships of complaints against food delivery platforms and lack the ability to predict the effects of operational interventions. This leads to operational decisions relying on costly A/B testing or experiential intuition, and lacking scientific quantitative simulation methods.
We construct a set of causal variables, mine the causal direction between variables through causal discovery algorithms, build a causal enhanced knowledge graph, parametrically learn a structured causal model, use DO calculus to quantify the causal effect of intervention variables on outcome variables, and conduct counterfactual analysis to achieve root cause mining and decision simulation of complaint data.
By penetrating the surface correlations of data, we can reveal the deep causal links of complaint incidents, achieve more accurate root cause analysis and quantitative prediction of operational strategies, and provide scientific decision support.
Smart Images

Figure CN122045274A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of big data processing and causal inference analysis technology, and in particular to a method and system for analyzing complaint data from a food delivery platform based on knowledge graphs. Background Technology
[0002] With the booming development of the digital economy, service-oriented internet companies, represented by online food delivery platforms, have accumulated massive amounts of multimodal business data. To extract commercial value from this data, related data analysis technologies have undergone rapid evolution. In the initial stage, the technology mainly focused on using Natural Language Processing (NLP) to parse unstructured text generated by users (such as complaints and reviews), transforming the raw text into structured information through methods such as Named Entity Recognition (NER), Relation Extraction (RE), and Sentiment Analysis (SA). Building on this, Knowledge Graph (KG) technology was introduced to construct a large-scale semantic network. This network uses entities (such as users, merchants, delivery riders, and dishes) as nodes and the complex relationships between them as edges, effectively organizing and managing the massive amounts of heterogeneous information within the platform. This knowledge graph-based representation method enables platforms to perform complex semantic queries, intelligent recommendations, and user profile construction, greatly improving the depth and breadth of data utilization. In addition, some scholars have proposed applying machine learning algorithms, such as association rule mining, on top of knowledge graphs to discover potential patterns in the data. For example, they have proposed identifying the frequent co-occurrence relationship between "severe weather" and "delivery delay complaints," which can provide certain data insights for operations.
[0003] However, despite the significant achievements of the aforementioned technologies in data structuring and pattern discovery, the existing technological system essentially remains at the level of "correlation" analysis, revealing statistical regularities of variables "occurring together," but unable to identify their inherent "causal" relationships. Taking the strong correlation between "severe weather" and "time-out complaints" as an example, existing technologies cannot answer a series of causal questions crucial for refined operations: To what extent is this correlation directly "caused" by the weather, and to what extent is it the result of indirect effects from other confounding factors, such as a surge in regional order density, a sharp decrease in available capacity, or exacerbated traffic congestion? More importantly, the existing analytical framework lacks the ability to predict the effects of "intervention." It cannot make counterfactual inferences, that is, it cannot quantify answers to questions such as, "If the platform had issued a specific amount of subsidy to riders in that area at that time, would this time-out complaint still have occurred?" or "To what extent would switching the dispatch algorithm from model A to model B reduce the overall time-out rate?" Therefore, the platform's operational decisions still largely rely on costly, time-consuming, and potentially risky online A / B testing, or on managers' experience and intuition, lacking a scientific method to accurately, quantitatively, and cost-effectively simulate the effects of strategies before implementation. This lack of ability to move from "discovering correlations" to "confirming causality" and then to "simulating intervention" represents a significant technological gap that food delivery platforms and many data-driven companies face when moving towards higher-level intelligent decision-making. Summary of the Invention
[0004] The purpose of this section is to outline some aspects of embodiments of the present invention and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents; however, such simplifications or omissions should not be construed as limiting the scope of the invention.
[0005] In view of the aforementioned existing problems, this invention is proposed. Therefore, this invention provides a knowledge graph-based method for analyzing complaint data from food delivery platforms to address the problems mentioned in the background section.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a method for analyzing complaint data from food delivery platforms based on knowledge graphs, including: Construct a set of causal variables that includes outcome variables, intervention variables, and confounding variables; Based on the set of causal variables, a causal discovery algorithm is used to mine the causal directions between variables and construct a causal enhanced knowledge graph. Based on the structure of the aforementioned causal augmented knowledge graph, a structured causal model is learned parametrically; Using the structured causal model, the causal effect of the intervention variable on the outcome variable is quantified through do calculus, and counterfactual analysis is performed to achieve root cause mining and decision simulation of complaint data.
[0007] As a preferred embodiment of the knowledge graph-based food delivery platform complaint data analysis method of the present invention, the step of constructing a causal variable set includes: aggregating order complaint data, platform operation data, entity profile data and external environment data, and forming a feature wide table by spatiotemporal alignment with order complaint data as the core, and defining the outcome variable, intervention variable and confounding variable from the feature wide table.
[0008] As a preferred embodiment of the knowledge graph-based data analysis method for food delivery platform complaints described in this invention, the step of constructing a causal enhanced knowledge graph includes: using a constraint-based causal structure learning algorithm to mine directional causal relationship hypotheses from the causal variables, and adding the causal relationship hypotheses as causal edges to the knowledge graph.
[0009] As a preferred embodiment of the knowledge graph-based data analysis method for food delivery platform complaints described in this invention, the step of parametric learning of the structured causal model includes: initializing a directed acyclic graph as the structure of the structured causal model based on the causal enhanced knowledge graph; fitting the functional relationship between each variable and its parent node in the directed acyclic graph using a deep neural network; and verifying and correcting the model using D-separation relationships.
[0010] As a preferred embodiment of the knowledge graph-based data analysis method for food delivery platform complaints described in this invention, the method employs the backdoor adjustment formula of the do calculus to perform a weighted summation of all possible values of the mixed factor set that satisfy the backdoor criterion and are identified from the structured causal model, thereby calculating the causal effect.
[0011] As a preferred embodiment of the knowledge graph-based data analysis method for food delivery platform complaints described in this invention, the counterfactual analysis includes three stages: tracing the causes, actions, and predictions of a complaint event. This involves updating the posterior probability of exogenous noise variables, implementing counterfactual interventions, and combining the updated posterior probabilities to make predictions, thereby inferring the potential outcomes under counterfactual interventions.
[0012] Secondly, this invention provides a knowledge graph-based complaint data analysis system for food delivery platforms, comprising: The causal variable set construction module is configured to build a causal variable set that includes outcome variables, intervention variables, and confounding variables; The causal augmented knowledge graph construction module is configured to construct a causal augmented knowledge graph based on the set of causal variables by mining the causal direction between variables through a causal discovery algorithm. The structured causal model parameterization module is configured to parametrically learn a structured causal model based on the structure of the causal augmented knowledge graph. The complaint root cause quantification and counterfactual analysis module is configured to use the structured causal model to quantify the causal effect of the intervention variable on the outcome variable through do calculus, and to perform counterfactual analysis in order to achieve root cause mining and decision simulation of complaint data.
[0013] Thirdly, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement any step of the above-described method.
[0014] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any step of the above-described method.
[0015] Compared with existing technologies, the beneficial effects of the invention are: 1. By introducing a causal inference framework, this invention can penetrate the surface correlation of data and reveal the deep, structured causal links that lead to complaints, thereby achieving more accurate and reliable root cause mining than traditional correlation analysis. 2. At the same time, by utilizing counterfactual analysis capabilities, it is possible to quantify and predict the effects of operational strategies that have not yet occurred, transforming traditional post-event attribution analysis into pre-event decision support, and providing a scientific quantitative basis for business intervention. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 This is a flowchart illustrating the overall process of a knowledge graph-based complaint data analysis method for food delivery platforms, as described in one embodiment of the present invention. Detailed Implementation
[0017] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0018] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0019] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0020] This invention is described in detail with reference to the schematic diagrams. When detailing the embodiments of this invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged, not adhering to the usual scale. Furthermore, the schematic diagrams are merely examples and should not be construed as limiting the scope of protection of this invention. In actual fabrication, the three-dimensional spatial dimensions of length, width, and depth should be included.
[0021] Furthermore, in the description of this invention, it should be noted that the terms "upper," "lower," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are used solely for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. In addition, the terms "first," "second," or "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0022] Unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" in this invention should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; similarly, they can refer to mechanical connections, electrical connections, or direct connections, or indirect connections through an intermediate medium, or internal connections between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0023] Example 1 Reference Figure 1This is the first embodiment of the present invention, which provides a method for analyzing complaint data from a food delivery platform based on a knowledge graph, including: S1. Construct a set of causal variables that includes outcome variables, intervention variables, and confounding variables; Furthermore, order complaint data, platform operation data, entity profile data, and external environment data can be obtained in real time from the food delivery platform's database cluster. It should be noted that before obtaining the database and the data in it, it is necessary to obtain the data through a business cooperation agreement or with the permission of the business, and the data must be obtained without violating the privacy of the customers. Specifically, order complaint data includes order ID, user ID, merchant ID, rider ID, order time, estimated delivery time, actual delivery time, menu details, order amount, complaint text, complaint tags (such as late delivery, food spillage, poor service), and complaint images. Specifically, the platform's operational data includes riders' real-time GPS trajectories, order dispatching algorithms (such as distance priority and route priority), regional delivery capacity allocation, marketing activities (such as red envelopes, discounts, and coupons), and merchant / rider subsidy records. Specifically, the entity profile data includes users' historical consumption habits and complaint frequency; merchants' food preparation efficiency and historical positive review rate; riders' average delivery time and order acceptance preferences, etc. Specifically, external environment data refers to third-party data obtained through API interfaces that corresponds to the time and space range of the order. This includes high-precision weather data (rainfall, wind speed), real-time traffic congestion index, local public events (such as concerts, traffic control), etc. Furthermore, using the order ID as the core primary key, all data streams of order complaint data are aligned in both time and spatial dimensions. For unstructured data (such as complaint text) in the order complaint data, semantic vectors are extracted using a pre-trained language model. For image data in the order complaint data, a convolutional neural network is used for classification, outputting probability vectors. Without considering dimensionality explosion, one-hot encoding is performed on platform operation data (such as marketing activities) and external environment data (such as morning / noon peak time periods). For entity profile data, historical behavioral characteristics of users, merchants, and riders are aggregated (e.g., users' historical complaint count, order frequency in the last 30 days, riders' on-time rate of the last 100 orders, average rating, and merchants' average peak-hour food preparation time). Specifically, by calling existing pre-trained language models (such as BERT), the system automatically identifies the text content mentioned in the complaint text (such as the taste of the dishes, the condition of the packaging, the attitude of the delivery service, the time-out problem, etc.) and judges the corresponding sentiment polarity (positive / negative / neutral) in the text content based on the language model. The output is a semantic vector, where each dimension of the semantic vector represents the sentiment score of each aspect. Specifically, for user-uploaded images of damaged food, an existing convolutional neural network (such as CNN) is called to classify the image, outputting the image category and the corresponding probability vector. Each dimension of the probability vector corresponds to the confidence level of a predefined food damage label (such as food spillage, damaged packaging, or presence of foreign objects). Furthermore, the processed data is used to generate a high-dimensional feature wide table with each order as a unit; Furthermore, the features in the feature wide table are mapped to a set of structured causal variables V={Y, X, Z}; Specifically, Y represents the outcome variable, which is the core target of causal analysis, namely, understanding its occurrence mechanism and ultimately intervening; the outcome variable is set as an outcome variable matrix, and the elements of the outcome variable matrix consist of complaint type (such as food damage complaint, service attitude complaint) and complaint severity level (such as minor overtime, moderate overtime, severe overtime); Specifically, X represents the intervention variable, which is the strategy that can be controlled or changed by the platform. It is divided into strategic intervention and operational intervention. Strategic intervention refers to the order dispatch algorithm deployed by the platform in different regions or time periods or the subsidy program issued to riders under specific conditions (such as rainy days or large orders). Operational intervention refers to whether to send reassuring pushes to users whose orders are about to expire. Specifically, Z represents a confounding variable, that is, a background variable that simultaneously affects X and Y. For example, suppose there is the following causal flow: severe weather → increased order density → platform implements rainy day subsidy strategy (X), severe weather → increased traffic congestion → increased delivery time (Y); then according to this causal flow, severe weather is a confounding variable between subsidy strategy (X) and delivery time (Y). S2. Based on the causal variable set, the causal direction between variables is mined through the causal discovery algorithm to construct a causal enhanced knowledge graph; Furthermore, by utilizing the generated set of causal variables, entities (such as users, merchants, and riders) and events (such as placing orders, dispatching orders, and complaints) are extracted to construct a basic knowledge graph G=(E, R), where E is the set of nodes for entities / events, and R represents the set of edges for factual associations such as "belonging to", "located in", and "responsible for". Furthermore, the constraint-based causal structure learning algorithm mines directional causal relationship hypotheses from causal variables and adds these causal relationship hypotheses as causal edges to the knowledge graph. Specifically, the constraint-based causal structure learning algorithm is based on the causal Markov condition and the loyalty assumption. The core idea of the causal Markov condition is that in a causal directed acyclic graph, any variable, given all its direct causes (i.e., its parent nodes), is conditionally independent of all its non-descendant nodes (i.e., nodes that are not its effects). Assuming the causal graph consists of weather → delivery time → user satisfaction, then according to the causal Markov condition, the direct cause of delivery time is weather. Therefore, knowing the delivery time, the weather (whether it's sunny or rainy) is crucial for prediction. Regarding user satisfaction, no further information is provided because the impact of weather on satisfaction is fully reflected through "delivery time." It's important to note that weather has no parent node, so this condition imposes no constraint on it, while the parent node of user satisfaction is delivery time, and its only non-descendant is weather. Therefore, the causal Markov condition is unidirectional and has limitations. The core idea of the loyalty hypothesis is that the data distribution accurately reflects the underlying causal graph structure. In this causal graph structure, the causal effects between variables will not perfectly cancel each other out due to clever parameter configuration, thus constraining the data at the data level. Creating a false sense of independence; for example, suppose that based on the above causal graph "weather → delivery time → user satisfaction", the platform implements a new operational strategy M: "Assign high-risk orders with negative reviews to the best-performing gold-level riders". Then we need to consider whether this operational strategy M has a causal effect on the final user satisfaction. However, in the real causal world, there may be two parallel causal paths: Path 1 (positive effect): Strategy M → orders delivered by gold-level riders → improved delivery service quality → increased user satisfaction; Path 2 (negative effect): the order is a high-risk order with negative reviews (e.g., containing easily spilled food, extremely long distance, etc. → the order itself is difficult to handle → decreased user satisfaction). Then the increase and decrease in user satisfaction will cancel each other out because the strategies are the same. If we only rely on the causal Markov condition, we cannot make any judgment, and the system will conclude that "strategy M has no causal effect on user satisfaction", thus causing the company to abandon a strategy M that actually has an impact. Therefore, by using the loyalty assumption, we can not only complement the causal Markov condition, but also discover weak independent relationships under any conditions, thereby accurately constructing the structure of the causal reinforcement knowledge graph. Furthermore, an undirected skeleton graph is constructed using the PC algorithm. All variables in the causal variable set V are used as nodes to construct an initial, fully connected undirected graph. In this graph, there is an undirected edge between any two variable nodes, meaning that a direct causal relationship may exist between any two variables. Then, the edges in the undirected graph are systematically pruned. This process iteratively increases the size n of the condition set, starting from n=0. When n=0, for all variable pairs (let's say A and B), an unconditional independence test is performed. The test method is selected based on the variable type; for example, for two continuous variables, the Fisher Z-transform based on the Pearson correlation coefficient is used; for two discrete variables, the chi-square test or G-test is used. If the p-value of the test result is greater than the preset significance level α (e.g., α=0.05), then variables A and B are considered unconditionally independent, and the edge between them is removed from the undirected graph. When n=1, 2, 3..., the size of the condition set is increased through iteration. That is, for each pair of nodes (A, B) that are still connected in the graph, all adjacent nodes of node A (or B) are traversed to construct a condition set S of size n. For each such combination, a conditional independence test is performed to test whether A and B are independent under the condition given S. If the p-value of the test result is greater than α under any condition set S, then A and B are considered independent under that condition, the edge between them is immediately removed from the undirected graph, and the set that separates them is recorded. Furthermore, this iterative process continues until no more edges can be removed from the graph; after the iteration is complete, the resulting undirected graph is the undirected skeleton graph, and the remaining edges in the graph represent strong dependencies that cannot be separated under any conditions. Furthermore, on the obtained undirected skeleton graph, find all unconnected triples with an ABC structure (i.e., no direct edge between A and B). For each unconnected triple, find the separation set of the record. If the node is not in the separation set, then based on the loyalty assumption, the ABC structure is identified as a V-shaped structure, and the direction of the two undirected edges is determined as A → C ← B, because the two independent causes (A and B) become related after being given their common effect (C). Furthermore, after identifying all V-structures, to avoid generating new V-structures or loops in the undirected skeleton graph, deterministic logic rules are used to assign directions to the remaining undirected edges. These deterministic logic rules are as follows: Rule 1: If there is a structure A→BC in an undirected skeleton graph and there is no edge between A and C, then BC must be directed to B→C. This is to avoid creating a V-shaped structure of A→B←C. Rule 2: If there is a directed path A→B→C in an undirected skeleton graph and there is also an undirected edge AC, then AC must be directed to A→C to avoid forming a cycle such as A→B→C→A. Furthermore, these rules are applied repeatedly until no more edges can be oriented. Specifically, by adding each directed edge A→B in the undirected skeleton graph as a special edge type to the pre-built basic knowledge graph G, the basic knowledge graph can be upgraded into a causal enhanced knowledge graph. S3. Based on the structure of the causal reinforcement knowledge graph, parameterize and learn a structured causal model; It should be explained that, since the causal reinforcement knowledge graph only provides qualitative causal structure information, i.e. "who is the cause and who is the effect", it is necessary to parametrically learn a structured causal model to test the causal relationship. Furthermore, the causal directed acyclic graph structure in the obtained causal enhanced knowledge graph is directly used as the graph structure of the structured causal model. Each node in the graph structure corresponds to a variable in the causal variable set V, and each directed edge n1→n2 in the graph structure represents that the directed edge n1 is a direct cause (parent node) of n2. Furthermore, in order to capture randomness or unmodeled factors not determined by parent nodes, a corresponding, mutually independent exogenous noise variable is introduced for each endogenous variable (i.e., a variable with parent nodes) in the graph structure. These exogenous variables represent the random fluctuations inherent in each variable that cannot be fully explained by its parent nodes in the graph. Therefore, the value of an endogenous variable is modeled as a function of its set of parent nodes and its corresponding exogenous noise. Furthermore, a generation mechanism is defined for each variable in the graph structure, namely a function F such that K = F(Pa(K), U), where K represents the i-th variable, which can be an outcome variable, an intervention variable, or a confounding variable; Pa(K) represents all nodes that directly point to K; and U represents all factors that affect K but are not included in their parent node Pa(K). Since the relationships between variables in the food delivery platform system are highly complex and nonlinear, this invention preferably uses a deep neural network to fit these functional relationships to enhance the expressive power of the model. Specifically, for each endogenous variable in the graph structure, an independent feedforward neural network is constructed. The input of this network is the values of all parent nodes of the endogenous variable, and the output is the predicted value of the endogenous variable. In this framework, exogenous noise can be understood as the prediction error or residual of the neural network during the training process, and it is assumed that it follows a specific probability distribution (e.g., Gaussian distribution). For example, for the outcome variable Y (probability of complaint occurrence), if its parent nodes are Pa(Y) = {subsidy, weather, transportation capacity}, an independent feedforward neural network is constructed. Its input layer receives the values of these three parent node variables. After nonlinear transformation through several hidden layers, the output layer outputs a value between 0 and 1 through the Sigmoid activation function, representing the probability of Y occurring given the parent nodes. Furthermore, the generated feature wide table can be used as training data to jointly or independently train all neural networks in the graph structure. The training objective is to minimize the difference between the model's predicted values and the actual observed values. For continuous variables, mean squared error (MSE) can be used as the loss function; for discrete or binary variables (such as whether there is a complaint), cross-entropy loss can be used. The weights and biases of each neural network are adjusted through backpropagation algorithm and gradient descent optimizer (such as Adam) so that the entire graph structure can best reproduce the joint distribution of the observed data. Specifically, using the D-separation criterion, where D-separation is the equivalent expression of causal Markov conditions in graph theory, all theoretically valid conditional independence relations can be listed based on the graph structure. For example, if A and B in the graph are separated by C using D, then at the data level, A⊥B|C. Then, these conditional independence relations derived from the graph structure are statistically tested on the test dataset. If a theoretically valid independence relation is found to be invalid in the data (i.e., the p-value of the test is very small), this indicates that there may be an error in the model structure. At this point, the graph structure can be corrected based on the test results. For example, if A and B are still significantly correlated given C, it means that there is an undiscovered direct causal path between A and B, requiring the addition of an edge to the graph and reparameterization learning. Through the iterative process of verification and correction, it is ensured that the final structured causal model is highly consistent with the data in both structure and parameters. S4. Using a structured causal model, the causal effect of intervention variables on outcome variables is quantified through do-calculus, and counterfactual analysis is conducted to achieve root cause mining and decision simulation of complaint data. Furthermore, the causal effect to be calculated is defined as P(Y|do(X=x)) which represents the probability distribution of the outcome variable Y when a specific value x is forced onto the intervention variable X (e.g., X subsidy = 1, i.e. universal subsidy). Furthermore, in order to calculate P(Y|do(X=x)) from the observation data, it is necessary to use the rules of do calculus. This invention preferably applies the most commonly used and intuitive backdoor adjustment formula in do calculus. Its application premise is that there exists a set of confounding variables Z1 in the causal graph, which satisfies the following backdoor criterion: Rule 1: No node in Z1 is a descendant of X; Rule 2, Z1 can block (D separate) all "backdoor paths" from X to Y that start with an arrow pointing to X, and these backdoor paths are the source of spurious associations between X and Y; For example, in the scenario of "weather → subsidy (X); weather → congestion → timeout (Y)", Z={weather} satisfies the backdoor criterion because it blocks the backdoor path of subsidy ← weather → congestion → timeout; Furthermore, once a set of promiscuous variables Z1 satisfying the backdoor criterion is found, the backdoor adjustment formula can be applied: in, This represents the probability that, under mandatory intervention (do), the value of X is set to x, the value of the outcome variable Y is y. This indicates the probability that Y is y given that X is x and Z is z. This represents the probability that the variable Z takes the value z across all data points. It should be noted that, to avoid abstract conceptual descriptions, this formula is explained intuitively as follows: To simulate an ideal randomized controlled experiment, within each slice of the confounding variable Z (e.g., "sunny day", "rainy day", etc.), the conditional probability of Y when X=x is calculated separately. And according to the natural distribution of Z in the population. By taking a weighted average of the results within these slices, the combined effect of Z on X and Y is eliminated, resulting in a purely causal effect. It should be noted that, and The probability values can be directly calculated from the structured causal model. This can be obtained by iterating through and summing all possible values z of Z. Numerical solution; Furthermore, through comparison and Thus, food delivery platforms can accurately quantify the average causal effect of a certain intervention measure X, thereby providing a solid data basis for the formulation of macro strategies; Furthermore, the three-stage execution process based on counterfactual analysis is as follows: For the abductive phase, for a specific event that has already occurred (such as an order instance, denoted as e), the values of all its observed variables are known. Since K = F(Pa(K), U), and K, Pa(K), and F are all known, the exogenous noise vector specific to the event e can be solved in reverse. This exogenous noise vector can be understood as the "fate" of the order, which represents all the specific random factors that are not captured by the model and lead to the final result of the order. For the action phase, a counterfactual intervention is performed in the model by modifying one or more functions in the graph structure; that is, converting the function expression in assignment form into a constant value expression form, such as converting subsidy = F(subsidy) into subsidy = constant value; For the prediction phase, in the modified graph structure, the exact same exogenous noise vector calculated in the abductive phase is used to perform a forward calculation again, that is, to substitute the exogenous noise vector and the new intervention value into the model, calculate the new values of all variables in the counterfactual world one by one, and obtain the counterfactual predicted value of the outcome variable Y. This predicted value represents the most likely outcome of the order under counterfactual intervention. Furthermore, one or more alternative operational strategies (e.g., "automatically issue a 3 yuan reassurance bonus to all orders expected to be delayed by more than 5 minutes" or "switch the order dispatch algorithm from model A to model B") can be formalized into different counterfactual interventions. Then, for a batch of representative historical order samples (especially those orders that have had negative results), the above counterfactual analysis process is executed in batches to calculate the expected change in the complaint rate of these orders under each strategy. Combined with the cost of each strategy (e.g., total bonus amount, algorithm development cost), its return on investment is calculated, and a ranked list containing the expected effects, costs, and ROI of each strategy is output, providing the operations team with optimal, quantitative decision-making recommendations.
[0024] Furthermore, this embodiment also provides a knowledge graph-based complaint data analysis system for food delivery platforms, including: This embodiment also provides a computer device applicable to the analysis of complaint data from a knowledge graph-based food delivery platform, including: The system includes a memory and a processor. The memory stores computer-executable instructions, and the processor executes these instructions to implement the knowledge graph-based complaint data analysis method for food delivery platforms as proposed in the above embodiments.
[0025] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0026] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, it implements the knowledge graph-based complaint data analysis method for food delivery platforms as proposed in the above embodiments.
[0027] The storage medium proposed in this embodiment and the data storage method proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0028] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of this application can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0029] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0030] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0031] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0032] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0033] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for analyzing complaint data from food delivery platforms based on knowledge graphs, characterized in that, include: Construct a set of causal variables that includes outcome variables, intervention variables, and confounding variables; Based on the set of causal variables, a causal discovery algorithm is used to mine the causal directions between variables and construct a causal enhanced knowledge graph. Based on the structure of the aforementioned causal augmented knowledge graph, a structured causal model is learned parametrically; Using the structured causal model, the causal effect of the intervention variable on the outcome variable is quantified through do calculus, and counterfactual analysis is performed to achieve root cause mining and decision simulation of complaint data.
2. The method for analyzing complaint data from food delivery platforms based on knowledge graphs as described in claim 1, characterized in that, The steps for constructing the causal variable set include: aggregating order complaint data, platform operation data, entity profile data, and external environment data, and using order complaint data as the core to perform spatiotemporal alignment to form a feature wide table, and defining the outcome variable, intervention variable, and confounding variable from the feature wide table.
3. The method for analyzing complaint data from food delivery platforms based on knowledge graphs as described in claim 1, characterized in that, The steps for constructing a causal augmented knowledge graph include: using a constraint-based causal structure learning algorithm to mine directional causal relationship hypotheses from the causal variables, and adding these causal relationship hypotheses as causal edges to the knowledge graph.
4. The method for analyzing complaint data from food delivery platforms based on knowledge graphs as described in claim 1, characterized in that, The steps of the parameterized learning structured causal model include: initializing a directed acyclic graph based on the causal enhanced knowledge graph as the structure of the structured causal model; using a deep neural network to fit the functional relationship between each variable and its parent node in the directed acyclic graph; and using the D-separation relationship to test and correct the model.
5. The method for analyzing complaint data from food delivery platforms based on knowledge graphs as described in claim 1, characterized in that, The causal effect is calculated by weighting and summing all possible values of the confounding factor set that satisfy the backdoor criterion and are identified from the structured causal model using the backdoor adjustment formula of the do calculus.
6. The method for analyzing complaint data from food delivery platforms based on knowledge graphs as described in claim 1, characterized in that, The counterfactual analysis includes three stages: tracing the causes, taking action, and predicting for a complaint that has already occurred. It involves updating the posterior probability of exogenous noise variables, implementing counterfactual intervention, and combining the updated posterior probability to make predictions in order to infer the potential outcomes under counterfactual intervention.
7. A knowledge graph-based complaint data analysis system for food delivery platforms, based on the knowledge graph-based complaint data analysis method for food delivery platforms as described in any one of claims 1 to 6, characterized in that, include: The causal variable set construction module is configured to build a causal variable set that includes outcome variables, intervention variables, and confounding variables; The causal augmented knowledge graph construction module is configured to construct a causal augmented knowledge graph based on the set of causal variables by mining the causal direction between variables through a causal discovery algorithm. The structured causal model parameterization module is configured to parametrically learn a structured causal model based on the structure of the causal augmented knowledge graph. The complaint root cause quantification and counterfactual analysis module is configured to use the structured causal model to quantify the causal effect of the intervention variable on the outcome variable through do calculus, and to perform counterfactual analysis in order to achieve root cause mining and decision simulation of complaint data.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.