CN107544686B - Operation execution method and device - Google Patents

Operation execution method and device Download PDF

Info

Publication number
CN107544686B
CN107544686B CN201610495729.XA CN201610495729A CN107544686B CN 107544686 B CN107544686 B CN 107544686B CN 201610495729 A CN201610495729 A CN 201610495729A CN 107544686 B CN107544686 B CN 107544686B
Authority
CN
China
Prior art keywords
mobile terminal
acceleration
edge
preset
angular velocity
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.)
Active
Application number
CN201610495729.XA
Other languages
Chinese (zh)
Other versions
CN107544686A (en
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610495729.XA priority Critical patent/CN107544686B/en
Publication of CN107544686A publication Critical patent/CN107544686A/en
Application granted granted Critical
Publication of CN107544686B publication Critical patent/CN107544686B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Telephone Function (AREA)

Abstract

The disclosure relates to an operation execution method and device, and belongs to the field of mobile terminals. The method comprises the following steps: acquiring sensor data acquired by a sensor, wherein the sensor at least comprises an acceleration sensor; detecting whether the edge of the mobile terminal is knocked for n times within a preset time length according to the sensor data, wherein n is more than or equal to 2; if the edge of the mobile terminal is knocked for n times within a preset time length, determining that a trigger signal is received; and executing the predetermined operation according to the trigger signal. The embodiment of the disclosure solves the problems that in the related art, when specific operation is realized by using the edge of the mobile terminal, the edge touch TP needs to be arranged on the side frame, so that the cost is high, and meanwhile, the interference to a screen display device is caused; whether the edge of the mobile terminal is knocked or not is determined by utilizing the built-in sensor, and corresponding operation is executed when the edge of the mobile terminal is knocked, so that the manufacturing cost is reduced, and the interference of an additional edge touch control TP to a screen display device is avoided.

Description

Operation execution method and device
Technical Field
The present disclosure relates to the field of mobile terminals, and in particular, to an operation execution method and apparatus.
Background
With the increasing size of the screen of the mobile terminal, the difficulty of the user in performing one-handed operation by using the mobile terminal is increasing.
In order to enable a user to perform certain designated operations with one hand, thereby improving operation efficiency, in the related art, an edge touch TP (touch panel) is disposed on a side frame of the mobile terminal, and when the mobile terminal receives a touch signal through the edge touch TP, a corresponding operation is automatically performed. For example, when the mobile terminal receives a touch signal generated by sliding of a finger on a side frame through the edge touch TP, the return operation is automatically executed, and compared with the case that a user triggers the return operation by clicking a return control displayed on a screen, the efficiency of one-hand operation can be improved. However, the cost of disposing the edge touch TP on the side frame is high, and interference may be caused to the screen display device.
Disclosure of Invention
The embodiment of the disclosure provides an operation execution method and device, and the technical scheme is as follows:
according to a first aspect of embodiments of the present disclosure, there is provided an operation execution method, including:
acquiring sensor data acquired by a sensor, wherein the sensor at least comprises an acceleration sensor;
detecting whether the edge of the mobile terminal is knocked for n times within a preset time length according to the sensor data, wherein n is more than or equal to 2;
if the edge of the mobile terminal is knocked for n times within a preset time length, determining that a trigger signal is received;
and executing the predetermined operation according to the trigger signal.
Optionally, the sensor comprises an acceleration sensor, the sensor data comprising acceleration data;
detecting whether the edge of the mobile terminal is knocked n times within a preset time length according to the sensor data, wherein the method comprises the following steps:
calculating an acceleration change value of the mobile terminal in a first direction according to the acceleration data, wherein the acceleration change value is used for indicating the change amplitude of the acceleration in the first direction, and the first direction is parallel to the plane where the mobile terminal is located;
determining the change times of the acceleration in the first direction in a preset time length according to the acceleration data;
and if the acceleration change value belongs to the preset numerical value interval and the change frequency is n, determining that the edge of the mobile terminal is knocked for n times within the preset time length.
Optionally, the sensor comprises an acceleration sensor and an angular velocity sensor, the sensor data comprising acceleration data and angular velocity data;
detecting whether the edge of the mobile terminal is knocked n times within a preset time length according to the sensor data, wherein the method comprises the following steps:
calculating an acceleration change value of the mobile terminal in a first direction according to the acceleration data, wherein the acceleration change value is used for indicating the change amplitude of the acceleration in the first direction, and the first direction is parallel to the plane where the mobile terminal is located;
determining the change times of the acceleration in the first direction in a preset time length according to the acceleration data;
and if the acceleration change value belongs to a preset value interval, the change frequency is n, and the angular velocity data indicates that the frequency of the angular velocity reaching a preset angular velocity threshold value in a second direction in a preset time length is n, determining that the edge of the mobile terminal is knocked for n times in the preset time length, wherein the second direction is perpendicular to the plane of the mobile terminal.
Optionally, the method further includes:
determining a target edge according to the sensor data, wherein the target edge refers to a knocked edge;
determining the knocking times of the target edge according to the sensor data;
and determining the type of the trigger signal according to the target edge and the knocking times.
Optionally, different target edges correspond to different trigger signal types, and different tapping times correspond to different trigger signal types.
Optionally, the predetermined operation is performed according to a trigger signal, and includes:
acquiring a program identifier of a current application program;
determining the operation type of the preset operation according to the program identifier and the trigger signal type of the trigger signal;
and executing the predetermined operation in the current application program according to the operation type.
According to a second aspect of the embodiments of the present disclosure, there is provided an operation performing apparatus including:
the acquisition module is configured to acquire sensor data acquired by sensors, and the sensors at least comprise acceleration sensors;
the detection module is configured to detect whether the edge of the mobile terminal is knocked for n times within a preset time length according to the sensor data, wherein n is larger than or equal to 2;
the mobile terminal comprises a first determining module, a second determining module and a control module, wherein the first determining module is configured to determine that a trigger signal is received when the edge of the mobile terminal is knocked n times within a preset time length;
and the execution module is configured to execute a predetermined operation according to the trigger signal.
Optionally, the sensor comprises an acceleration sensor, the sensor data comprising acceleration data;
a detection module comprising:
the first calculation submodule is configured to calculate an acceleration change value of the mobile terminal in a first direction according to the acceleration data, the acceleration change value is used for indicating the change amplitude of the acceleration in the first direction, and the first direction is parallel to the plane where the mobile terminal is located;
a first determination submodule configured to determine, from the acceleration data, a number of changes in acceleration in a first direction within a predetermined period;
and the second determining submodule is configured to determine that the edge of the mobile terminal is subjected to n times of knocking within the preset time length when the acceleration change value belongs to the preset value interval and the change time is n.
Optionally, the sensor comprises an acceleration sensor and an angular velocity sensor, the sensor data comprising acceleration data and angular velocity data;
a detection module comprising:
the second calculation submodule is configured to calculate an acceleration change value of the mobile terminal in a first direction according to the acceleration data, the acceleration change value is used for indicating the change amplitude of the acceleration in the first direction, and the first direction is parallel to the plane where the mobile terminal is located;
a third determination submodule configured to determine, from the acceleration data, a number of changes in the acceleration in the first direction within a predetermined period;
and the fourth determining submodule is configured to determine that the edge of the mobile terminal is knocked n times within the preset time length when the acceleration change value belongs to the preset value interval, the change time is n, and the angular velocity data indicates that the time when the angular velocity reaches the preset angular velocity threshold value in the second direction within the preset time length is n, wherein the second direction is perpendicular to the plane where the mobile terminal is located.
Optionally, the apparatus further comprises:
a second determination module configured to determine a target edge from the sensor data, the target edge being a tapped edge;
a third determination module configured to determine a number of taps for the target edge from the sensor data;
and the fourth determination module is configured to determine the trigger signal type of the trigger signal according to the target edge and the knocking times.
Optionally, different target edges correspond to different trigger signal types, and different tapping times correspond to different trigger signal types.
Optionally, the execution module includes:
the acquisition submodule is configured to acquire a program identifier of a current application program;
the type determination submodule is configured to determine the operation type of the predetermined operation according to the program identification and the trigger signal type of the trigger signal;
and the execution submodule is configured to execute a predetermined operation in the current application program according to the operation type.
According to a third aspect of the embodiments of the present disclosure, there is provided an operation performing apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring sensor data acquired by a sensor, wherein the sensor at least comprises an acceleration sensor;
detecting whether the edge of the mobile terminal is knocked for n times within a preset time length according to the sensor data, wherein n is more than or equal to 2;
if the edge of the mobile terminal is knocked for n times within a preset time length, determining that a trigger signal is received;
and executing the predetermined operation according to the trigger signal.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
the method comprises the steps that sensor data are collected through a sensor arranged in the mobile terminal, when the sensor data collected by the sensor indicate that the edge of the mobile terminal is continuously knocked, the mobile terminal determines that a trigger signal is received, and preset operation is executed according to the trigger signal; the problems that in the prior art, when specific operation is realized by utilizing the edge of a mobile terminal, an edge touch control TP is required to be arranged on a side frame, so that the cost is high, and meanwhile, interference is caused to a screen display device are solved; the method and the device have the advantages that the edge touch TP is not required to be arranged at the edge of the mobile terminal, the built-in sensor of the mobile terminal can be utilized to determine whether the edge of the mobile terminal is knocked or not, and corresponding operation is executed when the edge of the mobile terminal is knocked, so that the manufacturing cost is reduced, and the interference caused by the addition of the extra edge touch TP to a screen display device is avoided.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
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 disclosure.
FIG. 1 is a method flow diagram illustrating an operational execution method according to an exemplary embodiment of the present disclosure;
FIG. 2A is a method flow diagram of an operational execution method shown in another exemplary embodiment of the present disclosure;
FIG. 2B is a schematic diagram illustrating a spatial rectangular coordinate system according to an exemplary embodiment of the present disclosure;
FIG. 2C is a method flow diagram of an operational execution method shown in yet another exemplary embodiment of the present disclosure;
FIG. 2D is a method flow diagram of an operation execution method shown in yet another exemplary embodiment of the present disclosure;
FIGS. 2E and 2F are schematic diagrams of an implementation of the operation execution method of FIG. 2D;
fig. 3 is a block diagram illustrating an operation performing apparatus according to an exemplary embodiment of the present disclosure;
fig. 4 is a block diagram of an operation performing apparatus shown in another exemplary embodiment of the present disclosure;
fig. 5 is a block diagram illustrating an operation performing apparatus according to an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The operation execution method provided by each embodiment of the present disclosure may be executed by a mobile terminal provided with a sensor, and the mobile terminal may be a smart phone, a tablet computer, an electronic book reader, an MP3 player (Moving Picture Experts Group Audio Layer III, motion Picture Experts compression standard Audio Layer 3) or an MP4 player (Moving Picture Experts Group Audio Layer IV, motion Picture Experts compression standard Audio Layer 4), and the like. The sensors provided in the mobile terminal may include an acceleration sensor and an angular velocity sensor (gyroscope) for acquiring acceleration data and angular velocity data of the mobile terminal, respectively.
For convenience of description, the following embodiments are only schematically illustrated by taking the operation execution method as an example for a smart phone, and do not limit the disclosure.
Fig. 1 is a method flow diagram illustrating an operation execution method according to an exemplary embodiment of the present disclosure. The present embodiment is described taking as an example that the operation execution method is applied to a mobile terminal provided with a sensor. The method may include the following steps.
In step 101, sensor data collected by a sensor is acquired, wherein the sensor at least comprises an acceleration sensor.
The mobile terminal collects sensor data in real time through a built-in sensor, and the sensor data are used for indicating the current motion condition and the gesture of the mobile terminal. Wherein the sensor comprises at least an acceleration sensor for acquiring acceleration data.
In step 102, whether the edge of the mobile terminal is knocked n times within a preset time length is detected according to the sensor data, wherein n is larger than or equal to 2.
When the edge of the mobile terminal is continuously knocked, the sensor data presents a specific change rule. For example, when the edge of the mobile terminal is continuously knocked, the acceleration data collected by the acceleration sensor will present a plurality of continuous peaks. Therefore, the mobile terminal determines whether the edge of the mobile terminal is knocked n times within a preset time length according to the collected sensor data.
In step 103, if the edge of the mobile terminal is tapped n times within the predetermined time period, it is determined that the trigger signal is received.
When the sensor data indicates that the edge of the mobile terminal is knocked n times within the preset time length, the mobile terminal determines that the trigger signal is received.
Optionally, the mobile terminal may further determine, according to the sensor data, a tapped target edge and the number of times the target edge is tapped, so as to determine a trigger signal type of the trigger signal, and finally determine an operation triggered by the trigger signal.
In step 104, a predetermined operation is performed according to the trigger signal.
In summary, in the operation execution method provided in this embodiment, sensor data is collected by a sensor built in a mobile terminal, and when the sensor data collected by the sensor indicates that an edge of the mobile terminal is continuously knocked, the mobile terminal determines that a trigger signal is received, and executes a predetermined operation according to the trigger signal; the problems that in the prior art, when specific operation is realized by utilizing the edge of a mobile terminal, an edge touch control TP is required to be arranged on a side frame, so that the cost is high, and meanwhile, interference is caused to a screen display device are solved; the method and the device have the advantages that the edge touch TP is not required to be arranged at the edge of the mobile terminal, the built-in sensor of the mobile terminal can be utilized to determine whether the edge of the mobile terminal is knocked or not, and corresponding operation is executed when the edge of the mobile terminal is knocked, so that the manufacturing cost is reduced, and the interference caused by the addition of the extra edge touch TP to a screen display device is avoided.
When a user uses a finger to continuously knock the edge of the mobile terminal, the acceleration of the edge in the corresponding direction will have a plurality of sudden change peak values within a certain time length. According to this principle, the mobile terminal may collect acceleration data by means of a built-in acceleration sensor, determine whether the edge of the mobile terminal is continuously tapped by analyzing the acceleration data, and perform a predetermined operation when the edge of the mobile terminal is continuously tapped. An exemplary embodiment is described below.
Fig. 2A is a method flow diagram illustrating an operation execution method according to another exemplary embodiment of the present disclosure. The present embodiment is described taking as an example that the operation execution method is applied to a mobile terminal provided with a sensor. The method may include the following steps.
In step 201, acceleration data collected by an acceleration sensor is acquired.
The mobile terminal is internally provided with an acceleration sensor which is used for acquiring acceleration data of the mobile terminal in each direction. In one possible implementation, as shown in fig. 2B, acceleration sensors are provided in the mobile terminal to collect acceleration data in X-axis, Y-axis and Z-axis directions, respectively. Wherein, the X axis is located in the plane of the mobile terminal, and the X axis is perpendicular to the left edge 211 and the right edge 212 of the mobile terminal; the Y axis lies in the plane of the mobile terminal and is perpendicular to the X axis (perpendicular to the upper edge 213 and the lower edge 214 of the mobile terminal); the Z axis is perpendicular to the plane of the mobile terminal.
In step 202, an acceleration change value of the mobile terminal in a first direction is calculated according to the acceleration data, the acceleration change value is used for indicating the change amplitude of the acceleration in the first direction, and the first direction is parallel to the plane of the mobile terminal.
When a user taps the edge of the mobile terminal, the acceleration of the mobile terminal in the force-receiving direction changes suddenly, and the acceleration is usually within a certain numerical range. Therefore, the mobile terminal can calculate the acceleration change value (absolute value) of the mobile terminal in the first direction according to the acceleration data acquired by the acceleration sensor in real time. The first direction is parallel to a plane in which the mobile terminal is located, and the first direction may indicate a single direction (for example, only the direction indicated by the X axis or the direction indicated by the Y axis), or may indicate multiple directions (for example, the directions indicated by the X axis and the Y axis at the same time).
Illustratively, the acceleration data collected by the acceleration sensor is shown in table one, wherein the time interval between each collection time is 50 ms.
Watch 1
Figure GDA0002753063010000071
According to the acceleration data shown in the table I, the mobile terminal calculates to obtain the acceleration at t2To t3The acceleration change value of the mobile terminal in the X-axis direction at the moment is 0.5m/s2At t5To t6The acceleration change value of the mobile terminal in the X-axis direction at the moment is 0.45m/s2(ii) a At t2To t3The variation value of the acceleration of the mobile terminal in the Y-axis direction is 0.1m/s2At t5To t6The variation value of the acceleration of the mobile terminal in the Y-axis direction is 0.1m/s2
In step 203, the number of changes in the acceleration in the first direction within the predetermined period is determined based on the acceleration data.
The change frequency of the acceleration of the mobile terminal in the first direction is related to the frequency of the mobile terminal edge knocked by the user, when the edge is knocked continuously by the user, the acceleration of the mobile terminal in the first direction continuously changes suddenly in a short time, and therefore after the mobile terminal acquires the acceleration data, the change frequency of the acceleration in the first direction in the preset duration is further determined according to the acceleration data. The predetermined time period is set according to the continuous tapping speed of the user, for example, if the continuous tapping speed of the user is about 200ms twice, the predetermined time period may be 200 ms.
In step 204, if the acceleration variation value belongs to the predetermined value interval and the variation number is n, it is determined that the edge of the mobile terminal is tapped n times within the predetermined time duration.
When a user continuously taps the edge of the mobile terminal for multiple times in a short time, the acceleration in the first direction continuously changes in the short time, and the acceleration change value is in a preset numerical value interval; correspondingly, when the change frequency of the acceleration reaches n (n is more than or equal to 2) within the preset time length and the change value of the acceleration belongs to the preset value interval, the mobile terminal determines that the edge of the mobile terminal is continuously knocked for n times within the preset time length.
In a possible implementation manner, the mobile terminal calculates an acceleration difference (i.e., an acceleration change value) between an acceleration obtained at a current acquisition time in a first direction and an acceleration obtained at a previous acquisition time in real time, when the acceleration difference belongs to a predetermined value interval, the mobile terminal starts a timer, detects whether the acceleration difference in the first direction belongs to the predetermined value interval within a predetermined time period after the current acquisition time, and when the acceleration difference in the first direction reaches the predetermined value interval again within the predetermined time period after the current acquisition time, the mobile terminal determines that the edge of the mobile terminal is continuously knocked within the predetermined time period.
For example, in conjunction with the data shown in Table one, at t3To t6Time (t)3To t6Interval between time points is 150ms), the number of times of change of acceleration of the mobile terminal in the direction indicated by the X-axis is 2, and the acceleration change values are 0.5m/s, respectively2And 0.45m/s2All belong to a predetermined numerical range (0.4 m/s)2,1.0m/s2) The mobile terminal determines that the edge is tapped 2 times within a predetermined time (the predetermined time is 200 ms).
Through the step, the mobile terminal can identify the operation such as unintentional touch edge (the acceleration change frequency in the preset duration is 1), shaking the mobile phone (the acceleration change value does not belong to the preset numerical value interval) and the like, and filtering the operation, so that the operation is prevented from being judged wrongly.
In step 205, if the edge of the mobile terminal is tapped n times within the predetermined time period, it is determined that the trigger signal is received.
The mobile terminal starts an edge tap detection function in advance, and the edge tap detection function is used for indicating the mobile terminal to execute preset operation when the edge is detected to be continuously tapped. Through the steps 201 to 204, when detecting that the edge is tapped n times within the predetermined time, the mobile terminal determines that a trigger signal for executing a predetermined operation is received.
In step 206, a predetermined operation is performed according to the trigger signal.
The mobile terminal executes a corresponding predetermined operation according to the trigger signal, wherein the predetermined operation can be set by a user, for example, the predetermined operation can be a return operation, a screen capture operation or a shutter operation, and the like.
In a possible implementation manner, the predetermined operation is a return operation, that is, when the mobile terminal detects that the edge is tapped n times within a predetermined time period, it is determined that a trigger signal for executing the return operation is received, and a return is performed according to the trigger signal.
In summary, in the operation execution method provided in this embodiment, sensor data is collected by a sensor built in a mobile terminal, and when the sensor data collected by the sensor indicates that an edge of the mobile terminal is continuously knocked, the mobile terminal determines that a trigger signal is received, and executes a predetermined operation according to the trigger signal; the problems that in the prior art, when specific operation is realized by utilizing the edge of a mobile terminal, an edge touch control TP is required to be arranged on a side frame, so that the cost is high, and meanwhile, interference is caused to a screen display device are solved; the method and the device have the advantages that the edge touch TP is not required to be arranged at the edge of the mobile terminal, the built-in sensor of the mobile terminal can be utilized to determine whether the edge of the mobile terminal is knocked or not, and corresponding operation is executed when the edge of the mobile terminal is knocked, so that the manufacturing cost is reduced, and the interference caused by the addition of the extra edge touch TP to a screen display device is avoided.
In the embodiment, the mobile terminal collects acceleration data through the built-in acceleration sensor, and determines whether the edge receives multiple continuous taps in a short time according to the acceleration data, so that edge tap detection is realized on the premise of not increasing additional hardware, and the manufacturing cost of the mobile terminal is reduced.
In the embodiment, the mobile terminal determines whether the edge is continuously knocked or not by calculating the acceleration change value and the acceleration change frequency within the preset time, can identify the operation of unintentionally touching the edge, shaking the mobile phone and the like, and filters the operation, so that the operation is prevented from being judged incorrectly, and the operation accuracy is improved.
When the edge of the mobile terminal is knocked, the mobile terminal generates acceleration in a first direction (a plane where the mobile terminal is located) and also generates angular velocity in a second direction (perpendicular to the plane where the mobile terminal is located). In order to further improve the detection accuracy of the edge tap, in one possible implementation, the mobile terminal may collect acceleration data and angular velocity data through a built-in acceleration sensor and an angular velocity sensor, respectively, and determine whether the edge is continuously tapped according to the acceleration data and the angular velocity data. Illustratively, as shown in fig. 2C, the step 201 may be replaced by a step 207.
In step 207, acceleration data collected by the acceleration sensor and angular velocity data collected by the angular velocity sensor are acquired.
As shown in fig. 2B, the acceleration sensor is used to collect acceleration data of the mobile terminal in directions of X, Y and Z axis, and the angular velocity sensor is used to collect angular velocity data of the mobile terminal around X, Y and Z axis.
It should be noted that the acceleration sensor and the angular velocity sensor need to acquire data synchronously.
Accordingly, as shown in FIG. 2C, step 204 described above may be replaced with step 208.
In step 208, if the acceleration variation value belongs to a predetermined value interval, the variation frequency is n, and the angular velocity data indicates that the frequency of the angular velocity reaching the predetermined angular velocity threshold value in the second direction within the predetermined time duration is n, it is determined that the edge of the mobile terminal is knocked n times within the predetermined time duration, and the second direction is perpendicular to the plane where the mobile terminal is located.
Similar to the step 204, after obtaining the acceleration change value in the first direction and the change frequency of the acceleration within the predetermined time length, the mobile terminal needs to detect whether the change frequency reaches n (n is greater than or equal to 2), and whether the acceleration change value belongs to a predetermined numerical value interval.
When the edge of the mobile terminal is knocked, the mobile terminal deflects, so that the angular velocity in a second direction is generated, wherein the second direction is perpendicular to the plane of the mobile terminal. For example, as shown in fig. 2B, when the left edge of the mobile terminal is knocked, the mobile terminal may generate acceleration in the X-axis direction, and may rotate around the Z-axis (i.e., generate an angular velocity around the Z-axis).
In addition, the number of times that the mobile terminal generates the angular velocity in the second direction is also related to the number of times of edge tapping (the number of times of angular velocity change is the same), and therefore, the mobile terminal needs to perform edge tapping detection according to the angular velocity data while performing edge tapping detection according to the acceleration data.
When the change frequency of the acceleration in the first direction in the preset time length is n, the acceleration change value belongs to the preset numerical value interval, and the frequency of the angular velocity reaching the preset angular velocity threshold value in the second direction is also n, the mobile terminal determines that the edge is knocked for n times in the preset time length. For example, the predetermined angular velocity threshold may be 0.1 rad/s.
It should be noted that, the mobile terminal may further set an upper angular velocity limit, and when the angular velocity in the second direction is greater than the upper angular velocity limit, it is determined that the edge tapping action is not performed, and filtering is performed, which is not limited in this embodiment.
In the embodiment, the mobile terminal carries out data acquisition through the built-in acceleration sensor and the built-in angular velocity sensor, and determines whether the edge receives multiple continuous taps in a short time or not according to the acceleration data and the angular velocity data, so that the operation accuracy is further improved.
In a possible implementation, on the basis of fig. 2A, as shown in fig. 2D, after the step 205, the following steps are further included.
In step 209, a target edge is determined from the sensor data, the target edge referring to the edge that was struck.
In one possible implementation, the mobile terminal obtains acceleration data, determines an acceleration direction from the acceleration data, and further determines a tapped edge from the acceleration direction.
As shown in fig. 2B, the acceleration in the positive direction of the X-axis is a positive value, and the acceleration in the negative direction of the X-axis is a negative value, so that the mobile terminal can determine the acceleration direction according to the positive and negative values of the acceleration data, thereby determining the tapped target edge. For example, when the acceleration data in the X-axis direction is positive, the acceleration direction is indicated to be along the positive direction of the X-axis, and the knocked edge is the left edge 211; when the acceleration data in the X-axis direction is negative, it indicates that the acceleration direction is along the X-axis negative direction, and the tapped edge is the right edge 212. Similarly, when the acceleration data in the Y-axis direction is positive, indicating that the acceleration direction is in the positive Y-axis direction, the struck edge is the upper edge 213; when the acceleration data in the Y-axis direction is negative, indicating that the acceleration direction is in the Y-axis negative direction, the knocked edge is the lower edge 214.
In step 210, the number of taps for the target edge is determined from the sensor data.
After the target edge is determined, the mobile terminal determines the number of times of the target edge being knocked according to the sensor data.
Since the acceleration of the mobile terminal in the first direction changes every time the target edge is tapped, in one possible implementation, the mobile terminal may determine the number of changes of the acceleration in the first direction within a predetermined time period as the number of taps of the target edge.
In another possible implementation manner, since the angular velocity of the mobile terminal in the second direction changes every time the target edge is tapped, the mobile terminal may further determine the number of changes of the angular velocity in the second direction within the predetermined time period as the number of taps of the target edge.
In step 211, the trigger signal type of the trigger signal is determined according to the target edge and the number of taps.
Aiming at different target edges and the knocking times, the mobile terminal can execute different operations according to the setting of a user; accordingly, different operations need to be triggered by different trigger signals. Therefore, after determining that the trigger signal is received, the mobile terminal further determines the trigger model type of the trigger signal according to the target edge and the number of times of tapping.
In one possible embodiment, different target edges correspond to different trigger signal types, and different tap times correspond to different trigger signal types. Illustratively, the correspondence between the target edge, the number of taps, and the type of trigger signal may be as shown in table two.
Watch two
Target edge Number of taps Type of trigger signal
Left edge 2 A first signal type
Left edge 3 Second signal type
Right edge 2 Third signal type
Right edge 3 Fourth signal type
Upper edge 2 Fifth signal type
Upper edge 3 Sixth signal type
Lower edge 2 Seventh Signal type
Lower edge 3 Eighth Signal type
Accordingly, as shown in fig. 2D, the step 206 may be replaced with the following step.
In step 212, the program identification of the current application program is obtained.
The operations triggered by the same trigger signal may differ among different applications. For example, in a browser application, a trigger signal of a first signal type is used to trigger a return operation; whereas in camera applications, a trigger signal of a first signal type is used to trigger a shutter operation.
Therefore, in order to determine the operation triggered by the trigger signal, after the mobile terminal determines the trigger signal type of the trigger signal, it is further required to obtain the program identifier of the current application program.
In step 213, the operation type of the predetermined operation is determined according to the program identifier and the trigger signal type of the trigger signal.
The mobile terminal stores the corresponding relation among the program identifier, the trigger signal type and the operation type in advance, wherein the corresponding relation can be set by a user. Schematically, the correspondence is shown in table three.
Watch III
Program identification Type of trigger signal Type of operation
Browser A and browser B A first signal type Return to
C beauty camera A first signal type Push-to-open shutter
Browser A and browser B Second signal type Refreshing
D mail box Second signal type Screen shot
The mobile terminal determines the operation type of the predetermined operation according to the corresponding relation.
In step 214, a predetermined operation is performed in the current application according to the operation type.
The mobile terminal performs a corresponding predetermined operation in the current application according to the operation type determined in step 213.
For example, as shown in fig. 2E, when the user taps the left edge 211 of the mobile terminal 2 times in succession, the mobile terminal determines that the trigger signal of the first signal type is received, and if the program identifier of the current application program is "a browser", the mobile terminal performs a return operation and returns to the upper-level page; for another example, as shown in fig. 2F, when the user taps the left edge 211 of the mobile terminal 2 times in succession, the mobile terminal determines that the trigger signal of the first signal type is received, and if the program identifier of the current application program is "C beauty camera", the mobile terminal performs a shutter operation.
In this embodiment, the mobile terminal determines the type of the trigger signal according to the tapped target edge and the tapping frequency, and determines the operation type of the predetermined operation by combining the program identifier of the current application program, so that the user can realize different operations by tapping different edges or tapping different times, and the operation efficiency of the user is improved.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 3 is a block diagram illustrating an operation performing apparatus according to an exemplary embodiment of the present disclosure. The operation executing device can be realized by hardware or a combination of hardware and software to become all or a part of the mobile terminal provided with the sensor. The operation execution device includes:
an obtaining module 310 configured to obtain sensor data collected by sensors, the sensors including at least an acceleration sensor;
the detection module 320 is configured to detect whether the edge of the mobile terminal is knocked n times within a preset time length according to the sensor data, wherein n is larger than or equal to 2;
a first determining module 330 configured to determine that a trigger signal is received when an edge of the mobile terminal is tapped n times within a predetermined time period;
an execution module 340 configured to execute a predetermined operation according to the trigger signal.
In summary, in the operation execution device provided in this embodiment, the sensor data is collected by the sensor built in the mobile terminal, and when the sensor data collected by the sensor indicates that the edge of the mobile terminal is continuously knocked, the mobile terminal determines to receive the trigger signal, and executes the predetermined operation according to the trigger signal; the problems that in the prior art, when specific operation is realized by utilizing the edge of a mobile terminal, an edge touch control TP is required to be arranged on a side frame, so that the cost is high, and meanwhile, interference is caused to a screen display device are solved; the method and the device have the advantages that the edge touch TP is not required to be arranged at the edge of the mobile terminal, the built-in sensor of the mobile terminal can be utilized to determine whether the edge of the mobile terminal is knocked or not, and corresponding operation is executed when the edge of the mobile terminal is knocked, so that the manufacturing cost is reduced, and the interference caused by the addition of the extra edge touch TP to a screen display device is avoided.
Fig. 4 is a block diagram illustrating an operation performing apparatus according to another exemplary embodiment of the present disclosure. The operation executing device can be realized by hardware or a combination of hardware and software to become all or a part of the mobile terminal provided with the sensor. The operation execution device includes:
an acquisition module 410 configured to acquire sensor data acquired by sensors, the sensors including at least an acceleration sensor;
the detection module 420 is configured to detect whether the edge of the mobile terminal is knocked n times within a preset time length according to the sensor data, wherein n is larger than or equal to 2;
a first determining module 430 configured to determine that a trigger signal is received when an edge of the mobile terminal is tapped n times within a predetermined time period;
an execution module 440 configured to execute a predetermined operation according to the trigger signal.
Optionally, the sensor comprises an acceleration sensor, the sensor data comprising acceleration data;
a detection module 420 comprising:
the first calculation submodule 421 is configured to calculate an acceleration change value of the mobile terminal in a first direction according to the acceleration data, the acceleration change value is used for indicating a change amplitude of the acceleration in the first direction, and the first direction is parallel to a plane where the mobile terminal is located;
a first determination submodule 422 configured to determine a number of changes in acceleration in a first direction within a predetermined period of time from the acceleration data;
and the second determining submodule 423 is configured to determine that the edge of the mobile terminal is knocked n times within the preset time length when the acceleration change value belongs to the preset value interval and the change time is n.
Optionally, the sensor comprises an acceleration sensor and an angular velocity sensor, the sensor data comprising acceleration data and angular velocity data;
a detection module 420 comprising:
a second calculating submodule 424, configured to calculate an acceleration change value of the mobile terminal in a first direction according to the acceleration data, where the acceleration change value is used to indicate a change magnitude of the acceleration in the first direction, and the first direction is parallel to a plane where the mobile terminal is located;
a third determination submodule 425 configured to determine a number of changes in the acceleration in the first direction within a predetermined period of time from the acceleration data;
a fourth determining submodule 426, configured to determine that the edge of the mobile terminal is tapped n times within the predetermined time duration when the acceleration change value belongs to the predetermined value interval, the change time is n, and the angular velocity data indicates that the number of times that the angular velocity reaches the predetermined angular velocity threshold value in a second direction within the predetermined time duration is n, where the second direction is perpendicular to the plane where the mobile terminal is located.
Optionally, the apparatus further comprises:
a second determination module 450 configured to determine a target edge from the sensor data, the target edge being the tapped edge;
a third determination module 460 configured to determine a number of taps for the target edge from the sensor data;
a fourth determining module 470 configured to determine a trigger signal type of the trigger signal according to the target edge and the number of taps.
Optionally, different target edges correspond to different trigger signal types, and different tapping times correspond to different trigger signal types.
Optionally, the execution module 440 includes:
an obtaining submodule 441 configured to obtain a program identifier of the current application program;
a type determination submodule 442 configured to determine an operation type of the predetermined operation according to the program identification and a trigger signal type of the trigger signal;
an execution sub-module 443 configured to execute a predetermined operation in the current application according to the operation type.
In summary, in the operation execution device provided in this embodiment, the sensor data is collected by the sensor built in the mobile terminal, and when the sensor data collected by the sensor indicates that the edge of the mobile terminal is continuously knocked, the mobile terminal determines to receive the trigger signal, and executes the predetermined operation according to the trigger signal; the problems that in the prior art, when specific operation is realized by utilizing the edge of a mobile terminal, an edge touch control TP is required to be arranged on a side frame, so that the cost is high, and meanwhile, interference is caused to a screen display device are solved; the method and the device have the advantages that the edge touch TP is not required to be arranged at the edge of the mobile terminal, the built-in sensor of the mobile terminal can be utilized to determine whether the edge of the mobile terminal is knocked or not, and corresponding operation is executed when the edge of the mobile terminal is knocked, so that the manufacturing cost is reduced, and the interference caused by the addition of the extra edge touch TP to a screen display device is avoided.
In the embodiment, the mobile terminal collects acceleration data through the built-in acceleration sensor, and determines whether the edge receives multiple continuous taps in a short time according to the acceleration data, so that edge tap detection is realized on the premise of not increasing additional hardware, and the manufacturing cost of the mobile terminal is reduced.
In the embodiment, the mobile terminal determines whether the edge is continuously knocked or not by calculating the acceleration change value and the acceleration change frequency within the preset time, can identify the operation of unintentionally touching the edge, shaking the mobile phone and the like, and filters the operation, so that the operation is prevented from being judged incorrectly, and the operation accuracy is improved.
In the embodiment, the mobile terminal carries out data acquisition through the built-in acceleration sensor and the built-in angular velocity sensor, and determines whether the edge receives multiple continuous taps in a short time or not according to the acceleration data and the angular velocity data, so that the operation accuracy is further improved.
In this embodiment, the mobile terminal determines the type of the trigger signal according to the tapped target edge and the tapping frequency, and determines the operation type of the predetermined operation by combining the program identifier of the current application program, so that the user can realize different operations by tapping different edges or tapping different times, and the operation efficiency of the user is improved.
Fig. 5 is a block diagram illustrating an operation performing apparatus 500 according to an exemplary embodiment. For example, the apparatus 500 may be a mobile terminal provided with a sensor, such as a smart phone or a tablet computer.
Referring to fig. 5, the apparatus 500 may include one or more of the following components: a processing component 502, a memory 504, a power component 506, a multimedia component 508, an audio component 510, a sensor component 514, and a communication component 516.
The processing component 502 generally controls overall operation of the device 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 502 may include one or more processors 520 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 502 can include one or more modules that facilitate interaction between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.
The memory 504 is configured to store various types of data to support operations at the apparatus 500. Examples of such data include instructions for any application or method operating on device 500, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 504 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 506 provides power to the various components of the device 500. The power components 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 500.
The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 500 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 510 is configured to output and/or input audio signals. For example, audio component 510 includes a Microphone (MIC) configured to receive external audio signals when apparatus 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 504 or transmitted via the communication component 516. In some embodiments, audio component 510 further includes a speaker for outputting audio signals.
The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the device 500. For example, the sensor assembly 514 may detect an open/closed state of the apparatus 500, the relative positioning of the components, such as a display and keypad of the apparatus 500, the sensor assembly 514 may also detect a change in the position of the apparatus 500 or a component of the apparatus 500, the presence or absence of user contact with the apparatus 500, orientation or acceleration/deceleration of the apparatus 500, and a change in the temperature of the apparatus 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In this embodiment, the sensor assembly 514 may include an acceleration sensor and an angular velocity sensor for acquiring acceleration data and angular velocity data, respectively, of the device 500.
The communication component 516 is configured to facilitate communication between the apparatus 500 and other devices in a wired or wireless manner. The apparatus 500 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 504 comprising instructions, executable by the processor 520 of the apparatus 500 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein that, when executed by a processor of apparatus 500, enable apparatus 500 to perform the above-described operations performing the method.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (11)

1. An operation execution method, characterized in that the method comprises:
acquiring sensor data acquired by a sensor, wherein the sensor at least comprises an acceleration sensor and an angular velocity sensor;
detecting whether the edge of the mobile terminal is knocked for n times within a preset time length according to the sensor data, wherein n is more than or equal to 2, detecting whether the angular speed in the second direction at each acquisition moment is greater than the preset angular speed upper limit in real time, and determining that the edge is not knocked if the angular speed in the second direction at each acquisition moment is greater than the preset angular speed upper limit; if not, calculating an acceleration difference value between the acceleration acquired at the current acquisition time in the first direction and the acceleration acquired at the previous acquisition time in real time, wherein the first direction is parallel to the plane of the mobile terminal, the second direction is perpendicular to the plane of the mobile terminal, when the acceleration difference value belongs to a preset value interval and the angular velocity reaches a preset angular velocity threshold value, starting a timer, detecting whether the acceleration difference value in the first direction belongs to the preset value interval and whether the angular velocity in the second direction reaches the preset angular velocity threshold value within a preset time length after the current acquisition time, and when the acceleration difference value in the first direction reaches the preset value interval again and the angular velocity in the second direction reaches the preset angular velocity threshold value within the preset time length after the current acquisition time is detected, determining that the edge of the mobile terminal is continuously knocked within a preset time length;
if the edge of the mobile terminal is knocked for n times within the preset time length, determining that a trigger signal is received;
and executing a preset operation according to the trigger signal.
2. The method of claim 1, wherein the sensors comprise the acceleration sensor and an angular velocity sensor, and the sensor data comprises acceleration data and angular velocity data;
the detecting whether the edge of the mobile terminal is knocked for n times within a preset time length according to the sensor data comprises the following steps:
calculating an acceleration change value of the mobile terminal in a first direction according to the acceleration data, wherein the acceleration change value is used for indicating the change amplitude of the acceleration in the first direction, and the first direction is parallel to the plane of the mobile terminal;
determining the change times of the acceleration in the first direction in the preset time length according to the acceleration data;
if the acceleration change value belongs to a preset value interval, the change frequency is n, and the angular velocity data indicates that the frequency of the angular velocity reaching a preset angular velocity threshold value in a second direction in the preset time length is n, it is determined that the edge of the mobile terminal is knocked for n times in the preset time length, and the second direction is perpendicular to the plane where the mobile terminal is located.
3. The method of claim 1 or 2, further comprising:
determining a target edge according to the sensor data, wherein the target edge refers to a knocked edge;
determining the number of times of knocking the target edge according to the sensor data;
and determining the type of the trigger signal according to the target edge and the knocking times.
4. The method of claim 3, wherein different target edges correspond to different trigger signal types and different numbers of taps correspond to different trigger signal types.
5. The method of claim 3, wherein performing a predetermined operation in accordance with the trigger signal comprises:
acquiring a program identifier of a current application program;
determining an operation type of the predetermined operation according to the program identifier and the trigger signal type of the trigger signal;
and executing the predetermined operation in the current application program according to the operation type.
6. An operation execution apparatus, characterized in that the apparatus comprises:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is configured to acquire sensor data acquired by sensors, and the sensors at least comprise an acceleration sensor and an angular velocity sensor;
the detection module is configured to detect whether the edge of the mobile terminal is knocked for n times within a preset time length according to the sensor data, wherein n is larger than or equal to 2, the detection module detects whether the angular speed in the second direction at each acquisition moment is larger than a preset angular speed upper limit in real time, and if yes, the detection module determines that the edge is not knocked; if not, calculating an acceleration difference value between the acceleration acquired at the current acquisition time in the first direction and the acceleration acquired at the previous acquisition time in real time, wherein the first direction is parallel to the plane of the mobile terminal, the second direction is perpendicular to the plane of the mobile terminal, when the acceleration difference value belongs to a preset value interval and the angular velocity reaches a preset angular velocity threshold value, starting a timer, detecting whether the acceleration difference value in the first direction belongs to the preset value interval and whether the angular velocity in the second direction reaches the preset angular velocity threshold value within a preset time length after the current acquisition time, and when the acceleration difference value in the first direction reaches the preset value interval again and the angular velocity in the second direction reaches the preset angular velocity threshold value within the preset time length after the current acquisition time is detected, determining that the edge of the mobile terminal is continuously knocked within a preset time length;
the first determination module is configured to determine that a trigger signal is received when the edge of the mobile terminal is knocked n times within the preset time length;
an execution module configured to execute a predetermined operation according to the trigger signal.
7. The apparatus of claim 6, wherein the sensors comprise the acceleration sensor and an angular velocity sensor, the sensor data comprising acceleration data and angular velocity data;
the detection module comprises:
the second calculation submodule is configured to calculate an acceleration change value of the mobile terminal in a first direction according to the acceleration data, the acceleration change value is used for indicating the change amplitude of the acceleration in the first direction, and the first direction is parallel to the plane of the mobile terminal;
a third determination submodule configured to determine, from the acceleration data, a number of changes in the acceleration in the first direction within the predetermined period;
a fourth determining submodule configured to determine that the edge of the mobile terminal is tapped n times within the predetermined time duration when the acceleration change value belongs to a predetermined value interval, the change number is n, and the angular velocity data indicates that the number of times that the angular velocity reaches a predetermined angular velocity threshold value in a second direction within the predetermined time duration is n, where the second direction is perpendicular to the plane where the mobile terminal is located.
8. The apparatus of claim 6 or 7, further comprising:
a second determination module configured to determine a target edge from the sensor data, the target edge being a tapped edge;
a third determination module configured to determine a number of taps of the target edge from the sensor data;
a fourth determination module configured to determine a trigger signal type of the trigger signal according to the target edge and the number of taps.
9. The apparatus of claim 8, wherein different target edges correspond to different trigger signal types and different numbers of taps correspond to different trigger signal types.
10. The apparatus of claim 8, wherein the execution module comprises:
the acquisition submodule is configured to acquire a program identifier of a current application program;
a type determination submodule configured to determine an operation type of the predetermined operation according to the program identification and the trigger signal type of the trigger signal;
an execution submodule configured to execute the predetermined operation in the current application program according to the operation type.
11. An operation execution apparatus, characterized in that the apparatus comprises:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring sensor data acquired by a sensor, wherein the sensor at least comprises an acceleration sensor and an angular velocity sensor;
detecting whether the edge of the mobile terminal is knocked for n times within a preset time length according to the sensor data, wherein n is more than or equal to 2, detecting whether the angular speed in the second direction at each acquisition moment is greater than the preset angular speed upper limit in real time, and determining that the edge is not knocked if the angular speed in the second direction at each acquisition moment is greater than the preset angular speed upper limit; if not, calculating the acceleration difference between the acceleration acquired at the current acquisition moment and the acceleration acquired at the previous acquisition moment in the first direction in real time, the first direction is parallel to the plane of the mobile terminal, the second direction is perpendicular to the plane of the mobile terminal, when the acceleration difference value belongs to a preset value interval, starting a timer, detecting within a preset time length after the current acquisition time, whether the acceleration difference in the first direction belongs to the predetermined numerical interval and whether the angular velocity in the second direction reaches the predetermined angular velocity threshold, when the acceleration difference value in the first direction reaches the preset value interval again and the angular velocity in the second direction reaches the preset angular velocity threshold value within the preset time length after the current acquisition time is detected, determining that the edge of the mobile terminal is continuously knocked within the preset time length;
if the edge of the mobile terminal is knocked for n times within the preset time length, determining that a trigger signal is received;
and executing a preset operation according to the trigger signal.
CN201610495729.XA 2016-06-28 2016-06-28 Operation execution method and device Active CN107544686B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610495729.XA CN107544686B (en) 2016-06-28 2016-06-28 Operation execution method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610495729.XA CN107544686B (en) 2016-06-28 2016-06-28 Operation execution method and device

Publications (2)

Publication Number Publication Date
CN107544686A CN107544686A (en) 2018-01-05
CN107544686B true CN107544686B (en) 2021-01-05

Family

ID=60965540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610495729.XA Active CN107544686B (en) 2016-06-28 2016-06-28 Operation execution method and device

Country Status (1)

Country Link
CN (1) CN107544686B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108492406A (en) * 2018-02-11 2018-09-04 厦门市坤上智能设备有限公司 It is remotely controlled intelligent door lock
CN112129399A (en) * 2020-09-17 2020-12-25 江苏精微特电子股份有限公司 Knocking sensor algorithm and knocking sensor thereof
CN115243125A (en) * 2021-04-23 2022-10-25 华为技术有限公司 Control method and electronic equipment
CN116055622B (en) * 2022-06-24 2023-10-20 荣耀终端有限公司 Function triggering method, storage medium and terminal

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201336655Y (en) * 2009-01-12 2009-10-28 叶静文 Switch with gravitational acceleration sensor
CN103218062A (en) * 2013-04-24 2013-07-24 伍斌 Man-machine interaction method and equipment based on acceleration sensor and motion recognition
CN103502909A (en) * 2011-04-27 2014-01-08 松下电器产业株式会社 Electronic device
CN103516900A (en) * 2013-09-18 2014-01-15 广东欧珀移动通信有限公司 Method and device for starting front camera and rear camera of electronic device during system hibernation during system hibernation
CN104079725A (en) * 2014-07-07 2014-10-01 中科创达软件股份有限公司 Incoming call rejection method and device
CN105357391A (en) * 2015-11-23 2016-02-24 魅族科技(中国)有限公司 Phone-call recording method and mobile terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201336655Y (en) * 2009-01-12 2009-10-28 叶静文 Switch with gravitational acceleration sensor
CN103502909A (en) * 2011-04-27 2014-01-08 松下电器产业株式会社 Electronic device
CN103218062A (en) * 2013-04-24 2013-07-24 伍斌 Man-machine interaction method and equipment based on acceleration sensor and motion recognition
CN103516900A (en) * 2013-09-18 2014-01-15 广东欧珀移动通信有限公司 Method and device for starting front camera and rear camera of electronic device during system hibernation during system hibernation
CN104079725A (en) * 2014-07-07 2014-10-01 中科创达软件股份有限公司 Incoming call rejection method and device
CN105357391A (en) * 2015-11-23 2016-02-24 魅族科技(中国)有限公司 Phone-call recording method and mobile terminal

