WO2020177585A1 - 一种手势处理方法及设备 - Google Patents

一种手势处理方法及设备 Download PDF

Info

Publication number
WO2020177585A1
WO2020177585A1 PCT/CN2020/076699 CN2020076699W WO2020177585A1 WO 2020177585 A1 WO2020177585 A1 WO 2020177585A1 CN 2020076699 W CN2020076699 W CN 2020076699W WO 2020177585 A1 WO2020177585 A1 WO 2020177585A1
Authority
WO
WIPO (PCT)
Prior art keywords
gesture
electronic device
hand
application
air
Prior art date
Application number
PCT/CN2020/076699
Other languages
English (en)
French (fr)
Inventor
胡靓
徐杰
崔晓颖
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP20766233.9A priority Critical patent/EP3910449A4/en
Priority to JP2021551816A priority patent/JP7391102B2/ja
Priority to KR1020217027292A priority patent/KR20210118168A/ko
Priority to US17/435,477 priority patent/US20220137713A1/en
Publication of WO2020177585A1 publication Critical patent/WO2020177585A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/017Gesture based interaction, e.g. based on a set of recognized hand gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/0304Detection arrangements using opto-electronic means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0483Interaction with page-structured environments, e.g. book metaphor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0485Scrolling or panning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path

Definitions

  • the embodiments of the present application relate to the field of electronic technology, and in particular to a gesture processing method and device.
  • the system application of the electronic device itself supports the user's air gesture
  • the third-party application generally needs to be adapted in advance with the air gesture.
  • a third-party application needs to define the correspondence between air gestures and application controls or instructions in the code in advance, so that the electronic device responds through the corresponding application controls or instructions after the air gesture is detected.
  • the embodiments of the present application provide a gesture processing method and device, which can generate a corresponding universal input event according to an air gesture.
  • the universal input event is an input event corresponding to a user's contact operation on an electronic device, thereby enabling system applications and third parties All applications can respond to the universal input event, that is, they can all respond to the air gesture, which can increase the range of use of the air gesture and save the adaptation work of third-party applications.
  • an embodiment of the present application provides an electronic device, including: one or more processors; one or more memories; one or more multimedia applications (that is, one or more multimedia applications), and the multimedia applications include audio Application or video application; one or more computer programs; a display screen for the display interface; and detection components.
  • the detection component includes any one or a combination of any of the following: a camera, an infrared sensor arranged under the display screen, an ultrasonic sensor arranged under the display screen, or an electromagnetic induction device arranged under the display screen. The detecting component is used to detect the air gesture made by the user when not touching the electronic device.
  • One or more computer programs are stored in the memory, and the one or more computer programs include instructions.
  • the electronic device When the instruction is executed by the processor, the electronic device is caused to perform the following steps: after the multimedia application is started, the first interface of the multimedia application is displayed, and the first interface corresponds to the first multimedia file. If the detection component detects an air gesture, it executes a response operation according to the air gesture.
  • the response operation includes at least one of the following: playing the first multimedia file, pausing the playing of the first multimedia file, adjusting the playback progress of the first multimedia file, adjusting the playback volume, adjusting the display brightness, or setting the first multimedia file
  • the media file is switched to another multimedia file.
  • the multimedia application can be a system application in an electronic device, or a third-party application.
  • the user can make the system multimedia application and the third-party multimedia application in the electronic device perform playback control-related operations through the air gesture without touching the electronic device, thereby improving the user experience.
  • the air gesture is waving the hand or moving the hand in parallel.
  • Response operations include: fast forward the first multimedia file, rewind the first multimedia file, increase the playback volume, decrease the playback volume, increase the display brightness, decrease the display brightness, or switch the first multimedia file For another multimedia file.
  • the user can make the multimedia application in the electronic device perform playback control-related operations by waving the hand or moving the hand in parallel.
  • the multimedia application is the first video player.
  • Performing a response operation according to the air gesture including: performing a response operation according to the air gesture and the location where the air gesture occurs.
  • the response operation is to increase the playback volume; if the air gesture is located close to the electronic device On the left side, the response operation is to increase the display brightness.
  • the response operation is to reduce the playback volume; if the air gesture occurs near the electronic device On the left side, the response operation is to reduce the display brightness.
  • the response operation is to fast forward the first multimedia file.
  • the response operation is to rewind the first multimedia file.
  • the user can make the video player in the electronic device perform playback control-related operations through factors such as the direction of the hand waving or translation, and the location where the hand waving or translation occurs.
  • the multimedia application is an audio player.
  • the response operation is to fast forward the first multimedia file.
  • the response operation is to rewind the first multimedia file.
  • the user can make the audio player in the electronic device perform playback control-related operations through the air gesture of waving or panning the hand.
  • the multimedia application is a second video player.
  • the response operation is to switch the first multimedia file to the second multimedia file.
  • the response operation is to switch the first multimedia file to the third multimedia file.
  • the user can make the video player in the electronic device perform playback control-related operations through the air gesture of waving or panning the hand.
  • the multimedia application is a gallery.
  • the response operation is to switch the first multimedia file to the second multimedia file.
  • the response operation is to switch the first multimedia file to the third multimedia file.
  • the user can switch the displayed pictures in the gallery in the electronic device by waving or panning the hand in the air gesture.
  • the air gesture is to approach the palm of the electronic device, and the response operation includes: playing the first multimedia file, pausing the first multimedia file, or switching the first multimedia file For another multimedia file.
  • approaching the palm of the hand in the direction of the electronic device can also be called slap in the direction of the electronic device.
  • the user can make the multimedia application in the electronic device perform playback control-related operations through an air gesture of approaching the palm of the electronic device.
  • the multimedia application is a first video player
  • the first interface includes a playback control control and a switching control.
  • Performing the response operation according to the air gesture includes: performing the response operation according to the air gesture, the location where the air gesture occurs, and the current state of the first video player.
  • the response operation is to stop playing the first multimedia file.
  • the response operation is to play the first multimedia file.
  • the response operation is to switch the first multimedia file to another multimedia file.
  • the electronic device can perform different response operations in combination with the gap gesture made by the user, the location where the gap gesture occurs, and the current playback state of the video player.
  • the embodiments of the present application provide an electronic device, including: one or more processors; one or more memories; one or more applications (ie, one or more application programs); one or more computers A program; a display screen for a display interface; and a detection component, which is used to detect an air gesture made by the user when not touching the electronic device.
  • the detection component includes any one or a combination of any of the following: a camera, an infrared sensor arranged under the display screen, an ultrasonic sensor arranged under the display screen, or an electromagnetic induction device arranged under the display screen.
  • one or more computer programs are stored in the memory, and the one or more computer programs include instructions.
  • the electronic device When the instruction is executed by the processor, the electronic device is caused to perform the following steps: after starting the application, display the first interface of the application; if the detection component detects the air gesture, it executes a response operation according to the air gesture.
  • the response operation includes at least one of the following: scrolling the page, or switching the first interface to another interface.
  • the application can be a system application in an electronic device or a third-party application.
  • the user can make the system application and the third-party application in the electronic device perform operations of scrolling the page and switching the display interface through the air gesture without touching the electronic device, thereby improving the user experience.
  • the response operation when the air gesture is to move the hand parallel upward or wave the hand upward, the response operation is to scroll the page upward.
  • the response operation is to scroll down the page.
  • the user can make the electronic device perform the operation of scrolling the page through the air gesture of panning or waving the hand.
  • the response operation when the air gesture is to move the hand parallel to the right or wave the hand to the right, the response operation is to switch the first interface to the second interface.
  • the response operation is to switch the first interface to the third interface.
  • the first interface corresponds to the first function of the application
  • the second interface corresponds to the second function of the application
  • the third interface corresponds to the third function of the application.
  • the application is a reader
  • the first interface, the second interface, and the third interface are three pages displayed by the reader.
  • the user can make applications such as WeChat switch to display pages corresponding to different functions by panning or waving the hand, or make applications such as readers to turn pages.
  • the electronic device when the instruction is executed by the processor, the electronic device is also caused to perform the following steps: after the detection component detects the space gesture, display an operation mark corresponding to the space gesture.
  • the operation mark can be used to simulate the actual touch operation of the user on the touch screen corresponding to the air gesture, so as to give the user an intuitive visual experience.
  • performing a response operation based on the air gesture includes: generating a general input event according to the air gesture, and the general input event is an input event that both system applications and third-party applications can respond to. Perform response operations based on general input events.
  • the electronic device can generate a universal input event that can be responded to by both the system application and the third-party application according to the user’s gesture in the air. Therefore, both the system application and the third-party application on the electronic device can respond to the universal input event. It can respond to the user's air gestures, making the use of air gestures larger.
  • generating the universal input event according to the air gesture includes: determining the gesture type of the air gesture according to a preset first correspondence.
  • the first correspondence is the correspondence between the gesture information of the air gesture and the gesture type.
  • the gesture information includes any one or a combination of any of the following: the posture, shape, moving distance, moving direction, moving speed, moving track, or the correspondence between position and time of the air gesture.
  • the gesture type is reported to the application framework layer of the electronic device.
  • the application framework layer determines the universal input event according to the preset second correspondence, and reports the universal input event to the application layer to generate the universal input event.
  • the second correspondence is the correspondence between the gesture type and the universal input event.
  • the foreground system application or the foreground third-party application in the application layer executes operations in response to the universal input event.
  • the application framework layer and the application layer inside the electronic device can generate corresponding general input events according to the air gesture, so as to respond.
  • the electronic device when the instruction is executed by the processor, the electronic device is also caused to perform the following steps: if it is determined according to the first correspondence that there is no gesture type corresponding to the air gesture, the air gesture is an invalid gesture , According to the current application and/or user habits, determine the effective reference air gesture. Prompt the user to refer to the air gesture.
  • the electronic device when the electronic device finds that the user's gesture is invalid, it can determine the effective air gestures that the user may use, frequently use, and the current application can respond to as a reference air gesture based on the current application and/or user habits. Prompt to the user so that the user can make the correct air gesture according to the prompt.
  • the electronic device when the instruction is executed by the processor, the electronic device is also caused to perform the following steps: if it is determined according to the first correspondence that there is no gesture type corresponding to the air gesture, the air gesture is an invalid gesture , According to the current application and/or user habits, determine the effective reference air gesture. Determine the reference universal input event corresponding to the reference air gesture; determine the first operation according to the reference universal input event and the current application; prompt the user whether to perform the first operation; perform the first operation after detecting the user's instruction to perform the first operation .
  • the electronic device can guess the user's intention according to the current application and/or usage habits, that is, guess the first operation that the user may want the electronic device to perform. In this way, the electronic device can directly perform the first operation desired by the user without requiring the user to make a corresponding air gesture again.
  • the universal input event when the air gesture is waving a hand or moving a hand in parallel, the universal input event is a sliding event; when the air gesture is approaching the palm of the electronic device, the universal input event is a click event.
  • the electronic device can generate a sliding event according to the air gesture of waving or panning the hand; according to the air gesture of approaching the palm of the electronic device, it can generate a click event.
  • the electronic device when the instruction is executed by the processor, the electronic device is also caused to perform the following steps: after the general input event is generated, the operation mark corresponding to the general input event is displayed.
  • the operation mark can be used to simulate the user's actual touch operation on the touch screen corresponding to the universal input event, and give the user an intuitive visual experience.
  • the operation mark is static mark, or dynamic mark.
  • the dynamic mark can be a procedural illustration.
  • the static mark may be an arrow, or a solid dot, etc.
  • the dynamic mark may be a moving arrow, or an illustration of the hand moving along with the arrow.
  • the universal input event may also include a long press event or a drag event; the click event includes a single click event or a double tap event.
  • the universal input event may be an input event that can be generated when the user actually touches the touch screen of the electronic device.
  • the universal input event is represented by at least one down event, at least one up event, and/or at least one move event.
  • general input events can be described by down events, up events, move events or a combination of these events.
  • an embodiment of the present application provides a gesture processing method, including: an electronic device detects an air gesture; the electronic device generates a general input event according to the air gesture; the electronic device responds to a general input through a system application or a third-party application event.
  • the electronic device can generate a universal input event that can be responded to by the system application and third-party applications based on the air gesture, so that any application on the electronic device can respond to the universal input event, that is, can respond to the user’s isolation. Empty gestures, thereby improving the scope of use of space gestures and the user experience.
  • the electronic device determining the universal input event according to the air gesture includes: the electronic device generates the universal input event according to the gesture information of the air gesture.
  • the electronic device can generate corresponding general input events based on gesture information such as the posture, shape, moving distance, moving direction, moving speed, moving track, or the corresponding relationship between position and time of the air gesture, instead of The gesture information first determines the gesture type, and then determines the corresponding general input event according to the gesture type.
  • gesture information such as the posture, shape, moving distance, moving direction, moving speed, moving track, or the corresponding relationship between position and time of the air gesture, instead of
  • the gesture information first determines the gesture type, and then determines the corresponding general input event according to the gesture type.
  • the electronic device detects the space gesture after detecting that the user triggers the space gesture.
  • the electronic device detects the user's hand it is determined that the user has triggered the air gesture.
  • the electronic device detecting the air gesture includes: the electronic device collects data information of the air gesture through the detection component.
  • the data information of the air gesture is collected, and a series of operations such as determining the gesture information, determining the gesture type, and generating general input events are performed; instead of continuously performing this series of operations in real time, Therefore, related resources of electronic equipment can be saved.
  • the electronic device detecting the space gesture includes: the electronic device detects the space gesture after turning on the space gesture detection function.
  • the electronic device detects the space gesture after the space gesture is turned on, on the one hand, it can save related detection resources of the electronic device, and on the other hand, it can also reduce the misoperation caused by the space gesture.
  • an embodiment of the present application provides a gesture processing device, which is included in an electronic device, and the device has a function of realizing the behavior of the electronic device in any of the foregoing aspects and possible implementation manners.
  • This function can be realized by hardware, or by hardware executing corresponding software.
  • the hardware or software includes at least one module or unit corresponding to the above-mentioned functions. For example, detection module or unit, generation module or unit, execution module or unit, etc.
  • an embodiment of the present application provides an electronic device, including at least one processor and at least one memory.
  • the at least one memory is coupled with at least one processor, and the at least one memory is used to store computer program code, and the computer program code includes computer instructions.
  • the at least one processor executes the computer instructions
  • the electronic device executes any possible implementation of the foregoing aspects. Gesture processing method in.
  • an embodiment of the present application provides a computer storage medium, including computer instructions, which when the computer instructions run on an electronic device, cause the electronic device to execute the gesture processing method in any one of the possible implementations of the foregoing aspects.
  • an embodiment of the present application provides a computer program product, which when the computer program product runs on a computer, causes the computer to execute the gesture processing method in any one of the possible implementations of the foregoing aspects.
  • FIG. 1 is a schematic diagram of the hardware structure of a mobile phone provided by an embodiment of the application
  • FIG. 2 is a schematic diagram of the software structure of a mobile phone provided by an embodiment of the application.
  • FIG. 3 is a flowchart of a set of gesture processing provided by an embodiment of the application.
  • FIG. 4 is a schematic diagram of a set of operation effects provided by an embodiment of the application.
  • 5A is a schematic diagram of a group of gestures provided by an embodiment of the application.
  • FIG. 5B is a schematic diagram of a group of gestures collected by a camera provided by an embodiment of the application.
  • FIG. 5C is a schematic diagram of a gesture provided by an embodiment of the application.
  • Figure 6 is a schematic diagram of a set of interfaces provided by an embodiment of the application.
  • FIG. 7 is a schematic diagram of an interface provided by an embodiment of the application.
  • FIG. 8 is a schematic diagram of another set of operation effects provided by an embodiment of the application.
  • FIG. 9 is a schematic diagram of another set of operation effects provided by an embodiment of the application.
  • FIG. 10 is a schematic diagram of another set of operation effects provided by an embodiment of this application.
  • FIG. 11 is a schematic diagram of another set of operation effects provided by an embodiment of the application.
  • FIG. 12 is a schematic diagram of another set of operation effects provided by an embodiment of this application.
  • FIG. 13 is a schematic diagram of another set of operation effects provided by an embodiment of the application.
  • FIG. 14 is a schematic diagram of an operation mark provided by an embodiment of this application.
  • 15 is a schematic diagram of a set of operation marks provided by an embodiment of the application.
  • FIG. 16 is a schematic diagram of another operation mark provided by an embodiment of this application.
  • FIG. 17 is a flowchart of a gesture processing method provided by an embodiment of the application.
  • A/B can mean A or B; in this application, “and/or "It's just an association relationship that describes the associated objects. It means that there can be three kinds of relationships.
  • a and/or B can mean: A alone exists, A and B exist at the same time, and B exists alone. , B can be singular or plural.
  • plural means two or more than two.
  • At least one of the following or similar expressions refers to any combination of these items, including any combination of single items or plural items.
  • at least one of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.
  • An air gesture refers to a gesture operation when the user's hand does not touch the electronic device, and the distance between the hand and the electronic device is greater than or equal to a preset distance threshold (for example, 1 cm).
  • Electronic equipment can use cameras, touch screens, electromagnetic induction devices (for example, can be set under the display of electronic equipment), infrared sensors (for example, can be set under the display of electronic equipment), ultrasonic sensors (for example, can be set on the display of electronic equipment) Below) and other detection components to collect information such as the shape of the user’s hand and movement to detect air gestures.
  • the air gesture may include, but is not limited to, a static gesture and a dynamic gesture.
  • the static gesture refers to the posture of the hand at a certain moment, such as bending and closing the fingers, such as OK gesture, V gesture, and five-finger stretched gestures.
  • Dynamic gestures refer to the movement of the hand over a period of time, including movement direction, speed, and hand posture changes, such as waving gestures, translation gestures, fist gestures, and pressing gestures.
  • the embodiment of the present application provides a gesture processing method, which can be applied to an electronic device, and can generate a corresponding universal input event according to an air gesture.
  • the universal input event is an input event corresponding to a user's contact operation on the electronic device, so that Both the system application and the third-party application can respond to the universal input event, that is, both can respond to the air gesture, which can increase the scope of use of the air gesture, eliminating the need for third-party application adaptation work; and, no third-party application is required
  • the adaptation is performed in advance with the air gesture, thus reducing the workload of adaptation.
  • the electronic device may be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR)/virtual reality (VR) device, a notebook computer, an ultra-mobile personal computer (ultra- For electronic devices such as mobile personal computer (UMPC), netbooks, and personal digital assistants (personal digital assistants, PDAs), the embodiments of this application do not impose any restrictions on the specific types of electronic devices.
  • AR augmented reality
  • VR virtual reality
  • a notebook computer a notebook computer
  • ultra-mobile personal computer ultra-mobile personal computer
  • UMPC mobile personal computer
  • netbooks netbooks
  • PDAs personal digital assistants
  • FIG. 1 shows a schematic structural diagram of the mobile phone 100.
  • the mobile phone 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone interface 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and user An identification module (subscriber identification module, SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the sensor module 180 may include pressure sensor 180A, gyroscope sensor 180B, air pressure sensor 180C, magnetic sensor 180D, acceleration sensor 180E, distance sensor 180F, proximity light sensor 180G, fingerprint sensor 180H, temperature sensor 180J, touch sensor 180K, ambient light Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the mobile phone 100.
  • the mobile phone 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the mobile phone 100 may also include an infrared sensor, an ultrasonic sensor, or an electromagnetic induction device, etc., which can be used to detect air gestures, and send the collected air gesture data information to the processor to obtain the air gesture gestures. information.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait.
  • AP application processor
  • modem processor modem processor
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the different processing units may be independent devices or integrated in one or more processors.
  • the controller may be the nerve center and command center of the mobile phone 100.
  • the controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 to store instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, and a universal asynchronous transmitter (universal asynchronous transmitter) interface.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB Universal Serial Bus
  • the I2C interface is a two-way synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may include multiple sets of I2C buses.
  • the processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc. through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the mobile phone 100.
  • the I2S interface can be used for audio communication.
  • the processor 110 may include multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to realize communication between the processor 110 and the audio module 170.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through an I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communication to sample, quantize and encode analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both I2S interface and PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with the display screen 194, the camera 193 and other peripheral devices.
  • the MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc.
  • the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the mobile phone 100.
  • the processor 110 and the display screen 194 communicate through a DSI interface to realize the display function of the mobile phone 100.
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and so on.
  • GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on.
  • the USB interface 130 can be used to connect a charger to charge the mobile phone 100, and can also be used to transfer data between the mobile phone 100 and peripheral devices. It can also be used to connect headphones and play audio through the headphones. This interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiment of the present application is merely a schematic description, and does not constitute a structural limitation of the mobile phone 100.
  • the mobile phone 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
  • the charging management module 140 may receive the wireless charging input through the wireless charging coil of the mobile phone 100. While the charging management module 140 charges the battery 142, it can also supply power to the mobile phone 100 through the power management module 141.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the mobile phone 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G and the like applied on the mobile phone 100.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • the mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic waves for radiation via the antenna 1.
  • At least part of the functional modules of the mobile communication module 150 may be provided in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is processed by the baseband processor and then passed to the application processor.
  • the application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194.
  • the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the mobile phone 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), and global navigation satellite systems. (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • frequency modulation frequency modulation, FM
  • NFC near field communication technology
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic wave radiation via the antenna 2.
  • the antenna 1 of the mobile phone 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the mobile phone 100 can communicate with the network and other devices through wireless communication technology.
  • Wireless communication technologies can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), and broadband code division. Multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM , And/or IR technology, etc.
  • GNSS can include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi-zenith) satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation systems
  • the mobile phone 100 implements a display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, connected to the display 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
  • the display screen 194 which can also be called a screen 194, can be used to display images, videos, and so on.
  • the display screen 194 includes a display panel.
  • the display panel can adopt liquid crystal display (LCD), organic light-emitting diode (OLED), active-matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • AMOLED flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc.
  • the mobile phone 100 may include one or N display screens 194, and N is a positive integer greater than one.
  • the mobile phone 100 can realize a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
  • the ISP is used to process the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, which is converted into an image visible to the naked eye.
  • ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats.
  • the mobile phone 100 may include one or N cameras 193, and N is a positive integer greater than one.
  • the camera may include one or more of RGB camera, infrared camera, depth camera, etc.
  • the camera may be used to detect the air gesture and send the collected data information of the air gesture to the processor to obtain the gesture information of the air gesture.
  • the data information may be the collected image information of the air gesture.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the mobile phone 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the mobile phone 100 may support one or more video codecs. In this way, the mobile phone 100 can play or record videos in a variety of encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
  • MPEG moving picture experts group
  • MPEG2 MPEG2, MPEG3, MPEG4, etc.
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • applications such as intelligent cognition of the mobile phone 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
  • the NPU or other processor may obtain gesture information according to the data information of the space gesture sent by a detection component such as a camera, and recognize the gesture type according to the gesture information.
  • the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 121 may be used to store computer executable program code, and the executable program code includes instructions.
  • the processor 110 executes various functional applications and data processing of the mobile phone 100 by running instructions stored in the internal memory 121.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, at least one application program (such as a sound playback function, an image playback function, etc.) required by at least one function.
  • the data storage area can store data (such as audio data, phone book, etc.) created during the use of the mobile phone 100.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.
  • UFS universal flash storage
  • the mobile phone 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
  • the speaker 170A also called a “speaker” is used to convert audio electrical signals into sound signals.
  • the mobile phone 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the mobile phone 100 answers a call or a voice message, it can receive the voice by bringing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can approach the microphone 170C through the mouth to make a sound, and input the sound signal to the microphone 170C.
  • the mobile phone 100 may be provided with at least one microphone 170C.
  • the mobile phone 100 may be provided with two microphones 170C, which can implement noise reduction functions in addition to collecting sound signals. In other embodiments, the mobile phone 100 may also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
  • the earphone interface 170D is used to connect wired earphones.
  • the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, and a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA, CTIA
  • the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the pressure sensor 180A may be provided on the display screen 194.
  • the capacitive pressure sensor may include at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
  • the mobile phone 100 determines the intensity of the pressure according to the change in capacitance.
  • the mobile phone 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the mobile phone 100 may also calculate the touched position based on the detection signal of the pressure sensor 180A.
  • touch operations that act on the same touch location but have different touch operation strengths may correspond to different operation instructions. For example: when a touch operation whose intensity of the touch operation is less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
  • the gyroscope sensor 180B can be used to determine the movement posture of the mobile phone 100.
  • the angular velocity of the mobile phone 100 around three axes ie, x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyroscope sensor 180B detects the shake angle of the mobile phone 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shake of the mobile phone 100 through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the mobile phone 100 in various directions (generally three axes). The magnitude and direction of gravity can be detected when the mobile phone 100 is stationary. It can also be used to recognize the posture of the mobile phone 100, applied to applications such as horizontal and vertical screen switching, and pedometer.
  • the mobile phone 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the mobile phone 100 may use the distance sensor 180F to measure the distance to achieve fast focusing.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the mobile phone 100 emits infrared light to the outside through the light emitting diode.
  • the mobile phone 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the mobile phone 100. When insufficient reflected light is detected, the mobile phone 100 can determine that there is no object near the mobile phone 100.
  • the mobile phone 100 may use the proximity light sensor 180G to detect that the user holds the mobile phone 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode, and the pocket mode will automatically unlock and lock the screen.
  • the ambient light sensor 180L is used to sense the brightness of the ambient light.
  • the mobile phone 100 can adaptively adjust the brightness of the display 194 according to the perceived brightness of the ambient light.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the mobile phone 100 is in the pocket to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the mobile phone 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, and so on.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”.
  • the touch sensor 180K is used to detect touch operations acting on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • the visual output related to the touch operation can be provided through the display screen 194.
  • the touch sensor 180K may also be disposed on the surface of the mobile phone 100, which is different from the position of the display screen 194.
  • the touch screen may be used to detect the air gesture and send the collected data information of the air gesture to the processor to obtain the gesture information of the air gesture.
  • the button 190 includes a power button, a volume button, and so on.
  • the button 190 may be a mechanical button. It can also be a touch button.
  • the mobile phone 100 can receive key input, and generate key signal input related to user settings and function control of the mobile phone 100.
  • the motor 191 can generate vibration prompts.
  • the motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback.
  • touch operations applied to different applications can correspond to different vibration feedback effects.
  • Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects.
  • Different application scenarios for example: time reminding, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
  • the SIM card interface 195 is used to connect to the SIM card.
  • the SIM card can be connected to and separated from the mobile phone 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195.
  • the mobile phone 100 may support 1 or N SIM card interfaces, and N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
  • the same SIM card interface 195 can insert multiple cards at the same time. The types of multiple cards can be the same or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 may also be compatible with external memory cards.
  • the mobile phone 100 interacts with the network through the SIM card to implement functions such as call and data communication.
  • the mobile phone 100 uses an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the mobile phone 100 and cannot be separated from the mobile phone 100.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Communication between layers through software interface.
  • the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
  • the application layer can include a series of application packages.
  • the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
  • the application framework layer provides application programming interfaces (application programming interface, API) and programming frameworks for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, and a notification manager.
  • the window manager is used to manage window programs.
  • the window manager can obtain the size of the display, determine whether there is a status bar, lock the screen, take a screenshot, etc.
  • the content provider is used to store and retrieve data and make these data accessible to applications.
  • Data can include videos, images, audios, calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls that display text and controls that display pictures.
  • the view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • a display interface that includes a short message notification icon may include a view that displays text and a view that displays pictures.
  • the phone manager is used to provide the communication function of the mobile phone 100. For example, the management of the call status (including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, etc.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and it can disappear automatically after a short stay without user interaction.
  • the notification manager is used to notify the download completion, message reminder, etc.
  • the notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
  • the status bar prompts text messages, sounds prompts, vibrates, flashes lights, etc.
  • Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android.
  • the application layer and the application framework layer run in a virtual machine.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), three-dimensional graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.
  • the surface manager is used to manage the display subsystem and provides a combination of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to realize 3D graphics drawing, image rendering, synthesis, and layer processing.
  • the 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
  • the universal input event generated by the electronic device according to the air gesture may be an input event corresponding to the user's contact operation on the electronic device.
  • the electronic device may be a device with a touch screen (such as a mobile phone or a tablet computer with a touch screen), and the universal input event generated by the electronic device according to the air gesture may be an input event corresponding to the user's touch operation on the touch screen; or,
  • the electronic device may be a device with buttons (for example, a mobile phone with an object button, a notebook computer, etc.), the universal input event generated by the electronic device according to the air gesture may be an input event corresponding to the user's operation on the button; or, the electronic The device can also be a device used in conjunction with a mouse.
  • the universal input event generated by the electronic device according to the air gesture can be an input event corresponding to the user's click, scroll, etc. on the mouse; or, the electronic device can also be a touch
  • the general input event generated by the electronic device according to the space gesture can be the input event corresponding to the user's touch operation on the touchpad, etc.
  • computing modules such as NPU or other processors can be based on the camera, touch screen, infrared sensor, and ultrasonic wave of the mobile phone 100.
  • Sensors, electromagnetic induction devices, or other detection components collect the data information of the air gesture to obtain the gesture information; and perform gesture recognition according to the gesture information to determine the gesture type.
  • the calculation module reports the gesture type to the application framework layer.
  • the application framework layer determines the general input event corresponding to the gesture type reported by the computing module according to the preset correspondence between the gesture type and the general input event, and reports the general input event to the application layer.
  • the application framework layer generates the universal input event.
  • the universal input event is universally defined by the operating system and can be generated when the user touches the mobile phone for operation.
  • Both system applications and third-party applications can directly respond to the input event.
  • Related applications (for example, foreground applications) in the application layer can respond to the universal input event and perform corresponding functions.
  • the related application can be a system application or a third-party application.
  • a computing module such as an NPU or other processor can obtain gesture information according to the data information of the air gesture collected by the detection component; and report the gesture information Give the application framework layer.
  • the application framework layer combines the preset mapping strategy to generate corresponding general input events according to the gesture information.
  • the general input events can be events described by the down event, up event, and/or move event commonly defined by the electronic device system, that is
  • the universal input event may be a down event, an up event, a move event, or a combination event of multiple events.
  • the application framework layer reports universal input events to the application layer.
  • System applications or third-party applications in the application layer can respond to the general input event described by the down event, up event, and/or move event to perform corresponding functions.
  • both the system application and the third-party application can respond to the universal input event generated according to the air gesture (also referred to as the universal input event of the air gesture mapping), that is, both the system application and the third-party application can respond to the air gesture. Therefore, the use range of the air gesture is larger, and the user experience of the air gesture is better; and there is no need for third-party applications to adapt to the air gesture in advance, which can save the adaptation work of the third party application.
  • the processing process of a user's touch operation (ie contact operation) on the touch screen may include: after the touch screen detects the user's touch operation, a corresponding hardware interrupt is sent to the kernel layer.
  • the kernel layer processes touch operations into general input events (including touch coordinates, time stamps of touch operations, etc.). General input events are stored in the kernel layer.
  • the application framework layer obtains general input events from the kernel layer and transmits them to related applications (for example, foreground applications), and the related applications respond to the general input events, thereby responding to the touch operation.
  • the mobile phone can generate general input events corresponding to the user's touch operation on the touch screen according to the air gesture operation, so both system applications and third-party applications It can respond to the universal input event, and thus can respond to the air gesture. It can also be understood that the mobile phone simulates the user's actual touch operation on the touch screen through air gestures, thereby generating a general input event corresponding to the actual touch operation, so that both system applications and third-party applications can respond to the general input event, thereby Can respond to the air gesture.
  • the electronic device is a mobile phone with a touch screen
  • the universal input event generated by the mobile phone according to the air gesture is an input event corresponding to the user's actual touch event as an example to illustrate the gesture processing method provided by the embodiment of the present application.
  • the mobile phone has the function of detecting air gestures. After the space gesture detection function is turned on, the mobile phone can detect the user's space gesture through detection components such as the camera, touch screen, infrared sensor, and ultrasonic sensor.
  • the mobile phone turns on the detection function of the air gesture by default, and the air gesture can be continuously detected in both the on-screen state and the black-screen state of the touch screen.
  • a low-power processor can be used on a mobile phone to support the use of a camera, touch screen, infrared sensor, ultrasonic sensor and other detection components to continuously detect whether an air gesture is triggered in a black screen state.
  • the low-power processor may be a sensor hub.
  • the mobile phone in the black screen state, defaults to turn off the detection function of the air gesture.
  • the mobile phone automatically turns on the air gesture detection function to avoid misoperations caused by detecting the air gesture when the touch screen is not unlocked .
  • the space gesture detection function is automatically turned on. Since the touch screen generally lights up after the user’s screen-on operation is detected, and in general, the user lights up the touch screen because he wants to use the phone or the user is paying attention to the phone. At this time, the phone can also detect the user’s initiative. Gestures, so as to directly operate the mobile phone through space gestures to reduce the user's operation to unlock the touch screen.
  • the mobile phone turns off the detection function of the air gesture by default, and only turns on the detection function of the air gesture after the user's opening instruction is detected.
  • the opening instruction may be a user's voice instruction, the user's operation of pressing a physical button on the mobile phone, the user's touch operation on the touch screen, or the user's operation of shaking the mobile phone.
  • the touch screen of the mobile phone does not display content, but the touch function of the touch screen is turned on.
  • the touch screen starts to display content, and the displayed content is the gesture of the user sliding on the touch screen Track.
  • the mobile phone detects the operation of the user drawing a circle track on the touch screen, it displays the track and turns on the detection function of the air gesture.
  • the mobile phone turns on the air gesture detection function when the screen is on by default, and turns off the air gesture detection function when the screen is black.
  • the mobile phone turns on the air gesture detection function only after detecting the user's turn-on instruction. If the mobile phone is in a black screen state, the user may not want to operate the mobile phone at present. After the mobile phone detects the user's turn-on instruction, the mobile phone turns on the air gesture detection function, which can avoid the misoperation caused by the air gesture and improve the accuracy of the operation.
  • the mobile phone turns on the air gesture detection function when the screen is on by default, and prompts the user whether to continue to open the air gesture detection function after turning to the black screen state; after detecting the user's opening instruction, continue Turn on the detection function of air gestures.
  • the mobile phone can detect the user's space gesture, collect the data information of the space gesture, obtain the gesture information according to the data information, and recognize the gesture type according to the gesture information, and generate universal input Event processing.
  • the mobile phone after the detection function of the air gesture is turned on, the mobile phone continuously collects data, and performs gesture type recognition based on the collected data, generates general input events and other processing, regardless of whether the user has performed the air gesture Gesture operation.
  • the mobile phone collects the user's space gesture data information , And perform gesture type recognition based on the data information, generate general input events and other processing. Before the mobile phone detects that the user triggers an air gesture, it does not perform processing such as gesture type recognition based on the collected data information, which can save the computing resources of the mobile phone. The following will take this scheme as an example.
  • the mobile phone can determine that the user has triggered the air gesture.
  • the mobile phone uses a neural network algorithm to recognize the image collected by the camera, and the neural network algorithm has been trained in advance.
  • the neural network inputs a large number of hand images and hand labels. After the image collected by the camera is input to the trained neural network, if the label output by the neural network is the label of the hand, the mobile phone determines that the user's hand is detected.
  • the neural network can also input a large number of images containing local palms (for example, images of one or more fingertips) during training, so that when the hand is close to the camera, only the partial palm can be captured. , The mobile phone can also accurately recognize the hand through the neural network.
  • a hand model is set on the mobile phone, and the mobile phone matches the image of the hand collected by the camera with the hand model. If the similarity is greater than or equal to 70%, then The phone is sure to detect a hand.
  • the infrared transmitter can emit infrared rays, and the infrared rays are reflected by the measured target.
  • the infrared radiation energy distribution pattern reflected by the measured target can be reflected on the photosensitive element of the infrared detector to obtain an infrared thermal image.
  • This thermal image corresponds to the heat distribution field on the surface of the object.
  • the heat distribution field of the surface of different measured targets is different.
  • the mobile phone may also be configured with a detection strategy, which may be used to reduce false detection events of air gestures. For example, in a detection strategy, when the hand does not touch the mobile phone, and the distance between the hand and the mobile phone is less than or equal to a preset value of 1 (for example, 20cm), the mobile phone can determine that the user has triggered an air gesture; When the distance between the mobile phones is greater than the preset value 1, the mobile phone can consider that the user has not triggered the air gesture.
  • a detection strategy when the hand does not touch the mobile phone, and the distance between the hand and the mobile phone is less than or equal to a preset value of 1 (for example, 20cm), the mobile phone can determine that the user has triggered an air gesture; When the distance between the mobile phones is greater than the preset value 1, the mobile phone can consider that the user has not triggered the air gesture.
  • the mobile phone when the hand does not touch the mobile phone, and the area of the hand detected by the mobile phone is greater than or equal to the preset value 2 (for example, 9 cm 2 ), the mobile phone can determine that the user has triggered the air gesture; When the detected hand area is less than the preset value 2, the mobile phone can consider that the user has not triggered the air gesture.
  • the preset value 2 for example, 9 cm 2
  • the distance between the hand and the mobile phone can be a certain part of the hand (such as the center of gravity of the hand, the tip of the index finger, the first part of the hand detected by the mobile phone, etc.) and a certain part on the mobile phone (such as the center position of the touch screen) It can also be the vertical distance between a certain part of the hand and the plane where the touch screen of the mobile phone is located; it can also be other distances, which are not limited in this embodiment of the application.
  • the mobile phone can collect the data information of the air gesture.
  • the data information of the air gesture is the data collected by the detection component during the operation of the air gesture.
  • the data information of the air gesture can be the image collected by the camera including the user's hand; when the detection component is an infrared sensor, the data information of the air gesture can be the infrared sensor detects the hand In the case of infrared emission data and reflection data.
  • the mobile phone can continuously collect data information of the air gesture after the air gesture is triggered and before the air gesture ends.
  • the mobile phone can determine the end of the air gesture in many ways. For example, in one embodiment, the mobile phone determines that the air gesture ends when the user's hand is no longer detected.
  • the mobile phone determines that the distance between the hand and the mobile phone is greater than or equal to a preset value of 3 (for example, 20 cm), it is determined that the airspace gesture ends. In another embodiment, the mobile phone determines that the air gesture ends after detecting the voice of "end air gesture" made by the user. In another embodiment, when the mobile phone detects the end gesture of the user, it determines that the airspace gesture ends. For example, the end gesture is a "V" gesture, and the air gesture is a gesture of waving up. After the user completes the air gesture of waving up, the user makes a "V" gesture, indicating that the air gesture is completed.
  • a preset value of 3 for example, 20 cm
  • the camera may capture an image at a slower frame rate (for example, 10 frames per second (fps)) to determine whether to trigger an air gesture according to whether a hand appears in the image.
  • a slower frame rate for example, 10 frames per second (fps)
  • the mobile phone confirmed that the air gesture was triggered after the hand appeared on the image captured by the camera.
  • the camera can shoot images at a faster frame rate (for example, 60 fps) to collect the data information of the user's air gesture.
  • the data information collected by the camera may be the hand shown in (a)-(d) in FIG. 5B A collection of images with dynamic changes in posture and movement.
  • the mobile phone determines that the air gesture is over, and can continue to capture the image at a slower frame rate to detect whether the air gesture is triggered again.
  • the mobile phone can obtain the gesture information of the air gesture according to the collected data information of the air gesture.
  • the gesture information is used to indicate the posture and movement of the air gesture.
  • the gesture information may include one or more of the posture, shape, movement distance, movement direction, movement speed, movement trajectory, and correspondence relationship between position and time of the hand.
  • the mobile phone can use a variety of methods to determine static features such as the posture and shape of the hand in the gesture information.
  • a neural network algorithm is used on mobile phones to determine static features such as hand posture and shape.
  • the neural network is pre-inputted with images of a variety of different postures and shapes and corresponding labels during training.
  • the trained neural network is used to process the images collected by the camera, static features such as different postures and shapes of the hand can be recognized.
  • the heat distribution field of the surface of the hand with static characteristics such as different postures and shapes is different.
  • the mobile phone can recognize the different postures, shapes and other static features of the hand based on the matching of the thermal image of the target under test with the thermal distribution field of the hand with preset static features such as different postures and shapes.
  • the gesture information obtained by the mobile phone may include: the shape of the hand is the side of the hand, the starting position of the movement is (x1, y1), and the ending position of the movement Is (x2,y2), the moving distance is 10cm, the moving direction is from bottom to top, and the moving track is (x1,y1), (x3,y3), (x4,y4),...,(x2,y2), ( The posture of the hand at x1, y1) is the lateral extension of the lateral hand, the posture of the hand at (x2, y2) is the tilt of the lateral hand, the posture of the hand at (x3, y3) is the lateral extension of the hand, and the moment Correspondence with location, etc.
  • the mobile phone can perform gesture recognition according to the gesture information, thereby obtaining the gesture type of the air gesture.
  • the gesture types of the air gesture may include, but are not limited to, the gesture types of static gestures and the gesture types of dynamic gestures.
  • the gesture type of the static gesture may include an OK gesture type, a V gesture type, or a five-finger spread gesture type.
  • the gesture types of dynamic gestures may include waving (for example, waving up, down, left, right, etc.), parallel movement, tapping, grasping, or letting go.
  • the mobile phone can determine the gesture type of the air gesture based on the gesture information such as the hand posture, shape, moving distance, moving direction, moving speed, moving track, and the correspondence between position and time. For example, after the mobile phone determines the static features such as the posture and shape of the hand, the gesture type of the static gesture can be determined according to the static features. For dynamic gestures, the mobile phone can determine the gesture type of dynamic gestures based on static features such as hand posture and shape at different moments, and/or movement conditions such as hand movement distance, movement direction, and movement speed.
  • the mobile phone can determine from the gesture information that the palm and wrist are initially placed horizontally, with the fingertip facing the right, and then the wrist is basically not moving, and the palm is rotated upward, thereby determining The corresponding gesture type is waving upwards.
  • the mobile phone determines that there is no gesture type that matches the gesture information, it is determined that no valid space gesture is recognized, so that the user can be prompted by voice, vibration, or display prompt information on the touch screen.
  • the empty gesture is invalid. It can also prompt the user whether he wants to perform a correct gesture in the air, or whether he wants the phone to perform a certain operation according to the user's habits learned and recorded before or the application currently being used.
  • the mobile phone may voice prompt the user "This gesture is invalid, please make the correct gesture.”
  • the mobile phone can display a prompt message 601 on the touch screen: "The current air gesture is invalid, do you want to wave up?" If the mobile phone detects the user's voice input "Yes” Instruct, the subsequent steps in the embodiment of the present application are executed according to the gesture of waving up.
  • the mobile phone can display a prompt message 602 on the touch screen: "The current air gesture is invalid, do you want to slide up the page?" If the mobile phone detects the user's voice input "Yes” Instruct or detect that the user clicks on the control 603, then slide the page upward.
  • the mobile phone may display text information 604 and/or graphic information 605 of the space gesture that the user may want to use on the touch screen.
  • the mobile phone may be displayed on the touch screen, and the text information and/or graphic information of the air gesture corresponding to the universal input event that the current application interface can respond to.
  • the mobile phone may display on the touch screen the text information and/or graphic information of the effective space gesture similar to the current invalid space gesture.
  • the mobile phone may display on the touch screen, the text information and/or graphic information of one or more effective space gestures that the user has used most frequently.
  • the mobile phone After the mobile phone determines the gesture type, it can generate corresponding general input events according to the gesture type.
  • This universal input event is universally defined by the system and simulates an input event that is generated when a user touches the touch screen of a mobile phone, and both system applications and third-party applications can directly respond to input events.
  • the mobile phone has a preset corresponding relationship between the gesture type and the universal input event, and the mobile phone can determine the universal input event corresponding to the gesture type according to the corresponding relationship, thereby generating the universal input event.
  • the application framework layer of the mobile phone may determine the universal input event corresponding to the gesture type according to the corresponding relationship, and report the universal input event to the application layer, thereby generating the universal input event.
  • swipe gesture types correspond to sliding events: the upward gesture type shown in FIG. 5A corresponds to an upward sliding event, and the left gesture type corresponds to a left sliding event. , The gesture type swiping in a certain direction corresponds to the sliding event in that direction.
  • the gesture type of tapping corresponds to the tap event: the gesture type of tapping once corresponds to the click event, and the gesture type of tapping twice within the preset time corresponds to the double tap event.
  • the gesture type of rapid tapping corresponds to a pressure pressing event (that is, an event where the pressing force is greater than or equal to a preset threshold).
  • the OK gesture type corresponds to a click event.
  • System applications and third-party applications can directly respond to general input events such as sliding up events, sliding left events, or click events, that is, they can respond to air gestures.
  • the universal input event corresponding to the gesture type preset on the mobile phone can be described by a down event, an up event, and/or a move event.
  • the mobile phone can preset the correspondence between general input events and down events, up events, and/or move events.
  • Sliding events can be described by down events, move events and up events
  • click events can be described by down events and up events.
  • the up-slip event can be described as: sequentially receiving down events, then receiving a series of move events, and finally receiving up events, where the movement direction described by the move event is upward movement.
  • the corresponding relationship between the gesture type of the static gesture and the general input event, and the corresponding relationship between the gesture type of the dynamic gesture and the general input event may be stored on the mobile phone.
  • the user can also indicate (for example, through voice instructions) whether the air gesture is a static gesture or a dynamic gesture; when the mobile phone detects that the user indicates that the air gesture is a static gesture, it is determined according to the correspondence between the gesture type of the static gesture and the general input event Corresponding universal input event; when the mobile phone detects that the user indicates that the air gesture is a dynamic gesture, the mobile phone determines the corresponding universal input event according to the corresponding relationship between the gesture type of the dynamic gesture and the universal input event, thereby improving the air gesture and passing The matching accuracy and matching efficiency of the input event.
  • the mobile phone can generate a general input event described by a down event, an up event, and/or a move event according to the gesture type.
  • the mobile phone can preset the corresponding relationship between the gesture type and the down event, up event, and/or move event, and the gesture type of waving can correspond to the general input event described by the combination of down event, move event and up event.
  • the gesture type of can correspond to the general input event described by the combination of down event and up event;
  • the OK gesture type can correspond to the general input event described by the combination of down event and up event.
  • System applications and third-party applications can directly respond to general input events described by down events, up events, and/or move events, that is, they can respond to air gestures.
  • the application framework layer of the mobile phone can determine the universal input event described by the down event, up event, and/or move event according to the gesture type, and report the universal input event to the application layer to generate the universal input event. Enter the event.
  • the mobile phone can generate a multi-touch event described by down event, up event, and/or move event according to three-finger press down, that is, That is, different locations receive multiple down events at the same time, and then the different locations receive up events.
  • the mobile phone may generate a multi-point sliding event described by a down event, an up event, and/or a move event (ie, a general input event).
  • a move event ie, a general input event.
  • the mobile phone may generate a pinch event (ie, a universal input event) described by a down event, an up event, and/or a move event.
  • the mobile phone may generate an expansion event (ie, a universal input event) described by a down event, an up event, and/or a move event.
  • an expansion event ie, a universal input event
  • the air gesture can also include other gesture types, and the mobile phone can also generate other gesture types corresponding to the down event, up event, and/ Or move event to describe the general input event.
  • gesture types may also include a large swipe up, a quick swipe up, and so on.
  • the gesture type is a large swipe up
  • the mobile phone can correspondingly generate a long-distance up-slide event (that is, a general input event) described by a down event, an up event, and/or a move event.
  • the gesture type is a quick upward swipe
  • the mobile phone can correspondingly generate a quick upward sliding event (ie, a general input event) described by a down event, an up event, and/or a move event.
  • the mobile phone can directly respond to the long-distance up-slip event described by the down event, up event, and/or move event, fast up-slip event, etc., that is, it can respond to air gestures.
  • the hand offset and the moving distance in the move event may have a preset Proportional relationship.
  • the preset value 4 for example, 15cm
  • the air gesture is a large upward swing gesture
  • the preset value Value 5 for example, 3cm
  • the general input event described by the move event is a long-distance upslide event.
  • the air gesture is a fast upward wave gesture; the move event corresponding to the air gesture is greater than the preset value Value 7 (for example, 5cm/s), the general input event described by the move event is a fast sliding event.
  • the universal input event generated by the mobile phone according to the gesture type is an input event generated when the user actually touches and operates the mobile phone, it can also be said that the mobile phone simulates the air gesture as the user's actual touch operation, thereby generating The general input event corresponding to the user’s actual touch operation.
  • the mobile phone After the mobile phone generates a universal input event, it can respond to the universal input event through a related application.
  • the related application may be a foreground application or an application related to the foreground application, for example, other applications after jumping from the current application.
  • the related application can respond to the pass input event according to a preset strategy.
  • the mobile phone in the scenario shown in FIG. 5A where the user browses a webpage through a browser and waves his hand upwards, the mobile phone generates an upward sliding event according to the gesture type of the upward waving.
  • the browser application responds to the upward sliding event , You can scroll up the page, the length of the scrolled page is 1/3 of the height of the touch screen.
  • browser applications can also scroll up the page.
  • the scrolled page length can be 2/3 of the height of the touch screen and 1 times the height of the touch screen, respectively.
  • the mobile phone In the scene shown in FIG. 5C where the user browses a webpage through a browser and moves his hand upwards in parallel, the mobile phone generates an upward sliding event according to the gesture type of the upward translation. As shown in Figure 7, the browser scrolls up the page in response to the sliding event.
  • the mobile phone in a scenario where a user browses a webpage through a browser, if the air gesture is a downward wave or parallel movement of the hand, the mobile phone generates a downward sliding event according to the gesture type of the downward wave or downward translation.
  • the browser application can scroll down the page in response to the down event.
  • the air gesture is the user's palm pressing toward the mobile phone (or the palm approaches the mobile phone, and the palm slaps toward the mobile phone) once.
  • the universal input event is a click event.
  • a control at a preset position (for example, the previous control on the leftmost side on the touch screen) can respond to the click event.
  • a preset control for example, the pause control 801 can respond to the click event; the schematic diagram after the pause can be seen in FIG. 8(b).
  • the mobile phone can also respond to general input events in conjunction with the location where the air gesture occurs. For example, when the location of the air gesture is close to the pause control, the pause control responds to the click event; When the air gesture is close to the previous control, the previous control responds to the click event; when the air gesture is close to the next control, the next control responds to the click event.
  • the pause control on the application interface of the mobile phone that is closest to the projection of the center of gravity of the hand on the touch screen can respond to the click event.
  • the mobile phone can also respond to the click event in combination with the current state of the application running in the foreground.
  • the current interface of a music player includes playback control controls. If it is currently in the music playback state, when the playback control control responds to a click event, the phone will pause playing music; if it is currently not playing music, it will be the playback control control. In response to a click event, the phone plays music.
  • the general input event is a right slide Event
  • the music player responds to the right sliding event to fast forward the current music playback progress
  • the general input event is a left sliding event
  • the music player rewinds the current music playback progress.
  • scenarios in which the mobile phone generates and responds to universal input events according to air gestures are not limited to the browser scenarios and music playback scenarios listed above, and may also be other multiple use scenarios.
  • the mobile phone If the mobile phone detects the air gesture of the user waving down (or moving the hand parallel downward), it can determine that the gesture type is downward waving (or downward translation), so that a corresponding sliding event can be generated. In response to the decline event, Douyin played another short video.
  • the mobile phone If the mobile phone detects an air gesture of the user waving to the right (or moving the hand parallel to the right), it can determine that the gesture type is waving to the right (or panning to the right), thereby generating a corresponding sliding right event.
  • the reader turns the page forward in response to the right sliding event.
  • the mobile phone can determine that the gesture type is waving to the left (or panning to the left) ) To generate the corresponding left sliding event.
  • WeChat displays the interface corresponding to the "discovery" function.
  • WeChat can also scroll the page in response to an upward or downward event.
  • the mobile phone detects the air gesture of the user waving to the right, it determines that the gesture type is a right swipe and generates a corresponding right swipe event; the gallery responds to the right swipe event and displays the previous picture. If the mobile phone detects the air gesture of the user waving to the left, it determines that the gesture type is swiping to the left and generates a corresponding left swipe event; the gallery responds to the left swipe event and displays the next picture.
  • the mobile phone can adjust the playback progress of the video, play the video, pause the playback, and switch another video according to air gestures.
  • the universal input event is an upslide event. If the air gesture occurs near the right side of the phone, the Youtube player will respond Turn up the volume in the up-slide event; if the air gesture is close to the left side of the phone, the Youtube player will increase the display brightness in response to the up-slide event. Similarly, the Youtube player can also lower the volume and lower the display brightness according to the user's air gesture.
  • the mobile phone displays the interface 1 of the desktop
  • the mobile phone detects the user's gesture of waving to the left (or moving the hand parallel to the left)
  • the mobile phone responds to the left sliding event and displays the interface 2 of the desktop.
  • the mobile phone detects the air gesture of the user waving the hand to the right (or moving the hand parallel to the right), it can determine that the gesture type is swiping to the right (or panning to the right), thereby generating the corresponding sliding right event; the mobile phone responds to the sliding right Event, display the interface of the desktop 3.
  • the mobile phone when the mobile phone displays any interface, if the mobile phone detects the air gesture of the user making a fist, the mobile phone can determine that the gesture type is grabbing, thereby generating a corresponding double-tap screen capture event. In response to the double-tap screen capture event, the mobile phone captures the current interface to form a picture.
  • the mobile phone may also display operation marks on the touch screen to simulate the actual touch operation of the user on the touch screen corresponding to an air gesture or to simulate a general input event, giving the user an intuitive visual experience .
  • the operation flag can also be used to remind the user of universal input events that the mobile phone will respond to. Then, the mobile phone can respond to the universal input event through related applications.
  • the operation mark may be a static mark; it may also be a dynamic mark, and the dynamic mark may be a procedural illustration.
  • the mobile phone is preset with the correspondence between general input events and operation marks.
  • the mobile phone can display the operation marks on the touch screen according to the general input events corresponding to the gesture types to simulate the user corresponding to the general input events on the touch screen.
  • the actual touch operation on the screen prompts the user of the universal input event that the phone will respond to.
  • the mobile phone after the mobile phone detects the air gesture shown in FIG. 5A, it determines that the upward swipe gesture type corresponds to the upward sliding event, and the mobile phone may display the operation mark 1401 shown in FIG. 14, that is, display an upward arrow on the touch screen , To simulate the operation of the user sliding up on the touch screen, prompting the user to respond to the sliding event. Then, in response to the upward sliding operation, the mobile phone can scroll the page, thereby displaying the interface shown in FIG. 7.
  • the mobile phone can display the shape 1501 of the hand moving from bottom to top on the touch screen, and the trajectory of the hand movement is correspondingly displayed with an upward arrow 1502 to simulate The operation of the user sliding up on the touch screen. Then, in response to the upward sliding operation, the mobile phone can scroll the page, thereby displaying the interface shown in FIG. 7.
  • the mobile phone after the mobile phone detects the space gesture of the user pressing the palm of the hand once in the direction of the mobile phone as shown in Figure 10 (a), it can determine that the gesture type of tapping once corresponds to the click event, and displays as shown in Figure 16.
  • the circular mark 1601 shown is to simulate the user's click operation on the touch screen, and prompt the user that the mobile phone will respond to the click event. Then, in response to the click operation, the mobile phone pauses playing the current short video, thereby displaying the interface shown in (b) in FIG. 10.
  • the corresponding relationship between gesture types and operation marks is preset on the mobile phone, and the mobile phone can display the operation marks on the touch screen according to the gesture type to simulate the user's actual touch operation on the touch screen corresponding to the general input event. Prompt the user of the universal input event that the phone will respond to.
  • the mobile phone After the mobile phone recognizes the upward swing gesture, it can display the operation marks as shown in FIG. 14 and FIG. 15 or other operation marks on the touch screen.
  • the mobile phone can display operation marks on the touch screen according to the down event, up event, and/or move event in the general input event to simulate the actual touch operation of the user on the touch screen corresponding to the general input event. Prompt the user of the universal input event that the phone will respond to. For example, corresponding to the down event in the general input event, the shape of the hand is displayed on the touch screen; corresponding to the move event, the hand on the touch screen moves and displays the movement track with a direction arrow; corresponding to the up event, the touch screen stops displaying the hand The shape and trajectory of movement.
  • the mobile phone may also generate a general input event combined with a down event, an up event, and/or a move event according to the gesture information.
  • System applications and third-party applications can directly respond to down events, up events, and/or move events, that is, they can directly respond to general input events combined with down events, up events, and/or move events, so as to respond to air gestures.
  • a preset mapping strategy may be set on the mobile phone to determine the mapping relationship between the gesture information and the down event, up event, and/or move event. For example, in a mapping strategy, according to the gesture information, the time when the mobile phone detects the hand corresponds to the time when the down event occurs, and the preset position of the hand (such as the center of gravity of the hand, the tip of the index finger, or the first part of the hand detected by the mobile phone) Etc.) The projection position on the touch screen (for example (x0, y0) on the touch screen) corresponds to the location where the down event occurs.
  • the hand movement process corresponds to the move event occurrence process (that is, a series of move events are received), and the distance of the hand movement and the movement distance in the move event have a preset proportional relationship. Then, the time when the mobile phone no longer detects the preset part of the hand corresponds to the time when the up event occurs, and the final projection position of the preset part on the touch screen (for example, (x1, y1) on the touch screen) corresponds to the time when the up event occurs.
  • These down events, up events, and/or move events mapped by the gesture information are combined into a universal input event.
  • These universal input events may be the universal input events described in the above embodiments, for example, a click event, an up-slide event, a pinch event, a multi-touch event, a fast up-slide event, etc.
  • the above embodiments are mainly based on the electronic device being a mobile phone.
  • the mobile phone generates universal input events based on air gestures. Both system applications and third-party applications can directly respond.
  • the user takes the input event corresponding to the touch event of the touch screen as an example. .
  • the universal input event may also be other input events.
  • the universal input event generated by the mobile phone according to the air gesture can be directly responded to by the system application and the third-party application.
  • the user presses the physical button (such as the power button) on the mobile phone and corresponds to the input event.
  • an infrared sensor is arranged around the power button, and when the infrared sensor is arranged around the power button to detect an air gesture of tapping the hand to the side of the mobile phone (ie approaching the mobile phone side), a universal input event of pressing the power button is generated .
  • the above embodiments are mainly described by taking the electronic device as a mobile phone as an example.
  • the general input event generated by the electronic device according to the air gesture can also be other types of contacts of the user on the electronic device.
  • the input event corresponding to the operation (for example, the touch operation of the button, the touch panel, the mouse, etc.) is not repeated in the embodiment of the present application.
  • Another embodiment of the present application also provides a gesture processing method, which can be applied to an electronic device, and the electronic device is provided with a display screen and a detection component, the display screen can be used for a display interface, and the detection component can be used for detecting a screen. Empty gesture.
  • the detection component may include any one or a combination of any of the following: a camera, an infrared sensor arranged below the display screen, an ultrasonic sensor arranged below the display screen, or an electromagnetic induction device arranged below the display screen.
  • the method may include:
  • the electronic device starts the multimedia application.
  • the multimedia application may be an audio application (for example, a music player), a video player (for example, a video player such as Douyin), or a gallery.
  • an audio application for example, a music player
  • a video player for example, a video player such as Douyin
  • a gallery for example, a gallery.
  • the electronic device displays a first interface of the multimedia application, and the first interface corresponds to the first multimedia file.
  • the electronic device If the electronic device detects an air gesture, it performs a response operation according to the air gesture.
  • the response operation may include at least one of the following: playing the first multimedia file, pausing the playing of the first multimedia file, adjusting the playing progress of the first multimedia file, adjusting the playing volume, adjusting the display brightness, or changing the first multimedia file Switching a multimedia file to another multimedia file, etc. That is, the electronic device can perform the response operation through the multimedia application.
  • the multimedia application may be a system application or a third-party application.
  • the user can control the system multimedia application or the third-party multimedia application in the electronic device to perform corresponding playback control operations through the air gesture, thereby improving the user experience.
  • An embodiment of the present application provides an electronic device, including: a detection unit for detecting an air gesture, and a processing unit for performing a response operation according to the air gesture.
  • the processing unit may be specifically configured to generate a general input event according to the air gesture and respond to the general input event.
  • the detection unit and the processing unit may also be used to execute other steps in the foregoing embodiment, so as to implement the gesture processing method in the foregoing embodiment.
  • An embodiment of the present application provides an electronic device, including: one or more processors; one or more memories; one or more applications; one or more computer programs; a display screen for displaying an application interface; and Detection components, which include any one or a combination of any of the following: a camera, an infrared sensor arranged under the display screen, an ultrasonic sensor arranged under the display screen, or an electromagnetic induction device arranged under the display screen; detection components It is used to detect the space gesture made by the user when not touching the electronic device; wherein, one or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instruction is executed by the processor, the electronic device can execute the steps in the foregoing embodiment.
  • the electronic device when the instruction is executed by the processor, the electronic device can be made to execute: after the multimedia application is started, the first interface of the multimedia application is displayed, and the first interface corresponds to the first multimedia file; if the detection component detects a partition Null gestures perform response operations based on the empty gestures.
  • the response operation may include at least one of the following: playing the first multimedia file, pausing the playing of the first multimedia file, adjusting the playing progress of the first multimedia file, adjusting the playing volume, adjusting the display brightness, or changing the first multimedia file Switching a multimedia file to another multimedia file, etc.
  • the electronic device when the instruction is executed by the processor, the electronic device may be executed: after the application is started, the first interface of the application is displayed. If the detection component detects an air gesture, it executes a response operation according to the air gesture.
  • the response operation may include at least one of the following: scrolling the page, or switching the first interface to another interface, and so on.
  • the processor in the electronic device may be the processor 110 in FIG. 1
  • the memory may be the internal memory 121 in FIG. 1
  • the display screen may be the processor 110 in FIG.
  • the camera in the detection component may be the camera 193 in FIG. 1
  • the infrared sensor, ultrasonic sensor, or electromagnetic induction device in the detection component may be the sensor module 180 in FIG.
  • the embodiments of the present application also provide a computer storage medium, the computer storage medium stores computer instructions, when the computer instructions run on the electronic device, the electronic device executes the above-mentioned related method steps to implement the gesture processing method in the above-mentioned embodiment .
  • the embodiments of the present application also provide a computer program product.
  • the computer program product runs on a computer, the computer can execute the above-mentioned related steps to realize the gesture processing method in the above-mentioned embodiment.
  • the embodiments of the present application also provide a device.
  • the device may specifically be a chip, component or module.
  • the device may include a connected processor and a memory; wherein the memory is used to store computer execution instructions.
  • the processor can execute the computer-executable instructions stored in the memory, so that the chip executes the gesture processing method in the foregoing method embodiments.
  • the electronic devices, computer storage media, computer program products, or chips provided in the embodiments of this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the corresponding methods provided above. The beneficial effects of the method are not repeated here.
  • the disclosed device and method may be implemented in other ways.
  • the device embodiments described above are only illustrative, for example, the division of modules or units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another device, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separate, and the components displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed to multiple different places. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • each unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium.
  • the technical solutions of the embodiments of the present application are essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of software products, which are stored in a storage medium.
  • a device which may be a single-chip microcomputer, a chip, etc.
  • a processor processor
  • the aforementioned storage medium includes: U disk, mobile hard disk, read only memory (read only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请实施例提供一种手势处理方法及设备,涉及电子技术领域,能够根据隔空手势生成***应用和第三方应用均能够响应的通用输入事件,提高隔空手势的使用范围,省去第三方应用的适配工作。具体方案为:电子设备检测到隔空手势后,根据隔空手势生成通用输入事件,该通用输入事件为***应用和第三方应用均能够响应的输入事件,电子设备通过相关应用响应该通用输入事件,从而响应该隔空手势。本申请实施例用于手势处理。

Description

一种手势处理方法及设备
本申请要求在2019年3月1日提交中国国家知识产权局、申请号为201910157644.4、发明名称为“一种手势处理方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及电子技术领域,尤其涉及一种手势处理方法及设备。
背景技术
随着电子设备的智能化发展,用户与手机等电子设备的交互方式也越来越多。隔空手势就是近年来兴起的一种交互形式。
通常,电子设备本身的***应用支持用户的隔空手势,第三方应用则一般需要与隔空手势预先进行适配。例如,第三方应用需要在代码中事先定义隔空手势与应用控件或指令等的对应关系,从而在电子设备检测到隔空手势后通过对应的应用控件或指令进行响应。
目前,用户在电子设备上使用的第三方应用的种类和数量都越来越多,若每个第三方应用都分别与隔空手势进行适配,则适配的工作量较大;若不进行适配,则用户无法通过隔空手势操作第三方应用,从而限制了隔空手势的使用范围,影响了隔空手势的用户体验。
发明内容
本申请实施例提供一种手势处理方法及设备,能够根据隔空手势生成对应的通用输入事件,该通用输入事件为用户在电子设备上的接触操作对应的输入事件,从而使得***应用和第三方应用均能够响应该通用输入事件,即均能够响应该隔空手势,因而可以提高隔空手势的使用范围,省去第三方应用的适配工作。
为达到上述目的,本申请实施例采用如下技术方案:
一方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器;一个或多个存储器;一个或多个多媒体应用(即一个或多个多媒体应用程序),多媒体应用包括音频应用或视频应用;一个或多个计算机程序;显示屏,用于显示界面;以及检测部件。其中,检测部件包括以下任意一项或任意多项的组合:摄像头,设置于显示屏下方的红外传感器,设置于显示屏下方的超声波传感器,或设置于显示屏下方的电磁感应器件。检测部件用于检测用户在未接触电子设备时作出的隔空手势。一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令。当指令被处理器执行时,使得电子设备执行以下步骤:在启动多媒体应用后,显示多媒体应用的第一界面,第一界面与第一多媒体文件对应。若检测部件检测到隔空手势,则根据隔空手势,执行响应操作。其中,响应操作包括以下至少一个:播放第一多媒体文件,暂停播放第一多媒体文件,调节第一多媒体文件的播放进度,调节播放音量,调节显示亮度,或将第一多媒体文件切换为另一多媒体文件。
其中,该多媒体应用可以是电子设备中的***应用,也可以是第三方应用。
这样,用户可以在不接触电子设备的情况下,通过隔空手势使得电子设备中的***多媒体应用和第三方多媒体应用执行播放控制相关的操作,从而可以提高用户的使用体验。
在一种可能的实现中,隔空手势为挥动手或平行移动手。响应操作包括:快进第一多媒体文件,后退第一多媒体文件,调大播放音量,调小播放音量,调大显示亮度,调小显示亮 度,或将第一多媒体文件切换为另一多媒体文件。
也就是说,用户可以通过挥动手或平行移动手的隔空手势,使得电子设备中的多媒体应用执行播放控制相关的操作。
在另一种可能的设计中,多媒体应用为第一视频播放器。根据隔空手势,执行响应操作,包括:根据隔空手势和隔空手势的发生位置,执行响应操作。其中,当隔空手势为向上平行移动手或向上挥动手时,若隔空手势的发生位置靠近电子设备的右侧,则响应操作为调大播放音量;若隔空手势的发生位置靠近电子设备的左侧,则响应操作为调大显示亮度。当隔空手势为向下平行移动手或向下挥动手时,若隔空手势的发生位置靠近电子设备的右侧,则响应操作为调小播放音量;若隔空手势的发生位置靠近电子设备的左侧,则响应操作为调小显示亮度。当隔空手势为向右平行移动手或向右挥动手时,响应操作为快进第一多媒体文件。当隔空手势为向左平行移动手或向左挥动手时,响应操作为后退第一多媒体文件。
也就是说,用户可以通过手挥动或平移的方向,手挥动或平移的发生位置等因素,使得电子设备中的视频播放器执行播放控制相关的操作。
在另一种可能的设计中,多媒体应用为音频播放器。当隔空手势为向右平行移动手或向右挥动手时,响应操作为快进第一多媒体文件。当隔空手势为向左平行移动手或向左挥动手时,响应操作为后退第一多媒体文件。
这样,用户可以通过挥动手或平移手的隔空手势,使得电子设备中的音频播放器执行播放控制相关的操作。
在另一种可能的设计中,多媒体应用为第二视频播放器。当隔空手势为向上平行移动手或向上挥动手时,响应操作为将第一多媒体文件切换为第二多媒体文件。当隔空手势为向下平行移动手或向下挥动手时,响应操作为将第一多媒体文件切换为第三多媒体文件。
这样,用户可以通过挥动手或平移手的隔空手势,使得电子设备中的视频播放器执行播放控制相关的操作。
在另一种可能的设计中,多媒体应用为图库。当隔空手势为向右平行移动手或向右挥动手时,响应操作为将第一多媒体文件切换为第二多媒体文件。当隔空手势为向左平行移动手或向左挥动手时,响应操作为将第一多媒体文件切换为第三多媒体文件。
这样,用户可以通过挥动手或平移手的隔空手势,使得电子设备中的图库切换所显示的图片。
在另一种可能的设计中,隔空手势为向电子设备方向靠近手掌,响应操作包括:播放第一多媒体文件,暂停播放第一多媒体文件,或将第一多媒体文件切换为另一多媒体文件。
其中,向电子设备方向靠近手掌,也可以称为向电子设备方向拍击。
这样,用户可以通过向电子设备方向靠近手掌的隔空手势,使得电子设备中的多媒体应用执行播放控制相关的操作。
在另一种可能的设计中,多媒体应用为第一视频播放器,第一界面包括播放控制控件和切换控件。根据隔空手势,执行响应操作,包括:根据隔空手势,隔空手势的发生位置,以及第一视频播放器的当前状态,执行响应操作。其中,当隔空手势的发生位置靠近播放控制控件,且当前正在播放第一多媒体文件时,响应操作为停止播放第一多媒体文件。当隔空手势的发生位置靠近播放控制控件,且当前未播放第一多媒体文件时,响应操作为播放第一多媒体文件。当隔空手势的发生位置靠近切换控件时,响应操作为将第一多媒体文件切换为另一多媒体文件。
也就是说,电子设备可以结合用户作出的隔空手势,隔空手势的发生位置,以及视频播放器当前的播放状态,执行不同的响应操作。
另一方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器;一个或多个存储器;一个或多个应用(即一个或多个应用程序);一个或多个计算机程序;显示屏,用于显示界面;以及检测部件,检测部件用于检测用户在未接触电子设备时作出的隔空手势。检测部件包括以下任意一项或任意多项的组合:摄像头,设置于显示屏下方的红外传感器,设置于显示屏下方的超声波传感器,或设置于显示屏下方的电磁感应器件。其中,一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令。当指令被处理器执行时,使得电子设备执行以下步骤:在启动应用后,显示应用的第一界面;若检测部件检测到隔空手势,则根据隔空手势,执行响应操作。该响应操作包括以下至少一个:滚动页面,或者将第一界面切换为另一界面。
其中,该应用可以是电子设备中的***应用,也可以是第三方应用。
这样,用户可以在不接触电子设备的情况下,通过隔空手势使得电子设备中的***应用和第三方应用执行滚动页面和切换显示界面的操作,从而可以提高用户的使用体验。
在一种可能的设计中,当隔空手势为向上平行移动手或向上挥动手时,响应操作为向上滚动页面。当隔空手势为向下平行移动手或向下挥动手时,响应操作为向下滚动页面。
这样,用户可以通过平移手或挥动手的隔空手势,使得电子设备执行滚动页面的操作。
在另一种可能的设计中,当隔空手势为向右平行移动手或向右挥动手时,响应操作为将第一界面切换为第二界面。当隔空手势为向左平行移动手或向左挥动手时,响应操作为将第一界面切换为第三界面。其中,第一界面与应用的第一功能对应,第二界面与应用的第二功能对应,第三界面与应用的第三功能对应。或者,应用为阅读器,第一界面、第二界面和第三界面分别为阅读器显示的三个页面。
这样,用户可以通过平移手或挥动手的隔空手势,使得微信等应用切换显示不同功能对应的页面;或者,使得阅读器等应用进行翻页。
在另一种可能的设计中,当指令被处理器执行时,还使得电子设备执行以下步骤:在检测部件检测到隔空手势后,显示与隔空手势对应的操作标记。
在该方案中,该操作标记可以用于模拟隔空手势对应的用户在触摸屏上的实际触摸操作,给用户以直观的视觉体验。
在另一种可能的设计中,根据隔空手势,执行响应操作,包括:根据隔空手势生成通用输入事件,通用输入事件为***应用和第三方应用均可以响应的输入事件。根据通用输入事件,执行响应操作。
也就是说,电子设备可以根据用户的隔空手势,生成***应用和第三方应用均可以响应的通用输入事件,因而电子设备上的***应用和第三方应用均可以响应该通用输入事件,从而均可以响应用户的隔空手势,使得隔空手势的使用范围较大。
在另一种可能的设计中,根据隔空手势生成通用输入事件,包括:根据预设的第一对应关系确定隔空手势的手势类型。第一对应关系为隔空手势的手势信息与手势类型的对应关系。手势信息包括以下任意一项或任意多项的组合:隔空手势的姿态、形状、移动距离、移动方向、移动速度、移动轨迹、或位置与时刻的对应关系。将手势类型上报给电子设备的应用程序框架层。应用程序框架层根据预设的第二对应关系确定通用输入事件,并将通用输入事件上报给应用程序层,以生成通用输入事件,第二对应关系为手势类型与通用输入事件的对应 关系。应用程序层中的前台***应用或前台第三方应用,执行响应该通用输入事件的操作。
也就是说,电子设备内部的应用程序框架层和应用程序层可以根据隔空手势,生成对应的通用输入事件,从而进行响应。
在另一种可能的设计中,当指令被处理器执行时,还使得电子设备执行以下步骤:若根据第一对应关系确定不存在与隔空手势对应的手势类型,则隔空手势为无效手势,根据当前应用和/或用户使用习惯,确定有效的参考隔空手势。向用户提示参考隔空手势。
这样,在电子设备发现用户的手势无效时,可以结合当前应用和/或用户使用习惯确定用户可能使用的、经常使用的、当前应用可以响应的等有效的隔空手势作为参考隔空手势,从而提示给用户,以便用户可以根据提示作出正确的隔空手势。
在另一种可能的设计中,当指令被处理器执行时,还使得电子设备执行以下步骤:若根据第一对应关系确定不存在与隔空手势对应的手势类型,则隔空手势为无效手势,根据当前应用和/或用户使用习惯,确定有效的参考隔空手势。确定参考隔空手势对应的参考通用输入事件;根据参考通用输入事件和当前应用确定第一操作;提示用户是否执行第一操作;在检测到用户指示执行第一操作的指令后,执行第一操作。
这样,电子设备可以根据当前应用和/或用于使用习惯,猜测用户的意图,即猜测用户可能想要电子设备执行的第一操作。该方式可以使得电子设备直接执行用户想要的第一操作,而不需要用户再次作出相应的隔空手势。
在另一种可能的设计中,当隔空手势为挥动手或平行移动手时,通用输入事件为滑动事件;当隔空手势为向电子设备方向靠近手掌时,通用输入事件为点击事件。
也就是说,电子设备根据挥动手或平移手的隔空手势,可以生成滑动事件;根据向电子设备方向靠近手掌的隔空手势,可以生成点击事件。
在另一种可能的设计中,当指令被处理器执行时,还使得电子设备执行以下步骤:在生成通用输入事件后,显示与通用输入事件对应的操作标记。
在该方案中,该操作标记可以用于模拟通用输入事件对应的用户在触摸屏上的实际触摸操作,给用户以直观的视觉体验。
在另一种可能的设计中,操作标记为静态标记,或动态标记。其中,该动态标记可以是一个过程性的图示。
例如,该静态标记可以是一个箭头,或一个实心圆点等;例如,该动态标记可以是一个移动的箭头,或手随着箭头移动的图示等。
在另一种可能的设计中,通用输入事件除了包括点击事件、滑动事件外,还可以包括长按事件或拖拽事件;点击事件包括单击事件或双击事件。
例如,该通用输入事件可以是用户实际触摸电子设备的触摸屏时,可以生成的输入事件。
在另一种可能的设计中,通用输入事件通过至少一个down事件,至少一个up事件,和/或至少一个move事件表示。
也就是说,通用输入事件可以通过down事件,up事件,move事件或这些事件的组合事件来描述。
另一方面,本申请实施例提供了一种手势处理方法,包括:电子设备检测隔空手势;电子设备根据隔空手势,生成通用输入事件;电子设备通过***应用或第三方应用,响应通用输入事件。
在该方案中,电子设备可以根据隔空手势生成***应用和第三方应用均可响应的通用输 入事件,以使得电子设备上的任何应用都可以响应该通用输入事件,即均可以响应用户的隔空手势,从而提高了隔空手势的使用范围和用户的使用体验。
在一种可能的设计中,电子设备根据隔空手势确定通用输入事件,包括:电子设备根据隔空手势的手势信息,生成通用输入事件。
在该方案中,电子设备可以根据隔空手势的姿态、形状、移动距离、移动方向、移动速度、移动轨迹、或位置与时刻的对应关系等手势信息,生成对应的通用输入事件,而不用根据手势信息先确定手势类型,再根据手势类型确定对应的通用输入事件。
在另一种可能的设计中,电子设备在检测到用户触发了隔空手势后,检测隔空手势。当电子设备检测到用户的手时,确定用户触发了隔空手势。电子设备检测隔空手势包括:电子设备通过检测部件采集隔空手势的数据信息。
这样,在用户触发隔空手势后再采集隔空手势的数据信息,并进行确定手势信息,确定手势类型,生成通用输入事件等一系列操作;而不用不断地、实时地进行这一系列操作,因而可以节省电子设备的相关资源。
在另一种可能的设计中,电子设备检测隔空手势,包括:电子设备在开启隔空手势检测功能后,检测隔空手势。
这样,电子设备在开启隔空手势后再检测隔空手势,一方面可以节省电子设备的相关检测资源,另一方面还可以降低隔空手势导致的误操作。
另一方面,本申请实施例提供了一种手势处理装置,该装置包含在电子设备中,该装置具有实现上述方面及可能的实现方式中任一方法中电子设备行为的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括至少一个与上述功能相对应的模块或单元。例如,检测模块或单元、生成模块或单元、执行模块或单元等。
又一方面,本申请实施例提供了一种电子设备,包括至少一个处理器和至少一个存储器。该至少一个存储器与至少一个处理器耦合,至少一个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当至少一个处理器执行计算机指令时,使得电子设备执行上述方面任一项可能的实现中的手势处理方法。
另一方面,本申请实施例提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述方面任一项可能的实现中的手势处理方法。
又一方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行上述方面任一项可能的实现中的手势处理方法。
附图说明
图1为本申请实施例提供的一种手机的硬件结构示意图;
图2为本申请实施例提供的一种手机的软件结构示意图;
图3为本申请实施例提供的一组手势处理流程图;
图4为本申请实施例提供的一组操作效果示意图;
图5A为本申请实施例提供的一组手势示意图;
图5B为本申请实施例提供的摄像头采集到的一组手势示意图;
图5C为本申请实施例提供的一种手势示意图;
图6为本申请实施例提供的一组界面示意图;
图7为本申请实施例提供的一种界面示意图;
图8为本申请实施例提供的另一组操作效果示意图;
图9为本申请实施例提供的另一组操作效果示意图;
图10为本申请实施例提供的另一组操作效果示意图;
图11为本申请实施例提供的另一组操作效果示意图;
图12为本申请实施例提供的另一组操作效果示意图;
图13为本申请实施例提供的另一组操作效果示意图;
图14为本申请实施例提供的一种操作标记示意图;
图15为本申请实施例提供的一组操作标记示意图;
图16为本申请实施例提供的另一种操作标记示意图;
图17为本申请实施例提供的一种手势处理方法流程图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请的描述中,除非另有说明,“/”表示前后关联的对象是一种“或”的关系,例如,A/B可以表示A或B;本申请中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,其中A,B可以是单数或者复数。
并且,在本申请的描述中,除非另有说明,“多个”是指两个或多于两个。“以下至少一项”或其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b,或c中的至少一项,可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。
用户在使用手机等电子设备时,可能会遇到不方便用手直接接触电子设备来进行操作的情况。例如,在用户手上有水,有油或比较脏的情况下,用户不方便直接用手接触电子设备。再例如,在户外较冷,用户戴有手套的情况下,用户不方便直接用手接触电子设备。再例如,用户躺在床上看手机,手机通过支架架在床头,距离用户的手较远;或在车载情况下,电子设备距离用户较远,用户不方便直接用手操作电子设备。
此时,用户可以通过隔空手势来操作电子设备。隔空手势是指用户的手部不接触电子设备,且手与电子设备之间的距离大于或者等于预设距离阈值(例如1cm)时的手势操作。电子设备可以利用摄像头、触摸屏、电磁感应器件(例如可以设置在电子设备显示屏的下方)、红外传感器(例如可以设置在电子设备显示屏的下方)、超声波传感器(例如可以设置在电子设备显示屏的下方)等检测部件,采集用户的手部形状、运动情况等信息,以检测隔空手势。该隔空手势可以包括但不限于静态手势和动态手势。其中,静态手势指某一时刻手部的姿态,比如手指弯曲、收拢等,如OK手势、V手势、五指伸开的手势等。动态手势指一段时间内手部的运动情况,包括运动方向、速度、手部姿态变化等,如挥动手势、平移手势、握拳手势、按压手势等。
本申请实施例提供了一种手势处理方法,可以应用于电子设备,能够根据隔空手势生成对应的通用输入事件,该通用输入事件为用户在电子设备上的接触操作对应的输入事件,从而使得***应用和第三方应用均能够响应该通用输入事件,即均能够响应该隔空手势,因而可以提高隔空手势的使用范围,省去第三方应用的适配工作;并且,不需要第三方应用事先与隔空手势进行适配,因而减少了适配的工作量。
示例性的,该电子设备可以是手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个 人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等电子设备,本申请实施例对电子设备的具体类型不作任何限制。
示例性的,当电子设备为手机时,图1示出了手机100的结构示意图。手机100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对手机100的具体限定。在本申请另一些实施例中,手机100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。例如,手机100还可以包括红外传感器,超声波传感器,或电磁感应器件等,可以用于检测隔空手势,并将采集到的隔空手势的数据信息发送给处理器,以获取隔空手势的手势信息。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,控制器可以是手机100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了***的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现手机100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理 器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。I2S接口和PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等***器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现手机100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现手机100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为手机100充电,也可以用于手机100与***设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对手机100的结构限定。在本申请另一些实施例中,手机100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过手机100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为手机100供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。
在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
手机100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。手机100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在手机100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。
在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。
在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在手机100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星***(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,手机100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得手机100可以通过无线通信技术与网络以及其他设备通信。无线通信技术可以包括全球移动通讯***(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。GNSS可以包括全球卫星定位***(global positioning system,GPS),全球导航卫星***(global navigation satellite system,GLONASS),北斗卫星导航***(beidou navigation satellite system,BDS),准天顶卫星***(quasi-zenith satellite system,QZSS)和/或星基增强***(satellite based augmentation systems,SBAS)。
手机100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194,也可以称为屏幕194,可以用于显示图像,视频等。显示屏194包括显示面 板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,手机100可以包括1个或N个显示屏194,N为大于1的正整数。
手机100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,手机100可以包括1个或N个摄像头193,N为大于1的正整数。
摄像头可以包括RGB摄像头、红外摄像头、深度摄像头等一种或多种。在一些实施例中,摄像头可以用于检测隔空手势,并将采集到的隔空手势的数据信息发送给处理器,以获取隔空手势的手势信息。例如,该数据信息可以是采集到的隔空手势的图像信息。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当手机100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。手机100可以支持一种或多种视频编解码器。这样,手机100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现手机100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
在一些实施例中,NPU或其他处理器可以根据摄像头等检测部件发送的隔空手势的数据信息获取手势信息,根据手势信息识别手势类型等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展手机100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行手机100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作***,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储手机100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件, 闪存器件,通用闪存存储器(universal flash storage,UFS)等。
手机100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。手机100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当手机100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。手机100可以设置至少一个麦克风170C。
在另一些实施例中,手机100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,手机100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。手机100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,手机100根据压力传感器180A检测触摸操作强度。手机100也可以根据压力传感器180A的检测信号计算触摸的位置。
在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定手机100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定手机100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测手机100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消手机100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
加速度传感器180E可检测手机100在各个方向上(一般为三轴)加速度的大小。当手机100静止时可检测出重力的大小及方向。还可以用于识别手机100的姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。手机100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,手机100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。手机100通过发光二极管向外发射红外光。手机100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定手机100附近有物体。当检测到不充分的反射光时,手机100可以确定手机100附近没有物体。手机100可以利用接近光传感器180G检测用户手持手机100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。手机100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测手机100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。手机100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于手机100的表面,与显示屏194所处的位置不同。
在另一些实施例中,触摸屏可以用于检测隔空手势,并将采集到的隔空手势的数据信息发送给处理器,以获取隔空手势的手势信息。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。手机100可以接收按键输入,产生与手机100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过***SIM卡接口195,或从SIM卡接口195拔出,实现和手机100的接触和分离。手机100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时***多张卡。多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。手机100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,手机100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在手机100中,不能和手机100分离。
图2是本申请实施例的手机100的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android***分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和***库,以及内核层。应用程序层可以包括一系列应用程序包。
如图2所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图***,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图***包括可视控件,例如显示文字的控件,显示图片的控件等。视图***可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供手机100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在***顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,振动,指示灯闪烁等。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓***的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
***库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子***进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
在本申请的实施例中,电子设备根据隔空手势生成的,***应用和第三方应用都可以直接响应的通用输入事件,可以是用户在电子设备上的接触操作对应的输入事件。例如,该电子设备可以是具有触摸屏的设备(例如具有触摸屏的手机,平板电脑等),电子设备根据隔空手势生成的通用输入事件可以是用户在触摸屏上的触摸操作对应的输入事件;或者,该电子设备可以是具有按键的设备(例如具有物体按键的手机,笔记本电脑等),电子设备根据隔空手势生成的通用输入事件可以是用户在按键上的操作对应的输入事件;或者,该电子设备还 可以是与鼠标配合使用的设备,电子设备根据隔空手势生成的通用输入事件可以是用户在鼠标上的点击、滚动等操作对应的输入事件;或者,该电子设备还可以是与触控板配合使用的设备(例如笔记本电脑等),电子设备根据隔空手势生成的通用输入事件可以是用户针对触控板的触摸操作对应的输入事件等。
其中,当电子设备为上述手机100时,在本申请的一些实施例中,参见图3中的(a),NPU或其他处理器等计算模块可以根据手机100的摄像头、触摸屏、红外传感器、超声波传感器、电磁感应器件或其他检测部件(例如leapmotion等外插部件)采集到的隔空手势的数据信息,获取手势信息;并根据手势信息进行手势识别,从而确定手势类型。计算模块将手势类型上报给应用程序框架层。应用程序框架层根据预设的手势类型与通用输入事件的对应关系,确定计算模块上报的手势类型对应的通用输入事件,并将该通用输入事件上报给应用程序层。即应用程序框架层生成了该通用输入事件。其中,该通用的输入事件是操作***通用定义的,在用户接触手机进行操作时可生成的,***应用和第三方应用都可以直接响应该输入事件。应用程序层中的相关应用(例如前台应用)可以响应该通用输入事件,执行相应的功能。其中,该相关应用可以是***应用,也可以是第三方应用。
在本申请的另一些实施例中,参见图3中的(b),NPU或其他处理器等计算模块可以根据检测部件采集到的隔空手势的数据信息,获取手势信息;并将手势信息上报给应用程序框架层。应用程序框架层结合预设的映射策略,根据手势信息生成对应的通用输入事件,该通用输入事件可以是通过电子设备***通用定义的down事件、up事件、和/或move事件描述的事件,即该通用输入事件可以是down事件、up事件、move事件或其中的多个事件的组合事件。应用程序框架层将通用输入事件上报给应用程序层。应用程序层中的***应用或第三方应用,可以响应通过down事件、up事件、和/或move事件描述的该通用输入事件,执行相应的功能。
这样,***应用和第三方应用均可以响应根据隔空手势生成的通用输入事件(也可以称为隔空手势映射的通用输入事件),即统应用和第三方应用均可以响应该隔空手势。因而,隔空手势的使用范围较大,隔空手势的用户使用体验较好;并且,不需要第三方应用事先与隔空手势进行适配,可以省去三方应用的适配工作。
目前,以具有触摸屏的手机为例,用户在触摸屏上的触摸操作(即接触操作)的处理过程可以包括:在触摸屏检测到用户的触摸操作后,相应的硬件中断被发给内核层。内核层将触摸操作加工成通用输入事件(包括触摸坐标,触摸操作的时间戳等信息)。通用输入事件被存储在内核层。应用程序框架层从内核层获取通用输入事件,并传送给相关应用(例如前台应用),相关应用响应该通用输入事件,从而响应该触摸操作。
对比本申请实施提供的隔空手势操作的处理过程和目前触摸操作的处理过程可知,手机可以根据隔空手势生成用户在触摸屏上的触摸操作对应的通用输入事件,因而***应用和第三方应用均能够响应该通用输入事件,从而均能够响应该隔空手势。也可以理解为,手机通过隔空手势模拟了用户在触摸屏上的实际触摸操作,从而生成了该实际触摸操作对应的通用输入事件,使得***应用和第三方应用均能够响应该通用输入事件,从而可以响应该隔空手势。
以下实施例将以电子设备为具有触模屏的手机,手机根据隔空手势生成的通用输入事件为用户的实际触摸事件对应的输入事件为例,对本申请实施例提供的手势处理方法进行阐述。
在本申请的实施例中,手机具有隔空手势的检测功能。在隔空手势的检测功能开启后, 手机可以通过摄像头、触摸屏、红外传感器、超声波传感器等检测部件,检测用户的隔空手势。
在一些实施例中,手机默认开启隔空手势的检测功能,在触摸屏的亮屏状态和黑屏状态下都可以持续检测隔空手势。
例如,手机上可以通过低功耗处理器,支持手机在黑屏状态下采用摄像头、触摸屏、红外传感器、超声波传感器等检测部件持续检测是否触发隔空手势。示例性的,该低功耗处理器可以是传感器中枢sensor hub。
在另一些实施例中,在黑屏状态下,手机默认关闭隔空手势的检测功能。
例如,在一种技术方案中,在亮屏状态下,若当前触摸屏已解锁,则手机自动开启隔空手势的检测功能,以避免在触摸屏未解锁时由于检测到隔空手势而导致的误操作。
在另一种技术方案中,若触摸屏亮屏,则不论触摸屏是否解锁,均自动开启隔空手势的检测功能。由于触摸屏一般是在检测到用户的亮屏操作后才会点亮的,而一般情况下用户点亮触摸屏是想要使用手机或者用户正在关注手机,此时手机也可以检测用户主动发出的隔空手势,从而通过隔空手势直接对手机进行操作,以减少用户解锁触摸屏的操作。
在另一些实施例中,手机默认关闭隔空手势的检测功能,在检测到用户的开启指示后,才开启隔空手势的检测功能。其中,该开启指示可以是用户的语音指示,用户按压手机上的物理按键的操作,用户在触摸屏上的触摸操作,或者用户晃动手机的操作等。
示例性的,在黑屏状态下,手机的触摸屏不显示内容,但是触摸屏的触摸功能开启,当用户的手指在触摸屏上滑动时,触摸屏开始显示内容,所显示的内容为用户在触摸屏上滑动的手势轨迹。参见图4中的(a),手机在检测到用户在触摸屏上画了一个圈的轨迹的操作后,显示该轨迹,并开启隔空手势的检测功能。
再示例性的,参见图4中的(b),在亮屏状态下,比如,手机在检测到用户通过指关节在触摸屏上画了一个“g”的轨迹的操作后,开启隔空手势的检测功能。
在另一些实施例中,手机默认在亮屏状态下开启隔空手势的检测功能,在黑屏状态下关闭隔空手势的检测功能。在黑屏状态下,手机在检测到用户的开启指示后,才开启隔空手势的检测功能。若手机为黑屏状态,则用户当前可能并不想操作手机,手机在检测到用户的开启指示后再开启隔空手势的检测功能,可以避免隔空手势导致的误操作,提高操作的准确性。
在另一些实施例中,手机默认在亮屏状态下开启隔空手势的检测功能,在转为黑屏状态后提示用户是否继续开启隔空手势的检测功能;在检测到用户的开启指示后,继续开启隔空手势的检测功能。
在隔空手势的检测功能已开启的情况下,手机可以检测用户的隔空手势,采集隔空手势的数据信息,根据该数据信息获取手势信息,并根据手势信息进行手势类型识别,生成通用输入事件等处理。
在一种技术方案中,在隔空手势的检测功能开启后,手机均不断地采集数据,并根据采集到的数据进行手势类型识别,生成通用输入事件等处理,而不论用户是否进行了隔空手势操作。
在另一种技术方案中,在隔空手势的检测功能开启后,若手机确定用户触发了隔空手势(或称用户触发了隔空手势检测),则手机采集用户的隔空手势的数据信息,并根据该数据信息进行手势类型识别,生成通用输入事件等处理。而在手机未检测到用户触发隔空手势之前,则不根据采集到的数据信息进行手势类型识别等处理,从而可以节省手机的计算资源。以下 将以该种方案为例进行说明。
在一些实施例中,若手机检测到了用户的手,且确定用户的手未接触手机,则手机可以确定用户触发了隔空手势。
其中,手机检测是否出现手的方法可以有多种。例如,当通过摄像头检测是否出现手时,在一种方案中,手机采用神经网络算法对摄像头采集到的图像进行识别,神经网络算法事先已经过训练。在训练时,神经网络输入了大量的手的图像和手的标签。在摄像头采集到的图像输入训练后的神经网络后,若神经网络输出的标签为手的标签,则手机确定检测到了用户的手。并且,神经网络在训练时还可以事先输入了大量的包含局域手掌的图像(例如包括一个或多个指尖的手的图像),从而在手距离摄像头较近,只能拍摄到局部手掌时,手机通过神经网络也可以准确地识别到手。
当通过摄像头检测是否出现手时,在另一种方案中,手机上设置有手的模型,手机对摄像头采集到的手的图像与手的模型进行匹配,若相似度大于或者等于70%,则手机确定检测到手。
再例如,当通过红外传感器检测是否出现手时,红外发射器可以发射红外线,红外线被被测目标反射。被测目标反射的红外辐射能量分布图形可以反映到红外探测器的光敏元件上,从而获得红外热像图,这种热像图与物体表面的热分布场相对应。不同被测目标的表面的热分布场不同。当被测目标的热像图与手的表面的热分布场相匹配时,手机可以确定检测到用户的手。
在另一些实施例中,手机上还可以配置有检测策略,可以用于减少隔空手势的误检测事件。例如,在一种检测策略中,在手未接触手机,且手与手机之间的距离小于或者等于预设值1(例如20cm)时,手机可以确定用户触发了隔空手势;而在手与手机之间的距离大于预设值1时,手机可以认为用户未触发隔空手势。
再例如,在另一种检测策略中,在手未接触手机,且手机检测到的手部的面积大于或者等于预设值2(例如9cm 2)时,手机可以确定用户触发了隔空手势;而在检测到的手的面积小于预设值2时,手机可以认为用户未触发隔空手势。
其中,手与手机之间的距离可以是手的某个部位(例如手的重心,食指尖部,手机首先检测到的手的部位等)与手机上的某个部位(例如触摸屏的中心位置)之间的距离;也可以是手的某个部位与手机触摸屏所在平面之间的垂直距离;还可以是其他距离,本申请实施例不予限定。
若手机检测到用户触发了隔空手势,则手机可以采集隔空手势的数据信息。其中,隔空手势的数据信息是在隔空手势操作过程中,检测部件采集到的数据。
举例来说,当检测部件为摄像头时,隔空手势的数据信息可以是摄像头采集到的包括用户的手的图像;当检测部件为红外传感器时,隔空手势的数据信息可以是红外传感器探测到手的情况下红外线的发射数据和反射数据等。
具体的,手机可以在隔空手势触发后,且隔空手势结束前,持续采集隔空手势的数据信息。其中,手机确定隔空手势结束的方式可以有多种。例如,在一实施例中,手机在不再检测到用户的手的情况下,确定隔空手势结束。
再例如,在另一实施例中,手机在确定手与手机之间的距离大于或者等于预设值3(例如20cm)时,确定隔空手势结束。在又一实施例中,手机在检测到用户发出的“结束隔空手势”的语音后,确定隔空手势结束。在另一实施例中,手机在检测到用户的结束手势时,确 定隔空手势结束。例如,该结束手势为“V”手势,隔空手势为向上挥手的手势,用户在做完向上挥手的隔空手势后,再做一个“V”手势,表明隔空手势已完成。
示例性的,以检测部件为摄像头为例,摄像头可以通过较慢的帧率(例如10帧每秒(fps))拍摄图像,以根据图像中是否出现手确定是否触发隔空手势。手机在确定摄像头拍摄的图像上出现手后确定触发了隔空手势。而后,摄像头可以通过较快的帧率(例如60fps)拍摄图像,以采集用户的隔空手势的数据信息。
示例性的,在图5A中的(a)-(d)所示的用户向上挥手的过程中,摄像头采集到的数据信息可以为图5B中的(a)-(d)所示的手部姿态和运动情况均动态变化的图像集。在摄像头拍摄到的图像上不再包括手时,手机确定隔空手势结束,可以继续以较慢的帧率拍摄图像,以再次检测是否触发隔空手势。
而后,手机可以根据采集到的隔空手势的数据信息,获取隔空手势的手势信息。该手势信息用于表示隔空手势的姿态和运动情况等信息。例如,手势信息可以包括手的姿态、形状、移动距离、移动方向、移动速度、移动轨迹、位置与时刻的对应关系等中的一种或多种。
其中,手机可以采用多种方法确定手势信息中的手的姿态、形状等静态特征。例如,手机上采用神经网络算法确定手的姿态、形状等静态特征。该神经网络在训练时预先输入了多种不同姿态和形状的手的图像以及对应的标签。当采用训练后的神经网络对摄像头采集到的图像进行处理时,可以识别出手的不同姿态、形状等静态特征。
再例如,不同姿态、形状等静态特征的手的表面的热分布场不同。手机可以根据被测目标的热像图,与预设的不同姿态、形状等静态特征的手的表面的热分布场的匹配情况,识别出手的不同姿态、形状等静态特征。
示例性的,对于图5B所示的图像集对应的隔空手势,手机获取的手势信息可以包括:手的形状为手部侧面,移动的起始位置为(x1,y1),移动的终止位置为(x2,y2),移动距离为10cm,移动方向为从下到上,移动轨迹为(x1,y1),(x3,y3),(x4,y4),…,(x2,y2),(x1,y1)处手的姿态为侧面手部横向伸展,(x2,y2)处手的姿态为侧面手部倾斜,(x3,y3)处手的姿态为侧面手部接近竖向伸展,以及时刻与位置的对应关系等。
在获取到隔空手势的手势信息后,在一实施例中,手机可以根据手势信息进行手势识别,从而得到隔空手势的手势类型。
其中,隔空手势的手势类型可以包括但不限于静态手势的手势类型和动态手势的手势类型。例如,静态手势的手势类型可以包括OK手势类型、V手势类型或五指伸开的手势类型等。动态手势的手势类型可以包括挥动(例如向上、下、左、右等方向挥动)、平行移动、拍击、抓合或松手等多种。
手机可以根据手的姿态、形状、移动距离、移动方向、移动速度、移动轨迹、位置与时刻的对应关系等手势信息,确定隔空手势的手势类型。例如,手机在确定手的姿态、形状等静态特征后,可以根据该静态特征确定静态手势的手势类型。对于动态手势,手机可以根据不同时刻手的姿态、形状等静态特征,和/或手的移动距离、移动方向、移动速度等运动情况,确定动态手势的手势类型。
需要说明的是,对于同一个手势类型的隔空手势,不同用户的操作行为可能会有些许差异,但隔空手势的特征是基本一致的,手机可以识别出不同用户做出的同一种手势类型的隔空手势。
示例性的,对于从图5B所示的图像集获取的手势信息,手机可以根据手势信息确定手 掌和手腕初始时横向放置,指尖朝右,而后手腕基本不动,手掌向上方转动,从而确定对应的手势类型为向上挥动。
在一些实施例中,若手机确定没有与手势信息匹配的手势类型,则确定未识别到有效的隔空手势,从而可以通过语音、振动或在触摸屏上显示提示信息等方式,提示用户当前的隔空手势无效。还可以根据手机之前学习和记录的用户习惯或当前正在使用的应用提示用户是否想要执行某个正确的隔空手势,或者提示用户是否想要手机执行某个操作。
示例性的,手机可以语音提示用户“该隔空手势无效,请做出正确的隔空手势”。再示例性的,参见图6中的(a),手机可以在触摸屏上显示提示信息601:“当前隔空手势无效,您是否想要向上挥手?”若手机检测到用户语音输入“是”的指示,则根据向上挥手的手势执行本申请实施例中的后续步骤。
再示例性的,参见图6中的(b),手机可以在触摸屏上显示提示信息602:“当前隔空手势无效,是否想要向上滑动页面?”若手机检测到用户语音输入“是”的指示,或者检测到用户点击控件603的操作,则向上滑动页面。
再示例性的,参见图6中的(c)或(d),手机可以在触摸屏上显示用户可能想要使用的隔空手势的文字信息604和/或图示信息605。
再示例性的,手机可以在触摸屏上显示,当前应用界面可响应的通用输入事件对应的隔空手势的文字信息和/或图示信息。
再示例性的,手机可以在触摸屏上显示,与当前的无效隔空手势类似的有效隔空手势的文字信息和/或图示信息。
再示例性的,手机可以在触摸屏上显示,用户之前使用次数最多的一个或多个有效隔空手势的文字信息和/或图示信息。
手机在确定手势类型后,可以根据手势类型生成对应的通用输入事件。该通用输入事件是***通用定义的,模拟用户在触摸手机的触摸屏时产生的,***应用和第三方应用均可以直接响应的输入事件。例如,手机上预设有手势类型与通用输入事件的对应关系,手机可以根据该对应关系,确定手势类型对应的通用输入事件,从而生成该通用输入事件。具体的,手机的应用程序框架层可以根据该对应关系确定与手势类型对应的通用输入事件,并将该通用输入事件上报给应用程序层,从而生成该通用输入事件。
示例性的,手势类型与通用输入事件的对应关系可以参见表1,挥动手势类型对应滑动事件:图5A所示的向上挥动的手势类型对应上滑事件,向左挥动的手势类型对应左滑事件,向某个方向挥动的手势类型对应向该方向的滑动事件。
如表1所示,拍击(即向手机所在方向靠近手掌)的手势类型对应点击事件:拍击一次的手势类型对应单击事件,预设时长内连续拍击两次的手势类型对应双击事件,快速拍击的手势类型对应压力按事件(即按下的力度大于或者等于预设阈值的事件)。
再例如,参见表1,OK手势类型对应单击事件。***应用和第三方应用可以直接响应上滑事件、左滑事件或单击事件等通用输入事件,即可以响应隔空手势。
表1
Figure PCTCN2020076699-appb-000001
Figure PCTCN2020076699-appb-000002
其中,手机上预设的与手势类型对应的通用输入事件,可以通过down事件、up事件、和/或move事件来描述。例如,手机上可以预设有通用输入事件与down事件、up事件、和/或move事件的对应关系,滑动事件可以通过down事件、move事件和up事件来描述,点击事件可以通过down事件和up事件来描述。示例性的,上滑事件可以描述为:依次接收到down事件、然后接收到一系列的move事件、最后接收到up事件,其中move事件描述的运动方向为向上移动。
在其他实施例中,手机上可以分别存储有静态手势的手势类型与通用输入事件的对应关系,以及动态手势的手势类型与通用输入事件的对应关系。用户还可以指示(例如通过语音指示)隔空手势为静态手势还是动态手势;手机在检测到用户指示隔空手势为静态手势的情况下,根据静态手势的手势类型与通用输入事件的对应关系确定相应的通用输入事件;手机在检测到用户指示隔空手势为动态手势的情况下,根据动态手势的手势类型与通用输入事件的对应关系确定相应的通用输入事件,从而可以提高隔空手势与通过输入事件的匹配准确度和匹配效率。
在其他实施例中,手机在确定手势类型后,可以根据手势类型,生成通过down事件、up事件、和/或move事件来描述的通用输入事件。例如,手机上可以预设有手势类型与down事件、up事件、和/或move事件的对应关系,挥动的手势类型可以对应down事件、move事件和up事件的组合描述的通用输入事件,拍击的手势类型可以对应down事件和up事件的组合描述的通用输入事件;OK手势类型可以对应down事件和up事件的组合描述的通用输入事件。***应用和第三方应用可以直接响应通过down事件、up事件、和/或move事件描述的通用输入事件,即可以响应隔空手势。具体的,手机的应用程序框架层可以根据该手势类型确定通过down事件、up事件、和/或move事件来描述的通用输入事件,并将该通用输入事件上报给应用程序层,从而生成该通用输入事件。
示例性的,当手势类型为三指下压时,手机可以根据三指下压生成通过down事件、up事件、和/或move事件来描述的多点触摸事件(即通用输入事件),也就是说,不同位置同时接收到多个down事件,而后该不同位置接收到up事件。
再示例性的,当手势类型为三指向下移动时,手机可以生成通过down事件、up事件、和/或move事件来描述的多点下滑事件(即通用输入事件)。再示例性的,当手势类型为抓合时,手机可以生成通过down事件、up事件、和/或move事件来描述的捏合事件(即通用输入事件)。
再示例性的,当手势类型为松手时,手机可以生成通过down事件、up事件、和/或move 事件来描述的扩张事件(即通用输入事件)。
在其他实施例中,根据手部运动的幅度、速度等特征的不同,隔空手势还可以包括其他手势类型,手机还可以生成与其他手势类型对应的,且通过down事件、up事件、和/或move事件来描述的通用输入事件。
例如,其他手势类型还可以包括大幅上挥,快速上挥等。当手势类型为大幅上挥时,手机可以对应生成通过down事件、up事件、和/或move事件来描述的长距离上滑事件(即通用输入事件)。当手势类型为快速上挥时,手机可以对应生成通过down事件、up事件、和/或move事件描述的快速上滑事件(即通用输入事件)。手机可以直接响应通过down事件、up事件、和/或move事件描述的长距离上滑事件,快速上滑事件等,即可以响应隔空手势。
其中,在通过down事件、up事件、和/或move事件来描述与手势类型对应的通用输入事件的情况下,示例性的,手部偏移量与move事件中的移动距离可以具有预设的比例关系,当手部向上挥动时的偏移量大于预设值4(例如15cm)时,该隔空手势为大幅上挥手势;隔空手势对应的move事件中的移动距离之和大于预设值5(例如3cm),move事件描述的通用输入事件为长距离上滑事件。
再示例性的,当手部向上挥动时的移动速度大于预设值6(例如1m/s)时,该隔空手势为快速上挥手势;隔空手势对应的move事件的移动速度大于预设值7(例如5cm/s),move事件描述的通用输入事件为快速滑动事件。
需要说明的是,由于手机根据手势类型生成的通用输入事件,是用户实际触摸操作手机时会生成的输入事件,因而也可以说,手机将隔空手势模拟成了用户的实际触摸操作,从而生成了用户的实际触摸操作对应的通用输入事件。
手机在生成通用输入事件后,可以通过相关应用响应该通用输入事件。其中,该相关应用可以是前台应用,也可以是与前台应用相关的应用,例如从当前应用跳转后的其他应用。
具体的,相关应用可以根据预设策略响应该通过输入事件。示例性的,在图5A所示的用户通过浏览器浏览网页,且向上挥手的场景下,手机根据向上挥动的手势类型生成上滑事件,如图7所示,浏览器应用响应于上滑事件,可以向上滚动页面,滚动的页面长度为触摸屏高度的1/3。浏览器应用响应于长距离上滑事件和快速上滑事件,也可以向上滚动页面,滚动的页面长度可以分别为触摸屏高度的2/3和触摸屏高度的1倍。
再示例性的,在图5C所示的用户通过浏览器浏览网页,且向上平行移动手的场景下,手机根据向上平移的手势类型生成上滑事件。如图7所示,浏览器响应于上滑事件,向上滚动页面。
再示例性的,在用户通过浏览器浏览网页的场景下,若隔空手势为向下挥手或向下平行移动手,则手机根据向下挥动或向下平移的手势类型生成向下滑动事件。浏览器应用响应于下滑事件,可以向下滚动页面。
再示例性的,在如图8中的(a)所示的音乐播放场景下,隔空手势为用户手掌向手机方向按压(或称手掌向手机方向靠近,手掌向手机方向拍击)一次,通用输入事件为单击事件,音乐播放器当前界面上有多个控件可以响应该单击事件,例如上一首控件、暂停控件、下一首控件等。在一种技术方案中,根据预设策略,预设位置的控件(例如触摸屏上最左边的上一首控件)可以响应该单击事件。在另一种技术方案中,根据预设策略,预设的控件(例如暂停控件801)可以响应该单击事件;暂停后的示意图可以参见图8中的(b)。
在另一种技术方案中,根据预设策略,手机还可以结合隔空手势的发生位置响应通用输 入事件,例如,当隔空手势的发生位置靠近暂停控件时,暂停控件响应该单击事件;当隔空手势的发生位置靠近上一首控件时,上一首控件响应该单击事件;当隔空手势的发生位置靠近下一首控件时,下一首控件响应该单击事件。示例性的,对于用户向手机方向按压手掌的隔空手势,手机的应用界面上距离手的重心在触摸屏上的投影最近的暂停控件,可以响应该单击事件。
在又一种技术方案中,根据预设策略,手机还可以结合前台运行的应用程序的当前状态,响应该单击事件。例如,音乐播放器当前界面上包括播放控制控件,若当前为音乐播放状态,则当播放控制控件响应单击事件时,手机暂停播放音乐;若当前为未播放音乐的状态,则当播放控制控件响应单击事件时,手机播放音乐。
再示例性的,在如图8中的(a)所示的音乐播放场景下,若隔空手势为用户向右挥手(或为向右平行移动手)的手势,则通用输入事件为右滑事件,音乐播放器响应于该右滑事件向后快进当前音乐的播放进度;若隔空手势为用户向左挥手(或向左平行移动手)的手势,则通用输入事件为左滑事件,音乐播放器响应于该左滑事件向前后退当前音乐的播放进度。
需要说明的是,手机根据隔空手势生成通用输入事件并进行响应的场景并不局限于以上所列举的浏览器场景和音乐播放场景,还可以是其他的多种使用场景。
例如,在如图9中的(a)所示的用户通过抖音(Tik Tok)播放短视频的场景下,参见图9中的(b),若手机检测到用户向上挥手(或向上平行移动手)的隔空手势,则可以确定手势类型为向上挥动(或向上平移),从而可以生成对应的上滑事件。参见图9中的(c),抖音响应于上滑事件,播放另一短视频。
若手机检测到用户向下挥手(或向下平行移动手)的隔空手势,则可以确定手势类型为向下挥动(或向下平移),从而可以生成对应的下滑事件。抖音响应于下滑事件,播放另一短视频。
再例如,在如图10中的(a)所示的用户通过抖音播放短视频的场景下,若手机检测到用户手掌向手机方向按压(或称手掌向手机方向靠近,手掌向手机方向拍击)一次的隔空手势,则可以确定手势类型为拍击一次,从而可以生成对应的单击事件。参见图10中的(b),抖音响应于单击事件,暂停播放当前的短视频。
再例如,在如图11中的(a)所示的用户通过阅读器阅读电子文档的场景下,参见图11中的(b),若手机检测到用户向左挥手(或向左平行移动手)的隔空手势,则可以确定手势类型为向左挥动(或向左平移),从而生成对应的左滑事件。参见图11中的(c),阅读器响应于左滑事件,向后翻页。
若手机检测到用户向右挥手(或向右平行移动手)的隔空手势,则可以确定手势类型为向右挥动(或向右平移),从而生成对应的右滑事件。阅读器响应于右滑事件,向前翻页。
再例如,在如图12中的(a)所示的手机显示微信的“通讯录”这一功能对应的界面的场景下,参见图12中的(b),若手机检测到用户向右挥手(或向右平行移动手)的隔空手势,则手机可以确定手势类型为向右挥动(或向右平移),从而生成对应的右滑事件。参见图12中的(c),微信响应于右滑事件,显示“微信”这一功能对应的界面。
在图12中的(a)所示的场景下,若手机检测到用户向左挥手(或向左平行移动手)的隔空手势,则手机可以确定手势类型为向左挥动(或向左平移),从而生成对应的左滑事件。微信响应于左滑事件,显示“发现”这一功能对应的界面。
此外,在如图12中的(a)所示的场景下,微信响应于上滑事件或下滑事件,还可以滚 动页面。
再例如,参见图13中的(a)和(b),在用户通过图库(或称相册)浏览图片的场景下,若手机检测到用户握拳的隔空手势,则手机可以确定手势类型为抓合,从而可以生成对应的捏合事件。参见图13中的(c),图库响应于捏合事件,缩小显示图片。
若手机检测到用户向右挥手的隔空手势,则确定手势类型为向右挥,生成对应的右滑事件;图库响应于右滑事件,显示上一张图片。若手机检测到用户向左挥手的隔空手势,则确定手势类型为向左挥,生成对应的左滑事件;图库响应于左滑事件,显示下一张图片。
再例如,在用户通过Youtube播放器播放视频的场景下,与音乐播放场景下类似,手机可以根据隔空手势,调节视频的播放进度,播放视频,暂停播放和切换另一个视频。
此外,在手机检测到隔空手势为用户向上挥手(或向上平行移动手)的手势时,通用输入事件为上滑事件,若隔空手势的发生位置靠近手机的右侧,则Youtube播放器响应于该上滑事件调大音量;若隔空手势的发生位置靠近手机的左侧,则Youtube播放器响应于该上滑事件调大显示亮度。类似地,Youtube播放器还可以根据用户的隔空手势调小音量和调小显示亮度。
再例如,在手机显示桌面的界面1的场景下,若手机检测到用户向左挥手(或向左平行移动手)的隔空手势,则可以确定手势类型为向左挥动(或向左平移),从而生成对应的左滑事件;手机响应于左滑事件,显示桌面的界面2。若手机检测到用户向右挥手(或向右平行移动手)的隔空手势,则可以确定手势类型为向右挥动(或向右平移),从而生成对应的右滑事件;手机响应于右滑事件,显示桌面的界面3。
在其他一些实施例中,在手机显示任何界面的情况下,若手机检测到用户握拳的隔空手势,则手机可以确定手势类型为抓合,从而生成对应的双击截屏事件。手机响应于该双击截屏事件,截取当前界面形成图片。
在本申请的其他实施例中,手机还可以在触摸屏上显示操作标记,以模拟隔空手势对应的或模拟通用输入事件对应的,用户在触摸屏上的实际触摸操作,给用户以直观的视觉体验。该操作标记还可以用于提示用户手机将响应的通用输入事件。而后,手机可以通过相关应用响应该通用输入事件。其中,该操作标记可以是静态的标记;也可以是动态的标记,该动态的标记可以是一个过程性的图示。
在一种技术方案中,手机上预设有通用输入事件与操作标记的对应关系,手机可以根据手势类型对应的通用输入事件,在触摸屏上显示操作标记,以模拟通用输入事件对应的用户在触摸屏上的实际触摸操作,提示用户手机将响应的通用输入事件。
示例性的,手机在检测到图5A所示的隔空手势之后,确定向上挥的手势类型对应上滑事件,手机可以显示图14所示的操作标记1401,即在触摸屏上显示一个向上的箭头,以模拟用户在触摸屏上向上滑动的操作,提示用户将响应上滑事件。而后,响应于向上滑动的操作,手机可以滚动页面,从而显示图7所示的界面。
再示例性的,参见图15中的(a)和(b),手机可以在触摸屏上显示从下到上移动的手的形状1501,且手移动的轨迹对应显示有向上的箭头1502,以模拟用户在触摸屏上向上滑动的操作。而后,响应于向上滑动的操作,手机可以滚动页面,从而显示图7所示的界面。
再示例性的,手机在检测到图10中的(a)所示的用户向手机方向按压一次手掌的隔空手势后,可以确定拍击一次的手势类型对应单击事件,并显示如图16所示的圆形标记1601,以模拟用户在触摸屏上的单击操作,提示用户手机将响应单击事件。而后,响应于单击操作, 手机暂停播放当前短视频,从而显示图10中的(b)所示的界面。
在另一种技术方案中,手机上预设有手势类型与操作标记的对应关系,手机可以根据手势类型在触摸屏上显示操作标记,以模拟通用输入事件对应的用户在触摸屏上的实际触摸操作,提示用户手机将响应的通用输入事件。示例性的,手机在识别到向上挥的隔空手势后,可以在触摸屏上显示如图14、图15所示的操作标记或其他操作标记。
在又一种技术方案中,手机可以根据通用输入事件中的down事件、up事件、和/或move事件在触摸屏上显示操作标记,以模拟通用输入事件对应的用户在触摸屏上的实际触摸操作,提示用户手机将响应的通用输入事件。例如,对应于通用输入事件中的down事件,触摸屏上显示手的形状;对应于move事件,触摸屏上的手发生移动并显示带有方向箭头的移动轨迹;对应于up事件,触摸屏上停止显示手的形状和移动轨迹。
在本申请的其他实施例中,在获取到隔空手势的手势信息后,手机还可以根据手势信息生成通过down事件、up事件、和/或move事件组合的通用输入事件。***应用和第三方应用可以直接响应down事件、up事件、和/或move事件,即可以直接响应down事件、up事件、和/或move事件组合的通用输入事件,从而可以响应隔空手势。
具体的,手机上可以设置有预设的映射策略,确定手势信息与down事件、up事件、和/或move事件的映射关系。例如,在一种映射策略中,根据手势信息,手机检测到出现手的时刻对应down事件的发生时刻,手的预设部位(例如手的重心,食指尖,或手机首先检测到的手的部位等)在触摸屏上的投影位置(例如触摸屏上的(x0,y0)处)对应down事件的发生位置。若手部发生移动,则手部移动过程对应move事件发生过程(即接收到一些列的move事件),且手部移动的距离与move事件中的移动距离具有预设的比例关系。而后,手机不再检测到手的预设部位的时刻对应up事件发生的时刻,预设部位最后在触摸屏上的投影位置(例如触摸屏上的(x1,y1)处)对应up事件的发生时刻。手势信息映射的这些down事件、up事件和/或move事件组合成通用输入事件。这些通用输入事件可以是以上实施例中描述的通用输入事件,例如为单击事件、上滑事件、捏合事件、多点触摸事件、快速上滑事件等。
以上实施例主要是以电子设备为手机,手机根据隔空手势生成的通用输入事件,是***应用和第三方应用都可以直接响应的,用户针对触摸屏的触摸事件对应的输入事件为例进行说明的。
在其他实施例中,通用输入事件也可以是其他输入事件。例如,手机根据隔空手势生成的通用输入事件,是***应用和第三方应用都可以直接响应的,用户针对手机上的物理按键(例如电源键)的按压操作对应的输入事件。示例性的,电源键周围设置有红外传感器,当电源键周围设置有红外传感器检测到手部向手机侧拍击(即向手机侧靠近)的隔空手势时,生成按下电源键的通用输入事件。
以上实施例主要是以电子设备为手机为例进行说明的,当电子设备为其他电子设备时,电子设备根据隔空手势生成的通用输入事件,也可以是用户在电子设备上的其他类型的接触操作(例如针对按键、触控板、鼠标等的接触操作)对应的输入事件,本申请实施例不再赘述。
本申请另一实施例还提供了一种手势处理方法,可以应用于电子设备,该电子设备上设置有显示屏和检测部件,该显示屏可以用于显示界面,该检测部件可以用于检测隔空手势。其中,该检测部件可以包括以下任意一项或任意多项的组合:摄像头,设置于显示屏下方的 红外传感器,设置于显示屏下方的超声波传感器,或设置于显示屏下方的电磁感应器件等。如图17所示,该方法可以包括:
1701、电子设备启动多媒体应用。
例如,该多媒体应用可以是音频应用(例如音乐播放器)、视频播放器(例如抖音等视频播放器)或图库等。
1702、电子设备显示多媒体应用的第一界面,第一界面与第一多媒体文件对应。
1703、若电子设备检测到隔空手势,则根据隔空手势,执行响应操作。
其中,该响应操作可以包括以下至少一个:播放第一多媒体文件,暂停播放第一多媒体文件,调节第一多媒体文件的播放进度,调节播放音量,调节显示亮度,或将第一多媒体文件切换为另一多媒体文件等。即,电子设备可以通过多媒体应用执行该响应操作。其中,该多媒体应用可以是***应用或第三方应用。
这样,用户可以通过隔空手势,控制电子设备中的***多媒体应用或第三方多媒体应用执行相应的播放控制操作,因而可以提高用户的使用体验。
本申请实施例提供了一种电子设备,包括:检测单元,用于检测隔空手势,处理单元,用于根据隔空手势执行响应操作。处理单元具体可以用于根据隔空手势生成通用输入事件,并响应该通用输入事件。并且,检测单元和处理单元还可以用于执行上述实施例中的其他各个步骤,以实现上述实施例中的手势处理方法。
本申请实施例提供了一种电子设备,包括:一个或多个处理器;一个或多个存储器;一个或多个应用;一个或多个计算机程序;显示屏,用于显示应用的界面;以及检测部件,检测部件包括以下任意一项或任意多项的组合:摄像头,设置于显示屏下方的红外传感器,设置于显示屏下方的超声波传感器,或设置于显示屏下方的电磁感应器件;检测部件用于检测用户在未接触电子设备时作出的隔空手势;其中,一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令。当该指令被该处理器执行时,可以使得电子设备执行上述实施例中的各个步骤。
例如,当该指令被该处理器执行时,可以使得电子设备执行:在启动多媒体应用后,显示多媒体应用的第一界面,第一界面与第一多媒体文件对应;若检测部件检测到隔空手势,则根据隔空手势,执行响应操作。其中,该响应操作可以包括以下至少一个:播放第一多媒体文件,暂停播放第一多媒体文件,调节第一多媒体文件的播放进度,调节播放音量,调节显示亮度,或将第一多媒体文件切换为另一多媒体文件等。
再例如,当该指令被该处理器执行时,可以使得电子设备执行:在启动应用后,显示应用的第一界面。若检测部件检测到隔空手势,则根据隔空手势,执行响应操作。其中,该响应操作可以包括以下至少一个:滚动页面,或者将第一界面切换为另一界面等。
示例性的,当该电子设备为手机时,该电子设备中的处理器可以为图1中的处理器110,该存储器可以为图1中的内部存储器121,该显示屏可以是图1中的显示屏194,该检测部件中的摄像头可以是图1中的摄像头193,该检测部件中的红外传感器,超声波传感器,或电磁感应器件等可以是图1中的传感器模块180。
本申请实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的手势处理方法。
本申请实施例还提供一种计算机程序产品,当该计算机程序产品在计算机上运行时,使 得计算机执行上述相关步骤,以实现上述实施例中的手势处理方法。
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的手势处理方法。
其中,本申请实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
通过以上实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (18)

  1. 一种电子设备,其特征在于,包括:
    一个或多个处理器;
    一个或多个存储器;
    一个或多个多媒体应用,所述多媒体应用包括音频应用或视频应用;
    一个或多个计算机程序;
    显示屏,用于显示界面;
    以及检测部件,用于检测用户在未接触所述电子设备时作出的隔空手势;所述检测部件包括以下任意一项或任意多项的组合:摄像头,设置于所述显示屏下方的红外传感器,设置于所述显示屏下方的超声波传感器,或设置于所述显示屏下方的电磁感应器件;
    其中,所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令;当所述指令被所述处理器执行时,使得所述电子设备执行以下步骤:
    在启动所述多媒体应用后,显示所述多媒体应用的第一界面,所述第一界面与第一多媒体文件对应;
    若所述检测部件检测到所述隔空手势,则根据所述隔空手势,执行响应操作;
    所述响应操作包括以下至少一个:播放所述第一多媒体文件,暂停播放所述第一多媒体文件,调节所述第一多媒体文件的播放进度,调节播放音量,调节显示亮度,或将所述第一多媒体文件切换为另一多媒体文件。
  2. 根据权利要求1所述的电子设备,其特征在于,所述隔空手势为挥动手或平行移动手,所述响应操作包括:快进所述第一多媒体文件,后退所述第一多媒体文件,调大播放音量,调小播放音量,调大显示亮度,调小显示亮度,或将所述第一多媒体文件切换为另一多媒体文件。
  3. 根据权利要求2所述的电子设备,其特征在于,所述多媒体应用为第一视频播放器;所述根据所述隔空手势,执行响应操作,包括:
    根据所述隔空手势和所述隔空手势的发生位置,执行所述响应操作;
    其中,当所述隔空手势为向上平行移动手或向上挥动手时,若所述隔空手势的发生位置靠近所述电子设备的右侧,则所述响应操作为调大播放音量;若所述隔空手势的发生位置靠近所述电子设备的左侧,则所述响应操作为调大显示亮度;
    当所述隔空手势为向下平行移动手或向下挥动手时,若所述隔空手势的发生位置靠近所述电子设备的右侧,则所述响应操作为调小播放音量;若所述隔空手势的发生位置靠近所述电子设备的左侧,则所述响应操作为调小显示亮度;
    当所述隔空手势为向右平行移动手或向右挥动手时,所述响应操作为快进所述第一多媒体文件;
    当所述隔空手势为向左平行移动手或向左挥动手时,所述响应操作为后退所述第一多媒体文件。
  4. 根据权利要求2所述的电子设备,其特征在于,所述多媒体应用为音频播放器;
    当所述隔空手势为向右平行移动手或向右挥动手时,所述响应操作为快进所述第一多媒体文件;
    当所述隔空手势为向左平行移动手或向左挥动手时,所述响应操作为后退所述第一多媒体文件。
  5. 根据权利要求2所述的电子设备,其特征在于,所述多媒体应用为第二视频播放器;
    当所述隔空手势为向上平行移动手或向上挥动手时,所述响应操作为将所述第一多媒体文件切换为第二多媒体文件;
    当所述隔空手势为向下平行移动手或向下挥动手时,所述响应操作为将所述第一多媒体文件切换为第三多媒体文件。
  6. 根据权利要求2所述的电子设备,其特征在于,所述多媒体应用为图库;
    当所述隔空手势为向右平行移动手或向右挥动手时,所述响应操作为将所述第一多媒体文件切换为第二多媒体文件;
    当所述隔空手势为向左平行移动手或向左挥动手时,所述响应操作为将所述第一多媒体文件切换为第三多媒体文件。
  7. 根据权利要求1所述的电子设备,其特征在于,所述隔空手势为向所述电子设备方向靠近手掌,所述响应操作包括:播放所述第一多媒体文件,暂停播放所述第一多媒体文件,或将所述第一多媒体文件切换为另一多媒体文件。
  8. 根据权利要求7所述的电子设备,其特征在于,所述多媒体应用为第一视频播放器;所述第一界面包括播放控制控件和切换控件;所述根据所述隔空手势,执行响应操作,包括:
    根据所述隔空手势,所述隔空手势的发生位置,以及所述第一视频播放器的当前状态,执行所述响应操作;
    其中,当所述隔空手势的发生位置靠近所述播放控制控件,且当前正在播放所述第一多媒体文件时,所述响应操作为停止播放所述第一多媒体文件;
    当所述隔空手势的发生位置靠近所述播放控制控件,且当前未播放所述第一多媒体文件时,所述响应操作为播放所述第一多媒体文件;
    当所述隔空手势的发生位置靠近所述切换控件时,所述响应操作为将所述第一多媒体文件切换为另一多媒体文件。
  9. 一种电子设备,其特征在于,包括:
    一个或多个处理器;
    一个或多个存储器;
    一个或多个应用;
    一个或多个计算机程序;
    显示屏,用于显示界面;
    以及检测部件,用于检测用户在未接触所述电子设备时作出的隔空手势;所述检测部件包括以下任意一项或任意多项的组合:摄像头,设置于所述显示屏下方的红外传感器,设置于所述显示屏下方的超声波传感器,或设置于所述显示屏下方的电磁感应器件;
    其中,所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令;当所述指令被所述处理器执行时,使得所述电子设备执行以下步骤:
    在启动所述应用后,显示所述应用的第一界面;
    若所述检测部件检测到所述隔空手势,则根据所述隔空手势,执行响应操作;
    所述响应操作包括以下至少一个:滚动页面,或者将所述第一界面切换为另一界面。
  10. 根据权利要求9所述的电子设备,其特征在于,当所述隔空手势为向上平行移动手或向上挥动手时,所述响应操作为向上滚动页面;
    当所述隔空手势为向下平行移动手或向下挥动手时,所述响应操作为向下滚动页面。
  11. 根据权利要求9所述的电子设备,其特征在于,当所述隔空手势为向右平行移动手或向右挥动手时,所述响应操作为将所述第一界面切换为第二界面;
    当所述隔空手势为向左平行移动手或向左挥动手时,所述响应操作为将所述第一界面切换为第三界面;
    其中,所述第一界面与所述应用的第一功能对应,所述第二界面与所述应用的第二功能对应,所述第三界面与所述应用的第三功能对应;
    或者,所述应用为阅读器,所述第一界面、第二界面和第三界面分别为所述阅读器显示的三个页面。
  12. 根据权利要求1-11任一项所述的电子设备,其特征在于,当所述指令被所述处理器执行时,还使得所述电子设备执行以下步骤:
    在所述检测部件检测到所述隔空手势后,显示与所述隔空手势对应的操作标记。
  13. 根据权利要求1-11任一项所述的电子设备,其特征在于,所述根据所述隔空手势,执行响应操作,包括:
    根据所述隔空手势生成通用输入事件,所述通用输入事件为***应用和第三方应用均可响应的输入事件;
    根据所述通用输入事件,执行所述响应操作。
  14. 根据权利要求13所述的电子设备,其特征在于,所述根据所述隔空手势生成通用输入事件,包括:
    根据预设的第一对应关系确定所述隔空手势的手势类型,所述第一对应关系为隔空手势的手势信息与手势类型的对应关系,所述手势信息包括以下任意一项或任意多项的组合:所述隔空手势的姿态、形状、移动距离、移动方向、移动速度、移动轨迹、或位置与时刻的对应关系;
    将所述手势类型上报给所述电子设备的应用程序框架层;
    所述应用程序框架层根据预设的第二对应关系确定所述通用输入事件,并将所述通用输入事件上报给应用程序层,以生成所述通用输入事件,所述第二对应关系为手势类型与通用输入事件的对应关系;
    所述应用程序层中的前台***应用或前台第三方应用,执行响应该通用输入事件的操作。
  15. 根据权利要求14所述的电子设备,其特征在于,当所述指令被所述处理器执行时,还使得所述电子设备执行以下步骤:
    若根据所述第一对应关系确定不存在与所述隔空手势对应的手势类型,则所述隔空手势为无效手势,根据当前应用和/或用户使用习惯,确定有效的参考隔空手势;
    向所述用户提示所述参考隔空手势。
  16. 根据权利要求15所述的电子设备,其特征在于,当所述指令被所述处理器执行时,还使得所述电子设备执行以下步骤:
    若根据所述第一对应关系确定不存在与所述隔空手势对应的手势类型,则所述隔空手势为无效手势,根据当前应用和/或用户使用习惯,确定有效的参考隔空手势;
    确定所述参考隔空手势对应的参考通用输入事件;
    根据所述参考通用输入事件和当前应用确定第一操作;
    提示所述用户是否执行所述第一操作;
    在检测到所述用户指示执行所述第一操作的指令后,执行所述第一操作。
  17. 根据权利要求13-16任一项所述的电子设备,其特征在于,当所述隔空手势为挥动手或平行移动手时,所述通用输入事件为滑动事件;
    当所述隔空手势为向所述电子设备方向靠近手掌时,所述通用输入事件为点击事件。
  18. 根据权利要求13-17任一项所述的电子设备,其特征在于,当所述指令被所述处理器执行时,还使得所述电子设备执行以下步骤:
    在生成所述通用输入事件后,显示与所述通用输入事件对应的操作标记。
PCT/CN2020/076699 2019-03-01 2020-02-26 一种手势处理方法及设备 WO2020177585A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP20766233.9A EP3910449A4 (en) 2019-03-01 2020-02-26 GESTURE TREATMENT METHOD AND DEVICE
JP2021551816A JP7391102B2 (ja) 2019-03-01 2020-02-26 ジェスチャ処理方法およびデバイス
KR1020217027292A KR20210118168A (ko) 2019-03-01 2020-02-26 제스처 처리 방법 및 디바이스
US17/435,477 US20220137713A1 (en) 2019-03-01 2020-02-26 Gesture Processing Method and Device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910157644.4 2019-03-01
CN201910157644.4A CN110045819B (zh) 2019-03-01 2019-03-01 一种手势处理方法及设备

Publications (1)

Publication Number Publication Date
WO2020177585A1 true WO2020177585A1 (zh) 2020-09-10

Family

ID=67274489

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/076699 WO2020177585A1 (zh) 2019-03-01 2020-02-26 一种手势处理方法及设备

Country Status (6)

Country Link
US (1) US20220137713A1 (zh)
EP (1) EP3910449A4 (zh)
JP (1) JP7391102B2 (zh)
KR (1) KR20210118168A (zh)
CN (1) CN110045819B (zh)
WO (1) WO2020177585A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115695518A (zh) * 2023-01-04 2023-02-03 广州市保伦电子有限公司 一种基于智能移动设备的ppt控制方法
WO2023051272A1 (zh) * 2021-09-28 2023-04-06 华为技术有限公司 一种设备组网及声道配置方法和电子设备

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110045819B (zh) * 2019-03-01 2021-07-09 华为技术有限公司 一种手势处理方法及设备
CN112394811B (zh) * 2019-08-19 2023-12-08 华为技术有限公司 一种隔空手势的交互方法及电子设备
CN110941339B (zh) * 2019-11-27 2024-02-23 上海创功通讯技术有限公司 一种手势感应方法及电子设备、存储介质
CN110855969B (zh) * 2019-12-06 2022-11-15 深圳乐信软件技术有限公司 一种投影方法、装置及***
CN113050788A (zh) * 2019-12-26 2021-06-29 华为技术有限公司 一种声音播放的控制方法及装置
CN111027643B (zh) * 2019-12-26 2024-03-08 北京奇艺世纪科技有限公司 深度神经网络模型的训练方法、人机交互识别方法、装置、电子设备及存储介质
WO2021217570A1 (zh) * 2020-04-30 2021-11-04 华为技术有限公司 基于隔空手势的控制方法、装置及***
CN111880717B (zh) * 2020-07-23 2021-11-16 卡莱特云科技股份有限公司 一种悬浮触控遥控播放设备的方法及装置
CN111988522B (zh) * 2020-07-28 2022-04-22 北京达佳互联信息技术有限公司 拍摄控制方法、装置、电子设备及存储介质
CN112799574A (zh) * 2021-02-23 2021-05-14 京东方科技集团股份有限公司 一种显示控制方法和显示装置
CN115079810A (zh) * 2021-03-10 2022-09-20 Oppo广东移动通信有限公司 信息处理方法与装置、主控设备和受控设备
CN115484394B (zh) * 2021-06-16 2023-11-14 荣耀终端有限公司 一种隔空手势的引导使用方法及电子设备
CN113687722A (zh) * 2021-08-25 2021-11-23 精电(河源)显示技术有限公司 电子设备的页面控制方法、装置、设备和存储介质
CN116193243B (zh) * 2021-11-25 2024-03-22 荣耀终端有限公司 拍摄方法和电子设备
CN114911397A (zh) * 2022-05-18 2022-08-16 北京五八信息技术有限公司 一种数据处理方法、装置、电子设备及存储介质
CN115079822B (zh) * 2022-05-31 2023-07-21 荣耀终端有限公司 隔空手势交互方法、装置、电子芯片及电子设备
CN115576417A (zh) * 2022-09-27 2023-01-06 广州视琨电子科技有限公司 基于图像识别的交互控制方法、装置及设备
CN116661635B (zh) * 2022-11-22 2024-04-05 荣耀终端有限公司 手势处理方法和电子设备
CN117101117A (zh) * 2023-07-12 2023-11-24 荣耀终端有限公司 触控方法及相关设备
CN116627260A (zh) * 2023-07-24 2023-08-22 成都赛力斯科技有限公司 一种隔空操作方法、装置、计算机设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914126A (zh) * 2012-12-31 2014-07-09 腾讯科技(深圳)有限公司 一种多媒体播放器控制方法和装置
US20160011672A1 (en) * 2014-07-10 2016-01-14 Elliptic Laboratories As Gesture control
CN106484302A (zh) * 2016-10-31 2017-03-08 维沃移动通信有限公司 一种歌曲播放方法及移动终端
CN109032359A (zh) * 2018-08-28 2018-12-18 上海擎感智能科技有限公司 一种多媒体播放方法、装置、电子终端及介质
CN110045819A (zh) * 2019-03-01 2019-07-23 华为技术有限公司 一种手势处理方法及设备

Family Cites Families (37)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001117686A (ja) 1999-10-20 2001-04-27 Toshiba Corp ペン入力装置およびペン入力装置のポインティング処理方法
CN101558367A (zh) * 2006-12-05 2009-10-14 索尼爱立信移动通讯有限公司 用于检测物体移动的方法和***
US7877707B2 (en) * 2007-01-06 2011-01-25 Apple Inc. Detecting and interpreting real-world and security gestures on touch and hover sensitive devices
US8643628B1 (en) * 2012-10-14 2014-02-04 Neonode Inc. Light-based proximity detection system and user interface
US20110310005A1 (en) * 2010-06-17 2011-12-22 Qualcomm Incorporated Methods and apparatus for contactless gesture recognition
JP2014029565A (ja) 2010-11-24 2014-02-13 Panasonic Corp 情報処理装置
US9417754B2 (en) * 2011-08-05 2016-08-16 P4tents1, LLC User interface system, method, and computer program product
US20130054335A1 (en) * 2011-08-29 2013-02-28 Ebay Inc. Mobile platform for generating and distributing deals
US9423876B2 (en) * 2011-09-30 2016-08-23 Microsoft Technology Licensing, Llc Omni-spatial gesture input
US8749485B2 (en) * 2011-12-20 2014-06-10 Microsoft Corporation User control gesture detection
US9389690B2 (en) 2012-03-01 2016-07-12 Qualcomm Incorporated Gesture detection based on information from multiple types of sensors
WO2013144807A1 (en) * 2012-03-26 2013-10-03 Primesense Ltd. Enhanced virtual touchpad and touchscreen
US9377860B1 (en) * 2012-12-19 2016-06-28 Amazon Technologies, Inc. Enabling gesture input for controlling a presentation of content
JP2014219938A (ja) 2013-05-10 2014-11-20 株式会社ゲッシュ 入力支援装置、入力支援方法、および、プログラム
US9766855B2 (en) * 2013-09-10 2017-09-19 Avigilon Corporation Method and apparatus for controlling surveillance system with gesture and/or audio commands
CN103558920B (zh) * 2013-11-15 2018-06-19 努比亚技术有限公司 非接触式姿势的处理方法及装置
JPWO2015108112A1 (ja) * 2014-01-15 2017-03-23 株式会社Juice Design 操作判定装置、操作判定方法、および、プログラム
CN104978014B (zh) * 2014-04-11 2018-05-11 维沃移动通信有限公司 一种快速调用应用程序或***功能的方法及其移动终端
CN105094659A (zh) * 2014-05-19 2015-11-25 中兴通讯股份有限公司 一种基于手势对应用程序进行操作的方法及终端
CN105518587B (zh) * 2014-05-30 2018-08-21 华为技术有限公司 终端设备显示方法和终端设备
CN104463119B (zh) * 2014-12-05 2017-10-31 苏州触达信息技术有限公司 基于超声与视觉的复合式手势识别设备及其控制方法
CN104615366B (zh) * 2014-12-31 2017-07-14 中国人民解放军国防科学技术大学 一种面向多设备的手势交互方法
JP5869711B1 (ja) 2015-04-07 2016-02-24 株式会社メディアドゥ コンテンツ表示装置、コンテンツ表示プログラム、コンテンツ表示方法
CN104808856B (zh) * 2015-05-04 2018-01-16 广东欧珀移动通信有限公司 一种模拟触摸屏滑动的方法、装置和一种移动终端
EP3133474B1 (en) * 2015-08-19 2019-03-27 Nxp B.V. Gesture detector using ultrasound
CN105511675B (zh) * 2015-11-20 2020-07-24 重庆桔子科技发展有限公司 触摸控制方法、用户设备、输入处理方法、移动终端及智能终端
CN105824427A (zh) * 2016-03-31 2016-08-03 广州飞傲电子科技有限公司 基于手势操作进行音量调节的方法及***
CN106055098B (zh) * 2016-05-24 2019-03-15 北京小米移动软件有限公司 隔空手势操作方法及装置
JP2018042191A (ja) 2016-09-09 2018-03-15 キヤノン株式会社 撮像制御装置、撮像装置の制御方法及びプログラム
US10754417B2 (en) * 2016-11-14 2020-08-25 Logitech Europe S.A. Systems and methods for operating an input device in an augmented/virtual reality environment
CN106843669A (zh) * 2016-12-06 2017-06-13 北京小度信息科技有限公司 应用界面操作方法和装置
US11353754B2 (en) 2017-02-21 2022-06-07 Semiconductor Energy Laboratory Co., Ltd. Display panel, display device, input/output device, and data processing device
CN107463329B (zh) * 2017-07-28 2019-08-27 Oppo广东移动通信有限公司 黑屏手势的检测方法、装置、存储介质及移动终端
JP6373537B1 (ja) 2017-09-04 2018-08-15 株式会社ワコム 空間位置指示システム
US11442160B2 (en) * 2018-01-09 2022-09-13 Infineon Technologies Ag Multifunctional radar systems and methods of operation thereof
CN108958844B (zh) * 2018-07-13 2021-09-03 京东方科技集团股份有限公司 一种应用程序的控制方法及终端
CN109144392B (zh) * 2018-08-22 2021-04-16 北京奇艺世纪科技有限公司 一种处理手势冲突的方法、装置及电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914126A (zh) * 2012-12-31 2014-07-09 腾讯科技(深圳)有限公司 一种多媒体播放器控制方法和装置
US20160011672A1 (en) * 2014-07-10 2016-01-14 Elliptic Laboratories As Gesture control
CN106484302A (zh) * 2016-10-31 2017-03-08 维沃移动通信有限公司 一种歌曲播放方法及移动终端
CN109032359A (zh) * 2018-08-28 2018-12-18 上海擎感智能科技有限公司 一种多媒体播放方法、装置、电子终端及介质
CN110045819A (zh) * 2019-03-01 2019-07-23 华为技术有限公司 一种手势处理方法及设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3910449A4

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023051272A1 (zh) * 2021-09-28 2023-04-06 华为技术有限公司 一种设备组网及声道配置方法和电子设备
CN115695518A (zh) * 2023-01-04 2023-02-03 广州市保伦电子有限公司 一种基于智能移动设备的ppt控制方法
CN115695518B (zh) * 2023-01-04 2023-06-30 广东保伦电子股份有限公司 一种基于智能移动设备的ppt控制方法

Also Published As

Publication number Publication date
KR20210118168A (ko) 2021-09-29
JP7391102B2 (ja) 2023-12-04
CN110045819B (zh) 2021-07-09
CN110045819A (zh) 2019-07-23
US20220137713A1 (en) 2022-05-05
EP3910449A1 (en) 2021-11-17
EP3910449A4 (en) 2022-03-30
JP2022522491A (ja) 2022-04-19

Similar Documents

Publication Publication Date Title
WO2020177585A1 (zh) 一种手势处理方法及设备
WO2021000803A1 (zh) 一种控制屏幕小窗口的方法及相关设备
WO2020187157A1 (zh) 一种控制方法和电子设备
WO2020156269A1 (zh) 一种具有柔性屏幕的电子设备的显示方法及电子设备
WO2021000881A1 (zh) 一种分屏方法及电子设备
CN113645351B (zh) 应用界面交互方法、电子设备和计算机可读存储介质
WO2021032097A1 (zh) 一种隔空手势的交互方法及电子设备
WO2021036770A1 (zh) 一种分屏处理方法及终端设备
WO2021063098A1 (zh) 一种触摸屏的响应方法及电子设备
WO2021078032A1 (zh) 用户界面的显示方法及电子设备
WO2021008589A1 (zh) 一种应用的运行方法及电子设备
WO2020062310A1 (zh) 手写笔检测方法、***及相关装置
WO2021057203A1 (zh) 一种操作方法和电子设备
WO2021057699A1 (zh) 具有柔性屏幕的电子设备的控制方法及电子设备
WO2021042878A1 (zh) 一种拍摄方法及电子设备
CN113986070A (zh) 一种应用卡片的快速查看方法及电子设备
WO2021190524A1 (zh) 截屏处理的方法、图形用户接口及终端
CN115016697A (zh) 投屏方法、计算机设备、可读存储介质和程序产品
WO2024032124A1 (zh) 卷轴屏开合方法及相关产品
WO2023029916A1 (zh) 批注展示方法、装置、终端设备及可读存储介质
WO2022002213A1 (zh) 翻译结果显示方法、装置及电子设备
WO2022228043A1 (zh) 显示方法、电子设备、存储介质和程序产品
WO2022095983A1 (zh) 一种防止手势误识别的方法及电子设备
WO2021129453A1 (zh) 一种截屏方法及相关设备
CN114740986A (zh) 手写输入显示方法及相关设备

Legal Events

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

Ref document number: 20766233

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020766233

Country of ref document: EP

Effective date: 20210812

ENP Entry into the national phase

Ref document number: 20217027292

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2021551816

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE