Method and device for detecting living condition of elderly living alone based on fuel gas data and medium

By analyzing the gas consumption data of the elderly living alone, a gas consumption detection model is established to monitor the elderly's living conditions in real time. This solves the problems of high monitoring costs and unnatural feeling for the elderly in the existing technology, and achieves efficient and accurate living conditions. monitor.

CN119337280APending Publication Date: 2025-01-21江西电信信息产业有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411480901.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-10-18
Filing Date
2024-10-23
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively monitor and detect the living conditions of elderly people living alone, especially in sudden diseases or accidents. It lacks timely relief measures, and the procurement cost of smart IoT devices is high, so the elderly will also feel that they are being monitored unnatural. feel.

Method used

By collecting gas consumption data of elderly people living alone, a single gas consumption detection model and a seasonal statistical cycle gas consumption detection model are established, and the gas consumption data are analyzed in real time to determine whether there are abnormalities. If there are abnormalities, abnormal information will be sent, otherwise the data will be marked. Label and add to the database, and update the model periodically.

Benefits of technology

It realizes low-cost and seamless monitoring of the living conditions of the elderly living alone. The accuracy of identifying abnormal data can reach more than 75%, reducing the statistical error of gas volume. The monitoring of the living conditions of the elderly is efficient, accurate and highly popular. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119337280A_ABST
    Figure CN119337280A_ABST
Patent Text Reader

Abstract

The invention discloses a method and equipment for detecting living conditions of elderly people living alone based on gas data and a medium. The method comprises the following steps: collecting daily gas consumption historical data of the elderly people living alone, establishing a single-time gas consumption detection model and establishing a gas consumption detection model of a statistical period in different seasons; collecting daily gas consumption data of the elderly in real time, matching the daily gas consumption data with the single-time gas consumption detection model in the corresponding period, and judging whether the gas consumption data of the elderly living alone is abnormal or not; if yes, abnormal information is sent to the client; counting the gas consumption data in the last statistical period, matching the gas consumption data with the gas consumption detection model in the corresponding period, and judging whether the gas consumption data of the elderly living alone is abnormal or not; if the data is abnormal, sending abnormal information to the client, otherwise, labeling the data and adding the data into a real-time database; according to the invention, by analyzing and detecting the gas consumption data, the daily life condition of the elderly living alone is effectively monitored, so that the elderly can timely and effectively find the abnormal condition and take measures when the abnormal condition occurs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of smart elderly care systems, and in particular to a method, device and medium for detecting the living conditions of elderly people living alone based on gas data. Background Art

[0002] Due to the impact of low birth rate and small family, there are a large number of elderly people living alone in cities. If the elderly suffer from sudden illness or other accidents at home, their lives will be in danger if they do not receive timely and effective help. Although real-time monitoring can be achieved with video surveillance, there are blind spots in the monitoring, and it will also make the elderly feel unnatural to be monitored. Summary of the invention

[0003] The present invention proposes a method, device and storage medium for detecting the living conditions of elderly people living alone based on gas data, which can at least solve one of the technical problems in the background technology.

[0004] To achieve the above object, the present invention adopts the following technical solutions:

[0005] A method for detecting the living conditions of elderly people living alone based on gas data, wherein a computer device performs the following steps:

[0006] Step 1: Collect the daily gas usage history data of elderly people living alone, establish a single gas usage detection model and a gas usage detection model for statistical periods by season;

[0007] Step 2: Collect the daily gas usage data of the elderly in real time, record the time, amount and duration of each gas usage, match it with the single gas usage detection model in the corresponding period, and determine whether there is any abnormality in the gas usage data of the elderly living alone;

[0008] Step 3: If there is an exception, send the exception information to the client;

[0009] Step 4: Collect gas usage data from the previous statistical period and match it with the gas usage detection model of the corresponding period to determine whether there is any abnormality in the gas usage data of the elderly living alone;

[0010] Step 5: If there is an exception, send the exception information to the client; otherwise, add the data to the real-time database with a tag;

[0011] Step 6: At the beginning of each month, add the data labeled as normal to the daily gas usage data judgment library for elderly people living alone, and update the single gas usage detection model and the gas usage detection model for each statistical period.

[0012] On the other hand, the present invention further discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the above method.

[0013] On the other hand, the present invention further discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.

[0014] It can be seen from the above technical scheme that the method and system for detecting the living conditions of elderly people living alone based on gas data of the present invention can effectively monitor the daily living conditions of elderly people living alone by analyzing and detecting gas usage data, so that abnormal situations of the elderly can be discovered and measures can be taken in a timely and effective manner.

[0015] Existing methods for detecting abnormalities in elderly people living alone focus on smart IoT devices. However, the procurement cost of smart devices is high, and video surveillance equipment will make the elderly feel unnatural as if they are being monitored, affecting their daily lives.

[0016] The beneficial effects of the present invention include:

[0017] 1. The present invention provides a new idea for analyzing and detecting the daily life status of the elderly based on gas data, and demonstrates the feasibility of this solution;

[0018] 2. The present invention realizes a low-cost solution that does not interfere with the life of the elderly and has no monitoring blind spots by establishing an algorithm model for detecting the living conditions of the elderly;

[0019] 3. The present invention is simple and easy to implement, has low cost and strong scalability, and can be used as a livelihood guarantee solution for monitoring the daily living conditions of elderly people living alone.

[0020] 4. The single gas usage detection model for the elderly proposed in the present invention, which is constructed based on a logistic regression algorithm, has test prediction data results showing that the accuracy of the model in identifying abnormal data can reach over 75%.

[0021] 5. The periodic gas consumption detection model based on the Gaussian model proposed in the present invention can effectively detect anomalies in the gas consumption of each statistical period, thereby reducing the impact of gas consumption statistical errors on anomaly judgment. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a flowchart of the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.

[0024] like Figure 1As shown, the method for detecting the living conditions of elderly people living alone based on gas data in this embodiment comprises the following steps:

[0025] Step 1: Collect the daily gas usage history data of elderly people living alone, establish a single gas usage detection model and a gas usage detection model for statistical periods by season;

[0026] Step 2: Collect the daily gas usage data of the elderly in real time, record the time, amount and duration of each gas usage, match it with the single gas usage detection model in the corresponding period, and determine whether there is any abnormality in the gas usage data of the elderly living alone;

[0027] Step 3: If there is an exception, send the exception information to the client;

[0028] Step 4: Collect gas usage data from the previous statistical period and match it with the gas usage detection model of the corresponding period to determine whether there is any abnormality in the gas usage data of the elderly living alone;

[0029] Step 5: If there is an exception, send the exception information to the client; otherwise, add the data to the real-time database with a tag;

[0030] Step 6: At the beginning of each month, add the data labeled as normal to the daily gas usage data judgment library for elderly people living alone, and update the single gas usage detection model and the gas usage detection model for each statistical period.

[0031] In step 1, since gas is mainly used for cooking and bathing, and these two activities have obvious time distribution patterns. Based on this idea, the present invention divides a day into five statistical periods. The first is breakfast time, code A, 7:00-9:00 in the morning, the second is lunch time, code B, 11:00-13:00 in the afternoon, the third is dinner time, code C, 17:00-19:00 in the afternoon, the fourth is bathing time, code D, 19:00-22:00 in the evening, and the fifth is others, code E, which is a time period with less gas consumption.

[0032] After determining the statistical period, we began to collect the daily gas usage history data of the elderly living alone. The data was divided into three versions: historical database, judgment database, and real-time database. The historical database was used as a backup database for the full version. The judgment database consisted of the normal single gas usage of the elderly and the gas usage data of each statistical period, which was used to establish and optimize the model. The real-time database consisted of the full data of single gas usage in the recent period and the gas usage data of each statistical period. According to the different seasons, a single gas usage detection model and a gas usage detection model for each statistical period were established respectively. The single gas usage detection model is mainly used for real-time monitoring of each time the elderly use gas, so the focus is on the two parameters of single normal gas usage and duration. Based on the judgment database, a single gas usage detection model is established.

[0033] After establishing a single gas usage detection model, the normal gas usage data of the elderly in recent years are collected according to the season, and the gas usage data in each period is statistically obtained. Assuming that the gas usage sample of the elderly is large enough and the gas usage data obeys a normal distribution or a near-normal distribution, a Gaussian model is proposed to judge abnormal gas usage. Considering that the mean of the Gaussian distribution is easily biased by abnormal points, the quality requirements of historical data are relatively high. Therefore, the present invention draws on the multi-extreme point deviation algorithm (GESD) and adopts the idea of ​​​​cyclic detection to eliminate abnormal values ​​until there are no abnormal values, that is, the gas usage detection model of each statistical period can be obtained.

[0034] In step 2, for each real-time collection of gas usage data, a single gas usage detection model is called to match the current data to determine whether there is any abnormality in the elderly person's gas usage this time.

[0035] In step three, based on the gas usage data obtained in step two, if the data is abnormal, an abnormal information is sent to the client.

[0036] In step 4, after the current collection cycle ends, the gas usage data in the previous cycle is automatically counted and matched with the gas usage detection model of the corresponding cycle to determine whether there is any abnormality in the gas usage data of the elderly living alone;

[0037] In step 5, according to the judgment result obtained in step 4, if there is an abnormality, the abnormal information is sent to the client, otherwise, the data is tagged and added to the real-time database;

[0038] In step six, considering that the larger the amount of data, the better the accuracy of the algorithm, the normal data collected in step five is added to the judgment library for model optimization and updating.

[0039] The specific implementation process of the method for detecting the living conditions of elderly people living alone based on gas data is as follows:

[0040] 1. Single gas usage detection model based on gas data:

[0041] 1. The present invention proposes a single gas usage detection model for the elderly based on a logistic regression algorithm. The test prediction data results show that the accuracy of the model in identifying abnormal data can reach more than 75%.

[0042] 2. Since factors such as season, time of gas usage, gas usage, and whether it is a weekday have a significant impact on the gas usage of the elderly, the above data are used as feature variables of the logistic regression algorithm.

[0043] 3. Since the data collected by the gas flow meter generally contains abnormal values, which greatly affect the recognition effect of the algorithm, it is necessary to clean and preprocess the data to eliminate noise and missing values. The present invention uses integrity detection to filter out normal data, mark missing data and data less than 0, delete data less than 0, and mark it as a missing value. Use the adjacent mean interpolation method to fill in the missing values. The specific method is: Assume that the ith missing data d is marked i , find the nearest normal value d from left to right a+q , and find the first normal value d from right to left a-q , then the interpolation data B a For: B a =D a+q +D a-q , thus obtaining all gas volume data including normal data and interpolated data.

[0044] 4. The training data for abnormal gas usage detection comes from the above historical database, and the training data format is shown in Table 1. Among them, gas usage behavior w is 0-1 data, 1 represents normal, 0 represents abnormal; season c represents the data collection season, 1 represents spring, 2 represents summer, 3 represents autumn, and 4 represents winter; gas usage time point t is only accurate to the hour, and 0-23 represents 0 o'clock to 23 o'clock in the evening respectively; whether it is a working day d is 0-1 data, 0 represents a rest day, and 1 represents a working day; gas usage g represents the gas usage of the user in this data collection. The above data format is (y i ,X i ), where X i =(w i ,c i ,t i ,d i ,g i ).

[0045] Table 1 Training data format

[0046]

[0047] Gas use behavior of the elderly i is a categorical attribute, X i As a characteristic attribute, when analyzing the gas usage data of the elderly, each data D i =(y i ,X i ), where X i =(w i ,c i ,t i ,d i ,g i), 1≤i≤N. Gas usage behavior w is 0-1 data, 1 represents normal, 0 represents abnormal; season c represents the data collection season, 1 represents spring, 2 represents summer, 3 represents autumn, and 4 represents winter; gas usage time t is accurate only to the hour, 0-23 represents 0 o'clock to 23 o'clock in the evening; whether it is a working day d is 0-1 data, 0 represents a rest day, 1 represents a working day; gas usage g represents the gas usage of the user in this data collection; 1≤i≤N, represents N data;

[0048] Assuming the regression coefficient θ=(θ0,θ1,θ2,θ3), when the gas is used normally, y i =1 with a probability of p i , then lg[p i / (1-p i )]=θ T X i , so we can solve:

[0049]

[0050] The regression coefficient θ can be obtained by maximum likelihood estimation. The likelihood estimation function is:

[0051] In formula 1: Maximizing formula (1) is equivalent to maximizing its logarithm, that is,

[0052]

[0053] Taking the partial derivative of formula (2) with respect to θ and setting the result to 0, we obtain:

[0054]

[0055] The solution of formula (3) is the regression coefficient. The solution of formula 3 usually adopts the gradient descent method to obtain the optimal regression coefficient Assume that there is gas usage data D to be detected j =(y j ,X j ), according to the regression coefficient and the known X j The probability of normal gas usage can be obtained. If y j <0.5, the gas usage is considered abnormal.

[0056] 2. Gas consumption detection model for each statistical period based on gas data.

[0057] 1. Considering the significant impact of seasons on the gas consumption of the elderly, a gas consumption detection model for each statistical period is established by season.

[0058] 2. From step 1, we can know that the gas usage data of each elderly person in the discriminant database during the statistical period conforms to or approximately conforms to the normal distribution, and the Gaussian model can be used for modeling. The probability density function formula of the Gaussian model is as follows:

[0059]

[0060] The formula contains two parameters, parameter μ represents the mean, and parameter σ represents the standard deviation. The mean corresponds to the middle position of the normal distribution, and the standard deviation measures the degree of dispersion of the data around the mean. Since the Gaussian model is greatly affected by abnormal data, the abnormal data is removed before modeling. The multiple extreme point deviation algorithm (GESD) is used to perform cyclic detection until the cycle ends without abnormality. The mean μ and standard deviation σ of historical data are calculated as follows:

[0061]

[0062] Among them, x is the gas consumption in each statistical period, and n is the sample size. After calculating the mean μ, the standard deviation is calculated according to the standard deviation formula as shown below:

[0063]

[0064] where x i is the i-th sample value, μ is the mean, and n is the sample size. After calculating the mean μ and the standard deviation σ, according to the discrimination criterion of the Gaussian model, it can be known that the probability that the normal value is distributed in (μ-3σ, μ+3σ) is 0.9973, so the present invention defines data that are not in this interval as abnormal data. The data is tested cyclically, and the abnormal data are eliminated one by one to obtain the latest discrimination library. Referring to the above algorithm, the latest μ and σ are calculated. If the gas consumption within the period does not meet (μ-3σ, μ+3σ), it is identified as abnormal data. Under the principle of minimizing false alarms, the anomalies are divided into three levels, as shown in Table 2 below:

[0065] Table 2 Abnormality level table

[0066]

[0067] In order to solve the limitations and defects of the existing detection scheme, the embodiment of the present invention proposes a method for detecting the living conditions of elderly people living alone based on gas data, which can analyze the gas consumption of elderly people living alone, and detect the abnormality of the elderly as early as possible through the feature of gas consumption, so as to take timely measures to protect the life and property safety of the elderly. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0068] The following examples illustrate:

[0069] In a southern province, M community in N city conducted a test on the living conditions of elderly people living alone in the community according to the requirements of the civil affairs department. First, community staff collected information about elderly people living alone and connected with the natural gas company to obtain the elderly’s gas usage history data. After collecting the historical gas usage data of each elderly person, Figure 1 The system flow chart of the present invention described in the embodiment classifies data by season and counts the gas usage data of each statistical period, and establishes a single gas usage detection model and a gas usage detection model for each period.

[0070] The steps to establish a single gas usage model based on logistic regression are as follows: collect the historical data of the elderly's single gas usage, determine the gas usage season, time, gas usage, whether it is a weekday, single duration and other data as input variables, and pre-process the data, divide the test set and training set into a ratio of 2:8; use the Logistic function to control the output between 0 and 1, and construct a suitable prediction function Construct the loss function and cost function J (m samples, each sample has n features), and derive the loss function of logistic regression through maximum likelihood estimation.

[0071] Solve the minimum value and parameters of the cost function, and use the gradient descent method to solve the following formula to get the optimal solution, that is, the regression coefficient The learning step length α can be determined by multiple debugging to avoid accidental errors. Input the gas consumption data to be tested and calculate the regression coefficient and the known X i The probability of normal gas usage can be obtained. If y i <0.5, the gas usage is considered abnormal.

[0072] The steps to establish the gas consumption detection model for each statistical period based on the Gaussian model are as follows: collect the gas consumption historical data of the elderly in each statistical period, determine the gas consumption season, the gas consumption statistical period of the day, gas consumption and other data as input variables, and consider that abnormal data has a greater impact on the model. First, use the cycle detection algorithm to remove abnormal values; assuming that the gas consumption conforms to the Gaussian model distribution, its probability density function can be obtained. According to the Gaussian distribution law, the mean Mean square error According to the discriminant criterion of the Gaussian model, the probability that normal values ​​are distributed in (μ-3σ, μ+3σ) is 0.9973, and data outside this interval can be judged as abnormal data.

[0073] After real-time collection of the elderly's gas usage data, it is stored in the real-time database and compared with the single gas usage detection model to determine whether the elderly's usage is abnormal. After each statistical period, the gas usage data of the previous period is automatically counted and stored in the real-time database, and the corresponding statistical period gas usage detection model is called for detection. If there is an abnormality, refer to Table 1 and execute it according to the preset scheme of graded disposal. Otherwise, the data is labeled and stored in the real-time collection library. In order to improve the detection accuracy of the gas usage detection model in each statistical period, the gas usage data labeled as normal obtained in step five is added to the judgment library to realize the continuous updating and optimization of the gas usage detection model. Since the implementation cost is very low and there is no need to install a large number of additional equipment, this solution has a strong promotion value, especially suitable for the detection of daily life conditions of elderly people living alone in the community.

[0074] On the other hand, the present invention further discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the above method.

[0075] On the other hand, the present invention further discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.

[0076] In another embodiment provided in the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute any of the methods for detecting the living conditions of elderly people living alone based on gas data in the above-mentioned embodiments.

[0077] It is understandable that the system, device and storage medium provided in the embodiments of the present invention correspond to the method provided in the embodiments of the present invention, and the explanation, examples and beneficial effects of the relevant contents can refer to the corresponding parts in the above methods.

[0078] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0079] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0080] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0081] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting the living conditions of elderly people living alone based on gas data, characterized in that: The following steps are included: Step 1: Collect the daily gas usage history data of elderly people living alone, establish a single gas usage detection model and a gas usage detection model for statistical periods by season; Step 2: Collect the daily gas usage data of the elderly in real time, record the time, amount and duration of each gas usage, match it with the single gas usage detection model in the corresponding period, and determine whether there is any abnormality in the gas usage data of the elderly living alone; Step 3: If there is an exception, send the exception information to the client; Step 4: Collect gas usage data from the previous statistical period and match it with the gas usage detection model of the corresponding period to determine whether there is any abnormality in the gas usage data of the elderly living alone; Step 5: If there is an exception, send the exception information to the client; otherwise, add the data to the real-time database with a tag; Step 6: At the beginning of each month, add the data labeled as normal to the daily gas usage data judgment library for elderly people living alone, and update the single gas usage detection model and the gas usage detection model for each statistical period.

2. The method for detecting the living conditions of elderly people living alone based on gas data according to claim 1 is characterized in that: The steps to establish a single gas usage detection model in step 1 are as follows: S11. Use integrity detection to filter out normal data, mark missing data and data less than 0, delete data less than 0, and mark them as missing values; use adjacent mean interpolation method to fill in the missing values; S12. Constructing a single gas usage detection model includes: assuming that the gas usage behavior of the elderly y i is a categorical attribute, X i As a characteristic attribute, when analyzing the gas usage data of the elderly, each data D i =(y i ,X i ), where X i =(w i ,c i ,t i ,d i ,g i ), 1≤i≤N; Assuming the regression coefficient θ=(θ0,θ1,θ2,θ3), when the gas is used normally, y i =1 with a probability of p i , then lg[p i / (1-p i )]=θ T X i , thus solving: The regression coefficient θ can be obtained by maximum likelihood estimation calculation; The likelihood estimation function is: In formula (1): Maximizing formula (1) is equivalent to maximizing its logarithm, that is, Taking the partial derivative of formula (2) with respect to θ and setting the result to 0, we obtain: The solution of formula (3) is the regression coefficient; The gradient descent method is used to solve formula (3) to obtain the optimal regression coefficient Assume that there is gas usage data D to be detected j =(y j ,X j ), according to the regression coefficient and the known X j The probability of normal gas usage can be obtained. If y j <0.5, the gas usage is considered abnormal; S13, use the data processed in step S11 to train the single gas use detection model of S12, the data format is (y i ,X i ), where X i =(w i ,c i ,t i ,d i ,g i ).

3. The method for detecting the living conditions of elderly people living alone based on gas data according to claim 2 is characterized by: Step S11 specifically includes: Assume that it is marked as the i-th missing data d i , find the nearest normal value d from left to right a+q , and find the first normal value d from right to left a-q , then the interpolation data B a For: B a =D a+q +D a-q , thus obtaining all gas volume data including normal data and interpolated data.

4. The method for detecting the living conditions of elderly people living alone based on gas data according to claim 1 is characterized in that: The construction of the gas usage detection model for the statistical period includes determining whether the gas usage data of each elderly person in the database during the statistical period conforms to or approximately conforms to the normal distribution, and adopting the Gaussian model for modeling. The probability density function formula of the Gaussian model is as follows: The formula contains two parameters, the parameter μ represents the mean, and the parameter σ represents the standard deviation. The mean corresponds to the middle position of the normal distribution, and the standard deviation measures the degree of dispersion of the data around the mean. Since the Gaussian model is greatly affected by abnormal data, the abnormal data is eliminated before modeling, and a cyclic detection is performed until there is no abnormality and the cycle ends; the mean μ and standard deviation σ of the historical data are solved, and the calculation formula is as follows: Among them, x is the gas consumption in each statistical period, and n is the size of the sample; after the mean μ is calculated, the standard deviation is calculated according to the standard deviation formula as shown below: where x i is the i-th sample value, μ is the mean, and n is the sample size. After calculating the mean μ and standard deviation σ, according to the Gaussian model's discriminant criterion, it can be known that normal values ​​are distributed in (μ-3σ, μ+3σ), and those not in this interval are defined as abnormal data. Perform cyclic detection on the data, remove abnormal data one by one, and obtain the latest discrimination library; Referring to the above algorithm, the latest μ and σ are calculated. If the gas consumption within the period does not satisfy (μ-3σ, μ+3σ), it is considered as abnormal data.

5. The method for detecting the living conditions of elderly people living alone based on gas data according to claim 1 is characterized by: Step 1 includes the steps of building a single gas usage model based on logistic regression: Collect the historical data of the elderly's single gas usage, determine the gas usage season, time, gas usage, whether it is a weekday, single duration and other data as input variables, and pre-process the data, divide the test set and training set into a ratio of 2:8; use the Logistic function to control the output between 0 and 1, and construct a prediction function Construct loss function and cost function J, m samples, each sample has n features, and derive the loss function of logistic regression through maximum likelihood estimation. Solve the minimum value and parameters of the cost function, and use the gradient descent method to solve the following formula to get the optimal solution, that is, the regression coefficient The learning step size α can be determined by multiple debugging to avoid contingency; Input the gas consumption data to be tested, according to the regression coefficient and the known X i The probability of normal gas usage can be obtained. If y i <0.5, the gas usage is considered abnormal.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 5.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the computer program is executed by the processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 5.