Also Published As

Publication number Publication date
CN107544686A (en) 2018-01-05

Similar Documents

Publication Publication Date Title
JP6267363B2 (en) Method and apparatus for taking images
CN106572299B (en) Camera opening method and device
RU2661289C1 (en) Method and device for preventing random taping of terminal with touch screen
CN105488527B (en) Image classification method and device
CN105306824B (en) Acquisition parameters adjusting method and device
EP3173970A1 (en) Image processing method and apparatus
EP3043293A1 (en) Method and device for realizing touch button and fingerprint identification, and terminal device
EP3179711A2 (en) Method and apparatus for preventing photograph from being shielded
CN106713734B (en) Automatic focusing method and device
JP6431911B2 (en) Method and apparatus for setting a threshold
CN111695382B (en) Fingerprint acquisition area determining method and fingerprint acquisition area determining device
CN107544686B (en) Operation execution method and device
EP3035489A1 (en) Method and device for charge management
CN104243819A (en) Photo acquiring method and device
EP3038345A1 (en) Auto-focusing method and auto-focusing device
CN106648063B (en) Gesture recognition method and device
JP6391708B2 (en) Method and apparatus for acquiring iris image, and iris identification device
JP2017534933A (en) Instruction generation method and apparatus
CN107463903B (en) Face key point positioning method and device
CN105208284B (en) Shoot based reminding method and device
KR20170132833A (en) Pressure detection method, apparatus, program, and recording medium
CN106027862A (en) Focus adjustment method and device, and terminal
CN105487774A (en) Image grouping method and device
CN116954540A (en) Application program display method and device and terminal
US10198614B2 (en) Method and device for fingerprint recognition

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
GR01 Patent grant
GR01 Patent grant