WO2021170014A1 - User behavior identification method and apparatus, computer device, and medium - Google Patents

User behavior identification method and apparatus, computer device, and medium Download PDF

Info

Publication number
WO2021170014A1
WO2021170014A1 PCT/CN2021/077744 CN2021077744W WO2021170014A1 WO 2021170014 A1 WO2021170014 A1 WO 2021170014A1 CN 2021077744 W CN2021077744 W CN 2021077744W WO 2021170014 A1 WO2021170014 A1 WO 2021170014A1
Authority
WO
WIPO (PCT)
Prior art keywords
matrix
data
user behavior
state data
multiple sets
Prior art date
Application number
PCT/CN2021/077744
Other languages
French (fr)
Chinese (zh)
Inventor
张夏天
Original Assignee
北京腾云天下科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京腾云天下科技有限公司 filed Critical 北京腾云天下科技有限公司
Publication of WO2021170014A1 publication Critical patent/WO2021170014A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3438Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D21/00Measuring or testing not otherwise provided for
    • G01D21/02Measuring two or more variables by means not covered by a single other subclass
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Definitions

  • the present disclosure relates to the field of mobile data processing technology, and in particular to a user behavior recognition method, device, computer equipment, non-transitory computer-readable storage medium, and computer program product.
  • Mobile devices such as mobile phones, tablet computers, smart wearable devices, etc.
  • Users can watch audio and video, shop, play games, record exercise status, etc. through their portable mobile devices.
  • a user behavior recognition method including: acquiring multiple sets of motion state data, each set of motion state data includes multiple pieces of state information, and the state information is used to indicate the motion state of a mobile device carried by a user; Perform decorrelation processing on the multiple sets of exercise state data to eliminate the correlation of various state information in each set of exercise state data to obtain target data; and determine the user behavior type according to the target data.
  • a user behavior recognition device including: a data acquisition module configured to acquire multiple sets of exercise state data, each set of exercise state data includes multiple pieces of state information, and the state information is used to indicate a user The movement state of the carried mobile device; a decorrelation module configured to decorrelate the above multiple sets of movement state data to eliminate the correlation of various state information in each group of movement state data to obtain target data; and The classification module is configured to determine the user behavior type according to the target data.
  • a computer device including: a memory, a processor, and a computer program stored on the memory.
  • the processor is configured to execute the above-mentioned computer program to implement the steps of the above-mentioned user behavior identification method.
  • a non-transitory computer-readable storage medium on which a computer program is stored.
  • the computer program is executed by the processor, the steps of the above-mentioned user behavior identification method are realized.
  • a computer program product including a computer program, which, when executed by a processor, implements the above-mentioned user behavior recognition method.
  • the current behavior type of the user can be determined.
  • the processing of multiple sets of motion state data includes decorrelation processing. By decorrelating multiple sets of motion state data, the correlation of each state information in each set of motion state data is eliminated, and the redundant information in the multiple sets of acquired motion state data is greatly reduced.
  • the user behavior type is determined according to the target data obtained by the decorrelation processing, which improves the efficiency and accuracy of user behavior recognition.
  • FIG. 1 is a schematic diagram illustrating an example system in which various methods described herein may be implemented according to an example embodiment
  • Fig. 2 is a flowchart illustrating a user behavior recognition method according to an exemplary embodiment
  • Fig. 3 is a schematic diagram illustrating a fuselage coordinate system according to an exemplary embodiment
  • FIG. 4 is a schematic diagram illustrating the correlation of various pieces of state information in exercise state data according to an exemplary embodiment
  • FIG. 5 is a schematic diagram illustrating the correlation of various state information after decorrelation processing is performed on the motion state data involved in FIG. 4;
  • Fig. 6 is a schematic diagram illustrating a user behavior recognition apparatus according to an exemplary embodiment
  • Fig. 7 is a structural block diagram illustrating a user behavior recognition model according to an exemplary embodiment
  • Fig. 8 is a structural block diagram illustrating another user behavior recognition model according to an exemplary embodiment
  • Fig. 9 is a schematic diagram illustrating an exemplary computer device that can be applied to the exemplary embodiment.
  • first, second, etc. to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of these elements. Such terms are only used for Distinguish one element from another.
  • first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.
  • FIG. 1 is a schematic diagram illustrating an example system 100 in which various methods described herein may be implemented according to an example embodiment.
  • the system 100 includes a mobile device 110, a server 120, and a network 130 that communicatively couples the mobile device 110 and the server 120.
  • the mobile device 110 includes a display 114 and a client application (APP) 112 that can be displayed via the display 114.
  • the client application 112 may be an application that needs to be downloaded and installed before running, or a small program (liteapp) that is a lightweight application.
  • liteapp small program
  • the client application 112 may be pre-installed on the mobile device 110 and activated.
  • the user 102 can search for the client application 112 in the host application (for example, by the name of the client application 112, etc.) or scan the graphic code of the client application 112 (for example, a barcode).
  • the mobile device 110 may be any type of mobile device, including a mobile computer, a mobile phone, a wearable computer device (such as a smart watch, a head-mounted device, including smart glasses, etc.) or other types of mobile devices.
  • the server 120 is typically a server deployed by an Internet Service Provider (ISP) or Internet Content Provider (ICP).
  • the server 120 may represent a single server, a cluster of multiple servers, a distributed system, or a cloud server that provides basic cloud services (such as cloud databases, cloud computing, cloud storage, and cloud communications). It will be understood that although the server 120 is shown in FIG. 1 to communicate with only one mobile device 110, the server 120 may provide background services for multiple mobile devices at the same time.
  • Examples of the network 130 include a combination of a local area network (LAN), a wide area network (WAN), a personal area network (PAN), and/or a communication network such as the Internet.
  • the network 130 may be a wired or wireless network.
  • technologies and/or formats including Hypertext Markup Language (HTML), Extensible Markup Language (XML), etc. are used to process data exchanged through the network 130.
  • encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec), etc. can also be used to encrypt all or some links.
  • customized and/or dedicated data communication technologies can also be used to replace or supplement the aforementioned data communication technologies.
  • a sensor for collecting motion state data of the mobile device 110 and a client application 112 are deployed in the mobile device 110.
  • the client application 112 may be a user behavior recognition application, and the application may determine the behavior type of the user carrying the mobile device 110 according to the motion state data of the mobile device 110 collected by the sensor.
  • the server 120 may be a server used with the user behavior recognition application.
  • a user behavior recognition model is deployed in the server 120 (the details of the user behavior recognition model will be detailed in the following embodiments).
  • the server 120 can provide a user behavior recognition service to the client application 112 running in the mobile device 110 based on the user behavior recognition model.
  • the server 120 receives the exercise status data sent by the mobile device 110 through the client application 112, and then transfers the exercise status data to the client application 112. Enter the user behavior recognition model to determine the type of user behavior.
  • the server 120 may also provide the user behavior recognition model to the mobile device 110, and the client application 112 running in the mobile device 110 may implement the user behavior recognition function by calling the user behavior recognition model.
  • the user behavior recognition model may be a pre-trained neural network model, and the details of the model will be described in detail in the following embodiments.
  • the server 120 may, for example, use various training or learning techniques such as back propagation of errors to train the user behavior recognition model.
  • performing backpropagation of errors may include performing truncated backpropagation through time.
  • the server 120 may employ a variety of generalization techniques (for example, weight attenuation, loss, etc.) to improve the generalization ability of the model being trained.
  • the server 120 may train the user behavior recognition model based on the set of training samples.
  • the training sample may be, for example, exercise state data marked with the type of user behavior.
  • the model can be converted into a TFLite format model file (TensorFlow Lite file, in which the model parameters are quantized into an 8-bit integer type, that is, int8) in the server 120.
  • the file is deployed in the mobile device 110, so that the client application 112 running in the mobile device 110 can implement the user behavior recognition function by calling the user behavior recognition model.
  • FIG. 2 is a flowchart illustrating a user behavior recognition method 200 according to an exemplary embodiment.
  • the method 200 may be executed at a mobile device (for example, the mobile device 110 shown in FIG. 1 ), that is, the execution subject of each step of the method 200 may be the mobile device 110 shown in FIG. 1.
  • the method 200 may be executed at a server (for example, the server 120 shown in FIG. 1).
  • the method 200 may be executed by a combination of a mobile device (e.g., mobile device 110) and a server (e.g., server 120).
  • the method 200 is described by taking the mobile device 110 as the execution subject as an example.
  • the method 200 includes steps 210 to 230.
  • step 210 multiple sets of exercise state data are obtained, and each set of exercise state data includes multiple pieces of state information, and the state information is used to indicate the exercise state of the mobile device carried by the user.
  • step 220 decorrelation processing is performed on the multiple sets of motion state data to eliminate the correlation of various state information in each set of motion state data to obtain target data.
  • step 230 the user behavior type is determined according to the target data.
  • the current behavior type of the user can be determined.
  • the processing of multiple sets of motion state data includes decorrelation processing. By decorrelating multiple sets of motion state data, the correlation of each state information in each set of motion state data is eliminated, and the redundant information in the multiple sets of acquired motion state data is greatly reduced.
  • the user behavior type is determined according to the target data obtained by the decorrelation processing, which improves the efficiency and accuracy of user behavior recognition.
  • step 210 multiple sets of exercise state data are obtained, and each set of exercise state data includes multiple pieces of state information, and the state information is used to indicate the exercise state of the mobile device carried by the user.
  • the multiple sets of motion state data described in step 210 are collected by sensors deployed in the mobile device.
  • Sensors include, but are not limited to, acceleration sensors, gyroscopes (ie, angular velocity sensors), magnetic field sensors, and the like.
  • the sensors deployed in the mobile device include an acceleration sensor and a gyroscope. Accordingly, the motion state data of the mobile device collected by the sensor includes: acceleration information of the mobile device in multiple directions; Angular velocity information in each direction.
  • the acceleration sensor can collect the acceleration information of the mobile device on the three coordinate axes of x, y and z; the gyroscope can collect the angular velocity information of the mobile device on the three coordinate axes of x, y, and z , Y, z three coordinate axis rotation angular velocity information).
  • Fig. 3 shows a schematic diagram of a fuselage coordinate system according to an exemplary embodiment. As shown in Figure 3, the origin of the body coordinate system is the center point of the screen of the mobile device, the x-axis direction is horizontal to the right in the screen plane; the y-axis direction is vertical upwards in the screen plane; the z-axis direction is perpendicular to the screen plane And point to the top of the screen.
  • step 210 includes: acquiring multiple sets of motion state data collected by sensors deployed in the mobile device within a predetermined period of time at a predetermined frequency.
  • the values of the predetermined frequency and the predetermined duration can be set by those skilled in the art according to actual conditions.
  • the predetermined frequency is set to a smaller value, thereby reducing the demand for sensor data subscription and reducing power consumption; at the same time, the predetermined duration is also set to a smaller appropriate value, thereby ensuring the recognition of user behavior
  • the accuracy is reduced while the delay is increased, the sensitivity of the response is increased, and the real-time performance of user behavior recognition is improved, that is, the current behavior type of the user is recognized in real time.
  • the predetermined frequency may be set to 20 Hz (that is, the interval time for obtaining motion state data from the sensor is 50 ms), and the predetermined duration is set to 6400 ms, then step 210 is equivalent to obtaining 128 sets of motion at a time interval of 50 ms. Status data.
  • Each group of motion state data includes the acceleration information of the mobile device in the directions of the three coordinate axes x, y, and z collected by the acceleration sensor and the angular velocity of the mobile device rotating around the three coordinate axes of x, y, and z collected by the gyroscope. Take the information as an example.
  • the predetermined frequency is set to 20Hz and the predetermined duration is set to 6400ms
  • the obtained 128 sets of motion state data d 1 to d 128 are shown in Table 1 below:
  • each row corresponds to a set of motion state data
  • each set of motion state data includes x-axis acceleration information, y-axis acceleration information, z-axis acceleration information, x-axis angular velocity information, y-axis angular velocity information, and z-axis angular velocity Information six status information.
  • the motion state data of the mobile device acquired in step 210 has a strong correlation with the behavior of the user currently carrying the mobile device, and the user behavior type can be identified accordingly.
  • User behavior types include but are not limited to being stationary, walking, running, cycling, taking a bus, taking a subway, taking a small car (such as a taxi, private car, etc.), etc.
  • step 220 is executed.
  • step 220 decorrelation processing is performed on the multiple sets of motion state data to eliminate the correlation of various state information in each set of motion state data to obtain target data.
  • Figure 4 shows the correlation of various state information in multiple sets of motion state data in the form of a matrix, where numbers 0 to 5 respectively represent x-axis acceleration information, y-axis acceleration information, z-axis acceleration information, and x-axis angular velocity.
  • Information, y-axis angular velocity information, z-axis angular velocity information, the element in the i-th row and j-th column of the matrix represents the correlation (covariance) between the information corresponding to the number i and the information corresponding to the number j.
  • the absolute value of the correlation is closer to 1 , Indicates that the stronger the correlation between the two state information, the closer the absolute value of the correlation is to 0, the weaker the correlation between the two state information.
  • the correlation is a positive number, which means that the two state information is positively correlated; the correlation is a negative number, which means that the two state information is negatively correlated.
  • the right side of Figure 4 shows an example of the corresponding relationship between correlation and gray value to show the correlation of various state information more intuitively.
  • the more correlated parts that is, the light-colored parts
  • the acceleration information of the x, y, and z axes collected by the acceleration sensor There is a large correlation between the three, and there is a large correlation between the angular velocity information of the x, y, and z axes collected by the gyroscope.
  • step 220 decorrelation processing is performed on multiple sets of motion state data to improve the efficiency and accuracy of user behavior recognition.
  • step 220 further includes the following steps 222 to 224:
  • step 222 centralization processing is performed on the multiple sets of motion state data, so that the average value of each state information after processing is 0, and centralization data is obtained.
  • multiple sets of motion state data may form an original data matrix, each row in the original data matrix represents a set of motion state data, and each column identifies one item of state information.
  • the 128 groups of motion state data in Table 1 can form a 128*6 original data matrix D, namely:
  • Each row of the original data matrix D represents a group of motion state data, and each column corresponds to a piece of state information.
  • the state information corresponding to each column is x-axis acceleration information, y-axis acceleration information, z-axis acceleration information, and x-axis angular velocity information. , Y-axis angular velocity information, z-axis angular velocity information.
  • step 224 a transformation matrix of the centralization data is determined, and the centralization data is multiplied by the transformation matrix to obtain target data, wherein the transformation matrix makes the covariance matrix of the target data Identity matrix, thereby eliminating the relevance of various status information.
  • the transformation matrix of the centralized data is determined using the following steps 2242 to 2246:
  • step 2242 the covariance matrix ⁇ of the centralized data is calculated.
  • the covariance matrix ⁇ is subjected to singular value decomposition, and the covariance matrix ⁇ is transformed into the product of the first matrix U, the second matrix S, and the transposed matrix U T of the first matrix U.
  • One matrix U is a matrix composed of eigenvectors of the covariance matrix ⁇
  • the second matrix S is a diagonal matrix composed of eigenvalues of the covariance matrix ⁇ . That is, the singular value decomposition result of the covariance matrix ⁇ is:
  • step 2246 the product of the matrices U, S -1/2 and U T is used as the transformation matrix, where the value of each element in S -1/2 is the square root of the element at the corresponding position in the second matrix S reciprocal. That is, the transformation matrix W is:
  • the centralized data C is multiplied by the transformation matrix W to obtain the target data Z, namely:
  • the covariance matrix of the target data Z is an identity matrix I with diagonal elements of 1, and other elements of 0. That is to say, in the target data Z, the covariance between different state information is 0, thereby eliminating the correlation between various state information.
  • FIG. 5 shows the correlation (covariance) of various state information after decorrelating the multiple sets of motion state data involved in FIG. 4.
  • the correlation matrix shown in Figure 5 except for the diagonal element value 1, the element values at other positions are all very small, reaching the order of 10 ⁇ (-6), 10 ⁇ (-7), almost 0 , Indicating that the correlation between various status information is eliminated.
  • step 220 the multiple sets of motion state data are decorrelated, and after the target data is obtained, step 230 is executed.
  • step 230 the user behavior type is determined according to the target data.
  • the target data obtained in step 220 has a strong correlation with the type of user behavior.
  • the user behavior type corresponding to the target data can be determined according to the correlation between the target data and the user behavior type.
  • the user behavior types include, for example, being stationary, walking, running, cycling, taking a bus, taking a subway, taking a small car (such as a taxi, a private car, etc.), but not limited thereto.
  • step 220 and step 230 may be implemented by a trained user behavior recognition model. That is, step 220 includes: inputting the multiple sets of motion state data into a preset user behavior recognition model, so that the user behavior recognition model performs decorrelation processing on the multiple sets of motion state data to obtain target data. Step 230 includes: processing the target data by the user behavior recognition model to determine the user behavior type.
  • the user behavior recognition model is trained by using the motion state data marked with the user behavior type as the training sample.
  • the trained user behavior recognition model takes exercise state data as input, and outputs the user behavior type corresponding to the exercise state data.
  • the user behavior recognition model includes a decorrelation module and a classification module.
  • the decorrelation module is configured to perform step 220, that is, decorrelate multiple sets of exercise state data to eliminate items in each group of exercise state data. Relevance of status information to get target data.
  • the classification module is configured to perform step 230, which is to determine the user behavior type according to the target data.
  • FIG. 6 is a schematic diagram illustrating a user behavior recognition apparatus 600 according to an exemplary embodiment. ⁇ 600 ⁇ Device 600. As shown in FIG. 6, the device 600 includes a data acquisition module 610, a decorrelation module 620 and a classification module 630.
  • the data acquisition module 610 is configured to acquire multiple sets of motion state data, and each set of motion state data includes multiple pieces of state information, and the state information is used to indicate the motion state of the mobile device carried by the user.
  • the decorrelation module 620 is configured to decorrelate the multiple sets of motion state data, so as to eliminate the correlation of various state information in each set of motion state data to obtain target data.
  • the classification module 630 is configured to determine the user behavior type according to the target data.
  • the current behavior type of the user can be determined.
  • the processing of multiple sets of motion state data includes decorrelation processing. By decorrelating multiple sets of motion state data, the correlation of each state information in each set of motion state data is eliminated, and the redundant information in the multiple sets of acquired motion state data is greatly reduced.
  • the user behavior type is determined according to the target data obtained by the decorrelation processing, which improves the efficiency and accuracy of user behavior recognition.
  • the data acquisition module 610 is configured to acquire multiple sets of motion state data, and each set of motion state data includes multiple pieces of state information, and the state information is used to indicate the motion state of the mobile device carried by the user.
  • multiple sets of motion state data are collected by sensors deployed in the mobile device.
  • the data acquisition module 610 is further configured to acquire multiple sets of status data collected by the sensors deployed in the mobile terminal within a predetermined period of time according to a predetermined frequency.
  • the motion state data includes: acceleration information of the mobile device in multiple directions; and angular velocity information of the mobile device in multiple directions.
  • the decorrelation module 620 is configured to decorrelate the multiple sets of motion state data, so as to eliminate the correlation of various state information in each set of motion state data to obtain target data.
  • the decorrelation module 620 is further configured to: perform centralized processing on the multiple sets of motion state data so that the average value of each item of state information after processing is 0 to obtain centralized data; determine the centralized data The transformation matrix of the data is multiplied by the centralization data and the transformation matrix to obtain the target data, wherein the transformation matrix makes the covariance matrix of the target data an identity matrix, thereby eliminating various status information Correlation.
  • the decorrelation module 620 is further configured to: calculate the covariance matrix ⁇ of the centralized data; perform singular value decomposition on the covariance matrix ⁇ , and convert the covariance matrix ⁇ into a first matrix U, The product of the second matrix S and the transposed matrix U T of the first matrix U, where the first matrix U is a matrix composed of the eigenvectors of the covariance matrix ⁇ , and the second matrix S is the eigenvalues of the covariance matrix ⁇ .
  • Diagonal matrix composed of the matrix take the product of the matrices U, S -1/2 and U T as the transformation matrix, where the value of each element in S -1/2 is the reciprocal of the square root of the element at the corresponding position in the second matrix S .
  • the classification module 630 is configured to determine the user behavior type according to the target data.
  • the user behavior types include, for example, stationary, walking, running, cycling, taking a bus, taking a subway, taking a small car, and so on.
  • each module of the apparatus 600 shown in FIG. 6 may correspond to each step in the method 200 described with reference to FIG. 2. Therefore, the operations, features, and advantages described above for the method 200 are also applicable to the device 600 and the modules included in it. For the sake of brevity, some operations, features and advantages will not be repeated here.
  • the decorrelation module 620 and the classification module 630 form a user behavior recognition model, and the user behavior recognition model is trained using exercise state data marked with user behavior types as training samples.
  • FIG. 7 shows a structural block diagram of a user behavior recognition model 700 according to an exemplary embodiment.
  • the user behavior recognition model 700 includes a decorrelation module 7100 and a classification module 7200.
  • the decorrelation module 7100 is configured to decorrelate multiple sets of motion state data to eliminate the correlation of various state information in each set of motion state data to obtain target data.
  • the decorrelation module 7100 further includes a batch normalization layer (Batch Normalization), which is configured to adjust the mean value and variance of various status information in the target data Z so that the target data Z is most suitable
  • Batch Normalization a batch normalization layer
  • the state of model training improves the efficiency of model training and subsequent classification effects. Mark the adjusted data as Z’, and the processing performed by the batch standardization layer is as follows:
  • ⁇ and ⁇ are trainable parameters, and their values are determined by training.
  • the decorrelation module 7100 obtains the target data from which the relevance of the state information is eliminated, the target data is input to the classification module 7200 for processing.
  • the classification module 7200 is configured to process the target data to determine the user behavior type and output it.
  • the classification module 7200 includes a plurality of convolution processing units 7220-1 to 7220-N.
  • Each convolution processing unit includes two depthwise separable convolution layers (depthwise separable convolution) 7221 and 7222.
  • the convolution stride of the separable convolutional layer at the first depth is 1, and the convolution stride of the separable convolutional layer at the second depth is greater than 1.
  • the convolution step length of the second depth separable convolution layer may be 2 or other values.
  • the depth separable convolutional layer has greatly reduced the number of parameters, which reduces the complexity of the model, thereby increasing the running speed of the model.
  • the convolution step size setting greater than 1 replaces the pooling layer in the traditional neural network model. Compared with setting the pooling layer, the convolution step size greater than 1 can hardly affect the accuracy of the model and avoid A large amount of information loss caused by pooling reduces the complexity of the model and the risk of overfitting, and improves the running speed of the model.
  • FIG. 8 shows a structural block diagram of another user behavior recognition model 800 according to an exemplary embodiment.
  • the user behavior recognition type 800 includes a decorrelation module 8100 and a classification module 8200.
  • the decorrelation module 8100 is configured to decorrelate the input multiple sets of motion state data to eliminate the correlation of various state information in each set of motion state data to obtain target data.
  • the decorrelation module 8100 For the detailed features and advantages of the decorrelation module 8100, please refer to the related descriptions of the aforementioned step 220, the decorrelation module 620, and the decorrelation module 7100, which will not be repeated here.
  • the input multiple sets of motion state data form a 128*6 original data matrix (a total of 128 sets of motion state data, each group of motion state data includes 6-dimensional state information), after processing by the decorrelation module 8100, 128*6 In the target data, the correlation between various status information is eliminated in the target data.
  • the target data output by the decorrelation module 8100 is input to the classification module 8200.
  • the classification module 8200 is configured to perform a series of processing on the target data, and finally output the user behavior type.
  • the classification module 8200 includes three convolution processing units, and each convolution processing unit includes a first-depth separable convolutional layer and a second-depth separable convolutional layer.
  • the convolution stride of the separable convolutional layer at the first depth is 1, and the convolution stride of the separable convolutional layer at the second depth is 2.
  • the kernel size of all depth separable convolutional layers is 5, that is, 5*1, and the number of output channels (filters) is 16.
  • the depth separable convolutional layers all use the ReLu activation function (the activation layer is not shown in FIG. 8), and the convolution kernel has only weights and no biases.
  • the first-depth separable convolutional layer 1 performs convolution processing on 128*6 target data, and outputs a 128*16 feature map;
  • the second-depth separable convolutional layer 1 performs convolution processing on the 128*16 feature map output by the first-depth separable convolutional layer 1, and outputs a 64*16 feature map;
  • the first-depth separable convolutional layer 2 performs convolution processing on the 64*16 feature map output by the second-depth separable convolutional layer 1, and outputs a 64*16 feature map;
  • the second-depth separable convolutional layer 2 performs convolution processing on the 64*16 feature map output by the first-depth separable convolutional layer 2, and outputs a 32*16 feature map;
  • the first-depth separable convolutional layer 3 performs convolution processing on the 32*16 feature map output by the second-depth separable convolutional layer 2, and outputs a 32*16 feature map;
  • the second-depth separable convolutional layer 3 performs convolution processing on the 32*16 feature map output by the first-depth separable convolutional layer 3, and outputs a 16*16 feature map;
  • the flattening layer flattens the 16*16 feature map output by the second depth separable convolutional layer 3, and outputs a 256-dimensional feature vector;
  • the fully connected softmax layer fully connects the 256-dimensional feature vector output by the flattening layer, determines the probability that the feature vector belongs to each user behavior type, and outputs the user behavior type with the highest probability as the classification result.
  • the convolution step size of the second-depth separable convolution layer is 2, which realizes down-sampling of feature data, which replaces the pooling layer in the traditional neural network model.
  • setting the convolution step size to a value greater than 1 can avoid a large amount of information loss caused by pooling, and reduce model complexity and overtime without affecting the accuracy of the model.
  • the risk of fitting improves the running speed of the model.
  • the depth separable convolutional layer greatly reduces the number of parameters that need to be trained, which reduces the complexity of the model and improves the running speed of the model.
  • the following takes the first depth separable convolution layer 1 in FIG. 8 as an example to illustrate the technical effect of the depth separable convolution layer compared with the traditional convolution layer.
  • the target data Z is a 128*6 data matrix, as shown in Table 2 below:
  • the parameters of the first depth separable convolution layer 1 are: the convolution step stride is 1, the kernel size of the convolution kernel is 5, that is, 5*1, and the number of output channels filters is 16.
  • a convolution kernel with the same size as the number of output channels of 1*the number of input channels is set, and each row of data of the feature map obtained in the previous step is convolved. That is, 16 convolution kernels with a size of 1*6 are set, and each convolution kernel convolves the feature map F separately.
  • a 1*6 convolution kernel [w 1 , w 2 , w 3 , w 4 , w 5 , w 6 ] as an example.
  • the 128 rows of data of the feature map F are convolved to obtain 128 values p 1 to p 128 , and these 128 values form a 128*1 column vector.
  • Each 1*6 convolution kernel performs convolution processing on the feature map F, and a 128*1 column vector can be obtained.
  • 16 1*6 convolution kernels perform convolution processing on the feature map F, and 16 128*1 column vectors will be obtained, that is, a 128*16 feature map will be obtained.
  • each convolution kernel also needs to have 6 channels, that is, the depth of the convolution kernel is 6, which is equivalent to setting 16 5*1*6 The convolution kernel.
  • Each 5*1*6 convolution kernel convolves the 6 input channels of the target data Z to obtain a 128*1 feature vector.
  • 16 5*1*6 convolution kernels will get 16 A 128*1 feature vector, that is, a 128*16 feature map is obtained.
  • the specific module execution action discussed herein includes the specific module itself performing the action, or alternatively the specific module calls or otherwise accesses another component or module that performs the action (or performs the action in conjunction with the specific module). Therefore, the specific module that performs an action may include the specific module itself that performs the action and/or another module that is called or accessed by the specific module to perform the action.
  • the decorrelation module 620 and the classification module 630 described above may be combined into a single module in some embodiments.
  • modules described above with respect to FIG. 6 may be implemented in hardware or in hardware combined with software and/or firmware.
  • these modules may be implemented as computer program codes/instructions configured to be executed in one or more processors and stored in a computer-readable storage medium.
  • these modules can be implemented as hardware logic/circuitry.
  • one or more of the data acquisition module 610, the decorrelation module 620, and the classification module 630 may be implemented together in a System on Chip (SoC).
  • SoC System on Chip
  • the SoC may include an integrated circuit chip (which includes a processor (for example, a central processing unit (CPU), a microcontroller, a microprocessor, a digital signal processor (Digital Signal Processor, DSP), etc.), a memory, a Or multiple communication interfaces, and/or one or more components in other circuits), and may optionally execute the received program code and/or include embedded firmware to perform functions.
  • a processor for example, a central processing unit (CPU), a microcontroller, a microprocessor, a digital signal processor (Digital Signal Processor, DSP), etc.
  • DSP Digital Signal Processor
  • the SoC may optionally execute the received program code and/or include embedded firmware to perform functions.
  • a computer device including a memory, a processor, and a computer program stored on the memory.
  • the processor is configured to execute a computer program to implement the steps of any method embodiment described above.
  • a non-transitory computer-readable storage medium having a computer program stored thereon, and the computer program, when executed by a processor, implements the steps of any method embodiment described above.
  • a computer program product which includes a computer program that, when executed by a processor, implements the steps of any method embodiment described above.
  • Figure 9 shows an example configuration of a computer device 900 that can be used to implement the methods described herein.
  • the mobile device 110 and/or the server 120 shown in FIG. 1 may include an architecture similar to the computer device 900.
  • the user behavior recognition apparatus 600 described above may also be fully or at least partially implemented by the computer device 900 or similar devices or systems.
  • the computer device 900 may be a variety of different types of devices, such as a server of a service provider, a device associated with a mobile device, a system on a chip, and/or any other suitable computer device or computing system.
  • Examples of computer equipment 900 include, but are not limited to: desktop computers, server computers, laptops or netbook computers, mobile devices (for example, tablet computers, cellular or other wireless phones (for example, smart phones), notebook computers, mobile stations), Wearable devices (eg, glasses, watches), entertainment devices (eg, entertainment appliances, set-top boxes communicatively coupled to display devices, game consoles), televisions or other display devices, car computers, and so on.
  • the computer device 900 can range from full-resource devices with large amounts of memory and processor resources (e.g., personal computers, game consoles) to low-resource devices with limited memory and/or processing resources (e.g., traditional set-top boxes). , Handheld game console).
  • memory and processor resources e.g., personal computers, game consoles
  • processing resources e.g., traditional set-top boxes
  • Handheld game console e.g., Handheld game console
  • the computer device 900 may include at least one processor 902, a memory 904, a communication interface(s) 906, a display device 908, and other input/output (I/O) devices capable of communicating with each other, such as through the system bus 914 or other appropriate connections. 910 and one or more mass storage devices 912.
  • the computing device 900 further includes a sensor 924 for collecting data on its motion state.
  • the sensor 924 includes, but is not limited to, an acceleration sensor, a gyroscope, and the like.
  • the processor 902 may be a single processing unit or multiple processing units, and all processing units may include a single or multiple computing units or multiple cores.
  • the processor 902 may be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, central processing units, state machines, logic circuits, and/or any devices that manipulate signals based on operating instructions.
  • the processor 902 may be configured to obtain and execute computer-readable instructions stored in the memory 904, the mass storage device 912, or other computer-readable media, such as the program code of the operating system 916, and the application program 918 The program code of 920, the program code of other programs 920, etc.
  • the memory 904 and the mass storage device 912 are examples of computer-readable storage media for storing instructions, which are executed by the processor 902 to implement the various functions described above.
  • the memory 904 may generally include both volatile memory and non-volatile memory (e.g., RAM, ROM, etc.).
  • the mass storage device 912 may generally include hard disk drives, solid state drives, removable media, including external and removable drives, memory cards, flash memory, floppy disks, optical disks (such as CDs, DVDs), storage arrays, and network-attached storage. , Storage Area Network, etc.
  • Both the memory 904 and the mass storage device 912 may be collectively referred to herein as a memory or a computer-readable storage medium, and may be non-transitory media capable of storing computer-readable and processor-executable program instructions as computer program codes.
  • the computer program code may be executed by the processor 902 as a specific machine configured to implement the operations and functions described in the examples herein.
  • Program modules may be stored on the mass storage device 912. These programs include an operating system 916, one or more application programs 918, other programs 920, and program data 922, and they can be loaded into the memory 904 for execution. Examples of such application programs or program modules may include, for example, computer program logic (e.g., computer program code or instructions) for implementing the following components/functions: client application 112 (including data receiving module 610, decorrelation module 620, and classification Module 630), method 200 (including any suitable steps of method 200), and/or additional embodiments described herein.
  • client application 112 including data receiving module 610, decorrelation module 620, and classification Module 630
  • method 200 including any suitable steps of method 200
  • modules 916, 918, 920, and 922 or parts thereof may be implemented using any form of computer readable media that can be accessed by the computer device 900.
  • “computer-readable media” includes at least two types of computer-readable media, namely computer storage media and communication media.
  • Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented by any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or Other data.
  • Computer storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other storage technologies, CD-ROM, digital versatile disk (DVD), or other optical storage devices, magnetic cassettes, tapes, disk storage devices or other magnetic storage devices, Or any other non-transmission medium that can be used to store information for computer equipment to access.
  • a communication medium can specifically implement computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism.
  • Computer storage media as defined herein does not include communication media.
  • the computer device 900 may also include one or more communication interfaces 906 for exchanging data with other devices, such as through a network, direct connection, etc., as discussed above.
  • a communication interface may be one or more of the following: any type of network interface (for example, network interface card (NIC)), wired or wireless (such as IEEE 802.11 wireless LAN (WLAN)) wireless interface, global microwave Access interoperability (Wi-MAX) interface, Ethernet interface, universal serial bus (USB) interface, cellular network interface, Bluetooth TM interface, near field communication (NFC) interface, etc.
  • the communication interface 906 can facilitate communication within a variety of network and protocol types, including wired networks (such as LAN, cable, etc.) and wireless networks (such as WLAN, cellular, satellite, etc.), the Internet, and so on.
  • the communication interface 906 may also provide communication with external storage devices (not shown) such as in storage arrays, network-attached storage, storage area networks, and the like.
  • a display device 908 such as a monitor may be included for displaying information and images to the user.
  • the other I/O device 910 may be a device that receives various inputs from the user and provides various outputs to the user, and may include a touch input device, a gesture input device, a camera, a keyboard, a remote control, a mouse, a printer, and an audio input/ Output devices and so on.

