CN116389639A - Action recognition method based on mobile terminal - Google Patents

Action recognition method based on mobile terminal Download PDF

Info

Publication number
CN116389639A
CN116389639A CN202310103596.7A CN202310103596A CN116389639A CN 116389639 A CN116389639 A CN 116389639A CN 202310103596 A CN202310103596 A CN 202310103596A CN 116389639 A CN116389639 A CN 116389639A
Authority
CN
China
Prior art keywords
mobile terminal
acceleration
axis
linear
state
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202310103596.7A
Other languages
Chinese (zh)
Inventor
邢建川
杨布雨
周春文
陈洋
曾凤
付鱼
张杨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
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 University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN202310103596.7A priority Critical patent/CN116389639A/en
Publication of CN116389639A publication Critical patent/CN116389639A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/12Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a motion recognition method based on a mobile terminal, and belongs to the technical field of motion recognition of mobile terminals. The invention comprises the following steps: acquiring acceleration of the mobile terminal, and identifying the overturning state of the mobile terminal based on the acceleration when the acceleration of the x axis and the acceleration of the y axis are both larger than or equal to a first threshold value; if the deviation of the acceleration of the x axis and the acceleration of the y axis from the first threshold value are within a specified range, the overturning state of the mobile terminal is identified based on the linear acceleration; if the accelerations of the x axis and the y axis are smaller than the first threshold value and the deviation is not in the specified range, the motion state of the mobile terminal is identified by combining the linear accelerations: uniform speed and acceleration; and identifying the call receiving state of the mobile terminal by combining the light sensor and the proximity sensor. By means of a sensor sampling technology, the method and the device calculate the approximate motion or position of the mobile terminal according to the interaction performed by different areas by analyzing the obtained data, so that the man-machine interaction of mobile phone action recognition is realized.

Description

