WO2017036345A1 - 一种信息输入方法和装置 - Google Patents

一种信息输入方法和装置 Download PDF

Info

Publication number
WO2017036345A1
WO2017036345A1 PCT/CN2016/096787 CN2016096787W WO2017036345A1 WO 2017036345 A1 WO2017036345 A1 WO 2017036345A1 CN 2016096787 W CN2016096787 W CN 2016096787W WO 2017036345 A1 WO2017036345 A1 WO 2017036345A1
Authority
WO
WIPO (PCT)
Prior art keywords
input
environment
secret information
module
keyboard
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2016/096787
Other languages
English (en)
French (fr)
Inventor
严跃
程刚
乔丽莎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Publication of WO2017036345A1 publication Critical patent/WO2017036345A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/82Protecting input, output or interconnection devices
    • G06F21/83Protecting input, output or interconnection devices input devices, e.g. keyboards, mice or controllers thereof
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements

Definitions

  • the present invention relates to the field of computer application technologies, and in particular, to an information input method and apparatus.
  • the present invention provides a method and apparatus for information input to improve the security of information input such as passwords.
  • the invention provides a method for information input, the method comprising:
  • the security input keyboard is activated and the security protection function is activated;
  • the interface of the screen capture and/or the screen capture is prohibited after the security protection function is activated.
  • an input environment for identifying confidential information includes:
  • the attribute of the input box is obtained, and the input environment of the secret information is identified according to the attribute of the input box.
  • the input environment for identifying the secret information according to the attribute of the input box includes:
  • the attribute value of the input box indicates the password password attribute
  • the input environment of the secret information is identified.
  • the security input keyboard is a password keyboard that is included in the system.
  • the method further includes:
  • the default input method keyboard is activated.
  • the method before the security input keyboard is activated and the security protection function is activated, the method further includes:
  • the method further includes:
  • the interface for prohibiting the invoking of the screen capture and/or the screen recording comprises:
  • the interface for prohibiting the invoking of the screen capture and/or the screen recording by setting the flag flag of the system window includes:
  • the flag of the window is set to flag_secure by the WindowManager.LayoutParams parameter.
  • the method further includes:
  • the secure input keyboard After identifying the input environment exiting the secret information, the secure input keyboard is closed and the security protection function is turned off.
  • the input environment for identifying the exit of the secret information includes:
  • the invention also provides an apparatus for information input, the apparatus comprising:
  • An environment identification module for identifying an input environment
  • a function startup module configured to start a security input keyboard and activate a security protection module when the environment identification module recognizes an input environment of the secret information
  • the security protection module is configured to prohibit an interface for invoking a screen capture and/or a screen recording after startup.
  • the environment identification module is configured to: after detecting that the input box obtains the focus, acquire the attribute of the input box, and identify the secret information according to the attribute of the input box. Enter the environment.
  • the environment recognition module when the environment identification module identifies the input environment of the secret information according to the attribute of the input box, the environment recognition module specifically executes:
  • the attribute value of the input box indicates the password password attribute
  • the input environment of the secret information is identified.
  • the security input keyboard is a password keyboard that is included in the system.
  • the function activation module is further configured to activate a default input method keyboard when the environment recognition module recognizes an input environment of non-confidential information.
  • the device further comprises:
  • a determining module configured to determine, when the environment identification module identifies an input environment of the secret information, whether the input environment of the secret information belongs to a legal application
  • the function startup module executes the operation of starting the security input keyboard and starting the security protection module when the determination result of the determination module is YES.
  • the function starting module is further configured to prohibit starting any input method keyboard when the judgment result of the determining module is negative, and/or prompting the user to have an input risk.
  • the function startup module specifically executes when the interface of the screen capture and/or the screen capture is prohibited from being invoked:
  • the function execution module specifically executes:
  • the flag of the window is set to flag_secure by the WindowManager.LayoutParams parameter.
  • the device further comprises:
  • a function closing module configured to close the security input keyboard and close the security protection module after the environment identification module recognizes an input environment that exits the secret information.
  • the environment recognition module after detecting that the input box loses focus, the environment recognition module identifies an input environment for exiting the secret information.
  • the present invention activates the security input keyboard and activates the security protection module to recognize the interface of the screen capture and/or the screen recording when the input environment of the secret information is recognized.
  • the security input keyboard uses a secure input keyboard to prevent malware from stealing information by listening to the keyboard.
  • security protection to prevent malware from stealing information through screen capture or screen recording, and improve confidential information such as passwords. Input security.
  • FIG. 1 is a flowchart of a method according to an embodiment of the present invention
  • FIG. 2a is a schematic diagram of an application interface according to an embodiment of the present invention.
  • FIG. 2b is a diagram showing an example of a non-confidential information input scenario on the application interface shown in FIG. 2a;
  • FIG. 2c is a diagram showing an example of an input scenario of secret information on the application interface shown in FIG. 2a;
  • FIG. 3 is a structural diagram of a device according to an embodiment of the present invention.
  • the core idea of the present invention is to activate a secure input keyboard and activate a security protection function when the input environment of the secret information is recognized, wherein the interface of the screen capture and/or the screen recording is prohibited after the security protection function is activated. This process is mainly performed at the system level.
  • the identification of the input environment is mainly to judge the input component of this type, that is, the input environment for identifying the confidential information according to the attribute of the input box. For other types of components, if there is also a security requirement, it can be handled in a similar manner.
  • an input environment for identifying confidential information may be identified depending on the attributes of the button (eg, the button's text attribute indicates a button such as "login” or "register”). The following embodiments are described by taking an input box as an example.
  • the identification of the input environment can be judged from the page in addition to the component. For example, for a page that needs security protection, an execution function (JavaScript) can be inserted in advance, and the page is actively issued when the execution function is executed. Information that requires security. Once the information is received, the input environment identifying the page as confidential information is identified.
  • JavaScript JavaScript
  • FIG. 1 is a flowchart of a method according to an embodiment of the present invention. As shown in FIG. 1, the process may include the following steps:
  • the attribute of the input box is obtained.
  • an onfocus event is generated, so if the onfocus event generated by the input box component is captured, it is determined that the input box is detected to be in focus.
  • the input box component has a certain type, and if the type value is indicated as a password attribute, the input box is used for password input, which belongs to the input environment of the secret information involved in the present invention.
  • the present invention is not limited to password input, and can also be used for inputting other secret information.
  • the type value may also indicate other attributes, or a type value may be defined in advance to indicate the need. Enter the confidential information. In the embodiment of the present invention, only the password input is taken as an example for description.
  • the judgment of this step is actually an input environment for judging whether the input environment is confidential information.
  • the default input keyboard here can be a third-party input method set by the user, or it can be the input method that comes with the system.
  • This step is to determine whether the input environment of the confidential information is a legitimate application.
  • the legal application information may be preset in a whitelist manner, or some illegal application information may be preset by using a blacklist. Then, the input box is obtained.
  • Application information such as one or any combination of the package name, version, size, etc. of the application, and then using a preset whitelist or blacklist to determine the Whether the application information is legal.
  • the method for judging the validity of the application is only an example. In an actual application, the application may be determined in a plurality of manners, for example, obtaining the publisher information of the application, and determining the blacklist or whitelist of the application publisher.
  • the software scans the application to determine whether the application is legal. If the scan finds that the application has an illegal call to the system function, the application is considered illegal.
  • the main purpose of performing step 104 is to further improve the security of information input. If it is an illegal application, the information input security protection can be further enhanced (as described in step 105 below). Therefore, the present application does not determine whether the application is determined.
  • the legal method is specifically limited. According to the actual situation, the legal or illegal judgment methods of various applications can be defined, and will not be enumerated here.
  • the application in which the input box is located is an illegal application
  • the application may be at risk of stealing user information. It is forbidden to activate any input method keyboard so that the user cannot continue to input information, thereby ensuring that the confidential information is not stolen. Prompting the user to have an input risk may also cause the user to no longer input information, thereby ensuring that the confidential information is not stolen. Therefore, it is possible to adopt any one of prohibiting the activation of any input method keyboard and prompting the user to have an input risk, or as shown in this step, two processes are simultaneously employed.
  • the secure input keyboard is activated and the security protection function is activated.
  • the security input keyboard activated in this step can be the password keyboard that comes with the system, or it can be a third-party input method keyboard that has been safely verified and confirmed to be secure.
  • the security feature is a system-level feature that, when launched, prohibits any application from invoking the screen capture and/or screen capture interface, and also prohibits any other system-level functions from invoking screenshots and/or screen capture commands and/or screen captures and/or Screen recording interface.
  • the security protection function can disable the interface of the screen capture and/or the screen capture by acquiring the system window and setting the flag of the system window.
  • the get system window can pass the function getWindow() is implemented to get the current system window.
  • Setting the flag of the system window can be implemented by the function setFlags() or addFlags().
  • the flag of the window can be set to flag_secure through the WindowManager.LayoutParams parameter. which is:
  • the security input keyboard is turned off and the security protection function is turned off.
  • the security protection function can be turned off, so that the screen capture software or the screen recording software can restore the function, so that the screen capture and screen recording functions are shielded only when the secret information is input, thereby minimizing the normal function of the screen capture software or the screen recording software.
  • the foregoing manner provided by the embodiments of the present invention may be applied to a mobile device, and may also be applied to a fixed device such as a PC.
  • a page as shown in FIG. 2a appears in the application A, and the user needs to fill in the content in the input box corresponding to each item.
  • the information such as the user name, email address, and delivery address are not confidential, and only the password is information that needs to be kept secret.
  • the user clicks on the input box corresponding to the user name it is determined according to the attribute of the input box that the password attribute is not indicated, so the default input method keyboard is directly started, as shown in FIG. 2b.
  • the password attribute is determined according to the attribute of the input box, that is, the input environment of the secret information, and the information of the application A is further obtained, for example, the package name, version number, size, and the like of the application A, Compare with each application information in the preset whitelist, and add to determine that the application A is a legitimate application, then start the system's own password keyboard and activate the security protection function, as shown in Figure 2c.
  • the screen capture and screen recording functions are disabled.
  • FIG. 3 is a structural diagram of a device according to an embodiment of the present invention. As shown in FIG. 3, the device may include The environment identification module 01, the function startup module 02, and the security protection module 03 may further include a determination module 04 and a function shutdown module 05.
  • the main functions of each component are as follows:
  • the environment identification module 01 is responsible for recognizing the input environment.
  • the identification of the input environment is mainly to judge the component of the input frame, that is, the input environment for identifying the confidential information according to the attribute of the input box. For other types of components, if there is also a security requirement, it can be handled in a similar manner.
  • the environment identification module 01 may acquire the attribute of the input box after detecting that the input box obtains the focus, and identify the input environment of the secret information according to the attribute of the input box. If the attribute value of the input box indicates the password attribute, the input environment of the secret information is identified. Wherein, when the user clicks on the input box to prepare for input, an onfocus event is generated, so if the onfocus event generated by the input box component is captured, it is determined that the input box is detected to obtain the focus.
  • the present invention is not limited to password input, and can also be used for inputting other secret information. If the input box is used for inputting other secret information, the attribute value may also correspond to other attributes.
  • the function startup module 02 is responsible for starting the security input keyboard and starting the security protection module when the environment identification module 01 recognizes the input environment of the secret information.
  • the security input keyboard can be the password keyboard that comes with the system, or it can be a third-party input method keyboard that has been safely verified and confirmed to be secure.
  • the function launch module 02 can activate a default input method keyboard. For example, if the current input box is not used to input a password, no additional security protection is required, and the default input method is used for information input, so the default input method keyboard is started.
  • the default input keyboard here can be a third-party input method set by the user, or it can be the input method that comes with the system.
  • the security protection module 03 is responsible for prohibiting the call screen and/or screen recording interface from being activated after startup.
  • the security protection module 03 is a system-level module that, upon startup, prohibits any application from invoking an interface for screen capture and/or screen recording, and also prohibits any other system-level module from invoking a screen capture and/or after receiving a screen capture and/or screen recording command. / or screen recording interface.
  • the determining module 04 may first determine whether the input environment of the secret information belongs to a legitimate application.
  • the function startup module 02 performs an operation of starting the security input keyboard and starting the security protection module 03;
  • the judgment result of the judgment module 04 is NO, the function start module 02 prohibits starting any input method keyboard, and/or prompts the user to have an input risk.
  • the determining unit 04 may preset some legal application information by using a white list in advance, or preset some illegal application information by using a blacklist manner; and then obtain an application where the input box is located.
  • the information for example, one or any combination of the package name, version, size, and the like of the application, and then uses the preset whitelist or blacklist to determine whether the application information is legal.
  • the function startup module 02 can acquire the system window when the interface for capturing the screen capture and/or the screen recording is prohibited, and the interface of the screen capture and/or the screen capture is prohibited by setting the flag flag of the system window.
  • the get system window can be implemented by the function getWindow() to get the current system window.
  • Setting the flag of the system window can be implemented by the function setFlags() or addFlags(). In the specific setting, the flag of the window can be set to flag_secure through the WindowManager.LayoutParams parameter. which is:
  • the environment recognition module 01 recognizes the input environment for exiting the secret information, for example, the environment recognition module 01 detects that the input box loses focus, and recognizes the input environment for exiting the secret information.
  • the function closing module 05 can close the security input keyboard, and can close the security protection module, so that the screen capture software or the screen recording software can restore the function, so that the screen capture and the screen recording function are actually blocked only when the secret information is input. Minimize the impact on the normal function of screen capture software or screen recording software.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division, and the actual implementation may have another division manner.
  • each functional unit in various embodiments of the present invention may be integrated in one processing unit
  • each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the above software functional unit is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the methods of the various embodiments of the present invention. Part of the steps.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Virology (AREA)
  • User Interface Of Digital Computer (AREA)
  • Input From Keyboards Or The Like (AREA)
  • Document Processing Apparatus (AREA)

Abstract

一种信息输入的方法和装置,其中方法包括:识别出保密信息的输入环境时,启动安全输入键盘并启动安全防护功能;其中所述安全防护功能启动后禁止调用截屏和/或录屏的接口。该方法在识别出保密信息的输入环境时,启动安全输入键盘并启动安全防护模块,以禁止调用截屏和/或录屏的接口,从而避免恶意软件通过截屏或录屏的方式窃取信息,提高了诸如密码等保密信息的输入安全性。

Description

一种信息输入方法和装置 【技术领域】
本发明涉及计算机应用技术领域,特别涉及一种信息输入方法和装置。
【背景技术】
目前,移动设备正在成为网络攻击的主要对象,各种钓鱼应用、免费的wifi等各种不良软件在移动设备中窃取着用户信息。然而用户在使用移动设备时,常常需要输入一些需要保密的信息,例如密码,那么如何保证这些信息的安全输入亟待解决。现有的解决方式主要是在进行密码输入时,调用系统自带的输入法,而不使用第三方输入法。然而这种方式只能在一定程度上避免恶意软件通过监听输入键盘的方式窃取密码。
【发明内容】
有鉴于此,本发明提供了一种信息输入的方法和装置,以便于提高诸如密码等信息输入的安全性。
具体技术方案如下:
本发明提供了一种信息输入的方法,该方法包括:
识别出保密信息的输入环境时,启动安全输入键盘并启动安全防护功能;
其中所述安全防护功能启动后禁止调用截屏和/或录屏的接口。
根据本发明一优选实施方式,识别保密信息的输入环境包括:
检测到输入框获得焦点后,获取所述输入框的属性,依据所述输入框的属性识别保密信息的输入环境。
根据本发明一优选实施方式,所述依据所述输入框的属性识别保密信息的输入环境包括:
如果所述输入框的属性值指示密码password属性,则识别出保密信息的输入环境。
根据本发明一优选实施方式,所述安全输入键盘为系统自带的密码键盘。
根据本发明一优选实施方式,该方法还包括:
识别出非保密信息的输入环境时,启动默认的输入法键盘。
根据本发明一优选实施方式,在所述启动安全输入键盘并启动安全防护功能之前,还包括:
判断所述保密信息的输入环境是否属于合法应用,如果是,则继续执行所述启动安全输入键盘并启动安全防护功能的步骤。
根据本发明一优选实施方式,该方法还包括:
如果判断出所述保密信息的输入环境不属于合法应用,则禁止启动任何输入法键盘,和/或提示用户存在输入风险。
根据本发明一优选实施方式,所述禁止调用截屏和/或录屏的接口包括:
获取系统窗口,通过设置系统窗口的标志flag来禁止调用截屏和/或录屏的接口。
根据本发明一优选实施方式,通过设置系统窗口的标志flag来禁止调用截屏和/或录屏的接口包括:
通过WindowManager.LayoutParams参数设置窗口的flag为flag_secure。
根据本发明一优选实施方式,该方法还包括:
识别出退出所述保密信息的输入环境后,关闭所述安全输入键盘并关闭所述安全防护功能。
根据本发明一优选实施方式,识别退出所述保密信息的输入环境包括:
检测到输入框失去焦点后,识别出退出所述保密信息的输入环境。
本发明还提供了一种信息输入的装置,该装置包括:
环境识别模块,用于识别输入环境;
功能启动模块,用于在所述环境识别模块识别出保密信息的输入环境时,启动安全输入键盘并启动安全防护模块;
所述安全防护模块,用于在启动后禁止调用截屏和/或录屏的接口。
根据本发明一优选实施方式,所述环境识别模块,具体用于检测到输入框获得焦点后,获取所述输入框的属性,依据所述输入框的属性识别保密信息的 输入环境。
根据本发明一优选实施方式,所述环境识别模块在依据所述输入框的属性识别保密信息的输入环境时,具体执行:
如果所述输入框的属性值指示密码password属性,则识别出保密信息的输入环境。
根据本发明一优选实施方式,所述安全输入键盘为系统自带的密码键盘。
根据本发明一优选实施方式,所述功能启动模块,还用于在所述环境识别模块识别出非保密信息的输入环境时,启动默认的输入法键盘。
根据本发明一优选实施方式,该装置还包括:
判断模块,用于在所述环境识别模块识别出保密信息的输入环境时,判断所述保密信息的输入环境是否属于合法应用;
所述功能启动模块在所述判断模块的判断结果为是时,执行所述启动安全输入键盘并启动安全防护模块的操作。
根据本发明一优选实施方式,所述功能启动模块还用于在所述判断模块的判断结果为否时,禁止启动任何输入法键盘,和/或提示用户存在输入风险。
根据本发明一优选实施方式,所述功能启动模块在禁止调用截屏和/或录屏的接口时,具体执行:
获取系统窗口,通过设置系统窗口的标志flag来禁止调用截屏和/或录屏的接口。
根据本发明一优选实施方式,所述功能启动模块在通过设置系统窗口的标志flag来禁止调用截屏和/或录屏的接口时,具体执行:
通过WindowManager.LayoutParams参数设置窗口的flag为flag_secure。
根据本发明一优选实施方式,该装置还包括:
功能关闭模块,用于在所述环境识别模块识别出退出所述保密信息的输入环境后,关闭所述安全输入键盘并关闭所述安全防护模块。
根据本发明一优选实施方式,所述环境识别模块检测到输入框失去焦点后,识别出退出所述保密信息的输入环境。
由以上技术方案可以看出,本发明在识别出保密信息的输入环境时,启动安全输入键盘并启动安全防护模块,以禁止调用截屏和/或录屏的接口。一方面,使用安全输入键盘,以避免恶意软件通过监听键盘的方式窃取信息,另一方面,启动安全防护功能,以避免恶意软件通过截屏或录屏的方式窃取信息,提高了诸如密码等保密信息的输入安全性。
【附图说明】
图1为本发明实施例所提供的方法流程图;
图2a为本发明实施例提供的一个应用界面的实例图;
图2b为图2a所示应用界面上的非保密信息输入场景的实例图;
图2c为图2a所示应用界面上的保密信息的输入场景的实例图;
图3为本发明实施例提供的装置结构图。
【具体实施方式】
为了使本发明的目的、技术方案和优点更加清楚,下面结合附图和具体实施例对本发明进行详细描述。
本发明的核心思想在于,在识别出保密信息的输入环境时,启动安全输入键盘并启动安全防护功能,其中安全防护功能启动后禁止调用截屏和/或录屏的接口。这一处理过程主要在系统级别执行。
对输入环境的识别主要是对输入框这种类型的组件进行判断,即依据输入框的属性识别保密信息的输入环境。对于其他类型组件,如果也存在保密需求,也可以采用类似方式进行处理。例如,对于按钮类型的组件,可以依据按钮的属性(例如按钮的text属性表明为“登录”或“注册”等按钮)识别保密信息的输入环境。下面的实施例均以输入框为例进行描述。
对输入环境的识别除了依据组件进行判断之外,还可以从页面进行判断,例如对于需要进行安全防护的页面,可以预先插入一个执行功能(JavaScript),当该执行功能执行时会主动发出该页面需要安全防护的信息。 一旦接收到该信息,则识别出该页面为保密信息的输入环境。
图1为本发明实施例所提供的方法流程图,如图1中所示,该流程可以包括以下步骤:
在101中,检测到输入框获得焦点后,获取输入框的属性。
当用户点击输入框准备进行输入时,会产生onfocus事件,因此,如果捕捉到输入框组件产生的onfocus事件,则确定检测到输入框获得焦点。
输入框组件具有一定的type(属性),其中如果type值指示为password(密码)属性,则说明该输入框用于进行密码输入,属于本发明中涉及的保密信息的输入环境。当然,本发明并不限于密码输入,也可以用于其他保密信息的输入,如果输入框用于其他保密信息的输入,则type值也可以对应指示其他属性,也可以预先定义一个type值指示需要进行保密信息的输入。在本发明实施例中仅以密码输入为例进行描述。
在102中,判断输入框的属性值是否指示password属性,如果否,执行103;如果是,执行104。
本步骤的判断实际上就是判断该输入环境是否为保密信息的输入环境。
在103中,启动默认的输入法键盘,结束当前流程。
如果当前输入框并非用于输入密码,即是非保密信息的输入环境,则无需进行额外的安全防护,采用默认的输入法进行信息输入即可,因此启动默认的输入法键盘,从而可以在没有必要进行安全保护的情况下,保留用户的使用习惯,提高用户的输入效率。在此处默认的输入法键盘可以是用户设置的第三方输入法,也可以是系统自带的输入法。
在104中,判断该输入框所在的应用是否属于合法应用,如果否,执行105;如果是,执行106。
本步骤是对保密信息的输入环境是否为合法应用进行的判断,可以预先通过白名单的方式预设一些合法应用信息,或者通过黑名单的方式预设一些非法应用信息;然后获取该输入框所在的应用信息,例如应用的包名、版本、大小等信息中的一种或任意组合,然后利用预设的白名单或黑名单来判断该 应用信息是否合法。此处,对于应用合法性判断的方式仅为举例,实际应用中,可以通过多种方式确定应用是否合法,例如,获取应用的发布商信息,根据应用发布商的黑名单或白名单,确定该应用是否合法;或者,获取该应用的评价信息,根据该应用的评价信息的好坏,确定该应用是否合法;或者,由用户设置哪些应用作为合法应用;或者由系统安全中心或安装的安全防护软件,扫描应用以确定应用是否合法,若扫描发现应用存在对系统功能的非法调用等,则认为应用不合法。执行步骤104的主要目的在于:进一步提高信息输入的安全性,如果是非法应用,则可以进一步加强信息输入安全保护(如下述步骤105所述的方式),因此,本申请并不对如何判断应用是否合法的方式进行具体限定,根据实际情况,可以定义各种应用合法或非法的判断方式,此处不再一一列举。
在105中,禁止启动任何输入法键盘,提示用户存在输入风险,结束当前流程。
如果输入框所在的应用为非法应用,那么该应用就可能有窃取用户信息的风险。禁止启动任何输入法键盘使得用户无法继续进行信息输入,从而保证保密信息不被窃取。提示用户存在输入风险也可以使得用户不再进行信息输入,从而保证保密信息不被窃取。因此可以采取禁止启动任何输入法键盘以及提示用户存在输入风险中的任一种处理,也可以如本步骤所示,同时采用两种处理。
在106中,启动安全输入键盘并启动安全防护功能。
本步骤中启动的安全输入键盘可以是系统自带的密码键盘,也可以是已经经过安全验证并确认安全的第三方输入法键盘。
安全防护功能是一个系统级的功能,其启动后会禁止任何应用调用截屏和/或录屏的接口,也禁止任何其他系统级的功能接收到截屏和/或录屏命令后调用截屏和/或录屏的接口。
具体地,安全防护功能可以通过获取系统窗口,并设置系统窗口的flag(标志)来禁止调用截屏和/或录屏的接口。其中获取系统窗口可以通过函数 getWindow()来实现,从而获取当前的系统窗口。设置系统窗口的flag可以通过函数setFlags()或者addFlags()来实现,在具体设置时,可以通过WindowManager.LayoutParams参数设置窗口的flag为flag_secure。即:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE)或者
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,0)
在107中,检测到该输入框失去焦点后,关闭安全输入键盘并关闭安全防护功能。
检测到输入框失去焦点,说明退出保密信息的输入环境,无需继续进行安全输入的保护,因此可以关闭安全输入键盘,恢复使用默认的输入法键盘。可以关闭安全防护功能,使得截屏软件或者录屏软件可以恢复功能,这样实际上仅在保密信息输入时,屏蔽掉了截屏和录屏功能,最大程度地降低对截屏软件或者录屏软件的正常功能所造成的影响。
需要说明的是,本发明实施例提供的上述方式可以应用于移动设备,也可以应用于诸如PC等固定设备。以手机为例举一个实例,假设在应用A中出现如图2a中所示的页面,用户需要在各项目对应的输入框中填写内容。其中用户名、邮箱、收货地址这些信息都是不需要保密的,只有密码是需要保密的信息。例如,当用户点击用户名对应的输入框时,根据输入框的属性确定并非指示password属性,因此直接启动默认的输入法键盘,如图2b中所示。当用户点击密码对应的输入框时,根据输入框的属性确定指示password属性,即是保密信息的输入环境,则进一步获取应用A的信息,例如应用A的包名、版本号、大小等信息,与预置的白名单中的各项应用信息进行比较,加入确定该应用A为合法应用,则启动系统自带的密码键盘并启动安全防护功能,如图2c中所示。在用户输入密码的过程中禁止截屏和录屏功能,当用户完成密码的输入后,该密码对应的输入框失去焦点,则关闭系统自带的密码键盘并关闭安全防护功能。
图3为本发明实施例提供的装置结构图,如图3中所示,该装置可以包 括:环境识别模块01、功能启动模块02和安全防护模块03,还可以包括判断模块04和功能关闭模块05。各组成单元的主要功能如下:
环境识别模块01负责识别输入环境,对输入环境的识别主要是对输入框这种类型的组件进行判断,即依据输入框的属性识别保密信息的输入环境。对于其他类型组件,如果也存在保密需求,也可以采用类似方式进行处理。
具体地,环境识别模块01可以在检测到输入框获得焦点后,获取输入框的属性,依据输入框的属性识别保密信息的输入环境。如果输入框的属性值指示password属性,则识别出保密信息的输入环境。其中,当用户点击输入框准备进行输入时,会产生onfocus事件,因此,如果捕捉到输入框组件产生的onfocus事件,则确定检测到输入框获得焦点。当然,本发明并不限于密码输入,也可以用于其他保密信息的输入,如果输入框用于其他保密信息的输入,则属性值也可以对应指示其他属性。
功能启动模块02负责在环境识别模块01识别出保密信息的输入环境时,启动安全输入键盘并启动安全防护模块。其中,安全输入键盘可以为系统自带的密码键盘,也可以是已经过安全验证并确认安全的第三方输入法键盘。
如果环境识别模块01识别出非保密信息的输入环境,则功能启动模块02可以启动默认的输入法键盘。例如当前输入框并非用于输入密码,则无需进行额外的安全防护,采用默认的输入法进行信息输入即可,因此启动默认的输入法键盘。在此处默认的输入法键盘可以是用户设置的第三方输入法,也可以是系统自带的输入法。
安全防护模块03负责在启动后禁止调用截屏和/或录屏的接口。该安全防护模块03是一个系统级的模块,其启动后会禁止任何应用调用截屏和/或录屏的接口,也禁止任何其他系统级的模块接收到截屏和/或录屏命令后调用截屏和/或录屏的接口。
另外,在环境识别模块01识别出保密信息的输入环境时,判断模块04可以首先判断保密信息的输入环境是否属于合法应用。在判断模块04的判断结果为是时,功能启动模块02执行启动安全输入键盘并启动安全防护模块03的操作; 在判断模块04的判断结果为否时,功能启动模块02禁止启动任何输入法键盘,和/或提示用户存在输入风险。
判断单元04在判断保密信息的输入环境是否属于合法应用时,可以预先通过白名单的方式预设一些合法应用信息,或者通过黑名单的方式预设一些非法应用信息;然后获取输入框所在的应用信息,例如应用的包名、版本、大小等信息中的一种或任意组合,然后利用预设的白名单或黑名单来判断该应用信息是否合法。
功能启动模块02在禁止调用截屏和/或录屏的接口时,可以获取系统窗口,通过设置系统窗口的标志flag来禁止调用截屏和/或录屏的接口。其中获取系统窗口可以通过函数getWindow()来实现,从而获取当前的系统窗口。设置系统窗口的flag可以通过函数setFlags()或者addFlags()来实现,在具体设置时,可以通过WindowManager.LayoutParams参数设置窗口的flag为flag_secure。即:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE)或者
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,0)
在环境识别模块01识别出退出保密信息的输入环境后,例如环境识别模块01检测到输入框失去焦点后,识别出退出保密信息的输入环境。此时,功能关闭模块05可以关闭安全输入键盘,并且可以关闭安全防护模块,使得截屏软件或者录屏软件可以恢复功能,这样实际上仅在保密信息输入时,屏蔽掉了截屏和录屏功能,最大程度地降低对截屏软件或者录屏软件的正常功能所造成的影响。
在本发明所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元 中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明保护的范围之内。

Claims (22)

  1. 一种信息输入的方法,其特征在于,该方法包括:
    识别出保密信息的输入环境时,启动安全输入键盘并启动安全防护功能;
    其中所述安全防护模块启动后禁止调用截屏和/或录屏的接口。
  2. 根据权利要求1所述的方法,其特征在于,识别保密信息的输入环境包括:
    检测到输入框获得焦点后,获取所述输入框的属性,依据所述输入框的属性识别保密信息的输入环境。
  3. 根据权利要求2所述的方法,其特征在于,依据所述输入框的属性识别保密信息的输入环境包括:
    如果所述输入框的属性值指示密码password属性,则识别出保密信息的输入环境。
  4. 根据权利要求1所述的方法,其特征在于,所述安全输入键盘为系统自带的密码键盘。
  5. 根据权利要求1至4任一权项所述的方法,其特征在于,该方法还包括:
    识别出非保密信息的输入环境时,启动默认的输入法键盘。
  6. 根据权利要求1至4任一权项所述的方法,其特征在于,在所述启动安全输入键盘并启动安全防护功能之前,还包括:
    判断所述保密信息的输入环境是否属于合法应用,如果是,则继续执行所述启动安全输入键盘并启动安全防护功能的步骤。
  7. 根据权利要求6所述的方法,其特征在于,该方法还包括:
    如果判断出所述保密信息的输入环境不属于合法应用,则禁止启动任何输入法键盘,和/或提示用户存在输入风险。
  8. 根据权利要求1至4任一权项所述的方法,其特征在于,所述禁止调用截屏和/或录屏的接口包括:
    获取系统窗口,通过设置系统窗口的标志flag来禁止调用截屏和/或录屏的 接口。
  9. 根据权利要求8所述的方法,其特征在于,通过设置系统窗口的标志flag来禁止调用截屏和/或录屏的接口包括:
    通过WindowManager.LayoutParams参数设置窗口的flag为flag_secure。
  10. 根据权利要求1至4任一权项所述的方法,其特征在于,该方法还包括:
    识别出退出所述保密信息的输入环境后,关闭所述安全输入键盘并关闭所述安全防护功能。
  11. 根据权利要求10所述的方法,其特征在于,识别退出所述保密信息的输入环境包括:
    检测到输入框失去焦点后,识别出退出所述保密信息的输入环境。
  12. 一种信息输入的装置,其特征在于,该装置包括:
    环境识别模块,用于识别输入环境;
    功能启动模块,用于在所述环境识别模块识别出保密信息的输入环境时,启动安全输入键盘并启动安全防护模块;
    所述安全防护模块,用于在启动后禁止调用截屏和/或录屏的接口。
  13. 根据权利要求12所述的装置,其特征在于,所述环境识别模块,具体用于检测到输入框获得焦点后,获取所述输入框的属性,依据所述输入框的属性识别保密信息的输入环境。
  14. 根据权利要求13所述的装置,其特征在于,所述环境识别模块在依据所述输入框的属性识别保密信息的输入环境时,具体执行:
    如果所述输入框的属性值指示密码password属性,则识别出保密信息的输入环境。
  15. 根据权利要求12所述的装置,其特征在于,所述安全输入键盘为系统自带的密码键盘。
  16. 根据权利要求12至15任一权项所述装置,其特征在于,所述功能启动模块,还用于在所述环境识别模块识别出非保密信息的输入环境时,启动默认 的输入法键盘。
  17. 根据权利要求12至15任一权项所述装置,其特征在于,该装置还包括:
    判断模块,用于在所述环境识别模块识别出保密信息的输入环境时,判断所述保密信息的输入环境是否属于合法应用;
    所述功能启动模块在所述判断模块的判断结果为是时,执行所述启动安全输入键盘并启动安全防护模块的操作。
  18. 根据权利要求17所述的装置,其特征在于,所述功能启动模块还用于在所述判断模块的判断结果为否时,禁止启动任何输入法键盘,和/或提示用户存在输入风险。
  19. 根据权利要求12至15任一权项所述装置,其特征在于,所述功能启动模块在禁止调用截屏和/或录屏的接口时,具体执行:
    获取系统窗口,通过设置系统窗口的标志flag来禁止调用截屏和/或录屏的接口。
  20. 根据权利要求18所述的装置,其特征在于,所述功能启动模块在通过设置系统窗口的标志flag来禁止调用截屏和/或录屏的接口时,具体执行:
    通过WindowManager.LayoutParams参数设置窗口的flag为flag_secure。
  21. 根据权利要求12至15任一权项所述装置,其特征在于,该装置还包括:
    功能关闭模块,用于在所述环境识别模块识别出退出所述保密信息的输入环境后,关闭所述安全输入键盘并关闭所述安全防护模块。
  22. 根据权利要求21所述的装置,其特征在于,所述环境识别模块检测到输入框失去焦点后,识别出退出所述保密信息的输入环境。
