WO2017036345A1 - Information input method and device - Google Patents

Information input method and device 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
Application number
PCT/CN2016/096787
Other languages
French (fr)
Chinese (zh)
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 阿里巴巴集团控股有限公司
Publication of WO2017036345A1 publication Critical patent/WO2017036345A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/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; CALCULATING OR 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; CALCULATING OR 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. .

Abstract

An information input method and device. The method comprises: when an input environment of confidential information is detected, activating a secured input keyboard and enabling a security protection function, wherein when the security protection function is enabled, the calling of interfaces for screen capturing and/or screen recording is prohibited. When the input environment of confidential information is detected, the method activates the secured input keyboard and a security protection module to prohibit the calling of the interfaces for screen capturing and/or screen recording, thereby preventing malware from stealing information by screen capturing or recording and improving security when inputting confidential information such as passwords.

Description

一种信息输入方法和装置Information input method and device 【技术领域】[Technical Field]
本发明涉及计算机应用技术领域,特别涉及一种信息输入方法和装置。The present invention relates to the field of computer application technologies, and in particular, to an information input method and apparatus.
【背景技术】【Background technique】
目前,移动设备正在成为网络攻击的主要对象,各种钓鱼应用、免费的wifi等各种不良软件在移动设备中窃取着用户信息。然而用户在使用移动设备时,常常需要输入一些需要保密的信息,例如密码,那么如何保证这些信息的安全输入亟待解决。现有的解决方式主要是在进行密码输入时,调用系统自带的输入法,而不使用第三方输入法。然而这种方式只能在一定程度上避免恶意软件通过监听输入键盘的方式窃取密码。At present, mobile devices are becoming the main target of cyber attacks. Various phishing applications, free wifi and other bad software steal user information in mobile devices. However, when users use mobile devices, they often need to input some information that needs to be kept secret, such as passwords. How to ensure the security input of these information needs to be solved. The existing solution is mainly to call the input method of the system when the password is input, instead of using the third-party input method. However, this method can only prevent malware from stealing passwords by listening to the input keyboard to a certain extent.
【发明内容】[Summary of the Invention]
有鉴于此,本发明提供了一种信息输入的方法和装置,以便于提高诸如密码等信息输入的安全性。In view of this, the present invention provides a method and apparatus for information input to improve the security of information input such as passwords.
具体技术方案如下:The specific technical solutions are as follows:
本发明提供了一种信息输入的方法,该方法包括:The invention provides a method for information input, the method comprising:
识别出保密信息的输入环境时,启动安全输入键盘并启动安全防护功能;When the input environment of the secret information is recognized, 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.
根据本发明一优选实施方式,识别保密信息的输入环境包括:According to a preferred embodiment of the present invention, an input environment for identifying confidential information includes:
检测到输入框获得焦点后,获取所述输入框的属性,依据所述输入框的属性识别保密信息的输入环境。After detecting that the input box obtains the focus, 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.
根据本发明一优选实施方式,所述依据所述输入框的属性识别保密信息的输入环境包括:According to a preferred embodiment of the present invention, the input environment for identifying the secret information according to the attribute of the input box includes:
如果所述输入框的属性值指示密码password属性,则识别出保密信息的输入环境。If the attribute value of the input box indicates the password password attribute, the input environment of the secret information is identified.
根据本发明一优选实施方式,所述安全输入键盘为系统自带的密码键盘。 According to a preferred embodiment of the present invention, the security input keyboard is a password keyboard that is included in the system.
根据本发明一优选实施方式,该方法还包括:According to a preferred embodiment of the present invention, the method further includes:
识别出非保密信息的输入环境时,启动默认的输入法键盘。When the input environment for non-confidential information is recognized, the default input method keyboard is activated.
根据本发明一优选实施方式,在所述启动安全输入键盘并启动安全防护功能之前,还包括:According to a preferred embodiment of the present invention, before the security input keyboard is activated and the security protection function is activated, the method further includes:
判断所述保密信息的输入环境是否属于合法应用,如果是,则继续执行所述启动安全输入键盘并启动安全防护功能的步骤。Determining whether the input environment of the secret information belongs to a legitimate application, and if so, continuing to perform the step of starting the secure input keyboard and starting the security protection function.
根据本发明一优选实施方式,该方法还包括:According to a preferred embodiment of the present invention, the method further includes:
如果判断出所述保密信息的输入环境不属于合法应用,则禁止启动任何输入法键盘,和/或提示用户存在输入风险。If it is determined that the input environment of the secret information is not a legitimate application, it is prohibited to activate any input method keyboard, and/or prompt the user to have an input risk.
根据本发明一优选实施方式,所述禁止调用截屏和/或录屏的接口包括:According to a preferred embodiment of the present invention, the interface for prohibiting the invoking of the screen capture and/or the screen recording comprises:
获取系统窗口,通过设置系统窗口的标志flag来禁止调用截屏和/或录屏的接口。Get the system window and disable the interface for capturing screenshots and/or screens by setting the flag flag of the system window.
根据本发明一优选实施方式,通过设置系统窗口的标志flag来禁止调用截屏和/或录屏的接口包括:According to a preferred embodiment of the present invention, 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:
通过WindowManager.LayoutParams参数设置窗口的flag为flag_secure。The flag of the window is set to flag_secure by the WindowManager.LayoutParams parameter.
根据本发明一优选实施方式,该方法还包括:According to a preferred embodiment of the present invention, the method further includes:
识别出退出所述保密信息的输入环境后,关闭所述安全输入键盘并关闭所述安全防护功能。After identifying the input environment exiting the secret information, the secure input keyboard is closed and the security protection function is turned off.
根据本发明一优选实施方式,识别退出所述保密信息的输入环境包括:According to a preferred embodiment of the present invention, the input environment for identifying the exit of the secret information includes:
检测到输入框失去焦点后,识别出退出所述保密信息的输入环境。After detecting that the input box loses focus, an input environment that exits the secret information is identified.
本发明还提供了一种信息输入的装置,该装置包括: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.
根据本发明一优选实施方式,所述环境识别模块,具体用于检测到输入框获得焦点后,获取所述输入框的属性,依据所述输入框的属性识别保密信息的 输入环境。According to a preferred embodiment of the present invention, 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.
根据本发明一优选实施方式,所述环境识别模块在依据所述输入框的属性识别保密信息的输入环境时,具体执行:According to a preferred embodiment of the present invention, 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:
如果所述输入框的属性值指示密码password属性,则识别出保密信息的输入环境。If the attribute value of the input box indicates the password password attribute, the input environment of the secret information is identified.
根据本发明一优选实施方式,所述安全输入键盘为系统自带的密码键盘。According to a preferred embodiment of the present invention, the security input keyboard is a password keyboard that is included in the system.
根据本发明一优选实施方式,所述功能启动模块,还用于在所述环境识别模块识别出非保密信息的输入环境时,启动默认的输入法键盘。According to a preferred embodiment of the present invention, 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.
根据本发明一优选实施方式,该装置还包括:According to a preferred embodiment of the present invention, 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.
根据本发明一优选实施方式,所述功能启动模块还用于在所述判断模块的判断结果为否时,禁止启动任何输入法键盘,和/或提示用户存在输入风险。According to a preferred embodiment of the present invention, 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.
根据本发明一优选实施方式,所述功能启动模块在禁止调用截屏和/或录屏的接口时,具体执行:According to a preferred embodiment of the present invention, the function startup module specifically executes when the interface of the screen capture and/or the screen capture is prohibited from being invoked:
获取系统窗口,通过设置系统窗口的标志flag来禁止调用截屏和/或录屏的接口。Get the system window and disable the interface for capturing screenshots and/or screens by setting the flag flag of the system window.
根据本发明一优选实施方式,所述功能启动模块在通过设置系统窗口的标志flag来禁止调用截屏和/或录屏的接口时,具体执行:According to a preferred embodiment of the present invention, when the function startup module prohibits invoking the interface of the screen capture and/or the screen recording by setting the flag flag of the system window, the function execution module specifically executes:
通过WindowManager.LayoutParams参数设置窗口的flag为flag_secure。The flag of the window is set to flag_secure by the WindowManager.LayoutParams parameter.
根据本发明一优选实施方式,该装置还包括:According to a preferred embodiment of the present invention, the device further comprises:
功能关闭模块,用于在所述环境识别模块识别出退出所述保密信息的输入环境后,关闭所述安全输入键盘并关闭所述安全防护模块。And 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.
根据本发明一优选实施方式,所述环境识别模块检测到输入框失去焦点后,识别出退出所述保密信息的输入环境。 According to a preferred embodiment of the present invention, after detecting that the input box loses focus, the environment recognition module identifies an input environment for exiting the secret information.
由以上技术方案可以看出,本发明在识别出保密信息的输入环境时,启动安全输入键盘并启动安全防护模块,以禁止调用截屏和/或录屏的接口。一方面,使用安全输入键盘,以避免恶意软件通过监听键盘的方式窃取信息,另一方面,启动安全防护功能,以避免恶意软件通过截屏或录屏的方式窃取信息,提高了诸如密码等保密信息的输入安全性。It can be seen from the above technical solution that 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. On the one hand, use a secure input keyboard to prevent malware from stealing information by listening to the keyboard. On the other hand, activate security protection to prevent malware from stealing information through screen capture or screen recording, and improve confidential information such as passwords. Input security.
【附图说明】[Description of the Drawings]
图1为本发明实施例所提供的方法流程图;FIG. 1 is a flowchart of a method according to an embodiment of the present invention;
图2a为本发明实施例提供的一个应用界面的实例图;2a is a schematic diagram of an application interface according to an embodiment of the present invention;
图2b为图2a所示应用界面上的非保密信息输入场景的实例图;2b is a diagram showing an example of a non-confidential information input scenario on the application interface shown in FIG. 2a;
图2c为图2a所示应用界面上的保密信息的输入场景的实例图;2c is a diagram showing an example of an input scenario of secret information on the application interface shown in FIG. 2a;
图3为本发明实施例提供的装置结构图。FIG. 3 is a structural diagram of a device according to an embodiment of the present invention.
【具体实施方式】【detailed description】
为了使本发明的目的、技术方案和优点更加清楚,下面结合附图和具体实施例对本发明进行详细描述。The present invention will be described in detail below with reference to the drawings and specific embodiments.
本发明的核心思想在于,在识别出保密信息的输入环境时,启动安全输入键盘并启动安全防护功能,其中安全防护功能启动后禁止调用截屏和/或录屏的接口。这一处理过程主要在系统级别执行。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.
对输入环境的识别主要是对输入框这种类型的组件进行判断,即依据输入框的属性识别保密信息的输入环境。对于其他类型组件,如果也存在保密需求,也可以采用类似方式进行处理。例如,对于按钮类型的组件,可以依据按钮的属性(例如按钮的text属性表明为“登录”或“注册”等按钮)识别保密信息的输入环境。下面的实施例均以输入框为例进行描述。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. For example, for a button type component, 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.
对输入环境的识别除了依据组件进行判断之外,还可以从页面进行判断,例如对于需要进行安全防护的页面,可以预先插入一个执行功能(JavaScript),当该执行功能执行时会主动发出该页面需要安全防护的信息。 一旦接收到该信息,则识别出该页面为保密信息的输入环境。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.
图1为本发明实施例所提供的方法流程图,如图1中所示,该流程可以包括以下步骤: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:
在101中,检测到输入框获得焦点后,获取输入框的属性。In 101, after detecting that the input box has obtained the focus, the attribute of the input box is obtained.
当用户点击输入框准备进行输入时,会产生onfocus事件,因此,如果捕捉到输入框组件产生的onfocus事件,则确定检测到输入框获得焦点。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 be in focus.
输入框组件具有一定的type(属性),其中如果type值指示为password(密码)属性,则说明该输入框用于进行密码输入,属于本发明中涉及的保密信息的输入环境。当然,本发明并不限于密码输入,也可以用于其他保密信息的输入,如果输入框用于其他保密信息的输入,则type值也可以对应指示其他属性,也可以预先定义一个type值指示需要进行保密信息的输入。在本发明实施例中仅以密码输入为例进行描述。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. Of course, 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 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.
在102中,判断输入框的属性值是否指示password属性,如果否,执行103;如果是,执行104。In 102, it is determined whether the attribute value of the input box indicates the password attribute, and if not, execution 103; if yes, execute 104.
本步骤的判断实际上就是判断该输入环境是否为保密信息的输入环境。The judgment of this step is actually an input environment for judging whether the input environment is confidential information.
在103中,启动默认的输入法键盘,结束当前流程。In 103, the default input keyboard is activated, ending the current process.
如果当前输入框并非用于输入密码,即是非保密信息的输入环境,则无需进行额外的安全防护,采用默认的输入法进行信息输入即可,因此启动默认的输入法键盘,从而可以在没有必要进行安全保护的情况下,保留用户的使用习惯,提高用户的输入效率。在此处默认的输入法键盘可以是用户设置的第三方输入法,也可以是系统自带的输入法。If the current input box is not used to enter a password, that is, an input environment for non-confidential information, no additional security protection is required, and the default input method is used for information input, so the default input method keyboard is activated, so that it is unnecessary In the case of security protection, the user's usage habits are retained and the user's input efficiency is improved. 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.
在104中,判断该输入框所在的应用是否属于合法应用,如果否,执行105;如果是,执行106。In 104, it is determined whether the application in which the input box is located belongs to a legitimate application, and if not, executes 105; if yes, executes 106.
本步骤是对保密信息的输入环境是否为合法应用进行的判断,可以预先通过白名单的方式预设一些合法应用信息,或者通过黑名单的方式预设一些非法应用信息;然后获取该输入框所在的应用信息,例如应用的包名、版本、大小等信息中的一种或任意组合,然后利用预设的白名单或黑名单来判断该 应用信息是否合法。此处,对于应用合法性判断的方式仅为举例,实际应用中,可以通过多种方式确定应用是否合法,例如,获取应用的发布商信息,根据应用发布商的黑名单或白名单,确定该应用是否合法;或者,获取该应用的评价信息,根据该应用的评价信息的好坏,确定该应用是否合法;或者,由用户设置哪些应用作为合法应用;或者由系统安全中心或安装的安全防护软件,扫描应用以确定应用是否合法,若扫描发现应用存在对系统功能的非法调用等,则认为应用不合法。执行步骤104的主要目的在于:进一步提高信息输入的安全性,如果是非法应用,则可以进一步加强信息输入安全保护(如下述步骤105所述的方式),因此,本申请并不对如何判断应用是否合法的方式进行具体限定,根据实际情况,可以定义各种应用合法或非法的判断方式,此处不再一一列举。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. Here, 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. Whether the application is legal; or, obtaining the evaluation information of the application, determining whether the application is legal according to the evaluation information of the application; or determining which applications are used as legitimate applications by the user; or by the system security center or the installed security protection 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.
在105中,禁止启动任何输入法键盘,提示用户存在输入风险,结束当前流程。In 105, it is forbidden to start any input method keyboard, prompting the user to have input risks, and ending the current process.
如果输入框所在的应用为非法应用,那么该应用就可能有窃取用户信息的风险。禁止启动任何输入法键盘使得用户无法继续进行信息输入,从而保证保密信息不被窃取。提示用户存在输入风险也可以使得用户不再进行信息输入,从而保证保密信息不被窃取。因此可以采取禁止启动任何输入法键盘以及提示用户存在输入风险中的任一种处理,也可以如本步骤所示,同时采用两种处理。If 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.
在106中,启动安全输入键盘并启动安全防护功能。In 106, 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.
具体地,安全防护功能可以通过获取系统窗口,并设置系统窗口的flag(标志)来禁止调用截屏和/或录屏的接口。其中获取系统窗口可以通过函数 getWindow()来实现,从而获取当前的系统窗口。设置系统窗口的flag可以通过函数setFlags()或者addFlags()来实现,在具体设置时,可以通过WindowManager.LayoutParams参数设置窗口的flag为flag_secure。即:Specifically, 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. Where 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(). In the specific setting, the flag of the window can be set to flag_secure through the WindowManager.LayoutParams parameter. which is:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE)或者getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE) or
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,0)getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,0)
在107中,检测到该输入框失去焦点后,关闭安全输入键盘并关闭安全防护功能。In 107, after detecting that the input box loses focus, the security input keyboard is turned off and the security protection function is turned off.
检测到输入框失去焦点,说明退出保密信息的输入环境,无需继续进行安全输入的保护,因此可以关闭安全输入键盘,恢复使用默认的输入法键盘。可以关闭安全防护功能,使得截屏软件或者录屏软件可以恢复功能,这样实际上仅在保密信息输入时,屏蔽掉了截屏和录屏功能,最大程度地降低对截屏软件或者录屏软件的正常功能所造成的影响。It is detected that the input box loses focus, indicating that the input environment of the secret information is exited, and it is not necessary to continue the protection of the security input, so the safe input keyboard can be closed and the default input method keyboard can be restored. 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 impact.
需要说明的是,本发明实施例提供的上述方式可以应用于移动设备,也可以应用于诸如PC等固定设备。以手机为例举一个实例,假设在应用A中出现如图2a中所示的页面,用户需要在各项目对应的输入框中填写内容。其中用户名、邮箱、收货地址这些信息都是不需要保密的,只有密码是需要保密的信息。例如,当用户点击用户名对应的输入框时,根据输入框的属性确定并非指示password属性,因此直接启动默认的输入法键盘,如图2b中所示。当用户点击密码对应的输入框时,根据输入框的属性确定指示password属性,即是保密信息的输入环境,则进一步获取应用A的信息,例如应用A的包名、版本号、大小等信息,与预置的白名单中的各项应用信息进行比较,加入确定该应用A为合法应用,则启动系统自带的密码键盘并启动安全防护功能,如图2c中所示。在用户输入密码的过程中禁止截屏和录屏功能,当用户完成密码的输入后,该密码对应的输入框失去焦点,则关闭系统自带的密码键盘并关闭安全防护功能。It should be noted that 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. Taking the mobile phone as an example, it is assumed that 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. For example, when 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. When the user clicks the input box corresponding to the password, 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. In the process of user inputting a password, the screen capture and screen recording functions are disabled. When the user completes the password input, the input box corresponding to the password loses focus, then the system's own password keyboard is turned off and the security protection function is turned off.
图3为本发明实施例提供的装置结构图,如图3中所示,该装置可以包 括:环境识别模块01、功能启动模块02和安全防护模块03,还可以包括判断模块04和功能关闭模块05。各组成单元的主要功能如下: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:
环境识别模块01负责识别输入环境,对输入环境的识别主要是对输入框这种类型的组件进行判断,即依据输入框的属性识别保密信息的输入环境。对于其他类型组件,如果也存在保密需求,也可以采用类似方式进行处理。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.
具体地,环境识别模块01可以在检测到输入框获得焦点后,获取输入框的属性,依据输入框的属性识别保密信息的输入环境。如果输入框的属性值指示password属性,则识别出保密信息的输入环境。其中,当用户点击输入框准备进行输入时,会产生onfocus事件,因此,如果捕捉到输入框组件产生的onfocus事件,则确定检测到输入框获得焦点。当然,本发明并不限于密码输入,也可以用于其他保密信息的输入,如果输入框用于其他保密信息的输入,则属性值也可以对应指示其他属性。Specifically, 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. Of course, 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.
功能启动模块02负责在环境识别模块01识别出保密信息的输入环境时,启动安全输入键盘并启动安全防护模块。其中,安全输入键盘可以为系统自带的密码键盘,也可以是已经过安全验证并确认安全的第三方输入法键盘。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. Among them, 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.
如果环境识别模块01识别出非保密信息的输入环境,则功能启动模块02可以启动默认的输入法键盘。例如当前输入框并非用于输入密码,则无需进行额外的安全防护,采用默认的输入法进行信息输入即可,因此启动默认的输入法键盘。在此处默认的输入法键盘可以是用户设置的第三方输入法,也可以是系统自带的输入法。If the environment identification module 01 recognizes an input environment of non-confidential information, 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.
安全防护模块03负责在启动后禁止调用截屏和/或录屏的接口。该安全防护模块03是一个系统级的模块,其启动后会禁止任何应用调用截屏和/或录屏的接口,也禁止任何其他系统级的模块接收到截屏和/或录屏命令后调用截屏和/或录屏的接口。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.
另外,在环境识别模块01识别出保密信息的输入环境时,判断模块04可以首先判断保密信息的输入环境是否属于合法应用。在判断模块04的判断结果为是时,功能启动模块02执行启动安全输入键盘并启动安全防护模块03的操作; 在判断模块04的判断结果为否时,功能启动模块02禁止启动任何输入法键盘,和/或提示用户存在输入风险。In addition, when the environment identification module 01 recognizes the input environment of the secret information, the determining module 04 may first determine whether the input environment of the secret information belongs to a legitimate application. When the determination result of the determination module 04 is YES, the function startup module 02 performs an operation of starting the security input keyboard and starting the security protection module 03; When 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.
判断单元04在判断保密信息的输入环境是否属于合法应用时,可以预先通过白名单的方式预设一些合法应用信息,或者通过黑名单的方式预设一些非法应用信息;然后获取输入框所在的应用信息,例如应用的包名、版本、大小等信息中的一种或任意组合,然后利用预设的白名单或黑名单来判断该应用信息是否合法。When judging whether the input environment of the secret information is a legitimate application, 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.
功能启动模块02在禁止调用截屏和/或录屏的接口时,可以获取系统窗口,通过设置系统窗口的标志flag来禁止调用截屏和/或录屏的接口。其中获取系统窗口可以通过函数getWindow()来实现,从而获取当前的系统窗口。设置系统窗口的flag可以通过函数setFlags()或者addFlags()来实现,在具体设置时,可以通过WindowManager.LayoutParams参数设置窗口的flag为flag_secure。即: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:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE)或者getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE) or
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,0)getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,0)
在环境识别模块01识别出退出保密信息的输入环境后,例如环境识别模块01检测到输入框失去焦点后,识别出退出保密信息的输入环境。此时,功能关闭模块05可以关闭安全输入键盘,并且可以关闭安全防护模块,使得截屏软件或者录屏软件可以恢复功能,这样实际上仅在保密信息输入时,屏蔽掉了截屏和录屏功能,最大程度地降低对截屏软件或者录屏软件的正常功能所造成的影响。After 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. At this time, 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.
在本发明所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division, and the actual implementation may have another division manner.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元 中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in various embodiments of the present invention may be integrated in one processing unit In addition, 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.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。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. .
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明保护的范围之内。 The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalents, improvements, etc., which are made within the spirit and principles of the present invention, should be included in the present invention. Within the scope of protection.

