A gesture recognition method and device

By combining the system level and the application side to realize gesture recognition, the defects in interactivity and consistency of gesture recognition in the existing technology are solved, ensuring that full-screen gestures can be effectively recognized in any application state, improving user experience and visual effects. design space.

CN112181264BActive Publication Date: 2024-10-15ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910596336.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-07-03
Publication Date
2024-10-15
Estimated Expiration
2039-07-03

AI Technical Summary

Technical Problem

Existing full-screen gesture recognition solutions have flaws in interactivity and consistency. The system level is highly efficient but has poor interactivity. The application side is flexible but cannot recognize gestures in an inactive state, resulting in gesture recognition failure.

Method used

By combining the system level and the application side to realize gesture recognition, capture gesture events and perform full-screen gesture recognition and status switching based on parameter information, ensuring that gesture recognition can work effectively in any foreground application state.

Benefits of technology

It realizes the recognition of full-screen gestures in any foreground application state, enhances the interactivity and visual design space of user operations, avoids the disconnection problem of gesture recognition, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112181264B_ABST
    Figure CN112181264B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a gesture recognition method and device, including: capturing gesture events to obtain parameter information of gesture events; implementing through desktop applications: when it is determined that the gesture event meets the full-screen gesture recognition requirements based on the parameter information of the gesture event, recognizing the full-screen gesture based on the parameter information of the gesture event, and switching the state based on the recognized full-screen gesture. The embodiment of the present invention uniformly plans and designs the user's operations at the first starting point of the user's operation - the desktop application, and places the recognition and state switching of the full-screen gesture on the application side. The visual effect design space of each page is larger, and more visual effects and interactive scenes that are more in line with the user's operation can be designed, and interact with the system level, and other visual effect resources are controlled through the system level to coordinate and be consistent in the full-screen gesture recognition and state switching, so as not to be out of touch.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to but are not limited to terminal technology, and in particular to a gesture recognition method and device. Background Art

[0002] The development of user operation buttons in smart terminals has experienced a transition from physical button manipulation to software virtual buttons that make the most of the screen. The latest development trend is to use the entire screen as a space for users to operate, completely abandon the button prompts that occupy space on the screen, and directly recognize the user's gestures to respond to the user's operations. In this way, the software can make full use of the size of the mobile phone screen, display its own interface to the greatest extent, and greatly improve the user experience. There are two main related full-screen gesture recognition solutions. One is directly implemented at the system level, with high processing efficiency, but the interactivity with the desktop is not high and the disconnection is serious; the other is implemented on the application side. Compared with the system-level implementation solution, the application itself is more flexible, can freely implement animations, has stronger interactivity with users, is disconnected from the system, and cannot recognize gestures once the application is in an inactive state. Summary of the invention

[0003] The embodiments of the present invention provide a gesture recognition method and device, which can effectively combine the application end and the system level to realize gesture recognition without being out of touch.

[0004] An embodiment of the present invention provides a gesture recognition method, including:

[0005] Implemented at the system level: Capture gesture events to obtain parameter information of gesture events;

[0006] Implemented through desktop application: When it is determined that the gesture event meets the full-screen gesture recognition requirements based on the parameter information of the gesture event, the full-screen gesture is recognized based on the parameter information of the gesture event, and the state is switched based on the recognized full-screen gesture.

[0007] An embodiment of the present invention provides a gesture recognition device, including:

[0008] The event capture module is used to achieve at the system level: capturing gesture events to obtain parameter information of gesture events;

[0009] A gesture recognition module, used to implement, through a desktop application: when it is determined according to the parameter information of the gesture event that the gesture event meets the full-screen gesture recognition requirement, recognize the full-screen gesture according to the parameter information of the gesture event;

[0010] The state switching module is used to implement, through a desktop application: state switching according to the recognized full-screen gesture.

[0011] An embodiment of the present invention provides a gesture recognition device, including a processor and a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed by the processor, any of the above-mentioned gesture recognition methods is implemented.

[0012] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned gesture recognition methods are implemented.

[0013] The embodiments of the present invention include: realizing through the system level: capturing gesture events to obtain parameter information of gesture events; realizing through desktop applications: when it is determined that the gesture event meets the full-screen gesture recognition requirements based on the parameter information of the gesture event, recognizing the full-screen gesture based on the parameter information of the gesture event, and switching the state based on the recognized full-screen gesture. The embodiments of the present invention make unified planning and design of user operations at the first starting point of user operations—the desktop application, and place the recognition and state switching of full-screen gestures on the application side. The visual effect design space of each page is larger, and more visual effects and interactive scenes that are more in line with user operations can be designed, and interact with the system level, and other visual effect resources are controlled through the system level to coordinate and be consistent in the full-screen gesture recognition and state switching, so as not to be out of touch.

[0014] In another embodiment, identifying a full-screen gesture based on the moving distance and / or moving speed of a moving event relative to a pressing event includes at least one of the following: when the foreground application is a desktop application when the gesture event is captured, identifying the full-screen gesture of the desktop application based on the moving distance and / or moving speed of the moving event relative to the pressing event; when the foreground application is a non-desktop application when the gesture event is captured, identifying the full-screen gesture of the non-desktop application based on the moving distance and / or moving speed of the moving event relative to the pressing event. This solution can identify full-screen gestures of desktop applications and full-screen gestures of non-desktop applications, and will not fail to recognize full-screen gestures because the foreground application is a non-desktop application.

[0015] Other features and advantages of the embodiments of the present invention will be described in the following description, and partly become apparent from the description, or be understood by implementing the embodiments of the present invention. The purposes and other advantages of the embodiments of the present invention can be achieved and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings are used to provide a further understanding of the technical solutions of the embodiments of the present invention and constitute a part of the specification. Together with the embodiments of the embodiments of the present invention, they are used to explain the technical solutions of the embodiments of the present invention and do not constitute a limitation on the technical solutions of the embodiments of the present invention.

[0017] Figure 1 A flowchart of a gesture recognition method proposed by an embodiment of the present invention;

[0018] Figure 2 This is an exemplary flow chart of a gesture recognition process according to an embodiment of the present invention;

[0019] Figure 3 An exemplary flow chart of a process of performing gesture recognition and state switching through a desktop gesture consumer according to an embodiment of the present invention;

[0020] Figure 4 An exemplary flow chart of a process of performing gesture recognition and state switching through a non-desktop gesture consumer according to an embodiment of the present invention;

[0021] Figure 5 A schematic diagram of the structure of a gesture recognition device according to another embodiment of the present invention;

[0022] Figure 6 FIG. 4 is an exemplary schematic diagram of a gesture recognition device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0023] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other at will.

[0024] The steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions. Also, although a logical sequence is shown in the flowchart, in some cases, the steps shown or described can be performed in a sequence different from that shown here.

[0025] With the popularity of smart phones, the global user group of smart terminals will exceed 2 billion. With such a huge number, users' demand for differentiation is also increasing day by day. Under such changes, a variety of personalized differentiated products have emerged one after another, from a wide variety of mobile phone styles, changes in hardware levels of colors, to various customized systems and software, all of which are to meet the differentiated needs of users to the greatest extent. At present, mainstream smart terminals have withdrawn their own full-screen design solutions. The original intention of this solution is to use the entire screen as a space for users to operate, completely abandon the button prompts that occupy the position on the screen, leave more space for applications, and give users a better visual enjoyment. However, there is some room for improvement in the consistency and fluency of interaction in the mainstream design solution.

[0026] Currently, there are two main mainstream full-screen gesture recognition solutions.

[0027] 1. Capture gesture events, recognize gestures, and switch states directly at the system level. In full-screen mode, all states are controlled directly at the system level. The advantage of this solution is that it solves problems at the system level and has a priority advantage in event processing, that is, it handles events at the first time and avoids layer-by-layer transmission, which is the most efficient way. However, the disadvantages of this solution are also obvious. The interactivity with the various applications involved at the system level is very poor. Although the final state switching is implemented by the application side, the specific switching process is still controlled by the system level. The application side can only execute according to the control instructions at the system level. The system level cannot control the change state of the sub-interface in the interface in detail. The visual effect of the state switching process is relatively rough, resulting in some interactions and scene designs that optimize the user experience. It is not easy to implement and the cost of implementation is very high. The interaction between multiple interfaces and applications during the implementation process greatly increases the overhead, gradually turning the advantages of this implementation solution into disadvantages. In a highly competitive market environment, the ultimate goal of a function implementation is to provide a good user experience and a comfortable user usage scenario, so this solution has no competitiveness. In contrast, the second implementation solution is more competitive in the market.

[0028] Second, realize the capture of gesture events, recognition of gestures and state switching on the application side or application terminal. This solution has greater flexibility, and it is also more flexible in the visual effect design and scene design stages. However, the full-screen gesture recognition solution implemented on the application side also has the problem of disconnection. Although the visual effect interaction process is better, there are defects in the system switching, that is, in other applications that are separated from application management, once the application is in an inactive state, gesture events cannot be captured, and gesture recognition cannot be realized, resulting in gesture recognition failure.

[0029] See also Figure 1 An embodiment of the present invention provides a gesture recognition method, comprising:

[0030] Step 100, implemented at the system level: capturing gesture events to obtain parameter information of gesture events.

[0031] In the embodiment of the present invention, a high-level window (i.e., gesture recognition hotspot) is used at the top of the desktop to capture gesture events. This solution can recognize full-screen gestures of desktop applications and full-screen gestures of non-desktop applications, and will not fail to recognize full-screen gestures because the foreground application is a non-desktop application.

[0032] In the embodiment of the present invention, the gesture event may be a touch event or a non-touch event, which is not limited in the embodiment of the present invention.

[0033] In the embodiment of the present invention, parameter information of the gesture event is included in the MotionEvent object.

[0034] In the embodiment of the present invention, the parameter information of the gesture event includes all parameter information of the user operating the touch screen, including the position, the event, the event type, the finger information of the touch, etc. These parameters are important parameters for gesture recognition.

[0035] In one exemplary instance, the position refers to the positions of all touch points of a gesture event.

[0036] In one exemplary instance, the occurrence of an event refers to whether the event occurs:

[0037] In an exemplary instance, the event type refers to whether the event that occurs is a down event, a move event, or an up event.

[0038] In an exemplary embodiment, the finger information on which the touch occurs refers to the number of fingers on which the touch occurs, etc.