Action recognition method based on mobile terminal
Technical Field
The invention belongs to the technical field of motion recognition of mobile terminals, and particularly relates to a motion recognition method based on a mobile terminal.
Background
In the present man-machine interaction, the degree to which the user feels satisfied with the feedback of the mobile terminal (mobile phone) response depends on the accuracy of the mobile phone recognition action. With the popularization of intelligent equipment, the construction of man-machine interaction is further advanced. The field will also be developed towards higher integration, wider detection functions and larger load capacity in the future.
The motion recognition technology is an important field of human behavior cognition and is also a relatively popular research subject in the field of computers. Therefore, with the continuous development of the internet of things technology, the mobile terminal-based motion recognition can help people to live more. The human motion change can be detected in a specific range, and the human motion rough change can be analyzed, so that feedback is given in time.
Disclosure of Invention
The invention provides a mobile terminal-based action recognition method which can be used for improving the accuracy of action recognition of a user when the user uses the mobile terminal.
The invention adopts the technical scheme that:
a mobile terminal-based action recognition method, the method comprising:
step S1, acquiring real-time data of an acceleration sensor of a mobile terminal, wherein the real-time data of the acceleration sensor comprises accelerations of x, y and z axes, the x and y axes are parallel to a screen of the mobile terminal, the x axis is parallel to the transverse direction of the screen of the mobile terminal, the y axis is parallel to the longitudinal direction of the screen of the mobile terminal, and the z axis is perpendicular to the screen of the mobile terminal;
step S2, if the acceleration of the x and y axes of the acceleration sensor is greater than or equal to a first threshold value (preferably 8.8), executing step S3; if the deviation of the x and y axes of the acceleration sensor and the first threshold value is within a specified range, executing step S4; if the acceleration of the x and y axes of the acceleration sensor is smaller than the first threshold value and the deviation from the first threshold value is not in the specified range, executing step S5 and step S8;
step S3, judging whether the acceleration of the y axis is larger than a second threshold value (preferably 8.9), if yes, outputting the action state of the mobile terminal: inverting; if not, continuing to judge whether the acceleration of the x axis is larger than the second threshold value, if so, further judging whether the acceleration value of the x axis is positive, and if so, outputting the action state of the mobile terminal: the terminal screen is changed from the portrait to the left landscape; if the number is negative, outputting the action state of the mobile terminal: the terminal screen is changed from the portrait to the right landscape; if the acceleration of the x-axis is smaller than the second threshold value, returning to the step S1, and re-acquiring real-time data of an acceleration sensor of the mobile terminal;
s4, acquiring real-time data of a linear acceleration sensor of the mobile terminal;
judging whether the linear acceleration of the x axis and the y axis is 0, if so, indicating that the action state of the mobile terminal is unchanged, returning to the step S1, and acquiring real-time data of an acceleration sensor of the mobile terminal again;
if the linear acceleration of the x and y axes is not 0, continuing to judge whether the linear acceleration of the y axis is greater than a third threshold (preferably 0.1), and if so, outputting the action state of the mobile terminal as follows: the mobile terminal is inverted; if not, continuing to judge whether the linear acceleration of the x axis is greater than a third threshold value, and if so, outputting the action state of the mobile terminal: the terminal screen is changed from the portrait to the left landscape; if the motion state of the mobile terminal is smaller than or equal to the third threshold value, outputting the motion state of the mobile terminal: the terminal screen is changed from the portrait to the right landscape;
step S5, acquiring real-time data of a linear acceleration sensor of the mobile terminal, judging whether the linear acceleration is 0, if the linear acceleration of the x axis and the linear acceleration of the y axis are not 0, executing step S6, and if the linear acceleration of the x axis and the linear acceleration of the y axis are 0, executing step S7; if the linear acceleration of the x-axis is 0, re-executing the step S5;
step S6, acquiring data of an acceleration sensor of the mobile terminal, judging whether the acceleration of the y axis is larger than 0, if so, indicating that the top of the mobile terminal is upward, continuously judging whether the linear speed of the y direction is larger than 0, and if so, outputting the action state of the mobile terminal: a longitudinally variable speed motion state; if the linear velocity in the y direction is less than or equal to 0, step S5 is re-executed; and detecting whether the linear speed on the z axis is greater than 0, if so, outputting the action state of the mobile terminal: the mobile terminal is in a front-back variable speed motion state, otherwise, the step S5 is re-executed;
if the acceleration of the y axis is greater than 0, the top of the mobile terminal is downward, whether the linear speed of the y axis is greater than 0 is continuously judged, and if the linear speed of the y axis is greater than 0, the action state of the mobile terminal is output: the mobile terminal is in a front-back variable speed motion state; if the linear velocity in the y direction is less than or equal to 0, step S5 is re-executed; and detecting whether the linear speed on the z axis is greater than 0, if so, outputting the action state of the mobile terminal: the mobile terminal is in a longitudinal speed change motion state, otherwise, the step S5 is re-executed;
step S7, continuously acquiring data of the magnetic field sensor of the mobile terminal, judging whether the values of the magnetic field sensors at intervals of a certain time are the same, if so, indicating that the mobile terminal is in a static state, and re-executing step S5; if the acceleration of the y axis is not the same, continuously judging whether the acceleration of the y axis is greater than 0, if so, indicating that the top of the mobile terminal is upward, continuously judging whether the linear speed of the y direction is greater than 0, and if so, outputting the action state of the mobile terminal: a longitudinal uniform motion state; if the linear velocity in the y direction is less than or equal to 0, step S5 is re-executed; and detecting whether the linear speed on the z axis is greater than 0, if so, outputting the action state of the mobile terminal: the mobile terminal is in a front-back uniform motion state, otherwise, the step S5 is re-executed;
if the acceleration of the y axis is greater than 0, the top of the mobile terminal is downward, whether the linear speed of the y axis is greater than 0 is continuously judged, and if the linear speed of the y axis is greater than 0, the action state of the mobile terminal is output: the mobile terminal is in a front-back uniform motion state; if the linear velocity in the y direction is less than or equal to 0, step S5 is re-executed; and detecting whether the linear speed on the z axis is greater than 0, if so, outputting the action state of the mobile terminal: and if not, executing step S5 again.
Step S8, acquiring data of the light sensor and the proximity sensor, judging whether the numerical values of the two sensors are 0, if not, indicating that the user does not answer the call, and re-executing the step S8;
if the values of the two sensors are 0, continuously acquiring the data of the acceleration sensor, judging whether the acceleration of the y axis is greater than 0, and if so, outputting the action state of the mobile terminal: answering a call; if not, the user does not answer the call, and the step S8 is executed again.
Further, step S8 may be further configured to: if the data of the light sensor and the data of the proximity sensor are smaller than the fourth threshold and the acceleration on the y axis is larger than the fifth threshold, outputting the action state of the mobile terminal: and answering the call.
The technical scheme provided by the invention has at least the following beneficial effects:
by means of a sensor sampling technology, the method and the device calculate the approximate motion or position of the mobile terminal through analysis of the obtained data and according to interaction performed in different areas, and output and prompt the motion recognition result of the mobile terminal in real time for the user, so that man-machine interaction of mobile phone motion recognition is realized.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a processing procedure of a motion recognition method based on a mobile terminal according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of acceleration coordinates in an embodiment of the invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
In the life of modern people, the mobile terminal (mobile phone) is a necessary electronic product for people, so that various mobile phone action recognition based on the sensor can fully exert and perfect man-machine interaction. After the sensor device is introduced, the mobile phone can be applied to safe driving of vehicles such as automobiles, recognition of mobile phone action behaviors, position positioning and the like. Various sensors play an irreplaceable role in the mobile phone, and the mobile phone can hardly realize the functions without the mobile phone sensor. Devices with different functions are installed in mobile phones, such as acceleration sensors, light sensors and the like, and the mobile phones are not only communication devices in life, but also tools for influencing and improving life of people, and have strong perception capability.
In order to realize the action recognition based on the mobile terminal, namely the action recognition of the user on the mobile terminal, the invention firstly needs to determine the sampling mode of the sensor, whether the sampling mode of the acceleration sensor or the inertial sensor is to be adopted or the gesture segmentation method based on the motion is to be adopted, and according to the different sampling modes, the required technology and knowledge are different, and correspondingly, the processing of the data is also different. For the acceleration sensor and the inertial sensor, the acquisition of the state is also solved, and the corresponding physical quantities such as speed, acceleration and movement time are calculated. Second, how the collected data is stored and processed. The data flow rate collected by the sensor is large, the variety is multiple, and the signal types are different, so how to timely process the data collected by the sensor is an important problem. If the acquired information is larger, the corresponding data is split, classified and the like, and then stored, and whether the storage is random storage or sequential storage is also required to be judged, and the method depends on how to efficiently acquire the information from the database later. Finally, how to display the processed data to the user. After the corresponding data is processed, the data is displayed to the user in time in some modes, so that the data is fully fed back. The display mode is selected according to user preference or whether the practicability meets the standards, and is mainly mobile phone physical display and software display, wherein the software display is to solve the realization and design of a display interface. The physical display mode is to solve the problem of obviously enabling the user to feel the change under the condition of not interfering with the user.
When the invention realizes the action recognition (whether a mobile phone is connected, stationary, uniform motion and screen turning) of a mobile terminal (mobile phone), the invention carries out cooperative judgment based on a plurality of sensors, preferentially judges the numerical value of an acceleration sensor, determines whether to interrupt judgment and judge the acceleration sensor again or judge whether the acceleration in the x-axis direction and the y-axis direction is near a threshold value 8.8 or further judge whether the acceleration in the x-axis direction and the y-axis direction exceeds the threshold value 8.9 so as to determine whether the mobile phone is in a turning state or a turning state, and if the data of a linear acceleration sensor is acquired near the threshold value, further judges whether the numerical value of the linear acceleration sensor is 0 so as to output a result, and then judges whether the mobile phone is in the turning state or the turning state.
Then, the data of the linear acceleration sensor, the light sensor and the proximity sensor are adopted to judge simultaneously, firstly, the judgment of the value of the linear acceleration sensor is carried out, whether the mobile phone is in a next step or in a variable speed motion state is judged by detecting whether the linear acceleration is 0, if the linear acceleration of the mobile phone is 0, the value of the magnetic field sensor is further called, the storage of the data of the magnetic field sensor is realized by defining an array, the delay writing is carried out on the array, further, whether the obtained values of the magnetic field sensor at certain intervals are the same is judged, if the two values are the same, the mobile phone is in a static state, the mobile phone returns to the first step, if the two values are different, the mobile phone is in a uniform speed motion state, then the data of the acceleration sensor is obtained, the motion direction of the mobile phone is judged, and according to whether the acceleration in the x and y directions is greater than 0, the front, the back, the left, right, up and down motion of the mobile phone can be judged, and the variable speed motion direction of the mobile phone is the same. And finally, displaying the analyzed mobile phone state through a front-end display module.
As shown in fig. 1, the motion recognition method based on the mobile terminal of the present invention specifically includes the following steps:
for a mobile terminal with an acceleration sensor, a linear acceleration sensor, a proximity sensor, a light sensor and a magnetic field sensor, the following steps are executed:
step S1, acquiring real-time data of an acceleration sensor of the mobile terminal, wherein the real-time data of the acceleration sensor comprises accelerations of x, y and z axes, the x and y axes are parallel to a screen of the mobile terminal, the x axis is parallel to a transverse direction of the screen of the mobile terminal, the y axis is parallel to a longitudinal direction of the screen of the mobile terminal, and the z axis is perpendicular to the screen of the mobile terminal, as shown in fig. 2. When the user lays the mobile terminal on the ground, the initial value of the data on the x axis of the sensor is 0, the initial value of the data on the y axis is 0, and the initial value of the data on the z axis is 9.81 because of the existence of the earth gravity. When the mobile terminal is placed on the ground downwards, the initial value of the data on the z axis is-9.81. When the mobile terminal is tilted to the left, the initial value of the data on the x-axis is a positive value. When the mobile terminal is tilted to the right, the initial value of the data on the x-axis is negative. When the mobile terminal is tilted up, the initial value of the data on the y-axis is negative. When the mobile phone is tilted downwards, the initial value of the data on the y axis is a positive value.
Step S2, if the acceleration of the x and y axes of the acceleration sensor is greater than or equal to 8.8, executing step S3; if the deviation between the x and y axes of the acceleration sensor and 8.8 is within a specified range, executing step S4; if the acceleration of the x and y axes of the acceleration sensor is less than 8.8 and the deviation from 8.8 is not within the specified range, executing step S5 and step S8;
step S3, judging whether the acceleration of the y axis is larger than 8.9, if yes, outputting the action state of the mobile terminal: inverting; if not, continuously judging whether the acceleration of the x axis is larger than 8.9, if so, further judging whether the acceleration value of the x axis is positive, and if so, outputting the action state of the mobile terminal: the terminal screen is changed from the portrait to the left landscape; if the number is negative, outputting the action state of the mobile terminal: the terminal screen is changed from the portrait to the right landscape; if the acceleration of the x axis is less than 8.9, returning to the step S1, and re-acquiring real-time data of an acceleration sensor of the mobile terminal;
s4, acquiring real-time data of a linear acceleration sensor of the mobile terminal;
judging whether the linear acceleration of the x axis and the y axis is 0, if so, indicating that the action state of the mobile terminal is unchanged, returning to the step S1, and acquiring real-time data of an acceleration sensor of the mobile terminal again;
if the linear acceleration of the x and y axes is not 0, continuously judging whether the linear acceleration of the y axis is greater than 0.1, if so, outputting the action state of the mobile terminal as follows: the mobile terminal is inverted; if not, continuously judging whether the linear acceleration of the x axis is greater than 0.1, and if so, outputting the action state of the mobile terminal: the terminal screen is changed from the portrait to the left landscape; if the motion state of the mobile terminal is smaller than or equal to 0.1, outputting the motion state of the mobile terminal: the terminal screen is changed from the portrait to the right landscape;
preferably, in the embodiment of the present invention, the detection of the flip and the inversion of the mobile terminal may be specifically set as follows: when it is detected that the acceleration in the x-axis (x-direction) is located at (8.8,10) and the linear acceleration in the x-axis is greater than 0.1, the motion state of the mobile terminal is identified as: a left horizontal screen state; and when it is detected that the acceleration in the x-axis is located (8.9,10), the action state of the mobile terminal is identified as: a left horizontal screen state; and when the acceleration on the x-axis is located at (-10, -8.8), and the linear acceleration on the x-axis is less than-0.1, the action state of the mobile terminal is identified as: a right horizontal screen state; and when the acceleration on the x-axis is detected to be located at (-10, -8.9), the action state of the mobile terminal is identified as: a left horizontal screen state; when the acceleration in the y-axis is less than-0.85, or the acceleration in the y-axis is less than-8.6 and the linear acceleration in the y-axis is greater than 0.1, the action state of the mobile terminal is identified as: an inverted state.
Step S5, acquiring real-time data of a linear acceleration sensor of the mobile terminal, judging whether the linear acceleration is 0 (both x and y axes are 0), if the linear acceleration of both x and y axes is not 0, executing step S6, and if both x and y axes are 0, executing step S7; if the linear acceleration of the x-axis is 0, re-executing the step S5;
step S6, acquiring data of an acceleration sensor of the mobile terminal, judging whether the acceleration of the y axis is larger than 0, if so, indicating that the top of the mobile terminal is upward, continuously judging whether the linear speed of the y direction is larger than 0, and if so, outputting the action state of the mobile terminal: a longitudinally variable speed motion state; if the linear velocity in the y direction is less than or equal to 0, step S5 is re-executed; and detecting whether the linear speed on the z axis is greater than 0, if so, outputting the action state of the mobile terminal: the mobile terminal is in a front-back variable speed motion state, otherwise, the step S5 is re-executed;
if the acceleration of the y axis is greater than 0, the top of the mobile terminal is downward, whether the linear speed of the y axis is greater than 0 is continuously judged, and if the linear speed of the y axis is greater than 0, the action state of the mobile terminal is output: the mobile terminal is in a front-back variable speed motion state; if the linear velocity in the y direction is less than or equal to 0, step S5 is re-executed; and detecting whether the linear speed on the z axis is greater than 0, if so, outputting the action state of the mobile terminal: the mobile terminal is in a longitudinal speed change motion state, otherwise, the step S5 is re-executed;
step S7, continuously acquiring data of the magnetic field sensor of the mobile terminal, judging whether the values of the magnetic field sensors at intervals of a certain time are the same, if so, indicating that the mobile terminal is in a static state, and re-executing step S5; if the acceleration of the y axis is not the same, continuously judging whether the acceleration of the y axis is greater than 0, if so, indicating that the top of the mobile terminal is upward, continuously judging whether the linear speed of the y direction is greater than 0, and if so, outputting the action state of the mobile terminal: a longitudinal uniform motion state; if the linear velocity in the y direction is less than or equal to 0, step S5 is re-executed; and detecting whether the linear speed on the z axis is greater than 0, if so, outputting the action state of the mobile terminal: the mobile terminal is in a front-back uniform motion state, otherwise, the step S5 is re-executed;
if the acceleration of the y axis is greater than 0, the top of the mobile terminal is downward, whether the linear speed of the y axis is greater than 0 is continuously judged, and if the linear speed of the y axis is greater than 0, the action state of the mobile terminal is output: the mobile terminal is in a front-back uniform motion state; if the linear velocity in the y direction is less than or equal to 0, step S5 is re-executed; and detecting whether the linear speed on the z axis is greater than 0, if so, outputting the action state of the mobile terminal: the mobile terminal is in a longitudinal uniform motion state, otherwise, the step S5 is re-executed;
in a preferred embodiment of the present invention, a specific detection process for identifying movement of a mobile phone may be specifically set as follows:
acquiring linear acceleration and magnetic field acceleration data, and if the acceleration in the y direction is greater than 7 and the linear acceleration in the y direction is greater than 0.5, outputting that the mobile terminal is in a falling state; if the acceleration in the y direction is greater than 7 and the linear acceleration in the y direction is less than-0.5, the output mobile terminal is in a rising state; if the acceleration in the y direction is greater than 7 and the linear acceleration in the y direction is greater than 9.8, the output mobile terminal is in a falling state; if the two magnetic field values obtained at intervals are the same, the linear acceleration in the x direction is 0, and the acceleration in the y direction is greater than 7, the output mobile terminal is in a transverse uniform speed state; if the two magnetic field values obtained at intervals are the same, the linear acceleration in the y direction is 0, and the acceleration in the y direction is greater than 7, the output mobile terminal is in a longitudinal uniform speed state; if the linear acceleration in the x direction is greater than 1 or less than-1, the output mobile terminal is in a transverse movement state; on the premise that the linear acceleration in the y direction is larger than 5, if the linear acceleration in the y direction is larger than 1 or smaller than-1, the output mobile terminal is in a longitudinal movement state; on the premise that the linear acceleration in the y direction is larger than 5, if the linear acceleration in the z direction is larger than 1 or smaller than-1, the output mobile terminal is in a front-back movement state; on the premise that the linear acceleration in the y direction is smaller than 3, if the linear acceleration in the z direction is larger than 1 or smaller than-1, the output mobile terminal is in a longitudinal movement state; on the premise that the linear acceleration in the y direction is smaller than 3, if the linear acceleration in the y direction is larger than 1 or smaller than-1, the output mobile terminal is in a front-back movement state.
Step S8, acquiring data of the light sensor and the proximity sensor, judging whether the numerical values of the two sensors are 0, if not, indicating that the user does not answer the call, and re-executing the step S8;
if the values of the two sensors are 0, continuously acquiring the data of the acceleration sensor, judging whether the acceleration of the y axis is greater than 0, and if so, outputting the action state of the mobile terminal: answering a call; if not, the user does not answer the call, and the step S8 is executed again.
Preferably, step S8 may further be configured to: if the data of the light sensor and the data of the proximity sensor are smaller than 3 and the acceleration on the y axis is larger than 7, outputting the action state of the mobile terminal: and answering the call.
When the embodiment of the invention is realized, the acquisition of each sensor of the mobile terminal needs the following interfaces to assist in completion:
the sensor manager interface creates an instance of the sensor service by invoking the interface type. This interface type enables access to the corresponding sensor and display of the sensor name on the virtual machine, with the registered and deregistered sensor event listener. This interface type also provides several sensor constants for displaying the accuracy of the corresponding sensor data, setting the frequency with which the sensor takes data and calibrating the corresponding sensor.
A Sensor interface by which an instance of a particular Sensor can be generated. The performance of the sensor may be defined.
The sensor event interface, the object that creates the sensor, which can give all data about the sensor event, can be implemented by invoking the interface type. The date and time stamp of the event, the type of information of the generated event, the correctness of the information and the information of the original sensor are all important information of the sensor.
The sensoeventlist interface, creating two callback methods that can modify the value of the sensor or the accuracy of the sensor and schedule when a sensor event should receive notification, is accomplished using this interface type.
Taking an acceleration sensor as an example:
the first step: a sensor management object is acquired.
And a second step of: acquiring an acceleration sensor object by using a sensor manager;
and a third step of: custom sensor listening functions are created and registered.
Fourth step: after the monitor function is created and registered, then a call to cancel the monitor is made.
After defining these, the corresponding sensor can be used, then the variables are defined in the main function for the data to be collected in the future, the later storage is convenient, then the judgment of if statement is carried out, the corresponding data are collected, and the corresponding data are displayed to be changed to the virtual machine or the real machine.
(1) The mobile phone reverse rotation is equivalent to the mobile phone left or right rotation angle being larger than 135 degrees, and the y-axis acceleration acquired by the acceleration sensor is < -8.8 >, so that the mobile phone is detected to be in a reverse rotation state. Or when the numerical fluctuation appears near the relevant threshold value, the linear acceleration sensor is used for carrying out cooperative judgment, when the previous condition is met and the y-axis linear acceleration is more than 0, the situation that the mobile phone slightly fluctuates in the state to be inverted at the moment is indicated, the situation that the mobile phone is in the inverted state is indicated, and the judgment of the overturning state of the mobile phone is completed at the moment.
(2) When the mobile phone moves transversely, acceleration along the x-axis direction is generated, and the acceleration sensor acquires x-axis acceleration which is more than 10 or less than-10, so that the mobile phone is detected to be in a left-right movement state. However, this detection is inaccurate, because only a large movement of the mobile phone is determined at this time, and the fine variation is to perform a cooperative determination according to the linear acceleration sensor, so that the influence of the gravity of the mobile phone is removed, and the mobile phone cannot collide with the determination of the lateral state of the mobile phone, that is, when the value acquired by the linear acceleration in the x-axis direction is greater than 0, the mobile phone moves in the lateral plane. Meanwhile, a uniform motion condition exists, a magnetic field sensor is introduced to carry out cooperative judgment, an array is firstly set, two different numerical values which are positioned on the same coordinate axis at the same time are acquired by using a time delay function, and whether the acceleration is 0 or not is judged, and whether the acquired two numerical values at different times are the same or not is judged, so that whether the mobile phone is in a transverse uniform motion state or not is comprehensively judged. The method comprises the steps of judging whether the mobile phone is in a head up state or in a state that a screen of the mobile phone is parallel to the ground, judging the three-axis linear acceleration, and determining the moving direction of the mobile phone.
(3) When the mobile phone moves downwards, because gravity exists in a natural state, a downward acceleration is generated, and the y-axis acceleration collected by the acceleration sensor is more than 10, so that the mobile phone is detected to be in a falling state. However, there is an error that cannot detect small-amplitude motion, at this time, a linear acceleration sensor is introduced to replace the small-amplitude motion so as to judge the mobile phone to fall, because the influence of gravity is removed, the data of the y axis cannot change greatly along with the turnover of the mobile phone, at this time, only the linear acceleration of the y axis is needed to be observed, once the linear acceleration is greater than 0, namely, the mobile phone generates vertical downward motion, at this time, whether the mobile phone is positive or not is judged, and therefore the mobile phone is detected to be in a falling state.
(4) The mobile phone overturning is equivalent to the mobile phone left or right rotation angle being larger than 75 degrees, and when the x-axis acceleration acquired by the acceleration sensor is larger than 8.8 or less than-8.8, the mobile phone is detected to be in a horizontal screen state. When the data read by the mobile phone sensor reaches the vicinity of the threshold, it must be determined whether the mobile phone can reach the threshold, and then the linear acceleration sensor can be used again, and only the values of the linear acceleration sensor and the acceleration sensor need to be measured simultaneously, and if the values measured by the acceleration sensor reach the threshold, then the linear acceleration sensor also detects that the values are a number greater than 0, i.e. the mobile phone has a small-amplitude action in the state of being about to turn over, so that the mobile phone can enter the transverse screen mode, and if the values of the acceleration sensor are slightly greater than the threshold, the mobile phone is in the transverse screen mode.
(5) When the mobile phone moves upwards, because of the existence of attractive force under the condition of the mobile phone, an upward acceleration is generated, at the moment, the y-axis acceleration acquired by the acceleration sensor is less than 9.81, the detection result can be confused with the mobile phone overturn, and at the moment, the state of the mobile phone is detected by using a rotation vector sensor or a geomagnetic field sensor. However, there is also an error that cannot detect small-amplitude motion, and at this time, a linear acceleration sensor is introduced to replace the small-amplitude motion, so as to judge the mobile phone falling, because the influence of gravity is removed, the y-axis data cannot change greatly along with the turning of the mobile phone, at this time, only the linear acceleration of the y-axis is required to be observed, and once the linear acceleration is smaller than 0, namely, the mobile phone generates vertical upward motion, at this time, whether the mobile phone is negative or not is judged, so that the mobile phone is detected to be in a rising state.
(6) When a user calls by using the mobile phone, the mobile phone is close to the face of the human body, the light and the distance between the mobile phone and the face are changed, the state is judged through the light sensor and the proximity sensor at the same time, if the change of the light sensor and the proximity sensor is met, the value of the acceleration sensor is detected, and if the acceleration in the y direction is larger than 0, the mobile phone is detected to be in a call answering state.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
What has been described above is merely some embodiments of the present invention. It will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit of the invention.

Claims (5)

1. The motion recognition method based on the mobile terminal is characterized by comprising the following steps:
step S1, acquiring real-time data of an acceleration sensor of a mobile terminal, wherein the real-time data of the acceleration sensor comprises accelerations of x, y and z axes, the x and y axes are parallel to a screen of the mobile terminal, the x axis is parallel to the transverse direction of the screen of the mobile terminal, the y axis is parallel to the longitudinal direction of the screen of the mobile terminal, and the z axis is perpendicular to the screen of the mobile terminal;
step S2, if the acceleration of the x and y axes of the acceleration sensor is greater than or equal to a first threshold value, executing step S3; if the deviation of the x and y axes of the acceleration sensor and the first threshold value is within a specified range, executing step S4; if the acceleration of the x and y axes of the acceleration sensor is smaller than the first threshold value and the deviation from the first threshold value is not in the specified range, executing step S5 and step S8;
step S3, judging whether the acceleration of the y axis is larger than a second threshold value, if so, outputting the action state of the mobile terminal: inverting; if not, continuing to judge whether the acceleration of the x axis is larger than the second threshold value, if so, further judging whether the acceleration value of the x axis is positive, and if so, outputting the action state of the mobile terminal: the terminal screen is changed from the portrait to the left landscape; if the number is negative, outputting the action state of the mobile terminal: the terminal screen is changed from the portrait to the right landscape; if the acceleration of the x-axis is smaller than the second threshold value, returning to the step S1, and re-acquiring real-time data of an acceleration sensor of the mobile terminal;
s4, acquiring real-time data of a linear acceleration sensor of the mobile terminal;
judging whether the linear acceleration of the x axis and the y axis is 0, if so, indicating that the action state of the mobile terminal is unchanged, returning to the step S1, and acquiring real-time data of an acceleration sensor of the mobile terminal again;
if the linear acceleration of the x and y axes is not 0, continuing to judge whether the linear acceleration of the y axis is greater than a third threshold value, and if so, outputting the action state of the mobile terminal as follows: the mobile terminal is inverted; if not, continuing to judge whether the linear acceleration of the x axis is greater than a third threshold value, and if so, outputting the action state of the mobile terminal: the terminal screen is changed from the portrait to the left landscape; if the motion state of the mobile terminal is smaller than or equal to the third threshold value, outputting the motion state of the mobile terminal: the terminal screen is changed from the portrait to the right landscape;
step S5, acquiring real-time data of a linear acceleration sensor of the mobile terminal, judging whether the linear acceleration is 0, if the linear acceleration of the x axis and the linear acceleration of the y axis are not 0, executing step S6, and if the linear acceleration of the x axis and the linear acceleration of the y axis are 0, executing step S7; if the linear acceleration of the x-axis is 0, re-executing the step S5;
step S6, acquiring data of an acceleration sensor of the mobile terminal, judging whether the acceleration of the y axis is larger than 0, if so, indicating that the top of the mobile terminal is upward, continuously judging whether the linear speed of the y direction is larger than 0, and if so, outputting the action state of the mobile terminal: a longitudinally variable speed motion state; if the linear velocity in the y direction is less than or equal to 0, step S5 is re-executed; and detecting whether the linear speed on the z axis is greater than 0, if so, outputting the action state of the mobile terminal: the mobile terminal is in a front-back variable speed motion state, otherwise, the step S5 is re-executed;
if the acceleration of the y axis is smaller than 0, the top of the mobile terminal is downward, whether the linear speed of the y axis is larger than 0 is continuously judged, and if the linear speed of the y axis is larger than 0, the action state of the mobile terminal is output: the mobile terminal is in a front-back variable speed motion state; if the linear velocity in the y direction is less than or equal to 0, step S5 is re-executed; and detecting whether the linear speed on the z axis is greater than 0, if so, outputting the action state of the mobile terminal: the mobile terminal is in a longitudinal speed change motion state, otherwise, the step S5 is re-executed;
step S7, continuously acquiring data of the magnetic field sensor of the mobile terminal, judging whether the values of the magnetic field sensors at intervals of a certain time are the same, if so, indicating that the mobile terminal is in a static state, and re-executing step S5; if the acceleration of the y axis is not the same, continuously judging whether the acceleration of the y axis is greater than 0, if so, indicating that the top of the mobile terminal is upward, continuously judging whether the linear speed of the y direction is greater than 0, and if so, outputting the action state of the mobile terminal: a longitudinal uniform motion state; if the linear velocity in the y direction is less than or equal to 0, step S5 is re-executed; and detecting whether the linear speed on the z axis is greater than 0, if so, outputting the action state of the mobile terminal: the mobile terminal is in a front-back uniform motion state, otherwise, the step S5 is re-executed;
if the acceleration of the y axis is smaller than 0, the top of the mobile terminal is downward, whether the linear speed of the y axis is larger than 0 is continuously judged, and if the linear speed of the y axis is larger than 0, the action state of the mobile terminal is output: the mobile terminal is in a front-back uniform motion state; if the linear velocity in the y direction is less than or equal to 0, step S5 is re-executed; and detecting whether the linear speed on the z axis is greater than 0, if so, outputting the action state of the mobile terminal: the mobile terminal is in a longitudinal uniform motion state, otherwise, the step S5 is re-executed;
step S8, acquiring data of the light sensor and the proximity sensor, judging whether the numerical values of the two sensors are 0, if not, indicating that the user does not answer the call, and re-executing the step S8;
if the values of the two sensors are 0, continuously acquiring the data of the acceleration sensor, judging whether the acceleration of the y axis is greater than 0, and if so, outputting the action state of the mobile terminal: answering a call; if not, the user does not answer the call, and the step S8 is executed again.
2. The method of claim 1, wherein step S8 is: if the data of the light sensor and the data of the proximity sensor are smaller than the fourth threshold and the acceleration on the y axis is larger than the fifth threshold, outputting the action state of the mobile terminal: and answering the call.
3. The method of claim 2, wherein the fourth and fifth thresholds are set to 3 and 7, respectively.
4. The method of claim 1, wherein the first, second, and third thresholds are set to: 8.8,8.9,0.1.
5. The method of any one of claims 1 to 4, further comprising the steps of:
acquiring linear acceleration and magnetic field acceleration data, and if the acceleration in the y direction is greater than 7 and the linear acceleration in the y direction is greater than 0.5, outputting that the mobile terminal is in a falling state; if the acceleration in the y direction is greater than 7 and the linear acceleration in the y direction is less than-0.5, the output mobile terminal is in a rising state; if the acceleration in the y direction is greater than 7 and the linear acceleration in the y direction is greater than 9.8, the output mobile terminal is in a falling state; if the two magnetic field values obtained at intervals are the same, the linear acceleration in the x direction is 0, and the acceleration in the y direction is greater than 7, the output mobile terminal is in a transverse uniform speed state; if the two magnetic field values obtained at intervals are the same, the linear acceleration in the y direction is 0, and the acceleration in the y direction is greater than 7, the output mobile terminal is in a longitudinal uniform speed state; if the linear acceleration in the x direction is greater than 1 or less than-1, the output mobile terminal is in a transverse movement state; on the premise that the linear acceleration in the y direction is larger than 5, if the linear acceleration in the y direction is larger than 1 or smaller than-1, the output mobile terminal is in a longitudinal movement state; on the premise that the linear acceleration in the y direction is larger than 5, if the linear acceleration in the z direction is larger than 1 or smaller than-1, the output mobile terminal is in a front-back movement state; on the premise that the linear acceleration in the y direction is smaller than 3, if the linear acceleration in the z direction is larger than 1 or smaller than-1, the output mobile terminal is in a longitudinal movement state; on the premise that the linear acceleration in the y direction is smaller than 3, if the linear acceleration in the y direction is larger than 1 or smaller than-1, the output mobile terminal is in a front-back movement state.
CN202310103596.7A 2023-02-03 2023-02-03 Action recognition method based on mobile terminal Pending CN116389639A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310103596.7A CN116389639A (en) 2023-02-03 2023-02-03 Action recognition method based on mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310103596.7A CN116389639A (en) 2023-02-03 2023-02-03 Action recognition method based on mobile terminal

Publications (1)

Publication Number Publication Date
CN116389639A true CN116389639A (en) 2023-07-04

Family

ID=86973919

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310103596.7A Pending CN116389639A (en) 2023-02-03 2023-02-03 Action recognition method based on mobile terminal

Country Status (1)

Country Link
CN (1) CN116389639A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103984416A (en) * 2014-06-10 2014-08-13 北京邮电大学 Gesture recognition method based on acceleration sensor
KR101514223B1 (en) * 2013-10-23 2015-04-22 에스케이텔레콤 주식회사 Method for recognizing motion using sensor and apparatus
CN108234760A (en) * 2017-12-28 2018-06-29 努比亚技术有限公司 Athletic posture recognition methods, mobile terminal and computer readable storage medium
CN108366170A (en) * 2018-02-05 2018-08-03 广东欧珀移动通信有限公司 Display control method and device, terminal, computer readable storage medium
CN111418197A (en) * 2018-02-13 2020-07-14 Lg电子株式会社 Mobile terminal and control method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101514223B1 (en) * 2013-10-23 2015-04-22 에스케이텔레콤 주식회사 Method for recognizing motion using sensor and apparatus
CN103984416A (en) * 2014-06-10 2014-08-13 北京邮电大学 Gesture recognition method based on acceleration sensor
CN108234760A (en) * 2017-12-28 2018-06-29 努比亚技术有限公司 Athletic posture recognition methods, mobile terminal and computer readable storage medium
CN108366170A (en) * 2018-02-05 2018-08-03 广东欧珀移动通信有限公司 Display control method and device, terminal, computer readable storage medium
CN111418197A (en) * 2018-02-13 2020-07-14 Lg电子株式会社 Mobile terminal and control method thereof