Claims (22)

  1. 一种信息输入的方法,其特征在于,该方法包括:A method for inputting information, characterized in that the method comprises:
    识别出保密信息的输入环境时,启动安全输入键盘并启动安全防护功能;When the input environment of the secret information is recognized, 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 module is started.
  2. 根据权利要求1所述的方法,其特征在于,识别保密信息的输入环境包括:The method of claim 1 wherein the input environment for identifying the secret information comprises:
    检测到输入框获得焦点后,获取所述输入框的属性,依据所述输入框的属性识别保密信息的输入环境。After detecting that the input box obtains the focus, 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.
  3. 根据权利要求2所述的方法,其特征在于,依据所述输入框的属性识别保密信息的输入环境包括:The method according to claim 2, wherein the input environment for identifying the secret information according to the attribute of the input box comprises:
    如果所述输入框的属性值指示密码password属性,则识别出保密信息的输入环境。If the attribute value of the input box indicates the password password attribute, the input environment of the secret information is identified.
  4. 根据权利要求1所述的方法,其特征在于,所述安全输入键盘为系统自带的密码键盘。The method of claim 1 wherein said secure input keyboard is a cryptographic keyboard that is included with the system.
  5. 根据权利要求1至4任一权项所述的方法,其特征在于,该方法还包括:The method according to any one of claims 1 to 4, further comprising:
    识别出非保密信息的输入环境时,启动默认的输入法键盘。When the input environment for non-confidential information is recognized, the default input method keyboard is activated.
  6. 根据权利要求1至4任一权项所述的方法,其特征在于,在所述启动安全输入键盘并启动安全防护功能之前,还包括:The method according to any one of claims 1 to 4, further comprising: before the enabling the security input keyboard and starting the security protection function, the method further comprising:
    判断所述保密信息的输入环境是否属于合法应用,如果是,则继续执行所述启动安全输入键盘并启动安全防护功能的步骤。Determining whether the input environment of the secret information belongs to a legitimate application, and if so, continuing to perform the step of starting the secure input keyboard and starting the security protection function.
  7. 根据权利要求6所述的方法,其特征在于,该方法还包括:The method of claim 6 further comprising:
    如果判断出所述保密信息的输入环境不属于合法应用,则禁止启动任何输入法键盘,和/或提示用户存在输入风险。If it is determined that the input environment of the secret information is not a legitimate application, it is prohibited to activate any input method keyboard, and/or prompt the user to have an input risk.
  8. 根据权利要求1至4任一权项所述的方法,其特征在于,所述禁止调用截屏和/或录屏的接口包括:The method according to any one of claims 1 to 4, wherein the interface for prohibiting the invoking of the screen capture and/or the screen recording comprises:
    获取系统窗口,通过设置系统窗口的标志flag来禁止调用截屏和/或录屏的 接口。Get the system window, disable the call screen capture and / or screen capture by setting the flag flag of the system window interface.
  9. 根据权利要求8所述的方法,其特征在于,通过设置系统窗口的标志flag来禁止调用截屏和/或录屏的接口包括:The method according to claim 8, wherein the interface for prohibiting the invoking the screen capture and/or the screen recording by setting the flag flag of the system window comprises:
    通过WindowManager.LayoutParams参数设置窗口的flag为flag_secure。The flag of the window is set to flag_secure by the WindowManager.LayoutParams parameter.
  10. 根据权利要求1至4任一权项所述的方法,其特征在于,该方法还包括:The method according to any one of claims 1 to 4, further comprising:
    识别出退出所述保密信息的输入环境后,关闭所述安全输入键盘并关闭所述安全防护功能。After identifying the input environment exiting the secret information, the secure input keyboard is closed and the security protection function is turned off.
  11. 根据权利要求10所述的方法,其特征在于,识别退出所述保密信息的输入环境包括:The method of claim 10, wherein the identifying an input environment for exiting the secret information comprises:
    检测到输入框失去焦点后,识别出退出所述保密信息的输入环境。After detecting that the input box loses focus, an input environment that exits the secret information is identified.
  12. 一种信息输入的装置,其特征在于,该装置包括:A device for inputting information, characterized in that the device comprises:
    环境识别模块,用于识别输入环境;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.
  13. 根据权利要求12所述的装置,其特征在于,所述环境识别模块,具体用于检测到输入框获得焦点后,获取所述输入框的属性,依据所述输入框的属性识别保密信息的输入环境。The device according to claim 12, wherein 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 input of the secret information according to the attribute of the input box; surroundings.
  14. 根据权利要求13所述的装置,其特征在于,所述环境识别模块在依据所述输入框的属性识别保密信息的输入环境时,具体执行:The device according to claim 13, wherein the environment identification module performs: when the input environment of the secret information is identified according to the attribute of the input box, specifically:
    如果所述输入框的属性值指示密码password属性,则识别出保密信息的输入环境。If the attribute value of the input box indicates the password password attribute, the input environment of the secret information is identified.
  15. 根据权利要求12所述的装置,其特征在于,所述安全输入键盘为系统自带的密码键盘。The device according to claim 12, wherein the secure input keyboard is a PIN pad that is included in the system.
  16. 根据权利要求12至15任一权项所述装置,其特征在于,所述功能启动模块,还用于在所述环境识别模块识别出非保密信息的输入环境时,启动默认 的输入法键盘。The device according to any one of claims 12 to 15, wherein the function activation module is further configured to start a default when the environment recognition module recognizes an input environment of non-confidential information. Input method keyboard.
  17. 根据权利要求12至15任一权项所述装置,其特征在于,该装置还包括:The device according to any one of claims 12 to 15, wherein 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.
  18. 根据权利要求17所述的装置,其特征在于,所述功能启动模块还用于在所述判断模块的判断结果为否时,禁止启动任何输入法键盘,和/或提示用户存在输入风险。The device according to claim 17, wherein the function activation module is further configured to prohibit activation of any input method keyboard when the determination result of the determination module is negative, and/or prompt the user to have an input risk.
  19. 根据权利要求12至15任一权项所述装置,其特征在于,所述功能启动模块在禁止调用截屏和/或录屏的接口时,具体执行:The device according to any one of claims 12 to 15, wherein the function activation module performs: when the interface of the screen capture and/or the screen recording is prohibited from being invoked:
    获取系统窗口,通过设置系统窗口的标志flag来禁止调用截屏和/或录屏的接口。Get the system window and disable the interface for capturing screenshots and/or screens by setting the flag flag of the system window.
  20. 根据权利要求18所述的装置,其特征在于,所述功能启动模块在通过设置系统窗口的标志flag来禁止调用截屏和/或录屏的接口时,具体执行:The apparatus according to claim 18, wherein the function activation module performs: when the interface of the screen capture and/or the screen capture is prohibited by setting a flag flag of the system window, specifically:
    通过WindowManager.LayoutParams参数设置窗口的flag为flag_secure。The flag of the window is set to flag_secure by the WindowManager.LayoutParams parameter.
  21. 根据权利要求12至15任一权项所述装置,其特征在于,该装置还包括:The device according to any one of claims 12 to 15, wherein the device further comprises:
    功能关闭模块,用于在所述环境识别模块识别出退出所述保密信息的输入环境后,关闭所述安全输入键盘并关闭所述安全防护模块。And 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.
  22. 根据权利要求21所述的装置,其特征在于,所述环境识别模块检测到输入框失去焦点后,识别出退出所述保密信息的输入环境。 The device according to claim 21, wherein the environment recognition module detects that the input box loses focus, and recognizes an input environment for exiting the secret information.