PCT/CN2016/096787 2015-09-02 2016-08-25 一种信息输入方法和装置 Ceased WO2017036345A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510552192.1 2015-09-02
CN201510552192.1A CN106485170A (zh) 2015-09-02 2015-09-02 一种信息输入方法和装置

Publications (1)

Publication Number Publication Date
WO2017036345A1 true WO2017036345A1 (zh) 2017-03-09

Family

ID=58186700

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/096787 Ceased WO2017036345A1 (zh) 2015-09-02 2016-08-25 一种信息输入方法和装置

Country Status (2)

Country Link
CN (1) CN106485170A (zh)
WO (1) WO2017036345A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114612272A (zh) * 2022-03-14 2022-06-10 黑龙江省格趣科技有限公司 一种基于信息安全大数据的安全防护系统及方法
CN115167747A (zh) * 2021-03-18 2022-10-11 华为技术有限公司 截屏方法、电子设备及存储介质

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107180204A (zh) * 2017-07-04 2017-09-19 惠州Tcl移动通信有限公司 一种防止信息被盗的方法、存储设备及移动终端
CN108133137B (zh) * 2017-12-13 2021-11-23 北京奇虎科技有限公司 智能终端中的界面安全性检测方法和装置
CN108664804A (zh) * 2018-05-22 2018-10-16 深圳乐信软件技术有限公司 一种信息的输入方法、装置、终端及存储介质
CN111310248B (zh) * 2020-01-22 2022-07-01 维沃移动通信有限公司 隐私保护方法及电子设备
CN115730301A (zh) * 2021-08-30 2023-03-03 北京小米移动软件有限公司 信息输入方法、信息输入装置及存储介质
CN115185448A (zh) * 2022-07-21 2022-10-14 中国银行股份有限公司 虚拟数字键盘的布局生成方法、装置、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103076988A (zh) * 2012-12-28 2013-05-01 银联商务有限公司 一种密码输入方法及装置
US20140101772A1 (en) * 2012-10-05 2014-04-10 Panasonic Corporation Input method, input apparatus, and input program
CN103853993A (zh) * 2014-03-26 2014-06-11 联想(北京)有限公司 一种信息处理方法及电子设备
CN104281272A (zh) * 2013-07-11 2015-01-14 北京数码视讯科技股份有限公司 密码输入处理方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8151324B2 (en) * 2007-03-16 2012-04-03 Lloyd Leon Burch Remotable information cards
CN103268447B (zh) * 2013-05-10 2016-03-02 广东欧珀移动通信有限公司 一种防钓鱼方法及系统
CN104281950A (zh) * 2013-07-11 2015-01-14 腾讯科技(深圳)有限公司 提高电子支付安全性的方法及装置
CN104899528A (zh) * 2015-05-06 2015-09-09 深圳市小兵智能科技有限公司 基于触摸屏的安全输入方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140101772A1 (en) * 2012-10-05 2014-04-10 Panasonic Corporation Input method, input apparatus, and input program
CN103076988A (zh) * 2012-12-28 2013-05-01 银联商务有限公司 一种密码输入方法及装置
CN104281272A (zh) * 2013-07-11 2015-01-14 北京数码视讯科技股份有限公司 密码输入处理方法及装置
CN103853993A (zh) * 2014-03-26 2014-06-11 联想(北京)有限公司 一种信息处理方法及电子设备

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115167747A (zh) * 2021-03-18 2022-10-11 华为技术有限公司 截屏方法、电子设备及存储介质
CN114612272A (zh) * 2022-03-14 2022-06-10 黑龙江省格趣科技有限公司 一种基于信息安全大数据的安全防护系统及方法
CN114612272B (zh) * 2022-03-14 2022-10-14 黑龙江省格趣科技有限公司 一种基于信息安全大数据的安全防护系统及方法

Also Published As

Publication number Publication date
CN106485170A (zh) 2017-03-08

Similar Documents

Publication Publication Date Title
US10788984B2 (en) Method, device, and system for displaying user interface
WO2017036345A1 (zh) 一种信息输入方法和装置
US10791126B2 (en) System and methods for protecting users from malicious content
CN102880820B (zh) 一种移动终端应用程序访问方法及移动终端
CN113315637B (zh) 安全认证方法、装置及存储介质
CN104268476B (zh) 一种运行应用程序的方法
WO2014121714A1 (zh) 一种通知栏消息的处理方法、装置和系统
EP3422238A1 (en) Detecting a malware process
CN105844470A (zh) 支付方法及装置
US20170169213A1 (en) Electronic device and method for running applications in different security environments
CN106778208A (zh) 应用程序的访问处理方法及装置
CN104820805B (zh) 一种用户身份识别卡信息防盗的方法及装置
WO2017084569A1 (zh) 在智能终端中获取登陆凭证的方法、智能终端以及操作系统
CN106897629A (zh) 终端应用的控制方法及终端
EP3683702A1 (en) Method and apparatus for securely calling fingerprint information, and mobile terminal
CN104298924B (zh) 确保系统安全的方法、确保系统安全的装置和终端
CN113836529A (zh) 进程检测方法、装置、存储介质以及计算机设备
CN105227521A (zh) 通信终端及其安全管理方法、装置
WO2016180234A1 (zh) 一种安全环境构建方法和装置
CN106529232A (zh) 开机启动方法及装置
CN105306691A (zh) 一种个人信息的保护方法及终端
CN105631666B (zh) 安全移动支付方法、安全移动支付系统和终端
TW201828142A (zh) 資訊輸入方法和裝置
WO2016026333A1 (zh) 终端连接pc时的数据保护方法及装置、存储介质
CN111601038B (zh) 一种摄像头的控制方法及装置、电子终端及存储介质

Legal Events

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

Ref document number: 16840774

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16840774

Country of ref document: EP

Kind code of ref document: A1