Method and device for motion recognition and intestinal gas detection based on convolutional neural network
By integrating multimodal data acquisition with deep learning, and using convolutional neural networks to analyze motion posture and intestinal gas, this method solves the problems of low accuracy in motion posture detection and cumbersome intestinal health detection in existing technologies, and achieves efficient, real-time monitoring and early warning of human health status.
Patent Information
- Application Number
- CN202511595782.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-04
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2045-11-04
AI Technical Summary
Existing motion posture detection has low accuracy and poor equipment adaptability, while intestinal health detection equipment is cumbersome to operate and lacks precision, making it difficult to meet the needs of health management.
By combining multimodal data acquisition with deep learning, a convolutional neural network (CNN) is used to analyze motion posture and intestinal gas. Miniature gas sensors and inertial sensors are integrated to achieve collaborative data acquisition and deep learning algorithm optimization, and a lightweight CNN model and a multi-level alarm mechanism are constructed.
It improves the accuracy of motion posture detection, simplifies the intestinal health detection process, enables multi-dimensional real-time monitoring and early warning of human health status, and supports personalized intervention for chronic diseases.
Smart Images

Figure CN121040899B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of motion recognition and intestinal gas detection, and particularly relates to a motion recognition and intestinal gas detection method and device based on a convolutional neural network. BACKGROUND
[0002] Under the dual influence of fast-paced life and high-pressure environment in modern society, the health risks of the general population have significantly increased, and real-time and accurate monitoring of human health status has become the core driving force for promoting the transformation of the medical model from "disease treatment" to "health management". With the iterative development of health monitoring technology, motion posture detection has become an important dimension for evaluating the functional status of the human body. The current mainstream detection schemes mainly fall into two categories: wearable device-based inertial sensor technology and computer vision-based image recognition technology. The former captures real-time acceleration, angular velocity and other data of human motion through accelerometers, gyroscopes and other sensors, and restores the motion posture after algorithm analysis; the latter uses a camera to capture images, identifies joint positions in combination with a deep learning model, and then analyzes the limb movement trajectory. In addition, with the advancement of technology, portable gas detection devices have also been gradually applied in intestinal health detection. As mentioned in The Lancet Digital Health (2024), the development of such devices aims to provide a convenient means for early screening of intestinal diseases, and the basic working mechanism is to use high-sensitivity gas sensors to identify and analyze specific components in exhaled air or intestinal discharge, trying to capture clues about intestinal health status from changes in gas composition.
[0003] However, the existing technology still has significant technical shortcomings in multi-modal data fusion analysis and accurate capture of complex health indicators. Due to long-term desk work, lack of exercise, and other lifestyle habits, the incidence of heart and brain diseases in the population is increasing year by year. As an important auxiliary means for risk assessment of heart and brain diseases, exercise posture monitoring also faces technical bottlenecks. Accelerometer-based wearable devices are easily disturbed by the environment and have low wearing compliance, while computer vision solutions have privacy risks and scene adaptability problems. According to the data from the "Advances in Biomedical Engineering", the average accuracy of traditional posture recognition algorithms in complex scenes is only 83.5%, which is difficult to achieve accurate early warning of health risks such as exercise injuries, cardiovascular abnormalities, and other health risks. This is because traditional posture recognition algorithms are mostly designed based on simple motion models and fixed environmental assumptions. When in complex scenes, such as dramatic changes in light, dense personnel shielding, and other situations, the algorithm cannot effectively handle these interference factors, leading to deviations in the judgment of human motion posture, and thus cannot accurately capture abnormal posture information related to health risks. At the same time, in terms of physiological indicator detection, traditional detection devices are often limited to single-parameter monitoring, making it difficult to fully reflect the overall health of the human body. Influenced by high-intensity work, irregular diet, and other factors, the gastrointestinal burden of most people is increasing, and intestinal microecological imbalance problems are frequent. Most current intestinal health detection methods rely on invasive sampling and laboratory analysis, which are cumbersome to operate and have poor timeliness. Research by "The Lancet - Digital Health" (2024) shows that the recognition accuracy of existing portable gas detection equipment for intestinal disease-related gases is only 72%, which cannot meet the accuracy requirements of early disease screening. This is because the concentration changes of key gas markers such as hydrogen sulfide and methane produced when the intestinal microecology is disturbed are extremely subtle, and the current equipment has limited sensor sensitivity and selectivity, making it difficult to accurately distinguish these key components in complex gas environments, resulting in low detection accuracy.
[0004] In the current field of motion posture detection, traditional algorithms such as support vector machine (SVM) rely on manual feature engineering and have limited adaptability to high-dimensional data, decision trees and their integrated methods (such as random forests) are difficult to capture complex nonlinear relationships, and recurrent neural networks (RNN) are good at processing time series data but have high computational complexity. In contrast, convolutional neural networks (CNN) can automatically learn multi-scale spatial features (such as human joint distribution and contour changes) from images or videos with their hierarchical feature extraction mechanism, combined with translation invariance and parallel computing advantages, showing significant performance improvement in real-time posture classification tasks. Especially when dealing with complex scene data of the elderly, the deep architecture of CNN can effectively capture subtle differences in actions such as bending and falling, and its end-to-end learning characteristics do not rely on specific sensors or complex preprocessing procedures, providing a better algorithm choice for portable real-time monitoring devices. According to the latest research in IEEE Transactions on Biomedical Engineering (2023), the average accuracy of a six-classification model based on CNN on the standard dataset is 94.3%, an increase of 11.6% over traditional methods, verifying its technical advantages in the field of elderly health monitoring. SUMMARY
[0005] In view of the shortcomings of the prior art, the present application provides a motion recognition and intestinal gas detection method and device based on a convolutional neural network, specifically a human health state monitoring device that integrates multi-modal data acquisition and intelligent analysis, deeply integrates micro gas sensors, inertial sensors and other types of sensing units, and realizes synchronous monitoring and cross-validation of human motion posture and physiological metabolism indicators through multi-modal data collaborative acquisition and deep learning algorithm optimization. Specifically, it includes two parts: motion posture recognition and fecal gas detection, and communicates with the host computer through Bluetooth and completes the classification and recognition of the motion posture on the host computer.
[0006] In one aspect, the present application provides a motion recognition and intestinal gas detection device based on a convolutional neural network, comprising a display screen, an upper housing, a battery, a circuit board, a gas sensor, a lower housing, a wire, a buckle, and a host computer.
[0007] The display screen is embedded in the upper housing, and the display screen receives signals from the circuit board and displays them; the battery is connected to the power supply socket of the circuit board, and the circuit board is connected to the gas sensor through the wire; the upper housing and the lower housing are buckled to form a complete shell, and the battery, the circuit board, the gas sensor and the wire are arranged in the shell; the buckle is arranged on the lower housing.
[0008] The circuit board comprises an active buzzer, an FPC connector, a power supply socket, an MCU, a gas sensitive element connection socket, a dual-mode Bluetooth module, and a six-axis inertial navigation element IMU; the active buzzer provides alarm information for the entire device and sends an alarm when the measured gas concentration exceeds the set range; the FPC connector connects the MCU and the display screen, and the power supply socket is connected with the battery; the MCU is a master control chip for controlling data transmission and display screen operation; the gas sensitive element connection socket is connected with the gas sensitive element; and the dual-mode Bluetooth module transmits the sampling data of the six-axis inertial navigation element to the upper computer.
[0009] The upper computer receives the sampling data from the six-axis inertial navigation element IMU and the gas sensitive element through the timer operation of the MCU; the signals collected by the six-axis inertial navigation element IMU are preprocessed by the MCU, and the preprocessed data are transmitted to the upper computer through the serial communication protocol of Bluetooth connection for motion posture recognition and gas classification; and the gas concentration measured by the gas sensitive element is directly mapped by the MCU to obtain the standard gas concentration.
[0010] The upper computer specifically comprises a motion posture recognition module and a gas detection module; the motion posture recognition module constructs a six-classification recognition model through inertial measurement and deep learning algorithm, calculates the probability values of 6 postures through forward propagation, takes the class with the largest probability as the recognition result of the current motion posture, and realizes real-time classification; and the gas detection module realizes the judgment of the health status of intestinal gas through threshold method, and sets a multi-level alarm mechanism in combination with clinical data and individual physiological characteristics.
[0011] In another aspect, the application provides a motion recognition and intestinal gas detection method based on a convolutional neural network, which is realized by the foregoing detection device and specifically comprises motion posture recognition and intestinal gas detection.
[0012] The motion posture recognition specifically comprises the following steps:
[0013] Step A1: first, XYZ three-axis acceleration data and angular velocity data are collected by the six-axis inertial navigation element 4.7;
[0014] Step A2: after the collected original acceleration data is subjected to digital filtering processing to remove noise interference, feature extraction and dimension reduction fusion are performed;
[0015] Step A2.1: for the three-axis acceleration original data stream, efficient compression and feature extraction of data are realized through feature engineering and dimension reduction algorithm;
[0016] Firstly, the original acceleration data is analyzed in time domain and frequency domain, the standard deviations SD of the acceleration data in X, Y and Z directions are calculated respectively, the standard deviations of the acceleration in X, Y and Z directions are SD_X, SD_Y and SD_Z respectively, then the vector amplitude SVM is calculated through the Euclidean norm, the three-axis acceleration information is integrated, finally, based on the gravity acceleration component, the arctangent function solves the roll angle Roll and the pitch angle Pitch, wherein x, y and z are acceleration components in X, Y and Z directions respectively;
[0017] Step A2.2: reducing the three-axis standard deviations, the vector amplitude, the roll angle Roll and the pitch angle Pitch;
[0018] Specifically, the roll angle Roll and the pitch angle Pitch are enlarged by 100 times, the floating point numbers are converted into integers for storage, and are transmitted to the upper computer through the Bluetooth 5.0 protocol;
[0019] Step A3: constructing a six-classification recognition model based on the convolutional neural network CNN through the upper computer;
[0020] The six-classification recognition model adopts a lightweight architecture design and includes three convolutional layers and two fully connected layers;
[0021] In the convolutional layers, feature extraction is performed through 3x3 size convolutional kernels, the maximum pooling operation is used to reduce the feature dimension, and the ReLU activation function is combined to enhance the nonlinear expression ability of the model, and specifically includes a first convolutional layer, a second convolutional layer and a third convolutional layer;
[0022] The first convolutional layer inputs a pre-processed 128x3x1 dimensional motion feature matrix, uses 16 3x3 convolutional kernels with a step size of 1 and an edge padding mode of same, and outputs a 64x1x16 dimensional feature map to the second convolutional layer through ReLU activation and 2x2 maximum pooling; wherein the motion feature matrix is a 6-dimensional feature of the three-axis acceleration standard deviations SD_X, SD_Y, SD_Z, the vector amplitude SVM, the roll angle Roll and the pitch angle Pitch, which is spliced into a 128x6x1 matrix in time sequence, 128 is the time sequence length, and 3 is the three-dimensional feature dimension;
[0023] The second convolutional layer receives a 64x1x16 dimensional feature map, uses 32 3x3 convolutional kernels with a step size of 1 and an edge padding mode of same, and outputs a 32x1x32 dimensional feature map to the third convolutional layer through ReLU activation and 2x2 maximum pooling;
[0024] The third convolutional layer receives a 32×1×32 dimensional feature map, uses 64 3×3 convolutional kernels with a stride of 1 and the same edge padding mode. After ReLU activation, it outputs a 16×1×64 dimensional feature map through 2×2 max pooling. Then, it is flattened to convert the 16×1×64 dimensional feature map into a 1024 dimensional vector, which is then input into the fully connected layer, specifically including the first fully connected layer and the second fully connected layer.
[0025] The first fully connected layer passes the 1024-dimensional vector through a fully connected operation of 64 neurons, and outputs a 64-dimensional feature vector after ReLU activation.
[0026] The second fully connected layer passes the 64-dimensional vector through a fully connected operation of 6 neurons, and outputs the probability distribution of 6 poses through Softmax activation. The 6 poses specifically include standing still, walking slowly, sitting down, rolling over, running, and falling.
[0027] Step A4: Train the six-class classification model by inputting the motion feature matrix obtained in real time and after preprocessing into the trained six-class classification model; the six-class classification model calculates the probability values of the six postures through forward propagation, and takes the category with the highest probability as the recognition result of the current motion posture to achieve real-time classification.
[0028] The intestinal gas detection specifically includes the following steps:
[0029] Step B1: Gas concentration is detected using gas-sensitive element 5; specifically, gas-sensitive element 5 includes a first gas sensor and a second gas sensor, which work together; the first gas sensor detects the concentrations of NH3 and NO2 gases, and the second sensor detects the concentrations of TVOC and CO gases;
[0030] Two gas sensors via I 2 C uses dual communication interfaces with ADC for synchronous data acquisition;
[0031] Step B2: The collected concentrations of NH3, NO2, TVOC, and CO gas, combined with the measurement noise covariance of the two gas sensors, are input into the Kalman filter algorithm for fusion processing, and the corrected gas concentration values are output.
[0032] Step B3: Use a threshold method to assess the health status of gastrointestinal gas, and set up a multi-level alarm mechanism by combining clinical data and individual physiological characteristics.
[0033] Specifically: When the standardized ammonia index, i.e., NH3 / CO, is higher than the set baseline value plus two standard deviations, and the ammonia index shows a continuous upward trend, an early warning is triggered, indicating that the putrefaction of undigested protein in the intestine is intensified, suggesting a Level 1 warning, a synergistic inflammatory warning of formaldehyde and TVOC. When the standardized formaldehyde index HCHO / CO and the TVOC index TVOC / CO simultaneously exceed their respective set baseline values, and the trends of the formaldehyde index and TVOC index change synchronously over time, an early warning is triggered, indicating that there is inflammation or oxidative stress in the intestinal mucosa, suggesting a Level 2 warning.
[0034] The beneficial effects of adopting the above technical solution are as follows:
[0035] This invention provides a method and device for motion recognition and intestinal gas detection based on convolutional neural networks. By analyzing intestinal gas composition and motion behavior data, it provides multidimensional data support for the early diagnosis of chronic diseases such as diabetes and cardiovascular diseases. Combined with posture recognition and physiological parameter changes, it can monitor the physical condition of the elderly for a long time and serve as an early warning device for emergency situations such as the onset of cardiovascular and cerebrovascular diseases. This not only conforms to the strategic orientation of "promoting the development of precision medicine technology" in the "Healthy China 2030" Plan Outline, but also enables early prediction of disease risk and personalized health intervention through in-depth mining of multimodal data, providing key technical support for the national health management system.
[0036] Compared to traditional technologies, this invention has significant advantages in two core modules: motion posture detection and gut health gas detection.
[0037] In terms of motion posture detection, addressing the issues of low accuracy and poor device adaptability of traditional algorithms, a lightweight CNN model is implemented using an LMS6DSL six-axis inertial measurement unit to acquire raw data. This data undergoes digital filtering, feature extraction, and dimensionality reduction (compressing the data volume from 1248 bytes / s to 140 bytes / s, improving transmission efficiency by nearly 90%) before being transmitted to the host computer. This model achieves a 91.2% accuracy rate in recognizing six typical postures, including stationary and slow walking, in complex scenarios, a 7.7% improvement over traditional methods (83.5%). Furthermore, it requires no complex preprocessing and is more suitable for portable devices.
[0038] In the field of intestinal health gas detection, it overcomes the limitations of traditional invasive detection methods, which are cumbersome and time-consuming. It employs the CJMCU-6814 and FS00602TVOC sensors working in tandem, covering key gases such as NH3, NO2, CO, and TVOC, with a response time ≤10s. (The last sentence appears to be incomplete and possibly refers to a specific technology or feature.) 2Data is collected synchronously through dual interfaces of C and ADC, and after Kalman filtering and fusion processing, multi-level alarm thresholds are set in combination with clinical data and individual characteristics to achieve real-time dynamic monitoring of intestinal microecology and metabolic status, which greatly simplifies the process and reduces costs.
[0039] The two parts communicate with the host computer via Bluetooth to form a multimodal detection system, providing technical support for the transformation of the medical model from "disease treatment" to "health management". Attached Figure Description
[0040] Figure 1 Overall flowchart of the method of this invention;
[0041] Figure 2 Data processing flowchart of a six-axis inertial navigation element in an embodiment of the present invention;
[0042] Figure 3 Data processing flowchart of the gas-sensitive element in this embodiment of the invention;
[0043] Figure 4 A three-dimensional explosion hardware schematic diagram of the system in this embodiment of the invention;
[0044] Among them, 1-display screen, 2-upper shell, 3-battery, 4-circuit board, 5-gas-sensitive element, 6-lower shell, 7-wire, 8-buckle;
[0045] Figure 5 Hardware detail diagram of the circuit board portion of this invention;
[0046] Among them, 4.1-active buzzer, 4.2-FPC connector, 4.3-power supply socket, 4.4-MCU, 4.5-gas-sensitive element connection socket, 4.6-dual-mode Bluetooth module, 4.7-six-axis inertial navigation element (IMU). Detailed Implementation
[0047] The specific implementation methods of this application will be further described in detail below with reference to the accompanying drawings and embodiments.
[0048] Example 1
[0049] On the one hand, the present invention provides a motion recognition and intestinal gas detection device based on a convolutional neural network, such as... Figure 4 As shown, it includes a display screen 1, an upper casing 2, a battery 3, a circuit board 4, a gas-sensitive element 5, a lower casing 6, wires 7, a clip 8, and a host computer; in this embodiment, the host computer is written in Python.
[0050] The display screen 1 is embedded within the upper outer shell 2. The display screen 1 receives signals from the circuit board 4 and displays them; the displayed content includes the identified action type and gas parameters. The battery 3 is connected to the power supply port 4.3 of the circuit board 4. In this embodiment, the power supply port 4.3 is model B2B-XH-A(LF)(SN). The battery 3 provides power to the entire device, including heating the gas-sensitive element 5, data acquisition, and calculation. The circuit board 4 and the gas-sensitive element 5 are connected via wires 7. The upper outer shell 2 and the lower outer shell 6 are fastened together to form a complete housing. The battery 3, circuit board 4, gas-sensitive element 5, and wires 7 are all housed within the housing. The buckle 8 is located on the lower outer shell 6 and can hold the tester's clothing or watch strap.
[0051] The circuit board 4 is as follows Figure 5 As shown, the device includes an active buzzer 4.1, an FPC connector 4.2, a power supply socket 4.3, an MCU 4.4, a gas-sensitive element connection socket 4.5, a dual-mode Bluetooth module 4.6, and a six-axis inertial navigation element (IMU) 4.7. The active buzzer 4.1 provides alarm information for the entire device, sounding an alarm when the measured gas concentration exceeds a set range. The FPC connector 4.2 connects the MCU 4.4 to the display screen 1, providing display functionality for the entire device. The power supply socket 4.3 connects to a 3.7V lithium battery, which is connected to battery 3. The MCU 4.4 is the main control chip, used to control data transmission and the operation of the display screen. The gas-sensitive element connection socket 4.5 connects to the gas-sensitive element 5. The dual-mode Bluetooth module 4.6 transmits the sampling data from the six-axis inertial navigation element 4.7 to the host computer.
[0052] The host computer receives sampling data from the six-axis inertial navigation element IMU4.7 and the gas sensor 5 through the timer operation of MCU4.4; the signal collected by the six-axis inertial navigation element IMU4.7 is preprocessed by MCU4.4 and transmitted to the host computer through the serial communication protocol of Bluetooth connection for motion attitude recognition and gas classification; while the gas concentration measured by the gas sensor is directly mapped by MCU4.4 to obtain the standard gas concentration.
[0053] The host computer specifically includes a motion posture recognition module and a gas detection module. The motion posture recognition module constructs a six-classification recognition model through inertial measurement and deep learning algorithms, calculates and outputs the probability values of six postures through forward propagation, and takes the category with the highest probability as the recognition result of the current motion posture to achieve real-time classification. The gas detection module uses a threshold method to judge the health status of gastrointestinal gas and sets up a multi-level alarm mechanism by combining clinical data and individual physiological characteristics.
[0054] In this embodiment, the MCU4.4 specifically uses an Arm Cortex-M3 core and an STM32F103RCT6 main control chip manufactured by STMicroelectronics. The gas sensor 5 consists of two gas sensors: CJMCU-6814 and FS00602TVOC. The CJMCU-6814 gas sensor is a gas sensor module based on the AMS CCS811 chip, supports the IIC interface, can detect CO concentration, and has baseline calibration, low power mode, and multiple output data formats. It is mainly aimed at human health detection and is suitable for the usage environment of this device. The FS00602TVOC core detects total volatile organic compounds (TVOC) and can complement the CJMCU-6814. The two work together to improve the comprehensive and reliable detection of intestinal gases.
[0055] Example 2:
[0056] This invention also provides a method for motion recognition and intestinal gas detection based on convolutional neural networks, implemented based on the aforementioned device for motion recognition and intestinal gas detection based on convolutional neural networks, such as... Figure 1 As shown, this specifically includes motion posture recognition and intestinal gas detection;
[0057] The motion posture recognition specifically includes the following steps:
[0058] Step A1: In the motion posture recognition module, the system adopts a hierarchical data processing architecture, combining high-precision inertial measurement with deep learning algorithms to achieve accurate classification of human postures. First, acceleration and angular velocity data along the XYZ axes are acquired using a six-axis inertial navigation element 4.7; in this embodiment, the six-axis inertial navigation element IMU4.7 specifically uses an LMS6DSL; as... Figure 2 As shown, this component integrates a triaxial accelerometer and a triaxial gyroscope, with an acceleration range of ±24g and an angular velocity measurement range of ±2000° / s. It outputs raw sensor data in real time at a sampling frequency of 208Hz via the I²C communication protocol, ensuring sensitive capture of subtle changes in human body movements.
[0059] Step A2: After the raw acceleration data is collected, it is digitally filtered to remove noise interference, and then feature extraction and dimensionality reduction fusion are performed.
[0060] Step A2.1: For the raw triaxial acceleration data stream (sampling frequency 208Hz in this embodiment, data volume up to 1248Bytes / s), efficient data compression and feature extraction are achieved through feature engineering and dimensionality reduction algorithms;
[0061] First, time-domain and frequency-domain analyses are performed on the raw acceleration data, calculating the standard deviations (SD) of the acceleration data in the X, Y, and Z directions. The standard deviations of the X, Y, and Z axes are SD_X, SD_Y, and SD_Z, respectively, to quantify the degree of data fluctuation and reflect the stability characteristics of the motion. Then, the vector magnitude (SVM) is calculated using the Euclidean norm to integrate the three-axis acceleration information and characterize the motion intensity. Finally, based on the gravitational acceleration components, the arctangent function is applied... Solve for the roll angle (Roll) and pitch angle (Pitch), where x, y, and z are the acceleration components in the X, Y, and Z axes, respectively.
[0062] Step A2.2: Reduce the three-axis standard deviation, vector magnitude, roll angle, and pitch angle (the reduced data volume is approximately 140 bytes / s): Specifically, the roll angle and pitch angle are magnified by 100 times, and floating-point numbers are converted to integers for storage to reduce byte usage; the processed data includes roll angle and pitch angle to characterize the direction or posture of the human torso in static or quasi-static conditions, vector magnitude SVM to characterize the intensity of human movement, and three-axis standard deviation (SD_X, SD_Y, SD_Z) to describe the fluctuation characteristics of human movement in the XYZ axes, providing more granular features compared to SVM. The above three types of data are composed of data packets frame by frame and transmitted to the Python host computer via Bluetooth Low Energy 5.0 protocol. This protocol supports long-distance, low-latency data communication, ensuring the stability and real-time performance of data transmission.
[0063] Step A3: Construct a six-class classification model using a host computer based on a convolutional neural network (CNN);
[0064] The six-class recognition model adopts a lightweight architecture design, which includes three convolutional layers and two fully connected layers.
[0065] The convolutional layer uses 3×3 convolutional kernels for feature extraction, max pooling to reduce feature dimensionality, and ReLU activation function to enhance the non-linear expressive power of the model. Specifically, it includes a first convolutional layer, a second convolutional layer, and a third convolutional layer.
[0066] The first convolutional layer takes a preprocessed 128×3×1 dimensional motion feature matrix as input, uses 16 3×3 convolutional kernels with a stride of 1 and the same edge padding mode, and after ReLU activation, outputs a 64×1×16 dimensional feature map through 2×2 max pooling to the second convolutional layer. The motion feature matrix is a 128×6×1 matrix formed by concatenating six dimensional features (three-axis acceleration standard deviation SD_X, SD_Y, SD_Z, vector magnitude SVM, roll angle, and pitch angle) in time series, where 128 is the time series length and 3 is the three-dimensional feature dimension.
[0067] The second convolutional layer receives a 64×1×16 dimensional feature map, uses 32 3×3 convolutional kernels with a stride of 1, and the edge padding mode is same. After ReLU activation, it outputs a 32×1×32 dimensional feature map to the third convolutional layer through 2×2 max pooling.
[0068] The third convolutional layer receives a 32×1×32 dimensional feature map, uses 64 3×3 convolutional kernels with a stride of 1 and the same edge padding mode. After ReLU activation, it outputs a 16×1×64 dimensional feature map through 2×2 max pooling. Then, it is flattened to convert the 16×1×64 dimensional feature map into a 1024 dimensional vector, which is then input into the fully connected layer, specifically including the first fully connected layer and the second fully connected layer.
[0069] The first fully connected layer passes the 1024-dimensional vector through a fully connected operation of 64 neurons, and outputs a 64-dimensional feature vector after ReLU activation.
[0070] The second fully connected layer passes the 64-dimensional vector through a fully connected operation of 6 neurons, and outputs the probability distribution of 6 poses through Softmax activation. The 6 poses specifically include standing still, walking slowly, sitting down, rolling over, running, and falling.
[0071] Step A4: Train the six-class classification model by inputting the motion feature matrix obtained in real time and after preprocessing into the trained six-class classification model; the six-class classification model calculates the probability values of the six postures through forward propagation, and takes the category with the highest probability as the recognition result of the current motion posture to achieve real-time classification.
[0072] During the training phase, the cross-entropy loss function and Adam optimizer are used. Public human motion datasets (such as UCI-HAR) and self-built experimental data are used as training samples. Transfer learning and data augmentation techniques are used to improve the model's generalization ability. Finally, high-precision classification of six typical human postures, namely stillness, walking slowly, sitting down, turning over, running, and falling, is achieved. The average recognition accuracy reaches 91.2% in complex scenarios according to actual tests.
[0073] The intestinal gas detection specifically includes the following steps:
[0074] Step B1: In the gas detection section, this design focuses on characteristic gaseous biomarkers closely related to human health, achieving real-time assessment of gut microbiota and metabolic status through multi-sensor collaborative monitoring. Studies have shown that changes in the concentrations of volatile organic compounds (TVOC), ammonia (NH3), nitrogen dioxide (NO2), and carbon monoxide (CO) in feces can serve as important early warning indicators for digestive system diseases, metabolic disorders, and systemic diseases. According to a study published in the journal *Gastroenterology* (2023), elevated concentrations of specific aldehydes and ketones in TVOC are significantly correlated with the active phase of inflammatory bowel disease (IBD), with a diagnostic sensitivity of 82%. Abnormal NH3 concentrations often indicate gut microbiota imbalance or protein metabolism disorders, and have important reference value in the early diagnosis of hepatic encephalopathy. In addition, as a product of oxidative stress in the gut, NO2 concentration fluctuations are significantly correlated with precancerous lesions of colorectal cancer (*Nature Medicine*, 2024), while abnormal CO release may reflect mitochondrial dysfunction or tissue hypoxia.
[0075] To achieve accurate detection of the aforementioned gases, a gas-sensitive element 5 is used to detect the gas concentration, such as... Figure 3 As shown, the gas-sensitive element 5 specifically includes a first gas sensor and a second gas sensor, which work together. The first gas sensor detects the concentrations of NH3 and NO2 gases, while the second sensor detects the concentrations of TVOC and CO gases. In this embodiment, the first gas sensor uses a CJMCU-6814 gas sensor array, and the second gas sensor uses an FS00602TVOC sensor, which works together. The CJMCU-6814 integrates a metal-oxide-semiconductor (MOS) sensing element, which has high sensitivity to NH3, NO2, and CO. Its detection range covers 0-100ppm (NH3), 0-20ppm (NO2), and 0-1000ppm (CO), with a response time ≤10s, meeting the requirements for real-time monitoring. The FS00602TVOC sensor is based on MEMS technology and selectively adsorbs TVOC through a nanoscale gas-sensitive thin film. It can detect concentration changes at the ppb level, has anti-humidity interference capability, and is suitable for complex biogas environments. The two gas sensors synchronously acquire data through a dual communication interface of I²C and ADC.
[0076] Step B2: Combine the collected NH3, NO2, TVOC, and CO gas concentrations—that is, the NH3, NO2, and CO concentration data output by the CJMCU-6814 sensor and the TVOC concentration data output by the FS00602 TVOC sensor—with the measurement noise covariance of the two gas sensors (NH3: 0.8 ppm).2 NO2: 0.3ppm 2 CO: 5ppm 2 TVOC: 20ppb 2 The gas concentration value is input into a Kalman filter algorithm for fusion processing, and the corrected gas concentration value is output, effectively reducing noise interference and improving detection accuracy. The basic framework of the Kalman filter consists of two parts: state prediction and measurement update. State prediction predicts the gas concentration state at the current moment based on the optimal estimate from the previous moment and the sensor's dynamic model. Measurement update corrects the prediction result by combining the residual between the current sensor measurement value and the predicted value with the Kalman gain (calculated in real time), and outputs the fused optimal concentration value. The specific state equation, measurement equation, and iterative update logic are common knowledge in the field. The improvement in this design lies in optimizing the noise covariance matrix and dynamic model parameters for the characteristics of the gas sensor, thereby improving fusion accuracy.
[0077] Step B3: Use a threshold method to assess the health status of gastrointestinal gas, and set up a multi-level alarm mechanism by combining clinical data and individual physiological characteristics.
[0078] Specifically, to eliminate common-mode interference from environmental temperature, humidity, air pressure, and sampling volume, and to improve data stability and comparability, this system standardizes all gas concentration readings by ratio to the simultaneously measured CO concentration, using "target gas concentration / CO concentration" as the characteristic quantity for subsequent analysis. The standard CO concentration baseline is set at 1000 ppm.
[0079] When the standardized ammonia index, i.e., NH3 / CO, is consistently higher than the set baseline value (baseline of 8 ppm / 1000 ppm, standard deviation of 2 ppm / 1000 ppm) by more than 2 standard deviations (i.e., > 12 ppm / 1000 ppm), and the ammonia index shows a continuous upward trend (judged as a slope > 0 over the past 3 sampling periods), an alert is triggered. This indicates that the putrefaction of undigested protein in the intestine is intensified, suggesting a Level 1 alert, requiring attention to dietary protein intake or digestive function. This signal indicates that the putrefaction and decomposition of unabsorbed protein in the intestine under the action of the gut microbiota is intensified, which is one of the typical manifestations of gut microbiota imbalance. It is set as a Level 1 alert, requiring monitoring of recent dietary protein intake and digestive function, and dietary adjustments are recommended.
[0080] Synergistic inflammation warning of formaldehyde and TVOC. When the standardized formaldehyde index HCHO / CO and the TVOC index TVOC / CO simultaneously exceed their respective set baseline values (HCHO / CO > 5 ppb / 1000 ppm and TVOC / CO > 80 ppb / 1000 ppm), and the changing trends of the formaldehyde index and TVOC index are synchronized over time (Pearson correlation coefficient > 0.7), an alert is triggered. As a specific volatile organic compound, the synergistic increase of formaldehyde and total TVOC indicates inflammation or oxidative stress in the intestinal mucosa, leading to changes in the overall VOC metabolic profile, indicating a level II alert. Combined with personal symptoms, such as increased discomfort, attention should be paid.
[0081] In this embodiment, CO is introduced as an internal standard reference gas, and the original concentration values of all gases (unit: ppm or ppb) are converted into ratios to CO (unitless). For example, if NH3 = 15 ppm and CO = 1500 ppm are measured, then the standardized ammonia index = 15 / 1500 * 1000 = 10 ppm / 1000 ppm. This processing method can effectively offset the common-mode error caused by environmental fluctuations and sampling differences, transforming absolute concentration measurement into relative metabolic activity assessment, making data collected at different times and under different environments comparable, and greatly improving the stability and reliability of the system.
[0082] Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a computer program product.
[0083] The various embodiments in this application are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0084] The scope of protection of this application is not limited to the embodiments described above. Obviously, those skilled in the art can make various modifications and variations to this disclosure without departing from the scope and spirit of this disclosure. If such modifications and variations fall within the scope of the disclosed solution and its equivalents, then the intent of this disclosure also includes these modifications and variations.
Claims
1. A motion recognition and intestinal gas detection device based on a convolutional neural network, characterized in that, Includes display screen, upper casing, battery, circuit board, gas-sensitive element, lower casing, wires, clips, and host computer; The display screen is embedded in the upper housing, and receives and displays signals from the circuit board; the battery is connected to the power supply port of the circuit board, and the circuit board is connected to the gas-sensitive element via wires; the upper housing and the lower housing are fastened together to form a complete housing, and the battery, circuit board, gas-sensitive element and wires are all disposed within the housing; the buckle is disposed in the lower housing; The circuit board includes an active buzzer, an FPC connector, a power supply socket, an MCU, a gas-sensitive element connection socket, a dual-mode Bluetooth module, and a six-axis inertial navigation element (IMU). The active buzzer provides alarm information for the entire device, sounding an alarm when the measured gas concentration exceeds a set range. The FPC connector connects the MCU to the display screen, and the power supply socket connects to the battery. The MCU is the main control chip, used to control data transmission and the operation of the display screen. The gas-sensitive element connection socket connects to the gas-sensitive element. The dual-mode Bluetooth module transmits the sampling data from the six-axis inertial navigation element to the host computer. The host computer receives sampling data from the six-axis inertial navigation element (IMU) and the gas sensor through the timer operation of the MCU; the signal collected by the six-axis inertial navigation element (IMU) is preprocessed by the MCU and transmitted to the host computer through the serial communication protocol of Bluetooth connection for motion attitude recognition and gas classification; while the gas concentration measured by the gas sensor is directly mapped by the MCU to obtain the standard gas concentration. The host computer specifically includes a motion posture recognition module and a gas detection module. The motion posture recognition module constructs a six-class recognition model through inertial measurement and deep learning algorithms, calculates and outputs the probability values of six postures through forward propagation, and takes the category with the highest probability as the recognition result of the current motion posture to achieve real-time classification. The gas detection module uses a threshold method to judge the health status of gastrointestinal gas and sets up a multi-level alarm mechanism by combining clinical data and individual physiological characteristics. The multi-level alarm mechanism specifically involves: collecting the gas concentrations of NH3, CO, HCHO, and TVOC using gas-sensitive elements; When the standardized ammonia index, i.e. NH3 / CO, is higher than the set baseline value plus 2 standard deviations or more, and the ammonia index shows a continuous upward trend, an early warning is triggered, indicating that the putrefaction of undigested protein in the intestine is intensified, indicating a level one warning. When the standardized formaldehyde index HCHO / CO and the TVOC index TVOC / CO both exceed their respective set baseline values, and the changing trends of the formaldehyde index and the TVOC index are synchronized over time, an early warning is triggered, indicating that there is inflammation or oxidative stress in the intestinal mucosa, suggesting a level two warning.
2. A method for motion recognition and intestinal gas detection based on convolutional neural networks, implemented using the motion recognition and intestinal gas detection device based on convolutional neural networks as described in claim 1, characterized in that, Specifically, this includes motion posture recognition and intestinal gas detection; The motion posture recognition specifically includes the following steps: Step A1: First, acquire acceleration and angular velocity data for the XYZ axes using a six-axis inertial navigation device; Step A2: After the raw acceleration data is collected, it is digitally filtered to remove noise interference, and then feature extraction and dimensionality reduction fusion are performed. Step A3: Construct a six-class classification model using a host computer based on a convolutional neural network (CNN); Step A4: Train the six-class classification model by inputting the motion feature matrix obtained in real time and after preprocessing into the trained six-class classification model; the six-class classification model calculates the probability values of the six postures through forward propagation, and takes the category with the highest probability as the recognition result of the current motion posture to achieve real-time classification; The intestinal gas detection specifically includes the following steps: Step B1: Gas concentration is detected using a gas-sensitive element; the gas-sensitive element specifically includes a first gas sensor and a second gas sensor, which work together; the first gas sensor detects the concentrations of NH3 and NO2, and the second gas sensor detects the concentrations of TVOC, CO, and HCHO. Step B2: The collected concentrations of NH3, NO2, TVOC, and CO gas, combined with the measurement noise covariance of the two gas sensors, are input into the Kalman filter algorithm for fusion processing, and the corrected gas concentration values are output. Step B3: Use a threshold method to assess the health status of gastrointestinal gas, and combine clinical data with individual physiological characteristics to set up a multi-level alarm mechanism; Step A2 specifically includes the following steps: Step A2.1: For the raw triaxial acceleration data stream, efficient data compression and feature extraction are achieved through feature engineering and dimensionality reduction algorithms; First, time-domain and frequency-domain analyses are performed on the raw acceleration data, calculating the standard deviations (SD) of the acceleration data in the X, Y, and Z directions, respectively. The standard deviations for the X, Y, and Z axes are SD_X, SD_Y, and SD_Z, respectively. Then, the vector magnitude vector (SVM) is calculated using the Euclidean norm to integrate the three-axis acceleration information. Finally, based on the gravitational acceleration components, the arctangent function is applied... Solve for the roll angle (Roll) and pitch angle (Pitch), where x, y, and z are the acceleration components in the X, Y, and Z axes, respectively. Step A2.2: Reduce the three-axis standard deviation, vector magnitude, roll angle (Roll), and pitch angle (Pitch); Specifically, the roll angle (Roll) and pitch angle (Pitch) are magnified by 100 times, the floating-point numbers are converted to integers for storage, and then transmitted to the host computer via Bluetooth Low Energy 5.0 protocol. The six-class classification model described in step A3 adopts a lightweight architecture design, which includes three convolutional layers and two fully connected layers; The convolutional layer uses 3×3 convolutional kernels for feature extraction, max pooling to reduce feature dimensionality, and ReLU activation function to enhance the non-linear expressive power of the model. Specifically, it includes a first convolutional layer, a second convolutional layer, and a third convolutional layer. The first convolutional layer takes a preprocessed 128×6×1 dimensional motion feature matrix as input, uses 16 3×3 convolutional kernels with a stride of 1 and the same edge padding mode, and after ReLU activation, outputs a 64×1×16 dimensional feature map through 2×2 max pooling to the second convolutional layer. The motion feature matrix is formed by concatenating six dimensional features (three-axis acceleration standard deviation SD_X, SD_Y, SD_Z, vector magnitude SVM, roll angle, and pitch angle) in a time series to form a 128×6×1 matrix, where 128 is the time series length and 6 is the 6-dimensional feature dimension. The second convolutional layer receives a 64×1×16 dimensional feature map, uses 32 3×3 convolutional kernels with a stride of 1, and the edge padding mode is same. After ReLU activation, it outputs a 32×1×32 dimensional feature map to the third convolutional layer through 2×2 max pooling. The third convolutional layer receives a 32×1×32 dimensional feature map, uses 64 3×3 convolutional kernels with a stride of 1 and the same edge padding mode. After ReLU activation, it outputs a 16×1×64 dimensional feature map through 2×2 max pooling. Then, it is flattened to convert the 16×1×64 dimensional feature map into a 1024 dimensional vector, which is then input into the fully connected layer, specifically including the first fully connected layer and the second fully connected layer. The first fully connected layer passes the 1024-dimensional vector through a fully connected operation of 64 neurons, and outputs a 64-dimensional feature vector after ReLU activation; The second fully connected layer passes the 64-dimensional vector through a fully connected operation of 6 neurons, and outputs the probability distribution of 6 poses through Softmax activation. The 6 poses specifically include standing still, walking slowly, sitting down, rolling over, running, and falling. In step B1, the first gas sensor and the second gas sensor synchronously acquire data through the I²C and ADC dual communication interfaces; The multi-level alarm mechanism is specifically as follows: When the standardized ammonia index, i.e. NH3 / CO, is higher than the set baseline value plus 2 standard deviations or more, and the ammonia index shows a continuous upward trend, an early warning is triggered, indicating that the putrefaction of undigested protein in the intestine is intensified, indicating a level one warning. When the standardized formaldehyde index HCHO / CO and the TVOC index TVOC / CO both exceed their respective set baseline values, and the changing trends of the formaldehyde index and the TVOC index are synchronized over time, an early warning is triggered, indicating that there is inflammation or oxidative stress in the intestinal mucosa, suggesting a level two warning.
Citation Information
Patent Citations
Convolutional neural network-based human body behavior recognition method and recognition system
CN108345846A
Human body posture recognition method based on convolutional neural network
CN111723662A