Body part slapping recognition algorithm based on clothes-type acceleration sensor

By integrating multiple accelerometers into the garment itself, collecting and analyzing three-dimensional acceleration data, and combining vector synthesis and recognition models, the problem of determining the body part of the patting action in existing technologies has been solved, and accurate positioning of the patting action and the body part has been achieved.

CN122432622APending Publication Date: 2026-07-21SHENZHEN SHENKE CHUANG IND DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN SHENKE CHUANG IND DEV CO LTD
Filing Date
2026-03-16
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing accelerometer-based slapping or tapping motion recognition schemes struggle to accurately determine the specific body part corresponding to the slapping motion within the same recognition process. This results in insufficient spatial location information in the slapping recognition results, making it difficult to meet the need for distinguishing and applying slapping motions to different body parts.

Method used

Multiple accelerometers are integrated into the garment body and placed in areas corresponding to different parts of the human body. Each accelerometer is fixedly attached to its corresponding body part to collect three-dimensional acceleration data. Through vector synthesis calculation and time series data analysis, combined with preset threshold judgment and recognition models, the body part of the patting action is determined.

Benefits of technology

This technology enables the simultaneous determination of the slapping action and the corresponding body part in the same recognition process, forming a slapping recognition result that combines temporal features and spatial location information, thus solving the problem of insufficient information in the spatial location dimension of slapping recognition results in existing technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122432622A_ABST
    Figure CN122432622A_ABST
Patent Text Reader

Abstract

The present application relates to the field of action recognition and intelligent wearing technology, and particularly relates to a body part slapping recognition algorithm based on a clothes type acceleration sensor, comprising: collecting three-dimensional acceleration data of each body part by integrating multiple acceleration sensors in the garment body corresponding to the regions of different body parts of the human body; performing vector synthesis on the three-dimensional acceleration data to obtain acceleration vector and time sequence data, and determining a data segment of a suspected slapping action based on the acceleration peak value and the corresponding acceleration change rate within a time period; extracting slapping time sequence features from the suspected slapping action data segment, and inputting the slapping time sequence features into a slapping action recognition model to determine whether it is an effective slapping action; when it is determined to be an effective slapping action, determining the corresponding body part according to the integrated position of the acceleration sensor triggering the slapping action in the garment body and outputting the recognition result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of motion recognition and smart wearable technology, and in particular to a body part tapping recognition algorithm based on a clothing-type accelerometer. Background Technology

[0002] With the development of wearable device technology, human motion recognition solutions based on accelerometer sensors have been widely used in fields such as smart clothing, human interaction, motion monitoring, and behavior analysis. In existing technologies, one or more accelerometer sensors are usually set in wearable devices to collect acceleration signals generated during human movement, and the acceleration data is analyzed and processed to identify specific types of user movements, such as waving, tapping, or patting. Some solutions integrate sensors into wristbands, chest straps, or clothing to achieve continuous monitoring of human motion status, thereby providing data support for subsequent human-computer interaction or behavior analysis.

[0003] Existing accelerometer-based slapping or tapping motion recognition solutions mostly focus on recognizing the motion itself. They can usually only determine whether a slapping motion has occurred, but it is difficult to accurately determine the specific body part corresponding to the slapping motion in the same recognition process. This results in insufficient information in the spatial position dimension of the slapping recognition results, making it difficult to meet the needs of distinguishing and applying slapping motions to different body parts. Summary of the Invention

[0004] To overcome the above shortcomings, this invention provides a body part slapping recognition algorithm based on a clothing-type accelerometer, which aims to improve the problem that the slapping recognition results lack information in the spatial position dimension and are difficult to meet the needs of distinguishing and applying slapping actions of different body parts.

[0005] This invention provides the following technical solution: a body part tapping recognition algorithm based on a clothing-type accelerometer sensor, comprising the following steps: S1. Multiple acceleration sensors are integrated and set in the garment body in areas corresponding to different parts of the human body, so that each acceleration sensor is fixedly attached to the corresponding body part and collects the three-dimensional acceleration data of the corresponding body part respectively. S2. Perform vector synthesis calculations on the three-dimensional acceleration data to obtain acceleration vectors and time-series data; S3. Traverse the acceleration vector and time series data. When the acceleration vector and peak value in a certain time period exceed the preset acceleration peak value threshold, and the acceleration change rate corresponding to the peak value exceeds the preset acceleration change rate threshold, the time period is determined as the data segment of the suspected slapping action. S4. Extract slapping timing features from data segments suspected of slapping actions; S5. Input the tapping timing features into a preset tapping action recognition model, and output the recognition result of whether the suspected tapping action is a valid tapping action; S6. When the recognition result is a valid slapping action, the corresponding body part is determined and the recognition result is output based on the integrated position of the accelerometer that generated the valid slapping action in the garment body.

[0006] By adopting the above technical solution, multiple accelerometers are integrated into the garment body on a body part basis. After the patting action is recognized as a valid patting action, the corresponding body part is determined based on the integrated position of the accelerometer that triggered the patting action in the garment body. Thus, the patting action recognition and the determination of the patting body part are combined in the same recognition process. This makes the patting recognition result contain both action event information and corresponding body part information, solving the problem in the prior art that the patting recognition result lacks information in the spatial position dimension and is difficult to distinguish patting actions of different body parts.

[0007] Preferably, in step S1, the step of integrating multiple acceleration sensors into areas of the garment body corresponding to different parts of the human body includes: The garment itself is divided into multiple sensor integration areas corresponding to different parts of the human body; An accelerometer is installed in each sensor integration area; Each acceleration sensor is fixedly connected to the garment body, so that each acceleration sensor remains in close contact with the corresponding body part when the garment body is worn on the human body; Initialize and configure each accelerometer to enable it to acquire three-dimensional acceleration data.

[0008] Preferably, in step S1, the step of collecting three-dimensional acceleration data for corresponding body parts includes: Acceleration data for the corresponding body parts in the X-axis, Y-axis and Z-axis directions are collected by each accelerometer. The collected X-axis, Y-axis and Z-axis acceleration data are synchronized in time to form three-dimensional acceleration time-series data for the corresponding body parts; Three-dimensional acceleration time-series data are continuously acquired according to a preset sampling frequency.

[0009] Preferably, in step S2, the step of performing vector synthesis calculation on the three-dimensional acceleration data includes: Acquire X-axis acceleration data, Y-axis acceleration data, and Z-axis acceleration data of the corresponding body parts at the same time point; Squaring and summing the X-axis, Y-axis, and Z-axis acceleration data; Perform a square root operation on the summation result to obtain the acceleration vector and data at the corresponding time points; The acceleration vectors and data at each time point are arranged in chronological order to form acceleration vectors and time-series data.

[0010] Preferably, in step S3, the time period includes: According to the preset time window length, multiple time periods are divided in the acceleration vector and time series data using a sliding time window method; Peak values ​​were determined for the acceleration vectors and data in each time period.

[0011] Preferably, in step S3, the step of determining when the acceleration vector and peak value within a certain time period exceed a preset acceleration peak value threshold includes: Determine the time period for judgment from the acceleration vector and time series data; The maximum value of the acceleration vector sum within a time period is obtained as the peak value of the acceleration vector sum within the time period; The acceleration vector and peak value are compared with a preset acceleration peak value threshold. When the acceleration vector and peak value are greater than the acceleration peak value threshold, the corresponding time period is recorded.

[0012] Preferably, in step S3, the step where the rate of change of acceleration corresponding to the peak value exceeds a preset rate of change of acceleration threshold includes: Determine the time point corresponding to the acceleration vector and peak value; Based on acceleration vectors and time-series data, calculate the rate of change of acceleration at the time point corresponding to the peak value; The rate of change of acceleration is compared with a preset threshold for the rate of change of acceleration. When the rate of change of acceleration is greater than the threshold, the corresponding time period is identified as the data segment of the suspected slapping action.

[0013] Preferably, in step S4, the step of extracting the timing features of the slapping action from the data segment of the suspected slapping action includes: Obtain the acceleration vector and timing data within the data segment corresponding to the suspected slapping action; Determine the peak duration of the sum of acceleration vectors; Calculate the rising and falling slopes of the acceleration vector sum; Calculate the waveform symmetry of the sum of acceleration vectors; Determine the time interval between adjacent peaks.

[0014] Preferably, in step S5, the slapping action recognition model includes: Construct a feature vector based on the aforementioned tapping timing features; The feature vector is processed with preset feature discrimination parameters to obtain the corresponding discrimination value; The discrimination value is compared with at least one preset discrimination threshold, and the identification result of the suspected slapping action is determined based on the comparison result.

[0015] Preferably, in step S6, determining the corresponding body part and outputting the recognition result includes: Acquire identification information of at least one accelerometer sensor that generates a valid slapping motion; Based on the identification information of the accelerometer, query the pre-established correspondence between the sensor and body parts; Based on the correspondence table, determine the body part corresponding to the accelerometer; The output of valid slapping motions and their corresponding body parts is used as the recognition result.

[0016] The present invention has the following beneficial effects: 1. In this invention, multiple accelerometers are integrated into the garment body on a body part basis. After the patting action is recognized as a valid patting action, the corresponding body part is directly determined based on the integrated position of the accelerometer that triggered the patting action in the garment body. This realizes the integrated processing of patting action recognition and body part positioning in the same technical process. This allows the patting action to not only be recognized as an action event, but also to be synchronously associated with specific body part information, thereby forming a patting recognition result that has both time characteristics and spatial location information.

[0017] 2. In this invention, by introducing a time period division method based on a sliding time window during the suspected slapping action detection stage, and simultaneously performing threshold judgments on the acceleration vector and the acceleration change rate corresponding to the peak value within the same time period, the screening of suspected slapping actions is subject to the dual constraints of acceleration amplitude characteristics and instantaneous change characteristics. This forms a slapping action screening mechanism that takes into account both amplitude and change trend in continuous acceleration time series data, enabling the data segments of slapping actions to be effectively distinguished in the context of complex human movement.

[0018] 3. In this invention, by extracting slapping timing features such as peak duration, rising edge slope, falling edge slope, waveform symmetry, and time interval between adjacent peaks from the data segment of suspected slapping action, based on the time change process of the acceleration vector sum, this feature set is used as the input of the slapping action recognition model. This enables the recognition of slapping actions to be based on a multi-dimensional characterization of the temporal form of the slapping process, thereby forming a temporal modeling method oriented towards the characteristics of slapping actions. This provides a clear feature expression path for distinguishing slapping actions from other non-slapping actions. Attached Figure Description

[0019] Figure 1 This is a flowchart of the body part tapping recognition algorithm based on a clothing-type accelerometer proposed in this invention. Detailed Implementation

