A method for identifying human activity changes based on Gaussian segmentation model
Through the Gaussian segmentation model method, the sensor data is segmented and identified, which solves the problem of window length selection and the need for domain knowledge in the prior art, and achieves high-precision identification of changes in human activities.
Patent Information
- Application Number
- CN202411024016.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2025-03-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art has the conditions in the identification of human activity changes that are sensitive to window length selection, long calculation time, require domain knowledge and experience, and are difficult to apply to situations where there are rich types of activities and large time differences.
The continuous sensor data is segmented using a Gaussian segmentation model method. By maximizing the log-likelihood function and BIC criterion under the Gaussian segmentation model, the optimal segmentation order and change point are adaptively determined.
High-precision activity change recognition is achieved, and it is possible to discover potential different types of activities in sensor timing data of multi-channel joint characterization, without prior information, and is suitable for situations where activity types are rich and time differences are large.
Smart Images

Figure CN119167224B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of activity recognition, and relates to a method for recognizing changes in human activities, and in particular to a method for recognizing changes in human activities based on a Gaussian segmentation model. Background Art
[0002] Human activity change recognition refers to the use of data recorded by wearable devices or external environment devices to automatically identify the moment when human actions or activities change over a period of time. Thanks to the continuous development of sensor devices and machine learning algorithms, human activity recognition has been widely used in many fields, such as healthcare, sports, and smart homes. The advantages of collecting activity information based on sensors are convenience, low cost, and no privacy disputes. The collected activity data is a continuous time series with no obvious intervals between activities, making it difficult to directly distinguish each action. In the real situation where there is a lack of annotation information, activity change recognition becomes a challenging task.
[0003] At present, the methods for identifying changes in human activities are mainly divided into two methods: sliding window-based and energy-based. The sliding window-based recognition method uses a fixed-length window and step size to slide on the time series data to extract the moment of activity change and the fragments of different activities. The choice of window length is relatively sensitive. If the length is too long, it will cause multiple activities to be included in one window, while if the length is too small, it will increase the calculation time. In addition, the energy-based recognition method uses the difference in intensity between different activities, combined with the threshold and the energy of the sensor signal to distinguish the activity data. However, these methods need to rely on certain domain knowledge and experience, and are difficult to apply to situations where the activity types are rich and the activity time differences are large. Therefore, it is urgent to use advanced intelligent algorithms to deeply study the time series characteristics of the data to achieve accurate recognition of changes in human activities. Summary of the invention
[0004] In order to solve the above problems in the background technology, the present invention provides a method for identifying human activity changes based on a Gaussian segmentation model. The method can be used to identify human activity changes in continuous sensor data for subsequent classification of activity data.
[0005] The objective of the present invention is achieved through the following technical solutions:
[0006] A method for identifying changes in human activities based on a Gaussian segmentation model comprises the following steps:
[0007] Step S1: The time series data of continuous activity collected by the sensor X={x1,…,x n ,…,x N}, each sampling point x nIt is represented by data from m channels, where N is the number of sampling points of continuous activity time series data;
[0008] Step S2, initializing the segmentation order of the time series data X to k=1;
[0009] Step S3: Given the maximum segmentation order K max , if k≤K max , then repeat step S4 and set k=k+1; otherwise, execute step S5;
[0010] Step S4: according to the current segmentation order k, the time series data of continuous activities are divided using the Gaussian segmentation model, and the segmentation points and non-overlapping human activity segments of the sequence X are obtained by maximizing the log-likelihood function of the time series data X under the Gaussian segmentation model;
[0011] Step S5: Define the BIC criterion according to the log-likelihood function, and determine the optimal segmentation order k by the minimum value of BIC. opt ∈[1,K max ] and the set of change points
[0012] Compared with the prior art, the present invention has the following advantages:
[0013] 1. The present invention uses multiple independent Gaussian models to represent the entire time series data, and further transforms the time series segmentation problem into a parameter solution problem of the Gaussian segmentation model. The change points of activities in the sensor data are obtained by optimizing the log-likelihood function of the segmentation model. It has the advantages of high segmentation accuracy and does not require any prior information.
[0014] 2. Estimation of the number of segmentation points is also a crucial issue. The present invention utilizes the BIC criterion to adaptively determine the optimal segmentation order.
[0015] 3. Based on the recognition results of human activity changes of the present invention, certain technical support can be provided for the recognition and classification of subsequent activity types.
[0016] 4. The present invention can discover different types of potential activities in sensor time series data jointly represented by multiple channels, and realize unsupervised continuous activity data segmentation and activity change identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flow chart of the method for identifying changes in human activities based on the Gaussian segmentation model of the present invention.
[0018] Figure 2 It is a schematic diagram of determining the optimal segmentation order of a time series in Example 1.
[0019] Figure 3It is a schematic diagram of the activity change recognition result of the WISDM dataset in Example 2. DETAILED DESCRIPTION
[0020] The technical solution of the present invention is further described below in conjunction with the accompanying drawings, but is not limited thereto. Any modification or equivalent replacement of the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention should be included in the protection scope of the present invention.
[0021] The present invention provides a method for identifying changes in human activities based on a Gaussian segmentation model. Figure 1 As shown, the method comprises the following steps:
[0022] Step S1: The time series data of continuous activity collected by the sensor X={x1,…,x n ,…,x N}, each sampling point x n It is represented by data from m channels (as input to the subsequent Gaussian segmentation model), and N is the number of sampling points of continuous activity time series data.
[0023] Step S2: Initialize the segmentation order of the time series data X to k=1.
[0024] Step S3: Given the maximum segmentation order K max , if k≤K max , then repeat step S4 and set k=k+1; otherwise, execute step S5.
[0025] Step S4: According to the current segmentation order k, the time series data of continuous activities are divided using the Gaussian segmentation model, and the segmentation points and non-overlapping human activity segments of the sequence X are obtained by maximizing the log-likelihood function of the time series data X under the Gaussian segmentation model.
[0026] In this step, the log-likelihood function of the time series data X under the Gaussian segmentation model is:
[0027]
[0028] Among them, k is the segmentation order, L (i) (·) is the log-likelihood function of the ith human activity segment, b i-1 and b i are the split points at both ends of the i-th segment, and are the mean and covariance of the ith segment, λTr(∑ (i) ) -1 is the regularization term, and λ≥0 is the regularization parameter.
[0029] The log-likelihood of the i-th human activity segment is expressed as follows:
[0030]
[0031] Among them, x n is a sampling point in the continuous activity time series data X and follows a multivariate Gaussian distribution m represents the number of sensor sampling channels.
[0032] In this step, a greedy search method is used to traverse all sampling points, and by maximizing the value of the log-likelihood function LL, segmentation points are added to the time series data, thereby obtaining the segmentation points of the continuous activity data and the fragments of human activities under the current segmentation order. Here, b = {b0 = 1, ..., b i-1 ,b i ,…,b k+1 =N}, μ = {μ (1) ,…,μ (i) ,…,μ (k+1)} and ∑={∑ (1) ,…,∑ (i) ,…,∑ (k+1)} are the parameters in the Gaussian segmentation model.
[0033] Step S5: Define the BIC criterion according to the log-likelihood function, and determine the optimal segmentation order k by the minimum value of BIC. opt ∈[1,K max ] and the set of change points
[0034] In this step, the BIC criterion is used to determine the optimal segmentation order k according to the log-likelihood function under different segmentation orders k. opt And its corresponding set of change points, the specific calculation formula is as follows:
[0035]
[0036] BIC(k)=-2*LL k / ln(N)+ln(N)*k
[0037] Among them, BIC(k) and LL k They represent the BIC value and the maximum log-likelihood when the segmentation order is k, respectively, and N is the number of sampling points of continuous activity time series data.
[0038] Based on all possible partitioning orders {1,…,K max}, calculate the BIC value at each segmentation order respectively, take the segmentation order corresponding to the minimum BIC value as the optimal segmentation order of the continuous activity time series data, and take the corresponding segmentation point as the change point set of human activities.
[0039] Example:
[0040] Example 1: Simulation experiment for univariate time series
[0041] This embodiment verifies the algorithm proposed by the present invention based on a simulated univariate time series, setting the maximum segmentation order K max =10, λ=0.0001. For simulation data, the corresponding time series can be generated according to the given segmentation points and the model satisfied by each segment. The specific time series model is given by the following formula:
[0042]
[0043] in, is the mean of each segment, and the random variable ω n It follows a Gaussian distribution with mean 0 and standard deviation 1.5.
[0044] The algorithm is evaluated using two indicators: Estimation Rate (ER) and Match Rate (MR), which are defined as:
[0045]
[0046] in, represents the number of segmentation points obtained by the algorithm, K is the actual number of segmentation points in the time series, and K* represents the number of segmentation points obtained under the condition of tolerating an error of ±10. The number of split points that match the true split points.
[0047] The experimental results are obtained by taking the average value of 50 experiments on the time series. The values of ER and MR are 0.98 and 0.945 respectively. Both values are close to 1, indicating that the algorithm has a high segmentation accuracy. The number of segmentation points obtained is basically consistent with the actual segmentation order, and most of the segmentation points can be matched within the error range. Table 1 is the segmentation result of an experiment. The algorithm almost perfectly segments the time series. The optimal segmentation order of the sequence sample obtained according to the BIC criterion is shown in the following figure. Figure 2 shown.
[0048] Table 1 Segmentation results of an experiment
[0049] The true split point 1 150 300 450 550 800 1000 The obtained split point 1 148 302 451 548 801 1000
[0050] Example 2: Experiment on the WISDM human activity dataset
[0051] The WISDM dataset records data from 51 testers wearing accelerometers and gyroscopes to perform 18 activities. The sensor data is collected from smartphones and smart watches at a sampling rate of 20 Hz. Each movement consists of data on three axes: x, y, and z. This example uses real data to verify the performance of the algorithm. max =5, λ=0.0001, and the tolerance error is 50. The motion data of a test person (N=10000) is selected, and the actual activity change points and the segmentation results of the algorithm are shown as follows: Figure 3 It can be found that the obtained segmentation point positions are all within the error range of the given true segmentation point, indicating that the algorithm can better identify the position of activity changes in the sequence.
Claims
1. A method for identifying human activity changes based on a Gaussian segmentation model, characterized in that The method comprises the following steps: Step S1: The time series data of continuous activity collected by the sensor X={x1,…,x n ,…,x N }, each sampling point x n It is represented by data from m channels, where N is the number of sampling points of continuous activity time series data; Step S2, initializing the segmentation order of the time series data X to k=1; Step S3: Given the maximum segmentation order K max , if k≤K max , then repeat step S4 and set k=k+1; Otherwise, execute step S5; Step S4: According to the current segmentation order k, the time series data of continuous activities are divided using the Gaussian segmentation model, and the segmentation points and non-overlapping human activity segments of the sequence X are obtained by maximizing the log-likelihood function of the time series data X under the Gaussian segmentation model, where: The log-likelihood function is: Among them, k is the segmentation order, L (i) (·) is the log-likelihood function of the ith human activity segment, b i-1 and b i are the segmentation points at both ends of the i-th segment, μ (i) and∑ (i) are the mean and covariance of the ith segment, λTr(∑ (i) ) -1 is the regularization term, λ≥0 is the regularization parameter; The log-likelihood of the i-th human activity segment is expressed as follows: Among them, x n is a sampling point in the continuous activity time series data X and follows a multivariate Gaussian distribution m represents the number of sensor sampling channels; Step S5: Define the BIC criterion according to the log-likelihood function, and determine the optimal segmentation order k by the minimum value of BIC. opt ∈[1,K max ] and the set of change points 2. The human activity change recognition method based on Gaussian segmentation model according to claim 1 is characterized in that In step S4, a greedy search method is adopted to traverse all sampling points, and segmentation points are added to the time series data by maximizing the value of the log-likelihood function, so as to obtain the segmentation points of the continuous activity data and the fragments of human activities at the current segmentation order.
3. The human activity change recognition method based on Gaussian segmentation model according to claim 1 is characterized in that Said 4. The human activity change recognition method based on Gaussian segmentation model according to claim 1 is characterized in that In step S5, the optimal segmentation order k opt The calculation formula is as follows: BIC(k)=-2*LL k / ln(N)+ln(N)*k Among them, BIC(k) and LL k They represent the BIC value and maximum log-likelihood when the segmentation order is k, respectively.
5. The human activity change recognition method based on Gaussian segmentation model according to claim 1 is characterized in that In step S5, based on all possible segmentation orders {1, ..., K max }, calculate the BIC value at each segmentation order respectively, take the segmentation order corresponding to the minimum BIC value as the optimal segmentation order of the continuous activity time series data, and take the corresponding segmentation point as the change point set of human activities.
Citation Information
Patent Citations
Real-time speech speaker separation method and system
CN110299150A
Online segmentation method for multi-dimensional time series data of wind driven generator
CN113111798A