[0039] Step 101, implemented through desktop application: when it is determined according to the parameter information of the gesture event that the gesture event meets the full-screen gesture recognition requirement, the full-screen gesture is recognized according to the parameter information of the gesture event, and the state is switched according to the recognized full-screen gesture.

[0040] In the embodiment of the present invention, the full-screen gesture refers to an action originally defined by the system layer, mainly switching to a desktop application (Home), displaying a recently used application (Recent), and returning to a recently used application (Back).

[0041] In an exemplary embodiment, the full-screen gesture recognition requirements include: the finger information of the touch is 1, and the moving direction of the gesture event is a preset direction, such as up, down, left, right, etc.

[0042] In an embodiment of the present invention, identifying a full-screen gesture according to parameter information of a gesture event includes:

[0043] When it is detected that the gesture event needs to be consumed, and the gesture event includes a press event, a move event, and a lift event, determining the moving distance and / or moving speed of the lift event relative to the press event according to parameter information of the lift event;

[0044] The full-screen gesture is identified according to a moving distance and / or a moving speed of the lift event relative to the press event.

[0045] In an exemplary embodiment, detecting a gesture event requires consuming:

[0046] The current state is normal mode or non-editing mode, and the press event occurs in the gesture recognition hot zone.

[0047] In an exemplary embodiment, the gesture recognition hotspot refers to a predefined area, which may be any area on the screen.

[0048] In another embodiment of the present invention, when the foreground application is a non-desktop application when the gesture event is captured, and the gesture event is a press event, the method further includes: switching the current state to a state of entering a recent application.

[0049] In the embodiment of the present invention, identifying a full-screen gesture according to a moving distance and / or moving speed of a lift event relative to a press event includes at least one of the following:

[0050] When the moving distance is greater than a first preset distance threshold, determining that the gesture is a first gesture, such as a pull-up gesture;

[0051] When the moving distance is less than or equal to the first preset distance threshold, and the moving speed is greater than a preset speed threshold, determining that the gesture is a second gesture, such as a quick pull-up gesture;

[0052] When the moving speed is less than or equal to the preset speed threshold, the process is terminated or the relevant parameters of gesture recognition are reinitialized, such as the current state of the mobile terminal, the first preset distance threshold, the second preset distance threshold and the preset speed threshold.

[0053] The state switching according to the recognized gesture includes at least one of the following:

[0054] When the gesture is a first gesture, such as a pull-up gesture, it is determined that the current state needs to be switched to a state of entering a recent application, and an animation effect of switching from the current state to a state of entering a recent application is executed;

[0055] When the gesture is a second gesture, such as a quick pull-up gesture, it is determined that the current state needs to be switched to the desktop, an animation of switching from the current state to the desktop is executed, and the current page of the desktop is moved to a designated homepage.

[0056] In an exemplary embodiment, the first preset distance threshold is related to the display size of the current screen (ie, the number of pixels contained in each dp) and the display direction of the screen.

[0057] In an exemplary embodiment, it is necessary to record the position coordinates P of the pressing event. down .

[0058] In another embodiment of the present invention, after switching the state according to the recognized full-screen gesture, the method further includes: reinitializing relevant parameters of gesture recognition, such as the current state of the mobile terminal, the first preset distance threshold, the second preset distance threshold and the preset speed threshold.

[0059] In another embodiment of the present invention, the method further includes: synchronizing the current state.

[0060] In another embodiment of the present invention, when the gesture event includes only the press event and the move event, the identifying of the full-screen gesture according to the parameter information of the gesture event further includes:

[0061] When the moving distance of the last captured moving event relative to the pressing event is greater than the first preset distance threshold, determining the sum of the moving distances of the n moving events according to the parameter information of the last captured n moving events;

[0062] When the sum of the moving distances of the n moving events is less than a second preset distance threshold, determining that the gesture is a third gesture, such as a pause gesture;

[0063] The state switching according to the recognized gesture includes:

[0064] When the gesture is a third gesture, such as a pause gesture, it is determined that the current state needs to be switched to a state of entering a recent application, and an animation effect of switching from the current state to a state of entering a recent application is executed.

[0065] In another embodiment of the present invention, when the gesture event includes only the press event and the move event, the identifying of the full-screen gesture according to the parameter information of the gesture event further includes:

[0066] When the movement speed of the last captured movement event relative to the press event is greater than the preset speed threshold, determining that the full-screen gesture is a second gesture;

[0067] The state switching according to the recognized full-screen gesture includes:

[0068] When the full-screen gesture is the second gesture, it is determined that the current state needs to be switched to the desktop, an animation of switching from the current state to the desktop is executed, and the current page of the desktop is moved to a designated homepage.

[0069] In another embodiment of the present invention, after switching the state according to the recognized full-screen gesture, the method further includes: resetting all gesture recognition states.

[0070] In another embodiment of the present invention, before capturing the gesture event to obtain parameter information of the gesture event, the method further includes: initializing the entire system.

[0071] Specifically, initializing the entire system includes:

[0072] When the desktop application starts, get the current navigation bar type from the system;

[0073] When the current navigation bar type is a full-screen gesture type, initialize the following parameters: whether the current desktop is in the foreground (whether it is visible to the user), whether the system's event distribution pipeline is connected (connected in service mode, if not connected, a connection request is required), whether the internal event distribution module pipeline is initialized (if not, it needs to be created and initialization parameters are passed), the current state of the mobile terminal, the first preset distance threshold, the second preset distance threshold and the preset speed threshold.

