WO2017219376A1 - 利用压力触控生成密码的方法及装置 - Google Patents

利用压力触控生成密码的方法及装置 Download PDF

Info

Publication number
WO2017219376A1
WO2017219376A1 PCT/CN2016/087190 CN2016087190W WO2017219376A1 WO 2017219376 A1 WO2017219376 A1 WO 2017219376A1 CN 2016087190 W CN2016087190 W CN 2016087190W WO 2017219376 A1 WO2017219376 A1 WO 2017219376A1
Authority
WO
WIPO (PCT)
Prior art keywords
password
input
character
pressure value
user
Prior art date
Application number
PCT/CN2016/087190
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 US15/776,025 priority Critical patent/US20180336339A1/en
Priority to CN201680016735.0A priority patent/CN107851140B/zh
Priority to PCT/CN2016/087190 priority patent/WO2017219376A1/zh
Priority to EP16905916.9A priority patent/EP3364326B1/en
Publication of WO2017219376A1 publication Critical patent/WO2017219376A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/32User authentication using biometric data, e.g. fingerprints, iris scans or voiceprints
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication
    • G06F21/46Structures or tools for the administration of authentication by designing passwords or checking the strength of passwords
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication

Definitions

  • the present invention relates to the field of data processing, and in particular, to a method and an apparatus for generating a password by using pressure touch.
  • a touch input keyboard also known as a soft keyboard, a virtual keyboard, hereinafter referred to as a soft keyboard
  • a soft keyboard also has a security risk.
  • a user enters a password especially when using a soft keyboard of a smart phone, an ATM, a POS machine (point of sale), etc., the password is easily sneaked, and there is a risk of password leakage, and even an account is created. Bad consequences such as theft, property damage, etc.
  • the existing anti-peeping technology includes adding a physical mask to the above device or changing the position of the soft keyboard button.
  • the former requires hardware modification cost and the shape is cumbersome, and the latter cannot completely eliminate the voyeur hidden danger, and both of them can reduce the convenience of user input.
  • the Chinese Patent Publication No. CN102982269A discloses a method and system for anti-peeping password authentication based on biometric features, which simultaneously records the biometric characteristics of the user when the user inputs the password. The severity of the operation, the weight sequence is used as part of the password or password to enhance the security of the password. This method changes the password storage system and is not compatible with the currently widely used password input mode.
  • Another U.S. Patent No. 7,305,559 B2 discloses a password input method for adding an input rhythm, but if the input rhythm is sneaked or illegally recorded by the camera, the password may still be leaked. Therefore, the prior art still has the problems of low security and poor convenience in password input.
  • the embodiments of the present invention provide a method and a device for generating a password by using pressure touch, which greatly improves the security of the password, increases the convenience and flexibility of the user when inputting the password, and is also compatible.
  • Traditional touch devices and their password storage systems are also compatible.
  • an embodiment of the present invention provides a method for generating a password by using pressure touch.
  • the party The method includes: determining, by the device, whether the current interface is in a password input state; and when the device determines that the current interface is in a password input state, receiving input information of the user, where the input information includes a character and a pressure value generated when the character is input.
  • the device processes the character according to the pressure value to generate a password.
  • the current interface is a user interface having an input focus, that is, the user interface can receive information input by a user through an input device such as a pressure touch screen, a keyboard, a mouse, or the like. . Only the user interface whose password is input on the current interface triggers the device to receive the user's password input, which improves the input efficiency and saves a certain amount of power.
  • the device determines whether the current interface is in a password input state, where the device is configured according to the current interface.
  • the input box type determines whether the current interface is in a password input state. Taking a device running the Android operating system as an example, the device determines the type of the input box according to the InputType tag of the input box.
  • the actual input characters may not be displayed in the input box of the current interface of the device, for example, the input characters may be hidden, or may be displayed as “*” symbol, “ ⁇ ” symbol or other input characters. Characters to prevent input characters from being peeked by people.
  • the input mode of the input method is adjusted according to an input frame type of the current interface.
  • the password is verified after the password is generated.
  • the generated password is submitted to the password input box and compared to the correct password.
  • the processing, by the device, the character according to the pressure value includes: if there are multiple password generation algorithms, according to a password generation algorithm selected by the user Generate a password.
  • the currently applicable password generation algorithm may be prompted by a text, a picture, an audio, a video, etc. during a user password input operation. Further, in order to Confuse the voyeur, you can disguise the content of the prompt.
  • the selecting may be: the device determining a finger used by the user input; the device invoking a corresponding password generation algorithm according to different fingers. In this way, different password generation algorithms can be called at any time according to different situations, which greatly improves the security and portability of the input password.
  • the input information is (X n , Y n ), where X n is an input character, Y n is a pressure value corresponding to X n , and n is a natural number; the device processes the character according to the pressure value to generate a password, specifically: the device determines whether Y n is less than a preset first threshold Y Max1 ; when the device determines Y n ⁇ Y max1 , the generated password is X n .
  • the password generation algorithm may also be expressed as: the device determines whether the pressure value corresponding to each character is less than a preset first threshold; and the device generates a password according to a character whose pressure value is less than the first threshold.
  • the password generated in this way does not contain pressure value information, is fully compatible with the existing password storage system, and can be used for unlocking various pressure touch screen devices.
  • the input information is (X n , Y n ), where X n is an input character, Y n is a pressure value corresponding to X n , and n is a natural number; the device processes the character according to the pressure value to generate a password, specifically: the device determines whether Y n is greater than a preset second threshold Y. Max2 ; when the device determines Y n >Y max2 , the generated password is X n , X n .
  • the above-mentioned password generation algorithm may also be expressed as follows: the device determines whether the pressure value corresponding to each character is greater than a preset second threshold; the device repeatedly inputs a character whose pressure value is greater than the second threshold, and generates a password.
  • the password generated in this way does not contain pressure value information, is fully compatible with the existing password storage system, and can be used for unlocking various pressure touch screen devices.
  • the input information is specifically (X 1 , Y 1 ), (X 2 , Y 2 ), ... ..., (X k-1 , Y k-1 ), (X k , Y k ), (X k+1 , Y k+1 ), ..., (X n , Y n ), where X 1 , X 2 , ..., X k-1 , X k , X k+1 , ..., X n is the input character, Y 1 , Y 2 , ..., Y k-1 , Y k , Y k+1 , ...., Y n is the pressure value corresponding to the character; wherein k and n are natural numbers, and n ⁇ k>1; the device processes the character according to the pressure value to generate a password, specifically To: the device determines whether Y 1 ,
  • the password generation algorithm may be further configured as: the device determines whether a pressure value corresponding to each character is greater than a preset third threshold; and the device is based on a character whose first pressure value is greater than the third threshold and subsequent The character generates a password.
  • the password generated in this way does not contain pressure value information, is fully compatible with the existing password storage system, and can be used for unlocking various pressure touch screen devices.
  • the input information is specifically (X 1 , Y 1 ), (X 2 , Y 2 ), where , X 1 , X 2 are input characters, Y 1 , Y 2 are pressure values corresponding to the characters; the device processes the characters according to the pressure value to generate a password, specifically: the device The size of Y 1 and Y 2 is judged; if Y 2 > Y 1 , the generated code is X 2 , X 1 ; if Y 2 ⁇ Y 1 , the generated code is X 1 , X 2 .
  • the password generation algorithm may also be expressed as follows: the device compares the pressure values corresponding to the two characters before and after; if the pressure value corresponding to the latter is greater than the pressure value corresponding to the former, the order of the two characters is exchanged; if the latter corresponds to the pressure value Less than or equal to the pressure value corresponding to the former, maintaining the order of two characters; generating a password.
  • the password generated in this way does not contain pressure value information, is fully compatible with the existing password storage system, and can be used for unlocking various pressure touch screen devices.
  • the device can generate a password by using the user input information containing the pressure value, and the password input process cannot know the finally generated password even if it is peeked by others, and achieves the purpose of anti-peeping; and the final generated password is not With pressure value information, it is fully compatible with existing password storage system and can be used for unlocking various pressure touch screen devices.
  • an embodiment of the present invention provides an apparatus, including a pressure touch screen, one or more processors, a memory, and one or more programs; the one or more programs are stored in the memory and configured to Executing by the one or more processors, the one or more programs comprising instructions for: determining, by the device, whether the current interface is in a password input state; when the device determines that the current interface is in a password input state And receiving input information of the user, the input information including a character and a pressure value generated when the character is input; the device processes the character according to the pressure value to generate a password.
  • the specific method is the same as the method of the first aspect.
  • an embodiment of the present invention provides a device, including a pressure touch screen, a processor, and a memory; the processor determines whether the current interface is in a password input state, and when the processor determines that the current interface is in a password input state,
  • the pressure touch screen receives input information of a user, the input information includes a character and a pressure value generated when the character is input; the processor processes the character according to the pressure value to generate a password.
  • the algorithm for generating a password is stored in the memory. The specific method is the same as the method of the first aspect.
  • an embodiment of the present invention provides an apparatus for generating a password by using a pressure touch, where the apparatus includes a state determining unit, an input receiving unit, and a password generating unit; wherein the state is determined a unit, configured to determine whether the current interface is in a password input state, and the input receiving unit is configured to receive input information of the user when the status determining unit determines that the current interface is in a password input state, where the input information includes characters And a pressure value generated when the character is input; the password generating unit is configured to process the character according to the pressure value to generate a password.
  • the specific method is the same as the method of the first aspect.
  • an embodiment of the present invention provides a computer storage medium storing one or more programs, the one or more programs comprising instructions for performing the method of the first aspect.
  • FIG. 1 is a schematic structural diagram of hardware of a mobile phone according to an embodiment of the present invention.
  • FIG. 2 is a schematic structural diagram of a mobile phone operating system according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a logical framework of an input method according to an embodiment of the present invention.
  • 4A is a schematic diagram of an interface method of a soft keyboard input method according to an embodiment of the present invention.
  • 4B is a schematic diagram of another soft keyboard input method interface according to an embodiment of the present invention.
  • 4C is a schematic diagram of a password input state interface according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a method for generating a password by using pressure touch according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram of a password generation algorithm according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of another password generation algorithm according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of another password generation algorithm according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of still another cryptographic generation algorithm according to an embodiment of the present invention.
  • FIG. 10 is a schematic diagram of still another cryptographic generation algorithm according to an embodiment of the present invention.
  • FIG. 11 is a schematic diagram of still another cryptographic generation algorithm according to an embodiment of the present invention.
  • FIG. 12 is a schematic diagram of a method for anti-peeping of a mobile phone according to an embodiment of the present invention.
  • FIG. 13 is a schematic diagram of a device according to an embodiment of the present invention.
  • FIG. 14 is a schematic diagram of an apparatus for generating a password by using pressure touch according to an embodiment of the present invention.
  • Some of the devices in the embodiments of the present invention have a pressure touch screen, and pressure touch is realized by pressure sensing.
  • the embodiments of the present invention are applicable to all occasions where a password is required to be input by using a touch screen.
  • the devices involved include, but are not limited to, a mobile phone with a touch input function, a tablet computer, a smart watch, an automatic teller machine, a POS machine, an access control system, etc., and typical scenes are utilized.
  • the touch screen unlocks the phone and its application, enters the access code, enters the bank card password using the touch screen of the cash machine, enters the bank card password using the touch screen of the POS machine, and so on.
  • the operating system carried by the device includes but is not limited to DOS, Unix, Linux, or other operating system.
  • the touch operation can be completed by touching a touch screen with a suitable part or object such as a finger or a stylus.
  • Some embodiments of the present invention are exemplified by a smart phone running an Android operating system. Those skilled in the art should understand that the method of the embodiment of the present invention is also applicable to other devices having a touch input function.
  • FIG. 1 is a schematic diagram showing the hardware structure of a mobile phone 100. It should be understood that the mobile phone 100 is only one example of the above-described device having a touch input function, and the mobile phone 100 may have more or less components than those shown, may combine two or more components, or may have Different configurations or arrangements of these components.
  • the various components shown in FIG. 1 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
  • the mobile phone 100 includes a processor 110, a memory 120, an input device 130, a display device 140, a sensor 150, an audio circuit 160, a WiFi module 170, a radio frequency circuit 180, and a power supply 190. These components communicate via one or more communication buses or signal lines.
  • the processor 110 is a control center of the handset 100 that connects various portions of the handset 100 using various interfaces and lines, by executing or executing a software program or set of instructions stored in the memory 120, and invoking data stored in the memory 120, executing
  • the various functions of the mobile phone 100 and the processing of data enable overall monitoring of the handset 100.
  • the processor 110 may include one or more processing units; optionally, the processor 110 may integrate an application processor and a modem, where the application processor mainly processes an operating system, a user interface, an application, etc., and the modem is mainly Handle wireless communications. It can be understood that the above modem processor may not be integrated into the processor 110.
  • the processor 110 can include an image signal processor and a dual core/multicore processor.
  • the memory 120 can be used to store software programs and function modules, and the processor 110 is stored by running The software program of the memory 120 and the functional modules thereby perform various functional applications and data processing of the mobile phone 100.
  • the memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to The data created by the use of the mobile phone 100 (such as audio data, phone book, etc.) and the like.
  • the memory 120 includes a high speed random access memory, and also includes a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the memory 120 can store various operating systems, such as the Windows operating system of Microsoft Corporation, or the Android operating system developed by Google Inc., and the like. In some embodiments of the invention, the memory 120 may be stored in an Android operating system.
  • the input device 130 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset 100.
  • the input device 130 may include a touch panel 131 and other input devices 132.
  • the touch panel 131 also referred to as a touch screen, can collect touch operations on or near the user (eg, the user uses any suitable part or object such as a finger, a stylus, or the like on the touch panel 131 or near the touch panel 131. Operation) and drive the corresponding connection device according to a preset program.
  • the touch panel 131 may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 110 is provided and can receive commands from the processor 110 and execute them.
  • the touch panel 131 is implemented by various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input device 130 includes other input devices 132.
  • other input devices 132 include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control button, a switch button, a Home button, etc.), a trackball, a mouse, a joystick, and the like.
  • function keys such as a volume control button, a switch button, a Home button, etc.
  • trackball such as a mouse, a joystick, and the like.
  • the touch panel 131 includes a touch-sensitive surface for performing various operations related to contact detection, such as determining whether contact has occurred (eg, detecting a finger press event), Touching the pressure value and coordinate information, determining if there is movement of the contact and tracking the movement over the entire touch-sensitive surface (eg, detecting one or more finger-drag events), and determining if the contact has terminated (eg, detecting finger lift) Event or contact interruption). Determining the movement of the contact point may include determining the rate (magnitude), velocity (magnitude and direction), and/or acceleration (change in magnitude and/or direction) of the contact point, the movement of the contact point being caused by a series of contact data Said.
  • Touch detection techniques include, but are not limited to, capacitive, resistive, infrared, surface acoustic wave technology, and the like.
  • touch panel 131 should be understood as a generalized touch input device, and the touch sensitive surface can be integrated with the display screen, or can be separated to be connected to the system as a separate touch input device, such as coordinating mouse movement and mouse.
  • Button presses with or without single or multiple keyboard presses or hold
  • user movement taps drags, scrolls, etc. on the touchpad
  • stylus input can be used as touch input devices.
  • finger input eg, single finger contact, single finger tap gesture, single finger swipe gesture
  • one of these finger inputs Multiple or more may be replaced by an input from another touch input device (eg, a stylus input).
  • the user's gestures are flexible and can be click, double click, circle, draw line, single finger touch, or multi finger touch, and so on.
  • the selection of a particular gesture is flexible as long as substantially the same effect is achieved.
  • the position or area of the user's gesture acting on the touch-sensitive surface is flexible, and may be the area of an application interface element displayed on the display screen or a nearby area, and the display does not display the blank of the application interface element. Area, the display shows the area of a function setting, and so on.
  • the touch panel 131 detects the touch input of the user, and collects pressure touch information when the touch is input, including characters and corresponding pressure values.
  • the display device 140 can be used to display information input by the user or information provided to the user and various menus of the mobile phone 100.
  • the display device 140 may include a display panel 141.
  • the display panel 141 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like.
  • the touch panel 131 can cover the display panel 141. When the touch panel 131 detects a touch operation on or near the touch panel 131, the touch panel 131 transmits to the processor 110 to determine the type of the touch event, and then the processor 110 according to the touch event. The type provides a corresponding visual output on display panel 141. Visual output includes text, graphics, icons, videos, and any combination thereof.
  • some visual output or all of the visual output may correspond to a user interface object.
  • the touch panel 131 and the display panel 141 are used as two independent components to implement the input and output functions of the mobile phone 100 in FIG. 1, in some embodiments, the touch panel 131 is integrated with the display panel 141. Realize The input and output functions of the mobile phone 100.
  • the handset 100 can also include sensors 150, such as light sensors, motion sensors, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor may close the display panel 141 when the mobile phone 100 moves to the ear. / or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
  • the mobile phone 100 can also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like. I will not repeat them here.
  • the handset 100 can also include an audio circuit 160 in which a speaker 161, the microphone 162 can provide an audio interface between the user and the handset 100.
  • the audio circuit 160 can transmit the converted electrical data of the received audio data to the speaker 161 for conversion to the sound signal output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal by the audio circuit 160. After receiving, it is converted into audio data, and then processed by the audio data output processor 110, sent to another mobile phone via the radio frequency circuit 180, or outputted to the memory 120 for further processing.
  • the audio circuit 160 also includes a headset jack that provides an interface between the audio circuit 160 and a removable audio input/output peripheral, such as an output only headset or with an output (for example, a single or binaural headset) and an input (eg, a microphone) headset.
  • a headset jack that provides an interface between the audio circuit 160 and a removable audio input/output peripheral, such as an output only headset or with an output ( For example, a single or binaural headset) and an input (eg, a microphone) headset.
  • a radio frequency (RF, Radio Freqency) circuit 180 can be used for receiving and transmitting signals during and after receiving or transmitting information, converting electrical signals into electromagnetic signals or converting electromagnetic signals into electrical signals, and communicating with communication networks and other communication devices via electromagnetic signals.
  • the communication in particular, receives the downlink information of the base station and then processes it to the processor 110; in addition, transmits the designed uplink data to the base station.
  • Well-known circuitry for performing these functions may be included, including but not limited to antenna systems, radio frequency transceivers, one or more amplifiers, tuners, one or more oscillators, digital signal processors, codec chipsets, SIM (Subscriber Identity Module) card and so on.
  • the radio frequency circuit 180 can communicate with the network and other devices via wireless communication, such as the Internet, an intranet, and/or a wireless network (such as a cellular telephone network, a wireless local area network, and/or a metropolitan area network).
  • Wireless communication can use any of a variety of communication standards, protocols, and technologies including, but not limited to, global mobile communication systems, enhanced data GSM environments, high speed downlink packet access, high speed uplink packet access, wideband code division Multiple access, code division Multiple access, time division multiple access, Bluetooth, wireless fidelity (eg, IEEE 802.11a, IEEE 802.11b, IEEE 802.11g, and/or IEEE 802.11n), Internet voice protocol, Wi-MAX, email protocol (eg, Internet messaging) Access Protocol (IMAP) and/or Post Office Protocol (POP)), instant messaging (eg, Extensible Messaging Processing Site Protocol (XMPP), Session Initiation Protocol (SIMPLE) for instant messaging and field utilization extensions, instant messaging, and presence Service (IMPS), and/or Short
  • the power supply 190 is used to power and manage the mobile phone 100.
  • the power supply 190 may include a power management system, one or more power sources (eg, battery, alternating current), a recharging system, a power fault detection circuit, a power converter or inverter, and a power status indicator (eg, a light emitting diode) ) and any other components associated with the generation, management, and distribution of power in the handset.
  • power sources eg, battery, alternating current
  • a recharging system e.g., a power fault detection circuit
  • a power converter or inverter e.g., a power converter or inverter
  • a power status indicator eg, a light emitting diode
  • the mobile phone 100 may further include a camera, a Bluetooth module, and the like, and details are not described herein.
  • the Android operating system may be stored in the memory 120 of the mobile phone 100.
  • the Android operating system is a Linux-based mobile device operating system, which is composed of an operating system, a middleware, a user interface, and application software, and is provided by using a mobile phone.
  • the above hardware implements a variety of functions.
  • the architecture of the stored Android operating system will be described in detail.
  • FIG. 2 is a schematic diagram of a mobile phone operating system structure running an Android operating system.
  • the Android operating system architecture is divided into four layers, from the upper layer to the bottom layer, which is divided into application layer, application framework layer, function library layer and Linux kernel layer.
  • the application layer is the top layer of the Android operating system architecture, including the core application software of the Android operating system assembly, such as email client, SMS, call, calendar, map, browser, contact, etc.
  • application software of the Android operating system assembly such as email client, SMS, call, calendar, map, browser, contact, etc.
  • developers can write applications and install them to that layer.
  • applications are developed using the Java language, by calling the API (Application Programming Interface) provided by the application framework layer.
  • the application framework layer (Application Framework) is mainly to provide developers with various APIs that can be accessed by the application.
  • the developer uses the application framework layer to communicate with the underlying Android (such as the function library layer, the Linux kernel layer, etc.). Interact and develop your own applications.
  • the application framework layer is mainly a series of service and management systems of the Android operating system.
  • the application framework layer mainly includes the following key services:
  • Activity Manager is used to manage the application life cycle and provide common navigation rollback functions
  • Content Providers which are used to manage data sharing and access between different applications
  • Notification Manager which is used to control the application to display prompt information (such as Alerts, Notifications, etc.) to the user in the status bar;
  • Resource Manager Provides non-code resources (such as strings, graphics, layout files, etc.) for use by the application;
  • the Package Manager is mainly used to manage applications of the Android operating system
  • View a rich, extensible collection of views that can be used to build an application that includes a List, a Grid, a TextBox, a Button, and an embeddable Web browser;
  • Location Manager mainly to allow applications to access the current location of the phone.
  • Libraries are the backbone of the application framework and an important link between the application framework layer and the Linux kernel layer.
  • the library layer includes libraries that are compiled by the computer program C or C++. These libraries can be used by different components of the Android operating system to provide services to developers through the Android application framework.
  • the function library includes a libc function library, which is specifically customized for embedded linux-based devices; the function library also includes an Android operating system multimedia library (Media Framework), which supports audio/video playback of multiple encoding formats and Recording, support for still image files, as well as common audio/video encoding formats.
  • Media Framework Android operating system multimedia library
  • the function library also includes an interface management library (Surface Manager), which is mainly responsible for managing access to the display system, and is used to manage the interaction between display and access operations when executing multiple applications, and is also responsible for 2D drawing and 3D. The drawing is displayed for synthesis.
  • interface management library Silicon Manager
  • the function library layer also includes other function libraries for implementing various functions of the Android operating system mobile phone, for example: SGL (Scalable Graphics Library): 2D graphics image processing engine based on XML (Extensible Markup Language) file; SSL (Secure Sockets Layer) ): Located in the TVP/IP protocol (TransmissionControlProtocol/InternetProtocol, Transmission Control Protocol/Interconnect) Network protocol) support data communication between various application layer protocols; OpenGL/ES: 3D effect support; SQLite: relational database engine; Webkit: Web browser engine; FreeType: Bitmap and vector (Vector) font support; and so on.
  • SGL Scalable Graphics Library
  • XML Extensible Markup Language
  • SSL Secure Sockets Layer
  • TVP/IP protocol TransmissionControlProtocol/InternetProtocol, Transmission Control Protocol/Interconnect
  • OpenGL/ES 3D effect support
  • SQLite relational database engine
  • Webkit Web browser engine
  • FreeType Bitmap and vector (Vector) font
  • Android Runtime is a running environment on the Android operating system, a new virtual machine used by the Android operating system.
  • AOT Ahead-Of-Time
  • the application's bytecode is pre-compiled into machine code, making the program a real local application. After running it again, the compilation step is eliminated, and startup and execution become faster.
  • the Android Runtime may also be replaced by a Core Libraries and a Dalvik Virtual Machine.
  • the core function library provides most of the functions in the Java Language API (Application Programming Interface), and provides an interface to the application framework layer to call the underlying library mainly through JNI (Java Native Interface). It also includes some core APIs for Android, such as android.os, android.net, android.media, and so on.
  • the Dalvik virtual machine uses a JIT (Just-in-Time) runtime compilation mechanism. Each time a process is started, the virtual machine needs to recompile the bytecode in the background, which will have a certain impact on the startup speed.
  • JIT Just-in-Time
  • Each Android application runs in an instance of a Dalvik virtual machine, and each Dalvik virtual machine instance is a separate process space.
  • the Dalvik virtual machine is designed to run multiple virtual machines efficiently on a single device.
  • the Dalvik virtual machine executable file format is .dex.
  • the dex format is a compression format designed for Dalvik and is suitable for systems with limited memory and processor speed. What needs to be mentioned is that the Dalvik virtual machine relies on the Linux kernel to provide basic functions (threading, underlying memory management). It can be understood that Android Runtime and Dalvik belong to different types of virtual machines, and those skilled in the art can select different types of virtual machines in different situations.
  • Android's core system services are all based on the Linux kernel.
  • the Linux kernel also acts as an abstraction layer between the hardware and software stacks. This layer has a number of mobile device related drivers.
  • the main drivers are: Display Driver: Linux-based Frame Buffer driver.
  • KeyBoard Driver A keyboard driver that acts as an input device.
  • Flash Memory Driver A Flash driver based on MTD (memory technology device).
  • Camera Driver A popular Linux-based v4l2 (Video for Linux) driver.
  • Audio drive Audio Driver A popular advanced Linux sound system driver based on ALSA (Advanced Linux Sound Architecture).
  • Bluetooth Driver A wireless transmission technology based on the IEEE 802.15.1 standard.
  • WiFi Drive A driver based on the IEEE 802.11 standard.
  • Binder (IPC) driver A special driver for Android that has a separate device node that provides interprocess communication. Power Management: such as battery power.
  • the implementation of the input method requires the participation of various layers of the Android operating system. For the user's input, it needs the support of various drivers of the Linux kernel layer to recognize; the application that needs to call the input method runs at the application layer; the application framework layer is used to display the content of the application, UI, notification, etc.; Layers provide functional support for the operation of input methods, such as parsing of code, support for fonts and graphics, display of input animation effects, and more.
  • the Input Method Framework is a system component of the Android operating system. Developers can develop an input method application based on the IMF.
  • the IMF mainly includes three parts: an input method manager, an input method editor, and a client application.
  • IMM Input Method Manager
  • IME Input Method Editor
  • UI User Interface
  • Client Application refers to the application that currently calls the input method, and controls the input focus and IME state through the IMM. Only one client application can use the IME at a time.
  • the CA will notify the IMM to open the input method, then the IMM will view the currently selected IME and call the IME.
  • the IME passes the input to the CA to complete the input.
  • the InputMethodManagerService in the IMM is the total control center in the whole system, which is related to the input method.
  • the CA requests the input method to pass the process;
  • the WindowManagerService is responsible for displaying the input method, receiving the user event, and obtaining the focus authentication.
  • the InputMethodManagerService process in the IMM will get the information of the currently bound CA through the InputMethodClient process of the CA, such as the input box type; the InputMethodManagerService process in the IMM will start, modify, and hide the IME through the IME's InputView process.
  • the InputView process can obtain the user's input information from the touch screen, and can also process the text information of the CA through the inputContext (InputConnection) process of the CA, such as deleting characters, replacing characters, and controlling the position of the cursor.
  • inputContext InputConnection
  • CA Used to display the user's input information while providing the IME with the contents of the current text box.
  • CA's InputMethodManager process indirectly controls the display or hiding of the IME through the IMM's InputMethodManagerService process;
  • CA's InputMethodManager process provides the IME with the status of the current text box, such as cursor changes, through the IME's InputMethodSession(InputMethodSessionWrapper) process, allowing the IME to adjust Input state;
  • UI control can handle some key information without IME processing, such as Home key information, so that it directly reaches CA;
  • InputContext (InputConnection) process can display the input information on the user interface after the interaction between CA and IME is completed.
  • InputMethodClient is a client implementation of the input method management service that identifies itself and receives state changes from the management server.
  • the InputMethodManagerService service in the transaction obtains the input type of the input box in the current interface from the client process.
  • an input field such as an input box
  • the system calls onStartInputView() and passes an EditorInfo object parameter containing details about the input type and other text field properties.
  • the inputType field contains the input type of the text field.
  • the inputType field is an integer variable that contains a bit-based rule that represents a variety of input type settings. Common input types are numbers, dates, phone numbers, passwords, and so on.
  • Android:inputType is used to set the type of text to help the input method display the appropriate keyboard type.
  • the window view of the input method process can receive the input information of the user, and then display the input information through the UI control of the client process.
  • the soft keyboard input method interface 40 may include: displaying various keys 41 in a view area, including alphabet keys, numeric keys, symbol keys, function keys, etc., the touch screen receives the user's touch input, and according to the user The corresponding button 41 is judged by the touched position coordinate information, and then the input information corresponding to the button 41 is displayed in the input box 42.
  • the soft keyboard input interface can have various forms, and the soft keyboard key position distribution can also be different from the standard keyboard.
  • the touch screen detects that the user touches a certain button 41 on the soft keyboard, the position coordinate information and the pressure value of the user button are acquired.
  • the specific key value corresponding to the current user input can be calculated, and then the system interface is called to submit the input key information of the user.
  • the input method uses key values and uses less pressure information.
  • Embodiments of the present invention will make full use of pressure information to enhance the security of entering passwords.
  • the above pressure information refers only to the pressure information of the character keys constituting the password sequence, and the key pressure information that is not the password input type is not considered, for example, the pressure value of the function keys does not affect the final input result.
  • the input character 42 may not display the actual input character. Specifically, the input character may be hidden, or the "*" symbol or other characters not related to the input character may be displayed. Prevent password leakage.
  • an embodiment of the present invention provides a method for generating a password by using a pressure touch, which may be implemented in a device with a touch input function (for example, the mobile phone 100) in the above embodiment.
  • the method specifically includes:
  • S501 The device determines whether the current interface is in a password input state.
  • the current interface can be a user interface with an input focus (Input Focus).
  • Input Focus an input focus
  • the current interface also referred to as an active window, is an activated user interface that can receive user input.
  • the current interface can be a visual window in the foreground to facilitate the user to view or input information; for devices that can simultaneously render multiple windows (such as the split screen function in the tablet, that is, on one screen) Two display areas, which respectively display two different interfaces), the current interface may be an interface with an input focus; the remaining interfaces, even if visible, do not have an input focus, and thus are not the current interface.
  • the user interface is usually implemented by an Activity component, and an Activity includes one or more views, such as various buttons and icons, to implement interaction with the user.
  • Acitivity is managed by Acitivity Stack.
  • the system calls the onCreate() function to initialize the window component.
  • the Activity will be placed on the top of the stack and become the running Activity, receiving user input and becoming the current interface.
  • An Activity has four states: active/running, paused, stopped, destroyed, and inactive/destroyed.
  • the user interface in the active state can be called the current interface. In the foreground, the user can see and have input focus.
  • the current interface may have an input box for receiving and displaying the user's input, and the device may determine whether the current interface is in the password input state according to the type of the input box.
  • the device can receive the user's input and generate a password; optionally, in order to avoid the password leakage, the input character in the current interface of the device may not display the real input character, for example, the input character may be hidden, or Displayed as "*" symbol, " ⁇ " symbol or other characters not related to input characters; if the device determines that the current interface is not a password input state according to the type of the input box, such as the above-mentioned telephone input type or text input type, according to the input of the current interface The box type adjusts the input mode of the input method.
  • the entered characters can be displayed in clear text.
  • FIG. 4C a possible password input state is shown in FIG. 4C.
  • Current interface includes loss Into the frame 430 and the soft keyboard 431.
  • the soft keyboard 431 can allow the user to touch the pressure touch screen to implement character input and submit the input characters to the input box 430. Optionally, in order to prevent password leakage, the entered characters are displayed as " ⁇ " symbols or other characters not related to the input characters.
  • FIG. 4C is exemplified by a digital soft keyboard, the same applies to a soft keyboard containing letters and special characters.
  • FIG. 4C takes a 6-digit password as an example, the same applies to other lengths of the password sequence.
  • the principle of the graphic unlocking is similar to the digital unlocking in FIG. 4C, and is also a key position distributed in different positions, but the graphic needs to be continuously slid when the graphic is unlocked, so the method of the embodiment of the present invention is also applicable to the graphic unlocking, when sliding to the corresponding position. It is also possible to add pressure value information such as light pressure or heavy pressure.
  • S502 When the device determines that the current interface is in a password input state, receiving input information of the user, where the input information includes a character and a pressure value generated when the character is input.
  • the input method process may be invoked, the soft keyboard is displayed on the current interface, and the input information of the user is received.
  • the user opens an application that needs to call the input method.
  • the client application CA
  • the client application notifies the input method manager (IMM) to open the input method, and then the IMM views the current The selected input method editor (IME) and call the IME.
  • the IME passes the input to the CA to complete the input.
  • the above input information includes a character and a pressure value generated when the character is input, and the pressure value is a pressure value generated when the user inputs a character.
  • the device can receive the touch position through the touch screen, and each touch position corresponds to one character on the soft keyboard, so the device can determine the character input by the user according to the touch position of the user.
  • the touch screen with pressure sensing can measure the pressure value input by the user each time, and the pressure value corresponds to the input characters one by one.
  • the above input information may be stored in the memory 120 of the device, and more specifically, may be stored in the buffer of the device for processing in S503.
  • the touch screen can detect the pressure value input by the user, and can also obtain the pressure value by detecting the contact area of the finger with the touch screen when the user presses the touch screen.
  • the touch screen can provide feedback to the user according to the magnitude of the pressure value.
  • the feedback can be It is a tactile feedback to ensure that only the user who is currently typing can perceive, for example, vibration.
  • the method for obtaining the pressure value of the device can be various.
  • the pressure sensor of the touch screen after detecting the user's pressing, calls the getPressure method in the MotionEvent Class to obtain the magnitude value of the user input pressure value;
  • the pressure sensor of the touch screen after detecting the user's pressing, calls the getSize method in the MotionEvent Class to obtain the contact area value of the finger and the touch screen, and the contact area value is obtained by the getSize method.
  • Normalized to a value within the range of 0 to 1, which can indirectly indicate the magnitude of the input pressure value, that is, the greater the contact area between the finger and the touch screen, the greater the user's pressing force is considered.
  • the device can also call other interface functions to detect the pressure value, and there is no limitation here.
  • a preset pressure value threshold may be used to determine the weight of the user's pressing force. When the pressure value input by the user is greater than the threshold, the input is regarded as a heavy pressure; when the user inputs When the pressure value is less than the threshold, the input is considered to be a light pressure.
  • the touch screen can provide a vibration feedback to the user when the pressure is applied, and the touch screen can provide vibration feedback to the user when the pressure is applied.
  • the user's input information is represented by (X, Y), where X represents the character input by the user, Y represents the input pressure value corresponding to the character, and (X n , Y n ) represents the user's The character and pressure values entered n times.
  • the pressure value Y here is not a true value in the mechanical unit "Newton (N)", but a relative value defined with respect to a preset unit pressure value, and a larger value of Y indicates a corresponding value. The greater the true pressure value.
  • the input information (1, 2) indicates that the character entered by the user is 1, and the relative pressure value is 2.
  • the preset pressure value threshold is represented by Y max , and similarly, the pressure value threshold It is also a relative value.
  • S503 The device processes the character according to the pressure value to generate a password.
  • the device processes the characters according to the pressure value corresponding to each character, thereby generating a password.
  • the cryptographic processing algorithm can be pre-set and stored in a memory that includes local memory 120 and network side memory.
  • the obtaining the password generation algorithm from the network side memory may include: the device accessing the network server through the wireless network or the wired network, and acquiring a preset password generation algorithm from the memory of the network server.
  • the password generation algorithm is one or more algorithms that are defaulted by the device or updated through the network. If there are multiple password generation algorithms, the device generates a password according to a password generation algorithm selected by the user after acquiring the password generation algorithm.
  • the user may prompt the user with the currently applicable password generation algorithm in the process of inputting a password by using a text, a picture, an audio, a video, or the like.
  • the password generation algorithm selected by the user is used as the finally applicable password generation algorithm.
  • the content of the prompt can be disguised.
  • the prompt rule for audio playback is disguised, and the real rule is displayed at the corner of the screen. This real rule is the finally applicable password generation algorithm.
  • the foregoing selecting a password generating algorithm may specifically include:
  • the device determines a finger used by the user to input. Specifically, the device can determine the finger used by the user when inputting information through the camera; and can also determine the finger used by the user when inputting information by pressing the difference of the fingerprint area of the touch screen with each finger. Of course, for convenience, preferably, the device only needs to determine which finger the user used when entering the information for the first time.
  • the device invokes a corresponding password generation algorithm according to different fingers. For example, if the user enters information (characters and pressure values) with a thumb, the password generation algorithm 1 can be invoked to process the input information to generate a password; if the user is input with the index finger (character and pressure values) Then, the password generation algorithm 2 can be called to process the input information to generate a password.
  • the time at which the device obtains the password generation algorithm may be any time before the password is generated.
  • the password generation algorithm may be acquired before receiving the user input, or the password generation algorithm may be acquired during the user input process, and the password generation algorithm may be acquired after the user input ends.
  • it can be processed individually or in groups during the input process, or it can be processed together after the input is completed.
  • the password generated by the password generation algorithm can be free of pressure values in order to be compatible with traditional password storage systems and common touch screen devices.
  • the password generated after being processed by the password generation algorithm may also include a pressure value, which makes the password security higher.
  • the password processed by the password generation algorithm is submitted to the device, and specifically, may be a password input box.
  • the device receives the password, it compares it with the preset correct password to verify that the password is correct. If the password is the same as the preset correct password, the password is correct. It should be noted that the same reference here meets the requirements of the correct password, and not necessarily all the characters of the two are identical. For example, some password judgment rules are to ignore the letter case, if the only difference between the two is the case of the letter is different. , still meet the requirements.
  • the above verification process can be done locally on the device or connected to the network server by the device.
  • the device can perform preset operations, for example, enter the correct password. You can enter the phone interface, unlock the application, unlock the door, complete the payment, etc., you need to re-enter when you enter the wrong password, etc., so I won't go into details here.
  • the embodiment of the present invention uses the touch screen to obtain pressure information.
  • the password anti-peeping function is activated, and the input information of the user is processed according to a preset password generation algorithm. Even if someone completely remembers the user's key input, the final generated password cannot be known, thus achieving anti-peeping function.
  • password generation algorithms are described below.
  • the following embodiments use a numeric password as an example, but the same applies to password input containing letters and special characters (of course, it is not applicable to input that is not a password input type, such as a function key that does not constitute a password sequence)
  • the following embodiment uses a 6-digit password as an example, but the same applies to other lengths of the password sequence. It is necessary to remind the person skilled in the art that the following password generation algorithm is suitable for all occasions where a password is input using a touch screen, including all devices having a touch screen, such as the mobile phone 100.
  • a possible password generation algorithm is: the input information is (X n , Y n ), where X n is an input character, Y n is a pressure value corresponding to X n , and n is a natural number; The device processes the character according to the pressure value to generate a password, where the device determines whether Y n is less than a preset first threshold Y max1 ; when the device determines Y n ⁇ Y max1 , The generated password is X n .
  • the password generation algorithm may also be expressed as follows: the device removes a character whose input pressure value is greater than a preset first threshold, and generates a password according to a character whose pressure value is less than the first threshold.
  • the password generation algorithm may also be expressed as: the device determines whether the pressure value corresponding to each character is less than a preset first threshold; and the device generates a password according to a character whose pressure value is less than the first threshold.
  • the preset threshold may be set by the user, or may be preset when the device is shipped from the factory, or may be adjusted by the device according to the pressure value of the user's daily operation.
  • the device determines whether the pressure value of each character input by the user is less than a preset first threshold. When the pressure value of some characters input by the user is greater than a preset first threshold, the device determines that the input pressure value is greater than a preset number. A threshold character is invalid, and a password is generated according to a character whose input pressure value is less than a preset first threshold.
  • the character whose input pressure value is greater than the preset first threshold may have one or more characters; when the input pressure value of the plurality of characters is greater than the preset first threshold, the input pressure values are greater than the preset value.
  • the characters of the first threshold may appear continuously or discontinuously; optionally, the user may enter the password in reverse order; as in other password generation algorithms below.
  • the judgment condition can also be Therefore, it is determined whether the pressure value of each character in the user input is greater than or equal to a preset first threshold.
  • the device determines that the input pressure values are greater than The character equal to the preset first threshold is invalid, and the password is generated according to the character whose input pressure value is less than the preset first threshold; for example, the determining condition may also be: determining whether the pressure value of each character in the user input is less than a preset.
  • the first threshold when the pressure value of some characters input by the user is less than the preset first threshold, the device determines that the characters whose input pressure values are less than the preset first threshold are invalid, and the preset pressure value is greater than or equal to the preset value.
  • the character of the first threshold generates a password; for example, the determining condition may be: determining whether the pressure value of each character in the user input is less than or equal to a preset first threshold, and when the pressure value of some characters input by the user is less than or equal to the pre-predetermined value
  • the first threshold is set, the characters whose input pressure values are less than or equal to the preset first threshold are removed, and the input pressure value is greater than the preset first Character values generated password. The same is true for the pressure value judgment conditions of other password generation algorithms in the following, and will not be described again.
  • the first line in FIG. 6 represents user input information
  • the second line represents a password generated by the password generation algorithm
  • the character with a thick frame indicates that the input pressure value of the character is greater than a preset first threshold.
  • the password input process cannot know the password generated eventually, even if it is peeked by others, and achieves the purpose of anti-peeping; and the generated password does not contain pressure value information, and is fully compatible with the existing one.
  • a password storage system that can be used to unlock a variety of pressure touch screen devices.
  • the input information is (X n-1 , Y n-1 ), (X n , Y n ), where X n-1 , X n are inputs.
  • the characters Y N-1 and Y n are the pressure values corresponding to X n-1 and X n , respectively, and n is a natural number; the device processes the characters according to the pressure value to generate a password, specifically: The device determines whether Y n is greater than a preset seventh threshold Y max7 ; when the device determines Y n >Y max7 , the generated password is X n .
  • the above password generation algorithm may also be expressed as: replacing the previous character with a character whose input pressure value is greater than the preset seventh threshold.
  • the password generation algorithm may be further configured to: determine whether the pressure value of each character in the user input is greater than a preset seventh threshold, and determine when the pressure value of some characters input by the user is greater than a preset seventh threshold.
  • the previous character of the character is invalid, and the password is generated according to characters other than the invalid character (ie, characters other than the previous character of the characters, including those whose pressure value is greater than or equal to the preset seventh threshold). That is, the effect of replacing the previous character with a character whose input pressure value is greater than or equal to the preset seventh threshold is reached.
  • the characters whose input pressure values are greater than or equal to the preset seventh threshold may have one or more characters for replacing the same number of characters before or after. It can be understood that, in this embodiment, the next character can also be replaced by a character whose input pressure value is greater than the preset seventh threshold.
  • the first line in FIG. 7 represents user input information
  • the second line represents a password generated after being processed by the password generation algorithm
  • the character with a thick frame indicates that the input pressure value of the character is greater than a preset seventh threshold.
  • the correct password is 1, 2, 3, 4, 5, 6,
  • the password input process cannot know the password generated eventually, even if it is peeked by others, and achieves the purpose of anti-peeping; and the generated password does not contain pressure value information, and is fully compatible with the existing one.
  • a password storage system that can be used to unlock a variety of pressure touch screen devices.
  • the input information is (X n , Y n ), where X n is an input character, Y n is a pressure value corresponding to X n , and n is a natural number
  • the device processes the character according to the pressure value to generate a password, specifically: the device determines whether Y n is greater than a preset second threshold Y max2 ; when the device determines Y n >Y max2
  • the generated password is X n , X n .
  • the above password generation algorithm may also be expressed as: repeatedly inputting a character whose input pressure value is greater than a preset second threshold.
  • the password generation algorithm may also be expressed as: the device determines whether the pressure value corresponding to each character is greater than a preset second threshold; and the device repeatedly inputs a character whose pressure value is greater than the second threshold, thereby generating a password.
  • the above characters greater than the preset second threshold may have one or more characters, and the number of repeated inputs may be one or more times.
  • the first line in FIG. 8 represents user input information
  • the second line represents a password generated after being processed by the password generation algorithm
  • the character with a thick frame indicates that the input pressure value of the character is greater than a preset second threshold.
  • the correct password is 1 , 2 , 3, 3, 5, 6
  • the password input process cannot know the password generated eventually, even if it is peeked by others, and achieves the purpose of anti-peeping; and the generated password does not contain pressure value information, and is fully compatible with the existing one.
  • a password storage system that can be used for unlocking various touch screen devices.
  • another possible password generation algorithm is: changing a character whose input pressure value is greater than a preset ninth threshold according to a preset rule.
  • the device determines whether the pressure value of each character in the user input is greater than a preset ninth threshold.
  • the pressure value is greater than the preset according to the preset rule.
  • the ninth threshold character changes.
  • the preset rules are very broad, such as the previous or next value in the character order list, the first few or the last several values, a fixed value minus the input value, and the like; wherein, the order list may be 0.
  • a numeric table of -9, or an alphabet of AZ, the order list can be positive or negative.
  • a possible password generation algorithm may be: the input information is (X n , Y n ), where X n is an input character, Y n is a pressure value corresponding to X n , and n is a natural number; The device processes the character according to the pressure value to generate a password, where the device determines whether Y n is greater than a preset ninth threshold Y max9 ; when the device determines Y n >Y max9 , generates The password is the single digit of the sum of X n and 3 (ie, the third value following X n in the number table of 0-9).
  • the first line in FIG. 9 represents user input information
  • the second line represents a password generated after being processed by the password generation algorithm
  • the character with a thick frame indicates that the input pressure value of the character is greater than a preset ninth threshold.
  • the password input process cannot know the password generated eventually, even if it is peeked by others, and achieves the purpose of anti-peeping; and the generated password does not contain pressure value information, and is fully compatible with the existing one.
  • a password storage system that can be used to unlock a variety of pressure touch screen devices.
  • the input information is specifically (X 1 , Y 1 ), (X 2 , Y 2 ), ..., (X k-1 , Y k-1 ) , (X k , Y k ), (X k+1 , Y k+1 ), ..., (X n , Y n ), where X 1 , X 2 , ..., X k-1 , X k , X k+1 , ..., X n is the input character, Y 1 , Y 2 , ..., Y k-1 , Y k , Y k+1 , ..., Y n is the corresponding character a pressure value; wherein k, n are natural numbers, and n ⁇ k>1; the device processes the character according to the pressure value to generate a password, specifically: the device determines Y 1 , Y 2 ,..., (X k-1 , Y k-1 ) , (X k
  • the generated passwords are X k-1 , X k , X k+1 , ..., X n .
  • the above rule may also be expressed as: a character whose input pressure value is greater than a preset third threshold is used as the initial input character, and the previously input character is regarded as an invalid character.
  • the above rule may also be expressed as follows: the device determines whether the pressure value corresponding to each character is greater than a preset third threshold; the device generates the character according to the first pressure value greater than the third threshold value and subsequent characters. password. It can be understood that a character greater than the preset third threshold may also be used as a signal to input a password, and a password is generated by using the character input after the character; or a string of invalid characters may be input after the last password is input. , better to prevent voyeurism; and so on.
  • the first line in FIG. 10 represents user input information
  • the second line represents a password generated after being processed by the password generation algorithm
  • the character with a thick frame indicates that the input pressure value of the character is greater than a preset third threshold.
  • the user first inputs n invalid characters, starting from the n+ 1th character, and sequentially inputting information respectively.
  • the password input process cannot know the password generated eventually, even if it is peeked by others, and achieves the purpose of anti-peeping; and the generated password does not contain pressure value information, and is fully compatible with the existing one.
  • a password storage system that can be used to unlock a variety of pressure touch screen devices.
  • the input information is specifically (X 1 , Y 1 ), (X 2 , Y 2 ), where X 1 , X 2 are input characters, Y 1 Y 2 is a pressure value corresponding to the character; the device processes the character according to the pressure value to generate a password, specifically: the device determines the size of Y 1 and Y 2 ; if Y 2 > Y 1 , the generated password is X 2 , X 1 ; if Y 2 ⁇ Y 1 , the generated password is X 1 , X 2 .
  • the above rule may also be expressed as follows: the device compares the pressure values corresponding to the two characters before and after; if the pressure value corresponding to the latter is greater than the pressure value corresponding to the former, the order of the two characters is exchanged; if the pressure value corresponding to the latter is less than or equal to The pressure value corresponding to the former maintains the order of two characters; the password is generated.
  • the characters can be grouped into two groups according to the order of the user input. The order of the two characters is adjusted according to the pressure value corresponding to the two characters in each group, and the password is generated according to the adjusted order.
  • the order of adjusting the characters may be: when the input pressure value of the latter character in the same group is greater than the input pressure value of the previous character, the order of the two is exchanged; otherwise, the order of the two is not exchanged.
  • the sorting of the packets mentioned here may be performed by comparing the pressure values of two characters and determining whether to adjust the order of the two. For example, it may be set that the previous character in the same group has a higher input pressure than the latter character. When you exchange the order of the two; or you can group the first character and the third character into a group, and so on.
  • the first line in Fig. 11 represents the user input information
  • the second line represents the password generated by the password generation algorithm
  • the dashed box represents a group.
  • the input information in the figure is divided into three groups, which are divided into three groups.
  • a character with a thick frame indicates that the input pressure value of the character is greater than the input pressure value of another character of the group.
  • the correct password is 1, 2, 3, 4, 5, 6.
  • the order of adjusting characters is specifically: when the input pressure value of the latter character in the same group is larger than the input pressure value of the previous character, the order of the two is exchanged.
  • the password input process cannot know the password generated eventually, even if it is peeked by others, and achieves the purpose of anti-peeping; and the generated password does not contain pressure value information, and is fully compatible with the existing one.
  • a password storage system that can be used to unlock a variety of pressure touch screen devices.
  • the cryptographic generation algorithm is very flexible and diverse, and the combination and equivalent replacement between them are difficult to exhaustive, and those skilled in the art can obtain more available methods according to the idea of the embodiment of the present invention. These methods are all within the scope of protection of the present invention.
  • FIG. 12 is a schematic diagram of a mobile phone anti-peeping method, which is a specific example of the above method for generating a password by using pressure touch.
  • the steps of the mobile phone anti-peeping method are as follows:
  • the input box gets the input focus.
  • the input box is used to receive the user's input.
  • the input box will get the input focus and call the input method.
  • the calling input method is specifically to present a soft keyboard on the current interface to receive user input.
  • S1202 Determine whether it is a password input mode.
  • the phone can judge whether it is based on the type of the input box. Enter the mode for the password.
  • the device determines that it is a password input mode. If it is the password input mode, execute S1203; if it is not the password input mode, adjust the input mode of the input method according to the input box type of the current interface, such as text input, telephone input, and the like.
  • S1203 Receive input information.
  • the mobile phone receives the user's touch input on the input method soft keyboard, and obtains the input character and pressure value.
  • the acquiring characters are specifically: acquiring a touch position of the user, and parsing a character corresponding to the touch position.
  • the mobile phone caches the character and the pressure value in the memory of the mobile phone.
  • S1204 Determine whether the input ends. Optionally, if the user presses the Enter key (Enter key) or closes the input method, the input ends. If it is finished, S1205 is performed; if it is not, then S1203 is continuously executed to receive the input information.
  • the password generation algorithm is one or more algorithms that are preset and stored in the phone memory or network side memory. It should be noted that in this specific example, the cryptographic processing is performed after the password input is completed; as described above, it can also be processed while inputting, and will not be described here.
  • S1206 Process the input information according to a password generation algorithm.
  • the characters buffered in the memory list and the pressure values corresponding to each character are processed according to the password generation algorithm.
  • S1207 Generate a password.
  • the password is generated after being processed by the password generation algorithm.
  • the password input box can be passed to the client process through the InputConnnection interface to complete the anti-peeping input of the password.
  • an embodiment of the present invention provides a device including a pressure touch screen 131, a processor 132, and a memory 133.
  • the processor 132 determines whether the current interface is in the password input state. If it is determined that the current interface is in the password input state, the pressure touch screen 131 receives the input information of the user, and the input information includes characters and a pressure value generated when the characters are input.
  • the processor 132 processes the character based on the pressure value to generate a password.
  • the password generation algorithm is stored in the memory 133.
  • the specific method is the same as the above method for generating a password by using pressure touch.
  • an embodiment of the present invention provides an apparatus, including a pressure touch screen, one or more processors, a memory, and one or more programs; wherein one or more programs are stored in the memory and configured to be one or more Executing by the processor, the one or more programs include instructions for: determining, by the device, whether the current interface is in a password input state; when the device determines that the current interface is in a password When the state is input, input information of the user is received, the input information includes a character and a pressure value generated when the character is input; the device processes the character according to the pressure value to generate a password.
  • the specific method is the same as the above method for generating a password by using pressure touch.
  • an embodiment of the present invention further provides an apparatus for generating a password by using a pressure touch, including a state determining unit 141, an input receiving unit 142, and a password generating unit 143.
  • the state determining unit 141 determines whether the current interface is in a password input manner. State, when the state judging unit 141 determines that the current interface is in the password input state, the input receiving unit 142 receives input information of the user, the input information including characters and a pressure value generated when the characters are input; the password generating unit 143 according to the The pressure value processes the character to generate a password.
  • the specific method is the same as the above method for generating a password by using pressure touch.
  • the embodiment of the present invention further provides a storage medium for storing computer software instructions, where the instruction is used to: determine whether the current interface is in a password input state; and when the device determines that the current interface is in a password input state, Receiving input information of the user, the input information including a character and a pressure value generated when the character is input; the device processes the character according to the pressure value to generate a password.
  • the specific method is the same as the above method for generating a password by using pressure touch.
  • the unit described as a separate component is or is not physically separated as a unit display
  • the components are either or not physical units, that is, located in one place, or distributed to multiple network elements. Some or all of the units are selected according to actual needs to achieve the objectives of the embodiments of the present invention.
  • the functional units in the various embodiments of the present invention are integrated in one processing unit, and each unit is physically physically present, and two or more units are integrated in one unit.
  • the foregoing program is stored in a computer readable storage medium, and when executed, the program includes the above method.
  • the steps of the embodiment; and the foregoing storage medium includes: a medium that stores program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

一种利用压力触控生成密码的方法,步骤为:判断当前界面是否处于密码输入状态(S501);当确定当前界面处于密码输入状态时,接收用户输入的字符和压力值(S502);根据压力值对字符进行处理,生成密码(S503)。即使他人完全记住用户的按键输入,也无法获知用户的最终输入,从而有效防止偷窥,提高输入密码的安全性。

Description

利用压力触控生成密码的方法及装置 技术领域
本发明涉及数据处理领域,具体涉及一种利用压力触控生成密码的方法及装置。
背景技术
利用触摸屏输入密码越来越普遍,但和实体键盘一样,触摸输入键盘(又称软键盘、虚拟键盘,以下称为软键盘)同样存在着安全隐患。用户在输入密码时,特别是使用智能手机、自动取款机、POS机(point of sale,销售终端)等设备的软键盘输入密码时,容易被人偷窥,存在密码泄露的风险,甚至会造成账号被盗、财产损失等不良后果。
现有的防偷窥技术包括为上述设备增加实体遮罩或者改变软键盘按键的位置,前者需要硬件改造成本且外形笨重,后者不能完全排除偷窥隐患,且两者都会降低用户输入的便捷性。
另外,在现有技术中,公开号为CN102982269A的中国专利中公开了一种基于生物计量特征的防偷窥密码认证方法及系统,该方法在用户输入密码时,同时记录用户的生物特征即每次操作的轻重程度,把这个轻重序列作为密码或者密码的一部分,用于增强密码的安全性。该方法改变了密码存储体系,无法与当前广泛使用的密码输入模式兼容。另一公告号为US7305559B2的美国专利中公开了一种加入输入节奏的密码输入方式,但如果输入节奏被偷窥或用摄像头非法记录,仍然会导致密码泄露。因此,现有技术在密码输入方面依然存在安全性低、便捷性差的问题。
发明内容
有鉴于此,本发明实施例提供了一种利用压力触控生成密码的方法及装置,在极大提高密码安全性的同时,增加了用户在输入密码时的便捷性和灵活性,而且也兼容传统触摸设备及其密码存储体系。
第一方面,本发明实施例提供了一种利用压力触控生成密码的方法。该方 法包括:设备判断当前界面是否处于密码输入状态;当所述设备确定所述当前界面处于密码输入状态时,接收用户的输入信息,所述输入信息包括字符和输入所述字符时产生的压力值;所述设备根据所述压力值对所述字符进行处理,生成密码。上述技术方案,可以有效增强用户在输入密码时的安全性,同时,增加了用户在输入密码时的便捷性和灵活性。
结合第一方面,在第一方面的第一种实现方式中,所述当前界面是具有输入焦点的用户界面,即所述用户界面可以接收用户通过压力触摸屏、键盘、鼠标等输入设备输入的信息。只有在当前界面是密码输入的用户界面才触发该设备接收用户的密码输入,这样提高了输入效率,也节省了一定的电量。
结合第一方面和第一方面的第一种实现方式,在第一方面的第二种实现方式中,所述设备判断当前界面是否处于密码输入状态,具体为:所述设备根据所述当前界面的输入框类型判断所述当前界面是否处于密码输入状态。以运行Android操作系统的设备为例,设备会根据输入框的InputType标记来确定输入框的类型。
结合第一方面的第一种实现方式和第一方面的第二种实现方式,在第一方面的第三种实现方式中,当所述设备获取到所述输入框类型为android:inputType=“textPassword”时,所述设备确定所述当前界面处于密码输入状态。可选的,为了避免密码泄露,在设备当前界面的输入框中可以不显示真实的输入字符,例如可以隐藏输入字符,也可以显示为“*”符号、“·”符号或者其他和输入字符无关的字符,以防止输入字符被人偷窥。
结合第一方面,在第一方面的第四种实现方式中,当所述设备确定所述当前界面不处于密码输入状态时,根据当前界面的输入框类型调整输入法的输入模式。
结合第一方面,在第一方面的第五种实现方式中,在生成上述密码之后,验证所述密码。可选的,生成的密码被提交给密码输入框,与正确的密码进行对比。
结合第一方面,在第一方面的第六种实现方式中,所述设备根据所述压力值对所述字符进行处理具体包括:如果有多个密码生成算法,根据用户选择的一个密码生成算法生成密码。可选的,可以在用户密码输入操作过程中以文字、图片、音频、视频等方式提示用户当前适用的密码生成算法。进一步的,为了 迷惑偷窥者,可以伪装提示的内容。可选的,所述选择可以是:所述设备确定用户输入所用的手指;所述设备根据不同的手指来调用对应的密码生成算法。这样就可以随时根据不同的情况来调用不同的密码生成算法,极大提高输入密码的安全性和便携性。
结合第一方面和第一方面的第六种实现方式,在第一方面的第七种实现方式中,所述输入信息为(Xn,Yn),其中,Xn为输入的字符,Yn为Xn所对应的压力值,n为自然数;所述设备根据所述压力值对所述字符进行处理,生成密码,具体为:所述设备判断Yn是否小于预设的第一阈值Ymax1;当所述设备确定Yn<Ymax1时,生成密码为Xn。上述密码生成算法还可以表述为:所述设备判断每个字符对应的压力值是否小于预设的第一阈值;所述设备根据压力值小于所述第一阈值的字符生成密码。这样生成的密码不含压力值信息,完全兼容现有的密码存储体系,可以用于各种具有压力触摸屏设备的解锁。
结合第一方面和第一方面的第六种实现方式,在第一方面的第八种实现方式中,所述输入信息为(Xn,Yn),其中,Xn为输入的字符,Yn为Xn所对应的压力值,n为自然数;所述设备根据所述压力值对所述字符进行处理,生成密码,具体为:所述设备判断Yn是否大于预设的第二阈值Ymax2;当所述设备确定Yn>Ymax2时,生成密码为Xn,Xn。上述密码生成算法还可以表述为:所述设备判断每个字符对应的压力值是否大于预设的第二阈值;所述设备重复输入压力值大于所述第二阈值的字符,生成密码。这样生成的密码不含压力值信息,完全兼容现有的密码存储体系,可以用于各种具有压力触摸屏设备的解锁。
结合第一方面和第一方面的第六种实现方式,在第一方面的第九种实现方式中,所述输入信息具体为(X1,Y1),(X2,Y2),……,(Xk-1,Yk-1),(Xk,Yk),(Xk+1,Yk+1),……,(Xn,Yn),其中,X1,X2,……,Xk-1,Xk,Xk+1,……,Xn为输入的字符,Y1,Y2,……,Yk-1,Yk,Yk+1,……,Yn为所述字符所对应的压力值;其中k、n为自然数,并且,n≥k>1;所述设备根据所述压力值对所述字符进行处理,生成密码,具体为:所述设备判断Y1,Y2,…,Yk-1,Yk,Yk+1,……,Yn是否大于预设的第三阈值Ymax3;当所述设备确定Yk-1为第一个大于所述第三阈值Ymax3的压力值时,生成密码为Xk-1,Xk,Xk+1,……,Xn。上述密码生成算法还可以表述为:所述设备判断每个字符对应的压力值是否大于预设的第三阈值;所述设备根据第一个压力值大于所述第三阈值的字符及其之后的字符生成密码。这样生 成的密码不含压力值信息,完全兼容现有的密码存储体系,可以用于各种具有压力触摸屏设备的解锁。
结合第一方面和第一方面的第六种实现方式,在第一方面的第十种实现方式中,所述输入信息具体为(X1,Y1),(X2,Y2),其中,X1,X2为输入的字符,Y1,Y2为所述字符所对应的压力值;所述设备根据所述压力值对所述字符进行处理,生成密码,具体为:所述设备判断Y1和Y2的大小;如果Y2>Y1,生成密码为X2,X1;如果Y2≤Y1,生成密码为X1,X2。上述密码生成算法还可以表述为:所述设备比较前后两个字符对应的压力值;如果后者对应的压力值大于前者对应的压力值,交换两个字符的顺序;如果后者对应的压力值小于等于前者对应的压力值,保持两个字符的顺序;生成密码。这样生成的密码不含压力值信息,完全兼容现有的密码存储体系,可以用于各种具有压力触摸屏设备的解锁。
根据上述不同的密码生成算法,设备可以利用含有压力值的用户输入信息生成密码,密码输入过程即使被他人偷窥,也无法知道最终生成的密码,达到了防偷窥的目的;而且最终生成的密码不含压力值信息,完全兼容现有的密码存储体系,可以用于各种具有压力触摸屏设备的解锁。
第二方面,本发明实施例提供一种装置,包括压力触摸屏,一个或多个处理器,存储器,一个或多个程序;所述一个或多个程序被存储在所述存储器中并被配置为被所述一个或多个处理器执行,所述一个或多个程序包括指令,所述指令用于:设备判断当前界面是否处于密码输入状态;当所述设备确定所述当前界面处于密码输入状态时,接收用户的输入信息,所述输入信息包括字符和输入所述字符时产生的压力值;所述设备根据所述压力值对所述字符进行处理,生成密码。具体方法和第一方面的方法相同。
第三方面,本发明的实施例提供一种装置,包括压力触摸屏,处理器,存储器;所述处理器判断当前界面是否处于密码输入状态,当所述处理器确定当前界面处于密码输入状态时,所述压力触摸屏接收用户的输入信息,所述输入信息包括字符和输入所述字符时产生的压力值;所述处理器根据所述压力值对所述字符进行处理,生成密码。其中,生成密码的算法存储在存储器中。具体方法和第一方面的方法相同。
第四方面,本发明的实施例提供一种利用压力触控生成密码的装置,所述装置包括状态判断单元,输入接收单元,密码生成单元;其中,所述状态判断 单元,用于判断当前界面是否处于密码输入状态;所述输入接收单元,用于当所述状态判断单元确定所述当前界面处于密码输入状态时,接收用户的输入信息,所述输入信息包括字符和输入所述字符时产生的压力值;所述密码生成单元,用于根据所述压力值对所述字符进行处理,生成密码。具体方法和第一方面的方法相同。
第五方面,本发明的实施例提供一种存储一个或多个程序的计算机存储介质,所述一个或多个程序包括指令,所述指令用于执行第一方面的方法。
通过上述方案,大大增强了密码防偷窥的能力,即使他人完全记住用户的按键输入,也无法获知用户的最终输入,从而有效防止密码被偷窥,大大提高了密码输入的安全性。
附图说明
图1为本发明实施例提供的一种手机的硬件结构示意图;
图2为本发明实施例提供的一种手机操作系统的结构示意图;
图3为本发明实施例提供的一种输入法逻辑框架示意图;
图4A为本发明实施例提供的一种软键盘输入法界面示意图;
图4B为本发明实施例提供的另一种软键盘输入法界面示意图;
图4C为本发明实施例提供的一种密码输入状态界面示意图;
图5为本发明实施例提供的一种利用压力触控生成密码的方法示意图;
图6为本发明实施例提供的一种密码生成算法示意图;
图7为本发明实施例提供的另一种密码生成算法示意图;
图8为本发明实施例提供的另一种密码生成算法示意图;
图9为本发明实施例提供的又一种密码生成算法示意图;
图10为本发明实施例提供的又一种密码生成算法示意图;
图11为本发明实施例提供的又一种密码生成算法示意图;
图12为本发明实施例提供的一种手机防偷窥方法示意图;
图13为本发明实施例提供的一种装置示意图;
图14为本发明实施例提供的一种利用压力触控生成密码的装置示意图。
具体实施方式
下面将结合实施例的附图,对本发明实施例的技术方案进行详细、清楚的描述。
本发明实施例中的一些设备具有压力触摸屏,通过压力感应实现压力触控。本发明实施例适用于所有需要利用触摸屏输入密码的场合,涉及的设备包括但不限于具有触摸输入功能的手机、平板电脑、智能手表、自动取款机、POS机、门禁系统等,典型场景如利用触摸屏解锁手机及其应用程序、输入门禁密码、用自动取款机的触摸屏输入银行卡密码,用POS机的触摸屏输入银行卡密码,等等。所述设备搭载的操作系统包括但不限于
Figure PCTCN2016087190-appb-000001
Figure PCTCN2016087190-appb-000002
DOS、Unix、Linux或者其他操作系统。触摸操作可以通过手指、触控笔等合适的部位或物件接触触摸屏的动作来完成。本发明的一些实施例以运行Android操作系统的智能手机为例,本领域技术人员应当理解的是,本发明实施例的方法也适用于其他具有触摸输入功能的设备。
图1所示为一种手机100的硬件结构示意图。应当理解的是,手机100只是上述具有触摸输入功能的设备的一个示例,并且手机100可具有比所示出的更多或更少的部件,可组合两个或更多个部件,或者可具有这些部件的不同配置或布置。图1中所示的各种部件可以硬件、软件方式或软硬件组合来实现,包括一个或多个信号处理和/或专用集成电路。
该手机100包括处理器110,存储器120,输入装置130,显示装置140,传感器150,音频电路160,WiFi模块170,射频电路180,电源190。这些部件通过一个或多个通信总线或信号线来通信。
处理器110是手机100的控制中心,利用各种接口和线路连接手机100的各个部分,通过运行或执行存储在存储器120内的软件程序或指令集,以及调用存储在存储器120内的数据,执行手机100的各种功能和处理数据,从而对手机100进行整体监控。可选的,处理器110可包括一个或多个处理单元;可选的,处理器110可集成应用处理器和调制解调器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器110中。在一些实施例中,该处理器110可以包括图像信号处理器和双核/多核处理器。
存储器120可用于存储软件程序以及功能模块,处理器110通过运行存储在 存储器120的软件程序以及功能模块,从而执行手机100的各种功能应用以及数据处理。存储器120可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机100的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器120包括高速随机存取存储器,还包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。存储器120可以存储各种操作系统,例如微软公司的Windows操作系统,或谷歌公司开发的Android操作系统等等。在本发明的一些实施例中,存储器120中存储的可以是Android操作系统。
输入装置130可用于接收输入的数字或字符信息,以及产生与手机100的用户设置以及功能控制有关的键信号输入。具体地,输入装置130可包括触控面板131以及其他输入设备132。触控面板131,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触控笔等任何适合的部位或物件在触控面板131上或在触控面板131附近的操作),并根据预先预设的程式驱动相应的连接装置。可选的,触控面板131可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器110,并能接收处理器110发来的命令并加以执行。此外,采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板131。除了触控面板131,输入装置130还包括其他输入设备132。具体地,其他输入设备132包括但不限于物理键盘、功能键(比如音量控制按键、开关按键、Home键等)、轨迹球、鼠标、操作杆等中的一种或多种。
具体的,触控面板131包括触敏表面(touch-sensitive surface),触敏表面用于执行与接触检测相关的各种操作,诸如确定是否已经发生了接触(例如,检测手指按下事件)、触摸的压力值和坐标信息,确定是否存在接触的移动并在整个触敏表面上跟踪该移动(例如,检测一个或多个手指拖动事件)、以及确定接触是否已经终止(例如,检测手指抬起事件或者接触中断)。确定接触点的移动可以包括确定接触点的速率(量值)、速度(量值和方向)、和/或加速度(量值和/或方向的改变),接触点的移动由一系列接触数据来表示。这些操作可被应用于单点接触(例如,一个手指接触)或者多点同时接触(例如,“多点触摸”/多个 手指接触)。触摸检测技术包括但不限于电容式、电阻式、红外线式、表面声波技术等。
需要注意的是,触控面板131应理解为广义的触摸输入设备,触敏表面可以与显示屏集成在一起,也可以分开从而作为单独的触控输入设备与系统连接,例如协调鼠标移动和鼠标按钮按压(具有或没有单个或多个键盘按压或保持)、触控板上的用户移动轻击、拖动、滚动等、触控笔输入、设备的移动、口头指令、检测到的眼睛移动、生物特征输入、和/或其任意组合,它们都可以被用作为触摸输入设备。以下实施例虽然主要是参考手指输入(例如,单指接触、单指轻击手势、单指轻扫手势)来给出,但是应当理解的是,在一些实施例中,这些手指输入中的一个或多个可以由来自另一触摸输入设备的输入(例如,触控笔输入)替代。
在本文中,除非特别说明,用户的手势是灵活的,可以是点击,双击,画圈,画线,单指触碰,或多指触碰,等等。本领域普通技术人员可以理解,只要能达到基本相同的效果,具体手势的选择是灵活的。在本文中,除非特别说明,用户的手势作用于触敏表面的位置或区域也是灵活的,可以是显示屏显示的某个应用接口元素的区域或附近区域,显示屏不显示应用接口元素的空白区域,显示屏显示的某个功能设置的区域,等等。本领域普通技术人员可以理解,只要能达到基本相同的效果,手势作用于触敏表面的具体位置或区域是可以灵活设置的。在本发明实施例中,触控面板131检测用户的触摸输入,并收集触摸输入时的压力触控信息,包括字符和对应的压力值。
显示装置140可用于显示由用户输入的信息或提供给用户的信息以及手机100的各种菜单。显示装置140可包括显示面板141,可选的,采用LCD(Liquid Crystal Display,液晶显示器)、OLED(Organic Light-Emitting Diode,有机发光二极管)等形式来配置显示面板141。进一步的,触控面板131可覆盖显示面板141,当触控面板131检测到在其上或附近的触摸操作后,传送给处理器110以确定触摸事件的类型,随后处理器110根据触摸事件的类型在显示面板141上提供相应的视觉输出。视觉输出包括文本、图形、图标、视频及其任意组合。在一些实施例中,一些视觉输出或全部的视觉输出可对应于用户界面对象。虽然在图1中,触控面板131与显示面板141是作为两个独立的部件来实现手机100的输入和输出功能,但是在某些实施例中,将触控面板131与显示面板141集成而实现 手机100的输入和输出功能。
手机100还可包括传感器150,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板141的亮度,接近传感器可在手机100移动到耳边时,关闭显示面板141和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;可选地,手机100还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
手机100还可包括音频电路160,其中扬声器161,传声器162可提供用户与手机100之间的音频接口。音频电路160可将接收到的音频数据转换后的电信号,传输到扬声器161,由扬声器161转换为声音信号输出;另一方面,传声器162将收集的声音信号转换为电信号,由音频电路160接收后转换为音频数据,再将音频数据输出处理器110处理后,经射频电路180以发送给另一手机,或者将音频数据输出至存储器120以便进一步处理。在一些实施例中,音频电路160还包括耳麦插孔,耳麦插孔提供音频电路160与可移除的音频输入/输出外围设备之间的接口,该外围设备诸如仅输出的耳机或者具有输出(例如,单耳或双耳耳机)和输入(例如,麦克风)二者的耳麦。
射频(RF,Radio Freqency)电路180可用于收发信息或通话过程中信号的接收和发送,将电信号转换为电磁信号或将电磁信号转换为电信号,并且经由电磁信号与通信网络及其他通信设备通信,特别地,将基站的下行信息接收后,给处理器110处理;另外,将设计上行的数据发送给基站。可包括用于执行这些功能的众所周知的电路系统,包括但不限于天线系统、射频收发器、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、编解码芯片组、SIM(Subscriber Identity Module,用户身份模块)卡等等。射频电路180可通过无线通信与网络以及其他设备通信,网络诸如是互联网、内联网和/或无线网络(诸如蜂窝电话网络、无线局域网和/或城域网)。无线通信可使用多种通信标准、协议和技术中的任何类型,包括但不限于全球移动通信系统、增强数据GSM环境、高速下行链路分组接入、高速上行链路分组接入、宽带码分多址、码分 多址、时分多址、蓝牙、无线保真(例如,IEEE 802.11a、IEEE 802.11b、IEEE 802.11g和/或IEEE 802.11n)、因特网语音协议、Wi-MAX、电子邮件协议(例如,因特网消息访问协议(IMAP)和/或邮局协议(POP))、即时消息(例如,可扩展消息处理现场协议(XMPP)、用于即时消息和现场利用扩展的会话发起协议(SIMPLE)、即时消息和到场服务(IMPS))、和/或短消息服务(SMS)、或者其他任何适当的通信协议,包括在本文献提交日还未开发出的通信协议。
电源190用于给手机100进行供电及电源管理。具体的,电源190可包括电源管理系统、一个或多个电源(例如,电池、交流电)、再充电系统、电力故障检测电路、功率变换器或逆变器、电力状态指示器(例如,发光二极管)和任何其他与手机中电力的生成、管理和分配相关联的部件。
尽管未示出,手机100还可包括摄像头、蓝牙模块等,在此不再赘述。
其中,在手机100的存储器120中可以存储有Android操作系统,Android操作系统是一个以Linux为基础的移动设备操作系统,由操作系统、中间件、用户界面和应用软件组成,并利用手机提供的上述硬件实现各种各样的功能。下面,将详细描述该存储的Android操作系统的架构。
图2是一种运行Android操作系统的手机操作系统结构示意图。Android操作系统架构分为四层,从高层到底层分为应用程序层,应用程序框架层,函数库层和Linux内核层。
1、应用程序层:
应用程序层(Applications)是Android操作系统架构的最上一层,包括Android操作系统装配的核心应用软件,例如电子邮件客户端、短信、通话、日历、地图、浏览器、联系人等。当然,对于开发者来说,开发者可以编写应用软件并安装到该层。一般而言,应用程序都是使用Java语言开发,通过调用应用程序框架层所提供的API(Application Programming Interface)来完成。
2、应用程序框架层:
应用程序框架层(Application Framework),主要是为开发者提供了可以访问应用程序所使用的各种API,开发者通过应用程序框架层来与Android底层(例如函数库层、Linux内核层等)进行交互,开发自己的应用。该应用程序框架层主要是Android操作系统的一系列的服务和管理系统。应用程序框架层主要包括如下关键服务:
活动管理器(Activity Manager)用来管理应用程序生命周期并提供常用的导航回退功能;
内容提供器(Content Providers),用来管理不同应用程序间的数据共享和访问;
通知管理器(Notification Manager),用于控制应用程序在状态栏显示提示信息(例如警告(Alerts)、通知消息(Notifications)等)给用户;
资源管理器(Resource Manager):提供非代码资源(如字符串、图形和布局文件(Layoutfile)等)供应用程序使用;
包管理器(Package Manager)主要用于对Android操作系统的应用程序进行管理;
视图(View),具有丰富的、可扩展的视图集合,可用于构建一个应用程序,它具体包括列表(List)、网格(Grid)、文本框(TextBox)、按钮(Button),以及可嵌入的网页浏览器;
位置管理器(Location Manager),主要是让应用程序可以访问到手机当前的地理位置。
3、函数库层:
函数库层(Libraries)是应用程序框架的支撑,是连接应用程序框架层与Linux内核层的重要纽带。函数库层包括一些由计算机程序C语言或C++语言编译的函数库,这些函数库能被Android操作系统中的不同的组件使用,它们通过Android应用程序框架为开发者提供服务。具体地,函数库包括libc函数库,它是专门为基于embedded linux的设备定制的;函数库还包括Android操作系统多媒体库(Media Framework),该库支持多种编码格式的音频/视频的回放和录制,同时支持静态图像文件,以及常见的音频/视频编码格式。函数库还包括界面管理库(Surface Manager),主要负责管理针对显示系统的访问,具体用于在执行多个应用程序时候,负责管理显示与存取操作间的互动,另外也负责2D绘图与3D绘图进行显示合成。
函数库层中还包括其他的用于实现Android操作系统手机各个功能的函数库,例如:SGL(Scalable Graphics Library):基于XML(Extensible Markup Language)文件的2D图形图像处理引擎;SSL(Secure Sockets Layer):位于TVP/IP协议(TransmissionControlProtocol/InternetProtocol,传输控制协议/互联 网络协议)与各种应用层协议之间,为数据通讯提供支持;OpenGL/ES:3D效果的支持;SQLite:关系型数据库引擎;Webkit:Web浏览器引擎;FreeType:位图(Bitmap)及矢量(Vector)字体支持;等等。
Android Runtime是一种在Android操作系统上的运行环境,是Android操作系统所使用的一种新的虚拟机。在Android Runtime中,采用AOT(Ahead-Of-Time)技术,应用程序在第一次安装的时候,该应用程序的字节码就会被预先编译成机器码,让程序成为真正的本地应用,之后再次运行,就省去了编译这一步骤,启动和执行都会变得更加快速。
在本发明另外的一些实施例中,Android Runtime也可以由核心函数库(Core Libraries)和Dalvik虚拟机(Dalvik Virtual Machine)代替。核心函数库提供了Java语言API(Application Programming Interface)中的大多数功能,主要通过JNI(Java Native Interface)的方式向应用程序框架层提供调用底层程序库的接口。同时也包含了Android的一些核心API,如android.os、android.net、android.media等等。Dalvik虚拟机使用一种JIT(Just-in-Time)的运行时编译的机制,每次启动一个进程都需要虚拟机在后台重新编译字节码,会对启动速度有一定的影响。每一个Android应用程序都运行在是一个Dalvik虚拟机中的实例中,每一个Dalvik虚拟机实例都是一个独立的进程空间。Dalvik虚拟机设计成在一个设备可以高效地运行多个虚拟机。Dalvik虚拟机可执行文件格式是.dex,dex格式是专为Dalvik设计的一种压缩格式,适合内存和处理器速度有限的系统。需要提出的是Dalvik虚拟机依赖于Linux内核提供基本功能(线程、底层内存管理)。可以理解的是,Android Runtime、Dalvik属于不同类型的虚拟机,本领域技术人员可以在不同情况下选用不同形式的虚拟机。
4、Linux内核层:
Android的核心系统服务,如安全性、内存管理、进程管理、网络协议栈和驱动模型等都基于Linux内核。Linux内核同时也作为硬件和软件栈之间的抽象层。该层有许多与移动设备相关的驱动程序,主要的驱动有:显示驱动(Display Driver):基于Linux的帧缓冲(Frame Buffer)驱动。键盘驱动(KeyBoard Driver):作为输入设备的键盘驱动。Flash驱动(Flash Memory Driver):基于MTD(memory technology device内存技术设备)的Flash驱动程序。照相机驱动(Camera Driver):常用的基于Linux的v4l2(Video for Linux)驱动。音频驱 动(Audio Driver):常用的基于ALSA(Advanced Linux Sound Architecture)的高级Linux声音体系驱动。蓝牙驱动(Bluetooth Driver):基于IEEE 802.15.1标准的无线传输技术。WiFi驱动(WiFi Drive):基于IEEE 802.11标准的驱动程序。Binder(IPC)驱动:Android的一个特殊的驱动程序,具有单独的设备节点,提供进程间通讯的功能。电源管理(Power Management):比如电池电量等。
输入法的实现需要Android操作系统各个层的参与。对于用户的输入,需要Linux内核层的各种驱动的支持才能识别;需要调用输入法的应用程序运行在应用程序层;应用程序框架层用于显示应用程序的内容、UI、通知等;函数库层为输入法的运行提供函数支持,例如对于代码的解析、字体及图形的支持、输入动画效果的显示等等。
具体地,输入法框架(Input Method Framework,以下简称IMF)是Android操作系统的一个系统组件,开发者可以在基于IMF来开发一种输入法应用程序。结合本发明实施例,参见图3,IMF主要包含三个部分:输入法管理器,输入法编辑器,客户端应用程序。
1、输入法管理器(Input Method Manager,以下简称IMM):是管理IMF其他部分之间交互的一个中心点。它可以看成是一个客户端API,存在于各个应用程序的上下文中,用来与管理所有进程间交互的全局系统服务进行通信。
2、输入法编辑器(Input Method Editor,以下简称IME):用来实现一个具体的交互模型,该交互模型允许用户生成文本,处理用户的输入。系统绑定一个当前正在用的输入法,使其创建和运行,系统决定该输入法何时隐藏或者显示它的用户界面(User Interface,以下简称UI)。同一时间只能有一个IME运行。
3、客户端应用程序(Client Applications,以下简称CA),指当前调用输入法的应用程序,通过IMM控制输入焦点和IME的状态。一次只能有一个客户端应用程序使用IME。
这三个部分需用共同合作才能完成输入法的工作。例如打开一个需要调用输入法的应用程序,当输入框获得输入焦点时,CA会通知IMM打开输入法,然后IMM查看当前选中的IME,并调用该IME。当用户提交了输入时,IME会将输入信息传递给CA完成输入。
下面结合图3对IMF三部分的交互过程进行阐述。
IMM:完成IME和CA的绑定,同时对输入法模块进行一些参数设置和安全控制,起到中间协调的角色。其中,IMM中的InputMethodManagerService是整个系统中,一切与输入法有关的总控制中心,CA请求调用输入法即是通过这个进程;WindowManagerService负责显示输入法,接收用户事件,获得焦点认证。IMM中的InputMethodManagerService进程会通过CA的InputMethodClient进程获取当前绑定的CA的信息,比如输入框类型;IMM中的InputMethodManagerService进程会通过IME的InputView进程启动、修改、隐藏IME。
IME:接收用户的按键输入信息,并调用客户端接口把输入信息传递给CA。其中,InputView进程可以从触摸屏获取用户的输入信息,也可以通过CA的InputContext(InputConnection)进程对CA的文本信息进行处理,比如删除字符、替换字符、控制光标位置等操作。
CA:用于显示用户的输入信息,同时为IME提供当前文本框的内容。其中,CA的InputMethodManager进程通过IMM的InputMethodManagerService进程间接控制IME的显示或者隐藏;CA的InputMethodManager进程通过IME的InputMethodSession(InputMethodSessionWrapper)进程为IME提供当前文本框的状态,比如光标改变等信息,从而让IME调整输入状态;UI控件可以处理一些未经IME处理的按键信息,比如Home键信息,使其直接到达CA;InputContext(InputConnection)进程可以在CA与IME的交互完成后,把输入信息显示在用户界面上;InputMethodClient作为输入法管理服务的客户端实现,用于标识自我并接收来自管理服务端的状态变化。
初始化输入法时,会做如下一些事情:
1、注册一些系统事件,处理事件(开关屏、关闭系统对话框、包改变)跟输入法的交互,例如:关屏时会把输入法菜单关闭;输入法包被删除时,将输入法从可用列表移除等。
2、加载输入法列表(buildInputMethodListLocked),读取启用的输入法,如果设置为空,加载全部输入法,并选择一个默认输入法。
3、加载状态栏图标等。
根据输入框类型可以确定当前界面是否处于密码输入状态,输入法系统服 务中的InputMethodManagerService服务从客户端进程中获取当前界面中输入框的输入类型。具体的,当一个输入域(例如输入框)得到输入焦点并且启动输入法的时候,系统会调用onStartInputView(),并且传入一个EditorInfo对象参数,里面包含了关于输入类型和其他文本域属性的细节,在这个对象中,inputType字段包含了文本域的输入类型。inputType字段是一个整型变量,它包含了基于位的规则表示各种各样的输入类型设置,常见的输入类型有数字、日期、电话号码、密码等。android:inputType用来设置文本的类型,用于帮助输入法显示合适的键盘类型。要实现密码输入,可以通过setInputType函数更改TextView的输入方式为Password。其中,可以通过设置EditText的setTransformationMethod()方法来实现隐藏密码或者显示密码,例如可以用“*”符号显示密码。当确定当前界面处于密码输入状态时,输入法进程的窗口视图可以接收用户的输入信息,然后通过客户端进程的UI控件显示输入信息。
参见图4A和图4B,软键盘输入法界面40可以包括:一个视图区域中显示各种按键41,包括字母键、数字键、符号键和功能键等,触摸屏接收用户的触摸输入,并根据用户触摸输入的位置坐标信息判断对应的按键41,然后在输入框42中显示按键41对应的输入信息。可以理解的是,软键盘输入界面可以有多种形式,软键盘键位分布也可以与标准键盘不同。当触摸屏检测到用户在软键盘上触摸某个按键41时,获取用户按键的位置坐标信息和压力值。根据位置坐标信息,可以计算当前用户输入对应的具体的按键值,然后调用系统接口提交用户的输入按键信息。通常,输入法会使用按键值,而较少使用压力信息,本发明实施例将充分利用压力信息增强输入密码的安全性。需要注意的是,上述压力信息仅指构成密码序列的字符按键的压力信息,对于不是密码输入类型的按键压力信息不予考虑,例如功能键的压力值并不影响最终输入结果。可以理解的是,在使用软键盘输入密码时,输入框42中可以不显示真实的输入字符,具体的,可以隐藏输入字符,也可以显示“*”符号或其他和输入字符无关的字符,以防止密码泄露。
参见图5,本发明实施例提供了一种利用压力触控生成密码的方法,该方法可以在上述实施例中的具有触摸输入功能的设备(例如手机100)中实现。该方法具体包括:
S501:设备判断当前界面是否处于密码输入状态。
当前界面可以是具有输入焦点(Input Focus)的用户界面。当一个用户界面可以接收用户通过压力触摸屏、键盘、鼠标等输入设备输入的信息时,则称该用户界面具有输入焦点。在一些实施例中,当前界面又称作活动窗口,是已激活的、可以接收用户输入的用户界面。通常情况下,当前界面可以是一个处于前台的可视的窗口,以方便用户查看或者输入信息;对于可以同时呈现多个窗口的设备(例如平板电脑中的分屏功能,即在一个屏幕上分两个显示区域,这两个显示区域分别显示两个不同的界面),当前界面可以是具有输入焦点的一个界面;其余界面即使可见,也不具有输入焦点,因而不是当前界面。
以Android操作系统为例,用户界面通常通过Activity组件实现,一个Activity包含一个或多个视图(View),例如各种按钮(Button)、图标(Icon),从而实现与用户的交互。Acitivity通过Acitivity Stack进行管理,当一个新的Activity被启动的时候,系统调用onCreate()函数实现窗口组件初始化,该Activity会被放置在栈顶并成为运行的Activity,接收用户输入,成为当前界面。一个Activity有四个状态:活动(active/running)、暂停(paused)、停止(stopped)、销毁(inactive/destroyed),处于活动(running)状态的用户界面可以被称为当前界面,该当前界面处于前台,用户能够看到并且具有输入焦点。
当前界面可以具有输入框,以便接收和显示用户的输入,设备可以根据输入框的类型判断当前界面是否处于密码输入状态。以运行Android操作系统的设备为例,设备会根据输入框的InputType标记来确定输入框的类型。例如,当设备发现输入框的类型为android:inputType="phone",则表明输入的类型是电话输入;当设备发现输入框的类型为android:inputType="text",则表明输入的类型是文本输入;类似的,在Android操作系统中,当设备发现输入框的类型为android:inputType=“textPassword”时,设备确定当前界面处于密码输入状态。在密码输入状态下,设备可以接收用户的输入,并生成密码;可选的,为了避免密码泄露,在设备当前界面的输入框中可以不显示真实的输入字符,例如可以隐藏输入字符,也可以显示为“*”符号、“·”符号或者其他和输入字符无关的字符;如果设备根据输入框的类型确定当前界面不是密码输入状态,例如上述电话输入类型或文本输入类型,根据当前界面的输入框类型调整输入法的输入模式,可选的,可以用明文显示输入的字符。
以手机100为例,一种可能的密码输入状态如图4C所示。当前界面包括输 入框430和软键盘431。其中,输入框430用于接收用户的输入字符;根据输入框的类型可以判断当前界面是否处于密码输入状态,以Android操作系统为例,如果输入框的类型为android:inputType=“textPassword”,则手机100确定当前界面处于密码输入状态。软键盘431可以允许用户触摸压力触摸屏实现字符输入,并把输入的字符提交给输入框430。可选的,为了防止密码泄露,已输入的字符显示为“·”符号或其他与输入字符无关的字符。可以理解的是,图4C虽然以数字软键盘为例,但同样适用于含有字母、特殊字符的软键盘;图4C虽然以6位密码为例,但同样适用于其他长度的密码序列。另外,图形解锁的原理与图4C中数字解锁类似,也是分布于不同位置的键位,只是图形解锁时需要连续滑动,所以本发明实施例的方法也适用于图形解锁,在滑动到相应位置时也可以加入压力值信息,例如轻压或重压等。
S502:当所述设备确定所述当前界面处于密码输入状态时,接收用户的输入信息,所述输入信息包括字符和输入所述字符时产生的压力值。
设备确定当前界面是密码输入状态时,例如当Android设备发现输入框的类型为android:inputType=“textPassword”时,可以调用输入法进程,在当前界面显示软键盘,并接收用户的输入信息。以Android操作系统为例,用户打开一个需要调用输入法的应用程序,当输入框获得输入焦点时,客户端应用程序(CA)会通知输入法管理器(IMM)打开输入法,然后IMM查看当前选中的输入法编辑器(IME),并调用该IME。当用户提交了输入时,IME会将输入信息传递给CA完成输入。
上述输入信息包括字符和输入所述字符时产生的压力值,所述压力值是在所述用户输入字符时所产生的压力值。用户点击软键盘按键时,设备可以通过触摸屏接收到触摸位置,每个触摸位置对应软键盘上的一个字符,因此设备根据用户的触摸位置即可确定用户输入的字符。具有压力感应的触摸屏可以测得每次用户输入的压力值,该压力值与输入的字符一一对应。上述输入信息可以存储在设备的存储器120中,更具体的,可以存储在设备的缓存中,以便在S503中处理。
触摸屏可以检测用户输入的压力值,也可以通过检测用户在按压触摸屏时手指与该触摸屏的接触面积得到压力值。可选的,在用户按压触摸屏时,触摸屏可以根据压力值的大小给用户提供按压轻重程度的反馈。可选的,该反馈可 以是一个触觉反馈,以确保只有当前进行输入的用户才能感知到,例如振动等。设备得到压力值的方法可以有多种,以Android操作系统为例,触摸屏的压力传感器在检测到用户的按压后,调用MotionEvent Class里的getPressure方法,从而获得用户输入压力值的大小数值;如果是通过检测手指与触摸屏的接触面积得到压力值,则触摸屏的压力传感器在检测到用户的按压后,调用MotionEvent Class里的getSize方法,从而获得手指与触摸屏的接触面积数值,该接触面积数值被getSize方法标准化为0到1范围之内的一个数值,该数值可以间接表示输入压力值的大小,即手指与触摸屏接触面积越大,则认为用户按压力度越大。可以理解的是,设备也可以调用其他接口函数对压力值进行检测,此处不做限制。在本发明的一些实施例中,可以用一个预设的压力值阈值来判断用户按压力度的轻重,当用户输入的压力值大于该阈值时,该输入被视为一次重压;当用户输入的压力值小于该阈值时,该输入被视为一次轻压。可选的,重压时触摸屏可以给用户提供一次振动反馈,轻压时触摸屏可以不给用户提供振动反馈。
在本发明的一些实施例中,用(X,Y)表示用户的输入信息,其中,X表示用户输入的字符,Y表示该字符对应的输入压力值,(Xn,Yn)表示用户第n次输入的字符和压力值。为了表述方便,此处的压力值Y不是以力学单位“牛顿(N)”为单位的真实值,而是一个相对于预设的单位压力值而定义的相对值,Y的数值越大表示对应的真实压力值越大。例如,输入信息(1,2)表示用户输入的字符是1,相对压力值是2.在本发明的一些实施例中,用Ymax表示预设的压力值阈值,同样的,该压力值阈值也是一个相对值。
S503:所述设备根据所述压力值对所述字符进行处理,生成密码。
设备根据每个字符对应的压力值来对所述字符进行处理,从而生成密码。密码处理的算法可以预先设置,并存储在存储器中,该存储器包括本地存储器120和网络侧存储器。从网络侧存储器获取密码生成算法具体可以包括:设备通过无线网络或者有线网络访问网络服务器,从该网络服务器的存储器中获取预先设置的密码生成算法。密码生成算法是设备默认的或通过网络更新的一个或多个算法,如果有多个密码生成算法,则设备在获取密码生成算法后,根据用户选择的一个密码生成算法生成密码。可选的,可以在用户输入密码的过程中以文字、图片、音频、视频等方式提示用户当前适用的密码生成算法,以用 户选择的密码生成算法作为最终适用的密码生成算法。进一步的,为了迷惑偷窥者,可以伪装提示的内容,例如音频播放的提示规则是伪装的,真正的规则显示在屏幕的一角,这个真正的规则才是最终适用的密码生成算法。
可选的,上述选择密码生成算法具体可以包括:
S5031:所述设备确定用户输入所用的手指。具体地,该设备可以通过摄像头来确定用户输入信息时所用的手指;还可以通过每个手指按压触摸屏的指纹面积的不同,来确定用户输入信息时所用的手指。当然,为了方便,优选地,该设备只需要确定用户第一次输入信息的时候用的是哪个手指就可以了。
S5032:所述设备根据不同的手指来调用对应的密码生成算法。例如,如果用户是用大拇指输入的信息(字符和压力值),那么可以调用密码生成算法1,来对输入信息进行处理,进而生成密码;如果用户是用食指输入的信息(字符和压力值),那么可以调用密码生成算法2,来对输入信息进行处理,进而生成密码。
这样就可以随时根据不同的情况来调用不同的密码生成算法,极大提高输入密码的安全性和便携性。
值得注意的是,设备获取密码生成算法的时间可以是生成密码前的任意时刻。例如,可以在接收用户输入之前获取密码生成算法,也可以在用户输入过程中获取密码生成算法,还可以在用户输入结束后再获取密码生成算法。对于用户输入,可以在输入的过程中单个处理或分组处理,也可以在输入完成后一并处理。经过密码生成算法处理后生成的密码可以不含压力值,以便兼容传统的密码存储体系和常见的具有触摸屏的设备。当然,在本发明另外的一些实施例中,经过密码生成算法处理后所生成的密码也可以包含压力值,这样使得密码安全性更高。
可选的,经密码生成算法处理得到的密码会被提交给设备,具体的,可以是密码输入框。设备收到密码后,与预设的正确密码进行对比,验证密码是否正确;如果密码和预设的正确密码相同,则密码正确。需要注意的是,这里的相同指符合正确密码的要求,并不一定是两者所有字符完全相同,例如有的密码判断规则为忽略字母大小写,如果两者的唯一区别是字母的大小写不同,仍然是符合要求的。上述验证过程可以在设备本地完成,也可以由设备连接网络服务器完成。密码验证完成后设备可以执行预设的操作,例如,输入密码正确 时可以进入手机界面、解锁应用程序、门禁解锁、完成支付等等,输入密码错误时需要重新输入等等,此处不再赘述。
本发明实施例利用触摸屏获取压力信息,在确定当前是密码输入状态时,启动密码防偷窥功能,根据预先设置的密码生成算法对用户的输入信息进行处理。即使他人完全记住用户的按键输入,也无法获知最终生成的密码,从而实现防偷窥功能。
下面介绍几种密码生成算法。特别应当注意的是,以下实施例虽然以数字密码为例,但同样适用于含有字母、特殊字符的密码输入(当然,不适用于不是密码输入类型的输入,例如不构成密码序列的功能键);以下实施例虽然以6位密码为例,但同样适用于其他长度的密码序列。需要再次提醒本领域技术人员的是,以下密码生成算法适用于一切使用触摸屏输入密码的场合,包括所有具有触摸屏的设备,例如手机100。
参见图6,一种可能的密码生成算法为:所述输入信息为(Xn,Yn),其中,Xn为输入的字符,Yn为Xn所对应的压力值,n为自然数;所述设备根据所述压力值对所述字符进行处理,生成密码,具体为:所述设备判断Yn是否小于预设的第一阈值Ymax1;当所述设备确定Yn<Ymax1时,生成密码为Xn。上述密码生成算法也可以表述为:所述设备去掉输入压力值大于预设的第一阈值的字符,根据压力值小于所述第一阈值的字符生成密码。上述密码生成算法还可以表述为:所述设备判断每个字符对应的压力值是否小于预设的第一阈值;所述设备根据压力值小于所述第一阈值的字符生成密码。
所述预设的阈值可以由用户设置,也可以在设备出厂时预设,也可以由设备根据用户日常操作的压力值来调整。设备判断用户输入的每个字符的压力值是否小于预设的第一阈值,当用户输入的某些字符的压力值大于预设的第一阈值时,设备确定这些输入压力值大于预设的第一阈值的字符无效,根据输入压力值小于预设的第一阈值的字符生成密码。可选的,上述输入压力值大于预设的第一阈值的字符可以有一个或者多个;当有多个字符的输入压力值大于预设的第一阈值时,这些输入压力值大于预设的第一阈值的字符可以连续出现,也可以不连续出现;可选的,用户可以倒序输入密码;下文中其他密码生成算法中也是如此。
可以理解的是,设备判断输入压力值的条件是灵活的,例如判断条件也可 以是:判断用户输入中每个字符的压力值是否大于等于预设的第一阈值,当用户输入的某些字符的压力值大于等于预设的第一阈值时,设备确定这些输入压力值大于等于预设的第一阈值的字符无效,根据输入压力值小于预设的第一阈值的字符生成密码;又如,判断条件也可以是:判断用户输入中每个字符的压力值是否小于预设的第一阈值,当用户输入的某些字符的压力值小于预设的第一阈值时,设备确定这些输入压力值小于预设的第一阈值的字符无效,根据输入压力值大于等于预设的第一阈值的字符生成密码;又如,判断条件也可以是:判断用户输入中每个字符的压力值是否小于等于预设的第一阈值,当用户输入的某些字符的压力值小于等于预设的第一阈值时,去掉这些输入压力值小于等于预设的第一阈值的字符,根据输入压力值大于预设的第一阈值的字符生成密码。下文中其他密码生成算法的压力值判断条件也是如此,不再赘述。
图6中第一行表示用户输入信息,第二行表示经过密码生成算法处理后生成的密码,带有粗框的字符表示该字符的输入压力值大于预设的第一阈值。比如正确密码是1、2、3、4、5、6,预设的压力值第一阈值Ymax1=5,用户的输入信息分别是(X1,Y1)=(1,2),(X2,Y2)=(2,2),(X3,Y3)=(3,1),(X4,Y4)=(8,6),(X5,Y5)=(4,3),(X6,Y6)=(5,2),(X7,Y7)=(6,3);其中第四次输入时使用的压力值(Y4=6)大于预设的第一阈值(Ymax1=5),则确定第四次输入的字符(X4=8)无效,根据输入压力值小于Ymax1的字符(X1,X2,X3,X5,X6,X7)生成密码,最后生成的密码(X1,X2,X3,X5,X6,X7)=(1,2,3,4,5,6),和正确的密码相同。可以看出,经过密码生成算法的处理,密码输入过程即使被他人偷窥,也无法知道最终生成的密码,达到了防偷窥的目的;而且最终生成的密码不含压力值信息,完全兼容现有的密码存储体系,可以用于各种具有压力触摸屏设备的解锁。
参见图7,另一种可能的密码生成算法为:所述输入信息为(Xn-1,Yn-1),(Xn,Yn),其中,Xn-1、Xn为输入的字符,Yn-1、Yn分别为Xn-1、Xn所对应的压力值,n为自然数;所述设备根据所述压力值对所述字符进行处理,生成密码,具体为:所述设备判断Yn是否大于预设的第七阈值Ymax7;当所述设备确定Yn>Ymax7时,生成密码为Xn。上述密码生成算法也可以表述为:用输入压力值大于预设的第七阈值的字符替换其前一个字符。上述密码生成算法还可以表述为:设备判断用户输入中每个字符的压力值是否大于预设的第七阈值,当用户输入的某些字符的压力值大于预设的第七阈值时,确定这些字符的 前一个字符无效,根据除此无效字符之外的其他字符(即除了这些字符的前一个字符之外的其他字符,包括这些压力值大于等于预设的第七阈值的字符)生成密码,即达到了用输入压力值大于等于预设的第七阈值的字符替换其前一个字符的效果。可选的,上述输入压力值大于等于预设的第七阈值的字符可以有一个或多个,用于替换其之前或之后相同个数的字符。可以理解的是,本实施例中也可以用输入压力值大于预设的第七阈值的字符替换其后一个字符。
图7中第一行表示用户输入信息,第二行表示经过密码生成算法处理后生成的密码,带有粗框的字符表示该字符的输入压力值大于预设的第七阈值。比如正确密码是1、2、3、4、5、6,预设的压力值第七阈值Ymax7=5,用户的输入信息分别是(X1,Y1)=(1,2),(X2,Y2)=(2,3),(X3,Y3)=(8,3),(X4,Y4)=(3,7),(X5,Y5)=(4,3),(X6,Y6)=(5,2),(X7,Y7)=(6,3);其中第四次输入时使用的压力值(Y4=7)大于预设的第七阈值(Ymax7=5),则用第四次输入的字符(X4=3)替换其前一个字符(X3=8),最后生成的密码(X1,X2,X4,X5,X6,X7)=(1,2,3,4,5,6),和正确的密码相同。可以看出,经过密码生成算法的处理,密码输入过程即使被他人偷窥,也无法知道最终生成的密码,达到了防偷窥的目的;而且最终生成的密码不含压力值信息,完全兼容现有的密码存储体系,可以用于各种具有压力触摸屏设备的解锁。
参见图8,另一种可能的密码生成算法为:所述输入信息为(Xn,Yn),其中,Xn为输入的字符,Yn为Xn所对应的压力值,n为自然数;所述设备根据所述压力值对所述字符进行处理,生成密码,具体为:所述设备判断Yn是否大于预设的第二阈值Ymax2;当所述设备确定Yn>Ymax2时,生成密码为Xn,Xn。上述密码生成算法也可以表述为:重复输入输入压力值大于预设的第二阈值的字符。上述密码生成算法还可以表述为:所述设备判断每个字符对应的压力值是否大于预设的第二阈值;所述设备重复输入压力值大于所述第二阈值的字符,从而生成密码。上述大于预设的第二阈值的字符可以有一个或者多个,重复输入的次数可以有一次或多次。
图8中第一行表示用户输入信息,第二行表示经过密码生成算法处理后生成的密码,带有粗框的字符表示该字符的输入压力值大于预设的第二阈值。比如正确密码是1、2、3、3、5、6,预设的压力值第二阈值Ymax2=5,用户的输入信息分别是(X1,Y1)=(1,2),(X2,Y2)=(2,3),(X3,Y3)=(3,7),(X4,Y4)=(5,1), (X5,Y5)=(6,3);其中第三次输入时使用的压力值(Y3=7)大于预设的第二阈值(Ymax2=5),则重复输入第三次输入的字符(X3=3),最后生成的密码(X1,X2,X3,X3,X4,X5)=(1,2,3,3,5,6),和正确的密码相同。可以看出,经过密码生成算法的处理,密码输入过程即使被他人偷窥,也无法知道最终生成的密码,达到了防偷窥的目的;而且最终生成的密码不含压力值信息,完全兼容现有的密码存储体系,可以用于各种具有触摸屏设备的解锁。
参见图9,还有一种可能的密码生成算法为:将输入压力值大于预设的第九阈值的字符根据预设规则进行变化。设备判断用户输入中每个字符的压力值是否大于预设的第九阈值,当用户输入的某些字符的压力值大于预设的第九阈值时,根据预设规则对这些压力值大于预设的第九阈值的字符进行变化。所述的预设规则非常广泛,比如字符顺序列表中的前一个或后一个值,前若干个或后若干个值,某个固定值减去输入值,等等;其中,顺序列表可以是0-9的数字表,或A-Z的字母表,顺序列表可以是正序或者逆序的。例如,一种可能的密码生成算法可以为:所述输入信息为(Xn,Yn),其中,Xn为输入的字符,Yn为Xn所对应的压力值,n为自然数;所述设备根据所述压力值对所述字符进行处理,生成密码,具体为:所述设备判断Yn是否大于预设的第九阈值Ymax9;当所述设备确定Yn>Ymax9时,生成密码为Xn与3之和的个位数(即Xn在0-9的数字表中的后面第3个值)。
图9中第一行表示用户输入信息,第二行表示经过密码生成算法处理后生成的密码,带有粗框的字符表示该字符的输入压力值大于预设的第九阈值。比如正确密码是1、2、3、4、5、6,预设的压力值第九阈值Ymax9=5,预设规则为0-9的数字表中后面第3个值,用户的输入信息分别是(X1,Y1)=(1,2),(X2,Y2)=(2,3),(X3,Y3)=(3,2),(X4,Y4)=(4,1),(X5,Y5)=(2,6),(X6,Y6)=(6,2);其中第五次输入时使用的压力值(Y5=6)大于预设的第九阈值(Ymax9=5),则根据上述预设规则,得到处理后的X5为原值(原X5=2)后的第3个值(即5),最后生成的密码(X1,X2,X3,X4,X5,X6)=(1,2,3,4,5,6),和正确的密码相同。可以看出,经过密码生成算法的处理,密码输入过程即使被他人偷窥,也无法知道最终生成的密码,达到了防偷窥的目的;而且最终生成的密码不含压力值信息,完全兼容现有的密码存储体系,可以用于各种具有压力触摸屏设备的解锁。
参见图10,还有一种可能的密码生成算法为:所述输入信息具体为(X1,Y1), (X2,Y2),……,(Xk-1,Yk-1),(Xk,Yk),(Xk+1,Yk+1),……,(Xn,Yn),其中,X1,X2,……,Xk-1,Xk,Xk+1,……,Xn为输入的字符,Y1,Y2,……,Yk-1,Yk,Yk+1,……,Yn为所述字符所对应的压力值;其中k、n为自然数,并且,n≥k>1;所述设备根据所述压力值对所述字符进行处理,生成密码,具体为:所述设备判断Y1,Y2,…,Yk-1,Yk,Yk+1,……,Yn是否大于预设的第三阈值Ymax3;当所述设备确定Yk-1为第一个大于所述第三阈值Ymax3的压力值时,生成密码为Xk-1,Xk,Xk+1,……,Xn。上述规则也可以表述为:以输入压力值大于预设的第三阈值的字符作为起始输入字符,之前输入的字符作为无效字符。上述规则还可以表述为:所述设备判断每个字符对应的压力值是否大于预设的第三阈值;所述设备根据第一个压力值大于所述第三阈值的字符及其之后的字符生成密码。可以理解的是,此处大于预设的第三阈值的字符也可以作为即将输入密码的信号,用该字符之后输入的字符生成密码;也可以在输入最后一位密码后再输入一串无效字符,更好地起到防偷窥作用;等等。
图10中第一行表示用户输入信息,第二行表示经过密码生成算法处理后生成的密码,带有粗框的字符表示该字符的输入压力值大于预设的第三阈值。比如正确密码是1、2、3、4、5、6,预定的压力值第三阈值Ymax3=5,用户先输入n个无效字符,从第n+1个字符开始,依次的输入信息分别是(Xn+1,Yn+1)=(1,6),(Xn+2,Yn+2)=(2,3),(Xn+3,Yn+3)=(3,2),(Xn+4,Yn+4)=(4,1),(Xn+5,Yn+5)=(5,3),(Xn+6,Yn+6)=(6,2);其中第n+1次输入时使用的压力值(Yn+1=6)大于预设的第三阈值(Ymax3=5),则以Xn+1作为起始输入字符,最后生成的密码(Xn+1,Xn+2,Xn+3,Xn+4,Xn+5,Xn+6)=(1,2,3,4,5,6),和正确的密码相同。可以看出,经过密码生成算法的处理,密码输入过程即使被他人偷窥,也无法知道最终生成的密码,达到了防偷窥的目的;而且最终生成的密码不含压力值信息,完全兼容现有的密码存储体系,可以用于各种具有压力触摸屏设备的解锁。
参见图11,又一种可能的密码生成算法为:所述输入信息具体为(X1,Y1),(X2,Y2),其中,X1,X2为输入的字符,Y1,Y2为所述字符所对应的压力值;所述设备根据所述压力值对所述字符进行处理,生成密码,具体为:所述设备判断Y1和Y2的大小;如果Y2>Y1,生成密码为X2,X1;如果Y2≤Y1,生成密码为X1,X2。上述规则还可以表述为:所述设备比较前后两个字符对应的压力值;如果后者对应的压力值大于前者对应的压力值,交换两个字符的顺序;如果后者对应的 压力值小于等于前者对应的压力值,保持两个字符的顺序;生成密码。可以把字符按用户输入的顺序每两个字符分为一组,根据每组中前后两个字符对应的压力值大小调整两个字符的顺序,根据调整后的顺序生成密码。上述调整字符顺序具体可以是:当同组中后一个字符的输入压力值比前一个字符的输入压力值大时,交换两者的顺序,否则,不交换两者的顺序。可以理解的是,这里所说的分组排序只要是涉及比较两个字符输入压力值后决定是否调整两者的顺序即可,比如也可以设置当同组中前一个字符比后一个字符输入压力大时,交换两者的顺序;或者也可以将第一个字符和第三个字符分为一组等等。
图11中第一行表示用户输入信息,第二行表示经过密码生成算法处理后生成的密码,虚线框表示一组,图中输入信息每2个一组,共分为3组。在每个组内,带有粗框的字符表示该字符的输入压力值大于该组的另一个字符的输入压力值。例如正确的密码是1、2、3、4、5、6,调整字符顺序具体为:当同组中后一个字符的输入压力值比前一个字符的输入压力值大时,交换两者的顺序,否则,不交换两者的顺序;用户的输入信息分别是(X1,Y1)=(2,2),(X2,Y2)=(1,3),(X3,Y3)=(3,2),(X4,Y4)=(4,1),(X5,Y5)=(5,4),(X6,Y6)=(6,1)。在第一组中,Y1<Y2(2<3),所以交换X1和X2的顺序;在第二组中,Y3>Y4(2>1),不交换X3和X4的顺序;在第三组中,Y5>Y6(4>1),不交换X5和X6的顺序。所以最终生成的密码(X2,X1,X3,X4,X5,X6)=(1,2,3,4,5,6),和正确的密码相同。可以看出,经过密码生成算法的处理,密码输入过程即使被他人偷窥,也无法知道最终生成的密码,达到了防偷窥的目的;而且最终生成的密码不含压力值信息,完全兼容现有的密码存储体系,可以用于各种具有压力触摸屏设备的解锁。
由以上实施例可以看出,密码生成算法是非常灵活而多样的,它们之间的组合、同等替换难以穷举,本领域的普通技术人员可以根据本发明实施例的思想得到更多可用的方法,这些方法都属于本发明的保护范围。
图12是一种手机防偷窥方法示意图,是上述一种利用压力触控生成密码的方法的一个具体的示例。该手机防偷窥方法各步骤如下:
S1201:输入框获得输入焦点。输入框用于接收用户的输入,对于具有压力触摸屏的手机,当用户点击输入框时,输入框会获得输入焦点,并调用输入法。可选的,调用输入法具体为在当前界面呈现软键盘,以接收用户的输入。
S1202:判断是否为密码输入模式。手机根据输入框的类型可以判断是否 为密码输入模式。以Android操作系统为例,当输入框的类型为android:inputType=“textPassword”时,设备确定是密码输入模式。如果是密码输入模式,则执行S1203;如果不是密码输入模式,则根据当前界面的输入框类型调整输入法的输入模式,例如文本输入、电话输入等。
S1203:接收输入信息。手机接收用户在输入法软键盘上的触摸输入,获取输入的字符和压力值。其中,获取字符具体为:获取用户的触摸位置,解析触摸位置对应的字符。可选的,手机在获取触摸输入的字符和压力值后,把字符和压力值缓存在手机的内存中。
S1204:判断输入是否结束。可选的,如果用户按确认键(Enter键)或者关闭输入法时,则输入结束。如果结束,则执行S1205;如果没有结束,则继续执行S1203接收输入信息。
S1205:获取密码生成算法。密码生成算法是预先设置的、存储在手机存储器或者网络侧存储器的一个或多个算法。值得注意的是,该具体示例中,密码处理是在密码输入完成后一并进行的;如前所述,也可以一边输入一边处理,此处不再赘述。
S1206:根据密码生成算法处理输入信息。对内存列表中缓存的字符和每个字符对应的压力值,根据密码生成算法进行处理。
S1207:生成密码。经过密码生成算法处理后生成密码。可选的,可以通过InputConnnection接口传递给客户端进程的密码输入框,完成密码的防偷窥输入。
另外,参见图13,本发明实施例提供一种装置,包括压力触摸屏131,处理器132,存储器133。处理器132判断当前界面是否处于密码输入状态,如果确定当前界面处于密码输入状态,则压力触摸屏131接收用户的输入信息,该输入信息包括字符和输入所述字符时产生的压力值。处理器132根据所述压力值对所述字符进行处理,生成密码。其中,密码生成算法存储在存储器133中。具体方法和上述一种利用压力触控生成密码的方法相同。
另外,本发明实施例提供一种装置,包括压力触摸屏,一个或多个处理器,存储器,一个或多个程序;其中,一个或多个程序被存储在存储器中并被配置为被一个或多个处理器执行,这一个或多个程序包括指令,该指令用于:设备判断当前界面是否处于密码输入状态;当所述设备确定所述当前界面处于密码 输入状态时,接收用户的输入信息,所述输入信息包括字符和输入所述字符时产生的压力值;所述设备根据所述压力值对所述字符进行处理,生成密码。具体方法和上述一种利用压力触控生成密码的方法相同。
另外,参见图14,本发明实施例还提供一种利用压力触控生成密码的装置,包括状态判断单元141,输入接收单元142,密码生成单元143;状态判断单元141判断当前界面是否处于密码输入状态,当状态判断单元141确定当前界面处于密码输入状态时,输入接收单元142接收用户的输入信息,所述输入信息包括字符和输入所述字符时产生的压力值;密码生成单元143根据所述压力值对所述字符进行处理,生成密码。具体方法和上述一种利用压力触控生成密码的方法相同。
另外,本发明实施例还提供一种存储介质,用于存储计算机软件指令,该指令用于:设备判断当前界面是否处于密码输入状态;当所述设备确定所述当前界面处于密码输入状态时,接收用户的输入信息,所述输入信息包括字符和输入所述字符时产生的压力值;所述设备根据所述压力值对所述字符进行处理,生成密码。具体方法和上述一种利用压力触控生成密码的方法相同。
本领域普通技术人员应当理解,结合本文中所公开的实施例描述的各示例的单元、规则及方法步骤,能够以计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
应当理解,本文中所使用的术语“和/或”是指并且涵盖相关联地列出的项目中一个或多个项目的任何和全部可能的组合。还将理解的是,术语“包括”和/或“包含”当在本说明书中使用时是指定存在所陈述的特征、整数、步骤、操作、元素和/或部件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元素、部件和/或其分组。
在本文中对本发明的描述中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本发明的限制。如本在发明的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”和“这一”旨在也包括复数表达形式,除非其上下文中明确地有相反指示。
所述作为分离部件说明的单元是或者也不是物理上分开的,作为单元显示 的部件是或者也不是物理单元,即位于一个地方,或者也分布到多个网络单元上。根据实际的需要选择其中的部分或者全部单元来实现本发明实施例方案的目的。在本发明各个实施例中的各功能单元集成在一个处理单元中,也是各个单元单独物理存在,也两个或两个以上单元集成在一个单元中。
本领域普通技术人员理解:实现上述方法实施例的全部或部分步骤通过程序指令相关的硬件来完成,前述的程序存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。

Claims (20)

  1. 一种利用压力触控生成密码的方法,其特征在于,所述方法包括:
    设备判断当前界面是否处于密码输入状态;
    当所述设备确定所述当前界面处于密码输入状态时,接收用户的输入信息,所述输入信息包括字符和输入所述字符时产生的压力值;
    所述设备根据所述压力值对所述字符进行处理,生成密码。
  2. 根据权利要求1所述的方法,其特征在于,所述当前界面是具有输入焦点的用户界面。
  3. 根据权利要求1或2所述的方法,其特征在于,所述设备判断当前界面是否处于密码输入状态,具体为:所述设备根据所述当前界面的输入框类型判断所述当前界面是否处于密码输入状态。
  4. 根据权利要求3所述的方法,其特征在于,当所述设备获取到所述输入框类型为android:inputType=“textPassword”时,所述设备确定所述当前界面处于密码输入状态。
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:当所述设备确定所述当前界面不处于密码输入状态时,根据当前界面的输入框类型调整输入法的输入模式。
  6. 根据权利要求1所述的方法,其特征在于,所述方法还包括:验证所述生成的密码。
  7. 根据权利要求1所述的方法,其特征在于,所述设备根据所述压力值对所述字符进行处理具体包括:如果有多个密码生成算法,根据用户选择的一个密码生成算法生成密码。
  8. 根据权利要求1或7所述的方法,其特征在于,所述输入信息为(Xn,Yn),其中,Xn为输入的字符,Yn为Xn所对应的压力值,n为自然数;
    所述设备根据所述压力值对所述字符进行处理,生成密码,具体为:
    所述设备判断Yn是否小于预设的第一阈值Ymax1
    当所述设备确定Yn<Ymax1时,生成密码为Xn
  9. 根据权利要求1或7所述的方法,其特征在于,所述输入信息为(Xn,Yn),其中,Xn为输入的字符,Yn为Xn所对应的压力值,n为自然数;
    所述设备根据所述压力值对所述字符进行处理,生成密码,具体为:
    所述设备判断Yn是否大于预设的第二阈值Ymax2
    当所述设备确定Yn>Ymax2时,生成密码为Xn,Xn
  10. 根据权利要求1或7所述的方法,其特征在于,所述输入信息具体为(X1,Y1),(X2,Y2),……,(Xk-1,Yk-1),(Xk,Yk),(Xk+1,Yk+1),……,(Xn,Yn),其中,X1,X2,……,Xk-1,Xk,Xk+1,……,Xn为输入的字符,Y1,Y2,……,Yk-1,Yk,Yk+1,……,Yn为所述字符所对应的压力值;其中k、n为自然数,并且,n≥k>1;
    所述设备根据所述压力值对所述字符进行处理,生成密码,具体为:
    所述设备判断Y1,Y2,…,Yk-1,Yk,Yk+1,……,Yn是否大于预设的第三阈值Ymax3
    当所述设备确定Yk-1为第一个大于所述第三阈值Ymax3的压力值时,生成密码为Xk-1,Xk,Xk+1,……,Xn
  11. 根据权利要求1或7所述的方法,其特征在于,所述输入信息具体为(X1,Y1),(X2,Y2),其中,X1,X2为输入的字符,Y1,Y2为所述字符所对应的压力值;
    所述设备根据所述压力值对所述字符进行处理,生成密码,具体为:
    所述设备判断Y1和Y2的大小;
    如果Y2>Y1,生成密码为X2,X1
    如果Y2≤Y1,生成密码为X1,X2
  12. 一种装置,包括压力触摸屏,一个或多个处理器,存储器,一个或多个程序;所述一个或多个程序被存储在所述存储器中并被配置为被所述一个或多个处理器执行,所述一个或多个程序包括指令,所述指令用于:设备判断当前界面是否处于密码输入状态;当所述设备确定所述当前界面处于密码输入状态时,接收用户的输入信息,所述输入信息包括字符和输入所述字符时产生的压力值;所述设备根据所述压力值对所述字符进行处理,生成密码。
  13. 一种装置,包括压力触摸屏,处理器,存储器;所述处理器判断当前界面是否处于密码输入状态,当所述处理器确定当前界面处于密码输入状态时,所述压力触摸屏接收用户的输入信息,所述输入信息包括字符和输入所述字符时产生的压力值;所述处理器根据所述压力值对所述字符进行处理,生成密码;所述存储器用于存储密码生成算法。
  14. 根据权利要求13所述的装置,其特征在于,所述处理器判断当前界面 是否处于密码输入状态,具体为:所述处理器根据所述当前界面的输入框类型判断所述当前界面是否处于密码输入状态。
  15. 根据权利要求13或14所述的装置,其特征在于,所述输入信息为(Xn,Yn),其中,Xn为输入的字符,Yn为Xn所对应的压力值,n为自然数;
    所述处理器根据所述压力值对所述字符进行处理,生成密码,具体为:
    所述处理器判断Yn是否小于预设的第一阈值Ymax1
    当所述处理器确定Yn<Ymax1时,生成密码为Xn
  16. 根据权利要求13或14所述的装置,其特征在于,所述输入信息为(Xn,Yn),其中,Xn为输入的字符,Yn为Xn所对应的压力值,n为自然数;
    所述处理器根据所述压力值对所述字符进行处理,生成密码,具体为:
    所述处理器判断Yn是否大于预设的第二阈值Ymax2
    当所述处理器确定Yn>Ymax2时,生成密码为Xn,Xn
  17. 根据权利要求13或14所述的装置,其特征在于,所述输入信息具体为(X1,Y1),(X2,Y2),……,(Xk-1,Yk-1),(Xk,Yk),(Xk+1,Yk+1),……,(Xn,Yn),其中,X1,X2,……,Xk-1,Xk,Xk+1,……,Xn为输入的字符,Y1,Y2,……,Yk-1,Yk,Yk+1,……,Yn为所述字符所对应的压力值;其中k、n为自然数,并且,n≥k>1;
    所述处理器根据所述压力值对所述字符进行处理,生成密码,具体为:
    所述处理器判断Y1,Y2,…,Yk-1,Yk,Yk+1,……,Yn是否大于预设的第三阈值Ymax3
    当所述处理器确定Yk-1为第一个大于所述第三阈值Ymax3的压力值时,生成密码为Xk-1,Xk,Xk+1,……,Xn
  18. 根据权利要求13或14所述的装置,其特征在于,所述输入信息具体为(X1,Y1),(X2,Y2),其中,X1,X2为输入的字符,Y1,Y2为所述字符所对应的压力值;
    所述处理器根据所述压力值对所述字符进行处理,生成密码,具体为:
    所述处理器判断Y1和Y2的大小;
    如果Y2>Y1,生成密码为X2,X1
    如果Y2≤Y1,生成密码为X1,X2
  19. 一种利用压力触控生成密码的装置,其特征在于,所述装置包括状态判断单元,输入接收单元,密码生成单元;其中,
    所述状态判断单元,用于判断当前界面是否处于密码输入状态;
    所述输入接收单元,用于当所述状态判断单元确定所述当前界面处于密码输入状态时,接收用户的输入信息,所述输入信息包括字符和输入所述字符时产生的压力值;
    所述密码生成单元,用于根据所述压力值对所述字符进行处理,生成密码。
  20. 一种存储一个或多个程序的计算机存储介质,所述一个或多个程序包括指令,所述指令用于执行如权利要求1至11中任一权利要求所述的方法。
