WO2021013132A1 - 输入方法及电子设备 - Google Patents

输入方法及电子设备 Download PDF

Info

Publication number
WO2021013132A1
WO2021013132A1 PCT/CN2020/103096 CN2020103096W WO2021013132A1 WO 2021013132 A1 WO2021013132 A1 WO 2021013132A1 CN 2020103096 W CN2020103096 W CN 2020103096W WO 2021013132 A1 WO2021013132 A1 WO 2021013132A1
Authority
WO
WIPO (PCT)
Prior art keywords
user
age
electronic device
pressing operation
pressing
Prior art date
Application number
PCT/CN2020/103096
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 EP20844692.2A priority Critical patent/EP3982239A4/en
Publication of WO2021013132A1 publication Critical patent/WO2021013132A1/zh
Priority to US17/581,505 priority patent/US20220150403A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • 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/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04886Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/1613Constructional details or arrangements for portable computers
    • G06F1/1633Constructional details or arrangements of portable computers not specific to the type of enclosures covered by groups G06F1/1615 - G06F1/1626
    • G06F1/1684Constructional details or arrangements related to integrated I/O peripherals not covered by groups G06F1/1635 - G06F1/1675
    • G06F1/1686Constructional details or arrangements related to integrated I/O peripherals not covered by groups G06F1/1635 - G06F1/1675 the I/O peripheral being an integrated camera
    • 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/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0414Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means using force sensing means to determine a position
    • 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/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/178Human faces, e.g. facial parts, sketches or expressions estimating age from face image; using age information for improving recognition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes

Definitions

  • This application relates to the technical field of electronic equipment, and in particular to an input method and electronic equipment.
  • touch screen input is to receive the user's operation on the screen through the touch screen, so that the electronic device makes a response corresponding to the operation.
  • the most commonly used operations by users usually include short presses (ie clicks), long presses, and swipes.
  • the embodiment of the present application provides an input method, which can enable the electronic device to accurately determine the pressing operation input by the user, make a correct response, and improve the input efficiency of the user.
  • an embodiment of the present application provides a photographing method applied to an electronic device that has a camera application installed on the electronic device.
  • the method includes: receiving a user's pressing operation on a photographing control of the camera application; The age of the user and the pressing duration of the pressing operation jointly determine the target event corresponding to the pressing operation; the target event is taking a photo or continuously taking multiple photos; and executing the target event.
  • the input method provided in the embodiments of the present application can determine whether the pressing operation input by the user is a long-press operation or a short-press operation according to the age of the user and the pressing duration of the pressing operation, and set different response times for users of different ages. All users can input a short-press operation or a long-press operation according to their own understanding of the duration definition, so that the camera can take one photo or take multiple photos continuously, which improves the user's shooting efficiency.
  • the foregoing determination of the target event corresponding to the pressing operation according to the age of the user and the pressing duration of the pressing operation includes: determining a critical value according to the age of the user; when the pressing duration is greater than or equal to the In the case of a critical value, the target event corresponding to the pressing operation is to take multiple photos continuously; when the pressing duration is less than the critical value, the target event corresponding to the pressing operation is to take a photo.
  • the critical value applicable to the user can be determined according to the user’s age.
  • a pressing operation with a pressing duration greater than or equal to the critical value is a long-press operation, which can realize continuous shooting of multiple photos; if the pressing duration is less than the critical value
  • the pressing operation is a short pressing operation, which can take a picture. Setting the threshold value according to the age of the user can prevent the electronic device from being unable to accurately recognize the user's intention due to the different understanding of the duration definition by users of different ages, and improve the user's photographing efficiency.
  • the above determining the threshold value according to the age of the user and the pressing duration of the pressing operation together includes: determining the threshold value according to the age of the user and the touch pressure value; wherein, the touch pressure value It is the average pressure value of the user pressing any control over a period of time.
  • the touch pressure value can also reflect the age of the user to a certain extent, generally, the older the user is, the less sensitive the response speed is, and the pressing force when inputting a pressing operation will be correspondingly greater.
  • the embodiment of the present application can determine the critical value suitable for the user according to the user's age and the touch pressure value, and can further accurately identify the type of pressing operation input by different users, so as to make a correct response and improve the user's photographing efficiency.
  • the foregoing determination of the critical value according to the age of the user and the pressing duration of the pressing operation includes: determining the critical value according to the age of the user and the range to which the touch pressure value belongs.
  • the pressure value of the user pressing any control within a period of time can be divided into several ranges, and the range to which the touch pressure value belongs is the range with the highest frequency of the pressure value of the user pressing any control during this period of time. .
  • the embodiment of the present application provides another method for determining the touch pressure value, which is obtained according to the user's usual usage habits. According to the touch pressure value and the user's age, a critical value that is more suitable for the user can be calculated, and the user's photographing efficiency is further improved.
  • the method before determining the target event corresponding to the pressing operation according to the age of the user, the method further includes: acquiring a face image of the user; and determining the age of the user according to the face image.
  • the face image can be acquired when the electronic device performs face unlocking.
  • the saved face image of the owner can be obtained from the internal memory, and the face image is used to unlock the face.
  • the face image is input into the convolutional neural network, and the age or age classification corresponding to the face image is output.
  • the convolutional neural network may be an age classification model, and the model may be trained from multiple face images of known age classification.
  • the embodiment of the present application intuitively determines the age of the user through the face image, so that the electronic device determines whether the pressing operation input by the user is a long-press operation or a short-press operation according to the user's age and the pressing duration of the pressing operation, thereby improving the user's shooting efficiency.
  • the method before determining the target event corresponding to the pressing operation according to the age of the user, the method further includes: determining the age of the user according to the font size of the electronic device.
  • the font size is used to indirectly reflect the age of the user, and the font size is used to determine the age of the user when the age of the user cannot be directly obtained, so that the photographing method provided in the embodiment of the application can be applied to more application scenarios.
  • the embodiments of the present application provide a photographing method, which is applied to an electronic device that has a camera application installed on the electronic device, and the method includes: receiving a first user's first press of a photographing control of the camera application Operation; in response to the first pressing operation, take a picture; receive a second pressing operation of the second user on the shooting control; in response to the second pressing operation, continuously take a plurality of photos; wherein, the first user The age is greater than the age of the second user, and the pressing duration of the first pressing operation and the second pressing operation are the same.
  • two users of different ages input a pressing operation with the same pressing duration, and the electronic device can make different responses.
  • the age of the user it is determined whether the pressing operation input by the user is a long press operation or a short press operation, and different reaction times are set for users of different ages. All users can input a short-press operation or a long-press operation according to their own understanding of the duration definition, so that the camera can take one photo or take multiple photos continuously, which improves the user's shooting efficiency.
  • taking a photo includes: determining the first corresponding first pressing operation according to the age of the first user and the pressing duration of the first pressing operation.
  • the target event is to take a photo; execute the first target event;
  • the above-mentioned continuous shooting of multiple photos in response to the second pressing operation includes: jointly determining the second user’s age and the pressing duration of the second pressing operation
  • the second target event corresponding to the second pressing operation is continuous shooting of multiple photos; the second target event is executed.
  • the embodiment of the present application may determine whether the pressing operation input by the user is a long-press operation or a short-press operation according to the age of the user and the pressing duration of the pressing operation, and set different reaction times for users of different ages. All users can input a short-press operation or a long-press operation according to their own understanding of the duration definition, so that the camera can take one photo or take multiple photos continuously, which improves the user's shooting efficiency.
  • determining that the first target event corresponding to the first pressing operation is to take a photo according to the age of the first user and the pressing duration of the first pressing operation includes: The age of a user determines a first critical value; in the case where it is determined that the first critical value is greater than the first pressing duration, it is determined that the first target event is to take a photo; the foregoing is based on the age of the second user and the first
  • the critical value applicable to the user can be determined according to the user’s age.
  • a pressing operation with a pressing duration greater than or equal to the critical value is a long-press operation, which can realize continuous shooting of multiple photos; if the pressing duration is less than the critical value
  • the pressing operation is a short pressing operation, which can take a picture. Setting the threshold value according to the age of the user can prevent the electronic device from being unable to accurately recognize the user's intention due to the different understanding of the duration definition by users of different ages, and improve the user's photographing efficiency.
  • the foregoing determining the first threshold value according to the age of the first user includes: determining the first threshold value according to the age of the first user and the first touch pressure value; wherein, the The first touch pressure value is the average pressure value of the first user pressing any control in a period of time; the above determining the second threshold value according to the age of the second user includes: according to the age of the second user and the second touch The pressure value determines the second critical value; where the second touch pressure value is an average pressure value of the second user pressing any control in a period of time.
  • the touch pressure value can also reflect the age of the user to a certain extent, generally, the older the user is, the less sensitive the response speed is, and the pressing force when inputting a pressing operation will be correspondingly greater.
  • the embodiment of the present application can determine the critical value suitable for the user according to the user's age and the touch pressure value, and can further accurately identify the type of pressing operation input by different users, so as to make a correct response and improve the user's photographing efficiency.
  • the pressure value of the first user pressing any control in a period of time can be divided into several ranges, and the range to which the first touch pressure value belongs is the pressure value of the first user pressing any control in the period of time.
  • the range with the highest frequency is the pressure value of the first user pressing any control in the period of time.
  • the pressure value of the second user pressing any control during a period of time can be divided into several ranges, and the range to which the second touch pressure value belongs is the pressure value of the second user pressing any control during this period of time.
  • the range with the highest frequency is the pressure value of the second user pressing any control during this period of time.
  • the embodiment of the present application provides another method for determining the first touch pressure value and the second touch pressure value.
  • the first touch pressure value and the second touch pressure value are respectively based on the normal time of the first user and the second user.
  • the habit of using is obtained, thereby calculating the first threshold value that is more in line with the first user and the second threshold value that is more in line with the second user, and further improves the photographing efficiency of the first user and the second user.
  • the aforementioned method before the aforementioned response to the first pressing operation, further includes: acquiring a face image of the first user; and determining the face image of the first user according to the face image of the first user.
  • Age before responding to the second pressing operation, the method further includes: acquiring a face image of the second user; and determining the age of the second user according to the face image of the second user.
  • the face image can be acquired when the electronic device performs face unlocking.
  • the saved face image of the owner can be obtained from the internal memory, and the face image is used to unlock the face.
  • the face image is input into the convolutional neural network, and the age or age classification corresponding to the face image is output.
  • the convolutional neural network may be an age classification model, and the model may be trained from multiple face images of known age classification.
  • the embodiment of the present application intuitively determines the age of the user through the face image, so that the electronic device determines whether the pressing operation input by the user is a long-press operation or a short-press operation according to the user's age and the pressing duration of the pressing operation, thereby improving the user's shooting efficiency.
  • the font size of the electronic device when the first user uses the electronic device is the first font size
  • the font size of the electronic device when the second user uses the electronic device is the second font size
  • the first font size is greater than the second font size
  • the method further includes: determining the age of the first user according to the first font size
  • the method further includes: determining the age of the second user according to the second font size.
  • the font size is used to indirectly reflect the age of the user, so that the photographing method can determine the age of the user through the font size when the user’s age cannot be directly obtained, so that the photographing method provided in the application embodiment can be applied to more application scenarios.
  • an embodiment of the present application provides an input method, which is applied to an electronic device, and the method includes: detecting a pressing operation acting on a first control; determining the pressing operation according to the relationship between the duration of the pressing operation and a critical value The type of operation; wherein the type of the pressing operation includes a short press operation and a long press operation, and the threshold value is determined by the age of the user; the target event corresponding to the pressing operation is determined according to the type of the pressing operation; the target event is executed.
  • the critical value applicable to the user may be determined according to the user's age.
  • a pressing operation with a pressing duration greater than or equal to the critical value is a long-press operation, and a pressing operation with a pressing duration less than the critical value is a short-press operation.
  • the target events corresponding to short-press operations and long-press operations are different. Setting the threshold value according to the user's age can prevent the electronic device from being unable to accurately recognize the user's intention due to the different understanding of the duration definition by users of different ages, and improve the user's input efficiency.
  • the above threshold is determined by the age of the user and the touch pressure value.
  • the touch pressure value is the average pressure of the user pressing any control within a period of time.
  • the touch pressure value can also reflect the age of the user to a certain extent, in general, the older the user is, the less sensitive the response speed is, and the pressing force when inputting a pressing operation will be correspondingly greater.
  • the embodiment of the present application can determine the critical value suitable for the user according to the user's age and the touch pressure value, and can further accurately identify the pressing operation types input by different users, so as to make a correct response and improve the input efficiency of the user.
  • the above threshold is determined by the user's age and the range to which the touch pressure value belongs.
  • the pressure value of the user pressing any control within a period of time can be divided into several ranges, and the range to which the above-mentioned touch pressure value belongs is the highest frequency of the pressure value of the user pressing any control during this period of time. range.
  • the embodiment of the present application provides another method for determining the touch pressure value, which is obtained according to the user's usual usage habits. According to the touch pressure value and the age of the user, a critical value that is more suitable for the user can be calculated, and the input efficiency of the user is further improved.
  • the above method before determining the type of the pressing operation according to the relationship between the duration of the pressing operation and the critical value, the above method further includes: determining the age of the user.
  • the foregoing determining the age of the user includes: acquiring a face image of the user; and determining the age of the user according to the face image of the user.
  • the face image can be acquired when the electronic device performs face unlocking.
  • the saved face image of the owner can be obtained from the internal memory, and the face image is used to unlock the face.
  • the face image is input into the convolutional neural network, and the age or age classification corresponding to the face image is output.
  • the convolutional neural network may be an age classification model, and the model may be trained from multiple face images of known age classification.
  • the embodiment of the present application intuitively determines the age of the user through the face image, so that the electronic device determines whether the pressing operation input by the user is a long-press operation or a short-press operation according to the user's age and the pressing duration of the pressing operation, thereby improving the user's shooting efficiency.
  • the foregoing determining the age of the user includes: determining the age of the user according to the font size of the electronic device.
  • the font size is used to indirectly reflect the age of the user, so that the photographing method can determine the age of the user through the font size when the user’s age cannot be directly obtained, so that the photographing method provided in the application embodiment can be applied to more application scenarios.
  • an embodiment of the present application provides an electronic device, including: one or more processors, a memory, and a wireless communication module; the foregoing memory and the wireless communication module are coupled with one or more processors, and the foregoing memory is used for
  • the computer program code is stored, and the computer program code includes computer instructions.
  • the electronic device executes the photographing method provided in the first aspect or any one of the first aspects.
  • an embodiment of the present application provides an electronic device, including: one or more processors, a memory, and a wireless communication module; the foregoing memory and the wireless communication module are coupled to one or more processors, and the foregoing memory is used
  • the computer program code is stored, and the computer program code includes computer instructions.
  • an embodiment of the present application provides an electronic device, including: one or more processors, a memory, and a wireless communication module; the foregoing memory and the wireless communication module are coupled with one or more processors, and the foregoing memory uses
  • the computer program code is stored, and the computer program code includes computer instructions.
  • the electronic device executes the input method provided by the third aspect or any one of the third aspects.
  • 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 method provided in the first aspect or any one of the first aspects. How to take pictures.
  • 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 method provided in the second aspect or any one of the second aspect How to take pictures.
  • 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 method provided in the third aspect or any one of the third aspects. Input method.
  • 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 photographing method provided in the first aspect or any implementation manner of the first aspect.
  • an embodiment of the present application provides a computer program product that, when the computer program product runs on a computer, causes the computer to execute the photographing method provided in the second aspect or any one of the second aspects.
  • the embodiments of the present application provide a computer program product, which when the computer program product runs on a computer, causes the computer to execute the input method provided in the third aspect or any one of the third aspects.
  • the electronic device in the fourth aspect, the computer storage medium in the seventh aspect, or the computer program product in the tenth aspect provided above are all used to execute the photographing method provided in the first aspect. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here.
  • the electronic device described in the fifth aspect, the computer storage medium described in the eighth aspect, or the computer program product described in the eleventh aspect provided above are all used to execute the photographing method provided in the second aspect. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here.
  • the electronic device described in the sixth aspect, the computer storage medium described in the ninth aspect, or the computer program product described in the twelfth aspect provided above are all used to execute the input method provided in the third aspect. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here.
  • FIG. 1 is a schematic diagram of the structure of an electronic device provided by an embodiment of the application.
  • FIG. 2 is a block diagram of the software structure of an electronic device provided by an embodiment of the application.
  • FIG. 3 is a schematic diagram of an application scenario provided by an embodiment of the application.
  • Figure 4 is a schematic diagram of another application scenario provided by an embodiment of the application.
  • Figure 5 is a schematic diagram of another application scenario provided by an embodiment of the application.
  • FIG. 6 is a schematic flowchart of a photographing method provided by an embodiment of the application.
  • FIG. 7 is a schematic flowchart of another photographing method provided by an embodiment of this application.
  • FIG. 8 is a schematic flowchart of an input method provided by an embodiment of the application.
  • FIG. 9 is a schematic flowchart of another input method provided by an embodiment of the application.
  • the pressing duration threshold value (referred to as the threshold value in the following embodiments) applicable to the long-press operation and the short-press operation of the user can be calculated for different users, and the operation input by the user can be accurately identified according to the threshold value. , Make the correct response and improve the user’s input efficiency.
  • the electronic devices involved in the embodiments of this application may be portable mobile terminals, such as mobile phones, tablet computers, netbooks, personal digital assistants (PDAs), wearable electronic devices (such as smart bracelets, smart watches, etc.), virtual Realistic equipment, etc.
  • portable mobile terminals such as mobile phones, tablet computers, netbooks, personal digital assistants (PDAs), wearable electronic devices (such as smart bracelets, smart watches, etc.), virtual Realistic equipment, etc.
  • FIG. 1 shows a schematic structural diagram of an electronic device 100.
  • the electronic device 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, and an antenna 2.
  • Mobile communication module 150 wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, user An identification module (subscriber identification module, SIM) card interface 195, a timer 196, and so on.
  • 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 invention does not constitute a specific limitation on the electronic device 100.
  • the electronic device 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 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, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU), etc.
  • AP application processor
  • modem processor modem processor
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor 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 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 be configured to calculate a critical value suitable for the user according to the user characteristics, and then determine whether the pressing operation input by the user is a long-press operation or a short-press operation according to the critical value, and make an accurate response.
  • 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, a universal asynchronous transceiver receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / Or Universal Serial Bus (USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB Universal Serial Bus
  • 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 electronic device 100, and can also be used to transfer data between the electronic device 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 invention is merely illustrative and does not constitute a structural limitation of the electronic device 100.
  • the electronic device 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 electronic device 100. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device 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 charging management module 140, and supplies power to the processor 110, the internal memory 121, 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.
  • 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 electronic device 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 electronic device 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 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 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.
  • 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.
  • 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 electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite system
  • FM frequency modulation
  • 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 electronic device 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 is used to display images, videos, etc.
  • 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 electronic device 100 may include one or N display screens 194, and N is a positive integer greater than one.
  • the display screen 194 may display a corresponding user interface according to the type of pressing operation input by the user.
  • the electronic device 100 can implement 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 transfers the electrical signal to the ISP for processing and 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 electronic device 100 may include 1 or N cameras 193, and N is a positive integer greater than 1.
  • the camera 193 may respond according to the type of the pressing operation input by the user on the shooting control. For example, when the user inputs a long press operation on the shooting control, the camera 193 can take multiple photos at a preset frequency. When the user inputs a short press operation on the shooting control, the camera 193 can take a picture.
  • 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 electronic device 100 selects the 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 electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in a variety of encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • MPEG moving picture experts group
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • the NPU can realize applications such as intelligent cognition of the electronic device 100, such as image recognition, face recognition, voice recognition, text understanding, and so on.
  • 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 electronic device 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, where the executable program code includes instructions.
  • 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 electronic device 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.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the electronic device 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 electronic device 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 electronic device 100 answers a call or 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 electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement noise reduction functions in addition to collecting sound signals. In other embodiments, the electronic device 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 pressure sensor 180A may be used to detect the pressure value of the user inputting the pressing operation. Then calculate the critical value applicable to the user based on the pressure value.
  • the gyro sensor 180B may be used to determine the movement posture of the electronic device 100.
  • the angular velocity of the electronic device 100 around three axes ie, x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the shake angle of the electronic device 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 electronic device 100 through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 180C is used to measure air pressure.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip holster.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and used in applications such as horizontal and vertical screen switching, pedometers and so on.
  • the electronic device 100 can measure the distance by infrared or laser.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 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 electronic device 100 can adaptively adjust the brightness of the display screen 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 electronic device 100 is in the pocket to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, etc.
  • the temperature sensor 180J is used to detect temperature.
  • Touch sensor 180K also called “touch device”.
  • 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 electronic device 100, which is different from the position of the display screen 194.
  • the pressing operation input by the user may be detected by the touch sensor 180K.
  • the bone conduction sensor 180M can acquire vibration signals.
  • 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 electronic device 100 may receive key input, and generate key signal input related to user settings and function control of the electronic device 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.
  • 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 inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device 100.
  • the timer 196 can be used for timing.
  • the timer 196 in the embodiment of the present application may be used to record the pressing duration of the pressing operation input by the user, so that the processor 110 determines whether the pressing operation input by the user is a long pressing operation or a short pressing operation according to the pressing duration.
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiment of the present invention takes an Android system with a layered architecture as an example to exemplify the software structure of the electronic device 100.
  • FIG. 2 is a software structure block diagram of an electronic device 100 according to an embodiment of the present invention.
  • 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.
  • the data may include video, image, audio, phone 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 electronic device 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 and so on.
  • 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. For example, text messages are prompted in the status bar, prompt sounds, electronic devices vibrate, and indicator lights flash.
  • 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 corresponding hardware interrupt is sent to the kernel layer.
  • the kernel layer processes touch operations into original input events (including touch coordinates, time stamps of touch operations, etc.).
  • the original input events are stored in the kernel layer.
  • the content provider of the application framework layer obtains the original input event from the kernel layer and identifies the control corresponding to the input event through the view system. Taking the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the camera application icon as an example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer.
  • the camera 193 captures still images or videos.
  • Scenario 1 Input a short-press operation or a long-press operation on the icon of the application program on the electronic device 100. Next, take the application as the camera as an example.
  • a in FIG. 3 exemplarily shows the user interface 20 for the application menu on the electronic device 100.
  • the user interface 20 may include a status bar 201, a time component icon 204, and a weather component icon 203, and multiple application icons such as a camera icon 202, a WeChat icon 208, a setting icon 209, an album icon 207, a Weibo icon 206, and an Alipay icon 205
  • the interface 20 may also include a page indicator 210, a phone icon 211, a short message icon 212, a contact icon 213, and a navigation bar 214. among them:
  • the status bar 201 may include: operator indicators (for example, the operator’s name "China Mobile"), one or more signal strength indicators of wireless fidelity (wireless fidelity, Wi-Fi) signals, and mobile communication signals (also Called cellular signal) one or more signal strength indicators and battery status indicators.
  • operator indicators for example, the operator’s name "China Mobile”
  • signal strength indicators of wireless fidelity wireless fidelity, Wi-Fi
  • mobile communication signals also Called cellular signal
  • the time component icon 204 can be used to indicate the current time, such as date, day of the week, hour and minute information, etc.
  • the weather component icon 203 can be used to indicate the type of weather, such as cloudy to clear, light rain, etc., and can also be used to indicate information such as temperature.
  • the page indicator 210 may be used to indicate which page of the application the user is currently browsing. The user can slide the area of multiple application icons left and right to browse application icons in other pages.
  • the navigation bar 214 may include system navigation keys such as a return button 2141, a home screen button 2142, and a call out task history button 2143.
  • the main interface is an interface displayed after the electronic device 100 detects a user operation on the main interface button 2142 on any user interface.
  • the electronic device 100 may display the previous user interface of the current user interface.
  • the electronic device 100 may display the main interface.
  • the electronic device 100 can display the task that the user has recently opened.
  • the naming of each navigation key can also be other.
  • 2141 can be called Back Button
  • 2142 can be called Home button
  • 2143 can be called Menu Button, which is not limited in this application.
  • the navigation keys in the navigation bar 214 are not limited to virtual keys, and can also be implemented as physical keys.
  • a in FIG. 3 only exemplarily shows the user interface on the electronic device 100 and should not constitute a limitation to the embodiment of the present application.
  • the electronic device 100 can detect the short-press operation acting on the camera icon 202, and in response to the short-press operation, the electronic device 100 can display the user interface 30 for taking a photo shown in B in FIG. 3.
  • the user interface 30 may include: a shooting control 301, a shooting mode list 302, a control 303, a control 304, and a viewfinder 305. among them:
  • the shooting control 301 can be used to take photos.
  • the electronic device 100 can detect a user operation (such as a click operation on the shooting control 301) acting on the shooting control 301, and in response to the operation, the electronic device 100 can determine the captured picture, and display the thumbnail of the captured picture in the control 303 Sketch map.
  • the user can click the shooting control 301 to trigger shooting.
  • the shooting control 301 may be a button or other form of control.
  • One or more shooting mode options may be displayed in the shooting mode list 302.
  • the electronic device 100 can detect a user operation acting on the shooting mode option, and in response to the operation, the electronic device 100 can start the shooting mode selected by the user.
  • the electronic device can also detect a sliding operation (such as a left or right sliding operation) in the shooting mode list 302, and in response to this operation, the electronic device 100 can switch the shooting mode options displayed in the shooting mode list 302 so that Users browse more shooting mode options.
  • the shooting mode option may be an icon or another form of option.
  • the shooting modes may include: portrait shooting mode, photo shooting mode, video shooting mode, night scene shooting mode, professional shooting mode and large aperture shooting mode, etc. Among them, different shooting modes correspond to different shooting parameters.
  • the control 303 can be used to open an album.
  • the electronic device 100 can detect a user operation (such as a click operation on the control 303) acting on the control 303, and in response to the operation, the electronic device 100 can open the photo album and display the latest saved picture.
  • the control 304 can be used to switch cameras.
  • the electronic device 100 can detect a user operation (such as a click operation on the control 304) acting on the control 304, and in response to the operation, the electronic device 100 can switch the camera (such as switching the rear camera to the front camera, or the front camera). Switch to the rear camera).
  • a user operation such as a click operation on the control 304
  • the electronic device 100 can switch the camera (such as switching the rear camera to the front camera, or the front camera). Switch to the rear camera).
  • the viewfinder frame 305 can be used to display the picture acquired by the camera 193.
  • the electronic device 100 can refresh the display content therein in real time.
  • the camera 193 used to obtain pictures may be a rear camera or a front camera.
  • the electronic device 100 can detect a long-press operation acting on the camera icon 202, and in response to the long-press operation, the electronic device 100 can display a function list 215 about the camera application shown in C in FIG. 3 in the user interface 20.
  • the function list 215 may include one or more function options, such as a dynamic photo option 215a, a large aperture photographing option 215b, a video recording option 215c, and a Selfie option 215d. among them:
  • the dynamic photo option 215a can be used to enable dynamic photo shooting.
  • the electronic device 100 can detect a user operation (such as a click operation on the dynamic photo option 215a) acting on the dynamic photo option 215a, and in response to the operation, the electronic device 100 can display a user interface for taking a dynamic photo.
  • a dynamic photo is a photo composed of multiple photos in chronological order.
  • the large aperture option 215b can be used to turn on the large aperture photo mode.
  • the electronic device 100 can detect a user operation (such as a click operation on the large aperture option 215b) acting on the large aperture option 215b, and in response to the operation, the electronic device 100 can display a user interface for the large aperture photo mode.
  • a user operation such as a click operation on the large aperture option 215b
  • the recording option 215c can be used to enable the recording function.
  • the electronic device 100 can detect a user operation (such as a click operation on the recording option 215c) acting on the recording option 215c, and in response to the operation, the electronic device 100 can display a user interface for recording.
  • a user operation such as a click operation on the recording option 215c
  • the Selfie option 215d can be used to turn on Selfie.
  • the electronic device 100 may detect a user operation (such as a click operation on the selfie option 215d) acting on the selfie option 215d, and in response to the operation, the electronic device 100 may display a user interface for selfie.
  • a user operation such as a click operation on the selfie option 215d
  • function options included in the above function list 215 are exemplary descriptions, and other function options may also be included in specific implementation, which is not limited in the embodiment of the present application.
  • the user inputs a short-press operation and a long-press operation to the icon 205 of other applications, such as the icon 205 of the Alipay application, and the electronic device 100 can also make different responses.
  • This embodiment of the application does not do this. limited.
  • Scenario 2 Input a short press operation or a long press operation on the shooting control 301.
  • the electronic device 100 can detect a short press operation on the shooting control 301, and in response to the short press operation, the electronic device 100 can take a photo.
  • the electronic device 100 can detect the long-press operation on the shooting control 301. In response to the long-press operation, the electronic device 100 can continuously take multiple photos until the electronic device 100 detects that the long-press operation on the shooting control 301 ends.
  • the frequency at which the electronic device 100 takes photos may be, but is not limited to, 10 photos per second or 5 photos per second.
  • the specific shooting frequency can be set by the user or the default shooting frequency set by the manufacturer.
  • Scenario 3 Input a short press operation or a long press operation on the thumbnail of a photo in the album.
  • a in FIG. 5 shows a user interface 40 for displaying a list of photos in an album.
  • the electronic device 100 may display the user interface 40 after detecting a short press operation on the album icon 207 in the user interface 20.
  • the user interface 40 may include a photo list 401.
  • the photo list 401 may be used to display thumbnails of photos stored in the internal memory 121 of the electronic device 100.
  • the user can browse other thumbnails by entering a sliding operation in the user interface 40.
  • the size of the thumbnail is smaller than the size of the photo corresponding to the thumbnail
  • the number of pixels contained in the thumbnail is smaller than the number of pixels of the photo corresponding to the thumbnail.
  • a in Fig. 5 exemplarily shows the thumbnails of 12 photos, marked as P1-P12.
  • a in FIG. 5 only exemplarily marks P1, P2, P3, and P7, and the others are not marked. Next, take P7 as an example.
  • the electronic device 100 can detect a short press operation on P7, and in response to the short press operation, the electronic device 100 can display a user interface for displaying photos corresponding to P7, that is, the user interface 50 shown in B in FIG. 5.
  • the user interface 50 may include: a return control 501, a display area 502, a sharing control 503, a favorite control 504, a delete control 505, an edit control 506, a status bar, and a navigation bar. among them:
  • the status bar is consistent with the status bar 201 in the user interface 20, and will not be repeated here.
  • the navigation bar is consistent with the navigation bar 214 in the user interface 20, and will not be repeated here.
  • the return control 501 can be used to return to the previous user interface.
  • the electronic device 100 can detect a user operation on the return control 501 (for example, a click operation on the return control 501), and in response to the operation, the electronic device 100 can display the previous user interface.
  • the last interface in the embodiment of the present application is the user interface 40 shown in A in FIG. 5.
  • the display area 502 can be used to display the photo corresponding to the thumbnail P7.
  • the sharing control 503 can be used to share the photos displayed in the display area 502.
  • the electronic device 100 can detect a user operation on the sharing control 503 (such as a click operation on the sharing control 503), and in response to the operation, the electronic device 100 can display a user interface for sharing the photo.
  • the favorite control 504 can be used to add a favorite tag to the photos displayed in the display area 502.
  • the electronic device 100 can detect a user operation on the favorite control 503 (for example, a click operation on the favorite control 504), and in response to the operation, the electronic device 100 can add a favorite tag to the photos displayed in the display area 502. If on this basis, the electronic device 100 detects the click operation on the favorite control 504 again, in response to the operation, the electronic device 100 can delete the favorite tag of the photo.
  • the delete control 505 can be used to delete the photos displayed in the display area 502 from the internal memory 121.
  • the electronic device 100 can detect a user operation on the delete control 505 (for example, a click operation on the delete control 505), and in response to the operation, the electronic device 100 can delete the photo from the internal memory 121.
  • the editing control 506 can be used to edit the photos displayed in the display area 502.
  • the electronic device 100 can detect a user operation on the edit control 506 (such as a click operation on the edit control 506), and in response to the operation, the electronic device 100 can receive a user operation for editing the photo, such as but not Limited to adding text to the photo, cropping the photo or rotating the photo, etc.
  • the electronic device 100 can detect the long press operation on P7, and in response to the long press operation, the electronic device 100 can display a user interface for selecting a photo, that is, the user interface 40 shown in C in FIG. 5.
  • the user interface 40 may include a photo list 401, a cancel control 402, a selection result indicator 403, a sharing control 404, a delete control 405, a select all control 406, and more controls 407. among them:
  • Each thumbnail in the photo list 401 also includes a selection control 4011.
  • the selection control 4011 can be used to select the thumbnail of the corresponding photo.
  • the electronic device 100 can detect a user operation (such as a click operation on the selection control 4011) acting on the selection control 4011, and in response to the operation, the electronic device 100 can display the result of the thumbnail being selected.
  • the selected display mode of the thumbnail may be to display the selected mark in the selection control 4011, and the mark may be " ⁇ " shown in C in FIG. 5, for example.
  • the cancel control 402 can be used to cancel the selection of the thumbnail and display the user interface 40 shown in A in FIG. 5.
  • the electronic device 100 can detect a user operation (such as a click operation on the cancel control 402) acting on the cancel control 402, and in response to the operation, the electronic device 100 can cancel the selected thumbnail and display the A shown in FIG. 5 The user interface 40.
  • the selection result indicator 403 may be used to indicate the result of the currently selected thumbnail. For example, "1 item has been selected” shown by C in FIG. 5.
  • the sharing control 404 can be used to share the photo corresponding to the selected thumbnail.
  • the electronic device 100 can detect a user operation on the sharing control 404 (for example, a click operation on the sharing control 404), and in response to the operation, the electronic device 100 can display a user interface for sharing a photo corresponding to the selected thumbnail .
  • the delete control 405 can be used to delete the photo corresponding to the selected thumbnail from the internal memory 121.
  • the electronic device 100 can detect a user operation on the delete control 405 (such as a click operation on the delete control 405), and in response to this operation, the electronic device 100 can delete the photo corresponding to the selected thumbnail from the internal memory 121 .
  • the select all control 406 can be used to select each thumbnail in the photo list 401.
  • the electronic device 100 can detect a user operation on the select all control 406 (for example, a click operation on the select all control 406), and in response to the operation, the electronic device 100 can select each thumbnail in the photo list 401.
  • More controls 407 can be used to display other functional options, such as but not limited to download options, copy options, and so on.
  • the electronic device 100 can detect a user operation on more controls 407 (such as a click operation on more controls 407), and in response to the operation, the electronic device 100 can display other function options.
  • the time critical value used to distinguish whether a pressing operation is a long-press operation or a short-press operation is referred to as a critical value for short.
  • a pressing operation whose pressing duration is greater than or equal to the critical value is a long-press operation, and the pressing duration is less than the critical value.
  • the pressing operation of the value is a short pressing operation (ie, a click operation). Due to the different operating habits of different users, the critical values applicable to different users are also different.
  • Method 1 Calculate the critical value applicable to the user according to the user's age and the pressure value of the user pressing the control (hereinafter referred to as the touch pressure value).
  • the adjustment duration based on the reference value is calculated according to the user's age and the touch pressure value.
  • the relationship between the threshold value and the user’s age and touch pressure value can be as follows:
  • Time is the critical value
  • basetime is the reference value
  • F(age) is the adjustment time corresponding to age
  • F(pressure) is the adjustment time corresponding to the touch pressure value, 0 ⁇ 1, 0 ⁇ ⁇ 1, 0 ⁇ 1.
  • the reference value can be but is not limited to 400 milliseconds (ms).
  • the value of ⁇ may but is not limited to 0.08
  • the value of ⁇ may but is not limited to 0.5
  • the value of ⁇ may but is not limited to 0.5.
  • Table 1 exemplarily shows the relationship between user age and adjustment duration.
  • the first column in Table 1 is age classification
  • the second column is adjustment duration.
  • the age classification may include: 0 ⁇ age ⁇ 60 and age>60.
  • the adjustment duration F(age) corresponding to 0 ⁇ age ⁇ 60 is 0ms; the adjustment duration F(age) corresponding to age>60 is 100ms.
  • age classification is only an exemplary description, and there may be other age classifications in specific implementation, which is not limited in the embodiment of the present application.
  • the value of the adjustment duration F(age) corresponding to the above age classification is only an exemplary illustration. In specific implementation, it can also correspond to the value of other adjustment duration F(age), and the value of the adjustment duration F(age) is also different. It is limited to a non-negative number, and can also be a negative number in specific implementation, which is not limited in the embodiments of the present application.
  • Table 2 exemplarily shows the relationship between the touch pressure value pressure and the adjustment duration F (pressure).
  • the first column in Table 2 is the classification of touch pressure values
  • the second column is the adjustment duration.
  • the touch pressure value classification may include: 0 ⁇ pressure ⁇ 0.7, 0.7 ⁇ pressure ⁇ 0.9, and pressure>0.9.
  • the adjustment duration F(pressure) corresponding to 0 ⁇ pressure ⁇ 0.7 is 0ms
  • the adjustment duration F(pressure) corresponding to 0.7 ⁇ pressure ⁇ 0.9 is 50ms
  • the adjustment duration F(pressure) corresponding to pressure>0.9 is 150ms.
  • touch pressure value classification is only an exemplary description, and there may be other touch pressure value classifications in a specific implementation, which is not limited in the embodiment of the present application.
  • the value of the adjustment duration F (pressure) corresponding to the above-mentioned touch pressure value classification is only an exemplary description. In specific implementation, it can also correspond to other adjustment duration F (pressure) values, and the adjustment duration F (pressure)
  • the value is not limited to a non-negative number, and may also be a negative number in specific implementation, which is not limited in the embodiments of the present application.
  • the critical value can also be determined directly according to the user's age and the touch pressure value, which is not limited in the embodiment of the present application.
  • the electronic device 100 may perform age classification according to the image captured by the camera when the face is unlocked.
  • a convolutional neural network can be used to estimate the age of a face, and the face image is input into the convolutional neural network system to calculate the probability that the face image belongs to each age category, and the age category with the highest probability is determined as the face The age classification of the image.
  • the aforementioned convolutional neural network may be an age classification model.
  • the training process of the age classification model can at least include the following steps:
  • Step 1 Determine the sample set.
  • the sample set may include multiple face images and the age classification corresponding to the face images.
  • Step 2 Set the standard face image corresponding to each age category.
  • Step 3 Compare the face feature key points of the face image in the sample set with the face feature key points of the standard face image, align and adjust the key points of the face image in the sample set, and then align and adjust the key points in the adjusted sample set.
  • the contour of the face image is extracted to obtain a face contour map, and the face contour map is normalized and input into the convolutional neural network system to train the classification model.
  • the aforementioned key points of facial features include but are not limited to: eye contour, mouth contour, eyebrow contour, face contour, forehead contour, and the like.
  • the face image may include, but is not limited to, 88 key points of facial features.
  • the above key point alignment and adjustment are used to compare the face image with the standard face corresponding to each age category, determine the standard face corresponding to the age category closest to the face image, and then use affine
  • the transformation rotates and translates the face image, and adjusts the angle and position of the face image in the standard face image to be consistent to avoid the angle and position of the face in the face image or the position of the face in the image. error.
  • contour extraction may specifically fit contour lines of various parts of the face (such as eyebrows, eyes, mouth, etc.).
  • wavelet transform can be performed on the adjusted face image, high frequency components are filtered and noise is removed, and a frequency domain image of low frequency components, that is, a face contour image, is obtained.
  • the normalization process can be used to normalize the above-mentioned face contour image, and process various face contour maps of different sizes into the same size face contour map to avoid errors caused by faces of different sizes. .
  • the face images in the sample set can be input again into the age classification model in turn, and the output result of the face classification model is compared with the age classification of the face image. If they are inconsistent, collect the face image as a sample image, and perform the above steps 1 to 3 again to calibrate the age classification model until the accuracy of the final output result exceeds a preset threshold, such as 90%, to obtain the final age classification model.
  • a preset threshold such as 90%
  • the network structure sequence of the age classification model provided in the embodiment of the present application is the input layer, K group layers, fully connected layer, and softmax layer, where K is greater than or equal to 1.
  • the above-mentioned input layer may be used to receive the input face image to be recognized, the input face image is YUV data, and the input layer may convert the input YUV data into RGB data.
  • the above sub-layer can be used to convolve and normalize the RGB data output by the input layer.
  • the sub-layer can include a convolutional layer, an activation layer, and a normalization layer.
  • the kernel size and output size of each layer in the convolutional layer, activation layer, and normalization layer can be adjusted arbitrarily, and each layer has an input and produces an output, and the output of each layer is used as the input of the next layer .
  • the above-mentioned fully connected layer can be used to fit the contour line of the face image.
  • the above softmax layer is used to output the output result of age classification.
  • the output result can specifically be the probability of each age category.
  • the probability of each age category belongs to [0,1], and the sum of the probabilities of each age category is 1.
  • the age category with the greatest probability is determined as the age category of the input face image.
  • the embodiment of the present application can be divided into two categories according to age: 0 ⁇ age ⁇ 60, age>60. If a face image is input into the above age classification model, the output of the softmax layer is: the probability of 0 ⁇ age ⁇ 60 is 80%, and the probability of age>60 is 20%, then the final age of the face image is determined The classification is 0 ⁇ age ⁇ 60.
  • age categories listed above there can be other age categories, such as: 0 ⁇ age ⁇ 2, 2 ⁇ age ⁇ 6, 6 ⁇ age ⁇ 14, 14 ⁇ age ⁇ 35, 35 ⁇ age ⁇ 60 and age>60, etc.
  • the embodiments of the present application do not limit the specific classification of age.
  • the user can also perform age recognition based on the image captured by the camera when the user uses the front camera to take a self-portrait, which is not limited in this embodiment of the application.
  • the internal memory 121 of the electronic device 100 may save the face image of the owner for unlocking the face.
  • the electronic device 100 can directly obtain the face image stored in the internal memory 121 and perform age recognition.
  • the electronic device 100 may detect the touch pressure value through the pressure sensor 180A.
  • the touch pressure value can be divided into several ranges.
  • the touch pressure value can be divided into three ranges: 0 ⁇ pressure ⁇ 0.7, 0.7 ⁇ pressure ⁇ 0.9, pressure>0.9, and so on.
  • the touch pressure value used to calculate the critical value in the embodiment of the present application may be the result of the electronic device 100 collecting the touch pressure value of the user over a period of time, or may be the touch pressure value when the user clicks the control in a single time.
  • the electronic device 100 collects the touch pressure value of the user in a period of time
  • the range in which the user touch pressure value is located at the highest frequency in a period of time may be determined as the range to which the user touch pressure value belongs.
  • the adjustment duration corresponding to the touch pressure value range can be determined, so as to calculate the critical value according to the adjustment duration.
  • the touch pressure value calculated in this way can conform to the user's long-term use habits, and avoid the inaccuracy of the calculated touch pressure value due to a single operation error.
  • the electronic device 100 can detect the pressure value when the user inputs a touch operation on any control in a day. If the user inputs 100 touch operations in a day, the range of the touch pressure value of 60 touch operations in the 100 touch operations is 0.7 ⁇ pressure ⁇ 0.9, and the touch pressure value of 25 touch operations The range is 0 ⁇ pressure ⁇ 0.7, and the range of the touch pressure value of 15 touch operations is pressure>0.9, then the electronic device 100 can determine that the range of the user's touch pressure value is 0.7 ⁇ pressure ⁇ 0.9. According to Table 2, it can be further determined that the adjustment duration F (pressure) corresponding to the user's touch pressure value is 50 ms.
  • the electronic device 100 can calculate the critical value applicable to the current touch operation in real time when the user inputs the touch operation, and according to the calculation result of the critical value Respond to the touch operation input by the user. In this way, an accurate response can be made to each touch operation, and the accuracy of the response of the electronic device to the touch operation will not be affected by the change of the user.
  • the touch pressure value may be the average pressure value of the user pressing any control within a period of time.
  • the electronic device 100 may collect the pressure value of the user pressing any control within a period of time.
  • the period of time is, for example, but not limited to, one day.
  • the electronic device 100 can record the number of times the user presses the controls in a period of time, and the pressure value when pressing each control, and calculate the sum of the pressure values when pressing all the controls divided by the number of presses.
  • the average pressure value is the touch pressure value.
  • the threshold value may also be related only to the user's age or only related to the touch pressure value, which is not limited in the embodiment of the present application.
  • Manner 2 Calculate the critical value suitable for the user according to the font size of the electronic device 100 and the pressure value of the user pressing the control (ie, the touch pressure value).
  • how to determine the touch pressure value can refer to the relevant part in the first manner, which is not repeated here.
  • the font size of the electronic device 100 can reflect the age of the user to a certain extent. It can be known that the font size of the electronic device 100 can be set by the user, and the font size can generally include the following types: extra large, super large, large, standard, and small. Characters with a large font type occupy the largest area of the display screen, characters with a large font type occupy the second place, and characters with a small font type occupy the smallest area of the display screen.
  • the relationship between the critical value and the font size of the electronic device 100 and the pressure value of the user pressing the control may be as follows:
  • Time is the critical value
  • basetime is the reference value
  • F(font) is the adjustment time corresponding to the font
  • F(pressure) is the adjustment time corresponding to the touch pressure value, 0 ⁇ 1, 0 ⁇ ⁇ 1, 0 ⁇ 1.
  • the reference value can be but is not limited to 400 milliseconds (ms).
  • the value of ⁇ may but is not limited to 0.08
  • the value of ⁇ may but is not limited to 0.5
  • the value of ⁇ may but is not limited to 0.5.
  • Table 3 exemplarily shows the relationship between font size and adjustment duration.
  • the first column in Table 3 is the font size classification
  • the second column is the adjustment duration.
  • the font size classification can include: extra large, super large, large, standard, and small.
  • the corresponding adjustment time F (font) is 500ms
  • the corresponding adjustment time F (font) is 250ms
  • the corresponding adjustment time F (font) It is 0ms.
  • the reference value basetime in equation (2) 400ms
  • 0.08
  • 0.5
  • 0.5
  • font size classification is only an exemplary description, and more or fewer font types may be included in specific implementation, which is not limited in the embodiment of the present application.
  • the value of the adjustment duration F (font) corresponding to the above font size classification is only an exemplary illustration. In specific implementation, it can also correspond to the value of other adjustment duration F (font), and the value of the adjustment duration F (font) is also It is not limited to a non-negative number, and may also be a negative number in specific implementation, which is not limited in the embodiments of the present application.
  • the critical value may also be only related to the font size, or only related to the touch pressure value, which is not limited in the embodiment of the present application.
  • the threshold can also be determined by the user's age and font size.
  • the critical value can also be determined by the user's age, font size, and touch pressure value, which is not limited in the embodiment of the present application.
  • the threshold can be determined by at least one of the user's age, font size, and touch pressure value.
  • the photographing method provided in the embodiment of the present application will be introduced next. This method can be applied to the electronic device 100 shown in FIG. 1, and a camera application can be installed on the electronic device 100.
  • Fig. 6 exemplarily shows a schematic flowchart of a photographing method provided by an embodiment of the present application. As shown in Figure 6, the photographing method may at least include the following steps:
  • the electronic device 100 can detect the pressing operation of the photographing control 301 acting on the camera application through the touch sensor 180K.
  • the pressing operation can be divided into a long pressing operation and a short pressing operation according to the pressing time.
  • S102 Determine the target event corresponding to the pressing operation according to the age of the user and the pressing duration of the pressing operation; where the target event is to take a photo or to take multiple photos continuously.
  • different thresholds may be set for the ages of different users.
  • the threshold can be used to distinguish whether a pressing operation is a long-press operation or a short-press operation.
  • the pressing operation whose pressing duration is less than the critical value is a short pressing operation, and the target event is to take a picture.
  • the pressing operation whose pressing duration is greater than or equal to the critical value is a long pressing operation, and the target event is continuous shooting of multiple photos.
  • the frequency of continuously taking photos may be, but not limited to, 10 photos per second or 5 photos per second.
  • the specific shooting frequency can be set by the user or the default shooting frequency set by the manufacturer.
  • the above threshold may be determined according to the age of the user and the touch pressure value.
  • the touch pressure value may be the average pressure value of the user pressing any control in a period of time.
  • the above threshold may be determined according to the user's age and the range to which the touch pressure value belongs. Specifically, the pressure value of the user pressing any control within a period of time can be divided into several ranges, and the range to which the touch pressure value belongs is the range with the highest frequency of the pressure value of the user pressing any control during this period of time.
  • Method 1 Obtain the user's face image, and directly determine the user's age according to the user's face image.
  • the face image can be acquired when the electronic device performs face unlocking.
  • the saved face image of the owner can be obtained from the internal memory 121, and the face image is used for face unlocking.
  • the face image is input into the convolutional neural network, and the age or age classification corresponding to the face image is output.
  • the convolutional neural network may be an age classification model, and the model may be trained from multiple face images of known age classification. The specific process can be seen in the description of how to determine the age classification of the user in the foregoing embodiment, which is not repeated here.
  • Method 2 Determine the user’s age indirectly through the font size of the electronic device.
  • the font size of the electronic device 100 may reflect the age of the user to a certain extent.
  • the indirect determination of the user's age according to the font size of the electronic device mentioned in the embodiments of the present application may refer to determining the adjustment duration corresponding to the font size according to the font size of the electronic device, and the adjustment duration is set according to the user's age reflected by the font size.
  • the larger the font size the older the user is, and the longer the user's response time when pressing the control, so the corresponding adjustment time is longer.
  • the input method provided in the embodiments of the present application can determine whether the pressing operation input by the user is a long-press operation or a short-press operation according to the age of the user and the pressing duration of the pressing operation, and set different response times for users of different ages. All users can input a short-press operation or a long-press operation according to their own understanding of the duration definition, so that the camera can take one photo or take multiple photos continuously, which improves the user's shooting efficiency.
  • FIG. 7 exemplarily shows a schematic flowchart of another photographing method provided by an embodiment of the present application. As shown in Figure 7, the photographing method may at least include the following steps:
  • S201 Receive a first pressing operation of a shooting control of a camera application by a first user.
  • the electronic device 100 can detect the first pressing operation on the photographing control 301 of the camera application through the touch sensor 180K.
  • the first pressing operation is a short pressing operation
  • the electronic device 100 can take a picture.
  • S203 Receive a second pressing operation of the second user on the shooting control of the camera application.
  • the electronic device 100 can detect the second pressing operation acting on the photographing control 301 of the camera application through the touch sensor 180K.
  • the second pressing operation is a long pressing operation, and the electronic device 100 can continuously take multiple photos.
  • the age of the first user is greater than the age of the second user, and the pressing duration of the first pressing operation and the second pressing operation are the same. It can be seen that, in the embodiment of the present application, after two users of different ages input a pressing operation with the same pressing duration, the electronic device 100 can make different responses. After an older user inputs a pressing operation, the electronic device can take a picture. After a younger user inputs a pressing operation of the same duration, the electronic device can continuously take multiple photos.
  • different thresholds may be set for the ages of different users.
  • the threshold corresponding to the first user may be referred to as the first threshold
  • the threshold corresponding to the second user may be referred to as the second threshold.
  • the first critical value may be used to distinguish whether the first pressing operation is a long-press operation or a short-press operation.
  • the second critical value can be used to distinguish whether the second pressing operation is a long-press operation or a short-press operation.
  • the electronic device 100 can determine that the pressing duration of the first pressing operation is less than the first critical value, determine that the first target event corresponding to the first pressing operation is to take a photo, and execute the first target event.
  • the electronic device 100 may determine that the second pressing duration is greater than or equal to the second critical value, determine that the second target event corresponding to the second pressing operation is continuous shooting of multiple photos, and execute the second target event.
  • the frequency of continuously taking photos may be, but not limited to, 10 photos per second or 5 photos per second.
  • the specific shooting frequency can be set by the user or the default shooting frequency set by the manufacturer.
  • the aforementioned first critical value may be determined according to the age of the first user (or second user) and the first touch pressure value (or second touch pressure value).
  • the first touch pressure value (or the second touch pressure value) may be the average pressure value of the first user (or the second user) pressing any control within a period of time.
  • the aforementioned first critical value may be determined according to the age of the first user (or second user) and the range to which the first touch pressure value (or second touch pressure value) belongs. Specifically, the pressure value of the first user (or the second user) pressing any control within a period of time can be divided into several ranges, and the range to which the first touch pressure value (or the second touch pressure value) belongs is the first user (Or the second user) the range of the highest frequency to which the pressure value of any control belongs during this period of time.
  • Manner 1 Obtain the face image of the first user (or second user), and directly determine the age of the first user (or second user) according to the face image of the first user (or second user).
  • the face image can be acquired when the electronic device 100 performs face unlocking.
  • the saved face image of the owner can be obtained from the internal memory 121, and the face image is used for face unlocking.
  • the face image is input into the convolutional neural network, and the age or age classification corresponding to the face image is output.
  • the convolutional neural network may be an age classification model, and the model may be trained from multiple face images of known age classification. The specific process can be seen in the description of how to determine the age classification of the user in the foregoing embodiment, which is not repeated here.
  • Manner 2 The age of the first user (or the second user) is determined indirectly through the font size of the electronic device 100.
  • the font size of the electronic device 100 may reflect the age of the user to a certain extent.
  • the indirect determination of the user's age according to the font size of the electronic device mentioned in the embodiments of the present application may refer to determining the adjustment duration corresponding to the font size according to the font size of the electronic device, and the adjustment duration is set according to the user's age reflected by the font size. Normally, the larger the font size, the older the user is, and the longer the user's response time when pressing the control, so the corresponding adjustment time is longer.
  • the font size of the electronic device 100 can be set by the user.
  • the font size of the electronic device 100 is the first font size
  • the font size of the electronic device 100 is the second font size.
  • the first font size is larger than the second font size.
  • the larger the font size the larger the area of the display screen is occupied by the font, and the smaller the font size the smaller the area of the display screen.
  • the first font size may be extra large
  • the second font size may be standard.
  • two users of different ages input a pressing operation with the same pressing duration, and the electronic device can make different responses.
  • the age of the user it is determined whether the pressing operation input by the user is a long press operation or a short press operation, and different reaction times are set for users of different ages. All users can input a short-press operation or a long-press operation according to their own understanding of the duration definition, so that the camera can take one photo or take multiple photos continuously, which improves the user's shooting efficiency.
  • Fig. 8 exemplarily shows a schematic flowchart of a specific input method provided by an embodiment of the present application.
  • the input method can include the following steps:
  • the touch sensor 180K detects a pressing operation on the shooting control 301.
  • the electronic device after the electronic device detects the pressing operation on the shooting control 301, it can block the monitoring of the original growth pressing event of the system.
  • the original long pressing time set by the system may be, for example, 400ms (that is, the pressing time of the pressing operation exceeds or equals 400ms is the long press operation).
  • the electronic device 100 can reset the long-press duration, and modify the long-press duration to a critical value of 406 ms calculated according to the user's age and/or touch pressure value.
  • the onTouchEvent method can be rewritten internally to trigger the touch event to reset the long press time originally set by the system.
  • S303 The processor 110 determines whether the timing result of the timer 196 is greater than or equal to the critical value. If yes, execute S304, if not, execute S307.
  • the critical value may be a value calculated by the processor 110 in advance according to the age of the user and the touch pressure value. Specific examples can be seen in the aforementioned scene settings. The foregoing process of calculating the critical value may be executed by the processor 110.
  • the camera 193 takes pictures at a preset frequency.
  • the preset frequency may be, for example, 10 frames per second or 5 frames per second.
  • the specific shooting frequency may be set by the user, or the default shooting frequency may be set by the electronic device manufacturer.
  • the electronic device 100 can also reset the state of the shooting control 301 until the pressing operation on the control is detected again.
  • the touch sensor 180K detects that the pressing operation ends, and the camera 193 takes a picture.
  • the electronic device 100 when it detects a pressing operation on the shooting control 301, it can also detect a sliding operation. When detecting that the sliding operation exceeds the area of the control, the timer 196 can also stop timing, and the electronic device 100 The response can be made according to the timing result of the timer 196.
  • the electronic device when the user inputs a pressing operation on the shooting control, the electronic device can calculate the critical value suitable for the user according to the user’s age and the touch pressure value, and according to the duration of the pressing operation input by the user and the critical value It can accurately determine the user’s intentions and make the electronic device respond correctly, avoiding the wrong response of the electronic device due to the user’s inaccurate understanding of the operating time or the user’s operating habits, improving the user’s input efficiency and improving the user experience.
  • FIG. 9 shows a schematic flowchart of an input method provided by an embodiment of the present application. As shown in Figure 9, the input method can include at least the following steps:
  • the first control may be the camera icon 202 in the embodiment in FIG. 3, the first control may also be the shooting control 301 in the embodiment in FIG. 4, and the first control may also be a photo in the embodiment in FIG. Thumbnail. It is not limited to the controls listed above. In a specific implementation, the first control may also be other controls, which is not limited in the embodiment of the present application.
  • S402 Determine the type of the pressing operation according to the relationship between the duration of the pressing operation and the critical value.
  • the types of pressing operations include short-press operations and long-press operations.
  • the above threshold may be determined by the age of the user and the touch pressure value.
  • the touch pressure value is the average value of the pressure of the user pressing any control within a period of time. For details, please refer to the related description of how to determine the touch pressure value in the foregoing embodiment, which will not be repeated here.
  • the aforementioned pressure value may be determined by the age of the user and the range to which the touch pressure value belongs.
  • the pressure value of the user pressing any control within a period of time can be divided into several ranges, and the range to which the above-mentioned touch pressure value belongs is the highest frequency of the pressure value of the user pressing any control during this period of time.
  • the range please refer to the related description of how to determine the touch pressure value in the foregoing embodiment, which will not be repeated here.
  • Method 1 Obtain the user's face image, and directly determine the user's age according to the user's face image.
  • Method 2 Determine the user’s age indirectly through the font size of the electronic device.
  • S403 Determine a target event corresponding to the pressing operation according to the type of the pressing operation.
  • the duration of the pressing operation is less than the aforementioned critical value, it is determined that the pressing operation is a short pressing operation. If the duration of the pressing operation is greater than or equal to the above threshold, it is determined that the pressing operation is a long-press operation. Different pressing operations correspond to different target events.
  • the first control is the camera icon 202 in the embodiment in FIG. 3.
  • the target event corresponding to the pressing operation is turning on the camera 193, and the user interface 30 shown in B in FIG. 3 is displayed.
  • the target event corresponding to the pressing operation is to display the function list 215 of the camera application shown in C in FIG. 3 in the user interface 20.
  • the first control is the shooting control 301 in the embodiment of FIG. 4.
  • the target event corresponding to the pressing operation is to take a picture.
  • the target event corresponding to the pressing operation is continuous shooting of multiple photos.
  • the first control is the thumbnail P7 of the photo in the embodiment of FIG. 5.
  • the target event corresponding to the pressing operation is to display a user interface for displaying photos corresponding to P7, that is, the user interface 50 shown in B in FIG. 5.
  • the target event corresponding to the pressing operation is to display a user interface for selecting a photo, that is, the user interface 40 shown in C in FIG. 5.
  • the threshold value applicable to the user may be calculated according to the user's age.
  • a pressing operation with a pressing duration greater than or equal to the threshold is a long-press operation
  • a pressing operation with a pressing duration less than the threshold is a short-press operation.
  • the embodiment of the present application also provides a computer-readable storage medium that stores instructions in the computer-readable storage medium, and when it runs on a computer or a processor, the computer or the processor executes any of the above methods. Or multiple steps.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium.
  • the computer instructions can be sent from one website site, computer, server, or data center to another website site via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) , Computer, server or data center for transmission.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)), etc.
  • the process can be completed by a computer program instructing relevant hardware.
  • the program can be stored in a computer readable storage medium. , May include the processes of the foregoing method embodiments.
  • the aforementioned storage media include: ROM or random storage RAM, magnetic disks or optical discs and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Evolutionary Computation (AREA)
  • Computer Hardware Design (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

一种拍照方法,该方法应用于电子设备,该电子设备已安装相机应用,该方法包括:接收用户作用于该相机应用的拍摄控件的按压操作;根据该用户的年龄及该按压操作的按压时长共同确定是拍摄一张照片或连续拍摄多张照片。该方法可以根据用户的年龄和按压操作的按压时长确定用户输入的按压操作是长按还是短按,从而使得用户的意图被正确识别,避免误操作。

Description

输入方法及电子设备
本申请要求于2019年07月25日提交中国专利局、申请号为201910677040.2、申请名称为“输入方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子设备技术领域,尤其涉及一种输入方法及电子设备。
背景技术
随着触摸屏的普及,人们在使用电子产品时的输入方式已由物理按键输入转变为触摸屏输入。触摸屏输入是通过触摸屏接收用户在屏幕上的操作,以使电子设备做出与该操作对应的响应。用户最常用的操作通常包括短按(即点击)、长按及滑动等。
但是由于不同的用户对于短按和长按的时长理解和操作不一致,经常会造成部分用户想短按的时候变成了长按,从而使电子设备错误响应。比如,用户想要短按拍一张照片时,由于输入被识别成长按而导致连拍多张照片。再比如,用户想要短按查看单张图片时,由于输入被识别成长按而导致进行图片选择等。可以看出,由于电子设备无法准确识别用户输入的操作,会导致电子设备做出错误响应,从而导致用户输入效率低。
发明内容
本申请实施例提供了一种输入方法,可以使电子设备准确判断用户输入的按压操作,做出正确的响应,提升用户的输入效率。
第一方面,本申请实施例提供了一种拍照方法,该方法应用于电子设备,该电子设备已安装相机应用,该方法包括:接收用户作用于该相机应用的拍摄控件的按压操作;根据该用户的年龄及该按压操作的按压时长共同确定该按压操作对应的目标事件;该目标事件为拍摄一张照片或连续拍摄多张照片;执行该目标事件。
本申请实施例提供的输入方法可以根据用户的年龄和按压操作的按压时长确定用户输入的按压操作是长按操作或者短按操作,为不同年龄的用户设置不同的反应时间。所有用户都可以按照自己对时长定义的理解输入短按操作或长按操作,从而使相机拍摄一张照片或者连续拍摄多张照片,提升用户拍摄的效率。
在一种可能的实现方式中,上述根据该用户的年龄及该按压操作的按压时长共同确定该按压操作对应的目标事件包括:根据该用户的年龄确定临界值;在该按压时长大于或等于该临界值的情况下,该按压操作对应的目标事件为连续拍摄多张照片;在该按压时长小于该临界值的情况下,该按压操作对应的目标事件为拍摄一张照片。
本申请实施例可以根据用户的年龄确定适用于该用户的临界值,按压时长大于或等于该临界值的按压操作即为长按操作,可实现连续拍摄多张照片;按压时长小于该临界值的按压操作即为短按操作,可实现拍摄一张照片。根据用户年龄设置该临界值,可以避免由于不同年龄的用户对时长定义理解的不同导致电子设备无法准确识别该用户的意图,提升 用户的拍照效率。
在另外一种可能的实现方式中,上述根据该用户的年龄及按压操作的按压时长共同确定临界值包括:根据该用户的年龄及触控压力值确定该临界值;其中,该触控压力值为该用户在一段时间内按压任意控件的平均压力值。
由于触控压力值在一定程度上也可以反应用户的年龄,通常情况下用户年龄越大,其反应速度越不灵敏,其输入按压操作时的按压力度也会相应较大。本申请实施例可以根据用户年龄和触控压力值确定适用于该用户的临界值,可以进一步地准确识别不同用户输入的按压操作类型,从而做出正确响应,提升用户的拍照效率。
在另外一种可能的实现方式中,上述根据该用户的年龄及按压操作的按压时长共同确定临界值包括:根据该用户的年龄及触控压力值所属的范围确定该临界值。
具体地,可以将用户在一段时间内按压任意控件的压力值分为几个范围,上述触控压力值所属的范围为该用户在这一段时间内按压任意控件的压力值所属的频率最高的范围。
本申请实施例提供了另外一种确定触控压力值的方法,该触控压力值根据用户平时的使用习惯得到。根据该触控压力值和用户年龄可以计算出更加符合该用户的临界值,进一步提升用户的拍照效率。
在另外一种可能的实现方式中,上述根据该用户的年龄确定该按压操作对应的目标事件之前,该方法还包括:获取该用户的人脸图像;根据该人脸图像确定该用户的年龄。
可能地,可以在电子设备进行人脸解锁时获取人脸图像。
可能地,可以从内部存储器中获取保存的机主的人脸图像,该人脸图像用于人脸解锁。
具体地,获取人脸图像后,将人脸图像输入到卷积神经网络中,输出该人脸图像对应的年龄或年龄分类。该卷积神经网络可以是年龄分类模型,该模型可以由多个已知年龄分类的人脸图像训练而成。
本申请实施例通过人脸图像直观的确定用户年龄,从而使电子设备根据用户年龄和按压操作的按压时长确定用户输入的按压操作是长按操作或者短按操作,提升用户拍摄的效率。
在另外一种可能的实现方式中,上述根据该用户的年龄确定该按压操作对应的目标事件之前,该方法还包括:根据该电子设备的字体大小确定该用户的年龄。
本申请实施例中通过字体大小间接反映用户年龄,在无法直接获取用户年龄的情况下通过字体大小确定用户年龄,使申请实施例提供的拍照方法可以适用于更多的应用场景。
第二方面,本申请实施例提供了一种拍照方法,该方法应用于电子设备,该电子设备已安装相机应用,该方法包括:接收第一用户作用于该相机应用的拍摄控件的第一按压操作;响应于该第一按压操作,拍摄一张照片;接收第二用户作用于该拍摄控件的第二按压操作;响应于该第二按压操作,连续拍摄多张照片;其中,第一用户的年龄大于第二用户的年龄,第一按压操作和第二按压操作的按压时长相同。
本申请实施例中两个年龄不同的用户输入同样按压时长的按压操作,电子设备可以做出不同的响应。根据用户的年龄确定用户输入的按压操作是长按操作或者短按操作,为不同年龄的用户设置不同的反应时间。所有用户都可以按照自己对时长定义的理解输入短按操作或长按操作,从而使相机拍摄一张照片或者连续拍摄多张照片,提升用户拍摄的效率。
在一种可能的实现方式中,上述响应于该第一操作,拍摄一张照片包括:根据该第一用户的年龄及该第一按压操作的按压时长共同确定该第一按压操作对应的第一目标事件为拍摄一张照片;执行该第一目标事件;上述响应于该第二按压操作,连续拍摄多张照片包括:根据该第二用户的年龄及该第二按压操作的按压时长共同确定该第二按压操作对应的第二目标事件为连续拍摄多张照片;执行该第二目标事件。
本申请实施例可以根据用户的年龄和按压操作的按压时长确定用户输入的按压操作是长按操作或者短按操作,为不同年龄的用户设置不同的反应时间。所有用户都可以按照自己对时长定义的理解输入短按操作或长按操作,从而使相机拍摄一张照片或者连续拍摄多张照片,提升用户拍摄的效率。
在另外一种可能的实现方式中,上述根据该第一用户的年龄及该第一按压操作的按压时长共同确定该第一按压操作对应的第一目标事件为拍摄一张照片包括:根据该第一用户的年龄确定第一临界值;在确定该第一临界值大于该第一按压时长的情况下,确定该第一目标事件为拍摄一张照片;上述根据该第二用户的年龄及该第二按压操作的按压时长共同确定该第二按压操作对应的第二目标事件为连续拍摄多张照片包括:根据该第二用户的年龄确定第二临界值;在确定该第二临界值小于或等于该第二临界值的情况下,确定该第二目标事件为连续拍摄多张照片。
本申请实施例可以根据用户的年龄确定适用于该用户的临界值,按压时长大于或等于该临界值的按压操作即为长按操作,可实现连续拍摄多张照片;按压时长小于该临界值的按压操作即为短按操作,可实现拍摄一张照片。根据用户年龄设置该临界值,可以避免由于不同年龄的用户对时长定义理解的不同导致电子设备无法准确识别该用户的意图,提升用户的拍照效率。
在另外一种可能的实现方式中,上述根据该第一用户的年龄确定第一临界值包括:根据所该第一用户的年龄及第一触控压力值确定该第一临界值;其中,该第一触控压力值为该第一用户在一段时间内按压任意控件的平均压力值;上述根据该第二用户的年龄确定第二临界值包括:根据该第二用户的年龄及第二触控压力值确定该第二临界值;其中,该第二触控压力值为该第二用户在一段时间内按压任意控件的平均压力值。
由于触控压力值在一定程度上也可以反应用户的年龄,通常情况下用户年龄越大,其反应速度越不灵敏,其输入按压操作时的按压力度也会相应较大。本申请实施例可以根据用户年龄和触控压力值确定适用于该用户的临界值,可以进一步地准确识别不同用户输入的按压操作类型,从而做出正确响应,提升用户的拍照效率。
在另外一种可能的实现方式中,上述根据该第一用户的年龄确定第一临界值包括:根据该第一用户的年龄及第一触控压力值所属的范围确定该第一临界值;上述根据该第二用户的年龄确定第二临界值包括:根据该第二用户的年龄及第二触控压力值所属的范围确定该第二临界值。
具体地,可以将第一用户在一段时间内按压任意控件的压力值分为几个范围,上述第一触控压力值所属的范围为该第一用户在这一段时间内按压任意控件的压力值所属的频率最高的范围。
具体地,可以将第二用户在一段时间内按压任意控件的压力值分为几个范围,上述第 二触控压力值所属的范围为该第二用户在这一段时间内按压任意控件的压力值所属的频率最高的范围。
本申请实施例提供了另外一种确定第一触控压力值及第二触控压力值的方法,该第一触控压力值及第二触控压力值分别根据第一用户及第二用户平时的使用习惯得到,从而计算出更加符合该第一用户的第一临界值及更加符合第二用户的第二临界值,进一步提升第一用户及第二用户的拍照效率。
在另外一种可能的实现方式中,上述响应于该第一按压操作之前,上述方法还包括:获取该第一用户的人脸图像;根据该第一用户的人脸图像确定该第一用户的年龄;上述响应于该第二按压操作之前,上述方法还包括:获取该第二用户的人脸图像;根据该第二用户的人脸图像确定该第二用户的年龄。
可能地,可以在电子设备进行人脸解锁时获取人脸图像。
可能地,可以从内部存储器中获取保存的机主的人脸图像,该人脸图像用于人脸解锁。
具体地,获取人脸图像后,将人脸图像输入到卷积神经网络中,输出该人脸图像对应的年龄或年龄分类。该卷积神经网络可以是年龄分类模型,该模型可以由多个已知年龄分类的人脸图像训练而成。
本申请实施例通过人脸图像直观的确定用户年龄,从而使电子设备根据用户年龄和按压操作的按压时长确定用户输入的按压操作是长按操作或者短按操作,提升用户拍摄的效率。
在另外一种可能的实现方式中,第一用户使用该电子设备时该电子设备的字体大小为第一字体大小,第二用户使用该电子设备时该电子设备的字体大小为第二字体大小,该第一字体大小大于该第二字体大小;上述响应于该第一按压操作之前,该方法还包括:根据该第一字体大小确定该第一用户的年龄;上述响应于该第二按压操作之前,该方法还包括:根据该第二字体大小确定该第二用户的年龄。
本申请实施例中通过字体大小间接反映用户年龄,使该拍照方法在无法直接获取用户年龄的情况下通过字体大小确定用户年龄,使申请实施例提供的拍照方法可以适用于更多的应用场景。
第三方面,本申请实施例提供了一种输入方法,该方法应用于电子设备,该方法包括:检测作用于第一控件的按压操作;根据该按压操作的时长与临界值的关系确定该按压操作的类型;其中,该按压操作的类型包括短按操作和长按操作,上述临界值由该用户的年龄决定;根据该按压操作的类型确定该按压操作对应的目标事件;执行该目标事件。
本申请实施例可以根据用户的年龄确定适用于该用户的临界值,按压时长大于或等于该临界值的按压操作即为长按操作,按压时长小于该临界值的按压操作即为短按操作。短按操作和长按操作对应的目标事件不同。根据用户年龄设置该临界值,可以避免由于不同年龄的用户对时长定义理解的不同导致电子设备无法准确识别该用户的意图,提升用户的输入效率。
在一种可能的实现方式中,上述临界值由用户年龄和触控压力值决定。其中,触控压力值为该用户在一段时间内按压任意控件的压力平均值。
由于触控压力值在一定程度上也可以反应用户的年龄,通常情况下用户年龄越大,其 反应速度越不灵敏,其输入按压操作时的按压力度也会相应较大。本申请实施例可以根据用户年龄和触控压力值确定适用于该用户的临界值,可以进一步地准确识别不同用户输入的按压操作类型,从而做出正确响应,提升用户的输入效率。
在另外一种可能的实现方式中,上述临界值由用户年龄和触控压力值所属的范围决定。
具体地,可以将该用户在一段时间内按压任意控件的压力值分为几个范围,上述触控压力值所属的范围为该用户在这一段时间内按压任意控件的压力值所属的频率最高的范围。
本申请实施例提供了另外一种确定触控压力值的方法,该触控压力值根据用户平时的使用习惯得到。根据该触控压力值和用户年龄可以计算出更加符合该用户的临界值,进一步提升用户的输入效率。
在另外一种可能的实现方式中,上述根据该按压操作的时长与临界值的关系确定该按压操作的类型之前,上述方法还包括:确定该用户的年龄。
在另外一种可能的实现方式中,上述确定该用户的年龄包括:获取该用户的人脸图像;根据该用户的人脸图像确定该用户的年龄。
可能地,可以在电子设备进行人脸解锁时获取人脸图像。
可能地,可以从内部存储器中获取保存的机主的人脸图像,该人脸图像用于人脸解锁。
具体地,获取人脸图像后,将人脸图像输入到卷积神经网络中,输出该人脸图像对应的年龄或年龄分类。该卷积神经网络可以是年龄分类模型,该模型可以由多个已知年龄分类的人脸图像训练而成。
本申请实施例通过人脸图像直观的确定用户年龄,从而使电子设备根据用户年龄和按压操作的按压时长确定用户输入的按压操作是长按操作或者短按操作,提升用户拍摄的效率。
在另外一种可能的实现方式中,上述确定该用户的年龄包括:根据该电子设备的字体大小确定该用户的年龄。
本申请实施例中通过字体大小间接反映用户年龄,使该拍照方法在无法直接获取用户年龄的情况下通过字体大小确定用户年龄,使申请实施例提供的拍照方法可以适用于更多的应用场景。
第四方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器、存储器以及无线通信模块;上述存储器以及所述无线通信模块与一个或多个处理器耦合,上述存储器用于存储计算机程序代码,上述计算机程序代码包括计算机指令,当上述一个或多个处理器执行上述计算机指令时,电子设备执行如第一方面或第一方面的任意一种实现方式提供的拍照方法。
第五方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器、存储器以及无线通信模块;上述存储器以及所述无线通信模块与一个或多个处理器耦合,上述存储器用于存储计算机程序代码,上述计算机程序代码包括计算机指令,当上述一个或多个处理器执行上述计算机指令时,电子设备执行如第二方面或第二方面的任意一种实现方式提供的拍照方法。
第六方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器、存储器以及无线通信模块;上述存储器以及所述无线通信模块与一个或多个处理器耦合,上述存储 器用于存储计算机程序代码,上述计算机程序代码包括计算机指令,当上述一个或多个处理器执行上述计算机指令时,电子设备执行如第三方面或第三方面的任意一种实现方式提供的输入方法。
第七方面,本申请实施例提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行如第一方面或第一方面的任意一种实现方式提供的拍照方法。
第八方面,本申请实施例提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行如第二方面或第二方面的任意一种实现方式提供的拍照方法。
第九方面,本申请实施例提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行如第三方面或第三方面的任意一种实现方式提供的输入方法。
第十方面,本申请实施例提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如第一方面或第一方面的任意一种实现方式提供的拍照方法。
第十一方面,本申请实施例提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如第二方面或第二方面的任意一种实现方式提供的拍照方法。
第十二方面,本申请实施例提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如第三方面或第三方面的任意一种实现方式提供的输入方法。
可以理解地,上述提供的第四方面所述的电子设备、第七方面所述的计算机存储介质或者第十方面所述的计算机程序产品均用于执行第一方面所提供的拍照方法。因此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。
可以理解地,上述提供的第五方面所述的电子设备、第八方面所述的计算机存储介质或者第十一方面所述的计算机程序产品均用于执行第二方面所提供的拍照方法。因此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。
可以理解地,上述提供的第六方面所述的电子设备、第九方面所述的计算机存储介质或者第十二方面所述的计算机程序产品均用于执行第三方面所提供的输入方法。因此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。
附图说明
图1为本申请实施例提供的电子设备的结构示意图;
图2为本申请实施例提供的电子设备的软件结构框图;
图3为本申请实施例提供的一种应用场景示意图;
图4为本申请实施例提供的另外一种应用场景示意图;
图5为本申请实施例提供的另外一种应用场景示意图;
图6为本申请实施例提供的一种拍照方法流程示意图;
图7为本申请实施例提供的另外一种拍照方法流程示意图;
图8为本申请实施例提供的一种输入方法流程示意图;
图9为本申请实施例提供的另外一种输入方法流程示意图。
具体实施方式
下面将结合附图对本申请实施例中的技术方案进行清楚、详尽地描述。
本申请实施例中,可以为不同的用户计算适用于该用户的长按操作与短按操作的按压时长临界值(以下实施例中简称为临界值),根据该临界值准确识别用户输入的操作,做出正确的响应,提高用户的输入效率。
本申请实施例中涉及的电子设备可以是便携式移动终端,例如手机、平板电脑、上网本、个人数字助理(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以及计时器196等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器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)接口等。
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为电子设备供电。
电源管理模块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通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏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的正整数。本申请实施例中,显示屏194可以根据用户输入的按压操作的类型显示相应的用户界面。
电子设备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的正整数。本申请实施例中,摄像头193可以根据用户对拍摄控件输入的按压操作的类型做出响应。例如,当 用户对拍摄控件输入长按操作时,摄像头193可以按照预设的频率拍摄多张照片。当用户对拍摄控件输入短按操作时,摄像头193可以拍摄一张照片。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。
电子设备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可以用于检测用户输入按压操作的压力值。进而根据该压力值计算适用于该用户的临界值。
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。本申请实施例中可以通过触摸传感器180K检测用户输入的按压操作。
骨传导传感器180M可以获取振动信号。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键 信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。
计时器196可以用于计时。本申请实施例中计时器196可以用于记录用户输入的按压操作的按压时长,使处理器110根据按压时长判断用户输入的按压操作是长按操作或短按操作。
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备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软件以及硬件的工作流程。
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层的内容提供器从内核层获取原始输入事件,并通过视图系统识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像头193捕获静态图像或视频。
接下来介绍本申请实施例可能涉及的几个应用场景。
场景一:对电子设备100上的应用程序的图标输入短按操作或者长按操作。接下来以该应用程序为相机为例进行说明。
图3中的A示例性示出了用于电子设备100上的应用程序菜单的用户界面20。
用户界面20可包括状态栏201、时间组件图标204和天气组件图标203、多个应用程序的图标例如相机图标202、微信图标208、设置图标209、相册图标207、微博图标206、支付宝图标205等,界面20中还可以包括页面指示符210、电话图标211、短信图标212、联系人图标213及导航栏214等。其中:
状态栏201可以包括:运营商指示符(例如运营商的名称“中国移动”)、无线高保真(wireless fidelity,Wi-Fi)信号的一个或多个信号强度指示符、移动通信信号(又可称为蜂窝信号)的一个或多个信号强度指示符和电池状态指示符。
时间组件图标204可用于指示当前时间,例如日期、星期几、时分信息等。
天气组件图标203可用于指示天气类型,例如多云转晴、小雨等,还可以用于指示气温等信息。
页面指示符210可用于指示用户当前浏览的是哪一个页面中的应用程序。用户可以左右滑动多个应用程序图标的区域,来浏览其他页面中的应用程序图标。
导航栏214可以包括:返回按键2141、主界面(Home screen)按键2142、呼出任务历史按键2143等系统导航键。其中,主界面为电子设备100在任何一个用户界面检测到作用于主界面按键2142的用户操作后显示的界面。当检测到用户点击返回按键2141时,电子设备100可显示当前用户界面的上一个用户界面。当检测到用户点击主界面按键2142时,电子设备100可显示主界面。当检测到用户点击呼出任务历史按键2143时,电子设备100可显示用户最近打开过的任务。各导航键的命名还可以为其他,比如,2141可以叫Back Button,2142可以叫Home button,2143可以叫Menu Button,本申请对此不做限制。导航栏214中的各导航键不限于虚拟按键,也可以实现为物理按键。
可以理解的是,图3中的A仅仅示例性示出了电子设备100上的用户界面,不应构成对本申请实施例的限定。
电子设备100可以检测到作用于相机图标202的短按操作,响应于该短按操作,电子设备100可以显示图3中的B示出的用于拍摄照片的用户界面30。
用户界面30可以包括:拍摄控件301、拍摄模式列表302、控件303、控件304及取景框305。其中:
拍摄控件301可用于拍摄照片。电子设备100可以检测作用于拍摄控件301的用户操作(如在拍摄控件301上的点击操作),响应于该操作,电子设备100可以确定拍摄的图片,并且在控件303中显示该拍摄图片的缩略图。也即是说,用户可以点击拍摄控件301来触发拍摄。其中,拍摄控件301可以是按钮,或者其他形式的控件。
拍摄模式列表302中可以显示有一个或多个拍摄模式选项。电子设备100可以检测到作用于拍摄模式选项的用户操作,响应该操作,电子设备100可以开启用户选择的拍摄模式。电子设备还可以检测到在拍摄模式列表302中的滑动操作(如向左或向右的滑动操作),响应于该操作,电子设备100可以切换显示在拍摄模式列表302中的拍摄模式选项,以便用户浏览更多拍摄模式选项。其中,拍摄模式选项可以是图标,或者其他形式的选项。拍摄模式可以包括:人像拍摄模式、拍照拍摄模式、录像拍摄模式、夜景拍摄模式、专业拍摄模式及大光圈拍摄模式等。其中,不同的拍摄模式对应的拍摄参数不同。
控件303可用于打开相册。电子设备100可以检测到作用于控件303的用户操作(如在控件303上的点击操作),响应于该操作,电子设备100可以打开相册,显示最新保存的图片。
控件304可用于切换摄像头。电子设备100可以检测到作用于控件304的用户操作(如在控件304上的点击操作),响应于该操作,电子设备100可以切换摄像头(如将后置摄像头切换为前置摄像头,或者将前置摄像头切换为后置摄像头)。
取景框305可用于显示摄像头193获取的图片。电子设备100可以实时刷新其中的显 示内容。其中,用于获取图片的摄像头193可以是后置摄像头,或者是前置摄像头。
电子设备100可以检测作用于相机图标202的长按操作,响应于该长按操作,电子设备100可以在用户界面20中显示图3中的C示出的关于相机应用的功能列表215。
功能列表215中可以包括一个或多个功能选项,例如动态照片选项215a、大光圈拍照选项215b、录像选项215c及自拍选项215d等。其中:
动态照片选项215a可以用于开启拍摄动态照片。电子设备100可以检测到作用于动态照片选项215a的用户操作(如在动态照片选项215a上的点击操作),响应于该操作,电子设备100可以显示用于拍摄动态照片的用户界面。其中,动态照片是由多张照片按照时间先后顺序组合成的照片。
大光圈选项215b可以用于开启大光圈拍照模式。电子设备100可以检测到作用于大光圈选项215b的用户操作(如在大光圈选项215b上的点击操作),响应于该操作,电子设备100可以显示用于大光圈拍照模式的用户界面。
录像选项215c可以用于开启录像功能。电子设备100可以检测到作用于录像选项215c的用户操作(如在录像选项215c上的点击操作),响应于该操作,电子设备100可以显示用于录像的用户界面。
自拍选项215d可以用于开启自拍。电子设备100可以检测到作用于自拍选项215d的用户操作(如在自拍选项215d上的点击操作),响应于该操作,电子设备100可以显示用于自拍的用户界面。
可以知道,上述功能列表215包括的功能选项为示例性说明,在具体实现中还可以包括其他的功能选项,本申请实施例对此不做限定。
可以知道,不限于相机应用的图标,用户对其他应用的图标如支付宝应用的图标205输入短按操作和长按操作,电子设备100也可做出不同的响应,本申请实施例对此不做限定。
场景二:对拍摄控件301输入短按操作或者长按操作。
如图4所示,电子设备100可以检测到作用于拍摄控件301的短按操作,响应于该短按操作,电子设备100可以拍摄一张照片。
电子设备100可以检测作用于拍摄控件301的长按操作,响应于该长按操作,电子设备100可以连续拍摄多张照片,直至电子设备100检测到上述作用于拍摄控件301的长按操作结束。其中,电子设备100拍摄照片的频率可以但不限于是每秒10张或每秒5张,具体的拍摄频率可由用户设置,或由厂商设置的默认拍摄频率。
场景三:对相册中某张照片的缩略图输入短按操作或者长按操作。
如图5中的A示出了相册中用于展示照片列表的用户界面40。电子设备100可以在检测到作用于用户界面20中的相册图标207的短按操作后,显示用户界面40。
用户界面40可以包括照片列表401。照片列表401可以用于展示保存在电子设备100内部存储器121中的照片的缩略图。用户可以通过在用户界面40中输入滑动操作浏览其他 的缩略图。其中,缩略图的尺寸小于该缩略图对应的照片的尺寸,缩略图包含的像素点的个数小于该缩略图对应的照片的像素点的个数。图5中的A示例性示出了12张照片的缩略图,分别标为P1-P12。图5中的A仅示例性标出了P1、P2、P3、P7,其他未标出。接下来以P7为例进行说明。
电子设备100可以检测到作用于P7的短按操作,响应于该短按操作,电子设备100可以显示用于展示P7对应的照片的用户界面,即图5中的B示出的用户界面50。
用户界面50可以包括:返回控件501、展示区502、分享控件503、收藏控件504、删除控件505、编辑控件506、状态栏及导航栏。其中:
状态栏与用户界面20中的状态栏201一致,此处不赘述。
导航栏与用户界面20中的导航栏214一致,此处不赘述。
返回控件501可以用于返回上一个用户界面。电子设备100可以检测到作用于返回控件501的用户操作(如作用于返回控件501的点击操作),响应于该操作,电子设备100可以显示上一个用户界面。本申请实施例中的上一个界面为图5中的A示出的用户界面40。
展示区502可以用于展示与缩略图P7对应的照片。
分享控件503可以用于分享展示区502中展示的照片。电子设备100可以检测到作用于分享控件503的用户操作(如作用于分享控件503的点击操作),响应于该操作,电子设备100可以显示用于分享该照片的用户界面。
收藏控件504可以用于为展示区502中展示的照片添加收藏标签。电子设备100可以检测到作用于收藏控件503的用户操作(如作用于收藏控件504的点击操作),响应于该操作,电子设备100可以为展示区502中展示的照片添加收藏标签。若在此基础上,电子设备100再次检测到作用于收藏控件504的点击操作,响应于该操作,电子设备100可以删除该照片的收藏标签。
删除控件505可以用于将展示区502中展示的照片从内部存储器121中删除。电子设备100可以检测到作用于删除控件505的用户操作(如作用于删除控件505的点击操作),响应于该操作,电子设备100可以将该照片从内部存储器121中删除。
编辑控件506可以用于对展示区502中展示的照片进行编辑。电子设备100可以检测到作用于编辑控件506的用户操作(如作用于编辑控件506的点击操作),响应于该操作,电子设备100可以接收用于对该照片进行编辑的用户操作,例如但不限于为照片添加文本、裁剪该照片或者旋转该照片等。
电子设备100可以检测到作用于P7的长按操作,响应于该长按操作,电子设备100可以显示用于选择照片的用户界面,即图5中的C示出的用户界面40。
用户界面40可以包括照片列表401、取消控件402、选择结果指示符403、分享控件404、删除控件405、全选控件406及更多控件407。其中:
照片列表401中的每个缩略图还包括一个选择控件4011。选择控件4011可以用于选择其对应的照片的缩略图。电子设备100可以检测到作用于选择控件4011的用户操作(如在选择控件4011上的点击操作),响应于该操作,电子设备100可以显示该缩略图被选定的结果。该缩略图被选定的显示方式可以是在该选择控件4011中显示被选定的标记,该标记 例如可以是图5中的C所示的“√”。
取消控件402可以用于取消选择缩略图,并显示图5中的A示出的用户界面40。电子设备100可以检测到作用于取消控件402的用户操作(如在取消控件402上的点击操作),响应于该操作,电子设备100可以取消选择的缩略图,并显示图5中的A示出的用户界面40。
选择结果指示符403可以用于指示当前选择的缩略图的结果。例如图5中的C示出的“已选择1项”。
分享控件404可以用于分享已选择的缩略图对应的照片。电子设备100可以检测到作用于分享控件404的用户操作(如作用于分享控件404的点击操作),响应于该操作,电子设备100可以显示用于分享已选择的缩略图对应的照片的用户界面。
删除控件405可以用于将已选择的缩略图对应的照片从内部存储器121中删除。电子设备100可以检测到作用于删除控件405的用户操作(如作用于删除控件405的点击操作),响应于该操作,电子设备100可以将已选择的缩略图对应的照片从内部存储器121中删除。
全选控件406可以用于选择照片列表401中的每个缩略图。电子设备100可以检测到作用于全选控件406的用户操作(如作用于全选控件406的点击操作),响应于该操作,电子设备100可以选择照片列表401中的每个缩略图。
更多控件407可以用于显示其他功能选项,例如但不限于是下载选项、复制选项等。电子设备100可以检测到作用于更多控件407的用户操作(如作用于更多控件407的点击操作),响应于该操作,电子设备100可以显示其他功能选项。
可以知道,图5中的C示出的选择结果仅为示例性说明,在具体实现中还可以有其他的选择结果,本申请实施例对此不作限定。
可以知道,以上列举的三个使用场景仅为示例性说明,在具体实现中,本申请实施例还可以应用于其他场景,例如对文件列表中某个文件的短按操作或长按操作等,本申请实施例对此不作限定。
本申请以下实施例将用于区分一个按压操作是长按操作还是短按操作的时间临界值简称为临界值,按压时长大于或等于该临界值的按压操作为长按操作,按压时长小于该临界值的按压操作为短按操作(即点击操作)。由于不同用户的操作习惯不同,适用于不同用户的临界值也不同。
接下来分别介绍两种临界值的计算方式。
方式一:根据用户年龄和用户按压控件的压力值(以下简称触控压力值)计算适用于该用户的临界值。
具体地,根据用户年龄和触控压力值计算在基准值基础上的调节时长。临界值与用户年龄和触控压力值的关系式可以如下:
Time=basetime+θ(α*F(age)+β*F(pressure))   (1)
式(1)中,Time为临界值,basetime为基准值,F(age)为年龄对应的调节时长、F(pressure)为触控压力值对应的调节时长,0<θ<1、0<α<1、0<β<1。可能的,基准值可以但不限于是400毫秒(ms)。可能地,θ的值可以但不限于是0.08,α的值可以但不限于是0.5,β的值可 以但不限于是0.5。
其中,表1示例性示出了用户年龄与调节时长的关系。
表1 用户年龄age与调节时长F(age)的关系表
age(岁) F(age)
0<age≤60 0ms
age>60 100ms
可以看出,表1中的第一列为年龄分类,第二列为调节时长。其中,年龄分类可以包括:0<age≤60及age>60。其中,0<age≤60对应的调节时长F(age)为0ms;age>60对应的调节时长F(age)为100ms。
可以知道,上述年龄分类仅为示例性说明,在具体实现中还可以有其他的年龄分类,本申请实施例对此不作限定。
可以知道,上述年龄分类对应的调节时长F(age)的值仅为示例性说明,在具体实现中还可以对应其他的调节时长F(age)的值,调节时长F(age)的值也不限于是非负数,在具体实现中还可以是负数,本申请实施例对此均不作限定。
表2示例性示出了触控压力值pressure与调节时长F(pressure)的关系。
表2 触控压力值pressure与调节时长F(pressure)的关系表
pressure(牛) F(pressure)
0<pressure≤0.7 0ms
0.7<pressure≤0.9 50ms
pressure>0.9 150ms
可以看出,表2中的第一列为触控压力值分类,第二列为调节时长。其中,触控压力值分类可以包括:0<pressure≤0.7、0.7<pressure≤0.9及pressure>0.9。其中,0<pressure≤0.7对应的调节时长F(pressure)为0ms;0.7<pressure≤0.9对应的调节时长F(pressure)为50ms;pressure>0.9对应的调节时长F(pressure)为150ms。
示例性地,若用户年龄大于60岁,则查询表1可知调节时长F(age)=100ms,若用户的触控压力值pressure>0.9,则查询表2可知调节时长F(pressure)=150ms。假设式(1)中的基准值basetime=400ms,θ=0.08,α=0.5,β=0.5,则根据式(1)可以计算出临界值Time=400+0.08×(0.5×100+0.5×150)=410ms。
示例性地,若用户年龄小于60岁,则查询表1可知调节时长F(age)=0ms,若用户的触控压力值0.7<pressure≤0.9,则查询表2可知调节时长F(pressure)=50ms。假设式(1)中的基准值basetime=400ms,θ=0.08,α=0.5,β=0.5,则根据式(1)可以计算出临界值 Time=400+0.08×(0.5×0+0.5×50)=402ms。
可以知道,上述触控压力值分类仅为示例性说明,在具体实现中还可以有其他的触控压力值分类,本申请实施例对此不作限定。
可以知道,上述触控压力值分类对应的调节时长F(pressure)的值仅为示例性说明,在具体实现中还可以对应其他的调节时长F(pressure)的值,调节时长F(pressure)的值也不限于是非负数,在具体实现中还可以是负数,本申请实施例对此均不作限定。
不限于在基准值的基础上计算调节时长以获得临界值,在具体实现中还可以直接根据用户年龄和触控压力值确定临界值,本申请实施例对此不作限定。
接下来介绍如何确定用户的年龄分类。
具体地,电子设备100可以根据人脸解锁时摄像头捕捉的图像进行年龄分类。具体可以利用卷积神经网络对人脸进行年龄估计,将人脸图像输入到卷积神经网络系统中计算该人脸图像属于每一种年龄分类的概率,确定概率最大的年龄分类为该人脸图像的年龄分类。上述卷积神经网络可以是年龄分类模型。
接下来介绍年龄分类模型的训练过程。年龄分类模型的训练过程至少可以包括以下几个步骤:
步骤一:确定样本集。样本集可以包括多张人脸图像以及该人脸图像对应的年龄分类。
步骤二:设置各个年龄分类对应的标准人脸图像。
步骤三:比对样本集中人脸图像的人脸特征关键点和标准人脸图像的人脸特征关键点,对样本集中的人脸图像进行关键点对齐和调整,再对调整后的样本集中的人脸图像进行轮廓提取得到人脸轮廓图,并将该人脸轮廓图进行归一化处理并输入卷积神经网络系统进行分类模型的训练。
具体地,上述人脸特征关键点包括但不限于是:眼睛轮廓、嘴部轮廓、眉毛轮廓、脸部轮廓、额头轮廓等。可能地,人脸图像可以但不限于包括88个人脸特征关键点。
具体地,上述关键点对齐和调整用于将该人脸图像与各个年龄分类对应的标准人脸进行比对,确定与该人脸图像最接近的年龄分类对应的标准人脸,再利用仿射变换对人脸图像进行旋转和平移,将人脸图像与标准人脸图像中人脸的角度和位置调整为一致,避免因为人脸图像中人脸的角度或人脸在图像中的位置引起的误差。
具体地,轮廓提取具体可以是对人脸各个部位(如眉毛、眼睛、嘴巴等)的轮廓线进行拟合。具体可对上述调整后的人脸图像进行小波变换,过滤高频分量并去噪,得到低频分量的频域图像,即人脸轮廓图像。
具体地,归一化处理可以用于将上述人脸轮廓图像进行归一化处理,将各个不同大小的人脸轮廓图处理成同样大小的人脸轮廓图,避免不同大小的人脸引起的误差。
模型训练完成后,可依次将样本集中的人脸图像再次输入到该年龄分类模型中,对比人脸分类模型输出的结果与该人脸图像的年龄分类是否一致。若不一致,收集该人脸图像作为样本图像,再次执行上述步骤一至步骤三,进行年龄分类模型的校准,直至最终输出结果的准确率超过预设阈值,如90%,得到最终的年龄分类模型。
本申请实施例中提供的年龄分类模型的网络结构顺序为输入层、K个小组层、全连接层及softmax层,其中,K大于或者等于1。
上述输入层可以用于接收输入的待识别的人脸图像,输入的人脸图像为YUV数据,输入层可以将输入的YUV数据转换成RGB数据。
上述小组层可以用于将输入层输出的RGB数据进行卷积和归一化处理。小组层可以包括卷积层、激活层、归一化层。卷积层、激活层、归一化层中每个层的核大小以及输出大小都可任意调节,且每个层都有一个输入且产生一个输出,每一层的输出作为下一层的输入。
上述全连接层可以用于对人脸图像轮廓线的拟合。
上述softmax层用于输出年龄分类的输出结果。输出结果具体可以是每一种年龄分类的概率。每一种年龄分类的概率均属于[0,1],且各个年龄分类的概率和为1。确定概率最大的年龄分类为输入的人脸图像的年龄分类。
例如,本申请实施例中可以根据年龄分为两类:0<age≤60,age>60。若将某人脸图像输入到上述年龄分类模型中,softmax层输出的结果为:0<age≤60的概率为80%,age>60的概率为20%,则确定该人脸图像最终的年龄分类为0<age≤60。
不限于上述列举的年龄分类,在具体实现中还可以有其他的年龄分类,如可以分为:0<age≤2、2<age≤6、6<age≤14、14<age≤35、35<age≤60及age>60等,本申请实施例对年龄的具体分类不做限定。
不限于输出年龄范围,在具体实现中还可以用文字替代年龄范围,例如将年龄范围2<age≤6替换成儿童,将年龄范围14<age≤35替换成青年等,本申请实施例对输出结果的具体表现形式不作限定。
不限于人脸解锁时摄像头捕捉的图像,在具体的实现中还可以根据用户采用前置摄像头自拍时摄像头捕捉的图像进行年龄识别,本申请实施例对此不作限定。
可能地,电子设备100的内部存储器121中可以保存机主的人脸图像,用于人脸解锁。电子设备100可以直接获取内部存储器121中保存的人脸图像并进行年龄识别。
接下来介绍如何确定触控压力值。
具体地,电子设备100可以通过压力传感器180A检测触控压力值。
具体地,可以将触控压力值分为几个范围,例如本申请实施例中可以将触控压力值分为三个范围:0<pressure≤0.7、0.7<pressure≤0.9及pressure>0.9等。
本申请实施例中用于计算临界值的触控压力值可以是电子设备100采集用户在一段时间内的触控压力值得出的结果,也可以是用户单次点击控件时的触控压力值。
可能地,若电子设备100采集用户在一段时间内的触控压力值,则可将用户在一段时间内触控压力值所在的频率最高的范围确定为用户触控压力值所属的范围。根据表2可以确定该触控压力值范围对应的调节时长,从而根据调节时长计算临界值。采用该方式计算的触控压力值可以符合用户长期的使用习惯,避免由于单次操作失误导致计算的触控压力值不准确。
例如,电子设备100可以检测用户在一天内对任一控件输入触控操作时的压力值。若用户在一天内输入100次触控操作,这100次触控操作中有60次触控操作的触控压力值的范围为0.7<pressure≤0.9,25次触控操作的触控压力值的范围为0<pressure≤0.7,15次 触控操作的触控压力值的范围为pressure>0.9,则电子设备100可以确定用户的触控压力值的范围为0.7<pressure≤0.9。根据表2可以进一步确定该用户的触控压力值对应的调节时长F(pressure)为50ms。
若触控压力值为用户单次点击控件时的触控压力值,则电子设备100可以在用户输入触控操作时,实时计算适用于当前触控操作的临界值,并根据临界值的计算结果对用户输入的触控操作做出响应。采用该方式可以对每次触控操作做出准确的响应,不因使用者的变化而影响电子设备对触控操作的响应的准确性。
可能地,触控压力值可以是用户在一段时间内按压任意控件平均压力值。
具体地,电子设备100可以采集用户在一段时间内按压任意控件的压力值。该一段时间例如但不限于是一天。电子设备100可以记录出用户在一段时间内按压控件的次数,以及按压每个控件时的压力值,计算出按压所有控件时的压力值的总和除以按压次数的值,即为该用户在一段时间内按压任意控件的平均压力值。该平均压力值即为触控压力值。
不限于与用户年龄及触控压力值有关,在具体实现中临界值还可以只与用户年龄有关,或者只与触控压力值有关,本申请实施例对此不作限定。
方式二:根据电子设备100的字体大小和用户按压控件的压力值(即触控压力值)计算适用于该用户的临界值。
具体地,如何确定触控压力值可以参考方式一中的相关部分,此处不赘述。
具体地,为了便于用户更清晰的查看电子设备100显示的内容,年龄较大的用户通常会将电子设备100的字体设置成较大的字体。因此电子设备100的字体大小可以在一定程度上反映用户的年龄。可以知道,电子设备100的字体大小可以由用户设置,字体大小通常可以包括以下几种类型:特大、超大、大、标准及小。字体类型为特大的字占显示屏的面积最大,字体类型为超大的字占显示屏的面积次之,字体类型为小的字占显示屏的面积最小。
具体地,临界值与电子设备100的字体大小和用户按压控件的压力值的关系式可以如下:
Time=basetime+θ(α*F(font)+β*F(pressure))   (2)
式(2)中,Time为临界值,basetime为基准值,F(font)为字体对应的调节时长、F(pressure)为触控压力值对应的调节时长,0<θ<1、0<α<1、0<β<1。可能的,基准值可以但不限于是400毫秒(ms)。可能地,θ的值可以但不限于是0.08,α的值可以但不限于是0.5,β的值可以但不限于是0.5。
其中,表3示例性示出了字体大小与调节时长的关系。
表3 字体大小font与调节时长F(font)的关系表
font F(font)
特大 500ms
超大 250ms
0ms
标准 0ms
0ms
可以看出,表3中的第一列为字体大小分类,第二列为调节时长。其中,字体大小分类可以包括:特大、超大、大、标准、小。其中,字体类型为特大时对应的调节时长F(font)为500ms;字体类型为超大时对应的调节时长F(font)为250ms;字体类型为大、标准或小时对应的调节时长F(font)为0ms。
示例性地,若字体大小为超大,则查询表3可知调节时长F(font)=250ms,若用户的触控压力值0.7<pressure≤0.9,则查询表2可知调节时长F(pressure)=50ms。假设式(2)中的基准值basetime=400ms,θ=0.08,α=0.5,β=0.5,则根据式(2)可以计算出临界值Time=400+0.08×(0.5×250+0.5×50)=412ms。
示例性地,若字体大小为标准,则查询表3可知调节时长F(age)=0ms,若用户的触控压力值0<pressure≤0.7,则查询表2可知调节时长F(pressure)=0ms。假设式(2)中的基准值basetime=400ms,θ=0.08,α=0.5,β=0.5,则根据式(2)可以计算出临界值Time=400+0.08×(0.5×0+0.5×0)=400ms。
示例性地,若字体大小为特大,则查询表3可知调节时长F(age)=500ms,若用户的触控压力值pressure>0.9,则查询表2可知调节时长F(pressure)=150ms。假设式(2)中的基准值basetime=400ms,θ=0.08,α=0.5,β=0.5,则根据式(2)可以计算出临界值Time=400+0.08×(0.5×500+0.5×150)=426ms。
可以知道,上述字体大小分类仅为示例性说明,在具体实现中还可以包括更多的或更少的字体类型,本申请实施例对此不作限定。
可以知道,上述字体大小分类对应的调节时长F(font)的值仅为示例性说明,在具体实现中还可以对应其他的调节时长F(font)的值,调节时长F(font)的值也不限于是非负数,在具体实现中还可以是负数,本申请实施例对此均不作限定。
不限于与字体大小及触控压力值有关,在具体实现中临界值还可以只与字体大小有关,或者只与触控压力值有关,本申请实施例对此不作限定。
不限于上述列举的两种方式,在具体实现中,临界值还可以由用户年龄及字体大小共同决定。
不限于上述列举的两种方式,在具体实现中临界值还可以由用户年龄、字体大小及触 控压力值三者共同决定,本申请实施例对此不作限定。
也即是说,临界值可以由用户年龄、字体大小及触控压力值中的至少一项决定。
基于上述列举的场景二,接下来介绍本申请实施例提供的拍照方法。该方法可以应用于图1示出的电子设备100,电子设备100上可安装相机应用。
图6示例性示出了本申请实施例提供的一种拍照方法的流程示意图。如图6所示,拍照方法至少可以包括以下几个步骤:
S101:接收用户作用于相机应用的拍摄控件的按压操作。
具体地,电子设备100可以通过触摸传感器180K检测作用于相机应用的拍摄控件301的按压操作。其中,按压操作可以根据按压时长分为长按操作和短按操作。
S102:根据用户的年龄及按压操作的按压时长共同确定按压操作对应的目标事件;其中,目标事件为拍摄一张照片或连续拍摄多张照片。
具体地,本申请实施例可以针对不同的用户的年龄可以设置不同的临界值。该临界值可以用来区分一个按压操作是长按操作还是短按操作。按压时长小于该临界值的按压操作为短按操作,目标事件为拍摄一张照片。按压时长大于或等于该临界值的按压操作为长按操作,目标事件为连续拍摄多张照片。
其中,连续拍摄照片的频率可以但不限于是每秒10张或每秒5张,具体的拍摄频率可由用户设置,或由厂商设置的默认拍摄频率。
S103:执行目标事件。
可能地,上述临界值可以根据用户年龄和触控压力值确定。触控压力值可以是用户在一段时间内按压任意控件的平均压力值。
可能地,上述临界值可以根据用户年龄和触控压力值所属的范围确定。具体可以将用户在一段时间内按压任意控件的压力值分为几个范围,触控压力值所属的范围为该用户在这一段时间内按压任意控件的压力值所属的频率最高的范围。
确定触控压力值的具体过程可见前述实施例中关于如何确定触控压力值部分的描述,此处不赘述。
关于用户年龄,具体可以通过两种方式来确定:
方式一:获取用户的人脸图像,根据用户的人脸图像直接确定用户年龄。
可能地,可以在电子设备进行人脸解锁时获取人脸图像。
可能地,可以从内部存储器121中获取保存的机主的人脸图像,该人脸图像用于人脸解锁。
具体地,获取人脸图像后,将人脸图像输入到卷积神经网络中,输出该人脸图像对应的年龄或年龄分类。该卷积神经网络可以是年龄分类模型,该模型可以由多个已知年龄分类的人脸图像训练而成。具体过程可见前述实施例中关于如何确定用户的年龄分类部分的描述,此处不赘述。
方式二:通过电子设备的字体大小间接确定用户年龄。
具体地,电子设备100的字体大小可在一定程度上反映用户的年龄。本申请实施例中提到的根据电子设备的字体大小间接确定用户年龄可以是指根据电子设备的字体大小确定字体大小对应的调节时长,而该调节时长是依据字体大小反映的用户年龄设置的。通常情 况下,字体越大可以表明用户的年龄越大,用户在按压控件时所需的反应时间也越长,因此对应的调节时长就越长。
临界值的具体计算方式可以参考前述实施例中关于介绍临界值的计算方式一和方式二部分的相关描述,此处不赘述。
本申请实施例提供的输入方法可以根据用户的年龄和按压操作的按压时长确定用户输入的按压操作是长按操作或者短按操作,为不同年龄的用户设置不同的反应时间。所有用户都可以按照自己对时长定义的理解输入短按操作或长按操作,从而使相机拍摄一张照片或者连续拍摄多张照片,提升用户拍摄的效率。
依然基于上述列举的场景二,接下来介绍本申请实施例提供的另外一种拍照方法。该方法中,两个年龄不同的用户分别对相机应用的拍摄控件输入同样的按压时长的按压操作,可以使电子设备做出不同的响应。
图7示例性示出了本申请实施例提供的另外一种拍照方法的流程示意图。如图7所示,拍照方法至少可以包括以下几个步骤:
S201:接收第一用户作用于相机应用的拍摄控件的第一按压操作。
具体地,电子设备100可以通过触摸传感器180K检测作用于相机应用的拍摄控件301的第一按压操作。
S202:响应于第一按压操作,拍摄一张照片。
具体地,第一按压操作为短按操作,电子设备100可拍摄一张照片。
S203:接收第二用户作用于相机应用的拍摄控件的第二按压操作。
具体地,电子设备100可以通过触摸传感器180K检测作用于相机应用的拍摄控件301的第二按压操作。
S204:响应于第二按压操作,连续拍摄多张照片。
具体地,第二按压操作为长按操作,电子设备100可连续拍摄多张照片。
其中,第一用户的年龄大于第二用户的年龄,第一按压操作和第二按压操作的按压时长相同。可以看出,在本申请实施例中,两个年龄不同的用户输入相同按压时长的按压操作后,电子设备100可以做出不同的响应。年龄较大的用户输入按压操作后,电子设备可拍摄一张照片。年龄较小的用户输入同样时长的按压操作后,电子设备可连续拍摄多张照片。
具体地,本申请实施例可以针对不同的用户的年龄可以设置不同的临界值。第一用户对应的临界值可称为第一临界值,第二用户对应的临界值可称为第二临界值。第一临界值可以用来区分第一按压操作是长按操作还是短按操作。第二临界值可以用来区分第二按压操作是长按操作还是短按操作。
可知,电子设备100可判断出第一按压操作的按压时长小于第一临界值,确定第一按压操作对应的第一目标事件为拍摄一张照片,并执行该第一目标事件。电子设备100可判断出第二按压时长大于或等于第二临界值,确定第二按压操作对应的第二目标事件为连续拍摄多张照片,并执行该第二目标事件。
其中,连续拍摄照片的频率可以但不限于是每秒10张或每秒5张,具体的拍摄频率可由用户设置,或由厂商设置的默认拍摄频率。
可能地,上述第一临界值(或第二临界值)可以根据第一用户(或第二用户)年龄和第一触控压力值(或第二触控压力值)确定。第一触控压力值(或第二触控压力值)可以是第一用户(或第二用户)在一段时间内按压任意控件的平均压力值。
可能地,上述第一临界值(或第二临界值)可以根据第一用户(或第二用户)年龄和第一触控压力值(或第二触控压力值)所属的范围确定。具体可以将第一用户(或第二用户)在一段时间内按压任意控件的压力值分为几个范围,第一触控压力值(或第二触控压力值)所属的范围为第一用户(或第二用户)在这一段时间内按压任意控件的压力值所属的频率最高的范围。
确定第一触控压力值(或第二触控压力值)的具体过程可见前述实施例中关于如何确定触控压力值部分的描述,此处不赘述。
关于第一用户(或第二用户)年龄,具体可以通过两种方式来确定:
方式一:获取第一用户(或第二用户)的人脸图像,根据第一用户(或第二用户)的人脸图像直接确定第一用户(或第二用户)年龄。
可能地,可以在电子设备100进行人脸解锁时获取人脸图像。
可能地,可以从内部存储器121中获取保存的机主的人脸图像,该人脸图像用于人脸解锁。
具体地,获取人脸图像后,将人脸图像输入到卷积神经网络中,输出该人脸图像对应的年龄或年龄分类。该卷积神经网络可以是年龄分类模型,该模型可以由多个已知年龄分类的人脸图像训练而成。具体过程可见前述实施例中关于如何确定用户的年龄分类部分的描述,此处不赘述。
方式二:通过电子设备100的字体大小间接确定第一用户(或第二用户)年龄。
具体地,电子设备100的字体大小可在一定程度上反映用户的年龄。本申请实施例中提到的根据电子设备的字体大小间接确定用户年龄可以是指根据电子设备的字体大小确定字体大小对应的调节时长,而该调节时长是依据字体大小反映的用户年龄设置的。通常情况下,字体越大可以表明用户的年龄越大,用户在按压控件时所需的反应时间也越长,因此对应的调节时长就越长。
第一临界值(或第二临界值)的具体计算方式可以参考前述实施例中关于介绍临界值的计算方式一和方式二部分的相关描述,此处不赘述。
可知,电子设备100的字体大小可由用户设置。第一用户使用电子设备100时,电子设备100的字体大小为第一字体大小;第二用户使用电子设备100时,电子设备100的字体大小为第二字体大小。其中,第一字体大小大于第二字体大小。字体大小越大的字体占显示屏的面积越大,字体大小越小的字体占显示屏的面积越小。例如,第一字体大小可以是特大,第二字体大小可以是标准。
本申请实施例中两个年龄不同的用户输入同样按压时长的按压操作,电子设备可以做出不同的响应。根据用户的年龄确定用户输入的按压操作是长按操作或者短按操作,为不同年龄的用户设置不同的反应时间。所有用户都可以按照自己对时长定义的理解输入短按操作或长按操作,从而使相机拍摄一张照片或者连续拍摄多张照片,提升用户拍摄的效率。
接下来介绍一个本申请实施例提供的一种具体的拍照方法,以用户对拍摄控件输入按压操作为例进行说明。
场景设定:
假设电子设备在接收用户对拍摄控件输入按压操作之前,已根据用户的年龄和触控压力值确定了临界值。假设电子设备根据人脸解锁时摄像头捕捉到的图像进行年龄分类,识别出用户的年龄大于60岁,则查询表1可知调节时长F(age)=100ms。假设电子设备采集用户在一段时间内触控压力值所在的频率最高的范围为0.7<pressure≤0.9,则查询表2可知调节时长F(pressure)=50ms。假设式(1)中的基准值basetime=400ms,θ=0.08,α=0.5,β=0.5,则根据式(1)可以计算出临界值Time=400+0.08×(0.5×100+0.5×50)=406ms。
图8示例性示出了本申请实施例提供的一种具体的输入方法的流程示意图。如图8所示,输入方法可以包括以下几个步骤:
S301:触摸传感器180K检测作用于拍摄控件301的按压操作。
具体地,电子设备检测到作用于拍摄控件301的按压操作后,可以屏蔽对系统原生长按事件的监听,系统原来设定的长按时长例如可以是400ms(即按压操作的按压时长超过或等于400ms即为长按操作)。且电子设备100可以重新设置长按时长,将该长按时长修改为根据用户年龄和/或触控压力值计算得到的临界值406ms。具体可以通过内部重写触发触摸事件onTouchEvent方法重新设置系统原来设定的长按时长。
S302:响应于该按压操作,计时器196开始计时。
S303:处理器110判断计时器196的计时结果是否大于或等于临界值。若是,执行S304,若否,执行S307。
具体地,临界值可以是处理器110预先根据用户年龄和触控压力值计算得到的值。具体示例可见前述场景设定。上述计算临界值的过程可以是处理器110执行的。
S304:摄像头193按照预设频率拍摄照片。
具体地,预设频率例如可以是每秒10张或每秒5张,具体拍摄频率可以由用户设置,或由电子设备厂商设置默认拍摄频率。
S305:触摸传感器180K判断按压操作是否结束。若是,执行S306,若否,执行S304。
S306:计时器196结束计时,摄像头193停止拍摄照片。
具体地,按压操作结束后,电子设备100还可以重置拍摄控件301的状态,直到再次检测到作用于该控件的按压操作。
S307:触摸传感器180K检测到按压操作结束,摄像头193拍摄一张照片。
可能地,电子设备100检测到作用于拍摄控件301的按压操作的同时,还可以检测到滑动操作,在检测到该滑动操作超出该控件的区域时,计时器196也可以停止计时,电子设备100可以根据计时器196的计时结果做出响应。
本申请实施例中,用户在对拍摄控件输入按压操作时,电子设备可以根据用户的年龄及触控压力值计算出适用于该用户的临界值,根据用户输入的按压操作的时长与临界值的关系,准确判断用户意图,使电子设备做出正确的响应,避免由于用户对操作时长的理解不准确或用户的操作习惯导致电子设备错误响应,提升用户的输入效率,提升用户体验。
基于以上列举的三个应用场景,接下来介绍本申请实施例提供的输入方法。
图9示出了本申请实施例提供的输入方法的流程示意图。如图9所示,输入方法至少可以包括以下几个步骤:
S401:检测作用于第一控件的按压操作。
具体地,第一控件可以是图3实施例中的相机图标202,第一控件还可以是图4实施例中的拍摄控件301,第一控件还可以是图5实施例中的某张照片的缩略图。不限于上述列举的控件,在具体实现中第一控件还可以是其他的控件,本申请实施例对此不作限定。
S402:根据该按压操作的时长与临界值的关系确定该按压操作的类型。
其中,按压操作的类型包括短按操作和长按操作。
可能地,上述临界值可以由用户年龄及触控压力值决定。其中,触控压力值为该用户在一段时间内按压任意控件的压力平均值,具体可参考前述实施例中关于如何确定触控压力值部分的相关描述,此处不再赘述。
可能地,上述压力值可以由用户年龄及触控压力值所属的范围决定。
具体地,可以将该用户在一段时间内按压任意控件的压力值分为几个范围,上述触控压力值所属的范围为该用户在这一段时间内按压任意控件的压力值所属的频率最高的范围,具体可参考前述实施例中关于如何确定触控压力值部分的相关描述,此处不再赘述。
关于用户年龄,具体可以通过两种方式来确定:
方式一:获取用户的人脸图像,根据用户的人脸图像直接确定用户年龄。
方式二:通过电子设备的字体大小间接确定用户年龄。
具体实现方式可参考图6或图7实施例中的相关描述,此处不赘述。
临界值的具体计算方式可以参考前述实施例中关于介绍临界值的计算方式一和方式二部分的相关描述,此处不赘述。
S403:根据该按压操作的类型确定该按压操作对应的目标事件。
具体地,若按压操作的时长小于上述临界值,则确定该按压操作为短按操作。若按压操作的时长大于或等于上述临界值,则确定该按压操作为长按操作。不同的按压操作对应的目标事件不同。
可能地,第一控件为图3实施例中的相机图标202。对相机图标202输入的按压操作为短按操作时,该按压操作对应的目标事件为开启摄像头193,显示图3中的B所示的用户界面30。对相机图标202输入的按压操作为长按操作时,该按压操作对应的目标事件为在用户界面20中显示图3中的C示出的关于相机应用的功能列表215。
可能地,第一控件为图4实施例中的拍摄控件301。对拍摄控件301输入的按压操作为短按操作时,该按压操作对应的目标事件为拍摄一张照片。对拍摄控件301输入的按压操作为长按操作时,该按压操作对应的目标事件为连续拍摄多张照片。
可能地,第一控件为图5实施例中的照片的缩略图P7。对P7输入的按压操作为短按操作时,该按压操作对应的目标事件为显示用于展示P7对应的照片的用户界面,即图5中的B示出的用户界面50。对P7输入的按压操作为长按操作时,该按压操作对应的目标事件为显示用于选择照片的用户界面,即图5中的C示出的用户界面40。
S404:执行该目标事件。
本申请实施例可以根据用户的年龄计算适用于该用户的临界值,按压时长大于或等于该临界值的按压操作即为长按操作,按压时长小于该临界值的按压操作即为短按操作。短按操作和长按操作对应的目标事件不同。根据该临界值判断用户输入的按压操作的类型,可以避免由于不同年龄的用户对时长定义理解的不同导致电子设备无法准确识别该用户的意图,使电子设备可以对用户输入的按压操作做出准确的响应,降低电子设备误响应的概率,提升用户的输入效率,提升用户体验。
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机或处理器上运行时,使得计算机或处理器执行上述任一个方法中的一个或多个步骤。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。

Claims (15)

  1. 一种拍照方法,所述方法应用于电子设备,所述电子设备已安装相机应用,其特征在于,所述方法包括:
    接收用户作用于所述相机应用的拍摄控件的按压操作;
    根据所述用户的年龄及所述按压操作的按压时长共同确定所述按压操作对应的目标事件;所述目标事件为拍摄一张照片或连续拍摄多张照片;
    执行所述目标事件。
  2. 如权利要求1所述的方法,其特征在于,所述根据所述用户的年龄及所述按压操作的按压时长共同确定所述按压操作对应的目标事件包括:
    根据所述用户的年龄确定临界值;
    在所述按压时长大于或等于所述临界值的情况下,所述按压操作对应的目标事件为连续拍摄多张照片;
    在所述按压时长小于所述临界值的情况下,所述按压操作对应的目标事件为拍摄一张照片。
  3. 如权利要求2所述的方法,其特征在于,所述根据所述用户的年龄确定临界值包括:根据所述用户的年龄及触控压力值确定所述临界值;其中,所述触控压力值为所述用户在一段时间内按压任意控件的平均压力值。
  4. 如权利要求1-3任一项所述的方法,其特征在于,所述根据所述用户的年龄及所述按压操作的按压时长共同确定所述按压操作对应的目标事件之前,所述方法还包括:
    获取所述用户的人脸图像;
    根据所述人脸图像确定所述用户的年龄。
  5. 如权利要求1-3任一项所述的方法,其特征在于,所述根据所述用户的年龄及所述按压操作的按压时长共同确定所述按压操作对应的目标事件之前,所述方法还包括:
    根据所述电子设备的字体大小确定所述用户的年龄。
  6. 一种拍照方法,所述方法应用于电子设备,所述电子设备已安装相机应用,其特征在于,包括:
    接收第一用户作用于所述相机应用的拍摄控件的第一按压操作;
    响应于所述第一按压操作,拍摄一张照片;
    接收第二用户作用于所述拍摄控件的第二按压操作;
    响应于所述第二按压操作,连续拍摄多张照片;
    其中,所述第一用户的年龄大于所述第二用户的年龄,所述第一按压操作和所述第二按压操作的按压时长相同。
  7. 如权利要求6所述的方法,其特征在于,所述响应于所述第一按压操作,拍摄一张照片包括:
    根据所述第一用户的年龄及所述第一按压操作的按压时长共同确定所述第一按压操作对应的第一目标事件为拍摄一张照片;
    执行所述第一目标事件;
    所述响应于所述第二按压操作,连续拍摄多张照片包括:
    根据所述第二用户的年龄及所述第二按压操作的按压时长共同确定所述第二按压操作对应的第二目标事件为连续拍摄多张照片;
    执行所述第二目标事件。
  8. 如权利要求7所述的方法,其特征在于,所述根据所述第一用户的年龄及所述第一按压操作的按压时长共同确定所述第一按压操作对应的第一目标事件为拍摄一张照片包括:
    根据所述第一用户的年龄确定第一临界值;
    在确定所述第一临界值大于所述第一按压时长的情况下,确定所述第一目标事件为拍摄一张照片;
    所述根据所述第二用户的年龄及所述第二按压操作的按压时长共同确定所述第二按压操作对应的第二目标事件为连续拍摄多张照片包括:
    根据所述第二用户的年龄确定第二临界值;
    在确定所述第二临界值小于或等于所述第二按压时长的情况下,确定所述第二目标事件为连续拍摄多张照片。
  9. 如权利要求8所述的方法,其特征在于,所述根据所述第一用户的年龄确定第一临界值包括:根据所述第一用户的年龄及第一触控压力值确定所述第一临界值;其中,所述第一触控压力值为所述第一用户在一段时间内按压任意控件的平均压力值;
    所述根据所述第二用户的年龄确定第二临界值包括:根据所述第二用户的年龄及第二触控压力值确定所述第二临界值;其中,所述第二触控压力值为所述第二用户在一段时间内按压任意控件的平均压力值。
  10. 如权利要求6-9任一项所述的方法,其特征在于,所述响应于所述第一按压操作之前,所述方法还包括:
    获取所述第一用户的人脸图像;
    根据所述第一用户的人脸图像确定所述第一用户的年龄;
    所述响应于所述第二按压操作之前,所述方法还包括:
    获取所述第二用户的人脸图像;
    根据所述第二用户的人脸图像确定所述第二用户的年龄。
  11. 如权利要求6-9任一项所述的方法,其特征在于,所述第一用户使用所述电子设 备时所述电子设备的字体大小为第一字体大小,所述第二用户使用所述电子设备时所述电子设备的字体大小为第二字体大小,所述第一字体大小大于所述第二字体大小;
    所述响应于所述第一按压操作之前,所述方法还包括:根据所述第一字体大小确定所述第一用户的年龄;
    所述响应于所述第二按压操作之前,所述方法还包括:根据所述第二字体大小确定所述第二用户的年龄。
  12. 一种电子设备,其特征在于,包括:一个或多个处理器、存储器以及无线通信模块;
    所述存储器以及所述无线通信模块与所述一个或多个处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述一个或多个处理器执行所述计算机指令时,所述电子设备执行如权利要求1-5中任一项所述的拍照方法。
  13. 一种电子设备,其特征在于,包括:一个或多个处理器、存储器以及无线通信模块;
    所述存储器以及所述无线通信模块与所述一个或多个处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述一个或多个处理器执行所述计算机指令时,所述电子设备执行如权利要求6-11中任一项所述的拍照方法。
  14. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1-5中任一项所述的拍照方法。
  15. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求6-11中任一项所述的拍照方法。
PCT/CN2020/103096 2019-07-25 2020-07-20 输入方法及电子设备 WO2021013132A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20844692.2A EP3982239A4 (en) 2019-07-25 2020-07-20 ENTRY METHOD AND ELECTRONIC DEVICE
US17/581,505 US20220150403A1 (en) 2019-07-25 2022-01-21 Input Method and Electronic Device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910677040.2A CN110471606B (zh) 2019-07-25 2019-07-25 输入方法及电子设备
CN201910677040.2 2019-07-25

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/581,505 Continuation US20220150403A1 (en) 2019-07-25 2022-01-21 Input Method and Electronic Device

Publications (1)

Publication Number Publication Date
WO2021013132A1 true WO2021013132A1 (zh) 2021-01-28

Family

ID=68508320

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/103096 WO2021013132A1 (zh) 2019-07-25 2020-07-20 输入方法及电子设备

Country Status (4)

Country Link
US (1) US20220150403A1 (zh)
EP (1) EP3982239A4 (zh)
CN (1) CN110471606B (zh)
WO (1) WO2021013132A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471606B (zh) * 2019-07-25 2022-08-19 华为技术有限公司 输入方法及电子设备
CN111371988B (zh) * 2020-02-27 2021-08-20 Oppo广东移动通信有限公司 内容操作方法、装置、终端及存储介质
CN111314621B (zh) * 2020-04-15 2022-05-27 维沃移动通信有限公司 一种拍照方法及电子设备
CN114185444A (zh) * 2020-08-24 2022-03-15 北京小米移动软件有限公司 触控屏防误触方法、装置及存储介质
CN112188000A (zh) * 2020-09-29 2021-01-05 泰州市盛祥纸制品有限公司 一种识别用户按压时间的方法及终端设备
CN114879894A (zh) * 2022-04-20 2022-08-09 华为技术有限公司 功能启动方法、用户界面及电子设备
CN116244033B (zh) * 2023-05-11 2023-09-26 国网浙江宁波市鄞州区供电有限公司 一种电力业务自助办理方法、系统及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677077A (zh) * 2015-12-28 2016-06-15 小米科技有限责任公司 单击事件的判定方法和装置
CN106909285A (zh) * 2017-01-24 2017-06-30 奇酷互联网络科技(深圳)有限公司 终端的操控方法、装置和移动终端
CN106973229A (zh) * 2017-04-19 2017-07-21 上海小蚁科技有限公司 一种拍摄设备的控制方法及装置
KR20180014575A (ko) * 2016-08-01 2018-02-09 삼성전자주식회사 전자 장치 및 전자 장치의 제어 방법
CN110471606A (zh) * 2019-07-25 2019-11-19 华为技术有限公司 输入方法及电子设备

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4218348B2 (ja) * 2003-01-17 2009-02-04 オムロン株式会社 撮影装置
WO2011082645A1 (zh) * 2010-01-06 2011-07-14 华为终端有限公司 显示图片/界面的方法及终端
CN103856709B (zh) * 2012-12-04 2017-08-25 腾讯科技(深圳)有限公司 图像获取方法及装置
CN104618580B (zh) * 2014-12-30 2017-10-17 广东欧珀移动通信有限公司 一种拍照实现方法及终端
KR101628990B1 (ko) * 2015-01-14 2016-06-09 계명대학교 산학협력단 모바일 유방암 촉진 기기, 시스템 및 방법
CN106096964B (zh) * 2016-05-31 2020-06-19 北京小米移动软件有限公司 支付方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677077A (zh) * 2015-12-28 2016-06-15 小米科技有限责任公司 单击事件的判定方法和装置
KR20180014575A (ko) * 2016-08-01 2018-02-09 삼성전자주식회사 전자 장치 및 전자 장치의 제어 방법
CN106909285A (zh) * 2017-01-24 2017-06-30 奇酷互联网络科技(深圳)有限公司 终端的操控方法、装置和移动终端
CN106973229A (zh) * 2017-04-19 2017-07-21 上海小蚁科技有限公司 一种拍摄设备的控制方法及装置
CN110471606A (zh) * 2019-07-25 2019-11-19 华为技术有限公司 输入方法及电子设备

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
EP3982239A1 (en) 2022-04-13
CN110471606A (zh) 2019-11-19
US20220150403A1 (en) 2022-05-12
EP3982239A4 (en) 2022-08-03
CN110471606B (zh) 2022-08-19

Similar Documents

Publication Publication Date Title
EP3872807B1 (en) Voice control method and electronic device
WO2020259452A1 (zh) 一种移动终端的全屏显示方法及设备
WO2021013132A1 (zh) 输入方法及电子设备
WO2021017889A1 (zh) 一种应用于电子设备的视频通话的显示方法及相关装置
EP3944063A1 (en) Screen capture method and electronic device
WO2021213164A1 (zh) 应用界面交互方法、电子设备和计算机可读存储介质
CN111078091A (zh) 分屏显示的处理方法、装置及电子设备
WO2021258814A1 (zh) 视频合成方法、装置、电子设备及存储介质
US20220343648A1 (en) Image selection method and electronic device
CN113891009B (zh) 曝光调整方法及相关设备
WO2020192761A1 (zh) 记录用户情感的方法及相关装置
WO2021082815A1 (zh) 一种显示要素的显示方法和电子设备
US20210385370A1 (en) Intelligent Photographing Method and System, and Related Apparatus
CN112930533A (zh) 一种电子设备的控制方法及电子设备
WO2023241209A1 (zh) 桌面壁纸配置方法、装置、电子设备及可读存储介质
CN112150499A (zh) 图像处理方法及相关装置
CN114115770A (zh) 显示控制的方法及相关装置
WO2020233593A1 (zh) 一种前景元素的显示方法和电子设备
WO2023273543A1 (zh) 一种文件夹管理方法及装置
WO2022143180A1 (zh) 协同显示方法、终端设备及计算机可读存储介质
WO2021238740A1 (zh) 一种截屏方法及电子设备
WO2020192716A1 (zh) 一种系统语言的切换方法及相关装置
WO2022179495A1 (zh) 一种隐私风险反馈方法、装置及第一终端设备
CN115022982B (zh) 多屏协同无感接入方法、电子设备及存储介质
WO2022095906A1 (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: 20844692

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020844692

Country of ref document: EP

Effective date: 20220105

NENP Non-entry into the national phase

Ref country code: DE