PCT/CN2016/096787 2015-09-02 2016-08-25 Information input method and device WO2017036345A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510552192.1A CN106485170A (en) 2015-09-02 2015-09-02 A kind of data inputting method and device
CN201510552192.1 2015-09-02

Publications (1)

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

Family

ID=58186700

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/096787 WO2017036345A1 (en) 2015-09-02 2016-08-25 Information input method and device

Country Status (2)

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

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114612272A (en) * 2022-03-14 2022-06-10 黑龙江省格趣科技有限公司 Safety protection system and method based on big information safety data
CN115167747A (en) * 2021-03-18 2022-10-11 华为技术有限公司 Screen capturing method, electronic device and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107180204A (en) * 2017-07-04 2017-09-19 惠州Tcl移动通信有限公司 A kind of method, storage device and mobile terminal for preventing information stolen
CN108133137B (en) * 2017-12-13 2021-11-23 北京奇虎科技有限公司 Interface security detection method and device in intelligent terminal
CN108664804A (en) * 2018-05-22 2018-10-16 深圳乐信软件技术有限公司 A kind of input method of information, device, terminal and storage medium
CN111310248B (en) * 2020-01-22 2022-07-01 维沃移动通信有限公司 Privacy protection method and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103076988A (en) * 2012-12-28 2013-05-01 银联商务有限公司 Password input method and device
US20140101772A1 (en) * 2012-10-05 2014-04-10 Panasonic Corporation Input method, input apparatus, and input program
CN103853993A (en) * 2014-03-26 2014-06-11 联想(北京)有限公司 Information processing method and electronic equipment
CN104281272A (en) * 2013-07-11 2015-01-14 北京数码视讯科技股份有限公司 Password input processing method and device

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 (en) * 2013-05-10 2016-03-02 广东欧珀移动通信有限公司 A kind of anti-fishing method and system
CN104281950A (en) * 2013-07-11 2015-01-14 腾讯科技(深圳)有限公司 Method and device for improving electronic payment safety
CN104899528A (en) * 2015-05-06 2015-09-09 深圳市小兵智能科技有限公司 Touch screen based secure input method

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 (en) * 2012-12-28 2013-05-01 银联商务有限公司 Password input method and device
CN104281272A (en) * 2013-07-11 2015-01-14 北京数码视讯科技股份有限公司 Password input processing method and device
CN103853993A (en) * 2014-03-26 2014-06-11 联想(北京)有限公司 Information processing method and electronic equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115167747A (en) * 2021-03-18 2022-10-11 华为技术有限公司 Screen capturing method, electronic device and storage medium
CN114612272A (en) * 2022-03-14 2022-06-10 黑龙江省格趣科技有限公司 Safety protection system and method based on big information safety data
CN114612272B (en) * 2022-03-14 2022-10-14 黑龙江省格趣科技有限公司 Safety protection system and method based on big information safety data

Also Published As

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

Similar Documents

Publication Publication Date Title
US10788984B2 (en) Method, device, and system for displaying user interface
WO2017036345A1 (en) Information input method and device
US10791126B2 (en) System and methods for protecting users from malicious content
KR102307665B1 (en) identity authentication
CN112513857A (en) Personalized cryptographic security access control in a trusted execution environment
CN105519038B (en) User input data protection method and system
WO2014121714A1 (en) Notification-bar message processing method, device and system
US9516056B2 (en) Detecting a malware process
CN113315637B (en) Security authentication method, device and storage medium
WO2016015680A1 (en) Security detection method and security detection apparatus for mobile terminal input window
US20170169213A1 (en) Electronic device and method for running applications in different security environments
WO2017084569A1 (en) Method for acquiring login credential in smart terminal, smart terminal, and operating systems
US10713381B2 (en) Method and apparatus for securely calling fingerprint information, and mobile terminal
US20170201528A1 (en) Method for providing trusted service based on secure area and apparatus using the same
US9166797B2 (en) Secured compartment for transactions
WO2015066389A1 (en) Method and security system for network-enabled i/o devices
WO2016165537A1 (en) Method for controlling intelligent terminal and apparatus for controlling intelligent terminal
WO2016026333A1 (en) Data protection method, device and storage medium in connection between terminal and pc
WO2016183867A1 (en) Secure mobile payment method, system and terminal
Hutchinson et al. Forensic analysis of spy applications in android devices
TW201828142A (en) Information input method and device prohibiting the interface of screenshot and/or screen recording when the input environment of the secret information is recognized
CN111601038B (en) Camera control method and device, electronic terminal and storage medium
WO2016180234A1 (en) Method and apparatus for building secure environment
CN113836529A (en) Process detection method, device, storage medium and computer equipment
US10931690B1 (en) Thwarting potentially malicious online activity

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