User action recognition method, device, electronic device and storage medium
By obtaining the motion data at the moment of sudden change of the user's action and calculating the similarity of the sequence of changes in the posture data, the problem of expensive user action recognition equipment and high hardware requirements in the existing technology is solved, and simplified user action recognition and device control are achieved.
Patent Information
- Application Number
- CN202110726719.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-29
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-06-29
AI Technical Summary
Existing user action recognition methods rely on high-precision millimeter-wave radar chips and cameras, resulting in expensive equipment, complex calculation processes, high hardware requirements, and difficulty in achieving large-scale implementation and popularization.
By obtaining the motion data at the moment when the user's action changes, the user's posture data change sequence is determined, and the similarity is calculated with the preset standard action posture data change sequence to realize user action recognition and reduce the demand for hardware.
It simplifies the user action recognition process, reduces the amount of data and calculation time, reduces the requirements for device performance, and realizes specific action recognition and device control in human-computer interaction.
Smart Images

Figure CN113407046B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of human-computer interaction technology, and in particular to a user action recognition method, device, electronic device and storage medium. Background Art
[0002] User action recognition is a means for computers to understand user body language. Currently, the user action recognition methods used mainly rely on cameras or millimeter wave radar chips.
[0003] If user action recognition relies on millimeter-wave radar chips and / or cameras, the accuracy requirements of millimeter-wave radar chips and / or cameras are high. In addition, the final action recognition result is obtained based on the collected raw data. The entire calculation process is complicated and the hardware requirements of the computing device are high. These factors make the equipment used to complete user action recognition expensive, which is not conducive to large-scale implementation and popularization. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a user action recognition method, device, electronic device and storage medium.
[0005] In a first aspect, the present disclosure provides a method for identifying a user action, comprising:
[0006] Obtain the motion data of the device held by the user when the user's action suddenly changes;
[0007] Determine a sequence of changes in user posture data based on motion data of a device held by the user at the moment when the user's action suddenly changes;
[0008] Determining a first similarity between the user posture data variation sequence and a preset standard action posture data variation sequence;
[0009] Based on the first similarity, a user action recognition result is determined.
[0010] In a second aspect, the present disclosure further provides a standard action recording method, comprising:
[0011] Obtain the motion data of the device held by the user when the user's motion suddenly changes while the user is completing a preset standard motion;
[0012] Determine a sequence of changes in user posture data based on motion data of a device held by the user at the moment when the user's action suddenly changes;
[0013] The user posture data variation sequence is recorded as the standard action posture data variation sequence.
[0014] In a third aspect, the present disclosure further provides a user action recognition device, comprising:
[0015] The first acquisition module is used to acquire motion data of the device held by the user when the user's action suddenly changes;
[0016] A first sequence determination module is used to determine a sequence of changes in user posture data based on motion data of a device held by a user at the moment when the user's action suddenly changes;
[0017] A similarity determination module, used to determine a first similarity between the user posture data variation sequence and a preset standard action posture data variation sequence;
[0018] A recognition result determination module is used to determine a user action recognition result based on the first similarity.
[0019] In a fourth aspect, the present disclosure further provides a standard action recording device, comprising:
[0020] The second acquisition module is used to acquire the motion data of the device held by the user when the user's action suddenly changes during the process of completing the preset standard action;
[0021] A second sequence determination module is used to determine a sequence of changes in user posture data based on motion data of a device held by the user at the moment when the user's action suddenly changes;
[0022] The recording module is used to record the user posture data variation sequence as the standard action posture data variation sequence.
[0023] In a fifth aspect, the present disclosure further provides an electronic device, the electronic device comprising:
[0024] one or more processors;
[0025] A storage device for storing one or more programs;
[0026] When the one or more programs are executed by the one or more processors, the one or more processors implement the user action recognition method and / or standard action recording method as described above.
[0027] In a sixth aspect, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the user action recognition method and / or standard action recording method as described above.
[0028] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0029] The technical solution provided by the embodiments of the present disclosure does not need to rely on millimeter wave chips and cameras for user action recognition during the entire process of user action recognition, and its entire recognition calculation process is simple, with low requirements on the hardware of the computing device, which can meet the needs of large-scale implementation and popularization.
[0030] The technical solution provided by the embodiment of the present disclosure obtains the motion data of the device held by the user at the moment of sudden change in the user's action by setting; based on the motion data of the device held by the user at the moment of sudden change in the user's action, the sequence of changes in the user's posture data is determined, which is essentially to capture the motion data of the device held by the user at the moment of sudden change in the user's action, and subsequently only uses the motion data of the device held by the user at the moment of sudden change in the user's action as the basis for user action recognition, which can fully reduce the amount of data that needs to be reported, reduce the sensor data reporting rate, and reduce the performance requirements for the device held by the user and the terminal. The data sequence formed by the technical solution provided by the embodiment of the present disclosure is shorter, which is conducive to shortening the time spent on the first similarity calculation and reducing the space required for data sequence storage.
[0031] The technical solution provided by the embodiments of the present disclosure can realize the purpose of recognizing specific actions completed by users in space (such as horizontal and vertical strokes, drawing wavy lines, drawing circles, writing numbers, and writing English letters, etc.). The user action recognition method can be applied to control devices by users completing specific actions during human-computer interaction, such as controlling device unlocking, controlling device to switch display interfaces, and controlling characters in games to complete certain tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0034] Figure 1 An application scenario diagram of a user action recognition method provided by an embodiment of the present disclosure;
[0035] Figure 2 A flowchart of a user action recognition method provided by an embodiment of the present disclosure;
[0036] Figure 3 A flowchart of another user action recognition method provided by an embodiment of the present disclosure;
[0037] Figure 4A flowchart of a standard action recording method provided by an embodiment of the present disclosure;
[0038] Figure 5 is a structural schematic diagram of a user action recognition device in an embodiment of the present disclosure;
[0039] Figure 6 is a structural schematic diagram of a standard action recording device in an embodiment of the present disclosure;
[0040] Figure 7 It is a structural schematic diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0041] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0042] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0043] Figure 1 FIG. 1 is an application scenario diagram of a user action recognition method provided by an embodiment of the present disclosure. The user action recognition method provided by the present application can be applied to Figure 1 In the application environment shown in the figure, the user action recognition method is applied to a user action recognition system. The user action recognition system includes a terminal 1 and a device 2 held by a user.
[0044] Optionally, the terminal 1 and the user's device 2 may be integrated into one, or may be separately provided. If the terminal 1 and the user's device 2 are separately provided, the terminal 1 and the user's device 2 communicate with each other via a network.
[0045] The device 2 held by the user is equipped with a sensor that can be used to collect the user's own motion data. The device 2 held by the user can be, but is not limited to, a smart phone, an air mouse, a game controller, a wearable device, and the like.
[0046] Terminal 1 is used to identify user actions during human-computer interaction. Specifically, Terminal 1 is used to execute the steps of obtaining motion data of a device held by a user at the moment when the user action suddenly changes; determining a sequence of changes in user posture data based on the motion data of the device held by the user at the moment when the user action suddenly changes; determining a first similarity between the sequence of changes in user posture data and a preset sequence of changes in standard posture data; and determining a result of user action recognition based on the first similarity. Terminal 1 can be, but is not limited to, a smart phone, a PDA, a tablet computer, a wearable device with a display screen, a desktop computer, a laptop computer, an all-in-one machine, and a smart home device.
[0047] Figure 2 A flowchart of a user action recognition method provided by an embodiment of the present disclosure is shown in FIG. Figure 2 , the method comprising:
[0048] S110, obtaining motion data of the device held by the user when the user's action suddenly changes.
[0049] A sudden change in user action refers to a significant change in the direction of the user's limb movement during the process of the user completing a certain action. For example, the user draws a wavy line in the air with his right hand, and the moment when the user's right hand reaches the crest or trough of the drawn wavy line can be regarded as the moment of the sudden change in user action.
[0050] When acquiring the motion data of the device held by the user, the motion data can be acquired with the help of an inertial sensor installed in the device held by the user. In this case, the motion data of the device held by the user refers to the raw data collected by the inertial sensor.
[0051] There are many methods for implementing this step. Exemplarily, the method for implementing this step may be: the user's device periodically collects and records the motion data of the user's device through an inertial sensor installed inside it; then the user's device selects the motion data of the user's device at the moment when the user's motion suddenly changes from all the collected motion data; finally, the selected motion data of the user's device at the moment when the user's motion suddenly changes is reported to the terminal, so that the terminal obtains the motion data of the user's device at the moment when the user's motion suddenly changes.
[0052] Furthermore, the device held by the user selects the motion data of the device held by the user at the moment of sudden change of the user's motion from all the collected motion data. Specifically, based on all the collected motion data, the moving direction of the user's limbs at each collection moment is determined; if the angle between the moving direction of the user's limbs at the qth collection moment and the moving direction of the user's limbs at the q-1th collection moment is greater than a preset angle, the moment of sudden change of the user's motion is determined to be the qth collection moment; and the motion data of the device held by the user at the qth collection moment is used as the motion data of the device held by the user at the moment of sudden change of the user's motion. Wherein, q is a positive integer greater than or equal to 2.
[0053] Alternatively, the implementation method of this step may also include: the device held by the user first determines whether the current moment is the moment when the user's action suddenly changes; if so, records the motion data of the device held by the user at the current moment, and reports the recorded motion data to the terminal, so that the terminal obtains the motion data of the device held by the user at the moment when the user's action suddenly changes.
[0054] The essence of this step is to capture the motion data of the user's device when the user's action suddenly changes, and then use the motion data of the user's device at the moment of the user's action suddenly change as the basis for user action recognition, instead of periodically and continuously collecting the motion data of the user's device and reporting all the collected motion data of all the user's devices to the terminal.
[0055] S120 . Determine a sequence of changes in user posture data based on motion data of a device held by the user when the user's action suddenly changes.
[0056] User posture data refers to data that can reflect the user's body movements. Optionally, the motion data of the device held by the user can be directly used as the user posture data; posture angle data, rotation matrix data or rotation vector data can also be used as user posture data. The posture angle data, rotation matrix data or rotation vector data can be regarded as the result of compressing the original data collected by the sensor (i.e., the motion data of the device held by the user). Using posture angle data, rotation matrix data or rotation vector data as user posture data can reduce the complexity of the subsequent calculation of the first similarity between the user posture data change sequence and the preset standard action posture data change sequence, thereby improving the calculation efficiency.
[0057] Compared with rotation matrix data or rotation vector data, posture angle data is selected as user posture data, which can more directly reflect the changes in user body movements.
[0058] Furthermore, if the posture angle data is used as user posture data, the implementation method of this step may include: determining the posture angle data of the device held by the user at the moment when the user's action suddenly changes based on the motion data of the device held by the user at the moment when the user's action suddenly changes; the posture angle includes at least one of the azimuth angle, pitch angle and roll angle; based on multiple posture angle data determined continuously, determining the user posture angle change sequence.
[0059] Among them, azimuth, pitch and roll are all angles defined based on the world coordinate system. Specifically, azimuth is the horizontal deflection between the current direction of the device held by the user and the magnetic north pole. Pitch is the vertical pitch angle between the plane of the device held by the user and the ground plane. Roll is the left and right roll angle between the plane of the device and the ground plane.
[0060] “Determining the attitude angle data of the device held by the user at the moment when the user's action suddenly changes based on the motion data of the device held by the user at the moment when the user's action suddenly changes” can specifically be, based on the Kalman filter, performing data fusion processing on the original data collected by the accelerometer, gyroscope and magnetometer built into the inertial sensor to obtain the attitude angle data of the device held by the user at the moment when the user's action suddenly changes.
[0061] "Determine the user posture angle change sequence based on multiple posture angle data determined continuously" can specifically be: among the multiple posture angle data determined continuously, subtract the posture angle data at any one time of user action mutation from the posture angle data at the previous time of user action mutation to obtain a series of posture angle data changes; arrange the series of posture angle data changes according to the time sequence of the user action mutation moments to obtain the user posture angle change sequence.
[0062] For example, if the user is completing a certain action, including multiple moments of sudden changes in the user action, namely moment T1, moment T2, moment T3, moment T4, ..., moment Tn. The azimuth angle at moment T1 is a1, the pitch angle is p1, and the roll angle is r1. The azimuth angle at moment T2 is a2, the pitch angle is p2, and the roll angle is r2. The azimuth angle at moment T3 is a3, the pitch angle is p3, and the roll angle is r3. The azimuth angle at moment T4 is a4, the pitch angle is p4, and the roll angle is r4. .... The azimuth angle at moment Tn is a n , the pitch angle is p n , the tilt angle is r n The azimuth angle variation sequence is: a2-a1, a3-a2, a4-a3, ..., a n -a n-1 The pitch angle variation sequence is: p2-p1, p3-p2, p4-p3, ..., p n -p n-1 The roll angle variation sequence is: r2-r1, r3-r2, r4-r3, ..., r n -r n-1 .
[0063] S130: Determine a first similarity between a user posture data variation sequence and a preset standard action posture data variation sequence.
[0064] The preset standard action posture data variation sequence refers to the standard action posture data variation sequence pre-stored in the terminal before executing the user action recognition method provided by the present disclosure.
[0065] The standard action posture data variation sequence is obtained through learning and recording. Optionally, the steps of the method for learning and recording the standard action posture data variation sequence are similar to the above-mentioned steps S110-S130. Specifically, the terminal can send an instruction to the user to complete a certain action, such as the instruction of "please complete the action of drawing a circle with your right hand". After receiving the instruction, the user uses his right hand to draw a circle. In the process of the user using his right hand to draw a circle, the motion data of the device held by the user at the moment when the user's action suddenly changes is obtained; based on the motion data of the device held by the user at the moment when the user's action suddenly changes, the user posture data variation sequence is determined; and the user posture data variation sequence is recorded as the standard action posture data variation sequence. In this way, the learning and recording of the standard action posture data variation sequence is completed.
[0066] The execution subject of the learning and recording standard action posture data variation sequence and the execution subject of the user action recognition method provided by the present disclosure may be the same or different. If the execution subject of the learning and recording standard action posture data variation sequence is different from the execution subject of the user action recognition method provided by the present disclosure, the execution subject of the learning and recording standard action posture data variation sequence may send the recorded standard action posture data variation sequence to the execution subject of the user action recognition method provided by the present disclosure.
[0067] There are multiple algorithms that can be used to determine the first similarity between a user posture data change sequence and a preset standard action posture data change sequence. For example, the first similarity between a user posture data change sequence and a preset standard action posture data change sequence can be determined by one or more of a Hausdorff Distance algorithm, a Dynamic Time Warping (DTW) algorithm, a Fréchet Distance algorithm, and a Longest Common Subsequence algorithm.
[0068] Compared with other algorithms, the first similarity between the user posture data variation sequence determined by the dynamic time normalization algorithm and the preset standard action posture data variation sequence is more accurate. This is because, in practice, different users need different times to complete the same action. The dynamic time normalization algorithm can automatically distort the time series (i.e., perform local scaling on the time axis) so that the morphology of the two sequences is as consistent as possible, and the maximum possible similarity is obtained.
[0069] Furthermore, if the posture angle change sequence includes an azimuth angle change sequence, a pitch angle change sequence and a roll angle change sequence; the implementation method of this step includes: determining a second similarity between the azimuth angle change sequence of the device held by the user and a preset standard action azimuth angle change sequence; determining a third similarity between the pitch angle change sequence of the device held by the user and a preset standard action pitch angle change sequence; determining a fourth similarity between the roll angle change sequence of the device held by the user and a preset standard action roll angle change sequence; based on the second similarity, the third similarity and the fourth similarity, determining a first similarity between the user posture data change sequence and the preset standard action posture data change sequence.
[0070] Furthermore, there are many specific implementation methods for "determining the first similarity between the user posture data variation sequence and the preset standard action posture data variation sequence based on the second similarity, the third similarity and the fourth similarity", and this application does not limit this. Optionally, the geometric mean of the second similarity, the third similarity and the fourth similarity is taken as the first similarity; or, the arithmetic mean of the second similarity, the third similarity and the fourth similarity is taken as the first similarity; or, first, the sum of the squares of the second similarity, the third similarity and the fourth similarity is obtained; then the square root of the sum of the squares is taken, and the square root result is taken as the first similarity.
[0071] S140: Determine a user action recognition result based on the first similarity.
[0072] There are many ways to implement this step, and this application does not limit this. Optionally, a similarity threshold can be pre-set; if the first similarity is greater than the similarity threshold, the user action is determined to be the standard action mentioned in S130; otherwise, the user action is determined not to be the standard action mentioned in S130. This achieves the purpose of identifying the user action.
[0073] Furthermore, a posture data variation sequence including a plurality of different preset standard actions in the database may be set. When executing the technical solution provided by the present application, the user posture data variation sequence obtained in S120 is compared with each standard action posture data variation sequence one by one to determine which standard action in the database the user action corresponds to, thereby achieving the purpose of ultimately identifying the user action.
[0074] The technical solution provided by the embodiments of the present disclosure does not need to rely on millimeter wave chips and cameras for user action recognition during the entire process of user action recognition, and its entire recognition calculation process is simple, with low requirements on the hardware of the computing device, which can meet the needs of large-scale implementation and popularization.
[0075] Those skilled in the art will understand that if the moment of sudden change of user action is not identified, the motion data of the device held by the user is continuously collected periodically, and all the collected motion data is used as the basis for user action identification. This method will result in a large amount of data to be reported, and a higher sensor data reporting rate (greater than 100Hz) is required. The performance requirements of the user's device and terminal are high. In addition, the data sequence formed by this method is too long, which will cause the first similarity calculation to take a long time, and the space required for data sequence storage is large, which increases the calculation and storage burden.
[0076] The technical solution provided by the embodiment of the present disclosure is to obtain the motion data of the device held by the user at the moment of sudden change in the user's action by setting; based on the motion data of the device held by the user at the moment of sudden change in the user's action, determine the sequence of changes in the user's posture data, which is essentially to capture the motion data of the device held by the user at the moment of sudden change in the user's action, and then only use the motion data of the device held by the user at the moment of sudden change in the user's action as the basis for user action recognition, which can fully reduce the amount of data that needs to be reported, reduce the sensor data reporting rate, and reduce the performance requirements for the device held by the user and the terminal. The data sequence formed by the technical solution provided by the embodiment of the present disclosure is shorter, which is conducive to shortening the time spent on the first similarity calculation and reducing the space required for data sequence storage.
[0077] The above technical solution can achieve the purpose of identifying specific actions performed by the user in space (such as horizontal and vertical strokes, drawing wavy lines, drawing circles, writing numbers, and writing English letters, etc.).
[0078] The user action recognition method can be applied to scenarios in which a device is controlled by a user completing specific actions during human-computer interaction.
[0079] For example, the user first writes "M" in space and uses the action of writing "M" as the unlocking action and enters it into the terminal system (this process is the learning and recording process of the standard action posture data change sequence). Later, when the user needs to unlock the terminal, the user writes "M" in space again. If the terminal recognizes that the user's action is consistent with the standard action, the terminal is unlocked.
[0080] For another example, in the setting link of the corresponding relationship between actions and instructions, the user writes "V" in space and uses the action of writing "V" as the action corresponding to the "confirmation instruction"; draws a semicircle in space and uses the action of drawing a semicircle as the action corresponding to the "return instruction"; draws a line segment upward in space and uses the action of drawing a line segment upward as the action corresponding to the "instruction to move the system focus upward"; draws a line segment downward in space and uses the action of drawing a line segment downward as the action corresponding to the "instruction to move the system focus downward"; draws a line segment to the left in space and uses the action of drawing a line segment to the left as the action corresponding to the "instruction to move the system focus to the left"; draws a line segment to the right in space and uses the action of drawing a line segment to the right as the action corresponding to the "instruction to move the system focus to the right". In this way, after completing the setting of the corresponding relationship between actions and instructions (i.e., the learning record of the sequence of changes in standard action posture data), 6 standard actions are stored in the database, namely, the action of writing "V", the action of drawing a semicircle, the action of drawing a line segment upward, the action of drawing a line segment downward, the action of drawing a line segment to the left, and the action of drawing a line segment to the right. Subsequently, assuming that the terminal interface displays a page of an e-book, and the user draws a line segment to the left in the space again, the terminal uses the user action recognition method provided by the present invention to recognize the user action. Through recognition, the user action is the action of drawing a line segment to the left, which corresponds to the "instruction to move the system focus to the left". Based on this, the content displayed by the terminal switches to display the next page of the e-book.
[0081] The user action recognition method can also be applied to human-computer interaction games. For example, a plurality of standard action posture data change sequences are included in the game package. During the game, the system continuously gives prompt information of a plurality of actions (the actions given by the system are standard actions included in the game package), and the user is asked to complete the corresponding actions according to the prompt information. The system recognizes the actions completed by the user and scores the actions according to whether the actions completed by the user are consistent with the required actions.
[0082] The user action recognition method can also be applied to the scene of character input. However, since the above technical solution needs to use the preset standard action posture data variation sequence for recognition during the action recognition process, the number of actions that can be recognized mainly depends on the number of standard actions in the database. Therefore, in this case, it is necessary to learn the posture data variation sequence of the action corresponding to writing all characters during the learning and recording process.
[0083] Those skilled in the art will understand that when the angular velocity of the device held by the user passes through zero, it often means that the direction of movement of the user's limbs has changed significantly. Among them, "angular velocity passing through zero" means that the angular velocity changes from a positive value to a negative value, or from a negative value to a positive value. Based on this, the moment when the angular velocity of the device held by the user passes through zero can be used as the moment when the user's action suddenly changes. The advantage of this setting is that the angular velocity can be directly collected by the gyroscope in the inertial sensor, which is the original measurement data of the gyroscope. It does not need to be processed, and it can directly determine whether a certain moment is the moment when the user's action suddenly changes, which can reduce the complexity of the user action recognition method.
[0084] Furthermore, the gyroscope in the inertial sensor is used to collect the angular velocity of the user's device rotating around each coordinate axis in the gyroscope's three-dimensional coordinate system; the moment when the angular velocity of the user's device rotating around any coordinate axis in the gyroscope's three-dimensional coordinate system passes through zero is the moment when the user's action suddenly changes. Compared with the solution of only using the moment when the angular velocity of the user's device rotating around the three coordinate axes in the gyroscope's three-dimensional coordinate system passes through zero at the same time as the moment when the user's action suddenly changes, this setting can ensure that important motion data is not missed, and can improve the accuracy of subsequent user action recognition.
[0085] Figure 3 A flowchart of another user action recognition method provided in an embodiment of the present disclosure. Figure 3 for Figure 2 A specific example is shown in Figure 1. The user has an inertial sensor installed in the device he is holding. Inertial sensors include accelerometers, gyroscopes, and magnetometers. See Figure 3 , the method comprising:
[0086] S210. When the user completes a certain action, the inertial sensor in the device held by the user continuously collects motion data.
[0087] S220. The device held by the user determines whether at least one of the three angular velocities collected by the gyroscope at the current moment has a zero point. If so, execute S230.
[0088] S230. The device held by the user reports the motion data collected when the angular velocity passes through zero to the terminal.
[0089] S240, the terminal receives motion data at the moment when the angular velocity crosses zero, and determines the attitude angle data of the device held by the user at the moment when the angular velocity crosses zero based on the received motion data at the moment when the angular velocity crosses zero; the attitude angle includes azimuth, pitch angle and roll angle.
[0090] S250: Determine a user posture angle change sequence based on a plurality of continuously determined posture angle data.
[0091] S260, determining a first similarity between a user posture data variation sequence and a preset standard action posture data variation sequence;
[0092] S270: Determine a user action recognition result based on the first similarity.
[0093] The above technical solution uses the moment when the angular velocity of the device held by the user passes through zero as the moment when the user's action suddenly changes. The method for determining the moment when the user's action suddenly changes is simple, which is conducive to shortening the time required for judging the moment when the user's action suddenly changes, and further shortening the overall execution time of the user action recognition method.
[0094] Figure 4 A flowchart of a standard action recording method provided in an embodiment of the present disclosure. This embodiment is applicable to the case where a terminal performs standard action recording before human-computer interaction. The method can be executed by a standard action recording device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a terminal, specifically including but not limited to a smart phone, a PDA, a tablet computer, a wearable device with a display screen, a desktop computer, a laptop computer, an all-in-one machine, a smart home device, etc.
[0095] like Figure 4 As shown, the method may specifically include:
[0096] S310, obtaining motion data of the device held by the user when the user's action suddenly changes while the user is completing a preset standard action.
[0097] In this step, the preset standard action refers to a pre-specified action. For example, the user is specified to complete the action of drawing a circle with the right hand. When executing this step, the terminal sends a command to the user "please complete the action of drawing a circle with the right hand", and the user draws a circle with the right hand after receiving the command. In the process of the user drawing a circle with the right hand, the motion data of the device held by the user at the moment when the user's action suddenly changes is obtained.
[0098] Optionally, the moment when the angular velocity of the device held by the user passes through zero is used as the moment when the user's action suddenly changes.
[0099] Optionally, motion data of a device held by the user at the moment when the user's action suddenly changes is obtained through an inertial sensor.
[0100] Optionally, the gyroscope in the inertial sensor is used to collect the angular velocity of the device held by the user rotating around each coordinate axis in the gyroscope's three-dimensional coordinate system; the moment when the angular velocity of the device held by the user rotating around any coordinate axis in the gyroscope's three-dimensional coordinate system passes through zero is the moment when the user's action suddenly changes.
[0101] The specific implementation method of this step is similar to that of S110 and will not be repeated here.
[0102] S320: Determine a sequence of changes in user posture data based on motion data of a device held by the user at the moment when the user's action suddenly changes.
[0103] Furthermore, based on the motion data of the device held by the user at the moment when the user's action suddenly changes, the posture angle data of the device held by the user at the moment when the user's action suddenly changes is determined; the posture angle includes at least one of the azimuth angle, the pitch angle and the roll angle; based on multiple posture angle data determined continuously, the user posture angle change sequence is determined.
[0104] The specific implementation method of this step is similar to that of S120 and will not be repeated here.
[0105] S330, recording the user posture data variation sequence as the standard action posture data variation sequence.
[0106] The essence of the above technical solution is to first specify the user to complete a preset standard action, and the terminal learns during the user's completion of the preset standard action to obtain a sequence of standard action posture data changes. In the subsequent human-computer interaction, the sequence of standard action posture data changes is used as a basis for judgment to perform user action recognition, which can fully reduce the amount of data that needs to be reported, reduce the sensor data reporting rate, and reduce the performance requirements for the user's equipment and terminal. The data sequence formed by the technical solution provided by the embodiment of the present disclosure is relatively short, which is conducive to shortening the time spent on the first similarity calculation when performing user action recognition and reducing the space required for data sequence storage.
[0107] The above technical solution can achieve the purpose of recognizing specific actions completed by users in space (such as horizontal and vertical strokes, drawing wavy lines, drawing circles, writing numbers, and writing English letters, etc.). The user action recognition method can be applied to the process of human-computer interaction to control the device by completing specific actions by the user, such as controlling the device to unlock, controlling the device to switch the display interface, and controlling the characters in the game to complete certain tasks.
[0108] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0109] Figure 5 Schematic diagram of the structure of a user action recognition device in an embodiment of the present disclosure. The user action recognition device provided by the embodiment of the present disclosure can be configured in a terminal. Figure 5 , the user action recognition device specifically includes:
[0110] The first acquisition module 410 is used to acquire motion data of the device held by the user when the user's action suddenly changes;
[0111] A first sequence determination module 420, configured to determine a sequence of changes in user posture data based on motion data of a device held by a user at the moment when the user's motion suddenly changes;
[0112] A similarity determination module 430, configured to determine a first similarity between the user posture data variation sequence and a preset standard action posture data variation sequence;
[0113] The recognition result determination module 440 is used to determine the user action recognition result based on the first similarity.
[0114] Furthermore, the moment when the angular velocity of the device held by the user passes through zero is taken as the moment when the user's action suddenly changes.
[0115] Furthermore, the first acquisition module 410 is used to acquire motion data of the device held by the user at the moment when the user's action suddenly changes through an inertial sensor.
[0116] Furthermore, the gyroscope in the inertial sensor is used to collect the angular velocity of the device held by the user rotating around each coordinate axis in the three-dimensional coordinate system of the gyroscope;
[0117] The moment when the angular velocity of the device held by the user rotating around any coordinate axis in the gyroscope three-dimensional coordinate system passes through zero is the moment when the user's action suddenly changes.
[0118] Furthermore, the first sequence determination module 420 is used to determine the attitude angle data of the device held by the user at the moment of the sudden change of the user action based on the motion data of the device held by the user at the moment of the sudden change of the user action; the attitude angle includes at least one of the azimuth angle, the pitch angle and the roll angle;
[0119] Based on the plurality of continuously determined posture angle data, a user posture angle change sequence is determined.
[0120] Furthermore, if the attitude angle variation sequence includes an azimuth angle variation sequence, a pitch angle variation sequence, and a roll angle variation sequence; the similarity determination module 430 is used to:
[0121] Determining a second similarity between the azimuth angle variation sequence of the device held by the user and the preset standard action azimuth angle variation sequence;
[0122] Determining a third similarity between the pitch angle variation sequence of the device held by the user and the preset standard action pitch angle variation sequence;
[0123] Determining a fourth similarity between the roll angle variation sequence of the device held by the user and the preset standard action roll angle variation sequence;
[0124] Based on the second similarity, the third similarity and the fourth similarity, a first similarity between the user gesture data variation sequence and the preset standard action gesture data variation sequence is determined.
[0125] Furthermore, the similarity determination module 430 is used to:
[0126] A first similarity between the user posture data variation sequence and a preset standard action posture data variation sequence is determined based on a dynamic time normalization algorithm.
[0127] The user action recognition device provided in the embodiment of the present disclosure can execute the steps of the user action recognition method provided in the method embodiment of the present disclosure, and has the execution steps and beneficial effects, which will not be repeated here.
[0128] Figure 6 Schematic diagram of the structure of a standard action recording device in the embodiment of the present disclosure. The standard action recording device provided by the embodiment of the present disclosure can be configured in a terminal. Figure 6 , the standard action recording device specifically includes:
[0129] The second acquisition module 510 is used to acquire the motion data of the device held by the user when the user's action suddenly changes during the process of completing the preset standard action;
[0130] A second sequence determination module 520 is used to determine a sequence of changes in user posture data based on motion data of a device held by the user at the moment when the user's action suddenly changes;
[0131] The recording module 530 is used to record the user posture data variation sequence as the standard action posture data variation sequence.
[0132] Furthermore, the moment when the angular velocity of the device held by the user passes through zero is taken as the moment when the user's action suddenly changes.
[0133] Furthermore, the second acquisition module 510 is used to acquire motion data of the device held by the user at the moment when the user's action suddenly changes through an inertial sensor.
[0134] Furthermore, the gyroscope in the inertial sensor is used to collect the angular velocity of the device held by the user rotating around each coordinate axis in the three-dimensional coordinate system of the gyroscope;
[0135] The moment when the angular velocity of the device held by the user rotating around any coordinate axis in the gyroscope three-dimensional coordinate system passes through zero is the moment when the user's action suddenly changes.
[0136] Further, the second sequence determination module 520 is used to:
[0137] Determine, based on the motion data of the device held by the user at the moment of the sudden change in the user action, the attitude angle data of the device held by the user at the moment of the sudden change in the user action; the attitude angle includes at least one of an azimuth angle, a pitch angle, and a roll angle;
[0138] Based on the plurality of continuously determined posture angle data, a user posture angle change sequence is determined.
[0139] The standard action recording device provided in the embodiment of the present disclosure can execute the steps of the standard action recording method provided in the method embodiment of the present disclosure, and has the execution steps and beneficial effects, which will not be repeated here.
[0140] Figure 7 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Figure 7 , which shows a schematic diagram of the structure of an electronic device 1000 suitable for implementing the embodiment of the present disclosure. The electronic device 1000 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0141] like Figure 7 As shown, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003 to implement a user action recognition method or a standard action recording method as in an embodiment of the present disclosure. In the RAM 1003, various programs and information required for the operation of the electronic device 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0142] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange information. Although Figure 7 The electronic device 1000 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0143] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby implementing the user action recognition method or standard action recording method as above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1009, or installed from the storage device 1008, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0144] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include an information signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated information signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0145] In some embodiments, the client and the server may communicate using any known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital information communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any known or future developed network.
[0146] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0147] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0148] Obtain the motion data of the device held by the user when the user's action suddenly changes;
[0149] Determine a sequence of changes in user posture data based on motion data of a device held by the user at the moment when the user's action suddenly changes;
[0150] Determining a first similarity between the user posture data variation sequence and a preset standard action posture data variation sequence;
[0151] Based on the first similarity, a user action recognition result is determined.
[0152] Alternatively, the computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device:
[0153] Obtaining the motion data of the device held by the user when the user's motion suddenly changes while the user is completing a preset standard motion;
[0154] Determine a sequence of changes in user posture data based on motion data of a device held by the user at the moment when the user's action suddenly changes;
[0155] The user posture data variation sequence is recorded as the standard action posture data variation sequence.
[0156] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps of the above embodiments.
[0157] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0158] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0159] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0160] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0161] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0162] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:
[0163] one or more processors;
[0164] A memory for storing one or more programs;
[0165] When one or more programs are executed by one or more processors, the one or more processors implement any user action recognition method or standard action recording method provided by the present disclosure.
[0166] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any user action recognition method or standard action recording method provided by the present disclosure.
[0167] The embodiments of the present disclosure also provide a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the above-mentioned user action recognition method or standard action recording method is implemented.
[0168] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0169] The above are only specific embodiments of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A user action recognition method, characterized in that: include: Acquire motion data of multiple devices held by continuous users; the motion data of the multiple devices held by users are collected at the moment when the user's motion suddenly changes; Determine, based on motion data of devices held by multiple users, attitude angle data of the devices held by the users at the moment of sudden change in the motion of each user; Among the multiple posture angle data determined continuously, the posture angle data at any one time when the user action suddenly changes is subtracted from the posture angle data at the previous time when the user action suddenly changes, to obtain a series of posture angle data changes; Arrange a series of attitude angle data changes according to the time sequence of the user's action mutation moments to obtain a user attitude angle change sequence; Determining a first similarity between the user posture angle variation sequence and a preset standard action posture angle variation sequence; Based on the first similarity, a user action recognition result is determined.
2. The method according to claim 1, characterized in that The moment when the angular velocity of the device held by the user passes through zero is regarded as the moment when the user's action suddenly changes.
3. The method according to claim 2, characterized in that The obtaining of motion data of devices held by multiple users includes: Acquire motion data of multiple devices held by users through inertial sensors.
4. The method according to claim 3, characterized in that: The gyroscope in the inertial sensor is used to collect the angular velocity of the device held by the user rotating around each coordinate axis in the three-dimensional coordinate system of the gyroscope; The moment when the angular velocity of the device held by the user rotating around any coordinate axis in the gyroscope three-dimensional coordinate system passes through zero is the moment when the user's action suddenly changes.
5. The method according to claim 4, characterized in that The attitude angle includes at least one of an azimuth angle, a pitch angle, and a roll angle.
6. The method according to claim 5, characterized in that If the attitude angle variation sequence includes an azimuth angle variation sequence, a pitch angle variation sequence and a roll angle variation sequence; The determining of a first similarity between the user posture angle variation sequence and a preset standard action posture angle variation sequence comprises: Determining a second similarity between the azimuth angle variation sequence of the device held by the user and the preset standard action azimuth angle variation sequence; Determining a third similarity between the pitch angle variation sequence of the device held by the user and the preset standard action pitch angle variation sequence; Determining a fourth similarity between the roll angle variation sequence of the device held by the user and the preset standard action roll angle variation sequence; Based on the second similarity, the third similarity and the fourth similarity, a first similarity between the user posture angle change sequence and the preset standard action posture angle change sequence is determined.
7. The method according to claim 1, characterized in that The determining of a first similarity between the user posture angle variation sequence and a preset standard action posture angle variation sequence comprises: A first similarity between the user posture angle variation sequence and a preset standard action posture angle variation sequence is determined based on a dynamic time normalization algorithm.
8. A standard action recording method, characterized in that: include: Acquire motion data of the device held by the user collected at multiple consecutive moments of sudden changes in the user's movements while the user is completing a preset standard movement; Determining a user posture angle change sequence based on motion data of the device held by the user; The user posture angle change sequence is recorded as the standard action posture angle change sequence.
9. A user action recognition device, characterized in that: include: A first acquisition module is used to acquire motion data of multiple devices held by users in succession; the motion data of the multiple devices held by users are collected at the moment of sudden change of user actions; The first sequence determination module is used to determine the posture angle data of the device held by the user at each of the user action mutation moments based on the motion data of the devices held by the multiple users; among the multiple posture angle data determined continuously, the posture angle data at any one user action mutation moment is subtracted from the posture angle data at the previous user action mutation moment to obtain a series of posture angle data changes; and the series of posture angle data changes are arranged according to the time sequence of the user action mutation moments to obtain a user posture angle change sequence; A similarity determination module, used to determine a first similarity between the user posture angle variation sequence and a preset standard action posture angle variation sequence; A recognition result determination module is used to determine a user action recognition result based on the first similarity.
10. A standard motion recording device, characterized in that: include: The second acquisition module is used to acquire motion data of the device held by the user collected at a plurality of consecutive moments of sudden changes in the user's motions while the user is completing a preset standard motion; A second sequence determination module, used to determine a sequence of user posture angle changes based on motion data of a device held by the user; The recording module is used to record the user posture angle change sequence as the standard action posture angle change sequence.
11. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
