A gas stove operation chain risk prediction method and system based on causal inference

By constructing a time-series causal model of gas stoves using a causal inference-based approach, key risk factors are identified and intervention measures are simulated. This solves the problems of false alarms and missed alarms and lack of personalized suggestions in existing gas stove safety early warning technologies, and achieves high-precision risk prediction and personalized safety recommendations.

CN122155015APending Publication Date: 2026-06-05SHANGHAI HONGGE KITCHEN WARE ELECTRIC APPLIANCES CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI HONGGE KITCHEN WARE ELECTRIC APPLIANCES CO LTD
Filing Date
2026-03-04
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing gas stove safety warning technologies cannot effectively identify the causal relationship between risk factors and results, have high false alarm and false alarm rates, lack personalized safety recommendations, and cannot cope with different users and environmental conditions.

Method used

Using a causal inference-based approach, we collect gas stove usage data to form a multivariate time series, learn the temporal causal structure, construct a temporal causal directed acyclic graph, quantify causal effects, perform counterfactual path deduction, predict cascading risks, and provide early warning information.

Benefits of technology

It improved the accuracy of risk prediction, reduced false alarms and false negatives, provided scientific intervention suggestions, and enabled personalized safety early warnings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122155015A_ABST
    Figure CN122155015A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of gas stove operation chain risk prediction method and system based on causal inference, belong to gas risk prediction field.Therein, the method includes collecting original data and forming multivariate time series;Time series causal structure learning is carried out based on multivariate time series, and time-delayed time series causal directed acyclic graph is output;Causal effect quantification is carried out based on multivariate time series and time series causal directed acyclic graph, and the causal effect function of each edge is obtained, and structural causal model is output;Counterfactual path deduction is carried out based on multivariate time series, time series causal directed acyclic graph and structural causal model, and a group of possible future causal paths are obtained, and each path corresponds a probability value;Chain risk prediction is carried out based on future causal path and its probability value, and early warning information is obtained.The present application provides a kind of gas stove safety warning method capable of understanding risk transmission mechanism, identifying key causal path, providing interpretable early warning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of gas risk prediction technology, specifically relating to a method and system for predicting gas stove operation chain risks based on causal inference. Background Technology

[0002] With rapid urbanization and improved living standards, gas stoves have become essential kitchen appliances. However, gas safety accidents are frequent, especially chain-reaction risks such as dry burning and fires. Existing gas stove safety warning technologies mainly rely on threshold-triggered alarm systems (e.g., alarms when the pot temperature exceeds 300℃) and simple machine learning classification models. While these technologies have reduced the accident rate to some extent, they have significant drawbacks: First, threshold alarm systems lack an understanding of risk propagation mechanisms and cannot distinguish the causal relationship between risk factors and outcomes, leading to high false alarm and false negative rates. Second, traditional machine learning models (e.g., random forests, neural networks), although capable of processing large amounts of data, are essentially black-box models, unable to explain how risks develop from an initial state to an accident state, and unable to provide targeted intervention suggestions. More seriously, existing technologies generally ignore the time delay effect and confounding factors in the risk propagation process. For example, user operating habits (e.g., continuous low-heat heating) and environmental factors (e.g., kitchen ventilation conditions) may jointly affect the pot temperature, but these confounding factors are often ignored in existing models, leading to a mismatch between risk predictions and actual risks. In addition, existing technologies mostly adopt a "one-size-fits-all" intervention strategy, which cannot provide personalized safety advice for different users and different environmental conditions, thus reducing the practical value of the early warning system. Summary of the Invention

[0003] To address the aforementioned problems in the existing technology, this invention provides a method and system for predicting the interlocking risks of gas stove operation based on causal inference.