PCT/CN2016/087190 2016-06-25 2016-06-25 利用压力触控生成密码的方法及装置 WO2017219376A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
US15/776,025 US20180336339A1 (en) 2016-06-25 2016-06-25 Method And Apparatus For Generating Password By Means of Press Touch
CN201680016735.0A CN107851140B (zh) 2016-06-25 2016-06-25 利用压力触控生成密码的方法及装置
PCT/CN2016/087190 WO2017219376A1 (zh) 2016-06-25 2016-06-25 利用压力触控生成密码的方法及装置
EP16905916.9A EP3364326B1 (en) 2016-06-25 2016-06-25 Method and apparatus for generating password by means of pressure touch control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/087190 WO2017219376A1 (zh) 2016-06-25 2016-06-25 利用压力触控生成密码的方法及装置

Publications (1)

Publication Number Publication Date
WO2017219376A1 true WO2017219376A1 (zh) 2017-12-28

Family

ID=60783700

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/087190 WO2017219376A1 (zh) 2016-06-25 2016-06-25 利用压力触控生成密码的方法及装置

Country Status (4)

Country Link
US (1) US20180336339A1 (zh)
EP (1) EP3364326B1 (zh)
CN (1) CN107851140B (zh)
WO (1) WO2017219376A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111460533A (zh) * 2020-03-03 2020-07-28 张家口浩扬科技有限公司 一种防窥密码器及密码防窥方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB201612509D0 (en) * 2016-07-19 2016-08-31 Loughran Nick Messaging application
US10445519B2 (en) * 2017-08-29 2019-10-15 Blackberry Limited System and method for data input resistant to capture

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7305559B2 (en) 2002-12-19 2007-12-04 Lenovo Singapore Pte Ltd. Software method for improved password entry
CN102982269A (zh) 2012-10-25 2013-03-20 北京大学 基于生物计量特征的防偷窥密码认证方法及系统
US20130347101A1 (en) * 2011-06-01 2013-12-26 Huawei Device Co., Ltd Terminal Authentication Method and Device
CN105354458A (zh) * 2015-11-03 2016-02-24 广东欧珀移动通信有限公司 密码输入验证方法和系统
CN105426100A (zh) * 2015-10-30 2016-03-23 努比亚技术有限公司 基于压力传感器的密码输入方法和装置
CN105446622A (zh) * 2015-11-11 2016-03-30 北京京东尚科信息技术有限公司 增强型交易密码的输入方法和装置

