Motion state recognition method, device, electronic device and storage medium

By extracting the acceleration and air pressure data of the terminal device, using a multi-model recognition method to construct a motion time sequence and performing denoising processing, the problem of misrecognition of motion state recognition in the existing technology is solved, and the recognition accuracy and vertical space motion are improved. Recognition ability.

CN115127545BActive Publication Date: 2024-09-24GUANGDONG XIAOTIANCAI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210333905.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-31
Publication Date
2024-09-24
Estimated Expiration
2042-03-31

AI Technical Summary

Technical Problem

The existing technology is prone to misrecognition in motion state recognition, especially when the types of motion are diverse, and it is difficult to accurately identify the motion state of the terminal device.

Method used

By obtaining the acceleration data and air pressure data of the terminal device, the motion state features are extracted, and a multi-model recognition method is used, including feature input, time series construction and denoising processing, to determine the target motion state and improve the recognition accuracy.

Benefits of technology

It improves the accuracy of motion state recognition, increases the accuracy of recognition of vertical space motion states, reduces the computing pressure on terminal equipment, and reduces data transmission errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000
    Figure 00000000_0000
Patent Text Reader

Abstract

The embodiment of the present application discloses a motion state recognition method, device, electronic device and storage medium, the method comprising: obtaining motion state characteristics of a terminal device at each moment in a first time period; inputting the motion state characteristics at each moment into a first model, and determining the motion state corresponding to each moment according to the motion state characteristics at each moment through the first model; inputting the motion state corresponding to each moment into a second model, and constructing a motion time series for the motion state corresponding to each moment in chronological order through the second model, and denoising the motion time series; determining the target motion state of the terminal device in the first time period according to the denoised motion time series. Implementing the embodiment of the present application can improve the accuracy of the target motion state outputted in the end, and increase the number of identifiable motion states.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of motion recognition technology, and in particular to a motion state recognition method, device, electronic device and storage medium. Background Art

[0002] In recent years, as the functions of terminal devices have become more and more numerous, terminal devices can provide users with better exercise suggestions by identifying the user's exercise status. In the related art, the exercise status is generally identified by sensors such as accelerometers and gyroscopes, but the types of exercise status that can be identified are limited. As the types of exercise that people can perform increase, it is easy to make misidentifications when using existing technologies to identify the exercise status. Summary of the invention

[0003] The embodiments of the present application disclose a motion state recognition method, device, electronic device and storage medium, which can improve the accuracy of motion state recognition.

[0004] A first aspect of an embodiment of the present application provides a motion state recognition method, the method comprising:

[0005] Acquire motion state characteristics of the terminal device at each moment in the first time period, wherein the motion state characteristics are extracted based on motion state data collected by the terminal device, wherein the motion state data includes acceleration data and air pressure data;

[0006] Inputting the motion state characteristics at each moment into a first model, and determining the motion state corresponding to each moment according to the motion state characteristics at each moment through the first model;

[0007] Inputting the motion states corresponding to the respective moments into a second model, constructing a motion time series for the motion states corresponding to the respective moments in chronological order through the second model, and performing denoising processing on the motion time series;

[0008] The target motion state of the terminal device in the first time period is determined according to the motion time series after denoising.

[0009] As an optional implementation manner, in the first aspect of this embodiment, determining the motion state corresponding to each moment according to the motion state characteristics at each moment by using the first model includes:

[0010] Determine, by the first model, the probability that each moment corresponds to each preset motion state according to the motion state characteristics at each moment, wherein the sum of the probabilities corresponding to each preset motion state is 1;

[0011] Compare the probabilities of each moment corresponding to each preset motion state with the probability thresholds corresponding to each preset motion state, and the probability thresholds corresponding to each preset motion state are all greater than 0.5;

[0012] If the probability that the first moment corresponds to the first motion state is greater than the probability threshold corresponding to the first motion state, the motion state corresponding to the first moment is determined as the first motion state, the first moment is any one of the moments, and the first motion state is any one of the preset motion states.

[0013] As an optional implementation manner, in the first aspect of this embodiment, before comparing the probabilities at which the respective moments correspond to the respective preset motion states with the probability thresholds corresponding to the respective preset motion states, the method further includes:

[0014] Acquire historical status data corresponding to the terminal device, wherein the historical status data includes motion states corresponding to a plurality of historical moments;

[0015] Classifying each preset motion state according to the number of historical moments corresponding to each preset motion state to obtain a first type of motion state and a second type of motion state, wherein the number of historical moments corresponding to the first type of motion state is greater than the number of historical moments corresponding to the second type of motion state;

[0016] The probability threshold corresponding to each preset motion state included in the first category of motion state and the probability threshold corresponding to each preset motion state included in the second category of motion state are adjusted so that the probability threshold corresponding to each preset motion state included in the second category of motion state is greater than the probability threshold corresponding to each preset motion state included in the first category of motion state.

[0017] As an optional implementation manner, in the first aspect of this embodiment, the denoising process on the motion time series includes:

[0018] Determine the abnormal moment according to the motion state corresponding to each moment in the motion time series, the motion state corresponding to the abnormal moment is different from the motion state corresponding to the moment before the abnormal moment and the motion state corresponding to the moment after the abnormal moment, and the motion state corresponding to the previous moment is the same as the motion state corresponding to the moment after the abnormal moment;

[0019] The motion state corresponding to the abnormal moment is corrected according to the motion state corresponding to the previous moment or the motion state corresponding to the next moment.

[0020] As an optional implementation manner, in the first aspect of this embodiment, before acquiring the motion state characteristics of the terminal device at each moment, the method further includes:

[0021] Cleaning the motion state data collected by the terminal device according to the state value interval to obtain cleaned motion state data, wherein the cleaned motion state data is motion state data in the state value interval;

[0022] Separating the acceleration data in the cleaned motion state data to obtain multi-axis acceleration data;

[0023] The motion state characteristics of the terminal device at each moment in the first time period are extracted from the multi-axis acceleration data and the air pressure data in the motion state data after cleaning.

[0024] As an optional implementation, in the first aspect of this embodiment, extracting the motion state features of the terminal device at each moment in the first time period from the multi-axis acceleration data and the air pressure data included in the motion data set includes:

[0025] Performing data segmentation on each axis acceleration data in the multi-axis acceleration data according to a preset repetition rate and a sample time unit to obtain segmented acceleration data;

[0026] Segmenting the air pressure data in the cleaned motion state data according to the sample time unit to obtain segmented air pressure data;

[0027] The motion state characteristics of the terminal device at each moment in the first time period are extracted from the segmented acceleration data and the segmented air pressure data.

[0028] As an optional implementation manner, in the first aspect of this embodiment, determining the target motion state of the terminal device in the first time period according to the motion time series after denoising includes:

[0029] Determine the number of moments corresponding to each motion state in the motion time series after denoising, and determine the motion state with the largest proportion in the motion time series after denoising according to the number of moments corresponding to each motion state;

[0030] If the motion state with the largest proportion has a corresponding proportion greater than a proportion threshold in the motion time series after the denoising process, the motion state with the largest proportion is determined as the target motion state of the terminal device in the first time period.

[0031] A second aspect of an embodiment of the present application provides a motion state recognition device, the device comprising:

[0032] A feature acquisition module, used to acquire motion state features of a terminal device at each moment in a first time period, wherein the motion state features are extracted based on motion state data collected by the terminal device, wherein the motion state data includes acceleration data and air pressure data;

[0033] A state acquisition module, used for inputting the motion state characteristics at each moment into a first model, and determining the motion state corresponding to each moment according to the motion state characteristics at each moment through the first model;

[0034] a denoising processing module, used for inputting the motion states corresponding to the respective moments into a second model, constructing a motion time series for the motion states corresponding to the respective moments in chronological order through the second model, and performing denoising processing on the motion time series;

[0035] A state determination module is used to determine the target motion state of the terminal device within the first time period according to the motion time series after denoising.

[0036] A third aspect of an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor implements any one of the motion state recognition methods disclosed in the embodiments of the present application.

[0037] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, any one of the motion state recognition methods disclosed in the embodiment of the present application is implemented.

[0038] Compared with the related art, the embodiments of the present application have the following beneficial effects:

[0039] The motion state characteristics of the terminal device at each moment in the first time period are obtained, and the motion state corresponding to each moment is determined by the first model according to the motion state characteristics at each moment, so that the motion state corresponding to each moment can be accurately output. On this basis, a motion time series is constructed for the motion state corresponding to each moment in chronological order through the second model, and the motion time series is denoised. The target motion state of the terminal device in the first time period is determined according to the denoised motion time series, and the motion state corresponding to each identified moment can be analyzed and denoised from the perspective of the time series. While improving the accuracy of the motion state corresponding to each identified moment, the accuracy of the target motion state finally output is also improved. The acquired motion state characteristics are obtained according to the acceleration data and air pressure data collected by the terminal device, which increases the number of identifiable motion states and improves the accuracy of recognizing the motion state in the vertical space. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 It is a schematic diagram of an application scenario of a motion state recognition method disclosed in an embodiment of the present application;

[0042] Figure 2 It is a method flow diagram of a motion state recognition method disclosed in an embodiment of the present application;

[0043] Figure 3 It is a method flow diagram of another motion state recognition method disclosed in an embodiment of the present application;

[0044] Figure 4 is a schematic diagram of the results before and after denoising a motion time series disclosed in an embodiment;

[0045] Figure 5 A flowchart of adjusting a probability threshold value disclosed in one embodiment;

[0046] Figure 6 A flowchart of motion state data processing disclosed in one embodiment;

[0047] Figure 7 It is a structural schematic diagram of a motion state recognition device disclosed in an embodiment of the present application;

[0048] Figure 8It is a structural schematic diagram of another motion state recognition device disclosed in an embodiment of the present application;

[0049] Fig. 9 The present invention is a schematic diagram of the structure of an electronic device disclosed in an embodiment. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0051] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0052] The embodiments of the present application disclose a motion state recognition method, device, electronic device and storage medium, which can improve the accuracy of motion state recognition.

[0053] See also Figure 1 , Figure 1 Schematic diagram of an application scenario of a motion state recognition method disclosed in an embodiment of the present application. Figure 1As shown, the terminal device 10 and the cloud 20 may be included, and the terminal device 10 is in communication connection with the cloud 20. The cloud 20 may include but is not limited to a server or a server cluster. The terminal device 10 may collect motion state data through a sensor device, and extract motion state features at each moment according to the collected motion state data, and the motion state data includes acceleration data and air pressure data. The terminal device 10 may upload the extracted motion state features at each moment to the cloud 20, so that the cloud 20 obtains the motion state features at each moment in the first time period. The cloud 20 inputs the motion state features at each moment into the first model, and determines the motion state corresponding to each moment according to the motion state features at each moment through the first model, and inputs the motion state corresponding to each moment into the second model, and constructs a motion time series according to the time sequence of the motion state corresponding to each moment through the second model, and performs denoising on the motion time series, and determines the target motion state of the terminal device 10 in the first time period according to the motion time series after denoising. Alternatively, the terminal device 10 obtains the motion state features of the terminal device 10 itself at each moment in the first time period. The terminal device 10 inputs the motion state characteristics at each moment into the first model, and determines the motion state corresponding to each moment according to the motion state characteristics at each moment through the first model, and inputs the motion state corresponding to each moment into the second model, and constructs a motion time series for the motion states corresponding to each moment in chronological order through the second model, and denoises the motion time series, and determines the target motion state of the terminal device 10 in the first time period according to the denoised motion time series.

[0054] See also Figure 2 , Figure 2 1 is a schematic diagram of a method flow of a motion state recognition method disclosed in an embodiment of the present application, and the method can be applied to the aforementioned cloud 20. Figure 2 As shown, the method may include the following steps:

[0055] 210. Obtain motion state characteristics of the terminal device at each moment in the first time period. The motion state characteristics are extracted based on motion state data collected by the terminal device. The motion state data includes acceleration data and air pressure data.

[0056] In an embodiment of the present application, the terminal device collects the motion state data of the terminal device in real time through a sensing device, wherein the sensing device includes at least an accelerometer and a barometer, the motion state data includes at least acceleration data and air pressure data, and the acceleration data may be three-axis acceleration data.

[0057] The terminal device extracts features from the motion state data collected in real time, and extracts the motion state features of the terminal device at each moment in the first time period. The cloud obtains the motion state features of the terminal device at each moment in the first time period extracted by the terminal device through the terminal device uploading method. Among them, the motion state features include acceleration data features and air pressure data features. The first time period is the set time length for analyzing the motion state.

[0058] In some embodiments, the acceleration data features may include the time domain features of the acceleration data and the frequency domain features of the acceleration data. The time domain features of the acceleration may include the mean, median, range, absolute deviation, maximum, minimum, absolute value, sample entropy, interquartile range and variance, and the frequency domain features of the acceleration data may include the mean, variance, frequency domain entropy, kurtosis, skewness, band energy, etc. The pressure features may include slope, range, mean and variance, etc. The interquartile range represents the difference between the data at the 75% position and the data at the 25% position after the data are sorted from large to small; the median represents the data at the 50% position after the data are sorted; the sample entropy represents the similarity measure of the data. Among them, the frequency domain feature is the law of change of the data in frequency, and the time domain feature is the law of change of the data over time.

[0059] In the embodiment of the present application, the air pressure data is data reflecting the height difference of the terminal device in the vertical plane. In the case of the same horizontal plane or the trend of movement is gentle, the air pressure data changes slowly or fluctuates randomly, so the air pressure data has a good effect on identifying the vertical spatial movement. The terminal device reflects the trend of air pressure change by at least extracting the slope and range characteristics of the air pressure data.

[0060] In the embodiment of the present application, the mean feature indicates that the intensity of exercise per unit time is different in different motion states, such as sitting, standing, lying, walking, and running. Therefore, the terminal device evaluates the intensity of exercise per unit time by extracting the mean feature.

[0061] In different motion states such as sitting, running, standing, sitting, and lying, the acceleration data varies over a wide range. Therefore, the terminal device uses the extreme difference characteristics of the acceleration data to distinguish between movements with large differences in intensity.

[0062] When going upstairs or downstairs, the user of the terminal device is subjected to force on one foot in the same cycle, which causes the center of gravity of the acceleration data to shift. The directions of the shifts are exactly opposite when going upstairs or downstairs. Therefore, the mean and median features of the acceleration data can be used to evaluate the shift and distinguish between symmetrical and asymmetrical movements.

[0063] When riding a bicycle or a scooter, the uneven road surface and the randomness of the movements usually cause the acquired acceleration data to not show a regular pattern. Therefore, the sample entropy feature can be used to distinguish between regular and irregular movements.

[0064] In the embodiment of the present application, by extracting specific motion state features, the accuracy of identifying the motion state of a terminal target can be improved, and the number of identifiable motion states can be increased.

[0065] 220. Input the motion state characteristics at each moment into the first model, and determine the motion state corresponding to each moment according to the motion state characteristics at each moment through the first model.

[0066] In an embodiment of the present application, the cloud inputs the motion state characteristics of each moment in the first time period into the first model. After receiving the motion state characteristics of each moment, the first model determines the motion state corresponding to each moment according to the type and quantity of the characteristic values ​​of the motion state characteristics of each moment in the state characteristic interval. For example, the state characteristics of each moment include acceleration range, acceleration mean and air pressure mean. The values ​​of acceleration range, acceleration mean and air pressure mean corresponding to moment A are (1, 2, 0.1), and the values ​​of acceleration range, acceleration mean and air pressure mean corresponding to moment B are (10, 1, 0.1). In the running state, the intervals of acceleration range, acceleration mean and air pressure mean can be set to [8, 15], [0, 3] and [0, 1] respectively. In the walking state, the intervals of acceleration range, acceleration mean and air pressure mean can be set to [0, 5], [0, 3] and [0, 1] respectively. At this time, it can be seen that the three motion state feature values ​​corresponding to time A are all in the three state feature intervals corresponding to the walking state and the two state feature intervals corresponding to the running state, so the first model can output that the motion state corresponding to time A is the walking state. Similarly, the three motion state feature values ​​corresponding to time B are all in the three state feature intervals corresponding to the running state and the two state feature intervals corresponding to the walking state, so the first model can output that the motion state corresponding to time B is the running state.

[0067] In the embodiment of the present application, the collected motion state data can be segmented according to a certain repetition rate to obtain multiple groups of sample data, and each group of sample data is input into the first model as a training set to train the first model. The repetition rate is the same ratio between the sample data and the collected motion state data, which can ensure that the training data fits the collected motion state data and that there is enough sample data to train the first model.

[0068] In some embodiments, the cloud inputs the motion state characteristics at each moment into the first model. After receiving the motion state characteristics at each moment, the first model can also output the probability values ​​corresponding to different motion states at each moment, and select the motion state corresponding to the maximum probability value as the motion state corresponding to the moment. For example, the first model outputs the probability values ​​of motion state a and motion state b corresponding to moment A and moment B according to the motion state characteristics at each moment, wherein the probability value of motion state a corresponding to moment A is 0.6, the probability value of motion state b corresponding to moment A is 0.4, and the probability value of motion state a corresponding to moment B is 0.3, and the probability value of motion state b corresponding to moment B is 0.7. Then, the first model in the terminal device can determine that the motion state corresponding to moment A is a, and the motion state corresponding to moment B is b.

[0069] 230. Input the motion state corresponding to each moment into the second model, construct a motion time series for the motion state corresponding to each moment in chronological order through the second model, and perform denoising on the motion time series.

[0070] In an embodiment of the present application, after the first model outputs the motion state corresponding to each moment, the cloud can input the motion state corresponding to each moment into the second model. The second model sorts each moment in chronological order and constructs a motion time series. The constructed motion time series contains each moment and the motion state corresponding to each moment. After constructing the motion time series, the second model corrects the motion state that may be abnormal in the motion time series, thereby denoising the motion time series. Among them, the denoising process can be data smoothing, that is, the motion state with a higher frequency in the entire motion time series is assigned to the motion state with a lower frequency according to a certain strategy. For the denoising process of the motion time series, it may include determining the abnormal motion state in the motion time series, and correcting the abnormal motion state to the motion state corresponding to the previous moment or the next moment of the corresponding moment. Among them, the motion state less than the quantity threshold can be determined as an abnormal motion state. For example, if the motion time series contains 20 moments and the motion states corresponding to these 20 moments, then the motion states with a total number of less than 2 in the motion time series can be determined as abnormal motion states, and the motion state can be corrected to the motion state corresponding to the previous moment or the next moment of the corresponding moment, and finally the denoising of the motion time series can be achieved. In addition, according to the motion states corresponding to each moment in the motion time series after denoising, a motion state can be determined to correspond to the motion time series after denoising.

[0071] 240. Determine a target motion state of the terminal device within a first time period according to the motion time series after denoising.

[0072] In the embodiment of the present application, after the cloud obtains the denoised motion time series output by the second model, the cloud can determine the motion state with the largest number of corresponding moments according to the number of moments corresponding to different motion states in the motion time series, and determine the motion state as the target motion state of the terminal device in the first time period. Alternatively, the cloud determines the motion state corresponding to the denoised motion time series as the target motion state of the terminal device in the first time period.

[0073] In the embodiment of the present application, after determining the target motion state of the terminal device within the first time period, the cloud transmits the target motion state to the terminal device so that the terminal device outputs the target motion state. The first model and the second model are stored in the cloud.

[0074] By adopting the above embodiment, the motion state at each moment can be denoised from the perspective of time series, thereby improving the accuracy of the target motion state output in the end, and the acquired motion state features are obtained based on the acceleration data and air pressure data collected by the terminal device, thereby increasing the number of identifiable motion states and improving the accuracy of identifying the motion state in the vertical space. Moreover, complex operations such as determining the motion state corresponding to each moment, constructing a motion time series, and denoising the motion time series to obtain the target motion state can be performed through the cloud, thereby effectively reducing the computing pressure of the terminal device.

[0075] In some embodiments, the motion state recognition method flow of steps 210 to 240 can be applied to Figure 1 The terminal device 10 in.

[0076] In an embodiment of the present application, the terminal device collects motion status data in real time through a sensing device, and extracts features based on the motion status data. After obtaining the motion status features of the terminal device at each moment in a first time period, the terminal device can obtain the motion status features of the terminal device at each moment in the first time period extracted by itself.

[0077] After acquiring the motion state characteristics of the terminal device at each moment in the first time period, the terminal device inputs the motion state characteristics at each moment into the first model, and determines the motion state corresponding to each moment according to the motion state characteristics at each moment through the first model. The terminal device inputs the motion state corresponding to each moment output by the first model into the second model, and constructs a motion time series for the motion state corresponding to each moment in chronological order through the second model, and denoises the motion time series. The terminal device determines the target motion state of the terminal device in the first time period based on the motion time series after denoising. The terminal device outputs the target motion state. The first model and the second model are stored in the terminal device.

[0078] In an embodiment of the present application, motion state data is collected by a sensor device in a terminal device, and after data processing such as feature extraction is performed on the motion state data, the terminal device automatically performs complex operations such as determining the motion state corresponding to each moment, constructing a motion time series, and denoising the motion time series to obtain a target motion state. This can reduce data transmission operations during motion state identification, avoid motion state identification errors caused by data loss during data transmission, and improve the accuracy of motion state identification.

[0079] In one embodiment, see Figure 3 , Figure 3 FIG. 2 is a flow chart of another motion state recognition method disclosed in an embodiment of the present application, which can be applied to the aforementioned cloud 20. Figure 3 As shown, the method may include the following steps:

[0080] 310. Obtain motion state characteristics of the terminal device at each moment in the first time period. The motion state characteristics are extracted based on motion state data collected by the terminal device. The motion state data includes acceleration data and air pressure data.

[0081] 320. Input the motion state characteristics at each moment into the first model, and determine the probability that each moment corresponds to each preset motion state according to the motion state characteristics at each moment through the first model, and the sum of the probabilities corresponding to each preset motion state is 1.

[0082] In an embodiment of the present application, the cloud inputs the motion state characteristics of each moment into the first model. After receiving the motion state characteristics of each moment, the first model can output the probability values ​​corresponding to different preset motion states at each moment according to the algorithm between the characteristic value and the probability values ​​of different preset motion states. For example, the first model outputs the probability values ​​of preset motion states a, preset motion states b and preset motion states c corresponding to moment A as 0.6, 0.3 and 0.1 respectively, and the probability values ​​of preset motion states a, preset motion states b and preset motion states c corresponding to moment B as 0.1, 0.1 and 0.8 respectively. Among them, the preset motion state is a set identifiable motion state. For each moment, the sum of the probability values ​​of the corresponding preset motion states is 1, that is, the motion state corresponding to each moment must be one of the preset motion states. The algorithm for calculating the probability values ​​corresponding to different preset motion states for the motion state characteristics at each moment is not specifically limited here.

[0083] In an embodiment of the present application, the first model can be a model composed of multiple decision trees, each decision tree outputs a probability value corresponding to a preset motion state, and the cloud traverses all decision trees with the motion state characteristics at each moment, and obtains a corresponding array composed of multiple probability values ​​at each moment.

[0084] 330. Compare the probabilities corresponding to the preset motion states at each moment with the probability thresholds corresponding to the preset motion states. The probability thresholds corresponding to the preset motion states are all greater than 0.5.

[0085] In the embodiment of the present application, the cloud obtains the probability corresponding to each preset motion state at each moment, that is, for each moment, there is a probability value corresponding to different preset motion states. The cloud compares each probability value at each moment with the probability threshold corresponding to the preset motion state corresponding to the probability value. For example, the probability values ​​of preset motion state a, preset motion state b and preset motion state c corresponding to moment A are 0.6, 0.3 and 0.1 respectively, while the probability threshold corresponding to preset motion state a is 0.5, the probability threshold corresponding to preset motion state b is 0.6, and the probability threshold corresponding to preset motion state c is 0.5. Then the first model can compare the probability of 0.6 corresponding to preset motion state a at moment A with the probability threshold corresponding to preset motion state a of 0.5, compare the probability of 0.3 corresponding to preset motion state b at moment A with the probability threshold corresponding to preset motion state b of 0.6, and compare the probability of 0.1 corresponding to preset motion state c at moment A with the probability threshold corresponding to preset motion state c of 0.5. The probability threshold of each preset motion state corresponding to each moment is greater than 0.5, which can ensure that each subsequent moment corresponds to at most one preset motion state.

[0086] 340. If the probability that the first moment corresponds to the first motion state is greater than the probability threshold corresponding to the first motion state, the motion state corresponding to the first moment is determined as the first motion state, the first moment is any one of the moments, and the first motion state is any one of the preset motion states.

[0087] In the embodiment of the present application, for any one of the moments, that is, the first moment, the cloud compares each probability value in the first moment with the probability threshold corresponding to the preset motion state corresponding to the probability value. If the probability value corresponding to the first motion state at the first moment is greater than the probability threshold corresponding to the first motion state, then the cloud can determine the first motion state as the motion state corresponding to the first moment. Among them, the first motion state is any one of the preset motion states. Repeat the above steps until the terminal device determines the motion state corresponding to each moment. For example, the probability values ​​of preset motion state a, preset motion state b and preset motion state c corresponding to moment A are 0.6, 0.3 and 0.1 respectively, and the probability threshold corresponding to preset motion state a is 0.5, the probability threshold corresponding to preset motion state b is 0.6, and the probability threshold corresponding to preset motion state c is 0.5. It can be seen that the probability value of preset motion state a corresponding to moment A is 0.6, which is greater than the probability threshold corresponding to preset motion state a, which is 0.5, then the terminal device determines preset motion state a as the motion state corresponding to moment A.

[0088] In an embodiment of the present application, by determining the probability that each moment corresponds to each preset motion state, and determining the motion state corresponding to each moment based on whether the probability meets the probability threshold, the motion state corresponding to each moment can be determined more accurately, and for each moment, the sum of the probability values ​​of the corresponding preset motion states is 1, ensuring that the motion state corresponding to each moment must be one of the preset motion states. At the same time, the probability thresholds of the preset motion states corresponding to each moment are all greater than 0.5, which can ensure that each subsequent moment corresponds to at most one preset motion state, making the determined motion state corresponding to each moment more reasonable.

[0089] 350. The motion state corresponding to each moment is input into the second model, and a motion time series is constructed according to the chronological order of the motion state corresponding to each moment through the second model. The abnormal moment is determined according to the motion state corresponding to each moment in the motion time series, and the motion state corresponding to the abnormal moment is different from the motion state corresponding to the moment before the abnormal moment and the motion state corresponding to the moment after the abnormal moment, and the motion state corresponding to the previous moment is the same as the motion state corresponding to the moment after the abnormal moment.

[0090] In an embodiment of the present application, the cloud inputs the motion state corresponding to each moment output by the first model into the second model. The second model sorts each moment in chronological order and constructs a motion time series. The constructed motion time series contains each moment and the motion state corresponding to each moment. The second model determines whether each moment is an abnormal moment based on the motion state corresponding to each moment, as well as the motion state corresponding to the previous moment and the motion state corresponding to the next moment in the motion time series. For any moment, if the motion state corresponding to the moment is different from the motion state corresponding to the previous moment of the moment and the motion state corresponding to the next moment in the motion time series, and the motion state corresponding to the previous moment of the moment in the motion time series is the same as the motion state corresponding to the next moment, then the moment can be determined to be an abnormal moment. For example, please refer to Figure 4 , Figure 4 The figure is a schematic diagram of the results before and after denoising a motion time series disclosed in an embodiment. Figure 4 In the motion time series, there are at least 8 moments, and the motion states corresponding to the first 8 moments in sequence are lying, lying, sitting, lying, lying, standing, lying, and lying. At this time, the motion state corresponding to the 3rd moment is different from the motion state corresponding to the 2nd moment, and the motion state corresponding to the 3rd moment is also different from the motion state corresponding to the 4th moment, while the motion state corresponding to the 2nd moment is the same as the motion state corresponding to the 4th moment. Similarly, the motion state corresponding to the 6th moment is different from the motion state corresponding to the 5th moment, and the motion state corresponding to the 6th moment is also different from the motion state corresponding to the 7th moment, while the motion state corresponding to the 5th moment is the same as the motion state corresponding to the 7th moment. Then the second model can determine that the 3rd and 5th moments are abnormal moments.

[0091] In the embodiment of the present application, for any moment, if the motion state corresponding to the moment is different from the motion state corresponding to the previous moment and the motion state corresponding to the next moment in the motion time series, but the motion state corresponding to the previous moment and the motion state corresponding to the next moment in the motion time series are different, then the moment is not determined as an abnormal moment. Figure 4 At the fifth moment in the data, the motion state corresponding to the fifth moment is different from the motion state corresponding to the fourth moment, and the motion state corresponding to the fifth moment is also different from the motion state corresponding to the sixth moment, but the motion state corresponding to the fourth moment is different from the motion state corresponding to the sixth moment. Then, the second model may not determine the fifth moment as an abnormal moment.

[0092] 360. According to the motion state corresponding to the previous moment or the motion state corresponding to the next moment, the motion state corresponding to the abnormal moment is corrected to obtain the motion time series after denoising.

[0093] In the embodiment of the present application, in the second model, after determining the abnormal moment in the motion time series, for each abnormal moment, the motion state corresponding to the abnormal moment is corrected to the same motion state as the motion state corresponding to the previous moment or the next moment of the abnormal moment, so as to realize the correction of the motion state corresponding to the abnormal moment. The motion state corresponding to each abnormal moment in the motion time series is corrected to realize the denoising of the motion time series and obtain the denoised motion time series. For example, in Figure 4 In the example, the motion states corresponding to the second and fourth moments are both lying, so the motion state corresponding to the third moment can be corrected from sitting to lying. Similarly, the motion states corresponding to the fifth and seventh moments are both lying, so the motion state corresponding to the sixth moment can be corrected from standing to lying.

[0094] In the embodiment of the present application, for any moment, if the motion state corresponding to the moment is different from the motion state corresponding to the previous moment and the motion state corresponding to the next moment in the motion time series, but the motion state corresponding to the previous moment and the motion state corresponding to the next moment in the motion time series are different, then when the second model processes the motion time series, it may not output the motion state corresponding to the moment, or output other motion states as the motion state corresponding to the moment. Figure 4 In the example, the second model may not output the lying motion state corresponding to the fifth moment, or may output other motion states such as standing as the motion state corresponding to the fifth moment.

[0095] In an embodiment of the present application, since the first moment in the motion time series does not have a previous moment, and the last moment in the motion time series does not have a next moment, the second model may not output the motion states corresponding to the first moment and the last moment when denoising the motion time series.

[0096] In the embodiment of the present application, in the second model, the abnormal moments in the motion time series can be determined in sequence according to the order of each moment in the motion time series, and the motion states corresponding to the abnormal moments can be corrected in sequence after determination. It is also possible to determine the abnormal moments in the motion time series without following the order of each moment in the motion time series, and correct the motion states corresponding to the abnormal moments one by one or simultaneously.

[0097] In an embodiment of the present application, whether the motion state corresponding to each moment is reasonable is analyzed based on the motion state corresponding to each moment and the motion state corresponding to the previous moment and the next moment, and the motion state corresponding to the unreasonable moment is corrected to realize denoising of the motion time series, so that the motion state corresponding to each moment in the motion time series is more reasonable, which can improve the accuracy of motion state recognition as a whole from the perspective of a period of time.

[0098] 370. Determine the number of moments corresponding to each motion state in the motion time series after denoising, and determine the motion state with the largest proportion in the motion time series after denoising according to the number of moments corresponding to each motion state;

[0099] In an embodiment of the present application, after the second model outputs the denoised motion time series, the cloud counts the number of moments corresponding to each motion state based on each moment contained in the denoised motion time series and the motion state corresponding to each moment, and calculates the proportion of the number of moments corresponding to each motion state to all the moments in the motion time series after statistics, and determines the motion state with the largest proportion in the denoised motion time series.

[0100] 380. If the motion state with the largest proportion has a corresponding proportion greater than a proportion threshold in the motion time series after denoising, the motion state with the largest proportion is determined as the target motion state of the terminal device in the first time period.

[0101] In an embodiment of the present application, after determining the motion state with the largest proportion in the motion time series after denoising processing, the cloud compares the proportion with the proportion threshold. If the proportion is greater than the proportion threshold, the cloud can determine the motion state with the largest proportion as the target motion state of the terminal device in the first time period; if the proportion is less than or equal to the proportion threshold, the cloud will not determine the motion state with the largest proportion as the target motion state of the terminal device in the first time period, that is, the target motion state of the terminal device in the first time period will not be output for the time being.

[0102] In an embodiment of the present application, the target motion state of the terminal device within a period of time is determined based on the motion state with the largest proportion in the motion time series, so that the motion state of the terminal device can be observed from a longer time scale, and the accuracy of the identified motion state of the terminal device can be improved.

[0103] In some embodiments, another motion state recognition method flow of steps 310 to 380 can be applied to Figure 1 The terminal device 10 in.

[0104] In one embodiment, see Figure 5 , Figure 5The flowchart of adjusting the probability threshold disclosed in one embodiment. Before comparing the probabilities corresponding to the preset motion states at each moment with the probability thresholds corresponding to the preset motion states in step 330, the method further includes:

[0105] 510. Obtain historical status data corresponding to the terminal device, where the historical status data includes motion states corresponding to multiple historical moments.

[0106] In the embodiment of the present application, the cloud obtains historical status data corresponding to the terminal device, wherein the historical status data can be stored in the database of the terminal device or in the cloud. The historical status data is the motion status corresponding to each moment determined by the terminal device or the cloud in the previous motion status recognition process before the current motion status recognition process.

[0107] 520. According to the number of historical moments corresponding to each preset motion state, each preset motion state is classified to obtain a first type of motion state and a second type of motion state, and the number of historical moments corresponding to the first type of motion state is greater than the number of historical moments corresponding to the second type of motion state.

[0108] In an embodiment of the present application, the cloud performs statistics on the acquired historical data, determines the number of historical moments corresponding to each preset motion state, and classifies each preset motion state according to the number of historical moments corresponding to each preset motion state, which can be divided into two categories, namely the first category of motion state and the second category of motion state, wherein the number of historical moments corresponding to the first category of motion state is greater than the number of historical moments corresponding to the second category of motion state. Specifically, a quantity threshold can be set to compare the number of historical moments corresponding to each preset motion state with the set quantity threshold. If the number of historical moments corresponding to a preset motion state is greater than the set quantity threshold, the cloud can classify the preset motion state into the first category of motion state. Conversely, if the number of historical moments corresponding to a preset motion state is less than or equal to the set quantity threshold, the cloud can classify the preset motion state into the second category of motion state.

[0109] 530. Adjust the probability threshold corresponding to each preset motion state included in the first category of motion state and the probability threshold corresponding to each preset motion state included in the second category of motion state, so that the probability threshold corresponding to each preset motion state included in the second category of motion state is greater than the probability threshold corresponding to each preset motion state included in the first category of motion state.

[0110] In an embodiment of the present application, the cloud adjusts the probability thresholds corresponding to each preset motion state included in the first category of motion state, and also adjusts the probability thresholds corresponding to each preset motion state included in the second category of motion state. Specifically, the probability thresholds corresponding to each preset motion state included in the second category of motion state are increased, while the probability thresholds corresponding to each preset motion state included in the first category of motion state are reduced; or only the probability thresholds corresponding to each preset motion state included in the second category of motion state are increased; or only the probability thresholds corresponding to each preset motion state included in the first category of motion state are reduced. In order to achieve the purpose that the probability thresholds corresponding to each preset motion state included in the second category of motion state are greater than the probability thresholds corresponding to each preset motion state included in the first category of motion state. Among them, the probability thresholds corresponding to each preset motion state included in the first category of motion state and the probability thresholds corresponding to each preset motion state included in the second category of motion state still need to be greater than 0.5 after adjustment.

[0111] In an embodiment of the present application, by increasing the probability threshold corresponding to less frequently recognized motion states, or lowering the probability threshold corresponding to more frequently recognized motion states, it becomes easier to recognize more frequently occurring motion states, and more difficult to recognize less frequently occurring motion states, thereby improving the intelligence level of motion state recognition.

[0112] In one embodiment, see Figure 6 , Figure 6 The flowchart of motion state data processing disclosed in one embodiment. Before obtaining the motion state characteristics of the terminal device at each time in step 210 or step 310, the method further includes:

[0113] 610. Clean the motion state data collected by the terminal device according to the state value interval to obtain cleaned motion state data, where the cleaned motion state data is motion state data in the state value interval.

[0114] In an embodiment of the present application, after collecting motion state data, the terminal device can compare the motion state data collected by the terminal device with the set state value interval to determine whether the motion state data is in the corresponding state value interval. The motion state data that is not in the corresponding state value interval is removed to achieve the cleaning of the motion state data. Among them, the state value interval can be an empirical value, that is, the interval where the data can be located under normal conditions, for example, the state value interval corresponding to the acceleration data is generally (0,20). In addition, each motion state data is compared with the corresponding state value interval, such as the acceleration data is compared with the acceleration interval, and the air pressure data is compared with the air pressure interval.

[0115] 620. Separate the acceleration data in the cleaned motion state data to obtain multi-axis acceleration data.

[0116] In an embodiment of the present application, the terminal device separates the acceleration data in the motion state data after cleaning to obtain multi-axis acceleration data, such as three-axis acceleration data, and obtains four-axis acceleration data based on the acceleration data before separation, that is, the combined acceleration data, to reflect the overall acceleration situation and the acceleration situation in the three-axis directions.

[0117] 630. Extract motion state characteristics of the terminal device at each moment in the first time period from the multi-axis acceleration data and the air pressure data in the motion state data after cleaning.

[0118] In the embodiment of the present application, the terminal device extracts features of multi-axis acceleration and simultaneously extracts features of air pressure data in the motion state data after cleaning to obtain motion state features of the terminal device at each moment in the first time period. The extracted motion state features are the same as those described in the above embodiment and will not be repeated here.

[0119] In an embodiment of the present application, by cleaning the data and separating the acceleration data, the motion state data used for state feature extraction is made more reasonable, and the extracted motion state features can better reflect the motion of the terminal device, thereby improving the accuracy of subsequent target motion state recognition.

[0120] In one embodiment, the process of extracting the motion state characteristics of the terminal device at each moment in the first time period from the multi-axis acceleration data and the air pressure data included in the motion data set in step 630 may include:

[0121] The acceleration data of each axis in the multi-axis acceleration data is segmented according to a preset repetition rate and a sample time unit to obtain segmented acceleration data;

[0122] The air pressure data in the cleaned motion state data are segmented according to the sample time unit to obtain segmented air pressure data;

[0123] The motion state characteristics of the terminal device at each moment in the first time period are extracted from the segmented acceleration data and the segmented air pressure data.