[0004] The objective of this invention can be achieved through the following technical solutions: A method for predicting the operational chain risk of a gas stove based on causal inference, the implementation of which includes the following steps: Step S1: Collect raw data during the use of the gas stove and generate a multivariate time series. The raw data includes operational variables, environmental variables, state variables, and result variables; Step S2: Based on the multivariate time series Perform temporal causal structure learning and output a temporal causal directed acyclic graph with time delay; Step S3: Based on the multivariate time series The causal effect is quantified by performing causal effect quantification on the temporal causal directed acyclic graph to obtain the causal effect function of each edge, and the structural causal model is output. Step S4: Based on the multivariate time series The temporal causal directed acyclic graph and the structural causal model are used to perform counterfactual path deduction to obtain a set of possible future causal paths, and each path corresponds to a probability value; Step S5: Based on the future causal path and its probability value, perform chain risk prediction to obtain early warning information.

[0005] Preferably, the temporal causal structure learning in step S2 specifically includes: A maximum possible delay time is preset based on the physical characteristics of the gas stove to define the search space; A temporal variant of the Peter-Clark algorithm was used for causal discovery, resulting in several candidate causal edges; Scan different delay times Calculate the correlation metric and take the value corresponding to the maximum value. As the time delay, a set of causal edges with the time delay is obtained, and multiple candidate graphs are formed; The acyclic constraint ensures that the entire graph is a directed acyclic graph. Specifically, the acyclic constraint is as follows: the candidate graph is represented as a weighted adjacency matrix W, where W(i,j) represents the causal strength from variable i to variable j; a function h(W) is defined such that h(W) = 0 if and only if the graph is acyclic, and h(W) > 0 if the graph is cyclic; this constraint is added to the subsequent scoring function. The graph with the highest score among all candidate graphs is selected as the temporal causal directed acyclic graph based on a scoring function, the mathematical description of which is... ,in, Let L be the score of the candidate graph G, L be the order of the maximum time delay, N be the total number of time points, and n be the total number of variables. Let be the value of the j-th variable at time t. For conditional probability density, In candidate graph G, all pointing to The set of parent nodes, Let G be the total number of edges in the candidate graph G. This is the penalty coefficient.

[0006] Preferably, the causal effect quantification in step S3 specifically includes: For the edges in the aforementioned temporal causal directed acyclic graph Fitting conditional expectations using machine learning models, with confounding variables Predicted outcome variables ,get Simultaneously using confounding variables Predicting causal variables ,get ; Obtain the residual after removing confounding effects. and cause residual Mathematically described , ; For the residuals of the aforementioned reasons and the residual of the result Assuming ,in, This is a causal effect function. The noise term is used; solving the minimization problem yields the optimal causal effect function. Mathematically described ,in, Let T be the function space and T be the number of valid samples; The structural causal model is obtained by combining the causal effect functions of all edges.

[0007] Preferably, the counterfactual path deduction in step S4 specifically includes: Based on the aforementioned structural causal model and combined with the current observations, the noise term is derived by inverse calculation. Define intervention operations That is, delete all edges pointing to variable A and fix the value of variable A to a, so that it is no longer affected by its parent node and noise; Starting from the current moment, given the aforementioned intervention operation The simulation is carried out step by step, calculating the values ​​of all variables at each future moment. The simulation time step must be consistent with the data acquisition frequency until the maximum prediction time window is reached. Multiple possible future trajectories are generated through multiple sampling. Based on the future trajectory extracted event e and the future causal path C, the event is defined as follows: for continuous variables, a threshold is defined; when a variable exceeds the threshold range, an event is considered to have occurred; the future causal path... It is an ordered sequence of events containing m events, indicating that these events occur sequentially in chronological order; The probability value for each of the stated future causal paths is mathematically described as follows: ,in, In order to give the current observation and intervention operations Under the given conditions, the probability of future causal path C occurring. Given that all previous events have occurred, the intervention has been carried out, and the current observations are current, the event... The probability of occurrence; Repeat the above steps for multiple pre-selected interventions to obtain the path probability distribution under each intervention.

[0008] Preferably, the chain risk prediction in step S5 specifically includes: The uncertainty of a future causal path is measured by causal risk entropy, which is mathematically described as follows: ,in, Let K be the causal risk entropy, and K be the total number of mutually exclusive causal paths. Let be the probability of the k-th path under natural evolution; The contribution of each currently observed variable to the final high-risk path probability is quantified using the Shapley causal contribution value, mathematically described as follows: ,in, For the currently observed variable The Shapley causal contribution value, where q is the number of currently observed variables. A subset of variables excluding i. Let S be the number of variables in the subset S. To predict the risk probability by additionally setting i as the current observed variable in addition to S, and taking the baseline values ​​for the other variables, This is the predicted risk probability when the variables in S take the current observed values, while the other variables take the baseline values. It is a factorial; The early warning information is generated, including a current observation summary, a natural evolution path prediction, the causal risk entropy, the attribution of major risk factors, and the counterfactual intervention effect.

[0009] A gas stove operation chain risk prediction system based on causal inference is used to execute the gas stove operation chain risk prediction method based on causal inference described above, including a preprocessing module, a causal learning module, an effect quantification module, a counterfactual inference module, and a risk prediction module. The preprocessing module is used to collect raw data during the use of the gas stove and form a multivariate time series. The raw data includes operational variables, environmental variables, state variables, and result variables; The causal learning module is used to learn based on the multivariate time series. Perform temporal causal structure learning and output a temporal causal directed acyclic graph with time delay; The effect quantification module is used to quantify the multivariate time series. The causal effect is quantified by performing causal effect quantification on the temporal causal directed acyclic graph to obtain the causal effect function of each edge, and the structural causal model is output. The counterfactual deduction module is used to perform counterfactual deduction based on the multivariate time series. The temporal causal directed acyclic graph and the structural causal model are used to perform counterfactual path deduction to obtain a set of possible future causal paths, and each path corresponds to a probability value; The risk prediction module is used to predict chain risks based on the future causal path and its probability value, and obtain early warning information.

[0010] The beneficial effects of this invention are as follows: (1) Automatically learns the causal relationship between variables and identifies the key factors that truly affect risk, rather than simply relying on correlation, which significantly improves the accuracy of risk prediction and effectively reduces false alarms and false negatives.

[0011] (2) By quantifying causal effects, the degree of influence of risk factors on the results can be accurately described, providing users with a clear basis for risk assessment.

[0012] (3) Through counterfactual path deduction, it is possible to simulate the impact of different intervention measures (such as adjusting ventilation and changing operation methods) on risks, provide users with scientific intervention suggestions, and realize the transformation from "passive alarm" to "active prevention".

[0013] (4) By calculating the causal risk entropy and Shapley causal contribution value, the uncertainty of risk can be dynamically assessed, high-risk thresholds can be identified in a timely manner, and users can take preventive measures before the risk occurs. Attached Figure Description

[0014] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings.

[0015] Figure 1 This is a flowchart of a gas stove operation chain risk prediction method based on causal inference according to the present invention. Detailed Implementation

[0016] To better understand the invention, various aspects of the invention will be described in more detail with reference to the accompanying drawings. It should be understood that these detailed descriptions are merely illustrative of exemplary embodiments of the invention and are not intended to limit the scope of the invention in any way. Throughout the specification, the expression "and / or" includes any and all combinations of one or more of the associated listed items. As used herein, the terms "approximately," "about," and similar terms are used as expressions of approximation, not as expressions of degree, and are intended to describe inherent deviations in measured or calculated values ​​that will be recognized by those skilled in the art. Furthermore, the order in which the steps are described in this invention does not necessarily indicate the order in which these steps occur in actual operation, unless otherwise expressly defined or deduced from the context.

[0017] It should also be understood that expressions such as "comprising," "including," "having," "containing," and / or "comprising" are open-ended rather than closed-ended expressions in this specification, indicating the presence of the stated features, elements, and / or components, but not excluding the presence of one or more other features, elements, components, and / or combinations thereof. Furthermore, when expressions such as "at least one of..." appear after a list of listed features, they modify the entire list of features, not just individual elements in the list. Additionally, when describing embodiments of the invention, the word "may" is used to mean "one or more embodiments of the invention." And the term "exemplary" is intended to refer to examples or illustrations.

[0018] Unless otherwise specified, all terms used herein (including engineering and technical terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that, unless expressly stated herein, terms defined in common dictionaries shall be interpreted as having the meaning consistent with their meaning in the context of the relevant art, and not in an idealized or overly formalized sense.

[0019] It should be noted that, unless otherwise specified, the embodiments and features described in this invention can be combined with each other. The invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0020] Example 1: Please see Figure 1 A method for predicting the operational chain risk of gas stoves based on causal inference, comprising: Step S1: Collect raw data during the use of the gas stove and generate a multivariate time series. The raw data includes operational variables (knob angle, flame intensity, continuous use time, etc.), environmental variables (kitchen temperature, kitchen humidity, ventilation index, etc.), state variables (estimated cookware temperature, carbon monoxide concentration, smoke concentration, etc.), and outcome variables (dry burning incidents, fire incidents, etc., provided by post-incident labels, such as alarm records or accident reports). Step S2: Traditional methods often presuppose causal relationships (e.g., "prolonged heating inevitably leads to dry burning"), but in reality, causal relationships can be very complex: the influence of one factor on another may be delayed (e.g., residual heat will still cause the pot temperature to rise after the heat is turned off), and there may also be unknown confounding factors (e.g., user intent simultaneously affects the operating method and whether the window is opened). In order to accurately reconstruct the risk propagation path, it is necessary to automatically learn a causal graph with time delays from the data. Therefore, based on the aforementioned multivariate time series... Perform temporal causal structure learning and output a temporal causal directed acyclic graph with time delay; Step S3: Based on the aforementioned time-series causal directed acyclic graph, we can identify which variables have causal relationships, but we cannot obtain the specific functional form. For example, "flame intensity" affects "cookware temperature," but this effect is non-linear: low heat heats up slowly, high heat heats up quickly, and there may be a threshold effect. Simultaneously, we need to eliminate the interference of confounding factors (such as user intent simultaneously affecting flame intensity and whether a window is open). Therefore, based on the aforementioned multivariate time series... The causal effect is quantified by performing causal effect quantification on the temporal causal directed acyclic graph to obtain the causal effect function of each edge, and the structural causal model is output. Step S4: Based on the multivariate time series The temporal causal directed acyclic graph and the structural causal model are used to perform counterfactual path deduction to obtain a set of possible future causal paths, and each path corresponds to a probability value; Step S5: Based on the future causal path and its probability value, perform chain risk prediction to obtain early warning information.

