Gas safety knowledge accurate pushing method and system based on user feature analysis

By constructing a risk knowledge graph and a dynamic time warping algorithm, combined with an LSTM model, the gas safety monitoring system achieves accurate identification and personalized risk warning, solving the problem that existing gas monitoring systems cannot adapt to different gas usage scenarios and improving the efficiency of gas safety management.

CN120579819BActive Publication Date: 2025-11-18ZHENG ZHOU AN RAN CE KONG SHE BEI YOU XIAN GONG SI
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510670363.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-11-18
Estimated Expiration
2045-05-23

AI Technical Summary

Technical Problem

Existing gas monitoring systems cannot comprehensively and accurately analyze users' gas usage scenarios and potential risks, making it difficult to provide personalized gas safety knowledge based on user characteristics. Furthermore, they are poorly adaptable to emerging gas usage scenarios and cannot update risk assessment models in a timely manner.

Method used

By integrating multimodal data, dynamically segmenting scenarios, embedding knowledge graphs, and optimizing closed-loop feedback, a risk knowledge graph is constructed. Combined with dynamic time warping algorithms and LSTM models, it enables precise monitoring and risk warning of gas usage, generates spatiotemporally aligned real-time data streams, identifies gas usage scenarios, and pushes personalized risk alerts.

Benefits of technology

It has achieved timeliness and accuracy in gas safety monitoring, reduced false alarm rates, improved gas safety management efficiency, enhanced users' awareness and ability to handle gas risks, and ensured the continuous accuracy of risk identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120579819B_ABST
    Figure CN120579819B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of gas safety monitoring, in particular to a gas safety knowledge precise pushing method and system based on user feature analysis. The method comprises the following steps: collecting gas data and environment data in real time, combining user attributes to generate real-time data flow aligned in time and space, dividing user gas use scenes for historical data flow by adopting a dynamic time warping algorithm, training a first model based on the user gas use scenes and the historical data flow; importing historical atlas node data and historical benchmark data corresponding to historical safety events, constructing a risk knowledge graph, and embedding learning of a second model; inputting the real-time data flow into the first model to obtain dynamic benchmark data, obtaining simulation results based on a difference vector of the real-time data flow and the dynamic benchmark data and the second model; generating risk pushing control information according to the simulation results, and pushing risk prompt information to the user. The application solves the problem of insufficient gas safety information pushing precision, and improves the pushing precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of gas safety monitoring technology, and in particular to a method and system for accurately pushing gas safety knowledge based on user feature analysis. Background Technology

[0002] In existing technologies, gas leak alarms and gas meters typically operate independently, with relatively limited monitoring functions. They are primarily used to detect whether gas concentration exceeds the standard to trigger an alarm, but their overall safety monitoring of gas usage is limited. Existing monitoring methods often fail to comprehensively and accurately analyze user gas usage scenarios and potential risks, making it difficult to provide personalized gas safety knowledge based on user characteristics. A similar prior art is Chinese patent CN116859019A, which proposes a method, system, device, and storage medium for the safety detection of residential gas usage. This method includes: acquiring the structure of the building to be tested; the building to be tested being used to characterize buildings using residential gas; determining a test trajectory based on the structure of the building to be tested; scanning and detecting along the test trajectory using a flight device to obtain detection data; the detection data includes video data and concentration data; the concentration data characterizes the concentration of harmful gases in the measured environment; and using the video data and the concentration data, performing safety hazard detection on the building to be tested to obtain detection results. This invention, through its embodiment, establishes a test trajectory based on the structure of the building under test and automatically detects the building using a flight device. It can achieve safe gas detection for residential use under any circumstances, improving detection accuracy and making it widely applicable in the gas technology field. Furthermore, a similar prior art exists in US Patent No. US20230419811A1, which provides an alarm-based intelligent gas safety risk prevention and control method and IoT system, including: acquiring gas monitoring data according to data acquisition instructions to determine if a gas leak occurs; in response to the determination of a gas leak, generating control instructions based on a fan operation strategy to control the fan's operation, and acquiring gas monitoring data under the fan operation strategy, with the fan used to expel leaked gas and assist in determining the type of gas leak; generating notification instructions based on the gas monitoring data and the indicator light's operating strategy, and controlling the indicator lights to issue an alarm notification according to the notification instructions. While both of these patents address the problem of gas safety alarms, they struggle to accurately identify different gas usage scenarios, cannot effectively utilize historical maintenance records and safety event data for risk prediction, and have poor adaptability to newly emerging gas usage scenarios, failing to update risk assessment models in a timely manner. In addition, existing technologies are insufficient in terms of the accuracy of risk alerts and the personalization of push methods, and cannot optimize the push strategy of risk alert information based on different user characteristics and historical feedback records. Summary of the Invention

[0003] This application provides a method and system for accurately pushing gas safety knowledge based on user feature analysis. Through core technologies such as multimodal data integration, dynamic scenario segmentation, knowledge graph embedding, and closed-loop feedback optimization, the system achieves accurate monitoring and risk warning of gas usage. Its core advantages lie in dynamic benchmark adaptation, scenario adaptive expansion, and personalized alarms, significantly reducing false alarm rates and improving gas safety management efficiency. The method includes: generating a spatiotemporally aligned real-time data stream by collecting gas and environmental data in real time and combining it with user type.

[0004] The Dynamic Time Warping (DTW) algorithm is used to divide the historical data stream into user gas usage scenarios, and a first model is trained based on the user gas usage scenarios and the corresponding historical data stream.

[0005] Based on historical maintenance records, graph nodes are extracted, historical graph node data and historical benchmark data corresponding to historical safety events are imported, a risk knowledge graph is constructed, and the second model is embedded and learned based on the risk knowledge graph.

[0006] The real-time data stream is input into the first model to obtain dynamic benchmark data and gas usage scenario. Simulation results are obtained based on the real-time data stream, the dynamic benchmark data, the gas usage scenario, and the second model.

[0007] The push unit is used to determine whether the gas consumption scenario is a new gas consumption scenario based on the simulation results and the difference vector, and to generate risk push control information based on the simulation results.

[0008] As a preferred technical solution of the present invention, the training of the first model includes: aligning historical gas data, historical environmental data, and historical user attributes in the historical multimodal data stream according to the collection time to obtain a historical time-series data stream; drawing gas flow curves based on gas data in the historical time-series data stream of different dates; obtaining multiple sets of curve segments with a similarity greater than a set threshold from any two flow curves using the Dynamic Time Warping (DWT) algorithm; generating label data corresponding to the curve segments in each cluster using a clustering algorithm based on each set of curve segments, the corresponding environmental data, and user attributes; and using the time-series data segments corresponding to the curve segments in the time-series data stream and the label data corresponding to the curve segments as training data to train the first model.

[0009] As a preferred embodiment of the present invention, the construction of the risk knowledge graph and the training of the second model include:

[0010] Semantic analysis is used to extract graph entities from the historical maintenance records. These graph entities include at least gas entities, environmental entities, user entities, scenario entities, benchmark entities, safety event entities, and safety factor entities. These graph entities are used as graph nodes. Semantic analysis is used to obtain the relationships between the graph nodes in the historical maintenance records. Edge connections are made based on these relationships to construct the risk knowledge graph. Historical graph node data corresponding to historical safety events in the historical maintenance records are imported into the risk knowledge graph. The second model is then embedded and learned based on the historical graph node data, historical dynamic benchmark data, the historical safety events, and the causal factors that caused the historical safety events in the risk knowledge graph.

[0011] As a preferred embodiment of the present invention, the acquisition of the simulation results includes:

[0012] The real-time data stream is input into the first model to obtain the gas usage scenario and the corresponding dynamic benchmark data. The real-time data stream, the dynamic benchmark data, and the gas usage scenario are updated to the corresponding nodes in the risk knowledge graph. The difference vector between the gas data in the real-time data stream and the dynamic benchmark data is calculated. When the length of the difference vector is less than a set value, the gas usage is normal. When the length of the difference vector is greater than or equal to the set value, the second model simulates the difference vector based on the real-time data stream, the gas usage scenario, and the dynamic benchmark data in the risk knowledge graph to obtain the simulation result and the weight of the target graph node corresponding to the simulation result. Each target graph node is displayed in a different color according to its weight. The larger the weight, the more conspicuous the color of the corresponding target graph node. The target graph node is a graph node with a weight value greater than a set threshold.

[0013] As a preferred technical solution of the present invention, determining whether the gas consumption scenario is a new gas consumption scenario based on the simulation results and the difference vector includes:

[0014] If the length of the difference vector between the gas data and the dynamic benchmark data in the real-time data stream is greater than or equal to a set value, and the simulation result corresponding to the difference vector cannot be obtained based on the risk knowledge graph and the second model, the real-time data stream corresponding to the user is collected in real time, and the real-time data stream is mapped onto the time axis. The target data stream corresponding to the new gas consumption scenario is extracted based on the Dynamic Time Warping (DWT) algorithm. The first model is trained based on the target data stream and the corresponding new gas consumption scenario. Otherwise, the gas consumption scenario is not a new gas consumption scenario.

[0015] Based on the dynamic benchmark data corresponding to the new gas usage scenario, risk simulation is performed to obtain multiple sets of risk events and corresponding risk data, which are then added to the corresponding graph node positions in the risk knowledge graph. The second model is then trained based on the multiple sets of risk events and corresponding risk data.

[0016] As a preferred embodiment of the present invention, risk information is generated and control information is pushed based on the simulation results, including:

[0017] Based on the weight distribution of the graph nodes in the corresponding risk knowledge graph in the second model corresponding to the simulation results, the risk level of the risk warning information is determined, and the push method of the risk warning information is determined according to user attributes and historical feedback records. The weights of the corresponding graph nodes in the second model are adjusted according to the user's feedback on the pushed risk warning information.

[0018] As a preferred technical solution of the present invention, in the scenario of heating gas consumption, a temperature-flow compensation curve is generated by using historical indoor and outdoor temperature data and gas flow data, and dynamic benchmark data is corrected based on the temperature-flow compensation curve; when the risk knowledge graph detects a change in user attributes, the training cycle of the first model is reset and real-time data stream is collected, and the first model is trained in a timely manner based on the real-time data stream.

[0019] As a preferred embodiment of the present invention, the gas data includes gas flow rate, gas concentration data, and gas pressure data, and the environmental data includes ambient temperature and humidity data and ventilation status data.

[0020] This invention also provides a gas safety knowledge precision push system based on user feature analysis, used to implement the above method, the system comprising:

[0021] The data acquisition unit is used to generate a spatiotemporally aligned real-time data stream by collecting real-time gas and environmental data and combining it with user type.

[0022] The training unit is used to divide the historical data stream into user gas consumption scenarios using the Dynamic Time Warping (DTW) algorithm, and to train the first model based on the user gas consumption scenarios and the corresponding historical data stream.

[0023] The construction unit is used to extract graph nodes based on historical maintenance records, import historical graph node data and historical benchmark data corresponding to historical safety events, construct a risk knowledge graph, and perform embedding learning on the second model based on the risk knowledge graph.

[0024] The simulation unit is used to input the real-time data stream into the first model, obtain dynamic benchmark data and gas usage scenario, and obtain simulation results based on the real-time data stream, the dynamic benchmark data, the gas usage scenario and the second model;

[0025] The push unit is used to determine whether the gas consumption scenario is a new gas consumption scenario based on the simulation results and the difference vector, and to generate risk push control information based on the simulation results.

[0026] The present invention also provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the above-described method.

[0027] Effect

[0028] This invention generates a real-time data stream by collecting gas and environmental data in real time and combining it with user attributes. It uses a dynamic time warping algorithm to segment user gas usage scenarios and train a first model, while simultaneously constructing a risk knowledge graph for embedding learning. This achieves accurate identification and risk prediction of gas usage scenarios. In real-time monitoring, the real-time data stream is input into the model to obtain the user's gas usage scenario and corresponding dynamic baseline data. By calculating the difference vector between the real-time data and the dynamic baseline data, and using the risk knowledge graph to simulate the aforementioned difference vector based on a second model, the simulation results are obtained. Furthermore, based on the aforementioned difference vector and simulation results, safety events are promptly detected, and it is determined whether they represent new gas usage scenarios. If the scenario is not new, risk control information is generated and a prompt is sent, effectively improving the timeliness and accuracy of gas safety monitoring. If it is a new gas usage scenario, data for the new scenario is collected in a timely manner, and the first model is trained to improve its ability to identify new gas usage scenarios. After identifying a safety event through the simulation results, risk prompts are accurately pushed according to different user characteristics, improving users' awareness and handling of gas risks, reducing false alarm rates, and enhancing the initiative and reliability of gas safety management. In heating scenarios, dynamic benchmark data is corrected through temperature-flow compensation curves, reducing false alarms caused by ambient temperature fluctuations. When a change in user attributes is detected, the model training cycle is reset and trained in a timely manner, enabling the model to quickly adapt to new gas usage patterns and ensuring the continuous accuracy of risk identification. Overall, this patent comprehensively improves the efficiency of gas safety monitoring and management from multiple aspects, including data collection, scenario identification, risk prediction, and information push, providing gas users with more accurate and efficient safety protection services and effectively preventing gas accidents. Attached Figure Description

[0029] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0030] Figure 1This is a flowchart of the gas safety knowledge accurate push method based on user feature analysis in this application;

[0031] Figure 2 This is a flowchart of the first model training method in this application;

[0032] Figure 3 A flowchart illustrating the method for obtaining simulation results;

[0033] Figure 4 This is a structural diagram of the gas safety knowledge accurate push system based on user feature analysis proposed in this application. Detailed Implementation

[0034] This application provides a method and system for accurately pushing gas safety knowledge based on user feature analysis. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0035] For ease of understanding, the specific process of the embodiments of this application is described below, such as... Figure 1 As shown, one embodiment of the gas safety knowledge accurate push method based on user feature analysis in this application includes:

[0036] Step S1: Generate a spatiotemporally aligned multimodal data stream by collecting real-time gas and environmental data and combining it with user attributes;

[0037] Specifically, gas flow, concentration, and pressure data are acquired in real time through devices such as gas meters and gas leak alarms. Combined with environmental data such as temperature, humidity, and ventilation status, user attributes, such as household users and elderly people living alone, are associated with the collected data. Multi-source data is synchronized by timestamp and spatial location to form a unified multimodal data stream. This integrates multi-dimensional information on gas, environment, and users, providing complete input for scene recognition, avoiding misjudgments caused by data misalignment, and improving the accuracy of subsequent analysis.

[0038] Step S2: Use the Dynamic Time Warping (DTW) algorithm to divide the historical data stream into user gas usage scenarios, and train the first model based on the user gas usage scenarios and the corresponding historical data stream;

[0039] Specifically, historical gas flow curves are analyzed to identify similar time segments, such as peak gas consumption times for breakfast and dinner. Combined with environmental data and user attributes, such as household size, gas consumption scenarios are divided using clustering algorithms, such as cooking and heating. Time series models such as LSTM are used to train the first model with scenario labels and time series data, outputting gas consumption scenarios and dynamic benchmark data. The above technical solution uses the DTW algorithm to solve the time series alignment problem and improve the accuracy of scenario classification. The first model outputs an appropriate benchmark value based on the scenario, reducing false alarms caused by environmental interference.

[0040] Step S3: Extract graph nodes based on historical maintenance records, import historical graph node data and historical benchmark data corresponding to historical safety events, construct a risk knowledge graph, and perform embedding learning on the second model based on the risk knowledge graph;

[0041] Specifically, by extracting entities from historical maintenance records and establishing graph nodes, and by semantically analyzing and associating nodes such as "gas leak" and "valve failure", a risk knowledge graph is formed. Based on historical graph node data, historical dynamic benchmark data, historical safety events and the causal factors that caused the aforementioned historical safety events, the second model is embedded and learned. The above technical solution intuitively displays the relationship between risk factors through the risk knowledge graph, which helps to quickly locate the root cause of the problem. By combining embedding learning with graph relationships, the model's reasoning ability for complex risk scenarios is improved.