[0124] In an embodiment of the present application, the terminal device performs data segmentation on each axis acceleration data in the multi-axis acceleration data according to a preset repetition rate and sample time unit, and divides it into multiple segments of acceleration data to obtain segmented acceleration data. The terminal device also performs data segmentation on the air pressure data in the cleaned motion state data according to the same sample time unit, and divides it into multiple segments of air pressure data to obtain segmented air pressure data. For example, each axis acceleration data is segmented according to a 50% repetition rate and a 5s sample time unit, and the cleaned air pressure data is segmented according to a 5s sample time unit. The terminal device performs feature extraction on the segmented acceleration data and the segmented air pressure data to extract the motion state features of the terminal device at each moment in the first time period.

[0125] In the embodiment of the present application, by performing data segmentation processing on the motion state data, a specific amount of motion state data can be obtained from a plurality of motion state data collected in real time, thereby obtaining the motion state characteristics at each moment in the first time period, which can reduce the amount of motion state data to be processed and improve the efficiency of motion state recognition.

[0126] In some embodiments, if the sampling frequency of collecting acceleration data is different from the sampling frequency of collecting air pressure data, the terminal device can also use different sample units to perform data segmentation on each axis acceleration data and the cleaned air pressure data. For example, if the frequency of collecting acceleration data is 10 times per second and the frequency of collecting air pressure data is 2 times per second, then 100 sampling points can be used as one sample unit to perform data segmentation on each axis acceleration data, and 20 sampling points can be used as another sample unit to perform data segmentation on the cleaned air pressure data.

[0127] See also Figure 7 , Figure 7 Schematic diagram of a motion state recognition device disclosed in an embodiment of the present application, which can be applied to a terminal device. Figure 7 As shown, the motion state recognition device 700 may include: a feature acquisition module 710 , a state acquisition module 720 , a denoising processing module 730 and a state determination module 740 .

[0128] The feature acquisition module 710 is used to acquire the motion state features of the terminal device at each moment in the first time period, where the motion state features are extracted based on the motion state data collected by the terminal device, where the motion state data includes acceleration data and air pressure data;

[0129] The state acquisition module 720 is used to input the motion state characteristics at each moment into the first model, and determine the motion state corresponding to each moment according to the motion state characteristics at each moment through the first model;

[0130] The denoising processing module 730 is used to input the motion state corresponding to each moment into the second model, construct a motion time series according to the chronological order of the motion state corresponding to each moment through the second model, and perform denoising processing on the motion time series;

[0131] The state determination module 740 is used to determine the target motion state of the terminal device within the first time period according to the motion time series after denoising.

[0132] In one embodiment, the status acquisition module 720 is further used to:

[0133] Determine the probability that each moment corresponds to each preset motion state according to the motion state characteristics at each moment through the first model, and the sum of the probabilities corresponding to each preset motion state is 1;

[0134] Compare the probability corresponding to each preset motion state at each moment with the probability threshold corresponding to each preset motion state, and the probability threshold corresponding to each preset motion state is greater than 0.5;

[0135] If the probability that the first moment corresponds to the first motion state is greater than the probability threshold corresponding to the first motion state, the motion state corresponding to the first moment is determined as the first motion state, the first moment is any one of the moments, and the first motion state is any one of the preset motion states.

[0136] In one embodiment, the status acquisition module 720 is further used to:

[0137] Obtaining historical status data corresponding to the terminal device, the historical status data including motion states corresponding to multiple historical moments;

[0138] According to the number of historical moments corresponding to each preset motion state, each preset motion state is classified to obtain a first type of motion state and a second type of motion state, wherein the number of historical moments corresponding to the first type of motion state is greater than the number of historical moments corresponding to the second type of motion state;

[0139] The probability thresholds corresponding to the preset motion states included in the first category of motion states and the probability thresholds corresponding to the preset motion states included in the second category of motion states are adjusted so that the probability thresholds corresponding to the preset motion states included in the second category of motion states are greater than the probability thresholds corresponding to the preset motion states included in the first category of motion states.

[0140] In one embodiment, the denoising processing module 730 is further configured to:

[0141] According to the motion state corresponding to each moment in the motion time series, the abnormal moment is determined, the motion state corresponding to the abnormal moment is different from the motion state corresponding to the moment before the abnormal moment and the motion state corresponding to the moment after the abnormal moment, and the motion state corresponding to the previous moment is the same as the motion state corresponding to the moment after the abnormal moment;

[0142] The motion state corresponding to the abnormal moment is corrected according to the motion state corresponding to the previous moment or the motion state corresponding to the next moment.

[0143] In one embodiment, the state determination module 740 is further configured to:

[0144] Determine the number of moments corresponding to each motion state in the motion time series after denoising, and determine the motion state with the largest proportion in the motion time series after denoising according to the number of moments corresponding to each motion state;

[0145] If the motion state with the largest proportion has a corresponding proportion greater than the proportion threshold in the motion time series after denoising, the motion state with the largest proportion is determined as the target motion state of the terminal device in the first time period.

[0146] See also Figure 8 , Figure 8 is a schematic diagram of the structure of another motion state recognition device disclosed in an embodiment of the present application, and the motion state recognition device can be applied to a terminal device. Figure 8 As shown, the motion state recognition device 700 further includes: a data processing module 750 .

[0147] The data processing module 750 is used to clean the motion state data collected by the terminal device according to the state value interval to obtain cleaned motion state data, where the cleaned motion state data is the motion state data in the state value interval;

[0148] Separating the acceleration data in the cleaned motion state data to obtain multi-axis acceleration data;

[0149] The motion state characteristics of the terminal device at each moment in the first time period are extracted from the multi-axis acceleration data and the air pressure data in the motion state data after cleaning.

[0150] In one embodiment, the data processing module 750 is further configured to:

[0151] The acceleration data of each axis in the multi-axis acceleration data is segmented according to a preset repetition rate and a sample time unit to obtain segmented acceleration data;

[0152] The air pressure data in the cleaned motion state data are segmented according to the sample time unit to obtain segmented air pressure data;

[0153] The motion state characteristics of the terminal device at each moment in the first time period are extracted from the segmented acceleration data and the segmented air pressure data.

[0154] In some embodiments, the motion state recognition device in the above embodiments can also be used in the cloud.

[0155] See also Fig. 9 , Fig. 9 FIG. 1 is a schematic diagram of a structure of an electronic device disclosed in an embodiment, and the electronic device can be applied to driving a vehicle, and is not specifically limited here. Fig. 9 As shown, the electronic device 900 may include:

[0156] A memory 910 storing executable program codes;

[0157] a processor 920 coupled to the memory 910;

[0158] The processor 920 calls the executable program code stored in the memory 910 to execute any one of the motion state recognition methods disclosed in the embodiments of the present application.

[0159] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute any one of the motion state recognition methods disclosed in the embodiment of the present application.

[0160] An embodiment of the present application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute any one of the motion state recognition methods disclosed in the embodiments of the present application.

[0161] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required for the present application.

[0162] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0163] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0164] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0165] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several requests for a computer device (which can be a personal computer, a server or a network device, etc., specifically a processor in a computer device) to perform some or all of the steps of the above-mentioned methods of various embodiments of the present application.

[0166] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0167] The above is a detailed introduction to a motion state recognition method, device, electronic device and storage medium disclosed in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for those of ordinary skill in the art, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A motion state recognition method, characterized in that: The method comprises: Acquire motion state characteristics of the terminal device at each moment in the first time period, wherein the motion state characteristics are extracted based on motion state data collected by the terminal device, wherein the motion state data includes acceleration data and air pressure data; Inputting the motion state characteristics at each moment into a first model, and determining the motion state corresponding to each moment according to the motion state characteristics at each moment through the first model; Inputting the motion states corresponding to the respective moments into a second model, constructing a motion time series for the motion states corresponding to the respective moments in chronological order through the second model, and performing denoising processing on the motion time series; Determining the target motion state of the terminal device within the first time period according to the motion time series after denoising; Wherein, determining the motion state corresponding to each moment according to the motion state characteristics at each moment by using the first model includes: Determine the probability that each moment corresponds to each preset motion state according to the motion state characteristics at each moment through the first model, and the sum of the probabilities corresponding to each preset motion state is 1; compare the probabilities corresponding to each preset motion state at each moment with the probability thresholds corresponding to each preset motion state, and the probability thresholds corresponding to each preset motion state are all greater than 0.5; if the probability corresponding to the first motion state at the first moment is greater than the probability threshold corresponding to the first motion state, the motion state corresponding to the first moment is determined as the first motion state, the first moment is any one of the moments, and the first motion state is any one of the preset motion states; Before comparing the probabilities of each moment corresponding to each preset motion state with the probability thresholds corresponding to each preset motion state, the method further includes: Obtain historical status data corresponding to the terminal device, the historical status data including motion states corresponding to multiple historical moments respectively; classify the respective preset motion states according to the number of historical moments corresponding to each preset motion state in the historical status data to obtain a first category of motion states and a second category of motion states, the number of historical moments corresponding to the first category of motion states being greater than the number of historical moments corresponding to the second category of motion states; adjust the probability thresholds corresponding to the respective preset motion states contained in the first category of motion states and the probability thresholds corresponding to the respective preset motion states contained in the second category of motion states so that the probability thresholds corresponding to the respective preset motion states contained in the second category of motion states are greater than the probability thresholds corresponding to the respective preset motion states contained in the first category of motion states.

2. The method according to claim 1, characterized in that: The denoising process of the motion time series comprises: Determine the abnormal moment according to the motion state corresponding to each moment in the motion time series, the motion state corresponding to the abnormal moment is different from the motion state corresponding to the moment before the abnormal moment and the motion state corresponding to the moment after the abnormal moment, and the motion state corresponding to the previous moment is the same as the motion state corresponding to the moment after the abnormal moment; The motion state corresponding to the abnormal moment is corrected according to the motion state corresponding to the previous moment or the motion state corresponding to the next moment.

3. The method according to claim 1, characterized in that Before acquiring the motion state characteristics of the terminal device at each moment in the first time period, the method further includes: Cleaning the motion state data collected by the terminal device according to the state value interval to obtain cleaned motion state data, wherein the cleaned motion state data is motion state data in the state value interval; Separating the acceleration data in the cleaned motion state data to obtain multi-axis acceleration data; The motion state characteristics of the terminal device at each moment in the first time period are extracted from the multi-axis acceleration data and the air pressure data in the motion state data after cleaning.

4. The method according to claim 3, characterized in that Extracting the motion state characteristics of the terminal device at each moment in the first time period from the multi-axis acceleration data and the air pressure data included in the motion state data includes: Performing data segmentation on each axis acceleration data in the multi-axis acceleration data according to a preset repetition rate and a sample time unit to obtain segmented acceleration data; Segmenting the air pressure data in the cleaned motion state data according to the sample time unit to obtain segmented air pressure data; The motion state characteristics of the terminal device at each moment in the first time period are extracted from the segmented acceleration data and the segmented air pressure data.

5. The method according to any one of claims 1 to 4, characterized in that: The determining the target motion state of the terminal device in the first time period according to the motion time series after denoising includes: Determine the number of moments corresponding to each motion state in the motion time series after denoising, and determine the motion state with the largest proportion in the motion time series after denoising according to the number of moments corresponding to each motion state; If the motion state with the largest proportion has a corresponding proportion greater than a proportion threshold in the motion time series after the denoising process, the motion state with the largest proportion is determined as the target motion state of the terminal device in the first time period.

6. A motion state recognition device, characterized in that: The device comprises: A feature acquisition module, used to acquire motion state features of a terminal device at each moment in a first time period, wherein the motion state features are extracted based on motion state data collected by the terminal device, wherein the motion state data includes acceleration data and air pressure data; A state acquisition module, used for inputting the motion state characteristics at each moment into a first model, and determining the motion state corresponding to each moment according to the motion state characteristics at each moment through the first model; a denoising processing module, used for inputting the motion states corresponding to the respective moments into a second model, constructing a motion time series for the motion states corresponding to the respective moments in chronological order through the second model, and performing denoising processing on the motion time series; A state determination module, used to determine the target motion state of the terminal device within the first time period according to the motion time series after denoising; The state acquisition module is further used to determine the probability that each moment corresponds to each preset motion state according to the motion state characteristics at each moment through the first model, and the sum of the probabilities corresponding to each preset motion state is 1; compare the probabilities corresponding to each preset motion state at each moment with the probability thresholds corresponding to each preset motion state, and the probability thresholds corresponding to each preset motion state are all greater than 0.5; if the probability corresponding to the first motion state at the first moment is greater than the probability threshold corresponding to the first motion state, the motion state corresponding to the first moment is determined as the first motion state, the first moment is any one of the moments, and the first motion state is any one of the preset motion states; The state acquisition module is also used to obtain historical state data corresponding to the terminal device, the historical state data including motion states corresponding to multiple historical moments respectively; classify the preset motion states according to the number of historical moments corresponding to each preset motion state in the historical state data to obtain a first type of motion state and a second type of motion state, the number of historical moments corresponding to the first type of motion state is greater than the number of historical moments corresponding to the second type of motion state; adjust the probability thresholds corresponding to the preset motion states included in the first type of motion state and the probability thresholds corresponding to the preset motion states included in the second type of motion state so that the probability thresholds corresponding to the preset motion states included in the second type of motion state are greater than the probability thresholds corresponding to the preset motion states included in the first type of motion state.

7. An electronic device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.