[0020] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] In a first embodiment of the present invention, the present invention provides a body part tapping recognition algorithm based on a clothing-type accelerometer sensor, such as... Figure 1 As shown, it includes the following steps: S1. Multiple acceleration sensors are integrated and set in the garment body in areas corresponding to different parts of the human body, so that each acceleration sensor is fixedly attached to the corresponding body part and collects the three-dimensional acceleration data of the corresponding body part respectively. Furthermore, in step S1, the step of integrating multiple acceleration sensors into areas of the garment body corresponding to different parts of the human body includes: The garment itself is divided into multiple sensor integration areas corresponding to different parts of the human body; An accelerometer is installed in each sensor integration area; Each acceleration sensor is fixedly connected to the garment body, so that each acceleration sensor remains in close contact with the corresponding body part when the garment body is worn on the human body; Initialize and configure each accelerometer to enable it to acquire three-dimensional acceleration data.

[0022] Furthermore, in step S1, the steps of collecting three-dimensional acceleration data for corresponding body parts include: Acceleration data for the corresponding body parts in the X-axis, Y-axis and Z-axis directions are collected by each accelerometer. The collected X-axis, Y-axis and Z-axis acceleration data are synchronized in time to form three-dimensional acceleration time-series data for the corresponding body parts; Three-dimensional acceleration time-series data are continuously acquired according to a preset sampling frequency.

[0023] Specifically, the body part tapping recognition method based on clothing-type accelerometers first integrates sensors and collects acceleration data for different body parts through the clothing itself. This step forms the basic data source for subsequent tapping action recognition and body part determination. In implementation, the clothing itself can be a top, a bodysuit, or other clothing structure that fits the human body. Based on the human anatomical structure and the possible location of the tapping action, multiple sensor integration areas corresponding to different body parts are pre-divided on it. These body parts can include, but are not limited to, the chest, back, abdomen, upper limbs, or lower limbs, so that the acceleration data collected in different areas can form a one-to-one correspondence between the physical location and the body part. After the garment body is divided into regions, an accelerometer is set in each sensor integration area. The accelerometer can be a triaxial accelerometer, which can simultaneously sense the wearer's acceleration changes in three mutually perpendicular directions. The accelerometer is connected to the garment body by sewing, embedding, gluing or other fixing methods, so that the accelerometer can move synchronously with the corresponding body part after the garment body is worn on the human body, and maintain a close fit with the corresponding body part during human activities, thereby ensuring that the collected acceleration data can truly reflect the motion characteristics of the corresponding body part under patting or other actions. After the physical integration of the sensors is completed, each accelerometer is initialized and configured to enter the acceleration data acquisition working state. The initialization and configuration process may include operations such as powering on the sensors, setting the working mode, setting the range, and establishing the data output interface to ensure that each accelerometer can stably output acceleration data during subsequent operation. On this basis, each accelerometer begins to collect acceleration data of its corresponding body part in the X-axis, Y-axis, and Z-axis directions. The X-axis, Y-axis, and Z-axis correspond to three mutually perpendicular directions in the sensor's own coordinate system. The acceleration data in these three directions together constitute three-dimensional acceleration data reflecting the motion state of the body part. During the acquisition of three-dimensional acceleration data, to ensure the consistency of data in different directions over time, the acceleration data acquired in the X-axis, Y-axis, and Z-axis directions are time-synchronized. This allows the three-axis acceleration data acquired at the same moment to form a complete three-dimensional acceleration data point, thereby obtaining the three-dimensional acceleration time-series data for the corresponding body part. In actual operation, the three-dimensional acceleration time-series data is continuously acquired according to a preset sampling frequency. The sampling frequency can be set according to the system's processing capacity and the characteristics of motion changes to ensure that the complete acceleration change process can be obtained when the human body performs instantaneous actions such as slapping. Through the above method, the acceleration sensors corresponding to different body parts on the garment continuously output their respective three-dimensional acceleration time-series data, providing a reliable data foundation for subsequent vector synthesis of acceleration data, screening of suspected slapping actions, and extraction of slapping time-series features. This implementation method utilizes clothing as a sensor integration carrier to achieve synchronous acquisition and unified management of acceleration information from different parts of the human body. This ensures that the acquired three-dimensional acceleration data has a clear correspondence in both spatial location and time dimension, thus providing complete and continuous data input for subsequent steps of the body part tapping recognition method based on clothing-type acceleration sensors.

[0024] S2. Perform vector synthesis calculations on the three-dimensional acceleration data to obtain acceleration vectors and time-series data; Furthermore, in step S2, the step of performing vector synthesis calculation on the three-dimensional acceleration data includes: Acquire X-axis acceleration data, Y-axis acceleration data, and Z-axis acceleration data of the corresponding body parts at the same time point; Squaring and summing the X-axis, Y-axis, and Z-axis acceleration data; Perform a square root operation on the summation result to obtain the acceleration vector and data at the corresponding time points; The acceleration vectors and data at each time point are arranged in chronological order to form acceleration vectors and time-series data.