[0042] Step S4: Input the real-time data stream into the first model to obtain dynamic benchmark data and gas usage scenario, and obtain simulation results based on the real-time data stream, the dynamic benchmark data, the gas usage scenario and the second model;

[0043] Specifically, by inputting the aforementioned real-time data stream into the first model, the user's current gas usage scenario and the gas data under normal gas usage in the current scenario, i.e., the aforementioned dynamic benchmark data, are obtained. Then, the difference vector between the gas data in the real-time data stream and the dynamic benchmark data is calculated. Based on the length of the aforementioned difference vector, i.e., the Euclidean distance, it is determined whether the user's gas usage status is normal. When the length of the aforementioned difference vector is less than a set value, the gas usage is normal. When the aforementioned difference vector is greater than or equal to the aforementioned set value, the second model simulates the aforementioned difference vector based on the real-time data stream in the aforementioned risk knowledge graph, the current gas usage scenario, and the aforementioned dynamic benchmark data, and obtains the simulation results and the weights of the target graph nodes corresponding to the simulation results. Through the above technical solution, real-time risk monitoring during gas usage can be achieved, potential safety hazards can be warned in advance, and a basis for taking corresponding measures can be provided, effectively improving the safety of gas usage.

[0044] Step S5: Push unit, used to determine whether the gas consumption scenario is a new gas consumption scenario based on the simulation results and the difference vector, and generate risk push control information based on the simulation results.

[0045] Specifically, based on the simulation results output by the second model and the difference vector between the real-time data stream and the dynamic baseline data, it is determined whether the current gas usage scenario is different from previously known gas usage scenarios. If it is determined that it is not a new gas usage scenario, the simulation results are further analyzed, and risk push control information is generated based on the risk information contained in the results. The method, content, and level of risk warnings are determined, and the risk warning information is sent to users through appropriate methods, such as SMS or APP message push. Through the above technical solution, new gas usage scenarios can be identified in a timely and accurate manner, avoiding misjudgment and false alarms of new scenarios. At the same time, for abnormal situations under known gas usage scenarios, risk warning information can be quickly generated and pushed, enabling users to understand the potential risks in the process of gas use in a timely manner and take corresponding measures to deal with them, thereby effectively reducing the probability of gas accidents and protecting the life and property safety of users.

[0046] Furthermore, such as Figure 2 As shown, the training of the first model includes:

[0047] The historical gas data, historical environmental data, and historical user attributes in the historical multimodal data are aligned according to the collection time to obtain a historical time-series data stream. Gas flow curves are plotted based on gas data from different dates in the historical time-series data stream. Multiple sets of curve segments with a similarity greater than a set threshold are obtained from any two flow curves using the Dynamic Time Warping (DWT) algorithm. Based on each set of curve segments, the corresponding environmental data, and user attributes, a clustering algorithm is used to generate label data corresponding to the curve segments in each cluster. The time-series data segments corresponding to the curve segments in the time-series data stream and the label data corresponding to the curve segments are used as training data to train the first model.

[0048] Specifically, the aforementioned historical time-series data refers to historical data under normal user usage conditions. The gas data includes gas flow rate and pressure data collected by the gas meter, and gas concentration data collected by the gas leak alarm. The environmental data includes air temperature and humidity data, and ventilation status data. The user attributes include young families or elderly people living alone. Flow curves are plotted based on the gas flow rates from different dates in the historical time-series data stream. The Dynamic Time Warping (DWT) algorithm is used to obtain multiple sets of curve segments from any two flow curves where the similarity exceeds a set threshold. Each set of curve segments exhibits the same trend in gas flow rate change; that is, different curve segment groups reflect different user application scenarios. Furthermore, the environmental data and user information corresponding to the curve segments in each group are also considered. The attributes are generated through unsupervised clustering by analyzing the characteristics of flow data, such as gas usage time, gas usage duration, and gas flow rate. The label data for each cluster is generated. The label data includes at least gas usage scenarios such as breakfast, lunch, and dinner, bathing, heating, or rest and gas outage scenarios. The time-series data segment and the corresponding label data in the time-series data stream corresponding to each curve segment are used as training data. The first model is trained based on the training data. The first model is an LSTM model. The time-series data segment corresponds to the time period of the curve segment. Through the above technical solution, an accurate gas usage scenario identification model, namely the first model, can be obtained. The dynamic control benchmark value of the gas data corresponding to each of the above gas usage scenarios can also be obtained through the first model.

[0049] Furthermore, the construction of the risk knowledge graph and the training of the second model include:

[0050] Semantic analysis is used to extract graph entities from the historical maintenance records. These graph entities include at least gas entities, environmental entities, user entities, scenario entities, benchmark entities, safety event entities, and safety factor entities. These graph entities are used as graph nodes. Semantic analysis is used to obtain the relationships between the graph nodes in the historical maintenance records. Edge connections are made based on these relationships to construct the risk knowledge graph. Historical graph node data corresponding to historical safety events in the historical maintenance records are imported into the risk knowledge graph. The second model is then embedded and learned based on the historical graph node data, historical dynamic benchmark data, the historical safety events, and the causal factors that caused the historical safety events in the risk knowledge graph.

[0051] Specifically, since historical maintenance records contain gas data, environmental data, and corresponding scenario modes under historical safety incident conditions, as well as historical dynamic baseline data, user behavior, user attributes, and the causes of the aforementioned historical safety incidents, graph entities are extracted from the historical maintenance records. These graph entities include gas entities, environmental entities, user entities, scenario entities, baseline entities, safety incident entities, and safety factor entities. The gas entities include gas valve status entities, gas flow rate, pressure data, and gas concentration data from gas leak alarms. The environmental data entities include real-time temperature, humidity, ventilation status, and the operating status of ventilation equipment. The real-time temperature includes outdoor temperature, indoor temperature, and outdoor and indoor humidity. The scenario entities represent the user's gas usage scenario type, and the baseline entities represent the normal gas usage corresponding to the user's current gas usage scenario. The threshold range of the parameters, the user entity includes user attributes, the safety event entity is the type of safety event, and the safety factor entity is the causal factor that caused the safety event. By using the gas data, environmental data, user attributes, gas usage scenarios, historical safety event types, and causal factors that caused the historical safety events as historical graph node data, and storing them in the storage location of the corresponding entities in the risk knowledge graph, and embedding the risk prediction model based on the difference vector between the historical graph node data and the corresponding gas data and the historical dynamic benchmark data, the above-mentioned risk prediction model can be obtained through the above technical solution. This lays the foundation for further predicting the causes of risks based on the real-time acquired graph node data and the dynamic benchmark data in the corresponding scenarios. The graph node data is the real-time data stream.

[0052] Furthermore, such as Figure 3 As shown, the acquisition of the simulation results includes:

[0053] The real-time data stream and user attributes are input into the first model to obtain the gas usage scenario and the corresponding dynamic benchmark data. The real-time data stream, the dynamic benchmark data, and the gas usage scenario are updated to the corresponding nodes in the risk knowledge graph. The difference vector between the gas data in the real-time data stream and the dynamic benchmark data is calculated. When the length of the difference vector is less than a set value, the gas usage is normal. When the length of the difference vector is greater than or equal to the set value, the second model simulates the difference vector based on the real-time data stream, the gas usage scenario, and the dynamic benchmark data in the risk knowledge graph to obtain the simulation result and the weight of the target graph node corresponding to the simulation result. Each target graph node is displayed in a different color according to its weight. The larger the weight, the more conspicuous the color of the corresponding target graph node. The target graph node is a graph node with a weight value greater than a set threshold.

[0054] Specifically, by inputting the aforementioned real-time data stream and user attributes into the aforementioned first model, the gas usage scenario of the user and dynamic benchmark data of gas data under the aforementioned first model are obtained. The aforementioned dynamic benchmark data is dynamic gas data, including at least gas flow data, gas pressure data, and gas concentration data. The aforementioned real-time data, the aforementioned gas usage scenario, and the aforementioned dynamic benchmark data are then updated in the aforementioned risk knowledge graph. Furthermore, a difference vector is calculated between the gas data in the aforementioned real-time data stream and the corresponding data of the aforementioned dynamic benchmark data. The aforementioned difference vector reflects the user's deviation from the benchmark value under the current gas usage scenario. Additionally, by calculating the length of the aforementioned difference vector, i.e., the Euclidean distance between the gas data in the aforementioned real-time data stream and the aforementioned dynamic benchmark data, if the length of the aforementioned difference vector is less than the aforementioned set value, it indicates that the gas data in the aforementioned real-time data stream is closer to the aforementioned dynamic benchmark data, and at this time, the user is considered to be in a normal gas usage state. Conversely, if the length of the aforementioned difference vector is greater than the aforementioned set value, it indicates that the gas data in the aforementioned real-time data stream is closer to the aforementioned dynamic benchmark data. When the length of the quantity is greater than or equal to the above-mentioned set value, it indicates that the gas data in the real-time data stream deviates more from the above-mentioned dynamic benchmark data. At this time, it is considered that the above-mentioned user may have unsafe gas usage risks. By obtaining environmental data and user attributes through the above-mentioned real-time data stream, the above-mentioned second model simulates the above-mentioned difference vector, i.e. the above-mentioned unsafe gas usage situation, based on the above-mentioned gas data and dynamic benchmark data under the above-mentioned environmental data, the above-mentioned user attributes, and the above-mentioned gas usage scenario conditions. It obtains the above-mentioned simulation results and the corresponding target graph node weights that lead to the above-mentioned unsafe gas usage risks, such as gas pressure graph nodes, gas flow nodes, etc. The above-mentioned simulation results are unsafe gas usage types, such as: small cracks in the gas pipeline, which affect the above-mentioned gas pressure and gas flow. Different colors are displayed according to the weight of the above-mentioned target graph nodes. Thus, the risk process diagram of the above-mentioned unsafe gas usage risks is formed through the above-mentioned risk knowledge graph, thereby laying the foundation for accurately pushing safety information to users.

[0055] Further, determining whether the gas consumption scenario is a new gas consumption scenario based on the simulation results and the difference vector includes:

[0056] If the length of the difference vector between the gas data and the dynamic benchmark data in the real-time data stream is greater than or equal to a set value, and the simulation result corresponding to the difference vector cannot be obtained based on the risk knowledge graph and the second model, the real-time data stream corresponding to the user is collected in real time, and the real-time data stream is mapped onto the time axis. The target data stream corresponding to the new gas consumption scenario is extracted based on the Dynamic Time Warping (DWT) algorithm. The first model is trained based on the target data stream and the corresponding new gas consumption scenario. Otherwise, the gas consumption scenario is not a new gas consumption scenario.

[0057] Based on the dynamic benchmark data corresponding to the new gas usage scenario, risk simulation is performed to obtain multiple sets of risk events and corresponding risk data, which are then added to the corresponding graph node positions in the risk knowledge graph. The second model is then trained based on the multiple sets of risk events and corresponding risk data.

[0058] Specifically, if the length of the difference vector between the gas data and the dynamic baseline data in the real-time data stream is greater than or equal to the set value, and the simulation results corresponding to the difference vector cannot be simulated using the risk knowledge graph and the second model, it is possible that the user's gas usage scenario has changed. For example, the gas outlet diameter of the user's cooking stove has changed, resulting in a change in gas flow rate, making it no longer compatible with the original cooking gas usage scenario. Alternatively, the user may be heating or taking a bath while cooking, resulting in a large deviation from the dynamic baseline data of the previous gas usage scenario for this new scenario. However, this does not fall under any category of unsafe gas usage risk. Therefore, to improve the accuracy of identifying unsafe gas usage risk scenarios, the real-time data stream of the user is collected in real time. Since the gas data corresponding to different time periods for different gas usage scenarios is different, the real-time data stream is mapped onto the corresponding time axis, and the target data stream corresponding to the new gas usage scenario is extracted based on the Dynamic Time Warping (DWT) algorithm. The first model is trained based on the target data stream and the corresponding new gas usage scenario. The target data stream includes environmental data, gas data, and user attributes under the new gas usage scenario. Otherwise, if the length of the difference vector is less than the set value, or if the length of the difference vector is greater than or equal to the set value and the simulation results can be obtained, the gas usage scenario is not a new gas usage scenario. Since historical safety event data is lacking when a new gas usage scenario first appears, the cause of unsafe gas usage situations cannot be obtained in a timely manner. Therefore, the first model can obtain dynamic benchmark data under the new gas usage scenario. Based on the dynamic benchmark data, multiple sets of risk events and corresponding risk data are simulated, and the second model is trained. Through the above technical solution, new gas usage scenarios can be automatically learned in a timely manner, and unsafe gas usage risk situations can be identified in a timely manner, thereby improving the accuracy of safety information push.

[0059] Furthermore, risk information is generated and control information is pushed based on the simulation results, including:

[0060] Based on the weight distribution of the graph nodes in the corresponding risk knowledge graph in the second model corresponding to the simulation results, the risk level of the risk warning information is determined, and the push method of the risk warning information is determined according to user attributes and historical feedback records. The weights of the corresponding graph nodes in the second model are adjusted according to the user's feedback on the pushed risk warning information.

[0061] Specifically, the second model analyzes the weight distribution of the simulation results in the corresponding nodes of the risk knowledge graph. The weights reflect the contribution of different risk factors to the current risk, such as abnormal gas pressure, abnormal gas concentration, and abnormal gas flow. The system automatically classifies the risk level according to the weight distribution, such as high, medium, and low. For example, abnormal gas concentration has the highest weight, indicating greater danger and a higher risk level, ensuring that the priority of risk warning information matches the actual threat level. Secondly, combined with user attributes, such as elderly people living alone or family users, and historical feedback records, such as the frequency and effectiveness of users' responses to past pushes, the system selects appropriate push methods, such as emergency SMS notifications, APP pop-ups, or voice reminders, to improve information delivery efficiency. Finally, user feedback on pushes, such as confirmation, ignoring, or false alarm marking, will adjust the weight of the graph nodes in reverse. If the user handles the risk in a timely manner, the weight of the corresponding node decreases; if the feedback is a false alarm, the model's sensitivity to relevant features is optimized. This closed-loop mechanism realizes continuous optimization of risk prediction, enhances the accuracy of push notifications and user trust, and at the same time, by dynamically learning user behavior patterns, it reduces the false alarm rate and improves the initiative and reliability of gas safety management.

[0062] Furthermore, in the scenario of heating gas consumption, a temperature-flow compensation curve is generated using historical indoor and outdoor temperature data and gas flow data, and the dynamic benchmark data is corrected based on the temperature-flow compensation curve; when the risk knowledge graph detects a change in user attributes, the training cycle of the first model is reset and real-time data stream is collected, and the first model is trained in a timely manner based on the real-time data stream.

[0063] Specifically, in heating scenarios, gas consumption is highly correlated with indoor and outdoor temperatures. By analyzing historical indoor and outdoor temperature data and gas flow data, the system establishes a temperature-gas flow correlation curve and a temperature-flow compensation curve. The temperature mentioned above refers to the indoor temperature. This curve reflects the normal gas consumption pattern under different temperature conditions. For example, at low temperatures, the gas flow increases to maintain the indoor temperature. The dynamic baseline data was originally set based on a general scenario, but in heating scenarios, temperature changes can cause the baseline value to deviate from actual needs. The system uses the temperature-flow compensation curve, combined with real-time temperature data, to correct the dynamic baseline data, making it more consistent with the normal gas consumption state in the current environment. Through the temperature compensation curve, the dynamic baseline data is more accurate in heating scenarios, reducing false alarms caused by ambient temperature fluctuations, such as misjudging high gas consumption during normal heating as a leak. When the knowledge graph detects changes in user attributes, such as changes in household size or house renovations, the system determines that the original model may not be able to adapt to the new gas consumption pattern. At this point, the training cycle of the first model is reset and real-time data streams are re-acquired. Based on the new data, the first model re-divides the gas usage scenarios and updates the dynamic baseline data through the Dynamic Time Warping (DTW) algorithm. This mechanism ensures that the model can quickly learn the user's new habits and avoid misjudgment of risks due to attribute changes. When user attributes change, the model is retrained in a timely manner to ensure the continuous accuracy of risk identification. For example, after an elderly person living alone becomes a multi-person household, the system can quickly adapt to the new gas usage peak and avoid frequent false alarms.

[0064] Furthermore, the gas data includes gas flow rate, gas concentration, and gas pressure data, and the environmental data includes ambient temperature, humidity, and ventilation status data.

[0065] This invention also provides a gas safety knowledge precision push system based on user feature analysis, used to implement the above-mentioned method, such as... Figure 4 As shown, the system includes:

[0066] The data acquisition unit is used to generate a spatiotemporally aligned real-time data stream by collecting real-time gas and environmental data and combining it with user type.

[0067] The training unit is used to divide the historical data stream into user gas consumption scenarios using the Dynamic Time Warping (DTW) algorithm, and to train the first model based on the user gas consumption scenarios and the corresponding historical data stream.

[0068] The construction unit is used to extract graph nodes based on historical maintenance records, import historical graph node data and historical benchmark data corresponding to historical safety events, construct a risk knowledge graph, and perform embedding learning on the second model based on the risk knowledge graph.

[0069] The simulation unit is used to input the real-time data stream into the first model, obtain dynamic benchmark data and gas usage scenario, and obtain simulation results based on the real-time data stream, the dynamic benchmark data, the gas usage scenario and the second model;

[0070] The push unit is used to determine whether the gas consumption scenario is a new gas consumption scenario based on the simulation results and the difference vector, and to generate risk push control information based on the simulation results.

[0071] The present invention also provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the above-described method.

[0072] In summary, this invention achieves accurate identification and risk prediction of gas usage scenarios by real-time collection of gas and environmental data combined with user attributes to generate a real-time data stream. It employs a dynamic time warping algorithm to segment user gas usage scenarios and trains a first model, while simultaneously constructing a risk knowledge graph for embedding learning. During real-time monitoring, the real-time data stream is input into the model to obtain the user's gas usage scenario and corresponding dynamic baseline data. The difference vector between the real-time data and the dynamic baseline data is calculated, and the risk knowledge graph is used to simulate this difference vector based on a second model to obtain simulation results. Furthermore, based on the difference vector and simulation results, safety events are promptly detected, and it is determined whether a new gas usage scenario has been identified. If not, a risk push control information is generated and a notification is sent, effectively improving the timeliness and accuracy of gas safety monitoring. If a new gas usage scenario has been identified, data for that scenario is collected promptly, and timely action is taken. The first model is trained to improve its ability to identify new gas usage scenarios. After identifying safety events through the simulation results, it accurately pushes risk warnings based on different user characteristics, improving users' awareness and handling of gas risks, reducing false alarm rates, and enhancing the initiative and reliability of gas safety management. In heating scenarios, it also corrects dynamic benchmark data through temperature-flow compensation curves, reducing false alarms caused by ambient temperature fluctuations. When a change in user attributes is detected, the model training cycle is reset and trained in a timely manner, enabling the model to quickly adapt to new gas usage patterns and ensuring the continuous accuracy of risk identification. Overall, this patent comprehensively improves the efficiency of gas safety monitoring and management from multiple aspects, including data collection, scenario identification, risk prediction, and information push, providing gas users with more accurate and efficient safety protection services and effectively preventing gas accidents.

[0073] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0074] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0075] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for accurately pushing gas safety knowledge based on user feature analysis, characterized in that, The method includes: By collecting real-time gas and environmental data and combining them with user type, a spatiotemporally aligned real-time data stream is generated. The Dynamic Time Warping (DTW) algorithm is used to segment user gas usage scenarios in historical data streams. A first model is trained based on these user gas usage scenarios and the corresponding historical data streams. Specifically, this includes aligning historical gas data, historical environmental data, and historical user attributes from the historical multimodal data according to the collection time to obtain a historical time-series data stream. This historical time-series data represents data from normal user usage. The gas data includes gas flow rate data and pressure data collected by the gas meter, and gas concentration data collected by the gas leak alarm. The environmental data includes air temperature and humidity data, and ventilation status data. The user attributes include young families or elderly people living alone. A flow rate graph is plotted based on the gas flow rate data from different dates in the historical time-series data stream. The curves are obtained by using the Dynamic Time Warping (DWT) algorithm to acquire multiple sets of curve segments with a similarity greater than a set threshold from any two flow curves. Different groups of curve segments reflect different application scenarios of users. Based on the environmental data and user attributes corresponding to the curve segments in each group, unsupervised clustering is performed. By analyzing the characteristics of flow data, including gas usage time, gas usage duration, and gas usage flow, label data corresponding to each cluster is generated. The label data includes at least gas usage scenarios for breakfast, lunch, and dinner, gas usage scenarios for showering, gas usage scenarios for heating, or gas outage scenarios for rest. The time-series data segments and corresponding label data in the time-series data stream corresponding to each curve segment are used as training data, and the first model is trained based on the training data. Based on historical maintenance records, graph nodes are extracted, historical graph node data and historical benchmark data corresponding to historical safety events are imported, a risk knowledge graph is constructed, and the second model is embedded and learned based on the risk knowledge graph. Specifically, this includes: extracting graph entities from the historical maintenance records through semantic analysis, wherein the graph entities include at least gas entities, environmental entities, user entities, scenario entities, benchmark entities, safety event entities, and safety factor entities, and using the graph entities as graph nodes; obtaining the correlation between the graph nodes through semantic analysis of the historical maintenance records, and connecting edges based on the correlation to construct the risk knowledge graph; importing the historical graph node data corresponding to historical safety events from the historical maintenance records into the risk knowledge graph; and embedding and learning the second model based on the historical graph node data, historical dynamic benchmark data, the historical safety events, and the causal factors that caused the historical safety events in the risk knowledge graph. The real-time data stream is input into the first model to obtain dynamic benchmark data and gas usage scenarios. Simulation results are obtained based on the real-time data stream, the dynamic benchmark data, the gas usage scenarios, and the second model. The dynamic benchmark data is the gas data under normal gas usage in the current gas usage scenario, and the simulation results are unsafe gas usage types. Based on the simulation results and the difference vector between the gas data in the real-time data stream and the dynamic baseline data, it is determined whether the gas usage scenario is a new gas usage scenario, and risk push control information is generated based on the simulation results.

2. The method according to claim 1, characterized in that, The acquisition of the simulation results includes: inputting the real-time data stream into the first model to obtain the gas usage scenario and the corresponding dynamic benchmark data; updating the real-time data stream, the dynamic benchmark data, and the gas usage scenario to the corresponding node in the risk knowledge graph; calculating the difference vector between the gas data in the real-time data stream and the dynamic benchmark data; when the length of the difference vector is less than a set value, the gas usage is normal; when the length of the difference vector is greater than or equal to the set value, the second model simulates the difference vector based on the real-time data stream, the gas usage scenario, and the dynamic benchmark data in the risk knowledge graph to obtain the simulation results and the weights of the target graph nodes corresponding to the simulation results; and displaying each target graph node in a different color according to its weight, wherein the larger the weight, the more conspicuous the color of the corresponding target graph node; and the target graph node is a graph node with a weight value greater than a set threshold.

3. The method according to claim 1, characterized in that, Determining whether the gas consumption scenario is a new gas consumption scenario based on the simulation results and the difference vector includes: If the length of the difference vector between the gas data and the dynamic benchmark data in the real-time data stream is greater than or equal to a set value, and the simulation result corresponding to the difference vector cannot be obtained based on the risk knowledge graph and the second model, the real-time data stream corresponding to the user is collected in real time, and the real-time data stream is mapped onto the time axis. The target data stream corresponding to the new gas consumption scenario is extracted based on the Dynamic Time Warping (DWT) algorithm. The first model is trained based on the target data stream and the corresponding new gas consumption scenario. Otherwise, the gas consumption scenario is not a new gas consumption scenario. Based on the dynamic benchmark data corresponding to the new gas usage scenario, risk simulation is performed to obtain multiple sets of risk events and corresponding risk data, which are then added to the corresponding graph node positions in the risk knowledge graph. The second model is then trained based on the multiple sets of risk events and corresponding risk data.

4. The method according to claim 1, characterized in that, Based on the simulation results, risk information is generated and control information is pushed out, including: Based on the simulation results corresponding to the weight distribution of the graph nodes in the risk knowledge graph in the second model, the risk level of the risk warning information is determined, and the push method of the risk warning information is determined according to user attributes and historical feedback records. The weights of the graph nodes in the second model are adjusted according to the user's feedback on the pushed risk warning information.

5. The method according to claim 1, characterized in that, In the scenario of heating gas consumption, a temperature-flow compensation curve is generated by using historical indoor and outdoor temperature data and gas flow data, and the dynamic benchmark data is corrected based on the temperature-flow compensation curve. When the risk knowledge graph detects a change in user attributes, it resets the training cycle of the first model and collects real-time data streams, and trains the first model in a timely manner based on the real-time data streams.

6. A gas safety knowledge precision push system based on user feature analysis, used to implement the method as described in any one of claims 1-5, characterized in that, The system includes: The data acquisition unit is used to generate a spatiotemporally aligned real-time data stream by collecting real-time gas and environmental data and combining it with user type. The training unit is used to divide the historical data stream into user gas consumption scenarios using the Dynamic Time Warping (DTW) algorithm, and to train the first model based on the user gas consumption scenarios and the corresponding historical data stream. The construction unit is used to extract graph nodes based on historical maintenance records, import historical graph node data and historical benchmark data corresponding to historical safety events, construct a risk knowledge graph, and perform embedding learning on the second model based on the risk knowledge graph. The simulation unit is used to input the real-time data stream into the first model, obtain dynamic benchmark data and gas usage scenario, and obtain simulation results based on the real-time data stream, the dynamic benchmark data, the gas usage scenario and the second model; The push unit is used to determine whether the gas consumption scenario is a new gas consumption scenario based on the simulation results and the difference vector, and to generate risk push control information based on the simulation results.

7. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Safety detection method, system and device for fuel gas for residents and storage medium

    CN116859019A

  • Alarm-based prevention and control method, internet of things system, and medium for safety risk of smart gas

    US20230419811A1

  • Safety risk prediction method and system based on community equipment and facilities

    CN115964503A

  • Safety emergency dynamic knowledge graph construction method and system

    CN119357412A