[0021] In this embodiment, the temporal causal structure learning specifically refers to: S201: Based on the physical characteristics of the gas stove, a maximum possible delay time is preset to define the search space, such as 30 minutes. That is, only variables within the past 30 minutes are considered to have an impact on the present. Impacts beyond 30 minutes are considered physically impossible or negligible. S202: The basic idea of ​​causal inference is that if variable X is the cause of variable Y, then the change in variable X should occur before variable Y, and after controlling for other related variables, variables X and Y are still related. Conversely, if the correlation between variables X and Y is caused by a third variable Z (e.g., opening a window simultaneously causes an increase in the ventilation index and a decrease in the pot temperature), then after controlling for variable Z, variables X and Y should become independent. Based on this, a time-series variant of the Peter-Clark algorithm is used for causal discovery, and several candidate causal edges are obtained: (1) Assuming that all variables may have a causal relationship under all possible delays, an initial fully connected graph is constructed; (2) For each pair of variables, such as flame intensity F and pot temperature P, all possible delays are considered. (1 to L), check whether the following condition holds: Does there exist a condition set S (composed of the values ​​of other variables at different times) such that, given S, Independent of P(t), if it exists, then it means If the correlation between P(t) and P(t) is spurious, the edge can be deleted; otherwise, the edge is retained as a candidate causal edge. (3) The test starts from the empty condition set (i.e., direct test). The correlation with P(t) is assessed, and then the size of the condition set is gradually increased. For example, first test a single variable as a condition, then test combinations of two variables, until the condition set size reaches a preset upper limit (e.g., 4 variables). For continuous variables, a partial correlation coefficient test is used to calculate... The partial correlation coefficient of P(t) under a given condition set S is calculated, and then transformed into a statistic under a standard normal distribution through Fisher's Z-transform. The p-value is calculated, and if the p-value is greater than the significance level (e.g., 0.05), the independence hypothesis is accepted and the edge is deleted. S203: For a pair of variables X and Y with a causal relationship, the true time delay should make and The correlation was strongest, therefore, by scanning different delays... Calculate the correlation metric and take the value corresponding to the maximum value. As the time delay, a set of causal edges with the time delay is obtained, forming multiple candidate graphs: for each pair of candidate causal variables (such as F and P), different delays are calculated. The cross-correlation function is shown below; plot the cross-correlation value as a function of... Theoretically, the peak position of the curve corresponds to the true causal delay. For example, if the peak appears... =5 seconds, indicating that the pot temperature begins to respond 5 seconds after the flame intensity changes; the time series is divided into multiple overlapping windows (e.g., each window is 1 hour long and the sliding step is 10 minutes), the cross-correlation value is calculated and the peak value is found in each window, and then the median or mode of the peak delay of all windows is taken as the final estimated time delay. S204: The candidate graph obtained in the previous step may contain loops, for example, there may be "flame intensity". "pot temperature" and "pot temperature" The two edges labeled "Flame Intensity" are physically unreasonable (pot temperature does not cause changes in flame intensity). Therefore, an acyclic constraint is used to ensure that the entire graph is a directed acyclic graph. Specifically, the acyclic constraint is as follows: the candidate graph is represented as a weighted adjacency matrix W, where W(i,j) represents the causal strength from variable i to variable j; a function h(W) is defined such that h(W) = 0 if and only if the graph is acyclic, and h(W) > 0 if the graph has cycles; this constraint is added to the subsequent scoring function (as a penalty term in actual optimization). S205: Select the graph with the highest score among all candidate graphs as the temporal causal directed acyclic graph based on the scoring function, wherein the mathematical description of the scoring function is... ,in, Let G be the score of the candidate graph, L be the maximum time delay order (number of time points; for example, if data is collected once per second, then L=1800 corresponds to 30 minutes), N be the total number of time points, and n be the total number of variables. Let be the value of the j-th variable at time t. For conditional probability density, In candidate graph G, all pointing to The set of parent nodes, Let G be the total number of edges in the candidate graph G. The penalty coefficient is used. Due to the huge search space, a greedy strategy is usually adopted in practice: start from an empty graph, add the edge that maximizes the score improvement each time, until no improvement is possible, and use the acyclic constraint in step 4 to ensure that the graph is always acyclic.

[0022] In this embodiment, the quantification of causal effect specifically refers to: S301: For the edges in the aforementioned temporal causal directed acyclic graph (Variable X is the direct cause of variable Y; the value of Y at time t is influenced by the value of X at time t.) (the influence of the value at time), fitting the conditional expectation through a machine learning model, using confounding variables. Predicted outcome variables ,get That is, to capture the effect of confounding factor W on Y alone, while excluding the effect of X; and at the same time use confounding variables Predicting causal variables ,get That is, to capture the effect of confounding factor W on X individually; confounding variables are those that affect X individually. It also affects The variables include all variables pointing to X (i.e., the parent node of X), all variables pointing to Y (i.e., the parent node of Y, except for X itself), and possible common causes (such as environment variables). S302: Obtain the residual result after removing confounding effects. and cause residual Mathematically described , ; S303: For the residuals of the aforementioned reasons and the residual of the result Assuming ,in, This is a causal effect function. This is the noise term; if at this time... If it is a constant, it degenerates into a linear model; if If it is a function of X, it can capture nonlinearity (e.g., when X is small, the effect is small; when X exceeds a threshold, the effect increases sharply); solving the minimization problem yields the optimal causal effect function. Mathematically described ,in, Let T be the function space, such as linear functions, polynomial functions, etc., and let T be the number of valid samples, that is, the number of t that satisfy the time index requirement. S304: The causal effect function of all edges is used to obtain the structural causal model.

[0023] In this embodiment, the counterfactual path deduction specifically refers to: S401: Based on the aforementioned structural causal model and combined with the current observations, the noise term is derived by inverse calculation, representing the specific value of unobserved factors (such as cookware material, user habits, and minor environmental fluctuations) at the current moment. S402: Define the intervention procedure This means deleting all edges pointing to variable A and fixing the value of variable A to 'a', so that it is no longer affected by its parent node and noise. For example... This indicates that the window must be opened. S403: Starting from the current moment, given the aforementioned intervention operation The simulation is performed step by step forward, calculating the values ​​of all variables at each future time. The simulation time step must be consistent with the data acquisition frequency until the maximum prediction time window is reached. Since the noise term is deterministic, the entire future trajectory is uniquely determined under a given intervention operation. However, in reality, there may be uncertainty in the inference of noise. Therefore, it is necessary to consider the probability distribution of noise and generate multiple possible future trajectories through multiple sampling. S404: Based on the future trajectory, extract event e and the future causal path C. The event is defined as follows: for continuous variables, define a threshold; when a variable exceeds the threshold range, an event is considered to have occurred, for example, a dry-burning event is a pot temperature exceeding 300 degrees Celsius; the future causal path... It is an ordered sequence of events containing m events, indicating that these events occur sequentially in chronological order, such as dry burning-fire-spread, dry burning-smoke-alarm (paths must be mutually exclusive, and a trajectory can only belong to one path). S405: Obtain the probability value for each of the stated future causal paths, mathematically described as follows: ,in, In order to give the current observation and intervention operations Under the given conditions, the probability of future causal path C occurring. Given that all previous events have occurred, the intervention has been carried out, and the current observations are current, the event... The probability of occurrence; S406: Repeat the above steps for multiple pre-selected intervention operations (including no intervention) to obtain the path probability distribution under each intervention.

[0024] In this embodiment, the cascading risk prediction specifically refers to: S501: The uncertainty of the current future causal path is measured by causal risk entropy, mathematically described as follows: ,in, Let K be the causal risk entropy, and K be the total number of mutually exclusive causal paths. Let be the probability of the k-th path under natural evolution (i.e., without intervention); if the probability of a certain path is close to 1, it means that the risk is almost certain and the entropy is very low; if the probabilities of multiple paths are similar, it means that the system is at a critical point, and small changes may lead to different results, and the entropy is high. S502: Quantify the contribution of each currently observed variable to the final high-risk path probability based on the Shapley causal contribution value, mathematically described as follows: ,in, For the currently observed variable The Shapley causal contribution value, where q is the number of currently observed variables. The subset of variables other than i can be an empty set. Let S be the number of variables in the subset S. To predict the risk probability by setting i as the current observed variable in addition to S, and taking the baseline values ​​(such as safety standard values) for the other variables, This is the predicted risk probability when the variables in S take the current observed values, while the other variables take the baseline values. It is a factorial; S503: Generate the warning information, including a current observation summary, natural evolution path prediction (listing the most likely paths and their probabilities), the causal risk entropy (low entropy indicates that the risk is almost locked, and high entropy indicates that the situation is changeable), the attribution of major risk factors (listing the percentage contribution of each factor to the current high-risk path through Shapley causal contribution values), and the counterfactual intervention effect (giving the risk changes under several common intervention operations, as well as the best intervention recommendations).

[0025] Example 2: A gas stove operation chain risk prediction system based on causal inference includes a preprocessing module, a causal learning module, an effect quantification module, a counterfactual inference module, and a risk prediction module. The preprocessing module is used to collect raw data during the use of the gas stove and form a multivariate time series. The raw data includes operational variables, environmental variables, state variables, and result variables; The causal learning module is used to learn based on the multivariate time series. Perform temporal causal structure learning and output a temporal causal directed acyclic graph with time delay; The effect quantification module is used to quantify the multivariate time series. The causal effect is quantified by performing causal effect quantification on the temporal causal directed acyclic graph to obtain the causal effect function of each edge, and the structural causal model is output. The counterfactual deduction module is used to perform counterfactual deduction based on the multivariate time series. The temporal causal directed acyclic graph and the structural causal model are used to perform counterfactual path deduction to obtain a set of possible future causal paths, and each path corresponds to a probability value; The risk prediction module is used to predict chain risks based on the future causal path and its probability value, and obtain early warning information.

[0026] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A method for predicting the operational chain risk of gas stoves based on causal inference, characterized in that, Includes the following steps: Step S1: Collect raw data during the use of the gas stove and generate a multivariate time series. The raw data includes operational variables, environmental variables, state variables, and result variables; Step S2: Based on the multivariate time series Perform temporal causal structure learning and output a temporal causal directed acyclic graph with time delay; Step S3: Based on the multivariate time series The causal effect is quantified by performing causal effect quantification on the temporal causal directed acyclic graph to obtain the causal effect function of each edge, and the structural causal model is output. Step S4: Based on the multivariate time series The temporal causal directed acyclic graph and the structural causal model are used to perform counterfactual path deduction to obtain a set of possible future causal paths, and each path corresponds to a probability value; Step S5: Based on the future causal path and its probability value, perform chain risk prediction to obtain early warning information.

2. The gas stove operation cascade risk prediction method based on causal inference according to claim 1, characterized in that, The temporal causal structure learning in step S2 specifically refers to: A maximum possible delay time is preset based on the physical characteristics of the gas stove to define the search space; A temporal variant of the Peter-Clark algorithm was used for causal discovery, resulting in several candidate causal edges; Scan different delay times Calculate the correlation metric and take the value corresponding to the maximum value. As the time delay, a set of causal edges with the time delay is obtained, and multiple candidate graphs are formed; The acyclic constraint ensures that the entire graph is a directed acyclic graph. Specifically, the acyclic constraint is as follows: the candidate graph is represented as a weighted adjacency matrix W, where W(i,j) represents the causal strength from variable i to variable j; a function h(W) is defined such that h(W) = 0 if and only if the graph is acyclic, and h(W) > 0 if the graph is cyclic; this constraint is added to the subsequent scoring function. The graph with the highest score among all candidate graphs is selected as the temporal causal directed acyclic graph based on a scoring function, the mathematical description of which is... ,in, Let L be the score of the candidate graph G, L be the order of the maximum time delay, N be the total number of time points, and n be the total number of variables. Let be the value of the j-th variable at time t. For conditional probability density, In candidate graph G, all pointing to The set of parent nodes, Let G be the total number of edges in the candidate graph G. This is the penalty coefficient.

3. The gas stove operation chain risk prediction method based on causal inference according to claim 1, characterized in that, The quantification of causal effects in step S3 specifically refers to: For the edges in the aforementioned temporal causal directed acyclic graph Fitting conditional expectations using machine learning models, with confounding variables Predicted outcome variables ,get Simultaneously using confounding variables Predicting causal variables ,get ; Obtain the residual after removing confounding effects. and cause residual Mathematically described , ; For the residuals of the aforementioned reasons and the residual of the result Assuming ,in, This is a causal effect function. The noise term is used; solving the minimization problem yields the optimal causal effect function. Mathematically described ,in, Let T be the function space and T be the number of valid samples; The structural causal model is obtained by combining the causal effect functions of all edges.

4. The gas stove operation chain risk prediction method based on causal inference according to claim 1, characterized in that, The counterfactual path deduction in step S4 specifically refers to: Based on the aforementioned structural causal model and combined with the current observations, the noise term is derived by inverse calculation. Define intervention operations That is, delete all edges pointing to variable A and fix the value of variable A to a, so that it is no longer affected by its parent node and noise; Starting from the current moment, given the aforementioned intervention operation The simulation is carried out step by step, calculating the values ​​of all variables at each future moment. The simulation time step must be consistent with the data acquisition frequency until the maximum prediction time window is reached. Multiple possible future trajectories are generated through multiple sampling. Based on the future trajectory extracted event e and the future causal path C, the event is defined as follows: for continuous variables, a threshold is defined; when a variable exceeds the threshold range, an event is considered to have occurred; the future causal path... It is an ordered sequence of events containing m events, indicating that these events occur sequentially in chronological order; The probability value for each of the stated future causal paths is mathematically described as follows: ,in, In order to give the current observation and intervention operations Under the given conditions, the probability of future causal path C occurring. Given that all previous events have occurred, the intervention has been carried out, and the current observations are current, the event... The probability of occurrence; Repeat the above steps for multiple pre-selected interventions to obtain the path probability distribution under each intervention.

5. The gas stove operation chain risk prediction method based on causal inference according to claim 1, characterized in that, The chain risk prediction in step S5 specifically refers to: The uncertainty of a future causal path is measured by causal risk entropy, which is mathematically described as follows: ,in, Let K be the causal risk entropy, and K be the total number of mutually exclusive causal paths. Let be the probability of the k-th path under natural evolution; The contribution of each currently observed variable to the final high-risk path probability is quantified using the Shapley causal contribution value, mathematically described as follows: ,in, For the currently observed variable The Shapley causal contribution value, where q is the number of currently observed variables. A subset of variables excluding i. Let S be the number of variables in the subset S. To predict the risk probability by additionally setting i as the current observed variable in addition to S, and taking the baseline values ​​for the other variables, This is the predicted risk probability when the variables in S take the current observed values, while the other variables take the baseline values. It is a factorial; The early warning information is generated, including a current observation summary, a natural evolution path prediction, the causal risk entropy, the attribution of major risk factors, and the counterfactual intervention effect.

6. A gas stove operation chain risk prediction system based on causal inference, characterized in that, The system is applied to the gas stove operation chain risk prediction method based on causal inference as described in any one of claims 1-5, including a preprocessing module, a causal learning module, an effect quantification module, a counterfactual deduction module, and a risk prediction module; The preprocessing module is used to collect raw data during the use of the gas stove and form a multivariate time series. The raw data includes operational variables, environmental variables, state variables, and result variables; The causal learning module is used to learn based on the multivariate time series. Perform temporal causal structure learning and output a temporal causal directed acyclic graph with time delay; The effect quantification module is used to quantify the multivariate time series. The causal effect is quantified by performing causal effect quantification on the temporal causal directed acyclic graph to obtain the causal effect function of each edge, and the structural causal model is output. The counterfactual deduction module is used to perform counterfactual deduction based on the multivariate time series. The temporal causal directed acyclic graph and the structural causal model are used to perform counterfactual path deduction to obtain a set of possible future causal paths, and each path corresponds to a probability value; The risk prediction module is used to predict chain risks based on the future causal path and its probability value, and obtain early warning information.