Family Cites Families (48)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3440763B2 (ja) * 1996-10-25 2003-08-25 富士ゼロックス株式会社 暗号化装置、復号装置、機密データ処理装置、及び情報処理装置
KR100306277B1 (ko) * 1998-05-29 2001-11-02 윤종용 문자인식디지털휴대용전화기에서비밀기호등록및확인방법
FR2784530B1 (fr) * 1998-10-08 2000-11-10 Cit Alcatel Procede de protection d'un terminal de radiocummunication contre un usage non autorise
US6603984B2 (en) * 2000-05-16 2003-08-05 At&T Wireless Services, Inc. Methods and systems for managing information on wireless data devices
US7502936B2 (en) * 2001-02-14 2009-03-10 Jsm Technologies, L.L.C. System and method providing secure access to a computer system
CA2460836A1 (en) * 2001-09-18 2003-03-27 Karen Gourgey Tactile graphic-based interactive overlay assembly and computer system for the visually impaired
WO2003069489A1 (fr) * 2002-02-14 2003-08-21 Tanaka, Yoshiki Procede d'authentification
US7367053B2 (en) * 2002-10-11 2008-04-29 Yamatake Corporation Password strength checking method and apparatus and program and recording medium thereof, password creation assisting method and program thereof, and password creating method and program thereof
US20080177994A1 (en) * 2003-01-12 2008-07-24 Yaron Mayer System and method for improving the efficiency, comfort, and/or reliability in Operating Systems, such as for example Windows
US6871288B2 (en) * 2003-02-21 2005-03-22 Ronald K. Russikoff Computerized password verification system and method for ATM transactions
US7948938B2 (en) * 2004-04-30 2011-05-24 Research In Motion Limited Wireless communication device with duress password protection and related method
WO2006013521A2 (en) * 2004-08-02 2006-02-09 Koninklijke Philips Electronics N.V. Touch screen slider for setting floating point value
US7536583B2 (en) * 2005-10-14 2009-05-19 Symantec Operating Corporation Technique for timeline compression in a data store
US9002750B1 (en) * 2005-12-09 2015-04-07 Citicorp Credit Services, Inc. (Usa) Methods and systems for secure user authentication
US9768963B2 (en) * 2005-12-09 2017-09-19 Citicorp Credit Services, Inc. (Usa) Methods and systems for secure user authentication
US20080235788A1 (en) * 2007-03-23 2008-09-25 University Of Ottawa Haptic-based graphical password
US8683582B2 (en) * 2008-06-16 2014-03-25 Qualcomm Incorporated Method and system for graphical passcode security
US20100039393A1 (en) * 2008-08-15 2010-02-18 At&T Intellectual Property I, L.P. Text entry on touch screen cellphones by different pressure levels
US8326358B2 (en) * 2009-01-30 2012-12-04 Research In Motion Limited System and method for access control in a portable electronic device
US9521142B2 (en) * 2009-02-03 2016-12-13 Inbay Technologies Inc. System and method for generating passwords using key inputs and contextual inputs
US9672335B2 (en) * 2009-12-17 2017-06-06 Laird H Shuart Cognitive-based logon process for computing device
CA2734427C (en) * 2010-03-19 2018-05-08 Xavier Pierre-Emmanuel Saynac Systems and methods for determining the location and pressure of a touchload applied to a touchpad
US8536978B2 (en) * 2010-11-19 2013-09-17 Blackberry Limited Detection of duress condition at a communication device
US20120144460A1 (en) * 2010-12-07 2012-06-07 Netanel Raisch Methods and devices for access authenication on a computer
GB201105774D0 (en) * 2011-04-05 2011-05-18 Visa Europe Ltd Payment system
GB201106943D0 (en) * 2011-04-27 2011-06-01 Burkill Vance Improvements in or relating to password generation, recall and protection
CN102841696B (zh) * 2011-06-24 2015-07-29 国基电子(上海)有限公司 电子设备及其输入密码的方法
US8145913B1 (en) * 2011-08-30 2012-03-27 Kaspersky Lab Zao System and method for password protection
TWI474703B (zh) * 2011-09-30 2015-02-21 Ibm 提供時間比例式密碼/盤問鑑定的方法與電腦裝置
JP2013084029A (ja) * 2011-10-06 2013-05-09 Sony Corp 表示制御装置
US9262603B2 (en) * 2011-10-21 2016-02-16 International Business Machines Corporation Advanced authentication technology for computing devices
EP3287176A3 (en) * 2012-01-31 2018-05-30 Smart Skin Technologies Inc. Pressure mapping and orientation sensing system
SG194267A1 (en) * 2012-05-03 2013-11-29 C3S Pte Ltd Method and system for protecting a password during an authentication process
US8942431B2 (en) * 2012-06-24 2015-01-27 Neurologix Security Group Inc Biometrics based methods and systems for user authentication
US20140180856A1 (en) * 2012-12-21 2014-06-26 Research In Motion Limited System providing wireless network access responsive to completed transaction payment and related methods
US9060057B1 (en) * 2013-03-07 2015-06-16 Serdar Artun Danis Systems and methods for caller ID authentication, spoof detection and list based call handling
US9332119B1 (en) * 2013-03-07 2016-05-03 Serdar Artun Danis Systems and methods for call destination authenticaiton and call forwarding detection
US20150046993A1 (en) * 2013-08-07 2015-02-12 Leo ARCEO Password authentication method and system
US9342673B2 (en) * 2014-03-26 2016-05-17 Motorola Solutions, Inc. Method for user authentication in a device comprising a touch screen
US10146330B2 (en) * 2014-06-18 2018-12-04 Matthew Swan Lawrence Systems and methods for character and command input
US9489663B2 (en) * 2014-09-30 2016-11-08 Sap Keypad for the entry of authentication data
US9870485B2 (en) * 2014-11-12 2018-01-16 Nec Corporation System and method for detecting sensitive user input leakages in software applications
US20160188855A1 (en) * 2014-12-26 2016-06-30 Michael Ara Bezjian Secure PIN Entry
JP6547577B2 (ja) * 2015-10-15 2019-07-24 富士通株式会社 検査装置、検査プログラムおよび検査方法
US20170140135A1 (en) * 2015-11-16 2017-05-18 Le Holdings (Beijing) Co., Ltd. Password input method, terminal appartus and electronic device
JP6746361B2 (ja) * 2016-04-14 2020-08-26 キヤノン株式会社 情報処理装置、その制御方法、及びプログラム
US10248781B2 (en) * 2016-05-16 2019-04-02 Blackberry Limited Method of passcode unlock using force detection
US20190100152A1 (en) * 2017-10-02 2019-04-04 Panasonic Avionics Corporation Entertainment system and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7305559B2 (en) 2002-12-19 2007-12-04 Lenovo Singapore Pte Ltd. Software method for improved password entry
US20130347101A1 (en) * 2011-06-01 2013-12-26 Huawei Device Co., Ltd Terminal Authentication Method and Device
CN102982269A (zh) 2012-10-25 2013-03-20 北京大学 基于生物计量特征的防偷窥密码认证方法及系统
CN105426100A (zh) * 2015-10-30 2016-03-23 努比亚技术有限公司 基于压力传感器的密码输入方法和装置
CN105354458A (zh) * 2015-11-03 2016-02-24 广东欧珀移动通信有限公司 密码输入验证方法和系统
CN105446622A (zh) * 2015-11-11 2016-03-30 北京京东尚科信息技术有限公司 增强型交易密码的输入方法和装置

Non-Patent Citations (1)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111460533A (zh) * 2020-03-03 2020-07-28 张家口浩扬科技有限公司 一种防窥密码器及密码防窥方法

Also Published As

Publication number Publication date
EP3364326A4 (en) 2018-11-14
EP3364326B1 (en) 2020-05-13
CN107851140B (zh) 2020-11-10
EP3364326A1 (en) 2018-08-22
CN107851140A (zh) 2018-03-27
US20180336339A1 (en) 2018-11-22

Similar Documents

Publication Publication Date Title
US11574041B2 (en) User interface for managing access to credentials for use in an operation
US11675476B2 (en) User interfaces for widgets
US11829720B2 (en) Analysis and validation of language models
US11899895B2 (en) User interfaces for setting up an electronic device
US11636192B2 (en) Secure login with authentication based on a visual representation of data
US11663309B2 (en) Digital identification credential user interfaces
US11556631B2 (en) User interfaces for managing user account passwords
US11601419B2 (en) User interfaces for accessing an account
US11703996B2 (en) User input interfaces
WO2020006669A1 (zh) 一种图标切换方法、显示gui的方法及电子设备
US20230089689A1 (en) User interfaces for digital identification
WO2017219376A1 (zh) 利用压力触控生成密码的方法及装置
US11983702B2 (en) Displaying a representation of a card with a layered structure
US20230394128A1 (en) Digital identification credential user interfaces
US20240020367A1 (en) Method for Performing Biometric Feature Authentication When Multiple Application Interfaces are Simultaneously Displayed
US11995171B2 (en) User interface for managing access to credentials for use in an operation
US20230084751A1 (en) User interfaces for managing passwords
AU2022235545B2 (en) User interfaces for digital identification
US20240104188A1 (en) Digital identification credential user interfaces

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 15776025

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE