A fall detection method, device, electronic device and storage medium
By analyzing and processing the acceleration data of high-altitude workers, an acceleration characteristic data set is formed, and a pre-trained target detection model is used for judgment, the accuracy and speed problems of high-altitude fall accident detection are solved, and the rapid and accurate detection of high-altitude targets is achieved.
Patent Information
- Application Number
- CN202311741975.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-18
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2043-12-18
AI Technical Summary
In the construction industry, especially during tower assembly and ground wire frame facilities, falling accidents occur frequently at high places, resulting in the inability to accurately and quickly detect the fall status of high places workers.
By obtaining the acceleration data of the target to be detected, determining the acceleration values of the axes of different directions, calculating the amplitude change sum of the acceleration, amplitude change rate, aggregation change rate of the combined acceleration, and aggregation change displacement, forming an acceleration characteristic data set, and inputting it into the pre-trained target detection model to determine whether the motion state of the target to be detected is falling.
It realizes rapid and accurate detection of high-altitude targets, and can judge in real time whether the target to be detected has fallen. The detection results are accurate and fast, which can effectively prevent and reduce falling accidents at high places.
Smart Images

Figure CN117556333B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to a fall detection method, device, electronic equipment and storage medium. Background Art
[0002] According to statistics, among the "three major injuries" (falling from heights, collapse, and being hit by objects) in the construction industry, falling from heights has the highest incidence and is extremely dangerous. Therefore, reducing and avoiding the occurrence of falling from heights is an effective way to ensure safe production. However, during the construction of towers and ground wire installations, due to tight construction cycles, scattered work sites, shortage of management personnel, and single monitoring methods, safety accidents from falling from heights occur from time to time, posing a serious threat to the safety of life and property of the people, and also causing adverse effects on the stable development of a harmonious society. Therefore, how to quickly and accurately detect whether a target has fallen from a height has become a problem to be solved. Summary of the invention
[0003] The present invention provides a fall detection method, device, electronic equipment and storage medium to solve the problem that it is impossible to accurately and quickly detect a fall of a worker at a height.
[0004] According to one aspect of the present invention, there is provided a method for detecting a fall, comprising:
[0005] Acquire acceleration data of the target to be detected, and determine acceleration values corresponding to axes in different directions according to the acceleration data;
[0006] Determine the acceleration amplitude change and the acceleration amplitude change rate, the combined acceleration cumulative change rate and the combined acceleration change displacement according to each of the acceleration values, and form an acceleration feature data set;
[0007] The acceleration feature data set is input into a pre-trained target detection model, and whether the motion state of the target to be detected is falling is determined according to the output result of the target detection model.
[0008] According to another aspect of the present invention, there is provided a fall detection device, comprising:
[0009] An acceleration acquisition module is used to acquire acceleration data of the target to be detected, and determine acceleration values corresponding to axes in different directions according to the acceleration data;
[0010] A characteristic data determination module is used to determine the acceleration amplitude change and the acceleration amplitude change rate, the total acceleration cumulative change rate and the total acceleration change displacement according to each of the acceleration values, and form an acceleration characteristic data set;
[0011] The detection module is used to input the acceleration feature data set into a pre-trained target detection model, and determine whether the motion state of the target to be detected is falling according to the output result of the target detection model.
[0012] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0013] At least one sensor, used to collect acceleration data of the target to be detected;
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the fall detection method described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the fall detection method described in any embodiment of the present invention when executed.
[0018] The technical solution of the embodiment of the present invention obtains the acceleration data of the target to be detected, and determines the acceleration values corresponding to the axes of different directions according to the acceleration data; determines the amplitude change of the acceleration, the amplitude change rate of the acceleration, the cumulative change rate of the combined acceleration, and the combined acceleration change displacement according to each of the acceleration values, and forms an acceleration feature data set; inputs the acceleration feature data set into a pre-trained target detection model, and determines whether the motion state of the target to be detected is falling according to the output result of the target detection model, thereby solving the problem that it is impossible to accurately and quickly detect the fall of high-altitude targets, and determines by analyzing the acceleration data of the target to be detected. The acceleration values on each direction axis are calculated based on the acceleration values to obtain the acceleration amplitude change and the amplitude change rate, the cumulative change rate of the total acceleration and the total acceleration change displacement, and form an acceleration feature data set. The target detection model is pre-trained, and the trained target detection model predicts the acceleration feature data set to determine whether the motion state of the target to be detected is falling. By processing the acceleration values, an acceleration feature data set that can indicate the motion characteristics is obtained, and then the motion state is detected in combination with the target detection model, which can effectively detect whether the target to be detected has fallen. The detection result is accurate, and the detection speed is fast, and real-time detection can be performed.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 is a flow chart of a fall detection method provided according to Embodiment 1 of the present invention;
[0022] Figure 2 is a flow chart of a fall detection method provided according to Embodiment 2 of the present invention;
[0023] Figure 3 is a flowchart of building a target detection model according to the second embodiment of the present invention;
[0024] Figure 4 is a schematic diagram of the structure of a sending end provided according to Embodiment 2 of the present invention;
[0025] Figure 5 is a structural diagram of a receiving end provided according to Embodiment 2 of the present invention;
[0026] Figure 6 is a structural schematic diagram of a fall detection device provided according to Embodiment 3 of the present invention;
[0027] Figure 7 It is a schematic diagram of the structure of an electronic device for implementing the fall detection method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme 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. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] Embodiment 1
[0031] Figure 1 This is a flow chart of a fall detection method provided in Embodiment 1 of the present invention. This embodiment is applicable to the case of detecting whether a target has fallen. The method can be executed by a fall detection device. The fall detection device can be implemented in the form of hardware and / or software. The fall detection device can be configured in an electronic device. Figure 1 As shown, the method includes:
[0032] S101, acquiring acceleration data of a target to be detected, and determining acceleration values corresponding to axes in different directions according to the acceleration data.
[0033] In this embodiment, the target to be detected can be specifically understood as a target with fall detection requirements, which can be a person working at high altitudes, or an object in the air, etc.; the acceleration data can be specifically understood as data including relevant information about acceleration, which can be signal data; the acceleration value is the specific numerical value corresponding to the acceleration.
[0034] Acceleration data can be collected by sensors, which can be set on the target to be detected to detect the acceleration data of the target to be detected in real time. The sensor can work at a certain frequency to periodically detect the acceleration data corresponding to the target to be detected; or, after the triggering conditions of the sensor are met, the sensor is triggered to detect the acceleration data corresponding to the target to be detected; in order to ensure the real-time detection of the acceleration data of the target to be detected and the accuracy of the detection, it is preferred to adopt a periodic detection method.
[0035] The acceleration data of the target to be detected collected by the sensor is acquired in real time. When the target in space moves, it usually changes in multiple directions. Therefore, the acceleration data includes relevant information about the acceleration of different directional axes, such as the directional axes of x, y, and z. The acceleration data is analyzed and processed to remove impurities, noise and other interference in the data, determine the relevant data of the acceleration corresponding to each directional axis, extract the data, and obtain the acceleration value corresponding to each directional axis.
[0036] S102. Determine the acceleration amplitude change and the acceleration amplitude change rate, the total acceleration cumulative change rate, and the total acceleration change displacement according to each acceleration value, and form an acceleration feature data set.
[0037] In this embodiment, the amplitude change sum of acceleration can be specifically understood as the sum of the amplitude changes of acceleration within a certain period of time; the amplitude change rate of acceleration can be understood as the rate of change of the amplitude of acceleration within a certain period of time; the cumulative change rate of combined acceleration can be specifically understood as the rate of change of the combined acceleration within a certain period of time; and the combined acceleration change displacement can be specifically understood as the displacement of the movement under the action of the combined acceleration. The amplitude change sum of acceleration, the amplitude change rate of acceleration, the cumulative change rate of combined acceleration, and the combined acceleration change displacement are used as characteristic data of acceleration to represent and describe the motion state.
[0038] According to the acceleration value on each directional axis, the calculation method of different characteristic values of acceleration is used to calculate the acceleration amplitude change sum, the acceleration amplitude change rate, the total acceleration cumulative change rate and the total acceleration change displacement are obtained respectively. For example, the amplitude change of each acceleration within a period of time or at a time point is calculated, and the amplitude change of each amplitude change is summed, weighted summed, etc., to obtain the amplitude change sum of the acceleration; correspondingly, the amplitude change rate of the acceleration is divided by the time interval or unit time of a period of time on the basis of the amplitude change sum of the acceleration to obtain the amplitude change rate. The total acceleration cumulative change rate can be calculated by calculating the total acceleration and then dividing it by the time interval. The total acceleration change displacement can be calculated by calculating the displacement of each directional axis separately, and then summing, weighted summing, etc., to obtain the total acceleration change displacement, or calculating the total acceleration according to each acceleration value, and calculating the displacement according to the total acceleration to obtain the total acceleration change displacement. The obtained acceleration amplitude change sum, acceleration amplitude change rate, combined acceleration cumulative change rate and combined acceleration change displacement are placed into a data set to form an acceleration feature data set.
[0039] S103: input the acceleration feature data set into a pre-trained target detection model, and determine whether the motion state of the target to be detected is falling according to the output result of the target detection model.
[0040] In this embodiment, the target detection model can be specifically understood as a pre-trained neural network model for detecting the motion state of the target. The embodiment of the present application does not limit the type of the target detection model, for example, support vector machine SVM, CART decision tree, etc. The motion state refers to what kind of motion the target is currently performing, for example, falling, stationary, rising, falling, etc. The present application detects the falling of the target, so the motion state can only include two types, that is, the motion state includes falling and non-falling.
[0041] Collect data in advance and process the data to form training samples. Divide the training samples into training sets and test sets. Train the model with the training set and test the model with the test set. The model with accuracy that meets certain requirements can be used as a target detection model for fall detection. The amplitude change of acceleration, the amplitude change rate of acceleration, the cumulative change rate of combined acceleration, and the combined acceleration change displacement in the acceleration feature data set are input into the trained target detection model. The target detection model analyzes and processes the input data based on the experience learned during the training process and the model parameters, and outputs the predicted results. According to the output results, it is determined whether the motion state of the target to be detected is falling. For example, the output result is a numerical value, 1 represents falling; 0 represents non-falling. The output numerical value can be used to determine whether the target to be detected is in a falling state.
[0042] The embodiment of the present application realizes the detection of the motion state of the target to be detected by analyzing the acceleration data of the target to be detected. When it is detected that the motion state of the target to be detected is falling, corresponding measures can also be initiated to rescue the target to be detected.
[0043] The fall detection method provided by the embodiment of the present invention solves the problem that it is impossible to accurately and quickly perform fall detection on high-altitude targets. By analyzing the acceleration data of the target to be detected, the acceleration values on each direction axis are determined, and then calculations are performed based on the acceleration values to obtain the amplitude change of the acceleration and the amplitude change rate, the cumulative change rate of the combined acceleration, and the combined acceleration change displacement, accurately reflecting the acceleration change trend of the target during the fall from a height, and forming an acceleration feature data set, pre-training a target detection model, and predicting the acceleration feature data set with the trained target detection model, and then determining whether the motion state of the target to be detected is falling. By processing the acceleration value, an acceleration feature data set that can indicate the motion characteristics is obtained, and then the motion state is detected in combination with the target detection model, so as to effectively detect whether the target to be detected has fallen. The detection result is accurate, and the detection speed is fast, and the detection can be performed in real time.
[0044] Embodiment 2
[0045] Figure 2This is a flow chart of a fall detection method provided in Embodiment 2 of the present invention. This embodiment is refined on the basis of the above embodiment. Figure 2 As shown, the method includes:
[0046] S201, obtaining acceleration data of a target to be detected.
[0047] S202: Determine acceleration signals corresponding to axes in different directions according to the acceleration data.
[0048] A sensor is set on the target to be detected to collect acceleration data, which includes accelerations of different directional axes. The embodiment of this application takes three-axis acceleration as an example to illustrate the detection process. The acceleration data is processed to separate the acceleration signals of different directional axes to obtain the acceleration signal corresponding to each directional axis.
[0049] S203 . For the acceleration signal corresponding to each direction axis, perform Hilbert transform on the acceleration signal, determine the envelope value of the acceleration signal, and determine the envelope value of the acceleration signal as the acceleration value.
[0050] Since there is noise in the acceleration signal, which affects the accuracy of the data, the present application performs a Hilbert transform on the acceleration signal corresponding to each directional axis, obtains the envelope value of the acceleration signal by calculation, and determines the envelope value of the acceleration signal as the acceleration value.
[0051] Exemplarily, the present application embodiment provides a method for calculating an envelope value, as shown below:
[0052] Hilbert transform of signal x(t) The calculation process is:
[0053]
[0054] Where * is the convolution symbol, and the analytical signal w(t) of the signal x(t) is:
[0055]
[0056] From this we can get the envelope value A(t) of the signal x(t):
[0057]
[0058] The embodiment of the present application implements data filtering and noise reduction by performing Hilport transformation on acceleration data, thereby highlighting the high-frequency components in the signal, thereby extracting the rapidly changing parts in the signal and improving the accuracy of the feature data.
[0059] S204 . For each acceleration value, perform an integration operation according to the absolute value of the acceleration value and a preset acquisition period to obtain an amplitude change of the acceleration value.
[0060] In this embodiment, the acquisition period is the period during which the sensor acquires acceleration data. The sensor periodically acquires acceleration data according to the time interval of the acquisition period to achieve real-time detection of the target to be detected. The acquisition period can be set according to the activity frequency of the target. Since acceleration has a direction, its direction is related to the setting of the coordinate axis, but does not affect the movement speed, displacement size, etc. For each acceleration value, the absolute value of the acceleration value is determined, the upper and lower limits of the integral are determined according to the acquisition period, the absolute value of the acceleration value is integrated with time, and the integral result is determined as the amplitude change of the acceleration value.
[0061] S205. Determine the sum of the amplitude changes of the acceleration values as the sum of the amplitude changes of the acceleration.
[0062] The amplitude changes of the acceleration values are summed up, and the obtained sum is determined as the amplitude change sum of the acceleration.
[0063] Illustratively, an embodiment of the present application provides a calculation formula for the change in the amplitude of acceleration, and the relevant calculation formulas provided in the embodiment of the present application all take the three-axis acceleration value as an example.
[0064]
[0065] Among them, RS is the amplitude change of acceleration, T is the acquisition period, a x is the acceleration value in the x-axis direction, a y is the acceleration value in the y-axis direction, a z is the acceleration value in the z-axis direction.
[0066] The present application calculates the sum of the amplitude changes of the acceleration of each directional axis to obtain the amplitude change of the acceleration and uses it as the characteristic data of the acceleration. Compared with the prior art method of vector synthesis or distance calculation, the present application directly adds the amplitude changes of each acceleration, which can effectively amplify the difference between the acceleration at this moment and the acceleration of normal movement.
[0067] Exemplarily, the embodiment of the present application provides a method for setting the acquisition cycle. When the acceleration data is collected, according to the Nyquist theorem, in order to be able to restore the information contained in the collected signal without distortion, the sampling frequency must be twice the highest frequency of the collected signal. The frequency of most human activities is less than or equal to 20Hz, and only a few human activities have a frequency of more than 15Hz. When the human body is in a relatively static state, the frequency of the limbs is further reduced, less than or equal to 10Hz, and only 2% of the frequencies in daily activities exceed 10Hz. When the target to be detected is working at a high altitude, considering the small activity space, the MPU6050 sensor can be used to obtain three-axis acceleration data. Through the acceleration data collected in three directions, the acceleration changes of the limbs in different directions can be observed. The sampling rate of the sensor is 50Hz, that is, the acceleration values of the x-axis, y-axis and z-axis are recorded every 0.02 seconds. Draw a graph of acceleration over time, with the horizontal axis as time and the vertical axis as an image of the acceleration value. By observing the fluctuation of the image, the movement state of the human body in different time periods can be preliminarily judged. For example, during normal walking or exercise, a relatively regular waveform can be observed, with acceleration fluctuating within a certain range; during running or other intense exercise, the amplitude and frequency of acceleration fluctuations may be greater. When the human body is at rest, the acceleration fluctuation is relatively small and basically remains at a low level.
[0068] S206 , dividing the acceleration amplitude change sum by the acquisition period to obtain the acceleration amplitude change rate.
[0069] Exemplarily, the present application embodiment provides a calculation formula for the rate of change of the amplitude of acceleration, taking the three-axis acceleration value as an example:
[0070]
[0071] Where RST is the rate of change of the acceleration amplitude.
[0072] S207, calculating the sum of the squares of each acceleration value, and taking the square root of the sum of the squares to obtain a square root.
[0073] S208, performing an integration operation according to the square root and a preset acquisition period, dividing the integration result by the acquisition period, and obtaining a cumulative change rate of the total acceleration.
[0074] Calculate the square of the acceleration value, then sum it up to get the square sum, take the square root of the square sum, and get the square root. The square root is the magnitude of the total acceleration. Determine the upper and lower limits of the integration based on the acquisition cycle, integrate the square root over time, and determine the integration result as the cumulative rate of change of the total acceleration value.
[0075] Exemplarily, the present application embodiment provides a calculation formula for the cumulative rate of change of the combined acceleration:
[0076]
[0077] Wherein, ACC is the cumulative rate of change of total acceleration.
[0078] S209: For each acceleration value, perform an integration operation according to the absolute value of the acceleration value and a preset acquisition period to obtain a velocity value.
[0079] According to the acceleration value of each axis, the corresponding velocity value is calculated. For each acceleration value, the upper and lower limits of the integration are determined according to the acquisition period, and the velocity value is obtained by performing an integration operation over time according to the absolute value of the acceleration value.
[0080] Exemplarily, the present application embodiment provides a calculation formula for the speed value:
[0081]
[0082]
[0083]
[0084] Among them, V x is the velocity value in the x-axis direction; V y is the velocity value in the y-axis direction; V z is the velocity value in the z-axis direction.
[0085] S210, performing an integral operation according to the absolute value of the velocity value and the acquisition period to obtain a change displacement.
[0086] The upper and lower limits of integration are determined according to the acquisition period, and the integral operation is performed over time according to the absolute value of the velocity value to obtain the change displacement.
[0087] S211. Determine the sum of the change displacements as the total acceleration change displacement.
[0088] The sum of each change displacement is the value obtained by the total acceleration change displacement.
[0089] Exemplarily, the present application embodiment provides a calculation formula for the change displacement:
[0090]
[0091] Where S is the displacement of the total acceleration change.
[0092] The embodiment of the present application calculates the sum of the displacements of each directional axis to obtain the change in displacement of the combined acceleration as the characteristic data of the acceleration. Compared with the prior art method of vector synthesis or distance calculation, the present application directly adds the displacements of each directional axis, which can effectively amplify the difference between the acceleration at this moment and the acceleration of normal movement.
[0093] It should be noted that there is no strict order in the implementation of determining the amplitude change sum of acceleration, the cumulative change rate of the combined acceleration, and the combined acceleration change displacement. The amplitude change rate of acceleration is determined after the amplitude change sum of acceleration is determined. In the embodiment of the present application, the parallel execution of the amplitude change sum of acceleration, the cumulative change rate of the combined acceleration, and the combined acceleration change displacement is taken as an example.
[0094] S212: Form an acceleration feature data set.
[0095] S213: Input the acceleration feature data set into a pre-trained target detection model, and determine whether the motion state of the target to be detected is falling according to the output result of the target detection model.
[0096] As an optional embodiment of this embodiment, this optional embodiment further optimizes the step of determining the target detection model, including:
[0097] A1. Obtain a training sample set including at least one training sample, where the training sample includes a training feature data set and a label value.
[0098] In this embodiment, the training sample set can be specifically understood as a set of training samples. To ensure the accuracy of the model, the training sample set usually includes a large number of training samples. The training feature data set can be specifically understood as a set of acceleration features used to train the model. Each training feature data set includes the amplitude change and acceleration, the amplitude change rate of acceleration, the cumulative change rate of combined acceleration, and the combined acceleration change displacement. It is usually the acceleration data of the target under different motion states. The acceleration data obtained at this time is also the acceleration data at different times. The acceleration data is processed in the above manner to obtain the corresponding amplitude change and acceleration, the amplitude change rate of acceleration, the cumulative change rate of combined acceleration, and the combined acceleration change displacement. The label value is used to represent the motion state corresponding to the training feature data set. For example, 1 represents falling and 0 represents non-falling.
[0099] A2. Train the initial detection model according to each training sample to obtain a target detection model whose recognition accuracy meets the accuracy requirements.
[0100] Among them, the initial detection model is a support vector machine model, and the kernel function of the support vector machine model is a Gaussian kernel function.
[0101] In this embodiment, the initial detection model can be specifically understood as the initial model constructed during training; the accuracy requirement can be that the accuracy exceeds a certain threshold, for example, the accuracy exceeds 95%.
[0102] Construct an initial detection model, which is a support vector machine model, and its kernel function is a Gaussian kernel function. During training, the training samples can be divided into a training set and a test set. The initial detection model is trained with the training set, and the training feature data set is input into the initial detection model for prediction to obtain the prediction result. The loss function is calculated based on the prediction result and the label value. The initial detection model is back-propagated based on the loss function, and the model parameters are adjusted. The new training feature data set is input and repeated prediction is performed until a model that meets the convergence condition is obtained. The obtained model is tested with the test set to determine the prediction result of each set of training feature data sets, and the prediction result is compared with the label value. If they are consistent, the prediction result is determined to be correct. Otherwise, the prediction result is wrong. The correct proportion of the prediction result is counted to obtain the recognition accuracy. Determine whether the recognition accuracy of the model meets the accuracy requirements. If the recognition accuracy meets the accuracy requirements, the model obtained at this time is determined as the target detection model. Otherwise, continue to train the model until a target detection model that meets the accuracy requirements is obtained.
[0103] Support vector machine (SVM) is used as a supervised learning algorithm to build an intelligent detection model for falls from heights. SVM is a binary classification machine learning method that classifies data by constructing a hyperplane. SVM is used to classify feature data to determine whether a fall from height has occurred. First, the collected feature data needs to be divided into two parts, namely training data and test data. The training data is used to build a classifier, while the test data is used to evaluate the performance of the classifier. By dividing the data into training data and test data, the accuracy and reliability of the results of the evaluation classifier are ensured. The Gaussian kernel function is selected as the kernel function of the SVM classifier. The Gaussian kernel function is a commonly used kernel function with good nonlinear characteristics. By using the Gaussian kernel function, the complex relationship between feature data can be better processed, thereby improving the accuracy and generalization ability of the classifier. Use training data to train the classifier. During the training process, the classifier will learn the patterns and rules of the feature data and form a classification model, which can be used as a target detection model to predict the motion state of a target at a certain moment. Finally, the test data is used to evaluate the performance of the classifier. The accuracy of the classifier is calculated by comparing the difference between the classifier's predictions on the test data and the actual results.
[0104] Exemplarily, the present application embodiment provides a method for determining a target detection model, and the specific implementation method is as follows:
[0105] The training samples are divided into training set and test set. The train_test_split function in the scikit-learn library can be used to complete the division. When dividing, a certain division ratio can be set according to the actual situation and accuracy requirements. For example, the division ratio is 80% of the data for training and 20% of the data for testing. Each feature data in the training feature data set can be represented in the form of a matrix, that is, a feature matrix X with one row and four columns, and the label value is the target variable y. The train_test_split function divides the feature matrix X and the target variable y into four parts: X_train, X_test, y_train, and y_test. X_train and y_train are the feature matrices and target variables of the training set, and X_test and y_test are the feature matrices and target variables of the test set. test_size=0.2 is used to specify that the test set accounts for 20% of the total data set, and random_state=42 is used to set the random seed to ensure that the same division results are obtained each time the code is run.
[0106] Create an SVM model (i.e., the initial detection model) and specify the use of the Gaussian kernel function (Radial basis function, RBF) as the kernel function. In scikit-learn, the class of the SVM model is SVC, and you can choose to use the RBF kernel function by setting kernel = 'rbf'. svm = SVC (kernel = 'rbf'). The RBF kernel function can map the input space to a high-dimensional feature space, allowing the SVM to handle nonlinear problems. It maps low-dimensional data to a high-dimensional space by introducing nonlinear transformations, making it easier to separate data in high-dimensional space. The RBF kernel function implements global optimization in the SVM because it takes the entire training data set into account. It determines the optimal decision boundary by maximizing the classification interval, thereby improving the generalization performance of the model. Then, the SVM model is trained using the feature matrix X_train of the training set and the target variable y_train. svm.fit (X_train, y_train) By calling the model's fit function, the model will be trained by maximizing the classification interval. After the training is completed, the trained model can be used for prediction. Pass the feature matrix X_test of the test set as a parameter to the predict function, y_pred = svm.predict(X_test) to get the prediction result of the test data. Finally, pass the target variable y_test of the test set and the prediction result y_pred as parameters, use the accuracy_score function to calculate the prediction accuracy, accuracy = accuracy_score(y_test,y_pred) to get the prediction result.
[0107] The final algorithm program was obtained through experimental model parameter adjustment and actual data training. The accuracy of the model is as high as 98%, with the false alarm rate reduced to 0.3%, the false alarm rate 2.2%, and the prediction speed less than 1ms, which is characterized by high reliability and fast speed.
[0108] For example, Figure 3 A flowchart for building a target detection model is provided to illustrate the construction process of the target detection model.
[0109] S1. Collect acceleration data.
[0110] This step can collect acceleration data under different motion states, and each acceleration speed is acceleration data at different moments.
[0111] S2. Extract features from acceleration data and form training samples.
[0112] In this step, each acceleration data is processed and feature extracted to obtain the corresponding acceleration amplitude change and amplitude change rate, the cumulative change rate of the combined acceleration, and the combined acceleration change displacement to form a training feature data set. Each set of training feature data sets is marked and its label value is determined to further form a training sample.
[0113] S3. Build an initial detection model.
[0114] S4. Select the kernel function of the initial detection model.
[0115] S5. Train the model.
[0116] This step can train the initial detection model, and continue to train the model when the model accuracy does not meet the requirements.
[0117] S6. Test the model obtained after training.
[0118] S7, determine whether the recognition accuracy of the obtained model meets the accuracy requirement, if not, execute S5; if yes, execute S8.
[0119] S8. Determine the target detection model.
[0120] As an optional embodiment of the present embodiment, the present optional embodiment is further optimized to include generating warning prompt information for warning prompt when the motion state of the target to be detected is falling.
[0121] In this embodiment, the warning prompt information can be specifically understood as information for prompting a falling event, and the warning prompt can be a sound prompt, a light prompt, or a combination of multiple methods, for example, a warning prompt is made by an alarm sound plus a voice of "Attention, a falling accident has occurred". The warning prompt information can be used to instruct related warning devices to issue an alarm, for example, an alarm, a speaker, etc. for sound prompts, a lamp for light prompts, etc.
[0122] The alarm prompt mode is pre-set and can be selected by the user. When the motion state of the target to be detected is falling, the alarm prompt information is determined according to the pre-set alarm prompt mode, the relevant alarm device is determined according to the alarm prompt information, and the alarm device is controlled to give an alarm prompt.
[0123] As an optional embodiment of the present embodiment, the optional embodiment is further optimized to include controlling the activation of the protection device according to the position of the target to be detected when the motion state of the target to be detected is falling.
[0124] In this embodiment, the protective device can be specifically understood as a facility for providing safety protection for people or objects falling from a height, such as an airbed. The target to be detected can also wear a positioning device for positioning, or when its position will not change significantly, its position information can be pre-set. When the motion state of the target to be detected is falling, the position of the target to be detected is determined according to the positioning device, or the position of the target to be detected is determined according to the pre-set position information, and the corresponding protective device is determined according to the position of the target to be detected, and the protective device is activated to provide safety protection for the target to be detected to ensure the safety of personnel.
[0125] In an embodiment of the present application, detection, alarm and protection can also be set up not at one end. For example, a transmitting end and a receiving end are set. The transmitting end is used to perform fall detection and send the detection result to the receiving end. After receiving the information, the receiving end parses the information and takes corresponding measures to issue an alarm prompt and provide safety protection when a fall occurs.
[0126] For example, Figure 4 A structural schematic diagram of a transmitting end is provided, and the transmitting end includes: an acceleration sensor module 11, a high-rise fall intelligent detection module 12, a signal sending module 13 and a power management module 14. Among them, the acceleration sensor module 11 is used to collect acceleration data; the high-rise fall intelligent detection module 12 is used to determine whether the motion state of the target to be detected is falling according to the acceleration data; the signal sending module 13 is used to send the detection result to the receiving end. The power management module 14 manages the power supply of the acceleration sensor module 11, the high-rise fall intelligent detection module 12, and the signal sending module 13. Figure 5A structural diagram of a receiving end is provided, and the receiving end includes: an information receiving module 21, a signal processing module 22, a fall processing module 23 and a power management module 24. Among them, the information receiving module 21 is used to receive the detection result sent by the sending end; the signal processing module 22 is used to process the received information; the fall processing module 23 is used to issue an alarm and start a protective device when a fall occurs. The power management module 24 manages the power supply of the information receiving module 21, the signal processing module 22, and the fall processing module 23.
[0127] The fall detection method provided by the embodiment of the present invention collects the data of the three-axis acceleration sensor through Hilbert transform, and has the functions of filtering and noise reduction, which can help eliminate the interference caused by the sensor itself, the environment and other reasons, and improve the accuracy and reliability of the data. By collecting and processing acceleration data, the acceleration change of the human body during the fall from a height can be more accurately analyzed. The machine learning algorithm based on SVM has a high classification accuracy when dealing with nonlinear problems, and can extract more complex feature information, so as to accurately identify the fall event. By training and predicting the characteristic data of acceleration, the fall event from a height is detected in time, and corresponding emergency measures are taken, so as to effectively prevent and reduce the occurrence of fall accidents from a height, ensure personal safety and reduce the risk of accidents.
[0128] Embodiment 3
[0129] Figure 6 This is a schematic diagram of the structure of a fall detection device provided in Embodiment 3 of the present invention. Figure 6 As shown, the device includes: an acceleration acquisition module 31, a characteristic data determination module 32, and a detection module 33.
[0130] The acceleration acquisition module 31 is used to acquire acceleration data of the target to be detected, and determine the acceleration values corresponding to different direction axes according to the acceleration data;
[0131] A characteristic data determination module 32 is used to determine the acceleration amplitude change and the acceleration amplitude change rate, the total acceleration cumulative change rate and the total acceleration change displacement according to each of the acceleration values, and form an acceleration characteristic data set;
[0132] The detection module 33 is used to input the acceleration feature data set into a pre-trained target detection model, and determine whether the motion state of the target to be detected is falling according to the output result of the target detection model.
[0133] The fall detection device provided by the embodiment of the present invention solves the problem that it is impossible to accurately and quickly perform fall detection on high-altitude targets. By analyzing the acceleration data of the target to be detected, the acceleration values on each direction axis are determined, and then calculations are performed based on the acceleration values to obtain the amplitude change of the acceleration and the amplitude change rate, the cumulative change rate of the combined acceleration, and the combined acceleration change displacement, accurately reflecting the acceleration change trend of the target during the fall from a height, and forming an acceleration feature data set, pre-training a target detection model, and predicting the acceleration feature data set with the trained target detection model, and then determining whether the motion state of the target to be detected is falling. By processing the acceleration value, an acceleration feature data set that can indicate the motion characteristics is obtained, and then the motion state is detected in combination with the target detection model, so as to effectively detect whether the target to be detected has fallen. The detection result is accurate, and the detection speed is fast, and the detection can be performed in real time.
[0134] Optionally, the acceleration acquisition module 31 includes:
[0135] A signal determination unit, used to determine acceleration signals corresponding to axes in different directions according to the acceleration data;
[0136] The signal processing unit is used to perform Hilbert transform on the acceleration signal corresponding to each direction axis, determine the envelope value of the acceleration signal, and determine the envelope value of the acceleration signal as the acceleration value.
[0137] Optionally, the feature data determination module 32 includes:
[0138] an amplitude change determination unit, configured to perform an integral operation on each acceleration value according to the absolute value of the acceleration value and a preset acquisition period to obtain an amplitude change of the acceleration value;
[0139] The amplitude change sum determination unit is used to determine the sum of the amplitude changes of the acceleration values as the amplitude change sum of the acceleration.
[0140] Optionally, the feature data determination module 32 includes:
[0141] The amplitude change rate determination unit is used to divide the amplitude change of the acceleration by the acquisition period to obtain the amplitude change rate of the acceleration.
[0142] Optionally, the feature data determination module 32 includes:
[0143] A square operation unit, used for calculating the sum of the squares of each acceleration value, and performing square root extraction on the sum of the squares to obtain a square root;
[0144] The accumulated change rate determination unit is used to perform an integration operation according to the square root and a preset acquisition period, and divide the integration result by the acquisition period to obtain the accumulated change rate of the total acceleration.
[0145] Optionally, the feature data determination module 32 includes:
[0146] A speed value determination unit, configured to perform an integral operation on each acceleration value according to the absolute value of the acceleration value and a preset acquisition period to obtain a speed value;
[0147] a change displacement determination unit, configured to perform an integral operation according to the absolute value of the velocity value and the acquisition period to obtain a change displacement;
[0148] The combined change displacement determining unit is used to determine the sum of the change displacements as the combined acceleration change displacement.
[0149] Optionally, the device further comprises:
[0150] A sample set acquisition module, used to acquire a training sample set including at least one training sample, wherein the training sample includes a training feature data set and a label value;
[0151] A model training module is used to train the initial detection model according to each of the training samples to obtain a target detection model with recognition accuracy that meets the accuracy requirements;
[0152] Wherein, the initial detection model is a support vector machine model, and the kernel function of the support vector machine model is a Gaussian kernel function.
[0153] Optionally, the device further comprises:
[0154] The alarm module is used to generate alarm prompt information for alarm prompting when the motion state of the target to be detected is falling.
[0155] Optionally, the device further comprises:
[0156] The protection module is used to control the start of the protection device according to the position of the target to be detected when the motion state of the target to be detected is falling.
[0157] The fall detection device provided in the embodiment of the present invention can execute the fall detection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0158] Embodiment 4
[0159] Figure 7A schematic diagram of an electronic device that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0160] like Figure 7 As shown, the electronic device includes at least one sensor 40, at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., in which a sensor 40 and a processor 41 are taken as examples. Among them, the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42 and the RAM 43 are connected to each other through a bus 44. The input / output (I / O) interface 45 is also connected to the bus 44.
[0161] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0162] The processor 41 may be a variety of general and / or dedicated processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as a fall detection method.
[0163] In some embodiments, the fall detection method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the fall detection method described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to perform the fall detection method in any other suitable manner (e.g., by means of firmware).
[0164] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0165] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0166] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0167] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0168] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0169] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0170] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0171] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A fall detection method, characterized in that: include: Acquire acceleration data of the target to be detected, and determine acceleration values corresponding to axes in different directions according to the acceleration data; Determine the acceleration amplitude change and the acceleration amplitude change rate, the combined acceleration cumulative change rate and the combined acceleration change displacement according to each of the acceleration values, and form an acceleration feature data set; Inputting the acceleration feature data set into a pre-trained target detection model, and determining whether the motion state of the target to be detected is falling according to the output result of the target detection model; Determining the change in the amplitude of acceleration according to each of the acceleration values comprises: For each acceleration value, an integral operation is performed according to the absolute value of the acceleration value and a preset acquisition period to obtain an amplitude change of the acceleration value; Determining the sum of the amplitude changes of the acceleration values as the sum of the amplitude changes of the acceleration; Determining the acceleration amplitude change rate according to each of the acceleration values includes: The acceleration amplitude change sum is divided by the acquisition period to obtain the acceleration amplitude change rate; Determining the cumulative change rate of the combined acceleration according to each of the acceleration values includes: Calculating the sum of the squares of each acceleration value, and taking the square root of the sum of the squares to obtain a square root; Performing an integration operation based on the square root and a preset acquisition period, dividing the integration result by the acquisition period, and obtaining a cumulative change rate of the total acceleration; Determining the combined acceleration change displacement according to each of the acceleration values includes: For each acceleration value, an integral operation is performed according to the absolute value of the acceleration value and a preset acquisition period to obtain a velocity value; Performing an integral operation according to the absolute value of the velocity value and the acquisition period to obtain a change displacement; The sum of the various change displacements is determined as the total acceleration change displacement.
2. The method according to claim 1, characterized in that The step of determining the acceleration values corresponding to axes in different directions according to the acceleration data includes: Determine acceleration signals corresponding to axes in different directions according to the acceleration data; For the acceleration signal corresponding to each direction axis, a Hilbert transform is performed on the acceleration signal to determine an envelope value of the acceleration signal, and the envelope value of the acceleration signal is determined as the acceleration value.
3. The method according to claim 1, characterized in that The step of determining the target detection model includes: Acquire a training sample set including at least one training sample, wherein the training sample includes a training feature data set and a label value; The initial detection model is trained according to each of the training samples to obtain a target detection model with recognition accuracy that meets the accuracy requirements; Wherein, the initial detection model is a support vector machine model, and the kernel function of the support vector machine model is a Gaussian kernel function.
4. The method according to any one of claims 1 to 3, characterized in that: Also includes: When the motion state of the target to be detected is falling, generating an alarm prompt information for an alarm prompt; The method further comprises: When the moving state of the target to be detected is falling, the protection device is started according to the position control of the target to be detected.
5. A fall detection device, characterized in that: include: An acceleration acquisition module is used to acquire acceleration data of the target to be detected, and determine acceleration values corresponding to axes in different directions according to the acceleration data; A characteristic data determination module is used to determine the acceleration amplitude change and the acceleration amplitude change rate, the total acceleration cumulative change rate and the total acceleration change displacement according to each of the acceleration values, and form an acceleration characteristic data set; A detection module, used to input the acceleration feature data set into a pre-trained target detection model, and determine whether the motion state of the target to be detected is falling according to the output result of the target detection model; The feature data determination module includes: an amplitude change determination unit, configured to perform an integral operation on each acceleration value according to the absolute value of the acceleration value and a preset acquisition period to obtain an amplitude change of the acceleration value; an amplitude change sum determination unit, configured to determine the sum of the amplitude changes of the acceleration values as the amplitude change sum of the acceleration; The feature data determination module includes: an amplitude change rate determination unit, configured to obtain an amplitude change rate of acceleration by dividing the acceleration amplitude change sum by a collection period; The feature data determination module includes: A square operation unit, used for calculating the sum of the squares of each acceleration value, and performing square root extraction on the sum of the squares to obtain a square root; An accumulated change rate determination unit, configured to perform an integration operation based on the square root and a preset acquisition period, and divide the integration result by the acquisition period to obtain a total acceleration accumulated change rate; The feature data determination module includes: A speed value determination unit, configured to perform an integral operation on each acceleration value according to the absolute value of the acceleration value and a preset acquisition period to obtain a speed value; a change displacement determination unit, configured to perform an integral operation according to the absolute value of the velocity value and the acquisition period to obtain a change displacement; The combined change displacement determining unit is used to determine the sum of the change displacements as the combined acceleration change displacement.
6. An electronic device, characterized in that: The electronic device comprises: At least one sensor, used to collect acceleration data of the target to be detected; at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the fall detection method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the fall detection method according to any one of claims 1 to 4 when executed.
Citation Information
Patent Citations
Fall detection method of mobile device, model formation method and mobile device
CN108009572A
Electronic device, drop processing method, and related products
CN108259670A