Abstract

The present disclosure provides a user behavior identification method and apparatus, a computer device, and a medium. The user behavior identification method in the present disclosure comprises: obtaining a plurality of groups of motion state data, each group of motion state data comprising a plurality of pieces of state information, and the state information being used for representing a motion state of a mobile device carried by a user; performing de-correlation processing on the plurality of groups of motion state data to eliminate a correlation between the state information in each group of motion state data so as to obtain target data; and determining a user behavior type according to the target data.

Description

用户行为识别方法及装置、计算机设备及介质User behavior identification method and device, computer equipment and medium
相关申请的交叉引用Cross-references to related applications
本申请要求于2020年02月28日提交的中国专利申请202010127977.5的优先权,其全部内容通过引用整体结合在本申请中。This application claims the priority of Chinese patent application 202010127977.5 filed on February 28, 2020, the entire content of which is incorporated into this application by reference in its entirety.
技术领域Technical field
本公开涉及移动数据处理技术领域,特别是涉及一种用户行为识别方法、装置、计算机设备、非暂态计算机可读存储介质和计算机程序产品。The present disclosure relates to the field of mobile data processing technology, and in particular to a user behavior recognition method, device, computer equipment, non-transitory computer-readable storage medium, and computer program product.
背景技术Background technique
移动设备,例如手机、平板电脑、智能可穿戴设备等,给人们的生活带来了极大的便利。用户可以通过随身携带的移动设备观赏影音、购物、游戏、记录运动状态等。在一些情况中,实时识别用户的行为类型是有利的。例如,可以基于识别出的用户行为类型,定制化、智能化地为用户推荐内容、提供健康建议、制定运动计划等。Mobile devices, such as mobile phones, tablet computers, smart wearable devices, etc., have brought great convenience to people's lives. Users can watch audio and video, shop, play games, record exercise status, etc. through their portable mobile devices. In some cases, it is advantageous to recognize the user's behavior type in real time. For example, it is possible to customize and intelligently recommend content, provide health advice, and develop exercise plans for users based on the identified user behavior types.
在此部分中描述的方法不一定是之前已经设想到或采用的方法。除非另有指明,否则不应假定此部分中描述的任何方法仅因其包括在此部分中就被认为是现有技术。类似地,除非另有指明,否则此部分中提及的问题不应认为在任何现有技术中已被公认。The methods described in this section are not necessarily those that have been previously conceived or adopted. Unless otherwise indicated, it should not be assumed that any of the methods described in this section are considered prior art simply because they are included in this section. Similarly, unless otherwise specified, the problems mentioned in this section should not be considered recognized in any prior art.
发明内容Summary of the invention
提供一种缓解、减轻或甚至消除上述问题中的一个或多个的机制将是有利的。It would be advantageous to provide a mechanism to alleviate, alleviate or even eliminate one or more of the above-mentioned problems.
根据本公开的一方面,提供了一种用户行为识别方法,包括:获取多组运动状态数据,每组运动状态数据包括多项状态信息,状态信息用于表示用户携带的移动设备的运动状态;对上述多组运动状态数据进行去相关处理,以消除每组运动状态数据中的各项状态信息的相关性,得到目标数据;以及根据目标数据确定用户行为类型。According to an aspect of the present disclosure, there is provided a user behavior recognition method, including: acquiring multiple sets of motion state data, each set of motion state data includes multiple pieces of state information, and the state information is used to indicate the motion state of a mobile device carried by a user; Perform decorrelation processing on the multiple sets of exercise state data to eliminate the correlation of various state information in each set of exercise state data to obtain target data; and determine the user behavior type according to the target data.
根据本公开的另一方面,提供了一种用户行为识别装置,包括:数据获取模块,被配置为获取多组运动状态数据,每组运动状态数据包括多项状态信息,状态信息用于表示用户所携带的移动设备的运动状态;去相关模块,被配置为对上述多组运动状态数据进行去相关处理,以消除每组运动状态数据中的各项状态信息的相关性,得到目标数据;以及分类模块,被配置为根据目标数据确定用户行为类型。According to another aspect of the present disclosure, there is provided a user behavior recognition device, including: a data acquisition module configured to acquire multiple sets of exercise state data, each set of exercise state data includes multiple pieces of state information, and the state information is used to indicate a user The movement state of the carried mobile device; a decorrelation module configured to decorrelate the above multiple sets of movement state data to eliminate the correlation of various state information in each group of movement state data to obtain target data; and The classification module is configured to determine the user behavior type according to the target data.
根据本公开的另一方面,提供了一种计算机设备,包括:存储器、处理器以及存储在所述存储器上的计算机程序。处理器被配置为执行上述计算机程序以实现上述用户行为识别方法的步骤。According to another aspect of the present disclosure, there is provided a computer device including: a memory, a processor, and a computer program stored on the memory. The processor is configured to execute the above-mentioned computer program to implement the steps of the above-mentioned user behavior identification method.
根据本公开的另一方面,提供了一种非暂态计算机可读存储介质,其上存储有计算机程序。该计算机程序被处理器执行时实现上述用户行为识别方法的步骤。According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by the processor, the steps of the above-mentioned user behavior identification method are realized.
根据本公开的另一方面,提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述用户行为识别方法。According to another aspect of the present disclosure, there is provided a computer program product, including a computer program, which, when executed by a processor, implements the above-mentioned user behavior recognition method.
根据本公开的实施例,通过获取用户携带的移动设备的多组运动状态数据并对其进行处理,可以确定用户当前的行为类型。对多组运动状态数据的处理包括去相关处理。通过对多组运动状态数据进行去相关处理,消除了每组运动状态数据中的各项状态信息的相关性,大大减少了获取到的多组运动状态数据中的冗余信息。根据去相关处理所得到的目标数据来确定用户行为类型,提高了用户行为识别的效率和准确性。According to the embodiments of the present disclosure, by acquiring and processing multiple sets of motion state data of the mobile device carried by the user, the current behavior type of the user can be determined. The processing of multiple sets of motion state data includes decorrelation processing. By decorrelating multiple sets of motion state data, the correlation of each state information in each set of motion state data is eliminated, and the redundant information in the multiple sets of acquired motion state data is greatly reduced. The user behavior type is determined according to the target data obtained by the decorrelation processing, which improves the efficiency and accuracy of user behavior recognition.
根据在下文中所描述的实施例,本公开的这些和其它方面将是清楚明白的,并且将参考在下文中所描述的实施例而被阐明。These and other aspects of the present disclosure will be clear from the embodiments described below, and will be clarified with reference to the embodiments described below.
附图说明Description of the drawings
附图示例性地示出了实施例并且构成说明书的一部分,与说明书的文字描述一起用于讲解实施例的示例性实施方式。所示出的实施例仅出于例示的目的,并不限制权利要求的范围。在所有附图中,相同的附图标记指代类似但不一定相同的要素。The accompanying drawings exemplarily show the embodiments and constitute a part of the specification, and together with the text description of the specification are used to explain exemplary implementations of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. In all the drawings, the same reference signs refer to similar but not necessarily the same elements.
图1是图示出根据示例性实施例的可以在其中实施本文描述的各种方法的示例系统的示意图;FIG. 1 is a schematic diagram illustrating an example system in which various methods described herein may be implemented according to an example embodiment;
图2是图示出根据示例性实施例的用户行为识别方法的流程图;Fig. 2 is a flowchart illustrating a user behavior recognition method according to an exemplary embodiment;
图3是图示出根据示例性实施例的机身坐标系的示意图;Fig. 3 is a schematic diagram illustrating a fuselage coordinate system according to an exemplary embodiment;
图4是图示出根据示例性实施例的运动状态数据中的各项状态信息的相关性的示意图;4 is a schematic diagram illustrating the correlation of various pieces of state information in exercise state data according to an exemplary embodiment;
图5是图示出了对图4中涉及的运动状态数据进行去相关处理后,各项状态信息的相关性的示意图;FIG. 5 is a schematic diagram illustrating the correlation of various state information after decorrelation processing is performed on the motion state data involved in FIG. 4;
图6是图示出根据示例性实施例的用户行为识别装置的示意图;Fig. 6 is a schematic diagram illustrating a user behavior recognition apparatus according to an exemplary embodiment;
图7是图示出根据示例性实施例的用户行为识别模型的结构框图;Fig. 7 is a structural block diagram illustrating a user behavior recognition model according to an exemplary embodiment;
图8是图示出根据示例性实施例的另一用户行为识别模型的结构框图;Fig. 8 is a structural block diagram illustrating another user behavior recognition model according to an exemplary embodiment;
图9是图示出能够应用于示例性实施例的示例性计算机设备的示意图。Fig. 9 is a schematic diagram illustrating an exemplary computer device that can be applied to the exemplary embodiment.
具体实施方式Detailed ways
在本公开中,除非另有说明,否则使用术语“第一”、“第二”等来描述各种要素不意图限定这些要素的位置关系、时序关系或重要性关系,这种术语只是用于将一个元件与另一元件区分开。在一些示例中,第一要素和第二要素可以指向该要素的同一实例,而在某些情况下,基于上下文的描述,它们也可以指代不同实例。In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of these elements. Such terms are only used for Distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.
在本公开中对各种所述示例的描述中所使用的术语只是为了描述特定示例的目的,而并非旨在进行限制。除非上下文另外明确地表明,如果不特意限定要素的数量,则该要素可以是一个也可以是多个。如本文使用的,术语“多个”意指两个或更多,并且术语“基于”应解释为“至少部分地基于”。此外,术语“和/或”以及“……中的至少一个”涵盖所列出的项目中的任何一个以及全部可能的组合方式。The terms used in the description of the various examples in this disclosure are only for the purpose of describing specific examples, and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, there may be one or more elements. As used herein, the term "plurality" means two or more, and the term "based on" should be interpreted as "based at least in part." In addition, the terms "and/or" and "at least one of" cover any one of the listed items and all possible combinations.
下面结合附图详细描述本公开的示例性实施例。The exemplary embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
图1是图示出根据示例性实施例的可以在其中实施本文描述的各种方法的示例系统100的示意图。FIG. 1 is a schematic diagram illustrating an example system 100 in which various methods described herein may be implemented according to an example embodiment.
参考图1,该系统100包括移动设备110、服务器120、以及将移动设备110与服务器120通信地耦合的网络130。Referring to FIG. 1, the system 100 includes a mobile device 110, a server 120, and a network 130 that communicatively couples the mobile device 110 and the server 120.
移动设备110包括显示器114和可经由显示器114显示的客户端应用(APP)112。客户端应用112可以为运行前需要下载和安装的应用程序或者作为轻量化应用程序的小程序(liteapp)。在客户端应用112为运行前需要下载和安装的应用程序的情况下,客户端应用112可以被预先安装在移动设备110上并被激活。在客户端应用112为小程序的情况下,用户102可以通过在宿主应用中搜索客户端应用112(例如,通过客户端应用112的名称等)或扫描客户端应用112的图形码(例如,条形码、二维码等)等方式,在移动设备110上直接运行客户端应用112,而无需安装客户端应用112。移动设备110可以是任何类型的移动设备,包括移动计算机、移动电话、可穿戴式计算机设备(例如智能手表、头戴式设备,包括智能眼镜,等)或其他类型的移动设备。The mobile device 110 includes a display 114 and a client application (APP) 112 that can be displayed via the display 114. The client application 112 may be an application that needs to be downloaded and installed before running, or a small program (liteapp) that is a lightweight application. When the client application 112 is an application that needs to be downloaded and installed before running, the client application 112 may be pre-installed on the mobile device 110 and activated. In the case where the client application 112 is an applet, the user 102 can search for the client application 112 in the host application (for example, by the name of the client application 112, etc.) or scan the graphic code of the client application 112 (for example, a barcode). , QR code, etc.), directly run the client application 112 on the mobile device 110 without installing the client application 112. The mobile device 110 may be any type of mobile device, including a mobile computer, a mobile phone, a wearable computer device (such as a smart watch, a head-mounted device, including smart glasses, etc.) or other types of mobile devices.
服务器120典型地为由互联网服务提供商(ISP)或互联网内容提供商(ICP)部署的服务器。服务器120可以代表单台服务器、多台服务器的集群、分布式系统、或者提供基础云服务(诸如云数据库、云计算、云存储、云通信)的云服务器。将理解的是,虽 然图1中示出服务器120与仅一个移动设备110通信,但是服务器120可以同时为多个移动设备提供后台服务。The server 120 is typically a server deployed by an Internet Service Provider (ISP) or Internet Content Provider (ICP). The server 120 may represent a single server, a cluster of multiple servers, a distributed system, or a cloud server that provides basic cloud services (such as cloud databases, cloud computing, cloud storage, and cloud communications). It will be understood that although the server 120 is shown in FIG. 1 to communicate with only one mobile device 110, the server 120 may provide background services for multiple mobile devices at the same time.
网络130的示例包括局域网(LAN)、广域网(WAN)、个域网(PAN)、和/或诸如互联网之类的通信网络的组合。网络130可以是有线或无线网络。在一些实施例中,使用包括超文本标记语言(HTML)、可扩展标记语言(XML)等的技术和/或格式来处理通过网络130交换的数据。此外,还可以使用诸如安全套接字层(SSL)、传输层安全(TLS)、虚拟专用网络(VPN)、网际协议安全(IPsec)等加密技术来加密所有或者一些链路。在一些实施例中,还可以使用定制和/或专用数据通信技术来取代或者补充上述数据通信技术。Examples of the network 130 include a combination of a local area network (LAN), a wide area network (WAN), a personal area network (PAN), and/or a communication network such as the Internet. The network 130 may be a wired or wireless network. In some embodiments, technologies and/or formats including Hypertext Markup Language (HTML), Extensible Markup Language (XML), etc. are used to process data exchanged through the network 130. In addition, encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec), etc. can also be used to encrypt all or some links. In some embodiments, customized and/or dedicated data communication technologies can also be used to replace or supplement the aforementioned data communication technologies.
为了本公开实施例的目的,在图1的示例中,移动设备110中部署有用于采集移动设备110的运动状态数据的传感器以及客户端应用112。客户端应用112可以为用户行为识别应用程序,该应用程序可以根据传感器采集到的移动设备110的运动状态数据来确定携带该移动设备110的用户的行为类型。与此相应,服务器120可以是与该用户行为识别应用程序一起使用的服务器。该服务器120中部署有用户行为识别模型(用户行为识别模型的细节将在下文实施例中详述)。该服务器120可以基于用户行为识别模型向移动设备110中运行的客户端应用112提供用户行为识别服务,例如,服务器120接收移动设备110通过客户端应用112发来的运动状态数据,将运动状态数据输入用户行为识别模型以确定用户行为类型。可替换地,服务器120也可以将用户行为识别模型提供给移动设备110,移动设备110中运行的客户端应用112可以通过调用该用户行为识别模型来实现用户行为识别功能。For the purpose of the embodiments of the present disclosure, in the example of FIG. 1, a sensor for collecting motion state data of the mobile device 110 and a client application 112 are deployed in the mobile device 110. The client application 112 may be a user behavior recognition application, and the application may determine the behavior type of the user carrying the mobile device 110 according to the motion state data of the mobile device 110 collected by the sensor. Correspondingly, the server 120 may be a server used with the user behavior recognition application. A user behavior recognition model is deployed in the server 120 (the details of the user behavior recognition model will be detailed in the following embodiments). The server 120 can provide a user behavior recognition service to the client application 112 running in the mobile device 110 based on the user behavior recognition model. For example, the server 120 receives the exercise status data sent by the mobile device 110 through the client application 112, and then transfers the exercise status data to the client application 112. Enter the user behavior recognition model to determine the type of user behavior. Alternatively, the server 120 may also provide the user behavior recognition model to the mobile device 110, and the client application 112 running in the mobile device 110 may implement the user behavior recognition function by calling the user behavior recognition model.
用户行为识别模型可以是预先训练好的神经网络模型,该模型的细节将在下文实施例中进行详述。服务器120例如可以使用诸如误差的反向传播等各种训练或学习技术来训练用户行为识别模型。在一些实施例中,执行误差的反向传播可以包括执行通过时间截断的反向传播(truncated backpropagation through time)。服务器120可以采用多种泛化技术(例如,权重衰减、丢失等)以改进正在训练的模型的泛化能力。具体地,服务器120可以基于训练样本的集合来训练用户行为识别模型。在本公开的实施例中,训练样本例如可以是标注了用户行为类型的运动状态数据。在用户行为识别模型训练完成后,可以在服务器120中将该模型转化为TFLite格式的模型文件(TensorFlow Lite文件,其中模型参数被量化为8位的整数类型,即int8)。将该文件部署于移动设备110中,这样,移动 设备110中运行的客户端应用112便可以通过调用该用户行为识别模型来实现用户行为识别功能了。The user behavior recognition model may be a pre-trained neural network model, and the details of the model will be described in detail in the following embodiments. The server 120 may, for example, use various training or learning techniques such as back propagation of errors to train the user behavior recognition model. In some embodiments, performing backpropagation of errors may include performing truncated backpropagation through time. The server 120 may employ a variety of generalization techniques (for example, weight attenuation, loss, etc.) to improve the generalization ability of the model being trained. Specifically, the server 120 may train the user behavior recognition model based on the set of training samples. In an embodiment of the present disclosure, the training sample may be, for example, exercise state data marked with the type of user behavior. After the user behavior recognition model training is completed, the model can be converted into a TFLite format model file (TensorFlow Lite file, in which the model parameters are quantized into an 8-bit integer type, that is, int8) in the server 120. The file is deployed in the mobile device 110, so that the client application 112 running in the mobile device 110 can implement the user behavior recognition function by calling the user behavior recognition model.
图2是图示出根据示例性实施例的用户行为识别方法200的流程图。方法200可以在移动设备(例如,图1中所示的移动设备110)处执行,也即,方法200的各个步骤的执行主体可以是图1中所示的移动设备110。在一些实施例中,方法200可以在服务器(例如,图1中所示的服务器120)处执行。在另一些实施例中,方法200可以由移动设备(例如,移动设备110)和服务器(例如,服务器120)相组合地执行。下文中,以执行主体为移动设备110为例,来描述方法200。FIG. 2 is a flowchart illustrating a user behavior recognition method 200 according to an exemplary embodiment. The method 200 may be executed at a mobile device (for example, the mobile device 110 shown in FIG. 1 ), that is, the execution subject of each step of the method 200 may be the mobile device 110 shown in FIG. 1. In some embodiments, the method 200 may be executed at a server (for example, the server 120 shown in FIG. 1). In other embodiments, the method 200 may be executed by a combination of a mobile device (e.g., mobile device 110) and a server (e.g., server 120). Hereinafter, the method 200 is described by taking the mobile device 110 as the execution subject as an example.
如图2所示,方法200包括步骤210至230。在步骤210中,获取多组运动状态数据,每组运动状态数据包括多项状态信息,所述状态信息用于表示所述用户携带的移动设备的运动状态。在步骤220中,对所述多组运动状态数据进行去相关处理,以消除每组运动状态数据中的各项状态信息的相关性,得到目标数据。在步骤230中,根据所述目标数据确定用户行为类型。As shown in FIG. 2, the method 200 includes steps 210 to 230. In step 210, multiple sets of exercise state data are obtained, and each set of exercise state data includes multiple pieces of state information, and the state information is used to indicate the exercise state of the mobile device carried by the user. In step 220, decorrelation processing is performed on the multiple sets of motion state data to eliminate the correlation of various state information in each set of motion state data to obtain target data. In step 230, the user behavior type is determined according to the target data.
根据本公开的实施例,通过获取用户携带的移动设备的多组运动状态数据并对其进行处理,可以确定用户当前的行为类型。对多组运动状态数据的处理包括去相关处理。通过对多组运动状态数据进行去相关处理,消除了每组运动状态数据中的各项状态信息的相关性,大大减少了获取到的多组运动状态数据中的冗余信息。根据去相关处理所得到的目标数据来确定用户行为类型,提高了用户行为识别的效率和准确性。According to the embodiments of the present disclosure, by acquiring and processing multiple sets of motion state data of the mobile device carried by the user, the current behavior type of the user can be determined. The processing of multiple sets of motion state data includes decorrelation processing. By decorrelating multiple sets of motion state data, the correlation of each state information in each set of motion state data is eliminated, and the redundant information in the multiple sets of acquired motion state data is greatly reduced. The user behavior type is determined according to the target data obtained by the decorrelation processing, which improves the efficiency and accuracy of user behavior recognition.
下文将详细描述方法200的各个步骤。Hereinafter, each step of the method 200 will be described in detail.
参考图2,在步骤210中,获取多组运动状态数据,每组运动状态数据包括多项状态信息,所述状态信息用于表示所述用户携带的移动设备的运动状态。Referring to FIG. 2, in step 210, multiple sets of exercise state data are obtained, and each set of exercise state data includes multiple pieces of state information, and the state information is used to indicate the exercise state of the mobile device carried by the user.
根据一些实施例,步骤210中所述的多组运动状态数据由部署在移动设备中的传感器采集。传感器包括但不限于加速度传感器、陀螺仪(即角速度传感器)、磁场传感器等。According to some embodiments, the multiple sets of motion state data described in step 210 are collected by sensors deployed in the mobile device. Sensors include, but are not limited to, acceleration sensors, gyroscopes (ie, angular velocity sensors), magnetic field sensors, and the like.
根据一些实施例,移动设备中部署的传感器包括加速度传感器和陀螺仪,相应地,传感器所采集到的移动设备的运动状态数据包括:移动设备在多个方向上的加速度信息;以及移动设备在多个方向上的角速度信息。According to some embodiments, the sensors deployed in the mobile device include an acceleration sensor and a gyroscope. Accordingly, the motion state data of the mobile device collected by the sensor includes: acceleration information of the mobile device in multiple directions; Angular velocity information in each direction.
通常地,加速度传感器可以采集移动设备在x、y、z三个坐标轴上的加速度信息;陀螺仪可以采集移动设备在x、y、z三个坐标轴上的角速度信息(即移动设备绕x、y、z三个坐标轴旋转的角速度信息)。图3示出了根据示例性实施例的机身坐标系的示意图。 如图3所示,机身坐标系的原点为移动设备的屏幕的中心点,x轴方向为屏幕平面内水平向右;y轴方向为屏幕平面内竖直向上;z轴方向垂直于屏幕平面并指向屏幕上方。Generally, the acceleration sensor can collect the acceleration information of the mobile device on the three coordinate axes of x, y and z; the gyroscope can collect the angular velocity information of the mobile device on the three coordinate axes of x, y, and z , Y, z three coordinate axis rotation angular velocity information). Fig. 3 shows a schematic diagram of a fuselage coordinate system according to an exemplary embodiment. As shown in Figure 3, the origin of the body coordinate system is the center point of the screen of the mobile device, the x-axis direction is horizontal to the right in the screen plane; the y-axis direction is vertical upwards in the screen plane; the z-axis direction is perpendicular to the screen plane And point to the top of the screen.
根据一些实施例,步骤210包括:按照预定频率获取预定时长内由部署在移动设备中的传感器采集到的多组运动状态数据。According to some embodiments, step 210 includes: acquiring multiple sets of motion state data collected by sensors deployed in the mobile device within a predetermined period of time at a predetermined frequency.
应当指出,预定频率以及预定时长的值可以由本领域技术人员根据实际情况自行设置。优选地,将预定频率设置为较小的数值,从而降低对传感器数据订阅的需求,降低耗电量;同时,将预定时长也设置为一个较小的合适的数值,从而在保证用户行为识别的准确性的同时降低延时,增加响应的灵敏度,提高用户行为识别的实时性,即实时识别出用户当前的行为类型。例如,在一个实施例中,可以将预定频率设置为20Hz(即从传感器获取运动状态数据的间隔时间为50ms),预定时长设置为6400ms,那么步骤210相当于以50ms的时间间隔获取128组运动状态数据。It should be noted that the values of the predetermined frequency and the predetermined duration can be set by those skilled in the art according to actual conditions. Preferably, the predetermined frequency is set to a smaller value, thereby reducing the demand for sensor data subscription and reducing power consumption; at the same time, the predetermined duration is also set to a smaller appropriate value, thereby ensuring the recognition of user behavior The accuracy is reduced while the delay is increased, the sensitivity of the response is increased, and the real-time performance of user behavior recognition is improved, that is, the current behavior type of the user is recognized in real time. For example, in one embodiment, the predetermined frequency may be set to 20 Hz (that is, the interval time for obtaining motion state data from the sensor is 50 ms), and the predetermined duration is set to 6400 ms, then step 210 is equivalent to obtaining 128 sets of motion at a time interval of 50 ms. Status data.
以每组运动状态数据包括加速度传感器采集到的移动设备在x、y、z三个坐标轴方向上的加速度信息和陀螺仪采集到的移动设备绕x、y、z三个坐标轴旋转的角速度信息为例,在预定频率设置为20Hz、预定时长设置为6400ms的情况下,获取到的128组运动状态数据d 1至d 128如下表1所示: Each group of motion state data includes the acceleration information of the mobile device in the directions of the three coordinate axes x, y, and z collected by the acceleration sensor and the angular velocity of the mobile device rotating around the three coordinate axes of x, y, and z collected by the gyroscope. Take the information as an example. When the predetermined frequency is set to 20Hz and the predetermined duration is set to 6400ms, the obtained 128 sets of motion state data d 1 to d 128 are shown in Table 1 below:
表1.状态数据示例Table 1. Example of status data
Figure PCTCN2021077744-appb-000001
Figure PCTCN2021077744-appb-000001
在表1中,每一行对应于一组运动状态数据,每一组运动状态数据包括x轴加速度信息、y轴加速度信息、z轴加速度信息、x轴角速度信息、y轴角速度信息、z轴角速度信息六项状态信息。In Table 1, each row corresponds to a set of motion state data, and each set of motion state data includes x-axis acceleration information, y-axis acceleration information, z-axis acceleration information, x-axis angular velocity information, y-axis angular velocity information, and z-axis angular velocity Information six status information.
步骤210获取到的移动设备的运动状态数据与当前携带该移动设备的用户的行为具有较强的相关性,可以据此识别出用户行为类型。用户行为类型包括但不限于静止、行走、跑步、骑行、乘公交车、乘地铁、乘小型汽车(例如出租车、私家车等)等。The motion state data of the mobile device acquired in step 210 has a strong correlation with the behavior of the user currently carrying the mobile device, and the user behavior type can be identified accordingly. User behavior types include but are not limited to being stationary, walking, running, cycling, taking a bus, taking a subway, taking a small car (such as a taxi, private car, etc.), etc.
继续参考图2,在步骤210获取到多组运动状态数据后,执行步骤220。Continuing to refer to FIG. 2, after obtaining multiple sets of motion state data in step 210, step 220 is executed.
在步骤220中,对所述多组运动状态数据进行去相关处理,以消除每组运动状态数据中的各项状态信息的相关性,得到目标数据。In step 220, decorrelation processing is performed on the multiple sets of motion state data to eliminate the correlation of various state information in each set of motion state data to obtain target data.
由于同一个传感器所采集到的多项数据往往存在较大的线性相关性,例如,加速度传感器所采集到的x、y、z轴的加速度信息三者之间存在较大的相关性,陀螺仪所采集到的x、y、z轴的角速度信息三者之间存在较大的相关性。图4以矩阵的形式示出了多组运动状态数据中的各项状态信息的相关性,其中,编号0至5分别表示x轴加速度信息、y轴加速度信息、z轴加速度信息、x轴角速度信息、y轴角速度信息、z轴角速度信息,矩阵中第i行第j列的元素表示编号i对应的信息与编号j对应的信息的相关性(协方差),相关性的绝对值越接近1,表示两种状态信息的相关性越强,相关性的绝对值越接近0,表示两种状态信息的相关性越弱。相关性为正数,表示两种状态信息正相关;相关性为负数,表示两种状态信息负相关。Since multiple data collected by the same sensor often have a large linear correlation, for example, there is a large correlation between the acceleration information of the x, y, and z axes collected by the acceleration sensor. There is a large correlation between the collected angular velocity information of the x, y, and z axes. Figure 4 shows the correlation of various state information in multiple sets of motion state data in the form of a matrix, where numbers 0 to 5 respectively represent x-axis acceleration information, y-axis acceleration information, z-axis acceleration information, and x-axis angular velocity. Information, y-axis angular velocity information, z-axis angular velocity information, the element in the i-th row and j-th column of the matrix represents the correlation (covariance) between the information corresponding to the number i and the information corresponding to the number j. The absolute value of the correlation is closer to 1 , Indicates that the stronger the correlation between the two state information, the closer the absolute value of the correlation is to 0, the weaker the correlation between the two state information. The correlation is a positive number, which means that the two state information is positively correlated; the correlation is a negative number, which means that the two state information is negatively correlated.
图4右侧示出了相关性与灰度值的对应关系图例,以更直观地展示各项状态信息的相关性,灰度越浅,表示两种状态信息的相关性越强;灰度越深,表示两种状态信息的相关性越弱。在图4左侧所示的相关性矩阵中,相关性较强的部分(即浅色部分)位于矩阵的左上角和右下角,即加速度传感器所采集到的x、y、z轴的加速度信息三者之间存在较大的相关性,陀螺仪所采集到的x、y、z轴的角速度信息三者之间存在较大的相关性。The right side of Figure 4 shows an example of the corresponding relationship between correlation and gray value to show the correlation of various state information more intuitively. The lighter the gray, the stronger the correlation between the two state information; the more gray Deep, it means that the correlation between the two status information is weaker. In the correlation matrix shown on the left side of Figure 4, the more correlated parts (that is, the light-colored parts) are located in the upper left and lower right corners of the matrix, that is, the acceleration information of the x, y, and z axes collected by the acceleration sensor There is a large correlation between the three, and there is a large correlation between the angular velocity information of the x, y, and z axes collected by the gyroscope.
状态信息的相关性意味着传感器所采集到的原始运动状态数据中存在大量的信息冗余,会降低用户行为识别的效率和准确性。因此,在步骤220中,对多组运动状态数据进行去相关处理,以提高用户行为识别的效率和准确性。The relevance of status information means that there is a large amount of information redundancy in the original motion status data collected by the sensor, which will reduce the efficiency and accuracy of user behavior recognition. Therefore, in step 220, decorrelation processing is performed on multiple sets of motion state data to improve the efficiency and accuracy of user behavior recognition.
在一些实施例中,步骤220进一步包括下述步骤222至224:In some embodiments, step 220 further includes the following steps 222 to 224:
在步骤222中,对所述多组运动状态数据进行中心化处理,使处理后的每项状态信息的均值为0,得到中心化数据。In step 222, centralization processing is performed on the multiple sets of motion state data, so that the average value of each state information after processing is 0, and centralization data is obtained.
具体地,多组运动状态数据可以组成原始数据矩阵,原始数据矩阵中的每一行表示一组运动状态数据,每一列标识一项状态信息。例如,前述表1中的128组运动状态数据可以组成128*6的原始数据矩阵D,即:Specifically, multiple sets of motion state data may form an original data matrix, each row in the original data matrix represents a set of motion state data, and each column identifies one item of state information. For example, the 128 groups of motion state data in Table 1 can form a 128*6 original data matrix D, namely:
Figure PCTCN2021077744-appb-000002
Figure PCTCN2021077744-appb-000002
原始数据矩阵D的每一行表示一组运动状态数据,每一列对应于一项状态信息,每列对应的状态信息分别为x轴加速度信息、y轴加速度信息、z轴加速度信息、x轴角速度信息、y轴角速度信息、z轴角速度信息。Each row of the original data matrix D represents a group of motion state data, and each column corresponds to a piece of state information. The state information corresponding to each column is x-axis acceleration information, y-axis acceleration information, z-axis acceleration information, and x-axis angular velocity information. , Y-axis angular velocity information, z-axis angular velocity information.
对于原始数据矩阵D,求其中每一列的均值,得到均值向量
Figure PCTCN2021077744-appb-000003
Figure PCTCN2021077744-appb-000004
中心化数据C即为原始数据矩阵D与均值向量E(D)的差,即:
For the original data matrix D, find the mean value of each column, and get the mean vector
Figure PCTCN2021077744-appb-000003
Figure PCTCN2021077744-appb-000004
Centralized data C is the difference between the original data matrix D and the mean vector E(D), namely:
Figure PCTCN2021077744-appb-000005
Figure PCTCN2021077744-appb-000005
在步骤224中,确定所述中心化数据的变换矩阵,将所述中心化数据与所述变换矩阵相乘,以得到目标数据,其中,所述变换矩阵使得所述目标数据的协方差矩阵为单位矩阵,从而消除各项状态信息的相关性。In step 224, a transformation matrix of the centralization data is determined, and the centralization data is multiplied by the transformation matrix to obtain target data, wherein the transformation matrix makes the covariance matrix of the target data Identity matrix, thereby eliminating the relevance of various status information.
根据一些实施例,中心化数据的变换矩阵采用下述步骤2242至2246来确定:According to some embodiments, the transformation matrix of the centralized data is determined using the following steps 2242 to 2246:
在步骤2242中,计算所述中心化数据的协方差矩阵Σ。有:In step 2242, the covariance matrix Σ of the centralized data is calculated. Have:
Figure PCTCN2021077744-appb-000006
Figure PCTCN2021077744-appb-000006
其中,m为运动状态数据的组数,以表1所示的运动状态数据为例,有m=128。Among them, m is the number of groups of exercise state data. Taking the exercise state data shown in Table 1 as an example, m=128.
随后,在步骤2244中,对协方差矩阵Σ进行奇异值分解,将协方差矩阵Σ转化成第一矩阵U、第二矩阵S和第一矩阵U的转置矩阵U T的乘积,其中,第一矩阵U为协方差矩阵Σ的特征向量所组成的矩阵,第二矩阵S为协方差矩阵Σ的特征值所组成的对角矩阵。即,协方差矩阵Σ的奇异值分解结果为: Subsequently, in step 2244, the covariance matrix Σ is subjected to singular value decomposition, and the covariance matrix Σ is transformed into the product of the first matrix U, the second matrix S, and the transposed matrix U T of the first matrix U. One matrix U is a matrix composed of eigenvectors of the covariance matrix Σ, and the second matrix S is a diagonal matrix composed of eigenvalues of the covariance matrix Σ. That is, the singular value decomposition result of the covariance matrix Σ is:
∑=USU T ∑=USU T
随后,在步骤2246中,将矩阵U、S -1/2、U T的乘积作为变换矩阵,其中,S -1/2中各元素的值为第二矩阵S中相应位置的元素的平方根的倒数。即,变换矩阵W为: Subsequently, in step 2246, the product of the matrices U, S -1/2 and U T is used as the transformation matrix, where the value of each element in S -1/2 is the square root of the element at the corresponding position in the second matrix S reciprocal. That is, the transformation matrix W is:
Figure PCTCN2021077744-appb-000007
Figure PCTCN2021077744-appb-000007
回到步骤224,在确定了中心化数据的变换矩阵W后,将中心化数据C与变换矩阵W相乘,得到目标数据Z,即:Returning to step 224, after the transformation matrix W of the centralized data is determined, the centralized data C is multiplied by the transformation matrix W to obtain the target data Z, namely:
Z=CWZ=CW
容易证明,目标数据Z的协方差矩阵
Figure PCTCN2021077744-appb-000008
即:
It is easy to prove that the covariance matrix of the target data Z
Figure PCTCN2021077744-appb-000008
which is:
Figure PCTCN2021077744-appb-000009
Figure PCTCN2021077744-appb-000009
Figure PCTCN2021077744-appb-000010
Figure PCTCN2021077744-appb-000010
由上可见,目标数据Z的协方差矩阵为对角线元素为1,其他元素均为0的单位矩阵I。也就是说,在目标数据Z中,不同状态信息之间的协方差均为0,从而消除了各项状态信息之间的相关性。It can be seen from the above that the covariance matrix of the target data Z is an identity matrix I with diagonal elements of 1, and other elements of 0. That is to say, in the target data Z, the covariance between different state information is 0, thereby eliminating the correlation between various state information.
图5示出了对图4涉及的多组运动状态数据进行去相关处理后的各项状态信息的相关性(协方差)。在图5所示的相关性矩阵中,除对角线元素值为1之外,其他位置的元素值均非常小,达到10^(-6)、10^(-7)数量级,几乎为0,表明各项状态信息之间的相关性被消除。FIG. 5 shows the correlation (covariance) of various state information after decorrelating the multiple sets of motion state data involved in FIG. 4. In the correlation matrix shown in Figure 5, except for the diagonal element value 1, the element values at other positions are all very small, reaching the order of 10^(-6), 10^(-7), almost 0 , Indicating that the correlation between various status information is eliminated.
继续参考图2,在步骤220对多组运动状态数据进行去相关处理,得到目标数据后,执行步骤230。Continuing to refer to FIG. 2, in step 220, the multiple sets of motion state data are decorrelated, and after the target data is obtained, step 230 is executed.
在步骤230中,根据目标数据确定用户行为类型。In step 230, the user behavior type is determined according to the target data.
步骤220所得到的目标数据与用户行为类型具有较强的相关性。在步骤230中,可以根据目标数据与用户行为类型的相关关系,来确定目标数据对应的用户行为类型。用户行为类型例如包括静止、行走、跑步、骑行、乘公交车、乘地铁、乘小型汽车(例如出租车、私家车等)等,但不限与此。The target data obtained in step 220 has a strong correlation with the type of user behavior. In step 230, the user behavior type corresponding to the target data can be determined according to the correlation between the target data and the user behavior type. The user behavior types include, for example, being stationary, walking, running, cycling, taking a bus, taking a subway, taking a small car (such as a taxi, a private car, etc.), but not limited thereto.
根据一些实施例,步骤220和步骤230可以通过训练好的用户行为识别模型来实现。即,步骤220包括:将所述多组运动状态数据输入预设的用户行为识别模型,以便用户行为识别模型对所述多组运动状态数据进行去相关处理,得到目标数据。步骤230包括:由所述用户行为识别模型对所述目标数据进行处理,以确定用户行为类型。According to some embodiments, step 220 and step 230 may be implemented by a trained user behavior recognition model. That is, step 220 includes: inputting the multiple sets of motion state data into a preset user behavior recognition model, so that the user behavior recognition model performs decorrelation processing on the multiple sets of motion state data to obtain target data. Step 230 includes: processing the target data by the user behavior recognition model to determine the user behavior type.
根据一些实施例,用户行为识别模型以标注了用户行为类型的运动状态数据为训练样本训练得出。训练好的用户行为识别模型以运动状态数据为输入,输出该运动状态数据对应的用户行为类型。具体地,用户行为识别模型包括去相关模块和分类模块,其中,去相关模块被配置为执行步骤220,即对多组运动状态数据进行去相关处理,以消除每组 运动状态数据中的各项状态信息的相关性,得到目标数据。分类模块被配置为执行步骤230,即根据目标数据确定用户行为类型。According to some embodiments, the user behavior recognition model is trained by using the motion state data marked with the user behavior type as the training sample. The trained user behavior recognition model takes exercise state data as input, and outputs the user behavior type corresponding to the exercise state data. Specifically, the user behavior recognition model includes a decorrelation module and a classification module. The decorrelation module is configured to perform step 220, that is, decorrelate multiple sets of exercise state data to eliminate items in each group of exercise state data. Relevance of status information to get target data. The classification module is configured to perform step 230, which is to determine the user behavior type according to the target data.
图6是图示出根据示例性实施例的用户行为识别装置600的示意图。装置600。如图6所示,装置600包括数据获取模块610、去相关模块620和分类模块630。FIG. 6 is a schematic diagram illustrating a user behavior recognition apparatus 600 according to an exemplary embodiment.装置600。 Device 600. As shown in FIG. 6, the device 600 includes a data acquisition module 610, a decorrelation module 620 and a classification module 630.
数据获取模610被配置为获取多组运动状态数据,每组运动状态数据包括多项状态信息,所述状态信息用于表示所述用户所携带的移动设备的运动状态。The data acquisition module 610 is configured to acquire multiple sets of motion state data, and each set of motion state data includes multiple pieces of state information, and the state information is used to indicate the motion state of the mobile device carried by the user.
去相关模块620被配置为对所述多组运动状态数据进行去相关处理,以消除每组运动状态数据中的各项状态信息的相关性,得到目标数据。The decorrelation module 620 is configured to decorrelate the multiple sets of motion state data, so as to eliminate the correlation of various state information in each set of motion state data to obtain target data.
分类模块630被配置为根据所述目标数据确定用户行为类型。The classification module 630 is configured to determine the user behavior type according to the target data.
根据本公开的实施例,通过获取用户携带的移动设备的多组运动状态数据并对其进行处理,可以确定用户当前的行为类型。对多组运动状态数据的处理包括去相关处理。通过对多组运动状态数据进行去相关处理,消除了每组运动状态数据中的各项状态信息的相关性,大大减少了获取到的多组运动状态数据中的冗余信息。根据去相关处理所得到的目标数据来确定用户行为类型,提高了用户行为识别的效率和准确性。According to the embodiments of the present disclosure, by acquiring and processing multiple sets of motion state data of the mobile device carried by the user, the current behavior type of the user can be determined. The processing of multiple sets of motion state data includes decorrelation processing. By decorrelating multiple sets of motion state data, the correlation of each state information in each set of motion state data is eliminated, and the redundant information in the multiple sets of acquired motion state data is greatly reduced. The user behavior type is determined according to the target data obtained by the decorrelation processing, which improves the efficiency and accuracy of user behavior recognition.
以下详细描述装置600的各个模块。The various modules of the device 600 are described in detail below.
数据获取模610被配置为获取多组运动状态数据,每组运动状态数据包括多项状态信息,所述状态信息用于表示所述用户所携带的移动设备的运动状态。The data acquisition module 610 is configured to acquire multiple sets of motion state data, and each set of motion state data includes multiple pieces of state information, and the state information is used to indicate the motion state of the mobile device carried by the user.
根据一些实施例,多组运动状态数据由部署在移动设备中的传感器采集。相应地,数据获取模块610进一步被配置为按照预定频率获取预定时长内由部署在移动终端中的传感器采集到的多组状态数据。According to some embodiments, multiple sets of motion state data are collected by sensors deployed in the mobile device. Correspondingly, the data acquisition module 610 is further configured to acquire multiple sets of status data collected by the sensors deployed in the mobile terminal within a predetermined period of time according to a predetermined frequency.
根据一些实施例,运动状态数据包括:移动设备在多个方向上的加速度信息;以及移动设备在多个方向上的角速度信息。According to some embodiments, the motion state data includes: acceleration information of the mobile device in multiple directions; and angular velocity information of the mobile device in multiple directions.
去相关模块620被配置为对所述多组运动状态数据进行去相关处理,以消除每组运动状态数据中的各项状态信息的相关性,得到目标数据。The decorrelation module 620 is configured to decorrelate the multiple sets of motion state data, so as to eliminate the correlation of various state information in each set of motion state data to obtain target data.
根据一些实施例,去相关模块620进一步被配置为:对所述多组运动状态数据进行中心化处理,使处理后的每项状态信息的均值为0,得到中心化数据;确定所述中心化数据的变换矩阵,将所述中心化数据与所述变换矩阵相乘,以得到目标数据,其中,所述变换矩阵使得所述目标数据的协方差矩阵为单位矩阵,从而消除各项状态信息的相关性。According to some embodiments, the decorrelation module 620 is further configured to: perform centralized processing on the multiple sets of motion state data so that the average value of each item of state information after processing is 0 to obtain centralized data; determine the centralized data The transformation matrix of the data is multiplied by the centralization data and the transformation matrix to obtain the target data, wherein the transformation matrix makes the covariance matrix of the target data an identity matrix, thereby eliminating various status information Correlation.
根据一些实施例,去相关模块620进一步被配置为:计算所述中心化数据的协方差矩阵Σ;对所述协方差矩阵Σ进行奇异值分解,将协方差矩阵Σ转化成第一矩阵U、第 二矩阵S和第一矩阵U的转置矩阵U T的乘积,其中,第一矩阵U为协方差矩阵Σ的特征向量所组成的矩阵,第二矩阵S为协方差矩阵Σ的特征值所组成的对角矩阵;将矩阵U、S -1/2、U T的乘积作为变换矩阵,其中,S -1/2中各元素的值为第二矩阵S中相应位置的元素的平方根的倒数。 According to some embodiments, the decorrelation module 620 is further configured to: calculate the covariance matrix Σ of the centralized data; perform singular value decomposition on the covariance matrix Σ, and convert the covariance matrix Σ into a first matrix U, The product of the second matrix S and the transposed matrix U T of the first matrix U, where the first matrix U is a matrix composed of the eigenvectors of the covariance matrix Σ, and the second matrix S is the eigenvalues of the covariance matrix Σ. Diagonal matrix composed of the matrix; take the product of the matrices U, S -1/2 and U T as the transformation matrix, where the value of each element in S -1/2 is the reciprocal of the square root of the element at the corresponding position in the second matrix S .
分类模块630被配置为根据所述目标数据确定用户行为类型。用户行为类型例如包括静止、行走、跑步、骑行、乘公交车、乘地铁、乘小型汽车等。The classification module 630 is configured to determine the user behavior type according to the target data. The user behavior types include, for example, stationary, walking, running, cycling, taking a bus, taking a subway, taking a small car, and so on.
应当理解,图6中所示装置600的各个模块可以与参考图2描述的方法200中的各个步骤相对应。由此,上面针对方法200描述的操作、特征和优点同样适用于装置600及其包括的模块。为了简洁起见,某些操作、特征和优点在此不再赘述。It should be understood that each module of the apparatus 600 shown in FIG. 6 may correspond to each step in the method 200 described with reference to FIG. 2. Therefore, the operations, features, and advantages described above for the method 200 are also applicable to the device 600 and the modules included in it. For the sake of brevity, some operations, features and advantages will not be repeated here.
根据一些实施例,去相关模块620和分类模块630形成用户行为识别模型,该用户行为识别模型是以标注了用户行为类型的运动状态数据为训练样本训练的。According to some embodiments, the decorrelation module 620 and the classification module 630 form a user behavior recognition model, and the user behavior recognition model is trained using exercise state data marked with user behavior types as training samples.
图7示出了根据示例性实施例的用户行为识别模型700的结构框图。如图7所示,用户行为识别模型700包括去相关模块7100和分类模块7200。FIG. 7 shows a structural block diagram of a user behavior recognition model 700 according to an exemplary embodiment. As shown in FIG. 7, the user behavior recognition model 700 includes a decorrelation module 7100 and a classification module 7200.
去相关模块7100被配置为对多组运动状态数据进行去相关处理,以消除每组运动状态数据中的各项状态信息的相关性,得到目标数据。The decorrelation module 7100 is configured to decorrelate multiple sets of motion state data to eliminate the correlation of various state information in each set of motion state data to obtain target data.
去相关模块7100的与去相关处理相关的细节特征和优点可以参见前述步骤220和去相关模块620的相关描述,此处不再赘述。For details of the features and advantages related to the decorrelation processing of the decorrelation module 7100, please refer to the related description of the aforementioned step 220 and the decorrelation module 620, which will not be repeated here.
根据一些实施例,去相关模块7100还包括批标准化层(Batch Normalization),该批标准化层被配置为调整目标数据Z中的各项状态信息的均值和方差,以使目标数据Z处于最适于进行模型训练的状态,提高模型训练效率和后续分类效果。将调整后的数据记为Z’,则批标准化层所进行的处理如下:According to some embodiments, the decorrelation module 7100 further includes a batch normalization layer (Batch Normalization), which is configured to adjust the mean value and variance of various status information in the target data Z so that the target data Z is most suitable The state of model training improves the efficiency of model training and subsequent classification effects. Mark the adjusted data as Z’, and the processing performed by the batch standardization layer is as follows:
Z′=γZ+βZ′=γZ+β
其中,γ、β为可训练的参数,其值通过训练来确定。Among them, γ and β are trainable parameters, and their values are determined by training.
在去相关模块7100得到消除了状态信息相关性的目标数据后,将目标数据输入分类模块7200进行处理。After the decorrelation module 7100 obtains the target data from which the relevance of the state information is eliminated, the target data is input to the classification module 7200 for processing.
分类模块7200被配置为对目标数据进行处理,以确定用户行为类型并输出。The classification module 7200 is configured to process the target data to determine the user behavior type and output it.
根据一些实施例,如图7所示,分类模块7200包括多个卷积处理单元7220-1至7220-N。每个卷积处理单元包括两个深度可分离卷积层(depthwise separable convolution)7221和7222。其中,第一深度可分离卷积层的卷积步长(stride)为1,第二深度可分离卷积层的卷积步长大于1。例如,第二深度可分离卷积层的卷积步长可以是2或者其他数值。According to some embodiments, as shown in FIG. 7, the classification module 7200 includes a plurality of convolution processing units 7220-1 to 7220-N. Each convolution processing unit includes two depthwise separable convolution layers (depthwise separable convolution) 7221 and 7222. Wherein, the convolution stride of the separable convolutional layer at the first depth is 1, and the convolution stride of the separable convolutional layer at the second depth is greater than 1. For example, the convolution step length of the second depth separable convolution layer may be 2 or other values.
深度可分离卷积层相较于传统的卷积层来说,参数的数量大大减少,降低了模型的复杂度,从而提高了模型的运行速度。大于1的卷积步长设置替代了传统神经网络模型中的池化层,相较于设置池化层来说,大于1的卷积步长在几乎不影响模型准确性的前提下,避免了池化造成的大量信息丢失,降低了模型复杂度和过拟合的风险,提高了模型的运行速度。Compared with the traditional convolutional layer, the depth separable convolutional layer has greatly reduced the number of parameters, which reduces the complexity of the model, thereby increasing the running speed of the model. The convolution step size setting greater than 1 replaces the pooling layer in the traditional neural network model. Compared with setting the pooling layer, the convolution step size greater than 1 can hardly affect the accuracy of the model and avoid A large amount of information loss caused by pooling reduces the complexity of the model and the risk of overfitting, and improves the running speed of the model.
图8示出了根据示例性实施例的另一用户行为识别模型800的结构框图。如图8所示,用户行为识别型800包括去相关模块8100和分类模块8200。FIG. 8 shows a structural block diagram of another user behavior recognition model 800 according to an exemplary embodiment. As shown in FIG. 8, the user behavior recognition type 800 includes a decorrelation module 8100 and a classification module 8200.
去相关模块8100被配置为对输入的多组运动状态数据进行去相关处理,以消除每组运动状态数据中的各项状态信息的相关性,得到目标数据。The decorrelation module 8100 is configured to decorrelate the input multiple sets of motion state data to eliminate the correlation of various state information in each set of motion state data to obtain target data.
去相关模块8100的细节特征和优点可以参见前述步骤220、去相关模块620和去相关模块7100的相关描述,此处不再赘述。For the detailed features and advantages of the decorrelation module 8100, please refer to the related descriptions of the aforementioned step 220, the decorrelation module 620, and the decorrelation module 7100, which will not be repeated here.
例如,输入的多组运动状态数据组成128*6的原始数据矩阵(共有128组运动状态数据,每组运动状态数据包括6维状态信息),经过去相关模块8100的处理后,得到128*6的目标数据,目标数据中,各项状态信息之间的相关性被消除。For example, the input multiple sets of motion state data form a 128*6 original data matrix (a total of 128 sets of motion state data, each group of motion state data includes 6-dimensional state information), after processing by the decorrelation module 8100, 128*6 In the target data, the correlation between various status information is eliminated in the target data.
去相关模块8100输出的目标数据被输入分类模块8200。The target data output by the decorrelation module 8100 is input to the classification module 8200.
分类模块8200被配置为对目标数据进行一系列处理,最终输出用户行为类型。The classification module 8200 is configured to perform a series of processing on the target data, and finally output the user behavior type.
例如,如图8所示,分类模块8200包括三个卷积处理单元,每个卷积处理单元均包括一个第一深度可分离卷积层和一个第二深度可分离卷积层。其中,第一深度可分离卷积层的卷积步长(stride)为1,第二深度可分离卷积层的卷积步长为2。并且,所有深度可分离卷积层的卷积核尺寸(kernel size)均为5,即5*1,输出通道数(filters)均为16。并且,深度可分离卷积层均采用ReLu激活函数(激活层未在图8中示出),且卷积核只有权重(weight),没有偏置(bias)。For example, as shown in FIG. 8, the classification module 8200 includes three convolution processing units, and each convolution processing unit includes a first-depth separable convolutional layer and a second-depth separable convolutional layer. Among them, the convolution stride of the separable convolutional layer at the first depth is 1, and the convolution stride of the separable convolutional layer at the second depth is 2. In addition, the kernel size of all depth separable convolutional layers is 5, that is, 5*1, and the number of output channels (filters) is 16. In addition, the depth separable convolutional layers all use the ReLu activation function (the activation layer is not shown in FIG. 8), and the convolution kernel has only weights and no biases.
需要说明的是,以上所示的各项参数(包括深度可分离卷积层的卷积步长、卷积核尺寸、输出通道数、激活函数、是否有偏置)均仅为示例,本领域技术人员可以根据实际情况来调整用户行为识别模型的各个处理层的参数,本开对此不做限制。It should be noted that the various parameters shown above (including the convolution step size of the depth separable convolution layer, the size of the convolution kernel, the number of output channels, the activation function, and whether there is a bias) are only examples. The technical personnel can adjust the parameters of each processing layer of the user behavior recognition model according to the actual situation, and this publication does not limit this.
在图8所示的用户行为识别模型中,第一深度可分离卷积层1对128*6的目标数据进行卷积处理,输出128*16的特征图;In the user behavior recognition model shown in FIG. 8, the first-depth separable convolutional layer 1 performs convolution processing on 128*6 target data, and outputs a 128*16 feature map;
第二深度可分离卷积层1对第一深度可分离卷积层1输出的128*16的特征图进行卷积处理,输出64*16的特征图;The second-depth separable convolutional layer 1 performs convolution processing on the 128*16 feature map output by the first-depth separable convolutional layer 1, and outputs a 64*16 feature map;
第一深度可分离卷积层2对第二深度可分离卷积层1输出的64*16的特征图进行卷积处理,输出64*16的特征图;The first-depth separable convolutional layer 2 performs convolution processing on the 64*16 feature map output by the second-depth separable convolutional layer 1, and outputs a 64*16 feature map;
第二深度可分离卷积层2对第一深度可分离卷积层2输出的64*16的特征图进行卷积处理,输出32*16的特征图;The second-depth separable convolutional layer 2 performs convolution processing on the 64*16 feature map output by the first-depth separable convolutional layer 2, and outputs a 32*16 feature map;
第一深度可分离卷积层3对第二深度可分离卷积层2输出的32*16的特征图进行卷积处理,输出32*16的特征图;The first-depth separable convolutional layer 3 performs convolution processing on the 32*16 feature map output by the second-depth separable convolutional layer 2, and outputs a 32*16 feature map;
第二深度可分离卷积层3对第一深度可分离卷积层3输出的32*16的特征图进行卷积处理,输出16*16的特征图;The second-depth separable convolutional layer 3 performs convolution processing on the 32*16 feature map output by the first-depth separable convolutional layer 3, and outputs a 16*16 feature map;
扁平化层对第二深度可分离卷积层3输出的16*16的特征图进行扁平化处理,输出一个256维的特征向量;The flattening layer flattens the 16*16 feature map output by the second depth separable convolutional layer 3, and outputs a 256-dimensional feature vector;
全连接softmax层对扁平化层输出的256维的特征向量进行全连接,判断特征向量属于各用户行为类型的概率,将概率最大的用户行为类型作为分类结果进行输出。The fully connected softmax layer fully connects the 256-dimensional feature vector output by the flattening layer, determines the probability that the feature vector belongs to each user behavior type, and outputs the user behavior type with the highest probability as the classification result.
在图8所示的模型结构中,第二深度可分离卷积层的卷积步长为2,实现了特征数据的下采样,其替代了传统神经网络模型中的池化层。相较于设置池化层来说,将卷积步长设置为大于1的数值可以在几乎不影响模型准确性的前提下,避免了池化造成的大量信息丢失,降低了模型复杂度和过拟合的风险,提高了模型的运行速度。In the model structure shown in FIG. 8, the convolution step size of the second-depth separable convolution layer is 2, which realizes down-sampling of feature data, which replaces the pooling layer in the traditional neural network model. Compared with setting the pooling layer, setting the convolution step size to a value greater than 1 can avoid a large amount of information loss caused by pooling, and reduce model complexity and overtime without affecting the accuracy of the model. The risk of fitting improves the running speed of the model.
另外,深度可分离卷积层相较于传统的卷积层来说,需要训练的参数的数量大大减少,降低了模型的复杂度,提高了模型的运行速度。In addition, compared with the traditional convolutional layer, the depth separable convolutional layer greatly reduces the number of parameters that need to be trained, which reduces the complexity of the model and improves the running speed of the model.
以下以图8中的第一深度可分离卷积层1为例,来说明深度可分离卷积层相较于传统卷积层的技术效果。The following takes the first depth separable convolution layer 1 in FIG. 8 as an example to illustrate the technical effect of the depth separable convolution layer compared with the traditional convolution layer.
目标数据Z为128*6的数据矩阵,如下表2所示:The target data Z is a 128*6 data matrix, as shown in Table 2 below:
表2Table 2
z 1,1 z 1,1 z 1,2 z 1,2 z 1,3 z 1,3 z 1,4 z 1,4 z 1,5 z 1,5 z 1,6 z 1,6
z 2,1 z 2,1 z 2,2 z 2,2 z 2,3 z 2,3 z 2,4 z 2,4 z 2,5 z 2,5 z 2,6 z 2,6
z 3,1 z 3,1 z 3,2 z 3,2 z 3,3 z 3,3 z 3,4 z 3,4 z 3,5 z 3,5 z 3,6 z 3,6
z 4,1 z 4,1 z 4,2 z 4,2 z 4,3 z 4,3 z 4,4 z 4,4 z 4,5 z 4,5 z 4,6 z 4,6
z 5,1 z 5,1 z 5,2 z 5,2 z 5,3 z 5,3 z 5,4 z 5,4 z 5,5 z 5,5 z 5,6 z 5,6
z 6,1 z 6,1 z 6,2 z 6,2 z 6,3 z 6,3 z 6,4 z 6,4 z 6,5 z 6,5 z 6,6 z 6,6
z 128,1 z 128,1 z 128,2 z 128,2 z 128,3 z 128,3 z 128,4 z 128,4 z 128,5 z 128,5 z 128,6 z 128,6
如图8所示,第一深度可分离卷积层1的参数为:卷积步长stride为1,卷积核尺寸kernel size为5,即5*1,输出通道数filters为16。As shown in FIG. 8, the parameters of the first depth separable convolution layer 1 are: the convolution step stride is 1, the kernel size of the convolution kernel is 5, that is, 5*1, and the number of output channels filters is 16.
在第一深度可分离卷积层1对上述目标数据Z的处理过程为:The processing process of the above-mentioned target data Z in the separable convolutional layer 1 at the first depth is:
将目标数据Z中的每一列状态信息作为一个输入通道,则目标数据Z的输入通道数为6。Taking each column of status information in the target data Z as an input channel, the number of input channels of the target data Z is 6.
首先,设置与输入通道数相同数量的尺寸为5*1的卷积核,分别对每个输入通道进行卷积。即,设置6个5*1的卷积核,每个5*1的卷积核用于对目标数据Z中的一列数据进行卷积。每个5*1的卷积核对目标数据Z中的一列数据进行卷积处理后(设置了填充padding),将得到一个128*1的向量,即得到一列数据。6个卷积核完成卷积处理后,将得到6列128*1的数据,即得到尺寸为128*6的特征图F,如下表3所示。在该步骤中,6个5*1的卷积核待训练的参数为卷积核中各个位置的权重,共有6*5*1=30个(该示例中卷积核无偏置)。First, set the same number of convolution kernels with a size of 5*1 as the number of input channels, and perform convolution on each input channel separately. That is, six 5*1 convolution kernels are set, and each 5*1 convolution kernel is used to convolve a column of data in the target data Z. After each 5*1 convolution kernel performs convolution processing on a column of data in the target data Z (padding is set), a 128*1 vector will be obtained, that is, a column of data will be obtained. After the 6 convolution kernels complete the convolution processing, 6 columns of 128*1 data will be obtained, that is, a feature map F with a size of 128*6 is obtained, as shown in Table 3 below. In this step, the parameters to be trained for the 6 5*1 convolution kernels are the weights of each position in the convolution kernel, and there are 6*5*1=30 in total (the convolution kernel is not biased in this example).
表3table 3
f 1,1 f 1,1 f 1,2 f 1,2 f 1,3 f 1,3 f 1,4 f 1,4 f 1,5 f 1,5 f 1,6 f 1,6
f 2,1 f 2,1 f 2,2 f 2,2 f 2,3 f 2,3 f 2,4 f 2,4 f 2,5 f 2,5 f 2,6 f 2,6
f 3,1 f 3,1 f 3,2 f 3,2 f 3,3 f 3,3 f 3,4 f 3,4 f 3,5 f 3,5 f 3,6 f 3,6
f 4,1 f 4,1 f 4,2 f 4,2 f 4,3 f 4,3 f 4,4 f 4,4 f 4,5 f 4,5 f 4,6 f 4,6
f 5,1 f 5,1 f 5,2 f 5,2 f 5,3 f 5,3 f 5,4 f 5,4 f 5,5 f 5,5 f 5,6 f 5,6
f 6,1 f 6,1 f 6,2 f 6, 2 f 6,3 f 6,3 f 6,4 f 6,4 f 6,5 f 6,5 f 6,6 f 6,6
f 128,1 f 128,1 f 128,2 f 128,2 f 128,3 f 128,3 f 128,4 f 128,4 f 128,5 f 128,5 f 128,6 f 128,6
随后,设置与输出通道数相同的尺寸为1*输入通道数的卷积核,分别对上一步骤得到的特征图的每一行数据进行卷积。即,设置16个尺寸为1*6的卷积核,每个卷积核分别对特征图F进行卷积。以一个1*6的卷积核[w 1,w 2,w 3,w 4,w 5,w 6]为例,该卷积核依次对特征图F的每一行进行卷积处理,对第一行进行处理后,得到一个数值p 1,即f 11w 1+f 12w 2+f 13w 3+f 14w 4+f 15w 5+f 16w 6=p 1。类似地,对特征图F的128行数据进行卷积处理,将得到128个数值p 1至p 128,这128个数值组成一个128*1的列向量。 Subsequently, a convolution kernel with the same size as the number of output channels of 1*the number of input channels is set, and each row of data of the feature map obtained in the previous step is convolved. That is, 16 convolution kernels with a size of 1*6 are set, and each convolution kernel convolves the feature map F separately. Take a 1*6 convolution kernel [w 1 , w 2 , w 3 , w 4 , w 5 , w 6 ] as an example. The convolution kernel performs convolution processing on each row of the feature map F in turn, After one line is processed, a value p 1 is obtained, that is, f 11 w 1 +f 12 w 2 +f 13 w 3 +f 14 w 4 +f 15 w 5 +f 16 w 6 =p 1 . Similarly, the 128 rows of data of the feature map F are convolved to obtain 128 values p 1 to p 128 , and these 128 values form a 128*1 column vector.
每个1*6的卷积核对特征图F进行卷积处理,均可以得到一个128*1的列向量。相应地,16个1*6的卷积核对特征图F进行卷积处理,将得到16个128*1的列向量,即得到一个128*16的特征图。在该步骤中,16个1*6的卷积核中待训练的参数为卷积核中各个位置的权重,共有16*1*6=96个(该示例中卷积核无偏置)。Each 1*6 convolution kernel performs convolution processing on the feature map F, and a 128*1 column vector can be obtained. Correspondingly, 16 1*6 convolution kernels perform convolution processing on the feature map F, and 16 128*1 column vectors will be obtained, that is, a 128*16 feature map will be obtained. In this step, the parameters to be trained in the 16 1*6 convolution kernels are the weights of each position in the convolution kernel, and there are 16*1*6=96 in total (the convolution kernel is not biased in this example).
因此,在第一深度可分离卷积层1中,需要训练的参数共有30+96=126个。Therefore, in the first depth separable convolutional layer 1, there are a total of 30+96=126 parameters that need to be trained.
如果采用传统的卷积层对128*6的目标数据Z进行卷积处理,按照图8中设置的卷积核尺寸5*1和输出通道数16,处理过程如下:If a traditional convolutional layer is used to convolve the 128*6 target data Z, according to the convolution kernel size of 5*1 and the number of output channels set in Figure 8, the processing process is as follows:
设置16个5*1的卷积核,输入通道数为6,那么每个卷积核也需要有6个通道,即卷积核的深度为6,相当于设置了16个5*1*6的卷积核。每个5*1*6的卷积核对目标数据Z的6个输入通道进行卷积,得到1个128*1的特征向量,相应地,16个5*1*6的卷积核将得到16个128*1的特征向量,即得到一个128*16的特征图。在该过程中,需要训练的参数为卷积核中各个位置的权重(该示例中卷积核无偏置),共有16*5*1*6=480个。 Set 16 5*1 convolution kernels, the number of input channels is 6, then each convolution kernel also needs to have 6 channels, that is, the depth of the convolution kernel is 6, which is equivalent to setting 16 5*1*6 The convolution kernel. Each 5*1*6 convolution kernel convolves the 6 input channels of the target data Z to obtain a 128*1 feature vector. Correspondingly, 16 5*1*6 convolution kernels will get 16 A 128*1 feature vector, that is, a 128*16 feature map is obtained. In this process, the parameter to be trained is the weight of each position in the convolution kernel (the convolution kernel is not biased in this example), and there are 16*5*1*6=480 in total.
由上可见,采用深度可分离卷积层来对目标数据Z进行卷积处理,需要训练的参数为126个;而采用传统卷积层处理,需要训练的参数为480个。深度可分离卷积层相较于传统的卷积层来说,需要训练的参数的数量大大减少,降低了模型的复杂度,提高了模型的运行速度。It can be seen from the above that using a depth separable convolutional layer to convolve the target data Z requires 126 parameters to be trained; while using traditional convolutional layer processing, 480 parameters need to be trained. Compared with the traditional convolutional layer, the depth separable convolutional layer greatly reduces the number of parameters that need to be trained, reduces the complexity of the model, and improves the running speed of the model.
虽然上面参考特定模块讨论了特定功能,但是应当注意,本文讨论的各个模块的功能可以分为多个模块,和/或多个模块的至少一些功能可以组合成单个模块。本文讨论的特定模块执行动作包括该特定模块本身执行该动作,或者替换地该特定模块调用或以其他方式访问执行该动作(或结合该特定模块一起执行该动作)的另一个组件或模块。因此,执行动作的特定模块可以包括执行动作的该特定模块本身和/或该特定模块调用或以其他方式访问的、执行动作的另一模块。例如,上面描述的去相关模块620和分类模块630在一些实施例中可以组合成单个模块。Although specific functions have been discussed above with reference to specific modules, it should be noted that the functions of each module discussed herein may be divided into multiple modules, and/or at least some functions of multiple modules may be combined into a single module. The specific module execution action discussed herein includes the specific module itself performing the action, or alternatively the specific module calls or otherwise accesses another component or module that performs the action (or performs the action in conjunction with the specific module). Therefore, the specific module that performs an action may include the specific module itself that performs the action and/or another module that is called or accessed by the specific module to perform the action. For example, the decorrelation module 620 and the classification module 630 described above may be combined into a single module in some embodiments.
还应当理解,本文可以在软件硬件元件或程序模块的一般上下文中描述各种技术。上面关于图6描述的各个模块可以在硬件中或在结合软件和/或固件的硬件中实现。例如,这些模块可以被实现为计算机程序代码/指令,该计算机程序代码/指令被配置为在一个或多个处理器中执行并存储在计算机可读存储介质中。可替换地,这些模块可以被实现为硬件逻辑/电路。例如,在一些实施例中,数据获取模块610、去相关模块620和分类模块630中的一个或多个可以一起被实现在片上系统(System on Chip,SoC)中。SoC可以包括集成电路芯片(其包括处理器(例如,中央处理单元(Central Processing Unit,CPU)、微控制器、微处理器、数字信号处理器(Digital Signal Processor,DSP)等)、存储器、一个或多个通信接口、和/或其他电路中的一个或多个部件),并且可以可选地执行所接收的程序代码和/或包括嵌入式固件以执行功能。It should also be understood that various techniques may be described herein in the general context of software hardware elements or program modules. The various modules described above with respect to FIG. 6 may be implemented in hardware or in hardware combined with software and/or firmware. For example, these modules may be implemented as computer program codes/instructions configured to be executed in one or more processors and stored in a computer-readable storage medium. Alternatively, these modules can be implemented as hardware logic/circuitry. For example, in some embodiments, one or more of the data acquisition module 610, the decorrelation module 620, and the classification module 630 may be implemented together in a System on Chip (SoC). The SoC may include an integrated circuit chip (which includes a processor (for example, a central processing unit (CPU), a microcontroller, a microprocessor, a digital signal processor (Digital Signal Processor, DSP), etc.), a memory, a Or multiple communication interfaces, and/or one or more components in other circuits), and may optionally execute the received program code and/or include embedded firmware to perform functions.
根据本公开的一方面,提供了一种计算机设备,其包括存储器、处理器以及存储在存储器上的计算机程序。该处理器被配置为执行计算机程序以实现上文描述的任一方法实施例的步骤。According to an aspect of the present disclosure, there is provided a computer device including a memory, a processor, and a computer program stored on the memory. The processor is configured to execute a computer program to implement the steps of any method embodiment described above.
根据本公开的一方面,提供了一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上文描述的任一方法实施例的步骤。According to an aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium having a computer program stored thereon, and the computer program, when executed by a processor, implements the steps of any method embodiment described above.
根据本公开的一方面,提供了一种计算机程序产品,其包括计算机程序,该计算机程序被处理器执行时实现上文描述的任一方法实施例的步骤。According to an aspect of the present disclosure, there is provided a computer program product, which includes a computer program that, when executed by a processor, implements the steps of any method embodiment described above.
在下文中,结合图9描述这样的计算机设备、非暂态计算机可读存储介质和计算机程序产品的说明性示例。In the following, illustrative examples of such computer equipment, non-transitory computer-readable storage media, and computer program products are described in conjunction with FIG. 9.
图9示出了可以被用来实施本文所描述的方法的计算机设备900的示例配置。举例来说,图1中所示的移动设备110和/或服务器120可以包括类似于计算机设备900的架构。上述用户行为识别装置600也可以全部或至少部分地由计算机设备900或类似设备或系统实现。Figure 9 shows an example configuration of a computer device 900 that can be used to implement the methods described herein. For example, the mobile device 110 and/or the server 120 shown in FIG. 1 may include an architecture similar to the computer device 900. The user behavior recognition apparatus 600 described above may also be fully or at least partially implemented by the computer device 900 or similar devices or systems.
计算机设备900可以是各种不同类型的设备,例如服务提供商的服务器、与移动设备相关联的设备、片上系统、和/或任何其它合适的计算机设备或计算系统。计算机设备900的示例包括但不限于:台式计算机、服务器计算机、笔记本电脑或上网本计算机、移动设备(例如,平板电脑、蜂窝或其他无线电话(例如,智能电话)、记事本计算机、移动台)、可穿戴设备(例如,眼镜、手表)、娱乐设备(例如,娱乐器具、通信地耦合到显示设备的机顶盒、游戏机)、电视或其他显示设备、汽车计算机等等。因此,计算机设备900的范围可以从具有大量存储器和处理器资源的全资源设备(例如,个人计算机、游戏控制台)到具有有限的存储器和/或处理资源的低资源设备(例如,传统的机顶盒、手持游戏控制台)。The computer device 900 may be a variety of different types of devices, such as a server of a service provider, a device associated with a mobile device, a system on a chip, and/or any other suitable computer device or computing system. Examples of computer equipment 900 include, but are not limited to: desktop computers, server computers, laptops or netbook computers, mobile devices (for example, tablet computers, cellular or other wireless phones (for example, smart phones), notebook computers, mobile stations), Wearable devices (eg, glasses, watches), entertainment devices (eg, entertainment appliances, set-top boxes communicatively coupled to display devices, game consoles), televisions or other display devices, car computers, and so on. Therefore, the computer device 900 can range from full-resource devices with large amounts of memory and processor resources (e.g., personal computers, game consoles) to low-resource devices with limited memory and/or processing resources (e.g., traditional set-top boxes). , Handheld game console).
计算机设备900可以包括能够诸如通过系统总线914或其他适当的连接彼此通信的至少一个处理器902、存储器904、(多个)通信接口906、显示设备908、其他输入/输出(I/O)设备910以及一个或更多大容量存储设备912。当计算机设备900被实现为图1中的移动设备110时,该计算设备900还包括用于采集其运动状态数据的传感器924。传感器924包括但不限于加速度传感器、陀螺仪等。The computer device 900 may include at least one processor 902, a memory 904, a communication interface(s) 906, a display device 908, and other input/output (I/O) devices capable of communicating with each other, such as through the system bus 914 or other appropriate connections. 910 and one or more mass storage devices 912. When the computer device 900 is implemented as the mobile device 110 in FIG. 1, the computing device 900 further includes a sensor 924 for collecting data on its motion state. The sensor 924 includes, but is not limited to, an acceleration sensor, a gyroscope, and the like.
处理器902可以是单个处理单元或多个处理单元,所有处理单元可以包括单个或多个计算单元或者多个核心。处理器902可以被实施成一个或更多微处理器、微型计算机、微控制器、数字信号处理器、中央处理单元、状态机、逻辑电路和/或基于操作指令来操 纵信号的任何设备。除了其他能力之外,处理器902可以被配置成获取并且执行存储在存储器904、大容量存储设备912或者其他计算机可读介质中的计算机可读指令,诸如操作系统916的程序代码、应用程序918的程序代码、其他程序920的程序代码等。The processor 902 may be a single processing unit or multiple processing units, and all processing units may include a single or multiple computing units or multiple cores. The processor 902 may be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, central processing units, state machines, logic circuits, and/or any devices that manipulate signals based on operating instructions. In addition to other capabilities, the processor 902 may be configured to obtain and execute computer-readable instructions stored in the memory 904, the mass storage device 912, or other computer-readable media, such as the program code of the operating system 916, and the application program 918 The program code of 920, the program code of other programs 920, etc.
存储器904和大容量存储设备912是用于存储指令的计算机可读存储介质的示例,所述指令由处理器902执行来实施前面所描述的各种功能。举例来说,存储器904一般可以包括易失性存储器和非易失性存储器二者(例如RAM、ROM等等)。此外,大容量存储设备912一般可以包括硬盘驱动器、固态驱动器、可移除介质、包括外部和可移除驱动器、存储器卡、闪存、软盘、光盘(例如CD、DVD)、存储阵列、网络附属存储、存储区域网等等。存储器904和大容量存储设备912在本文中都可以被统称为存储器或计算机可读存储介质,并且可以是能够把计算机可读、处理器可执行程序指令存储为计算机程序代码的非暂态介质,所述计算机程序代码可以由处理器902作为被配置成实施在本文的示例中所描述的操作和功能的特定机器来执行。The memory 904 and the mass storage device 912 are examples of computer-readable storage media for storing instructions, which are executed by the processor 902 to implement the various functions described above. For example, the memory 904 may generally include both volatile memory and non-volatile memory (e.g., RAM, ROM, etc.). In addition, the mass storage device 912 may generally include hard disk drives, solid state drives, removable media, including external and removable drives, memory cards, flash memory, floppy disks, optical disks (such as CDs, DVDs), storage arrays, and network-attached storage. , Storage Area Network, etc. Both the memory 904 and the mass storage device 912 may be collectively referred to herein as a memory or a computer-readable storage medium, and may be non-transitory media capable of storing computer-readable and processor-executable program instructions as computer program codes. The computer program code may be executed by the processor 902 as a specific machine configured to implement the operations and functions described in the examples herein.
多个程序模块可以存储在大容量存储设备912上。这些程序包括操作系统916、一个或多个应用程序918、其他程序920和程序数据922,并且它们可以被加载到存储器904以供执行。这样的应用程序或程序模块的示例可以包括例如用于实现以下部件/功能的计算机程序逻辑(例如,计算机程序代码或指令):客户端应用112(包括数据接收模块610、去相关模块620和分类模块630)、方法200(包括方法200的任何合适的步骤)、和/或本文描述的另外的实施例。Multiple program modules may be stored on the mass storage device 912. These programs include an operating system 916, one or more application programs 918, other programs 920, and program data 922, and they can be loaded into the memory 904 for execution. Examples of such application programs or program modules may include, for example, computer program logic (e.g., computer program code or instructions) for implementing the following components/functions: client application 112 (including data receiving module 610, decorrelation module 620, and classification Module 630), method 200 (including any suitable steps of method 200), and/or additional embodiments described herein.
虽然在图9中被图示成存储在计算机设备900的存储器904中,但是模块916、918、920和922或者其部分可以使用可由计算机设备900访问的任何形式的计算机可读介质来实施。如本文所使用的,“计算机可读介质”至少包括两种类型的计算机可读介质,也就是计算机存储介质和通信介质。Although illustrated in FIG. 9 as being stored in the memory 904 of the computer device 900, the modules 916, 918, 920, and 922 or parts thereof may be implemented using any form of computer readable media that can be accessed by the computer device 900. As used herein, "computer-readable media" includes at least two types of computer-readable media, namely computer storage media and communication media.
计算机存储介质包括通过用于存储信息的任何方法或技术实施的易失性和非易失性、可移除和不可移除介质,所述信息诸如是计算机可读指令、数据结构、程序模块或者其他数据。计算机存储介质包括而不限于RAM、ROM、EEPROM、闪存或其他存储器技术,CD-ROM、数字通用盘(DVD)、或其他光学存储装置,磁盒、磁带、磁盘存储装置或其他磁性存储设备,或者可以被用来存储信息以供计算机设备访问的任何其他非传送介质。Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented by any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or Other data. Computer storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other storage technologies, CD-ROM, digital versatile disk (DVD), or other optical storage devices, magnetic cassettes, tapes, disk storage devices or other magnetic storage devices, Or any other non-transmission medium that can be used to store information for computer equipment to access.
与此相对,通信介质可以在诸如载波或其他传送机制之类的已调数据信号中具体实现计算机可读指令、数据结构、程序模块或其他数据。本文所定义的计算机存储介质不包括通信介质。In contrast, a communication medium can specifically implement computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism. Computer storage media as defined herein does not include communication media.
计算机设备900还可以包括一个或更多通信接口906,以用于诸如通过网络、直接连接等等与其他设备交换数据,正如前面所讨论的那样。这样的通信接口可以是以下各项中的一个或多个:任何类型的网络接口(例如,网络接口卡(NIC))、有线或无线(诸如IEEE 802.11无线LAN(WLAN))无线接口、全球微波接入互操作(Wi-MAX)接口、以太网接口、通用串行总线(USB)接口、蜂窝网络接口、Bluetooth TM接口、近场通信(NFC)接口等。通信接口906可以促进在多种网络和协议类型内的通信,其中包括有线网络(例如LAN、电缆等等)和无线网络(例如WLAN、蜂窝、卫星等等)、因特网等等。通信接口906还可以提供与诸如存储阵列、网络附属存储、存储区域网等等中的外部存储装置(未示出)的通信。 The computer device 900 may also include one or more communication interfaces 906 for exchanging data with other devices, such as through a network, direct connection, etc., as discussed above. Such a communication interface may be one or more of the following: any type of network interface (for example, network interface card (NIC)), wired or wireless (such as IEEE 802.11 wireless LAN (WLAN)) wireless interface, global microwave Access interoperability (Wi-MAX) interface, Ethernet interface, universal serial bus (USB) interface, cellular network interface, Bluetooth TM interface, near field communication (NFC) interface, etc. The communication interface 906 can facilitate communication within a variety of network and protocol types, including wired networks (such as LAN, cable, etc.) and wireless networks (such as WLAN, cellular, satellite, etc.), the Internet, and so on. The communication interface 906 may also provide communication with external storage devices (not shown) such as in storage arrays, network-attached storage, storage area networks, and the like.
在一些示例中,可以包括诸如监视器之类的显示设备908,以用于向用户显示信息和图像。其他I/O设备910可以是接收来自用户的各种输入并且向用户提供各种输出的设备,并且可以包括触摸输入设备、手势输入设备、摄影机、键盘、遥控器、鼠标、打印机、音频输入/输出设备等等。In some examples, a display device 908 such as a monitor may be included for displaying information and images to the user. The other I/O device 910 may be a device that receives various inputs from the user and provides various outputs to the user, and may include a touch input device, a gesture input device, a camera, a keyboard, a remote control, a mouse, a printer, and an audio input/ Output devices and so on.
虽然在附图和前面的描述中已经详细地说明和描述了本公开,但是这样的说明和描述应当被认为是说明性的和示意性的,而非限制性的;本公开不限于所公开的实施例。通过研究附图、公开内容和所附的权利要求书,本领域技术人员在实践所要求保护的主题时,能够理解和实现对于所公开的实施例的变型。在权利要求书中,词语“包括”不排除未列出的其他元件或步骤,并且词语“一”或“一个”不排除多个。在相互不同的从属权利要求中记载了某些措施的仅有事实并不表明这些措施的组合不能用来获益。Although the present disclosure has been illustrated and described in detail in the accompanying drawings and the foregoing description, such illustration and description should be regarded as illustrative and illustrative, and not restrictive; the present disclosure is not limited to what is disclosed Examples. By studying the drawings, the disclosure, and the appended claims, those skilled in the art can understand and implement modifications to the disclosed embodiments when practicing the claimed subject matter. In the claims, the word "comprising" does not exclude other elements or steps not listed, and the word "a" or "an" does not exclude a plurality. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to benefit.
虽然已经参照附图描述了本公开的实施例或示例,但应理解,上述的方法、系统和设备仅仅是示例性的实施例或示例,本发明的范围并不由这些实施例或示例限制,而是仅由授权后的权利要求书及其等同范围来限定。实施例或示例中的各种要素可以被省略或者可由其等同要素替代。此外,可以通过不同于本公开中描述的次序来执行各步骤。进一步地,可以以各种方式组合实施例或示例中的各种要素。重要的是随着技术的演进,在此描述的很多要素可以由本公开之后出现的等同要素进行替换。Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems, and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but It is only limited by the authorized claims and their equivalent scope. Various elements in the embodiments or examples may be omitted or may be replaced by equivalent elements. In addition, the steps may be performed in an order different from that described in the present disclosure. Further, various elements in the embodiments or examples can be combined in various ways. What is important is that as technology evolves, many elements described herein can be replaced by equivalent elements that appear after this disclosure.