[0025] Specifically, the body part slapping recognition method based on clothing-type accelerometers, after collecting three-dimensional acceleration data of different body parts, performs vector synthesis calculation on the collected three-dimensional acceleration data to obtain acceleration vectors and time-series data that can reflect the overall acceleration change characteristics of the corresponding body parts. This process is used to convert acceleration information in different directions into a single frame value, thereby providing a unified data foundation for subsequent analysis of the temporal characteristics of slapping actions. During system operation, for an accelerometer corresponding to a specific body part on the garment, the three-dimensional acceleration data collected at the same time point include acceleration data in the X-axis direction, acceleration data in the Y-axis direction, and acceleration data in the Z-axis direction. These three data points are synchronized in time, corresponding to the motion state of the body part at the same moment. The X-axis acceleration can be expressed as... The acceleration in the Y-axis direction can be expressed as The acceleration in the Z-axis direction can be expressed as The above , and All three represent the instantaneous acceleration value at the corresponding time point, and their units are consistent. After obtaining triaxial acceleration data at the same time point, the acceleration data in the X-axis, Y-axis, and Z-axis directions are squared and summed. Then, the square root of the sum of squares is performed to calculate the acceleration vector sum at the corresponding time point. The acceleration vector sum can be expressed as... The calculation formula is as follows: ; In this formula, This represents the acceleration vector and value at the corresponding time point. This represents the acceleration component along the X-axis at that time point. This represents the acceleration component in the Y-axis direction at that time point. This represents the acceleration component in the Z-axis direction at that time point. Through the above calculation method, the acceleration components in the three-dimensional direction are uniformly converted into a single scalar form of acceleration vector sum, thereby eliminating the influence of different direction choices on the subsequent judgment process. After calculating the acceleration vector at a single time point, the system arranges the acceleration vectors and data corresponding to multiple consecutive time points in chronological order, forming acceleration vectors and time-series data corresponding to the time axis. This acceleration vector and time-series data reflects the change in the overall acceleration intensity of the corresponding body part over a period of time. In practical applications, the acceleration vector and time-series data can be kept consistent with the sampling frequency set in the previous steps, thereby ensuring that the intervals between each vector and data point on the time axis are clear and the order is continuous, providing directly usable data input for subsequent peak analysis, rate of change calculation, and tapping time-series feature extraction based on time periods. Through the above vector synthesis calculation process, the original three-dimensional acceleration data is transformed into a unified form of acceleration vector and time series data, so that the subsequent judgment of the slapping action can be carried out based on a single acceleration intensity index. Thus, a continuous data processing link from three-dimensional data acquisition to one-dimensional time series analysis is formed in the overall operation of the method.

[0026] S3. Traverse the acceleration vector and time series data. When the acceleration vector and peak value in a certain time period exceed the preset acceleration peak value threshold, and the acceleration change rate corresponding to the peak value exceeds the preset acceleration change rate threshold, the time period is determined as the data segment of the suspected slapping action. Furthermore, in step S3, a certain time period includes: According to the preset time window length, multiple time periods are divided in the acceleration vector and time series data using a sliding time window method; Peak values ​​were determined for the acceleration vectors and data in each time period.

[0027] Furthermore, in step S3, the step of determining when the acceleration vector and peak value within a certain time period exceed a preset acceleration peak value threshold includes: Determine the time period for judgment from the acceleration vector and time series data; The maximum value of the acceleration vector sum within a time period is obtained as the peak value of the acceleration vector sum within the time period; The acceleration vector and peak value are compared with a preset acceleration peak value threshold. When the acceleration vector and peak value are greater than the acceleration peak value threshold, the corresponding time period is recorded.

[0028] Furthermore, in step S3, the step where the rate of change of acceleration corresponding to the peak value exceeds a preset rate of change of acceleration threshold includes: Determine the time point corresponding to the acceleration vector and peak value; Based on acceleration vectors and time-series data, calculate the rate of change of acceleration at the time point corresponding to the peak value; The rate of change of acceleration is compared with a preset threshold for the rate of change of acceleration. When the rate of change of acceleration is greater than the threshold, the corresponding time period is identified as the data segment of the suspected slapping action.