Similar Documents

Publication Publication Date Title
CN105474131A (en) Method and apparatus for recognizing grip state in electronic device
CN104503888B (en) The method and device of alarm prompt
CN104049759A (en) Instruction input and protection method integrating touch screen and behavior sensing
US10296096B2 (en) Operation recognition device and operation recognition method
KR101228336B1 (en) Personalization Service Providing Method by Using Mobile Terminal User&#39;s Activity Pattern and Mobile Terminal therefor
CN109993234B (en) Unmanned driving training data classification method and device and electronic equipment
CN103544485B (en) Driver recognition method and device based on intelligent terminal
CN107025002B (en) Terminal application control method and device and terminal
CN108828613B (en) Method for removing noise and hazardous chemical storage laser scanning device
US20160011719A1 (en) Adjusting coordinates of touch input
CN112052778A (en) Traffic sign identification method and related device
CN110231865A (en) Tactile feedback method, electronic equipment and storage medium
CN109857659B (en) Control operation method and device
CN107797652A (en) Adjust the method, apparatus and terminal of display effect
CN106103199B (en) Operate input unit and method of operation input
CN110401773A (en) The control method and relevant apparatus of screen state
CN116389639A (en) Action recognition method based on mobile terminal
CN103854026A (en) Recognition method and electronic device
US20210311621A1 (en) Swipe gestures on a virtual keyboard with motion compensation
CN102262456A (en) Information input device and method
CN114279425A (en) Compass precision improving method, terminal and computer readable storage medium
CN103808959B (en) A kind of sensing system and method thereof
CN111859549A (en) Method for determining weight and gravity center information of single-configuration whole vehicle and related equipment
CN116680346B (en) Motion trail analysis method, device and medium
JP2010067090A (en) Information terminal device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination