Safety supervision method and system for disabled people
By constructing a safety prediction model and monitoring the vital signs and environmental status data of people with disabilities in real time, the problem of insufficient targeting and real-time performance of traditional safety supervision methods has been solved, realizing intelligent safety supervision of people with disabilities and improving the accuracy and timeliness of identification.
Patent Information
- Application Number
- CN202410983384.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-11-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional safety supervision methods and systems cannot meet the special needs of people with disabilities. They lack specificity, accuracy in identification, and timeliness, and are unable to respond to emergencies in a timely manner.
By collecting vital sign data of people with disabilities and environmental status data, a safety prediction model is constructed. Wearable sensors and environmental sensors are used to monitor data in real time, perform preprocessing and fusion, use a decision tree model to determine the status, and generate danger warning information when an unsafe state is detected.
It enables intelligent safety supervision of people with disabilities, improves the accuracy of identifying complex environments and emergency situations, and can promptly detect and warn of potential dangers, reducing the risk of accidents.
Smart Images

Figure CN118924244A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of safety supervision, and more specifically, to a safety supervision method and system for disabled persons. Background Art
[0002] With the progress of society and the development of science and technology, the quality of life and social participation of people with disabilities are increasing. However, due to physical or cognitive limitations, people with disabilities face many safety risks in their daily lives. Traditional safety supervision methods and systems often fail to meet their special needs, resulting in them being unable to get help in time and even facing life threats. Therefore, it is particularly important to develop a safe, reliable, convenient and easy-to-use safety supervision method and system for people with disabilities.
[0003] The patent application with the publication number CN113537842A discloses a method and system for intelligent monitoring and management of construction engineering personnel, which uses wearable monitoring terminals and fixed monitoring terminals to monitor and record the physiological data, behavioral data and environmental data of the construction engineering personnel; when the physiological data, behavioral data or environmental data indicate an abnormal condition, the corresponding treatment plan is executed; and the performance status is obtained based on the analysis of physiological data and environmental data. It can be seen that based on intelligent wearable monitoring terminals, fixed monitoring terminals and background management terminals, the physiological data of construction engineering personnel and the environmental data of their working environment are monitored in real time, and the work data model is trained through deep learning. When the construction engineering personnel or the environment they are in are abnormal, the corresponding reminder is output, which effectively reduces the construction and personal safety risks; physiological data, behavioral data and environmental data can also be used for work management to eliminate supervision loopholes.
[0004] Traditional security supervision mainly relies on surveillance cameras, emergency call buttons, wireless intercoms, etc. These technologies can ensure safety to a certain extent, but they have some limitations. The main problems are as follows:
[0005] There is a lack of personal safety supervision for special groups. Traditional safety supervision methods and systems are mostly designed for the general population in a healthy and sound state, and do not take into account the needs of special groups, resulting in a lack of targeting in the safety supervision process; most of the existing supervision technologies are based on image recognition, sound recognition and other methods, and do not take into account the situation in complex environments, resulting in insufficient recognition accuracy and prone to false alarms and missed alarms; the existing supervision system relies on surveillance cameras and emergency call buttons, lacks real-time and timeliness, resulting in the inability to respond to emergencies and deal with emergencies in a timely manner, and cannot realize the intelligence and convenience of safety supervision, and still needs to be improved.
[0006] In view of this, the present invention proposes a safety supervision method and system for disabled persons to solve the above problems. Summary of the invention
[0007] In order to overcome the above-mentioned defects of the prior art and to achieve the above-mentioned purpose, the present invention provides the following technical solution: a safety supervision method for disabled persons, comprising:
[0008] S1. Collect safety status data of disabled persons within a period of time, wherein the safety status data includes vital sign data and environmental status data; pre-process the acquired vital sign data and environmental status data to obtain a life feature data set and an environmental feature data set; and fuse the life feature data set and the environmental feature data set to obtain a comprehensive feature data set;
[0009] S2. Build a safety prediction model, import the comprehensive feature data set within the historical cycle time into the safety prediction model for training, and obtain a trained safety prediction model; import the comprehensive feature data set within the current cycle time into the trained safety prediction model to predict the status of the disabled person;
[0010] S3. Determine the status of the disabled person. If it is safe, record the corresponding status data; otherwise, record the corresponding unsafe status data and generate danger warning information to notify relevant personnel in time.
[0011] Furthermore, the vital signs data include blood pressure, blood oxygen, heart rate and body temperature data; the environmental status data include temperature, humidity, light and obstacle data;
[0012] The blood pressure, blood oxygen, heart rate and body temperature data are monitored and acquired through wearable sensors; the wearable sensors include blood pressure sensors, blood oxygen sensors, heart rate sensors and body temperature sensors for monitoring the vital signs of the wearer; the temperature, humidity, light and obstacle data are acquired through ambient temperature sensors, humidity sensors, light sensors and infrared sensors.
[0013] Furthermore, the method of preprocessing the acquired vital sign data and environmental status data to obtain a life characteristic data set and an environmental characteristic data set is:
[0014] Statistical tests were used to identify and eliminate outliers and abnormal values in the vital signs data and environmental status data, mean interpolation was used to replace missing values, and the Z-score standardization method was used to transform the data into a standard normal distribution with a mean of 0 and a standard deviation of 1, thus obtaining the vital signs data set and the environmental characteristics data set.
[0015] Furthermore, the method of fusing the life feature data set and the environmental feature data set to obtain a comprehensive feature matrix includes:
[0016] The comprehensive feature matrix is recorded as Y; the cycle time is discretized to obtain n time points, and the life feature data set and the environmental feature data set are collected at each time point;
[0017] Define the vital signs data vector V L =[BP,SP,HR,TE]; where BP is blood pressure; SP is blood oxygen; HR is heart rate; TE is body temperature; define the environmental state data vector V E =[TF,HU,LG,OB]; where TF is temperature; HU is humidity; LG is light; OB is obstacle data;
[0018] The vital sign data vectors and environmental status data vectors at n time points are vertically spliced to form the original data matrix M; the original data matrix is:
[0019]
[0020] Calculate the covariance matrix C of the original data matrix M, the calculation formula is: Among them, M is the original data matrix, M T is the transpose of the original data matrix M;
[0021] The eigenvalues λ and eigenvectors v of the covariance matrix C are calculated by the linalg.eig function in Python, and the eigenvalue arrays λ1, λ2…λ8 and the eigenvector matrix [v1 v2…v8] are obtained, where the eigenvectors correspond one to one to the eigenvalues;
[0022] Arrange the eigenvectors in descending order according to the corresponding eigenvalues, and select the eigenvectors corresponding to the first r eigenvalues to form a projection matrix P; the projection matrix P = [v1 v2…v r ]; Use the projection matrix P to reduce the dimension of the original data matrix M to obtain the reduced-dimensional comprehensive feature matrix Y=MP.
[0023] Furthermore, the method of arranging the eigenvectors v in descending order according to the corresponding eigenvalues λ and selecting the eigenvectors corresponding to the first r eigenvalues to form the projection matrix P includes:
[0024] Arrange the eigenvalues in the acquired eigenvalue array in descending order to obtain λ1, λ2…λ b , where λ b is the bth eigenvalue; construct a kernel density estimation function to select the first r eigenvalues, the kernel density estimation function is: Wherein, r is the number of selected eigenvalues, h is the bandwidth, i is the eigenvalue index to be summed, n″ is the end point of index i, K(u) is the kernel function, and u is the input data of the kernel function; the calculation formula of the kernel function K(u) is: Where π represents the ratio of circumference to circumference, e is the base of the natural logarithm, and the input data of the kernel function is λ c is the cth eigenvalue, λ i is the i-th eigenvalue, h is the bandwidth;
[0025] The local maximum of the kernel density estimation function is determined by calculating the derivative of the kernel density estimation function f(λ), and the density peak is determined according to the local maximum; the density threshold is determined according to the density peak, and the density threshold is: θ=α·max(f(λ)); wherein α is a coefficient less than 1; max(f(λ)) is the density peak of the function f(λ);
[0026] The eigenvalues with density higher than the density threshold are retained, and the eigenvalues with density higher than the density threshold are denoted as λ σ ≥θ,σ∈{1,2,…,r}, where r is the number of eigenvalues retained;
[0027] The bandwidth h in the kernel function is limited by a bandwidth limitation model, and the bandwidth limitation model is: in, is the standard deviation of the eigenvalue after taking the logarithm; N is the total number of eigenvalues λ;
[0028] The upper limit threshold of the preset bandwidth h is h max , the lower limit threshold of bandwidth h is h min ; Select the one located at (h min ,h max ) is substituted into the kernel function to observe the smoothness of the kernel function, and the value that makes the smoothness of the kernel function optimal is selected as the final bandwidth of the kernel function.
[0029] Furthermore, the training method of the safety prediction model is:
[0030] The safety prediction model is a decision tree model, including a root node, internal nodes and leaf nodes; the splitting criterion, the number of trees and the depth hyperparameter are set; the data set is divided into a training set and a test set by a clustering-based segmentation method; the input data of the model is the comprehensive feature matrix Y within the historical period time, and the output label is the state of the disabled person; the predicted state of the disabled person is compared with the actual state of the disabled person to determine whether there is an error between the two; if there is no error, a trained model is obtained, and if an error occurs, the model is optimized and adjusted;
[0031] A logical function is used to convert the classification label into a probability value, and a logarithmic loss function is selected to measure the difference between the model prediction result and the true label; the calculation formula of the logarithmic loss function is: Where N′ is the total number of samples, j represents the jth sample, and y jis the true label of the jth sample, q j Predict the probability that the jth sample is a positive class for the model;
[0032] Initialize the decision tree model, set the initial prediction model F0(x), input the training set into the current model to fit the data set, calculate the residual between the predicted value and the true value, and the residual is r0=y0-f0(x); where y0 is the true value and f0(x) is the predicted value; use the residual r0 as the target variable to train a new decision tree model T g (x); Add the newly trained decision tree to the current model with a certain learning rate η, and update the prediction model F g (x) = F g-1 (x)+ηT g (x), where F g (x) is the prediction model obtained after g iterations, F g-1 (x) is the prediction model obtained after g-1 iterations; the residual r is calculated based on the new prediction model. g ; Repeat the above steps until the preset number of iterations is reached and stop training to obtain the final prediction model Where k is the preset number of iterations;
[0033] The trained model is evaluated using the test set, and the performance of the model is evaluated using the AUC-ROC curve; the method of evaluating the performance of the model using the AUC-ROC curve is as follows: firstly, the ROC curve and AUC value of each category are calculated, and then the overall micro-average AUC value is calculated; and the performance of the model is evaluated by the obtained AUC value;
[0034] According to the evaluation results, the Adam optimizer is used to tune the model; the trained decision tree model is used to predict the status of the disabled people to obtain the predicted status of the disabled people.
[0035] Furthermore, the method of comparing the predicted state of the disabled person with the actual state of the disabled person to determine whether there is an error between the two is:
[0036] Compare the predicted status of the disabled person with the actual status of the disabled person. If they match, there is no error between the predicted value and the actual value, and a trained model is obtained;
[0037] The predicted status of the disabled person is compared with the actual status of the disabled person. If they do not match, there is an error between the predicted value and the actual value. The model is further optimized and adjusted, and it is iterated repeatedly until the predicted value matches the actual value, and the iteration is stopped to obtain the final prediction model.
[0038] Furthermore, the method for further optimizing and adjusting the trained model includes:
[0039] The Bayesian optimization method is used to tune the hyperparameters in the security prediction model, prepare a set of initial data training sets, and evaluate the performance indicators of the model under given parameter configuration by calculating the accuracy index; the accuracy calculation formula is: Among them, dk is the number of disabled people’s safety states predicted correctly; zh is the total number of disabled people’s safety states predicted by the model;
[0040] Using the initial data training set, establish the initial Gaussian process probability model between the hyperparameter configuration and the performance indicator; start the iterative optimization process, each iteration includes the following steps:
[0041] S81. Select the next hyperparameter configuration using Gaussian process sampling based on the current probability model;
[0042] S82. Using the selected hyperparameter configuration, calculate the performance index by calculating the accuracy;
[0043] S83. Add new hyperparameter configurations and performance metrics to the data training set;
[0044] S84. Update the probability model, add the new data training set to the model training process to update the mapping relationship between the hyperparameters and the performance;
[0045] S85. Repeat steps S81 to S84 until a predetermined number of iterations is reached;
[0046] After the iterative optimization is completed, the hyperparameter configuration with the best performance index is selected as the final model configuration according to the result of the evaluation function to obtain the trained safety prediction model. The trained safety prediction model is used to predict the comprehensive feature matrix within the current cycle time to obtain the status of the disabled person.
[0047] Furthermore, the method of determining the state of the disabled person, if safe, recording the corresponding state data; otherwise, recording the corresponding state data and generating danger warning information, and notifying relevant personnel in a timely manner is:
[0048] If the result of the determination is that the disabled person is in a safe state, the corresponding safety state data is recorded through the safety monitoring terminal;
[0049] If the result of the determination is that the disabled person is in an unsafe state, a danger warning message will be generated, the corresponding unsafe state data will be recorded, and the danger warning message will be immediately sent to the disabled person, family members and medical staff through the security monitoring terminal, and protective measures will be taken for the disabled person in a timely manner according to the specific circumstances.
[0050] A safety monitoring system for a disabled person, comprising:
[0051] The data collection and processing module collects the safety status data of disabled persons within a period of time, including vital signs data and environmental status data; pre-processes the acquired data to obtain a life feature data set and an environmental feature data set, and fuses the life feature data set and the environmental feature data set to obtain a comprehensive feature matrix;
[0052] Model training and optimization module, builds a safety prediction model, imports the comprehensive feature matrix in the historical cycle time into the safety prediction model for training, and obtains a trained safety prediction model; imports the comprehensive feature matrix in the current cycle time into the trained safety prediction model to predict the status of disabled people;
[0053] The danger warning and communication module records the corresponding safety status data or generates danger warning information according to the determined safety status of the disabled person, and notifies the relevant personnel in time.
[0054] The technical effects and advantages of the present invention's safety supervision method and system for disabled persons are as follows:
[0055] By collecting and analyzing the vital signs data and environmental status data of disabled people over a period of time, a model for predicting safety status is established to distinguish them from people in healthy and sound states, taking into account the particularities of disabled people, so that the safety supervision methods and systems are targeted; through wearable sensors, real-time monitoring of vital signs data and environmental status data is carried out, and the life feature data set and environmental feature data set are integrated to obtain a comprehensive feature matrix, comprehensively considering the potential factors contained in the environmental status and the impact of the health status factors on the safety status of disabled people, so as to improve the accuracy of identifying complex environments and emergency situations;
[0056] The use of security monitoring terminals can realize the storage of real-time data and the update of historical data. In the face of emergencies, it can respond quickly and automatically send danger warning information to the disabled, their families and medical staff. This is conducive to timely detection and warning of potential dangerous situations, reducing the risk and harm of accidents, and realizing intelligent and convenient supervision. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 A schematic flow chart of a safety supervision method for disabled persons according to the present invention;
[0058] Figure 2 The figure is a schematic diagram of the structure of a safety supervision system for disabled persons according to the present invention. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] Example 1
[0061] See also Figure 1 and Figure 2 As shown, this embodiment provides a safety supervision method for disabled persons, including:
[0062] S1. Collecting safety status data of disabled persons within a period of time, wherein the safety status data includes vital sign data and environmental status data; preprocessing the acquired vital sign data and environmental status data to obtain a life feature data set and an environmental feature data set; fusing the life feature data set and the environmental feature data set to obtain a comprehensive feature matrix;
[0063] S2. Construct a safety prediction model, import the comprehensive feature matrix in the historical cycle time into the safety prediction model for training, and obtain a trained safety prediction model; import the comprehensive feature matrix in the current cycle time into the trained safety prediction model to predict the status of the disabled person;
[0064] S3. Determine the status of the disabled person. If it is safe, record the corresponding status data; otherwise, record the corresponding unsafe status data and generate danger warning information to notify relevant personnel in time.
[0065] The vital signs data include blood pressure, blood oxygen, heart rate and body temperature data; the environmental status data include temperature, humidity, light and obstacle data;
[0066] The blood pressure, blood oxygen, heart rate and body temperature data are monitored and acquired through wearable sensors; the wearable sensors include blood pressure sensors, blood oxygen sensors, heart rate sensors and body temperature sensors for monitoring the vital signs of the wearer; the temperature, humidity, light and obstacle data are acquired through ambient temperature sensors, humidity sensors, light sensors and infrared sensors.
[0067] The method of preprocessing the acquired vital sign data and environmental status data to obtain a life characteristic data set and an environmental characteristic data set is:
[0068] Statistical tests were used to identify and eliminate outliers and abnormal values in the vital signs data and environmental status data, mean interpolation was used to replace missing values, and the Z-score standardization method was used to transform the data into a standard normal distribution with a mean of 0 and a standard deviation of 1, thus obtaining the vital signs data set and the environmental characteristics data set.
[0069] The method of fusing the life feature data set and the environmental feature data set to obtain a comprehensive feature matrix includes:
[0070] The comprehensive feature matrix is recorded as Y; the cycle time is discretized to obtain n time points, and the life feature data set and the environmental feature data set are collected at each time point;
[0071] Define the vital signs data vector V L =[BP,SP,HR,TE]; where BP is blood pressure; SP is blood oxygen; HR is heart rate; TE is body temperature; define the environmental state data vector V E =[TF,HU,LG,OB]; where TF is temperature; HU is humidity; LG is light; OB is obstacle data;
[0072] The vital sign data vectors and environmental status data vectors at n time points are vertically spliced to form the original data matrix M; the original data matrix is:
[0073]
[0074] Calculate the covariance matrix C of the original data matrix M, the calculation formula is: Among them, M is the original data matrix, M T is the transpose of the original data matrix M;
[0075] The eigenvalue λ and eigenvector v of the covariance matrix C are calculated by the linalg.eig function in Python to obtain the eigenvalue array λ 1、 λ2…λ8 and an eigenvector matrix [v1 v2…v8], wherein the eigenvectors correspond one to one to the eigenvalues;
[0076] Arrange the eigenvectors v in descending order according to the corresponding eigenvalues λ, and select the eigenvectors corresponding to the first r eigenvalues to form a projection matrix P; the projection matrix P = [v1 v2…v r ]; Use the projection matrix P to reduce the dimension of the original data matrix M to obtain the reduced-dimensional comprehensive feature matrix Y=MP.
[0077] The method of arranging the eigenvectors in descending order according to the corresponding eigenvalues and selecting the eigenvectors corresponding to the first r eigenvalues to form the projection matrix P comprises:
[0078] Arrange the eigenvalues in the acquired eigenvalue array in descending order to obtain λ1, λ2…λ b , where λ b is the bth eigenvalue; construct a kernel density estimation function to select the first r eigenvalues, the kernel density estimation function is: Wherein, r is the number of selected eigenvalues, h is the bandwidth, i is the eigenvalue index to be summed, n″ is the end point of index i, K(u) is the kernel function, and u is the input data of the kernel function; the calculation formula of the kernel function K(u) is: Where π represents the ratio of circumference to circumference, e is the base of the natural logarithm, and the input data of the kernel function is λ c is the cth eigenvalue, λ i is the i-th eigenvalue, h is the bandwidth;
[0079] The local maximum of the kernel density estimation function is determined by calculating the derivative of the kernel density estimation function f(λ), and the density peak is determined according to the local maximum; the density threshold is determined according to the density peak, and the density threshold is: θ=α·max(f(λ)); wherein α is a coefficient less than 1; max(f(λ)) is the density peak of the function f(λ);
[0080] The eigenvalues with density higher than the density threshold are retained, and the eigenvalues with density higher than the density threshold are denoted as λ σ ≥θ,σ∈{1,2,…,r}, where r is the number of eigenvalues retained;
[0081] The bandwidth h in the kernel function is limited by a bandwidth limitation model, and the bandwidth limitation model is: in, is the standard deviation of the eigenvalue after taking the logarithm; N is the total number of eigenvalues λ;
[0082] The upper limit threshold of the preset bandwidth h is h max , the lower limit threshold of bandwidth h is h min ; Select the one located at (h min ,h max ) is substituted into the kernel function to observe the smoothness of the kernel function, and the value that makes the smoothness of the kernel function optimal is selected as the final bandwidth of the kernel function.
[0083] The training method of the safety prediction model is:
[0084] The safety prediction model is a decision tree model, including a root node, internal nodes and leaf nodes; the splitting criterion, the number of trees and the depth hyperparameter are set; the data set is divided into a training set and a test set by a clustering-based segmentation method; the input data of the model is the comprehensive feature matrix Y within the historical period time, and the output label is the state of the disabled person; the predicted state of the disabled person is compared with the actual state of the disabled person to determine whether there is an error between the two; if there is no error, a trained model is obtained, and if an error occurs, the model is optimized and adjusted;
[0085] The logical function is used to convert the classification label into a probability value. The calculation formula is: Where Q(x) is the conversion of x into a probability value Q, which represents the probability of belonging to the positive class, e is the base of the natural logarithm approximately equal to 2.71828, and x is the linear prediction value of the model;
[0086] The linear prediction value x of the model is represented by a linear combination, and the specific calculation formula is: x = β0 + β1X1 + β2X2 + ... + β n X n ; where β0 is the intercept term, β1, β2, ...β n is the weight coefficient corresponding to the feature, X1, X2...X n is the eigenvalue; when x approaches positive infinity, Q(x) approaches 1, indicating that the probability of the positive class is close to 1; when x approaches negative infinity, Q(x) approaches 0, indicating that the probability of the negative class is close to 0; when x = 0, Q(x) = 0.5, indicating that the probabilities of the positive and negative classes are equal.
[0087] Assuming β0=2, β1=1, X1=3, the linear prediction value x=β0+β1X1=2+1·3=5
[0088] Therefore, when the linear prediction value is 5, the probability that the sample is predicted as the positive class is 99.326%.
[0089] The logarithmic loss function is selected to measure the difference between the model prediction result and the true label; the calculation formula of the logarithmic loss function is: Where N′ is the total number of samples, j represents the jth sample, and y j is the true label of the jth sample, q j Predict the probability that the jth sample is a positive class for the model;
[0090] Initialize the decision tree model, set the initial prediction model F0(x), input the training set into the current model to fit the data set, calculate the residual between the predicted value and the true value, and the residual is r0=y0-f0(x); where y0 is the true value and f0(x) is the predicted value; use the residual r0 as the target variable to train a new decision tree model T g (x); Add the newly trained decision tree to the current model with a certain learning rate η, and update the prediction model F g (x) = F g-1 (x)+ηT g (x), where F g (x) is the prediction model obtained after g iterations, F g-1 (x) is the prediction model obtained after g-1 iterations; the residual r is calculated based on the new prediction model. g ; Repeat the above steps until the preset number of iterations is reached and stop training to obtain the final prediction model Where k is the preset number of iterations;
[0091] The trained model is evaluated using the test set, and the performance of the model is evaluated using the AUC-ROC curve. The method for evaluating the performance of the model using the AUC-ROC curve is as follows: first, the ROC curve and AUC value of each category are calculated, and then the overall micro-average AUC value is calculated. The performance of the model is evaluated using the obtained AUC value. The calculation formula is: Micro Average Among them, TPR is the true positive rate, FPR is the false positive rate, H is the total number of categories, AUC ξ is the AUC value of the ξth category, ξ is the index variable for summation;
[0092] Assume that the AUC of class 1 is 0.9, the AUC of class 2 is 0.85, and the AUC of class 3 is 0.95. Indicates that the model has high discrimination ability in all categories;
[0093] According to the evaluation results, the Adam optimizer is used to tune the model to improve the performance of the model; the trained decision tree model is used to predict the status of the disabled people to obtain the predicted status of the disabled people.
[0094] The method of comparing the predicted state of the disabled person with the actual state of the disabled person to determine whether there is an error between the two is:
[0095] The predicted state of the disabled person is compared with the preset state of the disabled person. If they match, there is no error between the predicted value and the preset value.
[0096] The predicted status of the disabled person is compared with the preset status of the disabled person. If they do not match, there is an error between the predicted value and the preset value. The model is further optimized and adjusted, and it is iterated repeatedly until the predicted value matches the preset value, and the iteration is stopped to obtain the final prediction model.
[0097] The method for further optimizing and adjusting the trained model includes:
[0098] The Bayesian optimization method is used to tune the hyperparameters in the security prediction model, prepare a set of initial data training sets, and evaluate the performance indicators of the model under given parameter configuration by calculating the accuracy index; the accuracy calculation formula is: Among them, dk is the number of disabled people’s safety states predicted correctly; zh is the total number of disabled people’s safety states predicted by the model;
[0099] Using the initial data training set, establish the initial Gaussian process probability model between the hyperparameter configuration and the performance indicator; start the iterative optimization process, each iteration includes the following steps:
[0100] S81. Select the next hyperparameter configuration using Gaussian process sampling based on the current probability model;
[0101] S82. Using the selected hyperparameter configuration, calculate the performance index by calculating the accuracy;
[0102] S83. Add new hyperparameter configurations and performance metrics to the data training set;
[0103] S84. Update the probability model, add the new data training set to the model training process to update the mapping relationship between the hyperparameters and the performance;
[0104] S85. Repeat steps S81 to S84 until a predetermined number of iterations is reached;
[0105] After the iterative optimization is completed, the hyperparameter configuration with the best performance index is selected as the final model configuration according to the result of the evaluation function to obtain the trained safety prediction model. The trained safety prediction model is used to predict the comprehensive feature matrix within the current cycle time to obtain the status of the disabled person.
[0106] The method of determining the state of the disabled person, if safe, recording the corresponding state data; otherwise, recording the corresponding state data and generating danger warning information, and notifying relevant personnel in a timely manner is:
[0107] If the result of the determination is that the disabled person is in a safe state, the corresponding safety state data is recorded through the safety monitoring terminal;
[0108] If the result of the determination is that the disabled person is in an unsafe state, a danger warning message will be generated, the corresponding unsafe state data will be recorded, and the danger warning message will be immediately sent to the disabled person, family members and medical staff through the security monitoring terminal, and protective measures will be taken for the disabled person in a timely manner according to the specific circumstances.
[0109] In this embodiment, by collecting and analyzing the vital signs data and environmental status data of disabled persons, a model for predicting safety status is established, and the disabled persons are distinguished from people in healthy and sound states, and the particularity of disabled persons is taken into consideration, so that the safety supervision method and system are targeted; the vital signs data and environmental status data are monitored in real time through wearable sensors, and the life feature data set and the environmental feature data set are integrated to obtain a comprehensive feature matrix, which comprehensively considers the impact of potential factors contained in the environmental status and the health status factors on the safety status of disabled persons, and improves the recognition accuracy of complex environments and emergency situations;
[0110] The use of security monitoring terminals can realize the storage of real-time data and the update of historical data. In the face of emergencies, it can respond quickly and automatically send danger warning information to the disabled, their families and medical staff. This is conducive to timely detection and warning of potential dangerous situations, reducing the risk and harm of accidents, and realizing intelligent and convenient supervision.
[0111] Example 2
[0112] See also Figure 1 As shown, this embodiment provides a safety monitoring system for disabled persons, including:
[0113] The data collection and processing module collects the safety status data of disabled persons within a period of time, including vital signs data and environmental status data; pre-processes the acquired data to obtain a life feature data set and an environmental feature data set, and fuses the life feature data set and the environmental feature data set to obtain a comprehensive feature matrix;
[0114] Model training and optimization module, builds a safety prediction model, imports the comprehensive feature matrix in the historical cycle time into the safety prediction model for training, and obtains a trained safety prediction model; imports the comprehensive feature matrix in the current cycle time into the trained safety prediction model to predict the status of disabled people;
[0115] The danger warning and communication module records the corresponding safety status data or generates danger warning information according to the determined safety status of the disabled person, and notifies the relevant personnel in time.
[0116] Since the electronic device introduced in this embodiment is an electronic device used to implement a safety supervision method and system for disabled persons in the embodiment of this application, based on the safety supervision method and system for disabled persons introduced in the embodiment of this application, a person skilled in the art can understand the specific implementation of the electronic device of this embodiment and its various variations, so how the electronic device implements the method in the embodiment of this application is not described in detail here. As long as a person skilled in the art implements the electronic device used in the safety supervision method and system for disabled persons in the embodiment of this application, it belongs to the scope of protection of this application.
[0117] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.
[0118] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technical users in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A safety supervision method for disabled persons, characterized in that: include: S1. Collecting safety status data of disabled persons within a period of time, wherein the safety status data includes vital sign data and environmental status data; preprocessing the acquired vital sign data and environmental status data to obtain a life feature data set and an environmental feature data set; fusing the life feature data set and the environmental feature data set to obtain a comprehensive feature matrix; S2. Construct a safety prediction model, import the comprehensive feature matrix in the historical cycle time into the safety prediction model for training, and obtain a trained safety prediction model; import the comprehensive feature matrix in the current cycle time into the trained safety prediction model to predict the status of the disabled person; S3. Determine the status of the disabled person. If it is safe, record the corresponding status data; otherwise, record the corresponding unsafe status data and generate danger warning information to notify relevant personnel in time.
2. A safety supervision method for disabled persons according to claim 1, characterized in that: The vital signs data include blood pressure, blood oxygen, heart rate and body temperature data; the environmental status data include temperature, humidity, light and obstacle data; The blood pressure, blood oxygen, heart rate and body temperature data are monitored and acquired through wearable sensors; the wearable sensors include blood pressure sensors, blood oxygen sensors, heart rate sensors and body temperature sensors for monitoring the vital signs of the wearer; the temperature, humidity, light and obstacle data are acquired through ambient temperature sensors, humidity sensors, light sensors and infrared sensors.
3. A safety supervision method for disabled persons according to claim 2, characterized in that: The method of preprocessing the acquired vital sign data and environmental status data to obtain a life characteristic data set and an environmental characteristic data set is: Statistical tests were used to identify and eliminate outliers and abnormal values in the vital signs data and environmental status data, mean interpolation was used to replace missing values, and the Z-score standardization method was used to transform the data into a standard normal distribution with a mean of 0 and a standard deviation of 1, thus obtaining the vital signs data set and the environmental characteristics data set.
4. A safety supervision method for disabled persons according to claim 3, characterized in that: The method of fusing the life feature data set and the environmental feature data set to obtain a comprehensive feature matrix includes: The comprehensive feature matrix is recorded as Y; the cycle time is discretized to obtain n time points, and the life feature data set and the environmental feature data set are collected at each time point; Define the vital signs data vector V L =[BP,SP,HR,TE]; where BP is blood pressure; SP is blood oxygen; HR is heart rate; TE is body temperature; define the environmental state data vector V E =[TF,HU,LG,OB]; where TF is temperature; HU is humidity; LG is light; OB is obstacle data; The vital sign data vectors and environmental status data vectors at n time points are vertically spliced to form the original data matrix M; the original data matrix is: Calculate the covariance matrix C of the original data matrix M, the calculation formula is: Among them, M is the original data matrix, M T is the transpose of the original data matrix M; The eigenvalues λ and eigenvectors v of the covariance matrix C are calculated by the linalg.eig function in Python to obtain eigenvalue arrays λ1, λ2…λ8 and eigenvector matrices [v1 v2…v8], where the eigenvectors correspond one to one to the eigenvalues; Arrange the eigenvectors in descending order according to the corresponding eigenvalues, and select the eigenvectors corresponding to the first r eigenvalues to form a projection matrix P; the projection matrix P = [v1 v2 … v r ]; Use the projection matrix P to reduce the dimension of the original data matrix M to obtain the reduced-dimensional comprehensive feature matrix Y=MP.
5. A safety supervision method for disabled persons according to claim 4, characterized in that: The method of arranging the eigenvectors v in descending order according to the corresponding eigenvalues λ and selecting the eigenvectors corresponding to the first r eigenvalues to form the projection matrix P comprises: Arrange the eigenvalues in the acquired eigenvalue array in descending order to obtain λ1, λ2…λ b , where λ b is the bth eigenvalue; construct a kernel density estimation function to select the first r eigenvalues, the kernel density estimation function is: Wherein, r is the number of selected eigenvalues, h is the bandwidth, i is the eigenvalue index to be summed, n″ is the end point of index i, K(u) is the kernel function, and u is the input data of the kernel function; the calculation formula of the kernel function K(u) is: Where π represents the ratio of circumference to circumference, e is the base of the natural logarithm, and the input data of the kernel function is λ c is the cth eigenvalue, λ i is the i-th eigenvalue, h is the bandwidth; The local maximum of the kernel density estimation function is determined by calculating the derivative of the kernel density estimation function f(λ), and the density peak is determined according to the local maximum; the density threshold is determined according to the density peak, and the density threshold is: θ=α·max(f(λ)); wherein α is a coefficient less than 1; max(f(λ)) is the density peak of the function f(λ); The eigenvalues with density higher than the density threshold are retained, and the eigenvalues with density higher than the density threshold are denoted as λ σ ≥θ,σ∈{1,2,…,r}, where r is the number of eigenvalues retained; The bandwidth h in the kernel function is limited by a bandwidth limitation model, and the bandwidth limitation model is: in, is the standard deviation of the eigenvalue after taking the logarithm; N is the total number of eigenvalues λ; The upper limit threshold of the preset bandwidth h is h max , the lower limit threshold of bandwidth h is h min ; Select the one located at (h min ,h max ) is substituted into the kernel function to observe the smoothness of the kernel function, and the value that makes the smoothness of the kernel function reach the best is selected as the final bandwidth of the kernel function.
6. A safety supervision method for disabled persons according to claim 5, characterized in that: The training method of the safety prediction model is: The safety prediction model is a decision tree model, including a root node, internal nodes and leaf nodes; the number and depth hyperparameters of the tree are set; a clustering-based segmentation method is used to divide the data set into a training set and a test set; the input data of the model is a comprehensive feature matrix Y within a historical period, and the output label is the state of the disabled person; the predicted state of the disabled person is compared with the actual state of the disabled person to determine whether there is an error between the two; if there is no error, a trained model is obtained; if an error occurs, the model is optimized and adjusted; A logical function is used to convert the classification label into a probability value, and a logarithmic loss function is selected to measure the difference between the model prediction result and the true label; the calculation formula of the logarithmic loss function is: Where N′ is the total number of samples, j represents the jth sample, and y j is the true label of the jth sample, q j Predict the probability that the jth sample is a positive class for the model; Initialize the decision tree model, set the initial prediction model F0(x), input the training set into the current model to fit the data set, calculate the residual between the predicted value and the true value, and the residual is r0=y0-f0(x); where y0 is the true value and f0(x) is the predicted value; use the residual r0 as the target variable to train a new decision tree model T g (x); Add the newly trained decision tree to the current model with a certain learning rate η, and update the prediction model F g (x) = F g-1 (x)+ηT g (x), where F g (x) is the prediction model obtained after g iterations, F g-1 (x) is the prediction model obtained after g-1 iterations; the residual r is calculated based on the new prediction model. g ; Repeat the above steps until the preset number of iterations is reached and stop training to obtain the final prediction model Where k is the preset number of iterations; The trained model is evaluated using the test set, and the performance of the model is evaluated using the AUC-ROC curve; the method of evaluating the performance of the model using the AUC-ROC curve is as follows: firstly, the ROC curve and AUC value of each category are calculated, and then the overall micro-average AUC value is calculated; and the performance of the model is evaluated by the obtained AUC value; According to the evaluation results, the Adam optimizer is used to tune the model; the trained decision tree model is used to predict the status of the disabled people to obtain the predicted status of the disabled people.
7. A safety supervision method for disabled persons according to claim 6, characterized in that: The method of comparing the predicted state of the disabled person with the actual state of the disabled person to determine whether there is an error between the two is: Compare the predicted status of the disabled person with the actual status of the disabled person. If they match, there is no error between the predicted value and the actual value, and a trained model is obtained; The predicted status of the disabled person is compared with the actual status of the disabled person. If they do not match, there is an error between the predicted value and the actual value. The model is further optimized and adjusted, and it is iterated repeatedly until the predicted value matches the actual value, and the iteration is stopped to obtain the final prediction model.
8. A safety supervision method for disabled persons according to claim 7, characterized in that: The method for further optimizing and adjusting the trained model includes: The Bayesian optimization method is used to tune the hyperparameters in the security prediction model, prepare a set of initial data training sets, and evaluate the performance indicators of the model under given parameter configuration by calculating the accuracy index; the accuracy calculation formula is: Among them, dk is the number of disabled people’s safety states predicted correctly; zh is the total number of disabled people’s safety states predicted by the model; Using the initial data training set, establish the initial Gaussian process probability model between the hyperparameter configuration and the performance indicator; start the iterative optimization process, each iteration includes the following steps: S81. Select the next hyperparameter configuration using Gaussian process sampling based on the current probability model; S82. Using the selected hyperparameter configuration, calculate the performance index by calculating the accuracy; S83. Add new hyperparameter configurations and performance metrics to the data training set; S84. Update the probability model, add the new data training set to the model training process to update the mapping relationship between the hyperparameters and the performance; S85. Repeat steps S81 to S84 until a predetermined number of iterations is reached; After the iterative optimization is completed, the hyperparameter configuration with the best performance index is selected as the final model configuration according to the result of the evaluation function to obtain the trained safety prediction model. The trained safety prediction model is used to predict the comprehensive feature matrix within the current cycle time to obtain the status of the disabled person.
9. A safety supervision method for disabled persons according to claim 8, characterized in that: The method of determining the state of the disabled person, if safe, recording the corresponding state data; otherwise, recording the corresponding state data and generating danger warning information, and notifying relevant personnel in a timely manner is: If the result of the determination is that the disabled person is in a safe state, the corresponding safety state data is recorded through the safety monitoring terminal; If the result of the determination is that the disabled person is in an unsafe state, a danger warning message will be generated, the corresponding unsafe state data will be recorded, and the danger warning message will be immediately sent to the disabled person, family members and medical staff through the security monitoring terminal, and protective measures will be taken for the disabled person in a timely manner according to the specific circumstances.
10. A safety supervision system for disabled persons, used to implement a safety supervision method for disabled persons according to any one of claims 1 to 9, characterized in that: include: The data collection and processing module collects the safety status data of disabled persons within a period of time, including vital signs data and environmental status data; pre-processes the acquired data to obtain a life feature data set and an environmental feature data set, and fuses the life feature data set and the environmental feature data set to obtain a comprehensive feature matrix; Model training and optimization module, builds a safety prediction model, imports the comprehensive feature matrix in the historical cycle time into the safety prediction model for training, and obtains a trained safety prediction model; imports the comprehensive feature matrix in the current cycle time into the trained safety prediction model to predict the status of disabled people; The danger warning and communication module records the corresponding safety status data or generates danger warning information according to the determined safety status of the disabled person, and notifies the relevant personnel in time.