[0074] The current state of the mobile terminal includes: the screen size of the mobile terminal, the current horizontal or vertical screen state of the mobile terminal, and the gesture recognition hot zone parameters of the mobile terminal.

[0075] The current horizontal or vertical screen state of the mobile terminal includes: horizontal screen state or vertical screen state;

[0076] The gesture recognition hotspot of a mobile terminal refers to a rectangular space defined in association with the size of the mobile terminal and the horizontal or vertical state of the screen.

[0077] In another embodiment of the present invention, the method further comprises:

[0078] Register a monitoring object, and monitor whether the navigation bar type switches through the monitoring object. When it is monitored that the navigation bar type switches, re-execute the step of obtaining the current navigation bar type from the system.

[0079] The embodiment of the present invention uniformly plans and designs user operations at the first starting point of user operations - desktop applications, and places the recognition and state switching of full-screen gestures on the application side. The visual effect design space of each page is larger, and more visual effects and interactive scenes that are more in line with user operations can be designed. It can also interact with the system level, and other visual effect resources can be controlled at the system level to be coordinated and consistent in full-screen gesture recognition and state switching to avoid disconnection.

[0080] In one illustrative example, Figure 2 As shown, the gesture recognition process includes:

[0081] Step 200: Capture a gesture event at the system level and generate a MotionEvent object, which includes parameter information of the gesture event.

[0082] In this step, the parameter information of the gesture event includes all parameter information of the user operating the touch screen, including the position, the event, the event type, the finger information of the touch, etc. These parameters are important parameters for gesture recognition.

[0083] In one exemplary instance, the position refers to the positions of all touch points of a gesture event.

[0084] In one exemplary instance, the occurrence of an event refers to whether the event occurs:

[0085] In an exemplary instance, the event type refers to whether the event that occurs is a down event, a move event, or an up event.

[0086] In an exemplary embodiment, the finger information on which the touch occurs refers to the number of fingers on which the touch occurs, etc.

[0087] Step 201: When the full-screen gesture recognition requirements are met, a gesture event consumer is selected according to the current operation scenario, and the MotionEvent object is forwarded to the selected gesture event consumer. Specifically, when the current operation scenario is that the foreground application is a desktop application, a desktop gesture consumer is selected, the MotionEvent object is forwarded to the desktop gesture consumer, and steps 202 and 204 are continued; when the current operation scenario is that the foreground application is a non-desktop application, a non-desktop gesture consumer is selected, the MotionEvent object is forwarded to the non-desktop gesture consumer, and steps 203 and 204 are continued.

[0088] In an exemplary embodiment, the operation scenario includes at least one of the following:

[0089] The desktop application recognizes full-screen gestures when it is in the foreground, that is, recognizes full-screen gestures on the desktop;

[0090] A non-desktop application recognizes full-screen gestures when it is in the foreground, that is, the user has opened the non-desktop application and the non-desktop application is in an activated state.

[0091] Step 202: The desktop gesture consumer recognizes and switches the state of the full-screen gesture.

[0092] Step 203: Recognize and switch the state of the full-screen gesture through the non-desktop gesture consumer.

[0093] Step 204: Perform state synchronization. Specifically, synchronize the switched state to the system and other applications.

[0094] In one illustrative example, Figure 3 As shown, the process of identifying and switching the full-screen gestures through the desktop gesture consumer includes:

[0095] Step 300: Monitor whether gesture events need to be consumed. Monitoring rules: the current state can execute full-screen gestures, that is, the desktop is in normal mode (or non-editing mode); whether the press event occurs in the gesture recognition hot zone.

[0096] In this step, the gesture recognition hot zone refers to a predefined area, which can be any area on the screen.

[0097] Step 301: When a gesture event is detected, the press (EVENT_DOWN), move and lift events in the gesture event need to be identified first, and the position coordinates P of the EVENT_DOWN event are recorded. down , initialize the first preset distance threshold, which is defined as T slide .

[0098] In this step, the first preset distance threshold is related to the current display size (ie, the number of pixels contained in each dp) and the current display direction of the screen.

[0099] Step 302: When the gesture event includes a press event, a move event, and a lift event, determine whether the moving distance of the lift event relative to the press event is greater than a first preset distance threshold. If the moving distance is greater than the first preset distance threshold, determine that the current state needs to be switched to the state of entering the most recent application S. recent , execute from the current state to S recent When the moving distance is less than or equal to the first preset distance threshold, continue to execute step 303.

[0100] Step 303: Determine whether the moving speed of the lift event relative to the press event is greater than a preset speed threshold. If the moving speed is greater than the preset speed threshold, it is determined that the current state needs to be switched to the desktop S. home , the execution switches from the current state to S home The animation effect is used to move the current page of the desktop to the homepage specified by the user; when the moving speed is less than or equal to the preset speed threshold, step 306 is executed.

[0101] Step 304 : When the gesture event only includes the press event and the move event, the user's action is still in progress, that is, the EVENT_UP event is not captured, that is, the user does not raise his hand at this time, and the subsequent events need to be recognized again. The specific recognition steps include step 305 .