[0029] Specifically, the body part slapping recognition method based on clothing-type accelerometers obtains the acceleration vector and time-series data of the corresponding body part, and then performs traversal and segmentation analysis on the acceleration vector and time-series data to locate the data segment of suspected slapping action in the continuous time-series signal. This process adopts a combination of time window segmentation and dual threshold judgment, dividing the continuous data into multiple mutually continuous or partially overlapping time periods in the time dimension, and performing peak value judgment and rate of change judgment in each time period, thereby marking the time period that meets the judgment conditions as the data segment of suspected slapping action for subsequent slapping time-series feature extraction and recognition model discrimination. In implementation, the acceleration vector and time-series data can be represented as a set of scalar sequences arranged in time order. ,in Indicates a point in time The acceleration vector and value, Indicates the first Each sampling time point The sampling point number is used; the interval between time points can be determined by the sampling frequency, which can be optionally set according to the system processing capacity and the speed of action change; the time window length is preset to form a time period for judgment on the time series data. ,in This indicates the time range covered by each time window; optionally, the window sliding step size can also be set. ,in This represents the time interval between two consecutive window start times; under the sliding window mechanism, the system uses the start time... Based on this, construct the first Time period ,in Non-negative integer index, Indicates the first The system obtains multiple time periods for judgment by windowing the acceleration vector and time series data, and processes each time period in turn during the traversal process to achieve coverage analysis of the entire time series data. Within each time period, the system performs peak value determination on the acceleration vector and data corresponding to that time period; specifically, the system determines the peak value from the time period... Extract the corresponding vectors and sequences from the covered set of sampling points. And calculate the maximum value within that time period as the peak value. ;in Indicates time period The acceleration vector and peak value within the window; this peak value can be obtained through traversal comparison, i.e., comparing point by point within the window and retaining the current maximum value, or through an optional extreme value search method; subsequently, the peak value is... Compared with the preset peak acceleration threshold Comparison, among which This represents the threshold parameter used for peak value determination; when At that time, the time period Record the candidate time periods that meet the peak condition, and record the time points corresponding to the peak values. ,in And satisfy This is so that subsequent calculations of the rate of change and further determination can be made around the peak time point; After determining the peak condition, the system further calculates the rate of change of acceleration at the time point corresponding to the peak and compares it with a preset threshold for the rate of change of acceleration to form a second judgment condition. In one possible implementation, the rate of change of acceleration is calculated in discrete difference form, and the system calculates the rate of change of acceleration at the peak time point. Values ​​are taken at adjacent sampling points, and the rate of change is calculated. ;in This represents the rate of change of acceleration at the peak time point; to avoid confusion of signs, the sampling time interval is set to 1. ,in This represents the time difference between two adjacent sampling time points; when the peak time point... The corresponding serial number is When, rate of change Alternatively, it can be calculated as follows: ; In this formula, This represents the acceleration vector and value at the peak time point. This represents the sum of the acceleration vectors and values ​​at the sampling point preceding the peak time point. Indicates the sampling time interval. This indicates the operation of taking the absolute value; in another optional implementation, the central difference method can also be used to sample and calculate the rate of change on both sides of the peak time point. There are no restrictions on the calculation method here, but it is necessary to ensure that the rate of change has a definite correspondence with the time unit and can be used for comparison with the threshold. In obtaining the rate of change Then, it is compared with a preset acceleration rate of change threshold. Comparison, among which This represents the threshold parameter used for rate of change determination; when At that time, determine the time period Simultaneously satisfying both the peak threshold condition and the rate of change threshold condition, this time period is identified as the data segment suspected of being a slapping action; when Time, time period Data segments not identified as suspected slapping actions are traversed and judged for the next time period. Through the continuous processing flow of sliding time window division, peak extraction and threshold comparison, and rate of change calculation and threshold comparison, the system locates and marks suspected slapping action data segments in continuous acceleration vector and time series data, and uses the located suspected slapping action data segments as the data input source for subsequent slapping time series feature extraction steps.

[0030] S4. Extract slapping timing features from data segments suspected of slapping actions; Furthermore, in step S4, the step of extracting the timing features of the slapping action from the data segment containing the suspected slapping action includes: Obtain the acceleration vector and timing data within the data segment corresponding to the suspected slapping action; Determine the peak duration of the sum of acceleration vectors; Calculate the rising and falling slopes of the acceleration vector sum; Calculate the waveform symmetry of the sum of acceleration vectors; Determine the time interval between adjacent peaks.

[0031] Specifically, the body part slapping recognition method based on clothing-type accelerometers performs slapping timing feature extraction processing on the data segment corresponding to the suspected slapping action after locating the suspected slapping action data segment. This process converts the acceleration vector and timing signal within the data segment into a feature set that can characterize the temporal structure of the slapping process. The processing revolves around the peak shape of the suspected slapping action, sequentially obtaining features such as peak duration, rising edge slope, falling edge slope, waveform symmetry, and time interval between adjacent peaks. These features are then used as inputs to the subsequent slapping action recognition model, thus forming a continuous processing link from timing data to feature expression in the overall process of the method. In implementation, the system first acquires the acceleration vector and timing data within the data segment corresponding to the suspected slapping action. This acceleration vector and timing data can be represented as a sequence arranged in chronological order. ,in Indicates a point in time The acceleration vector and value, Indicates the first Each sampling time point The sampling point number is used; the data segment corresponding to the suspected slapping action can be determined by the start time. With end time Defining, among which Indicates the start time of the data segment. Indicates the end time of the data segment, and satisfies... The system analyzes and processes vectors and sequences within the data segment, and optionally performs smoothing or denoising preprocessing on the sequences when necessary. For example, it uses moving average or median filtering to suppress short-term outliers, so as to ensure that peak location and feature calculation have a definite data basis. After acquiring the data segment sequence, the system determines the peak position and peak amplitude within the data segment, and uses the peak as a reference point for calculating time series features; the peak amplitude can be expressed as... The time point corresponding to the peak can be represented as ,in ,and To meet The system determines the time point; after the peak value is determined, it further determines the peak duration to characterize the duration interval of the peak value on the time axis; in one possible implementation, an amplitude scaling factor for duration calculation is pre-set. ,in A real number between 0 and 1, such as 0.5 or other proportional values; the system uses As the amplitude benchmark for determining duration, the intersection times of the sequence and the amplitude benchmark are searched on both sides of the peak time point; the intersection time on the left side of the peak is denoted as... The time of the intersection point to the right of the peak is recorded as ,in This indicates the first time the condition is met when searching from the peak to the left. The point in time, This indicates the first time the condition is met when searching from the peak to the right. The time point; the peak duration is denoted as , and according to Calculation, where Indicates the duration of the peak; After obtaining the peak duration, the system calculates the rising edge slope and falling edge slope to characterize the rate of signal change near the peak; the rising edge slope can be expressed as... The slope of the falling edge can be expressed as ,in Indicates from arrive The rate of change, Indicates from arrive The rate of change; in one possible implementation, the rising edge slope according to Calculate the slope of the falling edge according to Calculation; in the above definition, Indicates a point in time Vector and numerical values, Indicates a point in time Vectors and values; when implemented using discrete sampling sequences, time points , , It can be corresponding to the sampling point time. The numerator and denominator in the slope calculation have clear physical meaning, thus realizing the quantitative expression of the changing trend of the rising edge and falling edge; Based on the slope feature calculation, the system further calculates waveform symmetry to characterize the consistency of the shapes on both sides of the peak; waveform symmetry can be expressed as... ,in Here, the parameter is used to reflect the difference between the left and right waveforms; in one possible implementation, waveform symmetry is determined based on the relationship between the rising edge duration and the falling edge duration, where the rising edge duration is denoted as... The duration of the falling edge is denoted as And define waveform symmetry as In this definition, This indicates the absolute value operation. This indicates the peak duration. In another possible implementation, waveform symmetry can also be calculated by the differential area or correlation coefficient of the waveforms on the left and right sides of the peak after alignment. No specific implementation is restricted here, but it is necessary to ensure that the waveform symmetry calculation is based on the same data segment and revolves around the waveform shape on the left and right sides of the peak. In scenarios involving continuous tapping or multiple local peaks within a data segment, the system can also determine the time interval between adjacent peaks to characterize the temporal rhythm of peak occurrence. In implementation, the system detects multiple local peak positions within a data segment, and the time points corresponding to the local peak sequence can be represented as... ,in Indicates the first The time points corresponding to the local peaks The peak index is used; the time interval between adjacent peaks can be represented as... ,in This represents the time interval between two adjacent local peaks. Local peak detection can be achieved using a neighborhood comparison method. For example, within an optional neighborhood width, it can be determined whether the center point is greater than other points in the neighborhood to obtain the location of the local peak, thereby enabling the extraction of time interval features of multi-peak structures without limiting specific numerical parameters. Through the above processing steps, the system converts the acceleration vector and timing data within the suspected slapping motion data segment into a set of slapping timing characteristic parameters, including peak duration. Rising slope , slope of falling edge Waveform symmetry and the time interval between adjacent peaks The feature set is then used as input data for the slapping action recognition model to enable subsequent discrimination of suspected slapping actions.

[0032] S5. Input the patting timing features into the preset patting action recognition model, and output the recognition result of whether the suspected patting action is a valid patting action; Furthermore, in step S5, the slapping action recognition model includes: Construct feature vectors based on the temporal characteristics of the tapping action; The feature vector is processed with the preset feature discrimination parameters to obtain the corresponding discrimination value; The discrimination value is compared with at least one preset discrimination threshold, and the identification result of the suspected slapping action is determined based on the comparison result.

[0033] Specifically, the body part slapping recognition method based on clothing-type accelerometers extracts the slapping timing features from suspected slapping action data segments, then inputs the obtained slapping timing features into a preset slapping action recognition model to generate the recognition result of the suspected slapping action. The slapping action recognition model, as a mapping module from timing features to discrimination results, can be implemented through rule-based operations and threshold comparisons. Its operation process includes three stages: feature vector construction, feature discrimination parameter calculation, and discrimination threshold comparison. Thus, without limiting a specific machine learning framework, an achievable discrimination link is formed, and an effective basis for judging slapping actions is provided for subsequent body part determination steps. In implementation, the timing features of the slapping action can be derived from calculations of parameters such as peak duration, rising edge slope, falling edge slope, waveform symmetry, and time interval between adjacent peaks in data segments suspected of slapping actions. To facilitate model calculation and unify input representation, the system organizes the timing features of the slapping action into vectors, constructing feature vectors. ;in This represents a column vector or row vector composed of multiple feature components. or In this definition, Indicates the number of feature components. Indicates the first The numerical values ​​of each feature component; the feature components can be filled in sequentially according to a preset order, for example, the peak duration can be corresponding to a certain component, the rising edge slope and the falling edge slope can be corresponding to two components, the waveform symmetry can be corresponding to a certain component, and the time interval between adjacent peaks can be corresponding to one or more components; when there are multiple adjacent peak time intervals, a fixed length filling method or a statistical summarization method can be used to form feature components, for example, the average time interval, the minimum time interval or the most recent time interval can be selected as the component input, so as to ensure that the feature vector dimension remains consistent during the operation; After the feature vector is constructed, the system performs calculations on the feature vector and preset feature discrimination parameters to obtain a discrimination value. The feature discrimination parameters can be pre-stored in the recognition model and loaded into memory when the device starts or the model is initialized. The feature discrimination parameters may include a weight vector, a parameter matrix, a bias term, or other parameter sets used to calculate the discrimination value. For ease of disclosure and implementation, in one possible implementation, the feature discrimination parameters include a weight vector. With bias term ,in This represents a parameter vector with the same dimensions as the feature vector. This represents the scalar bias parameter; the system obtains the discriminant value by performing an inner product operation on the feature vector and the weight vector, and then adding the bias term. The calculation relationship can be expressed as: ; In this formula, Indicates the discriminant value. This represents the transpose of the weight vector. Represents the eigenvector. This represents the bias term; in another possible implementation, the feature discrimination parameter can also be a matrix parameter. With bias vector The discriminant vector is obtained through linear transformation. ,at this time At least one component in can be used as the discriminant value for subsequent threshold comparison; the above different parameter forms all belong to the operation scope of feature vector and feature discriminant parameter. The system can choose one according to the specific implementation needs, but all require that the operation process and parameter dimension have a definite correspondence. After obtaining the discrimination value, the system compares the discrimination value with at least one preset discrimination threshold, and determines the recognition result of the suspected slapping action based on the comparison result; the preset discrimination threshold can be expressed as: ,in This represents the threshold parameter used for classification; when using a single threshold method, the system will determine the discriminant value. With threshold Compare and output the recognition result based on the comparison result. ;in The recognition result can be represented using a binary label, which can be represented as follows: ,in This indicates that a suspected slapping motion was determined to be a valid slapping motion. This indicates that a suspected slapping motion is determined to be an invalid slapping motion; under this determination method, the following discrimination rule may be selected: when Time output ,when Time output When using a multi-threshold determination method, the system can set threshold ranges. ,in and For different threshold parameters, the system outputs the corresponding recognition result based on the position of the discrimination value falling into the interval, thereby adapting to different discrimination strategies. In practical applications, the discrimination threshold can be stored together with the feature discrimination parameters as model configuration parameters, and different configuration files can be used for different body parts or different clothing models to ensure that the relationship between model input and output is deterministic during runtime. Through the above operation process, the system extracts the timing features of the suspected slapping action from the data segment into a feature vector expression, calculates the discrimination value using preset feature discrimination parameters, and outputs the recognition result of the suspected slapping action by comparing it with the preset discrimination threshold. The recognition result can be used as the input signal for subsequent steps for further processing. For example, when the recognition result shows that the suspected slapping action is a valid slapping action, the system enters the body part determination process and generates the corresponding body part output information, thereby realizing continuous processing and application connection from feature input to recognition output in the overall operation of the method.

[0034] S6. When the recognition result is a valid slapping action, the corresponding body part is determined and the recognition result is output based on the integrated position of the accelerometer that generated the valid slapping action in the garment body.

[0035] Furthermore, in step S6, determining the corresponding body part and outputting the recognition result includes: Acquire identification information of at least one accelerometer sensor that generates a valid slapping motion; Based on the identification information of the accelerometer, query the pre-established correspondence between the sensor and body parts; Based on the correspondence table, determine the body part corresponding to the accelerometer; The output of valid slapping motions and their corresponding body parts is used as the recognition result.

[0036] Specifically, after obtaining the recognition results output by the patting action recognition model, the body part patting recognition method based on clothing accelerometers enters the body part determination and result output process when the recognition results indicate that the suspected patting action is a valid patting action. This process is based on the integrated position of the accelerometer in the clothing body, and completes the mapping through the sensor identification information and the pre-established correspondence between the sensor and the body part, thereby realizing the continuous connection from valid patting action determination to body part identification output in the overall operation chain of the method. During implementation, each accelerometer on the garment is assigned a unique identifier during the integration phase. This identifier can be a number, address, port number, communication identifier, or other unique code that identifies the individual sensor. This identifier remains unchanged during system operation. When the slapping action recognition model outputs a valid slapping action recognition result, the system obtains the identifier of at least one accelerometer from the participating accelerometers. When only one accelerometer triggers a valid slapping action, the system obtains the identifier corresponding to that accelerometer. When multiple accelerometers trigger valid slapping action recognition within the same or adjacent time periods, the system can obtain the identifiers of multiple accelerometers and form an identifier set for subsequent correspondence lookup and body part determination. To convert sensor identification information into body part information, the system pre-establishes a correspondence between sensors and body parts in its memory. This correspondence can be generated and stored during factory configuration, wearable calibration, or system initialization. Its data structure can be a mapping table, a set of key-value pairs, an index array, or other searchable data structures. The specific data structure form is not limited here, but it is required to be able to use sensor identification information as a search key and return the corresponding body part identification. The body part identification can be represented by text labels, encoded values, or enumeration types. For example, the names or codes of parts such as chest, back, abdomen, upper arm, forearm, thigh, and calf can be used as body part identifications to ensure that the output information has definite semantics. During system operation, after obtaining the identification information of at least one accelerometer sensor, the system uses this identification information as a retrieval condition to query the pre-established correspondence between sensors and body parts, and obtains the body part identifier corresponding to the identification information. When multiple identification information exists, the system can perform a query on each identification information separately and obtain multiple body part identifiers. In one possible implementation, the system establishes an association between the queried body part identifiers and the corresponding sensor identification information to form a data structure for output. In another possible implementation, when multiple sensor identifiers correspond to multiple body part identifiers, the system can optionally determine the final body part identifier according to a preset selection rule, such as prioritizing sensors corresponding to peak values ​​within a time period, prioritizing the size of the discrimination value, or prioritizing a preset priority table. The specific form of the selection rule is not limited here, but the selection rule is required to be a pre-set rule that can be executed during operation. After determining the body part, the system outputs the valid patting action and its corresponding body part as the recognition result. The output of the recognition result can be in the form of event message, data packet, fielded record, or control command, etc., where the event message can include a valid patting action identifier and a body part identifier, and the data packet can include fields such as timestamp, sensor identifier, body part identifier, and valid patting action label. The recognition result can be sent to a host computer, mobile terminal application, wearable device main control module, or other business processing module so that the interactive logic related to body part patting can be executed at the application layer. Through the above processing flow, the system establishes a correlation between the valid patting action judgment and the integrated position of the acceleration sensor in the garment body, and outputs the body part recognition result based on the pre-established correspondence, thereby completing the operation and application connection of step S6.

[0037] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A body part tapping recognition algorithm based on a clothing-type accelerometer sensor, characterized in that, Includes the following steps: S1. Multiple acceleration sensors are integrated and set in the garment body in areas corresponding to different parts of the human body, so that each acceleration sensor is fixedly attached to the corresponding body part and collects the three-dimensional acceleration data of the corresponding body part respectively. S2. Perform vector synthesis calculations on the three-dimensional acceleration data to obtain acceleration vectors and time-series data; S3. Traverse the acceleration vector and time series data. When the acceleration vector and peak value in a certain time period exceed the preset acceleration peak value threshold, and the acceleration change rate corresponding to the peak value exceeds the preset acceleration change rate threshold, the time period is determined as the data segment of the suspected slapping action. S4. Extract slapping timing features from data segments suspected of slapping actions; S5. Input the tapping timing features into a preset tapping action recognition model, and output the recognition result of whether the suspected tapping action is a valid tapping action; S6. When the recognition result is a valid slapping action, the corresponding body part is determined and the recognition result is output based on the integrated position of the accelerometer that generated the valid slapping action in the garment body.

2. The body part tapping recognition algorithm based on a clothing-type accelerometer according to claim 1, characterized in that, In step S1, the step of integrating multiple acceleration sensors into areas of the garment body corresponding to different parts of the human body includes: The garment itself is divided into multiple sensor integration areas corresponding to different parts of the human body; An accelerometer is installed in each sensor integration area; Each acceleration sensor is fixedly connected to the garment body, so that each acceleration sensor remains in close contact with the corresponding body part when the garment body is worn on the human body; Initialize and configure each accelerometer to enable it to acquire three-dimensional acceleration data.

3. The body part tapping recognition algorithm based on a clothing-type accelerometer according to claim 1, characterized in that, In step S1, the step of collecting three-dimensional acceleration data for corresponding body parts includes: Acceleration data for the corresponding body parts in the X-axis, Y-axis and Z-axis directions are collected by each accelerometer. The collected X-axis, Y-axis and Z-axis acceleration data are synchronized in time to form three-dimensional acceleration time-series data for the corresponding body parts; Three-dimensional acceleration time-series data are continuously acquired according to a preset sampling frequency.

4. The body part tapping recognition algorithm based on a clothing-type accelerometer according to claim 1, characterized in that, In step S2, the step of performing vector synthesis calculation on the three-dimensional acceleration data includes: Acquire X-axis acceleration data, Y-axis acceleration data, and Z-axis acceleration data of the corresponding body parts at the same time point; Squaring and summing the X-axis, Y-axis, and Z-axis acceleration data; Perform a square root operation on the summation result to obtain the acceleration vector and data at the corresponding time points; The acceleration vectors and data at each time point are arranged in chronological order to form acceleration vectors and time-series data.

5. The body part tapping recognition algorithm based on a clothing-type accelerometer according to claim 1, characterized in that, In step S3, the certain time period includes: According to the preset time window length, multiple time periods are divided in the acceleration vector and time series data using a sliding time window method; Peak values ​​were determined for the acceleration vectors and data in each time period.

6. The body part tapping recognition algorithm based on a clothing-type accelerometer according to claim 1, characterized in that, In step S3, the step of the acceleration vector and peak value exceeding a preset acceleration peak value threshold within a certain time period includes: Determine the time period for judgment from the acceleration vector and time series data; The maximum value of the acceleration vector sum within a time period is obtained as the peak value of the acceleration vector sum within the time period; The acceleration vector and peak value are compared with a preset acceleration peak value threshold. When the acceleration vector and peak value are greater than the acceleration peak value threshold, the corresponding time period is recorded.

7. The body part tapping recognition algorithm based on a clothing-type accelerometer according to claim 1, characterized in that, In step S3, the step where the rate of change of acceleration corresponding to the peak value exceeds a preset rate of change of acceleration threshold includes: Determine the time point corresponding to the acceleration vector and peak value; Based on acceleration vectors and time-series data, calculate the rate of change of acceleration at the time point corresponding to the peak value; The rate of change of acceleration is compared with a preset threshold for the rate of change of acceleration. When the rate of change of acceleration is greater than the threshold, the corresponding time period is identified as the data segment of the suspected slapping action.

8. The body part tapping recognition algorithm based on a clothing-type accelerometer according to claim 1, characterized in that, In step S4, the step of extracting the timing features of the slapping action from the data segment of the suspected slapping action includes: Obtain the acceleration vector and timing data within the data segment corresponding to the suspected slapping action; Determine the peak duration of the sum of acceleration vectors; Calculate the rising and falling slopes of the acceleration vector sum; Calculate the waveform symmetry of the sum of acceleration vectors; Determine the time interval between adjacent peaks.

9. The body part tapping recognition algorithm based on a clothing-type accelerometer according to claim 1, characterized in that, In step S5, the slapping action recognition model includes: Construct a feature vector based on the aforementioned tapping timing features; The feature vector is processed with preset feature discrimination parameters to obtain the corresponding discrimination value; The discrimination value is compared with at least one preset discrimination threshold, and the identification result of the suspected slapping action is determined based on the comparison result.

10. The body part tapping recognition algorithm based on a clothing-type accelerometer according to claim 1, characterized in that, In step S6, determining the corresponding body part and outputting the recognition result includes: Acquire identification information of at least one accelerometer sensor that generates a valid slapping motion; Based on the identification information of the accelerometer, query the pre-established correspondence between the sensor and body parts; Based on the correspondence table, determine the body part corresponding to the accelerometer; The output of valid slapping motions and their corresponding body parts is used as the recognition result.