Claims (19)

  1. 一种用户行为识别方法,包括:A method for identifying user behaviors, including:
    获取多组运动状态数据,每组运动状态数据包括多项状态信息,所述状态信息用于表示所述用户携带的移动设备的运动状态;Acquiring multiple sets of exercise state data, each set of exercise state data includes multiple pieces of state information, and the state information is used to indicate the exercise state of the mobile device carried by the user;
    对所述多组运动状态数据进行去相关处理,以消除每组运动状态数据中的各项状态信息的相关性,得到目标数据;以及Perform decorrelation processing on the multiple sets of exercise state data to eliminate the correlation of various state information in each group of exercise state data to obtain target data; and
    根据所述目标数据确定用户行为类型。The user behavior type is determined according to the target data.
  2. 根据权利要求1所述的方法,其中,所述获取多组运动状态数据包括:The method according to claim 1, wherein said acquiring multiple sets of motion state data comprises:
    按照预定频率获取预定时长内由部署在所述移动设备中的传感器采集到的多组运动状态数据。Acquire multiple sets of motion state data collected by sensors deployed in the mobile device within a predetermined period of time according to a predetermined frequency.
  3. 根据权利要求1所述的方法,其中,所述运动状态数据包括:The method according to claim 1, wherein the exercise status data includes:
    所述移动设备在多个方向上的加速度信息;以及Acceleration information of the mobile device in multiple directions; and
    所述移动设备在多个方向上的角速度信息。Angular velocity information of the mobile device in multiple directions.
  4. 根据权利要求1-3中任一项所述的方法,其中,所述对所述多组运动状态数据进行去相关处理包括:The method according to any one of claims 1 to 3, wherein the decorrelation processing on the multiple sets of motion state data comprises:
    对所述多组运动状态数据进行中心化处理,使处理后的每项状态信息的均值为0,得到中心化数据;以及Perform centralized processing on the multiple sets of exercise state data, so that the average value of each item of state information after processing is 0, to obtain centralized data; and
    确定所述中心化数据的变换矩阵,将所述中心化数据与所述变换矩阵相乘,以得到目标数据,Determine the transformation matrix of the centralized data, and multiply the centralized data by the transformation matrix to obtain target data,
    其中,所述变换矩阵使得所述目标数据的协方差矩阵为单位矩阵,从而消除各项状态信息的相关性。Wherein, the transformation matrix makes the covariance matrix of the target data an identity matrix, thereby eliminating the correlation of various status information.
  5. 根据权利要求4所述的方法,其中,所述确定所述中心化数据的变换矩阵包括:The method according to claim 4, wherein the determining the transformation matrix of the centralized data comprises:
    计算所述中心化数据的协方差矩阵Σ;Calculate the covariance matrix Σ of the centralized data;
    对所述协方差矩阵Σ进行奇异值分解,将协方差矩阵Σ转化成第一矩阵U、第二矩阵S和第一矩阵U的转置矩阵U T的乘积,其中,第一矩阵U为协方差矩阵Σ的特征向量所组成的矩阵,第二矩阵S为协方差矩阵Σ的特征值所组成的对角矩阵;以及 Perform singular value decomposition on the covariance matrix Σ, and transform the covariance matrix Σ into the product of the first matrix U, the second matrix S, and the transposed matrix U T of the first matrix U, where the first matrix U is the covariance matrix U A matrix composed of the eigenvectors of the variance matrix Σ, and the second matrix S is a diagonal matrix composed of the eigenvalues of the covariance matrix Σ; and
    将矩阵U、S -1/2、U T的乘积作为变换矩阵,其中,S -1/2中各元素的值为第二矩阵S中相应位置的元素的平方根的倒数。 The product of the matrices U, S -1/2 and U T is used as the transformation matrix, where the value of each element in S -1/2 is the reciprocal of the square root of the element at the corresponding position in the second matrix S.
  6. 根据权利要求1所述的方法,其中,所述用户行为类型包括:静止、行走、跑步、骑行、乘公交车、乘地铁、乘小型汽车。The method according to claim 1, wherein the user behavior types include: standing still, walking, running, cycling, taking a bus, taking a subway, and taking a small car.
  7. 根据权利要求1所述的方法,其中,The method of claim 1, wherein:
    所述对所述多组运动状态数据进行去相关处理包括:将所述多组运动状态数据输入预设的用户行为识别模型,以便所述用户行为识别模型对所述多组运动状态数据进行去相关处理,The decorrelation processing on the multiple sets of motion state data includes: inputting the multiple sets of motion state data into a preset user behavior recognition model, so that the user behavior recognition model performs de-correlation processing on the multiple sets of motion state data. Related processing,
    所述根据所述目标数据确定用户行为类型包括:由所述用户行为识别模型对所述目标数据进行处理,以确定用户行为类型。The determining the user behavior type according to the target data includes: processing the target data by the user behavior recognition model to determine the user behavior type.
  8. 根据权利要求7所述的方法,其中,所述用户行为识别模型以标注了用户行为类型的运动状态数据为训练样本训练得出。8. The method according to claim 7, wherein the user behavior recognition model is trained by using the exercise state data marked with the user behavior type as the training sample.
  9. 一种用户行为识别装置,包括:A user behavior recognition device, including:
    数据获取模块,被配置为获取多组运动状态数据,每组运动状态数据包括多项状态信息,所述状态信息用于表示所述用户所携带的移动设备的运动状态;A data acquisition module, configured to acquire multiple sets of exercise state data, each set of exercise state data includes multiple pieces of state information, and the state information is used to indicate the exercise state of the mobile device carried by the user;
    去相关模块,被配置为对所述多组运动状态数据进行去相关处理,以消除每组运动状态数据中的各项状态信息的相关性,得到目标数据;以及The decorrelation module is configured to decorrelate the multiple sets of motion state data to eliminate the correlation of various state information in each set of motion state data to obtain target data; and
    分类模块,被配置为根据所述目标数据确定用户行为类型。The classification module is configured to determine the user behavior type according to the target data.
  10. 根据权利要求9所述的装置,其中,The device according to claim 9, wherein:
    所述数据获取模块进一步被配置为按照预定频率获取预定时长内由部署在所述移动设备中的传感器采集到的多组状态数据。The data acquisition module is further configured to acquire multiple sets of status data collected by sensors deployed in the mobile device within a predetermined period of time according to a predetermined frequency.
  11. 根据权利要求9所述的装置,其中,所述运动状态数据包括:The device according to claim 9, wherein the exercise state data comprises:
    所述移动设备在多个方向上的加速度信息;以及Acceleration information of the mobile device in multiple directions; and
    所述移动设备在多个方向上的角速度信息。Angular velocity information of the mobile device in multiple directions.
  12. 根据权利要求9-11中任一项所述的装置,其中,所述去相关模块进一步被配置为:The apparatus according to any one of claims 9-11, wherein the decorrelation module is further configured to:
    对所述多组运动状态数据进行中心化处理,使处理后的每项状态信息的均值为0,得到中心化数据;以及Perform centralized processing on the multiple sets of exercise state data, so that the average value of each item of state information after processing is 0, to obtain centralized data; and
    确定所述中心化数据的变换矩阵,将所述中心化数据与所述变换矩阵相乘,以得到目标数据,Determine the transformation matrix of the centralized data, and multiply the centralized data by the transformation matrix to obtain target data,
    其中,所述变换矩阵使得所述目标数据的协方差矩阵为单位矩阵,从而消除各项状态信息的相关性。Wherein, the transformation matrix makes the covariance matrix of the target data an identity matrix, thereby eliminating the correlation of various status information.
  13. 根据权利要求12所述的装置,其中,所述去相关模块进一步被配置为:The apparatus according to claim 12, wherein the decorrelation module is further configured to:
    计算所述中心化数据的协方差矩阵Σ;Calculate the covariance matrix Σ of the centralized data;
    对所述协方差矩阵Σ进行奇异值分解,将协方差矩阵Σ转化成第一矩阵U、第二矩阵S和第一矩阵U的转置矩阵U T的乘积,其中,第一矩阵U为协方差矩阵Σ的特征向量所组成的矩阵,第二矩阵S为协方差矩阵Σ的特征值所组成的对角矩阵;以及 Perform singular value decomposition on the covariance matrix Σ, and transform the covariance matrix Σ into the product of the first matrix U, the second matrix S, and the transposed matrix U T of the first matrix U, where the first matrix U is the covariance matrix U A matrix composed of the eigenvectors of the variance matrix Σ, and the second matrix S is a diagonal matrix composed of the eigenvalues of the covariance matrix Σ; and
    将矩阵U、S -1/2、U T的乘积作为变换矩阵,其中,S -1/2中各元素的值为第二矩阵S中相应位置的元素的平方根的倒数。 The product of the matrices U, S -1/2 and U T is used as the transformation matrix, where the value of each element in S -1/2 is the reciprocal of the square root of the element at the corresponding position in the second matrix S.
  14. 根据权利要求9所述的装置,其中,所述去相关模块和所述分类模块形成用户行为识别模型,所述用户行为识别模型是以标注了用户行为类型的运动状态数据为训练样本训练的。9. The device according to claim 9, wherein the decorrelation module and the classification module form a user behavior recognition model, and the user behavior recognition model is trained using exercise state data marked with user behavior types as training samples.
  15. 根据权利要求14所述的装置,其中,所述去相关模块包括批标准化层,所述批标准化层被配置为调整所述目标数据中的各项状态数据的均值和方差。The apparatus according to claim 14, wherein the decorrelation module includes a batch normalization layer configured to adjust the mean value and variance of each status data in the target data.
  16. 根据权利要求14所述的装置,其中,所述分类模块包括多个卷积处理单元,每个卷积处理单元包括两个深度可分离卷积层,其中,The apparatus according to claim 14, wherein the classification module includes a plurality of convolution processing units, each convolution processing unit includes two depth separable convolution layers, wherein,
    第一深度可分离卷积层的卷积步长为1;The convolution step length of the first depth separable convolution layer is 1;
    第二深度可分离卷积层的输入为所述第一深度可分离卷积层的输出,且所述第二深度可分离卷积层的步长大于1。The input of the second-depth separable convolutional layer is the output of the first-depth separable convolutional layer, and the step size of the second-depth separable convolutional layer is greater than one.
  17. 一种计算机设备,包括:A computer equipment including:
    存储器、处理器以及存储在所述存储器上的计算机程序,A memory, a processor, and a computer program stored on the memory,
    其中,所述处理器被配置为执行所述计算机程序以实现权利要求1至8中任一项所述方法的步骤。Wherein, the processor is configured to execute the computer program to implement the steps of the method in any one of claims 1 to 8.
  18. 一种非暂态计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现权利要求1至8中任一项所述方法的步骤。A non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of any one of claims 1 to 8 when the computer program is executed by a processor.
  19. 一种计算机程序产品,包括计算机程序,其中,所述计算机程序被处理器执行时实现权利要求1至8中任一项所述方法的步骤。A computer program product comprising a computer program, wherein when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 8 are realized.
PCT/CN2021/077744 2020-02-28 2021-02-24 User behavior identification method and apparatus, computer device, and medium WO2021170014A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010127977.5A CN111427754A (en) 2020-02-28 2020-02-28 User behavior identification method and mobile terminal
CN202010127977.5 2020-02-28

Publications (1)

Publication Number Publication Date
WO2021170014A1 true WO2021170014A1 (en) 2021-09-02

Family

ID=71547248

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/077744 WO2021170014A1 (en) 2020-02-28 2021-02-24 User behavior identification method and apparatus, computer device, and medium

Country Status (2)

Country Link
CN (1) CN111427754A (en)
WO (1) WO2021170014A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111427754A (en) * 2020-02-28 2020-07-17 北京腾云天下科技有限公司 User behavior identification method and mobile terminal
CN115527373B (en) * 2022-01-05 2023-07-14 荣耀终端有限公司 Riding tool identification method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140365164A1 (en) * 2010-10-04 2014-12-11 Numera, Inc. Fall detection system using a combination of accelerometer, audio input and magnetometer
CN108196998A (en) * 2018-01-02 2018-06-22 联想(北京)有限公司 A kind of state identification method, mobile equipment and server
CN110367967A (en) * 2019-07-19 2019-10-25 南京邮电大学 A kind of pocket lightweight human brain condition detection method based on data fusion
CN111427754A (en) * 2020-02-28 2020-07-17 北京腾云天下科技有限公司 User behavior identification method and mobile terminal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108170274A (en) * 2017-12-29 2018-06-15 南京邮电大学 A kind of action identification method based on wearable device
CN108245880A (en) * 2018-01-05 2018-07-06 华东师范大学 Body-sensing detection method for visualizing and system based on more wearing annulus sensor fusions

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140365164A1 (en) * 2010-10-04 2014-12-11 Numera, Inc. Fall detection system using a combination of accelerometer, audio input and magnetometer
CN108196998A (en) * 2018-01-02 2018-06-22 联想(北京)有限公司 A kind of state identification method, mobile equipment and server
CN110367967A (en) * 2019-07-19 2019-10-25 南京邮电大学 A kind of pocket lightweight human brain condition detection method based on data fusion
CN111427754A (en) * 2020-02-28 2020-07-17 北京腾云天下科技有限公司 User behavior identification method and mobile terminal

Also Published As

Publication number Publication date
CN111427754A (en) 2020-07-17

Similar Documents

Publication Publication Date Title
US11763599B2 (en) Model training method and apparatus, face recognition method and apparatus, device, and storage medium
WO2020233333A1 (en) Image processing method and device
US10838967B2 (en) Emotional intelligence for a conversational chatbot
US20220188840A1 (en) Target account detection method and apparatus, electronic device, and storage medium
WO2022022274A1 (en) Model training method and apparatus
EP3131027A1 (en) Method for detecting activity information of user and electronic device thereof
WO2021170014A1 (en) User behavior identification method and apparatus, computer device, and medium
US9846808B2 (en) Image integration search based on human visual pathway model
US11727270B2 (en) Cross data set knowledge distillation for training machine learning models
EP3382596B1 (en) Human face model matrix training method and apparatus, and storage medium
CN113065635A (en) Model training method, image enhancement method and device
US10133955B2 (en) Systems and methods for object recognition based on human visual pathway
US11443116B2 (en) Electronic apparatus and control method thereof
WO2023231954A1 (en) Data denoising method and related device
WO2022147592A1 (en) Predicting brain data using machine learning models
WO2019208793A1 (en) Movement state recognition model learning device, movement state recognition device, method, and program
WO2021190433A1 (en) Method and device for updating object recognition model
WO2024002167A1 (en) Operation prediction method and related apparatus
US20220284990A1 (en) Method and system for predicting affinity between drug and target
US20220300740A1 (en) System and method for enhancing machine learning model for audio/video understanding using gated multi-level attention and temporal adversarial training
CN110059748A (en) Method and apparatus for output information
CN113627421A (en) Image processing method, model training method and related equipment
CN113284206A (en) Information acquisition method and device, computer readable storage medium and electronic equipment
EP4206989A1 (en) Data processing method, neural network training method, and related device
CN111476838A (en) Image analysis method and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21760107

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21760107

Country of ref document: EP

Kind code of ref document: A1