[0102] Step 305: When the moving distance of the last moving event relative to the pressing event is greater than the first preset distance threshold, the above judgment condition cannot be used to process the event. In this case, it is necessary to retrieve the parameter information of the most recent n gesture events from the previously cached parameter information of the gesture events and monitor the sum of the moving distances D of the n gesture events. ad Is it less than the second preset distance threshold? When the sum of the moving distances of n gesture events D ad When the distance is less than the second preset distance threshold, it is determined that the current state needs to be switched to the state of entering the most recent application S recent, execute the animation of switching from the current state to the state of entering the most recent application, reset all gesture recognition states, and there is no need to continue waiting for the EVENT_UP event; when the sum of the moving distances of the n gesture events is greater than or equal to the second preset distance threshold, return to step 300 to continue execution.

[0103] When the moving distance of the last gesture event relative to the press event is less than or equal to the first preset distance threshold, or the moving speed of the last movement event relative to the press event is less than or equal to the preset speed threshold, return to step 300 to continue monitoring the movement (EVENT_MOVE) or EVENT_UP event.

[0104] When the movement speed of the last moving event relative to the pressing event is greater than the preset speed threshold, the mark bit is recorded and the event is consumed; when the mark bit is T, it is determined that the current state needs to be switched to the desktop S home , the execution switches from the current state to S home The animation will move the current page of the desktop to the homepage specified by the user.

[0105] Step 306: reset all gesture recognition states and wait for the next recognition.

[0106] In one illustrative example, Figure 4 As shown, the process of identifying and switching the full-screen gesture through the non-desktop gesture consumer includes:

[0107] Step 400: Monitor whether gesture events need to be consumed. Monitoring rules: the current state can execute full-screen gestures, that is, the desktop is in normal mode (or non-editing mode); whether the press event occurs in the gesture recognition hot zone; the foreground application is a non-desktop application.

[0108] In this step, the gesture recognition hot zone refers to a predefined area, which can be any area on the screen.

[0109] Step 401: When a gesture event is detected, the press (EVENT_DOWN), move and lift events in the gesture event need to be identified first, and the position coordinates P of the EVENT_DOWN event are recorded. down , initialize the first preset distance threshold, which is defined as T slide .

[0110] In this step, the first preset distance threshold is related to the current display size (ie, the number of pixels contained in each dp) and the current display direction of the screen.

[0111] Step 402: When a press event is received, the current state is switched to the state S of the most recent application. recent .

[0112] Step 403: When the gesture event includes a press event, a move event, and a lift event, determine whether the moving distance of the lift event relative to the press event is greater than a first preset distance threshold. If the moving distance is greater than the first preset distance threshold, determine that the current state needs to be switched to the state of entering the most recent application S. recent , execute from the current state to S recent When the moving distance is less than or equal to the first preset distance threshold, continue to execute step 404.

[0113] Step 404: Determine whether the moving speed of the lift event relative to the press event is greater than a preset speed threshold. If the moving speed is greater than the preset speed threshold, determine that the current state needs to be switched to the desktop S. home , the execution switches from the current state to S home The animation effect is used to move the current page of the desktop to the homepage specified by the user; when the moving speed is less than or equal to the preset speed threshold, step 407 is executed.

[0114] Step 405: When the gesture event only includes the press event and the move event, the user's action is still in progress, that is, the EVENT_UP event is not captured, that is, the user does not raise his hand at this time, and the subsequent events need to be recognized again. The specific recognition steps include step 406.

[0115] Step 406: When the moving distance of the last moving event relative to the pressing event is greater than the first preset distance threshold, the above judgment condition cannot be used to process the event. In this case, it is necessary to retrieve the parameter information of the most recent n gesture events from the previously cached parameter information of the gesture events and monitor the sum of the moving distances D of the n gesture events. ad Is it less than the second preset distance threshold? When the sum of the moving distances of n gesture events D ad When the distance is less than the second preset distance threshold, it is determined that the current state needs to be switched to the state of entering the most recent application S recent , execute the animation of switching from the current state to the state of entering the most recent application, reset all gesture recognition states, and there is no need to continue waiting for the EVENT_UP event; when the sum of the moving distances of the n gesture events is greater than or equal to the second preset distance threshold, return to step 400 to continue execution.

[0116] When the moving distance of the last gesture event relative to the press event is less than or equal to the first preset distance threshold, or the moving speed of the last move event relative to the press event is less than or equal to the preset speed threshold, return to step 400 to continue monitoring the move (EVENT_MOVE) or EVENT_UP event.

[0117] When the movement speed of the last moving event relative to the pressing event is greater than the preset speed threshold, the mark bit is recorded and the event is consumed; when the mark bit is T, it is determined that the current state needs to be switched to the desktop S home , the execution switches from the current state to S home The animation will move the current page of the desktop to the homepage specified by the user.

[0118] Step 407: reset all gesture recognition states and wait for the next recognition.

[0119] Another embodiment of the present invention provides a gesture recognition device, including a processor and a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed by the processor, any of the above gesture recognition methods is implemented.

[0120] Another embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of any of the above-mentioned gesture recognition methods are implemented.

[0121] See also Figure 5 Another embodiment of the present invention provides a gesture recognition device, comprising:

[0122] The event capture module 501 is used to achieve, at the system level: capturing gesture events to obtain parameter information of gesture events;

[0123] The gesture recognition module 502 is used to implement, through a desktop application: when it is determined according to the parameter information of the gesture event that the gesture event meets the full-screen gesture recognition requirement, recognize the full-screen gesture according to the parameter information of the gesture event;

[0124] The state switching module 503 is used to implement, through a desktop application, state switching according to a recognized full-screen gesture.

[0125] In the embodiment of the present invention, a high-level window (i.e., gesture recognition hotspot) is used at the top of the desktop to capture gesture events. This solution can recognize full-screen gestures of desktop applications and full-screen gestures of non-desktop applications, and will not fail to recognize full-screen gestures because the foreground application is a non-desktop application.

[0126] In the embodiment of the present invention, the gesture event may be a touch event or a non-touch event, which is not limited in the embodiment of the present invention.

[0127] In the embodiment of the present invention, parameter information of the gesture event is included in the MotionEvent object.

[0128] In the embodiment of the present invention, the parameter information of the gesture event includes all parameter information of the user operating the touch screen, including the position, the event, the event type, the finger information of the touch, etc. These parameters are important parameters for gesture recognition.

[0129] In one exemplary instance, the position refers to the positions of all touch points of a gesture event.

[0130] In one exemplary instance, the occurrence of an event refers to whether the event occurs:

[0131] In an exemplary instance, the event type refers to whether the event that occurs is a down event, a move event, or an up event.

[0132] In an exemplary embodiment, the finger information on which the touch occurs refers to the number of fingers on which the touch occurs, etc.

[0133] In the embodiment of the present invention, the full-screen gesture refers to an action originally defined by the system layer, mainly switching to a desktop application (Home), displaying a recently used application (Recent), and returning to a recently used application (Back).

[0134] In an exemplary embodiment, the full-screen gesture recognition requirements include: the finger information of the touch is 1, and the moving direction of the gesture event is a preset direction, such as up, down, left, right, etc.

[0135] In the embodiment of the present invention, the gesture recognition module 502 is specifically used to realize the recognition of the full-screen gesture according to the parameter information of the gesture event in the following manner:

[0136] When it is detected that the gesture event needs to be consumed, and the gesture event includes a press event, a move event, and a lift event, determining the moving distance and / or moving speed of the lift event relative to the press event according to parameter information of the lift event;

[0137] The full-screen gesture is identified according to a moving distance and / or a moving speed of the lift event relative to the press event.

[0138] In an exemplary embodiment, the gesture recognition module 502 is specifically configured to implement the consumption required to detect a gesture event in the following manner:

[0139] The current state is normal mode or non-editing mode, and the press event occurs in the gesture recognition hot zone.

[0140] In an exemplary embodiment, the gesture recognition hotspot refers to a predefined area, which may be any area on the screen.

[0141] In another embodiment of the present invention, the state switching module 503 is further used for: when the foreground application is a non-desktop application when the gesture event is captured, and when the gesture event is a press event, switching the current state to a state of entering a recent application.

[0142] In the embodiment of the present invention, the gesture recognition module 502 is specifically configured to recognize a full-screen gesture according to a moving distance and / or moving speed of a lift event relative to a press event in at least one of the following ways:

[0143] When the moving distance is greater than a first preset distance threshold, determining that the gesture is a first gesture, such as a pull-up gesture;

[0144] When the moving distance is less than or equal to the first preset distance threshold, and the moving speed is greater than a preset speed threshold, determining that the gesture is a second gesture, such as a quick pull-up gesture;

[0145] When the moving speed is less than or equal to the preset speed threshold, the process is terminated or the relevant parameters of gesture recognition are reinitialized, such as the current state of the mobile terminal, the first preset distance threshold, the second preset distance threshold and the preset speed threshold.

[0146] The state switching module 503 is specifically configured to implement the state switching according to the recognized full-screen gesture by adopting at least one of the following methods:

[0147] When the gesture is a first gesture, such as a pull-up gesture, it is determined that the current state needs to be switched to a state of entering a recent application, and an animation effect of switching from the current state to a state of entering a recent application is executed;

[0148] When the gesture is a second gesture, such as a quick pull-up gesture, it is determined that the current state needs to be switched to the desktop, an animation of switching from the current state to the desktop is executed, and the current page of the desktop is moved to a designated homepage.

[0149] In an exemplary embodiment, the first preset distance threshold is related to the display size of the current screen (ie, the number of pixels contained in each dp) and the display direction of the screen.

[0150] In an exemplary embodiment, it is necessary to record the position coordinates P of the pressing event. down .

[0151] In another embodiment of the present invention, the initialization module 504 is also used to: after state switching according to the recognized full-screen gesture, reinitialize relevant parameters of gesture recognition, such as the current state of the mobile terminal, the first preset distance threshold, the second preset distance threshold and the preset speed threshold.

[0152] In another embodiment of the present invention, the state switching module 503 is further used to: synchronize the current state.

[0153] In another embodiment of the present invention, the gesture recognition module 502 is further used for:

[0154] When the gesture event includes only the press event and the move event, when the moving distance of the last captured move event relative to the press event is greater than the first preset distance threshold, determining the sum of the moving distances of the n move events according to the parameter information of the last captured n move events;

[0155] When the sum of the moving distances of the n moving events is less than a second preset distance threshold, determining that the gesture is a third gesture, such as a pause gesture;

[0156] The state switching module 503 is also used for:

[0157] When the gesture is a third gesture, such as a pause gesture, it is determined that the current state needs to be switched to a state of entering a recent application, and an animation effect of switching from the current state to a state of entering a recent application is executed.

[0158] In another embodiment of the present invention, the gesture recognition module 502 is further used for:

[0159] When the gesture event includes only the press event and the move event, when the moving speed of the last captured move event relative to the press event is greater than the preset speed threshold, determining that the full-screen gesture is the second gesture;

[0160] The state switching according to the recognized full-screen gesture includes:

[0161] When the full-screen gesture is the second gesture, it is determined that the current state needs to be switched to the desktop, an animation of switching from the current state to the desktop is executed, and the current page of the desktop is moved to a designated homepage.

[0162] In another embodiment of the present invention, it further includes: an initialization module 504, which is used to initialize the entire system.

[0163] Specifically, the initialization module 504 is specifically used for:

[0164] When the desktop application starts, get the current navigation bar type from the system;

[0165] When the current navigation bar type is a full-screen gesture type, initialize the following parameters: whether the current desktop is in the foreground (whether it is visible to the user), whether the system's event distribution pipeline is connected (connected in service mode, if not connected, a connection request is required), whether the internal event distribution module pipeline is initialized (if not, it needs to be created and initialization parameters are passed), the current state of the mobile terminal, the first preset distance threshold, the second preset distance threshold and the preset speed threshold.

[0166] The current state of the mobile terminal includes: the screen size of the mobile terminal, the current horizontal or vertical screen state of the mobile terminal, and the gesture recognition hot zone parameters of the mobile terminal.

[0167] The current horizontal or vertical screen state of the mobile terminal includes: horizontal screen state or vertical screen state;

[0168] The gesture recognition hotspot of a mobile terminal refers to a rectangular space defined in association with the size of the mobile terminal and the horizontal or vertical state of the screen.

[0169] In another embodiment of the present invention, the initialization module 504 is further used to:

[0170] Register a monitoring object, and monitor whether the navigation bar type switches through the monitoring object. When it is monitored that the navigation bar type switches, re-execute the step of obtaining the current navigation bar type from the system.

[0171] The embodiment of the present invention uniformly plans and designs user operations at the first starting point of user operations - desktop applications, and places the recognition and state switching of full-screen gestures on the application side. The visual effect design space of each page is larger, and more visual effects and interactive scenes that are more in line with user operations can be designed. It can also interact with the system level, and other visual effect resources can be controlled at the system level to be coordinated and consistent in full-screen gesture recognition and state switching to avoid disconnection.

[0172] In one illustrative example, Figure 6 As shown, the gesture recognition device further includes an event distribution module 505, which is used to identify the current operation scenario and distribute the parameter information of the gesture event to the gesture recognition submodule 601 of the desktop application or the gesture recognition submodule 602 of the non-desktop application according to the current operation scenario;

[0173] Specifically, when the current operation scenario is that a full-screen gesture is recognized when a desktop application is in the foreground, the parameter information of the gesture event is distributed to the gesture recognition submodule 601 of the desktop application; when the current operation scenario is that a full-screen gesture is recognized when a non-desktop application is in the foreground, the parameter information of the gesture event is distributed to the gesture recognition submodule 602 of the non-desktop application;

[0174] The gesture recognition module 502 includes a gesture recognition submodule 601 for desktop applications and a gesture recognition submodule 602 for non-desktop applications;

[0175] The desktop application gesture recognition submodule 601 is used to recognize full-screen gestures for gesture events captured when the desktop application is in the foreground;

[0176] The gesture recognition submodule 602 of the non-desktop application is used to recognize the full-screen gestures for the gesture events captured when the non-desktop application is in the foreground;

[0177] The state switching module 503 includes a state control submodule 603 and a motion effect control submodule 604;

[0178] The state control submodule 603 is used to switch states and synchronize states according to the gesture recognition results of the gesture recognition submodule 601 of the desktop application or the gesture recognition submodule 602 of the non-desktop application;

[0179] The motion effect control submodule 604 is used to control the motion effect during the state switching process.

[0180] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0181] Although the implementation methods disclosed in the embodiments of the present invention are as above, the contents described are only implementation methods adopted to facilitate understanding of the embodiments of the present invention, and are not intended to limit the embodiments of the present invention. Any technician in the field to which the embodiments of the present invention belong may make any modifications and changes in the form and details of implementation without departing from the spirit and scope disclosed in the embodiments of the present invention, but the scope of patent protection of the embodiments of the present invention shall still be subject to the scope defined in the attached claims.

Claims

1. A gesture recognition method, comprising: Implemented at the system level: Gesture events are captured at the top layer of the desktop through a high-level window, namely, a gesture recognition hotspot, to obtain parameter information of gesture events. The gesture recognition hotspot is used to recognize full-screen gestures of desktop applications and full-screen gestures of non-desktop applications; Implemented through desktop application: when it is determined that the gesture event meets the full-screen gesture recognition requirement according to the parameter information of the gesture event, the full-screen gesture is recognized according to the parameter information of the gesture event, and the state is switched according to the recognized full-screen gesture; The step of identifying a full-screen gesture according to parameter information of a gesture event includes: When it is detected that the gesture event needs to be consumed, and the gesture event includes a press event, a move event, and a lift event, determining a moving distance and / or a moving speed of the lift event relative to the press event according to parameter information of the lift event; identifying the full-screen gesture according to the moving distance and / or the moving speed of the lift event relative to the press event; The monitoring of the gesture event requires the consumption of: The current state is in normal mode or non-editing mode, and the press event occurs in the gesture recognition hot zone; The identifying of the full-screen gesture according to the moving distance and / or moving speed of the lift event relative to the press event includes at least one of the following: When the moving distance is greater than a first preset distance threshold, determining that the full-screen gesture is a first gesture; When the moving distance is less than or equal to the first preset distance threshold, and the moving speed is greater than a preset speed threshold, determining that the full-screen gesture is a second gesture; The state switching according to the recognized full-screen gesture includes at least one of the following: When the full-screen gesture is the first gesture, determining that the current state needs to be switched to a state of entering recent applications, and executing an animation effect of switching from the current state to a state of entering recent applications; When the full-screen gesture is the second gesture, it is determined that the current state needs to be switched to the desktop, an animation of switching from the current state to the desktop is executed, and the current page of the desktop is moved to a designated homepage.

2. The method according to claim 1, characterized in that Before capturing the gesture event to obtain parameter information of the gesture event, the method further includes: initializing the entire system.

3. The method according to claim 2, characterized in that in, The initialization setting of the entire system includes: When the desktop application starts, get the current navigation bar type from the system; When the current navigation bar type is a full-screen gesture type, the following parameters are initialized: whether the current desktop is in the foreground, whether the system event distribution pipeline is connected, whether the module pipeline of the internal event distribution is initialized, the current state of the mobile terminal, the first preset distance threshold, the second preset distance threshold and the preset speed threshold; The current state of the mobile terminal includes: the screen size of the mobile terminal, the current horizontal or vertical screen state of the mobile terminal, and the gesture recognition hot zone parameters of the mobile terminal.

4. The method according to claim 3, characterized in that The method further includes: Register a monitoring object, and monitor whether the navigation bar type switches through the monitoring object. When it is monitored that the navigation bar type switches, re-execute the step of obtaining the current navigation bar type from the system.

5. The method according to claim 1, characterized in that: When the foreground application is a non-desktop application when the gesture event is captured, and the gesture event is a press event, the method further includes: Switch the current state to the state of entering the recent application.

6. The method according to claim 1, characterized in that When the gesture event includes only the press event and the move event, the identifying of the full-screen gesture according to the parameter information of the gesture event further includes: When the moving distance of the last captured moving event relative to the pressing event is greater than the first preset distance threshold, determining the sum of the moving distances of the n moving events according to the parameter information of the last captured n moving events; When the sum of the moving distances of the n moving events is less than a second preset distance threshold, determining that the full-screen gesture is a third gesture; The state switching according to the recognized gesture includes: When the full-screen gesture is the third gesture, it is determined that the current state needs to be switched to a state of entering recent applications, and an animation effect of switching from the current state to a state of entering recent applications is executed.

7. The method according to claim 1, characterized in that When the gesture event includes only the press event and the move event, the identifying of the full-screen gesture according to the parameter information of the gesture event further includes: When the movement speed of the last captured movement event relative to the press event is greater than the preset speed threshold, determining that the full-screen gesture is a second gesture; The state switching according to the recognized full-screen gesture includes: When the full-screen gesture is the second gesture, it is determined that the current state needs to be switched to the desktop, an animation of switching from the current state to the desktop is executed, and the current page of the desktop is moved to a designated homepage.

8. A gesture recognition device, comprising: An event capture module is used to achieve at the system level: capturing gesture events through a high-level window, namely, a gesture recognition hotspot, at the top layer of the desktop to obtain parameter information of gesture events, wherein the gesture recognition hotspot is used to recognize full-screen gestures of desktop applications and full-screen gestures of non-desktop applications; A gesture recognition module, used to implement, through a desktop application: when it is determined according to the parameter information of the gesture event that the gesture event meets the full-screen gesture recognition requirement, recognition of the full-screen gesture according to the parameter information of the gesture event; The state switching module is used to implement, through the desktop application: state switching according to the recognized full-screen gesture; Wherein, the gesture recognition module is also used for: When the current state is in normal mode or non-editing mode, and a press event occurs in a gesture recognition hot zone, and the gesture event includes a press event, a move event, and a lift event, determining a moving distance and / or a moving speed of the lift event relative to the press event according to parameter information of the lift event; and recognizing the full-screen gesture according to the moving distance and / or the moving speed of the lift event relative to the press event; The gesture recognition module is further configured to perform at least one of the following: When the moving distance is greater than a first preset distance threshold, determining that the full-screen gesture is a first gesture; When the moving distance is less than or equal to the first preset distance threshold, and the moving speed is greater than a preset speed threshold, determining that the full-screen gesture is a second gesture; The state switching module is further configured to perform at least one of the following: When the full-screen gesture is the first gesture, determining that the current state needs to be switched to a state of entering recent applications, and executing an animation effect of switching from the current state to a state of entering recent applications; When the full-screen gesture is the second gesture, it is determined that the current state needs to be switched to the desktop, an animation of switching from the current state to the desktop is executed, and the current page of the desktop is moved to a designated homepage.

9. A gesture recognition device, comprising a processor and a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, characterized in that: When the instruction is executed by the processor, the gesture recognition method as described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the gesture recognition method according to any one of claims 1 to 7 are implemented.