HK40048714B - Method and apparatus for triggering identity verification in application program, device and storage medium - Google Patents
Method and apparatus for triggering identity verification in application program, device and storage medium Download PDFInfo
- Publication number
- HK40048714B HK40048714B HK42021038443.4A HK42021038443A HK40048714B HK 40048714 B HK40048714 B HK 40048714B HK 42021038443 A HK42021038443 A HK 42021038443A HK 40048714 B HK40048714 B HK 40048714B
- Authority
- HK
- Hong Kong
- Prior art keywords
- page
- authentication
- added
- application
- target
- Prior art date
Links
Description
技术领域Technical Field
本申请涉及计算机技术领域,特别涉及一种触发应用程序中身份验证的方法、装置、设备及存储介质。This application relates to the field of computer technology, and in particular to a method, apparatus, device, and storage medium for triggering authentication in an application.
背景技术Background Technology
随着互联网金融的发展,越来越多的应用程序涉及到用户的财产信息和财产安全,如银行应用程序、移动应用程序等。一般应用程序会设置用户身份验证的功能,以提高应用程序对用户财产安全的保障。With the development of internet finance, more and more applications involve users' financial information and security, such as banking applications and mobile applications. Generally, these applications include user authentication functions to enhance the protection of users' assets.
在现有技术中,技术人员会根据应用程序的业务功能,设置不同的身份验证触发条件,并在不同的业务功能的执行代码中写入对身份验证触发条件进行判断的代码,当应用程序要执行一些业务功能时,如用户点击了应用程序中的账户信息时,会首先执行对身份验证触发条件进行判断的代码,验证应用程序的状态信息是否满足身份验证触发条件。若满足身份验证触发条件,则应用程序会通过一些验证手段来验证当前操作应用程序的人员是否为用户本人,例如,弹出一个锁屏页面,让用户输入之前设定的验证密码,验证通过后,应用程序的相关业务功能程序才可继续执行。In existing technologies, technicians set different authentication trigger conditions based on the application's business functions, and write code to judge these conditions in the execution code of different business functions. When the application needs to perform certain business functions, such as when a user clicks on account information in the application, the code that judges the authentication trigger conditions will be executed first to verify whether the application's status information meets the authentication trigger conditions. If the authentication trigger conditions are met, the application will use some verification methods to verify whether the person currently operating the application is the user. For example, a lock screen page will pop up, prompting the user to enter a previously set verification password. Only after successful verification can the relevant business functions of the application continue to execute.
在实现本申请的过程中,发明人发现现有技术至少存在以下问题:In the process of developing this application, the inventors discovered that the prior art has at least the following problems:
技术人员需要在不同的业务功能的执行代码中写入对身份验证触发条件进行判断的语句,应用程序每添加一个业务功能,技术人员都要在业务功能的执行代码中编写相应的身份验证触发条件,导致技术人员编写代码的过程较为繁琐,效率较低。Technical staff need to write statements that judge the authentication trigger conditions in the execution code of different business functions. Every time a business function is added to the application, the technical staff have to write the corresponding authentication trigger conditions in the execution code of the business function, which makes the coding process cumbersome and inefficient.
发明内容Summary of the Invention
本申请实施例提供了一种触发应用程序中身份验证的方法、装置、设备及存储介质,能够解决技术人员在业务功能的执行代码中,编写相应的身份验证触发条件代码的过程繁琐、效率低下的问题。所述技术方案如下:This application provides a method, apparatus, device, and storage medium for triggering authentication in an application, which solves the problem of cumbersome and inefficient process for technicians to write corresponding authentication trigger condition code in the execution code of business functions. The technical solution is as follows:
一方面,提供了一种触发应用程序中身份验证的方法,所述方法包括:On the one hand, a method for triggering authentication in an application is provided, the method comprising:
在应用程序中,监测预设的页面集合中各页面的显示指令;Within the application, monitor the display instructions for each page in the preset set of pages;
当检测到目标页面的显示指令时,基于预先存储的所述应用程序的页面与身份验证触发条件的对应关系,确定所述目标页面对应的目标身份验证触发条件;When a display instruction for a target page is detected, the target authentication trigger condition corresponding to the target page is determined based on the pre-stored correspondence between the application's pages and authentication trigger conditions.
如果所述应用程序当前的状态信息满足所述目标身份验证触发条件,则进行用户身份验证处理。If the current state information of the application meets the target authentication triggering condition, then user authentication processing is performed.
可选的,所述如果所述应用程序当前的状态信息满足所述目标身份验证触发条件,则进行用户身份验证处理,包括:Optionally, the step of performing user authentication processing if the current state information of the application meets the target authentication triggering condition includes:
当所述目标页面对应有多个目标身份验证触发条件时,如果所述应用程序当前的状态信息满足所有目标身份验证触发条件,则进行用户身份验证处理。When the target page corresponds to multiple target authentication trigger conditions, if the current state information of the application meets all target authentication trigger conditions, then user authentication processing is performed.
可选的,所述方法还包括:Optionally, the method further includes:
接收更新请求,所述更新请求中携带有待添加的页面和对应的待添加的身份验证条件;Receive an update request, which carries the page to be added and the corresponding authentication conditions to be added;
确定所述页面集合中不包括所述待添加的页面;It is determined that the page to be added is not included in the page set;
将所述待添加的页面添加到所述页面集合中,并将所述待添加的页面和所述待添加的身份验证条件,对应的添加到所述对应关系中。The page to be added is added to the page set, and the page to be added and the authentication condition to be added are added to the corresponding relationship.
可选的,所述方法还包括:Optionally, the method further includes:
接收更新请求,所述更新请求中携带有待添加的页面和对应的待添加的身份验证条件;Receive an update request, which carries the page to be added and the corresponding authentication conditions to be added;
确定所述页面集合中包括所述待添加的页面;Determine that the page to be added is included in the page set;
在所述对应关系中,将所述待添加的页面对应的身份验证条件信息,修改为所述待添加的身份验证条件。In the correspondence, the authentication condition information corresponding to the page to be added is modified to the authentication condition to be added.
可选的,所述进行用户身份验证处理之后,所述方法还包括:Optionally, after performing user authentication processing, the method further includes:
如果用户身份验证通过,则显示所述目标页面,如果用户身份验证不通过,则拒绝显示所述目标页面。If the user's authentication is successful, the target page is displayed; if the user's authentication is unsuccessful, the target page is refused to be displayed.
另一方面,提供了一种触发应用程序中身份验证的装置,所述装置包括:On the other hand, an apparatus for triggering authentication in an application is provided, the apparatus comprising:
监测模块,被配置为在应用程序中,监测预设的页面集合中各页面的显示指令;The monitoring module is configured to monitor the display instructions of each page in a preset set of pages within the application.
确定模块,被配置为当检测到目标页面的显示指令时,基于预先存储的所述应用程序的页面与身份验证触发条件的对应关系,确定所述目标页面对应的目标身份验证触发条件;The determination module is configured to, when a display instruction for a target page is detected, determine the target authentication trigger condition corresponding to the target page based on a pre-stored correspondence between pages of the application and authentication trigger conditions.
处理模块,被配置为如果所述应用程序当前的状态信息满足所述目标身份验证触发条件,则进行用户身份验证处理。The processing module is configured to perform user authentication processing if the current state information of the application meets the target authentication triggering condition.
可选的,所述处理模块,被配置为:Optionally, the processing module is configured as follows:
当所述目标页面对应有多个目标身份验证触发条件时,如果所述应用程序当前的状态信息满足所有目标身份验证触发条件,则进行用户身份验证处理。When the target page corresponds to multiple target authentication trigger conditions, if the current state information of the application meets all target authentication trigger conditions, then user authentication processing is performed.
可选的,所述装置还包括第一更新模块,被配置为:Optionally, the device further includes a first update module configured to:
接收更新请求,所述更新请求中携带有待添加的页面和对应的待添加的身份验证条件;Receive an update request, which carries the page to be added and the corresponding authentication conditions to be added;
确定所述页面集合中不包括所述待添加的页面;It is determined that the page to be added is not included in the page set;
将所述待添加的页面添加到所述页面集合中,并将所述待添加的页面和所述待添加的身份验证条件,对应的添加到所述对应关系中。The page to be added is added to the page set, and the page to be added and the authentication condition to be added are added to the corresponding relationship.
可选的,所述装置还包括第二更新模块,被配置为:Optionally, the device further includes a second update module configured to:
接收更新请求,所述更新请求中携带有待添加的页面和对应的待添加的身份验证条件;Receive an update request, which carries the page to be added and the corresponding authentication conditions to be added;
确定所述页面集合中包括所述待添加的页面;Determine that the page to be added is included in the page set;
在所述对应关系中,将所述待添加的页面对应的身份验证条件信息,修改为所述待添加的身份验证条件。In the correspondence, the authentication condition information corresponding to the page to be added is modified to the authentication condition to be added.
可选的,所述装置还包括显示模块,被配置为:Optionally, the device further includes a display module configured to:
如果用户身份验证通过,则显示所述目标页面,如果用户身份验证不通过,则拒绝显示所述目标页面。If the user's authentication is successful, the target page is displayed; if the user's authentication is unsuccessful, the target page is refused to be displayed.
再一方面,提供一种计算机设备,所述计算机设备包括处理器和存储器,所述存储器中存储有至少一条指令,所述指令由所述处理器加载并执行以实现如上所述的触发应用程序中身份验证的方法所执行的操作。In another aspect, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, the instruction being loaded and executed by the processor to perform the operation performed by the method for triggering authentication in an application as described above.
再一方面,提供一种计算机可读存储介质,所述存储介质中存储有至少一条指令,所述指令由处理器加载并执行以实现如上所述的触发应用程序中身份验证的方法所执行的操作。In another aspect, a computer-readable storage medium is provided, wherein at least one instruction is stored therein, the instruction being loaded and executed by a processor to perform the operations performed by the method for triggering authentication in an application as described above.
本申请实施例提供的技术方案带来的有益效果是:The beneficial effects of the technical solutions provided in this application are:
本申请实施例可以将业务功能相对应的页面添加到页面集合中,并将页面和页面对应的身份验证触发条件对应存储,通过监测到的页面集合中将要显示的页面,确定对应的身份验证触发条件,再根据应用程序当前的状态信息是否满足身份验证触发条件来确定是否对用户进行身份验证。在实际应用中不同的业务功能可能对应相同的页面、相同的身份验证触发条件,基于上述对应关系,技术人员无需重复在不同业务功能的代码中编写身份验证触发条件的代码,简化了技术人员的编写代码的过程,提高了效率。This application embodiment can add pages corresponding to business functions to a page collection and store the pages and their corresponding authentication trigger conditions. By monitoring the pages to be displayed in the page collection, the corresponding authentication trigger conditions are determined. Then, based on whether the application's current state information meets the authentication trigger conditions, it is determined whether to authenticate the user. In practical applications, different business functions may correspond to the same pages and the same authentication trigger conditions. Based on the above correspondence, technicians do not need to repeatedly write authentication trigger condition code in the code of different business functions, simplifying the coding process and improving efficiency.
附图说明Attached Figure Description
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
图1是本申请实施例提供的触发应用程序中身份验证的方法流程图;Figure 1 is a flowchart of a method for triggering authentication in an application according to an embodiment of this application;
图2是本申请实施例提供的触发应用程序中身份验证的方法流程图;Figure 2 is a flowchart of a method for triggering authentication in an application according to an embodiment of this application;
图3是本申请实施例提供的触发应用程序中身份验证的装置结构示意图;Figure 3 is a schematic diagram of the device structure for triggering authentication in an application provided in an embodiment of this application;
图4是本申请实施例提供的终端装置结构示意图。Figure 4 is a schematic diagram of the terminal device structure provided in an embodiment of this application.
具体实施方式Detailed Implementation
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
本申请提供的触发应用程序中身份验证的方法可以在终端中进行实现。终端中可以安装有应用程序,如各个银行对应的银行应用程序、各种移动支付程序、各种炒股应用程序等等。终端可以具备麦克风、摄像头、屏幕等部件,终端还可以具备指纹识别传感器、面部识别传感器、虹膜识别传感器等可以对人体生物信息进行识别的模块。终端具有通信功能,可以接入互联网,终端可以是手机、平板电脑、智能穿戴设备、台式计算机、笔记本电脑等。The authentication method for triggering applications provided in this application can be implemented on a terminal. The terminal can have applications installed, such as banking applications for various banks, mobile payment applications, stock trading applications, etc. The terminal can have components such as a microphone, camera, and screen, and can also have modules that can identify human biometric information, such as fingerprint sensors, facial recognition sensors, and iris recognition sensors. The terminal has communication capabilities, can access the internet, and can be a mobile phone, tablet computer, smart wearable device, desktop computer, laptop computer, etc.
本申请实施例中提供的触发应用程序中身份验证的方法,可以在用户操作应用程序的过程中,对操作应用程序的用户进行身份验证,以加强用户使用应用程序的安全保障。本申请实施例中以银行应用程序为例进行方案的详细说明,其它情况与之类似,不再赘述。银行应用程序中可以登录用户的创建的账户,银行应用程序可将用户登录账户对应的银行账户的信息显示在银行应用程序中。用户可以通过银行应用程序查看自己银行账户的余额,可以完成在线转账、在线支付、在线买卖基金等业务。The method for triggering application authentication provided in this embodiment can authenticate the user operating the application during the application's operation, thereby enhancing the security of the application. This embodiment uses a banking application as an example for detailed explanation; other cases are similar and will not be described in detail here. The banking application allows users to log in to accounts created by them, and displays the bank account information corresponding to the logged-in account. Users can view their bank account balance through the banking application and complete online transfers, online payments, online fund trading, and other transactions.
用户在使用银行应用程序的过程中,当用户操作银行应用程序进入一些特定的业务场景时,如用户点击了金融类应用程序中的账户信息时,或金融类应用程序从后台切换到当前的显示页面时,金融类应用程序会弹出一个身份验证的界面,验证当前操作银行应用程序的用户的身份是否为当前登录金融类应用程序的账户的身份信息是否一致。其中,验证方式可以是密码验证、指纹验证、虹膜验证或人脸验证等。本申请实施例提供的触发应用程序中身份验证的方法可以通过监测银行业务功能的页面的显示,确定对用户进行身份验证触发条件,再根据身份验证触发条件来确定是否对用户进行身份验证。When a user operates a banking application and enters certain business scenarios, such as clicking on account information within a financial application or switching from the background to the current display page, the financial application will pop up an identity verification interface to verify whether the identity of the user operating the banking application matches the identity information of the account currently logged into the financial application. The verification method can be password verification, fingerprint verification, iris verification, or facial verification, etc. The method for triggering identity verification in the application provided in this application embodiment can determine the trigger conditions for user identity verification by monitoring the display of banking business function pages, and then determine whether to perform user identity verification based on the identity verification trigger conditions.
需要进行说明的是,本申请在收集用户的相关数据之前以及在收集用户的相关数据的过程中,都可以显示提示界面、弹窗或输出语音提示信息,该提示界面、弹窗或语音提示信息用于提示用户当前正在搜集其相关数据,使得本申请仅仅在获取到用户对该提示界面或者弹窗发出的确认操作后,才开始执行获取用户相关数据的相关步骤,否则(即未获取到用户对该提示界面或者弹窗发出的确认操作时),结束获取用户相关数据的相关步骤,即不获取用户的相关数据。换句话说,本申请所采集的所有用户数据都是在用户同意并授权的情况下进行采集的,且相关用户数据的收集、使用和处理需要遵守相关地区的相关法律法规和标准。It should be noted that this application may display prompt interfaces, pop-ups, or output voice prompts before and during the collection of user data. These prompt interfaces, pop-ups, or voice prompts are used to inform the user that their data is being collected. This ensures that the application only begins the steps for collecting user data after receiving confirmation from the user regarding the prompt interface or pop-up; otherwise (i.e., without user confirmation), the steps for collecting user data end, meaning no user data is collected. In other words, all user data collected in this application is collected with the user's consent and authorization, and the collection, use, and processing of related user data must comply with the relevant laws, regulations, and standards of the relevant regions.
图1是本申请实施例提供的一种触发应用程序中身份验证的方法的流程图。参见图1,该实施例包括:Figure 1 is a flowchart of a method for triggering authentication in an application according to an embodiment of this application. Referring to Figure 1, this embodiment includes:
步骤101,在应用程序中,监测预设的页面集合中各页面的显示指令。Step 101: In the application, monitor the display instructions of each page in the preset page set.
应用程序对页面进行显示的过程中,会触发一系列的事件,依次为创建时间、开始事件、可见事件、暂停事件和停止事件。其中,应用程序要将页面显示在终端屏幕时,会触发将要显示的页面对应的可见事件。其中,可见事件中携带有将要显示页面的页面标识。可以将携带有页面标识的可见事件作为被监测页面的显示指令。During the process of an application displaying a page, a series of events are triggered, in the following order: creation time, start event, visibility event, pause event, and stop event. Specifically, when the application wants to display a page on the terminal screen, it triggers the visibility event corresponding to the page to be displayed. The visibility event carries a page identifier for the page to be displayed. Visibility events carrying page identifiers can be used as display instructions for the monitored page.
在实施中,可以在应用程序中可以设置一个页面生命周期监听器,其中,页面生命周期监听器可以监测到页面进行显示的过程中触发的一系列事件,即可以对页面的显示指令进行检测。当用户在银行应用程序中点击相应的业务功能时,银行应用程序可以将业务功能对应的页面显示在终端的屏幕上。可以根据可能需要进行身份验证的业务功能在应用程序中设置一个页面集合,页面集合中包括可能需要进行身份验证的业务功能对应页面的页面标识,例如,将一些涉及账户信息和财产安全的业务功能对应页面的页面标识添加到页面集合中。页面生命周期监听器可以对银行应用程序中要显示的页面进行实时监测,当监测到的可见事件中携带的页面标识为页面集合中的页面标识,则可以确定用户选择了可能需要进行身份验证的业务功能。例如,可以将银行应用程序中的账户信息对应页面的页面标识添加到页面集合中,当页面生命周期监听器监测到账户信息对应页面的页面标识时,即可知道用户选择了账户信息的业务功能。In implementation, a page lifecycle listener can be set up in the application. This listener can monitor a series of events triggered during the page display process, thus detecting page display instructions. When a user clicks on a corresponding business function in the banking application, the application can display the page corresponding to that function on the terminal screen. A page set can be set up in the application based on business functions that may require authentication. This set includes page identifiers for pages corresponding to business functions that may require authentication. For example, page identifiers for pages related to account information and asset security can be added to the page set. The page lifecycle listener can monitor the pages to be displayed in the banking application in real time. When the page identifier carried in a detected visible event matches a page identifier from the page set, it can be determined that the user has selected a business function that may require authentication. For example, the page identifier for the account information page in the banking application can be added to the page set. When the page lifecycle listener detects the page identifier for the account information page, it indicates that the user has selected the account information business function.
步骤102,当检测到目标页面的显示指令时,基于预先存储的应用程序的页面与身份验证触发条件的对应关系,确定目标页面对应的目标身份验证触发条件。Step 102: When a display instruction for the target page is detected, the target authentication trigger condition corresponding to the target page is determined based on the pre-stored correspondence between application pages and authentication trigger conditions.
其中,页面与身份验证触发条件的对应关系可以为页面对应的页面标识与身份验证触发条件的对应关系。身份验证触发条件可以是根据银行应用程序的状态信息设置的条件,例如,银行应用程序中是否有账户登录,银行应用程序的页面从后台到可见的时间间隔是否大于预设的时间间隔等。The correspondence between pages and authentication trigger conditions can be a mapping between the page identifier and the authentication trigger condition. Authentication trigger conditions can be based on the state information of the banking application, such as whether an account is logged in, or whether the time interval between the banking application page appearing in the background is greater than a preset time interval.
在实施中,当页面生命周期监听器监测到页面集合中的页面标识时,即用户选择了可能需要进行身份验证的业务功能。在银行应用程序对用户进行身份验证之前,可以判断银行应用程序当前的状态信息是否满足触发进行身份验证的条件。其中,根据业务功能的不同,应用程序触发进行身份验证的条件的不同。技术人员可以在应用程序中预先存储页面集合中各页面的页面标识与身份验证触发条件的对应关系。当页面生命周期监听器监测到页面集合中的页面标识时,可以在预先存储的页面集合中各页面的页面标识与身份验证触发条件的对应关系中,查找监测的页面标识对应的身份验证触发条件。例如,银行应用程序中账户信息页面的页面标识可以与已有账户登录、登录的账户已于银行卡进行绑定相对应,当页面生命周期监听器监测到账户信息页面触发的可见事件后,若银行应用程序当前的状态信息中已经有账户登录,并且所登录的账户与银行卡进行绑定,则可以银行应用程序可以对用户进行身份验证。上述流程可参见图2。In implementation, when the page lifecycle listener detects a page identifier in the page set, it indicates that the user has selected a business function that may require authentication. Before the banking application authenticates the user, it can determine whether the current state information of the banking application meets the conditions for triggering authentication. The conditions for triggering authentication vary depending on the business function. Technical personnel can pre-store the correspondence between page identifiers and authentication trigger conditions for each page in the page set within the application. When the page lifecycle listener detects a page identifier in the page set, it can look up the corresponding authentication trigger condition for the detected page identifier in the pre-stored correspondence. For example, the page identifier for the account information page in the banking application can correspond to an existing account login and the logged-in account being bound to a bank card. When the page lifecycle listener detects a visible event triggered by the account information page, if the current state information of the banking application shows an existing account login and the logged-in account being bound to a bank card, then the banking application can authenticate the user. The above process is illustrated in Figure 2.
可选的,可以将存储的应用程序的页面与身份验证触发条件的对应关系设置在一个身份验证触发接口中,相应的处理可以如下:当检测到目标页面的显示指令时,调用身份验证触发接口,基于预先存储的应用程序的页面与身份验证触发条件的对应关系,确定目标页面对应的目标身份验证触发条件。Optionally, the mapping between the stored application pages and authentication trigger conditions can be set in an authentication trigger interface. The corresponding processing can be as follows: when a display instruction for the target page is detected, the authentication trigger interface is called, and the target authentication trigger condition corresponding to the target page is determined based on the pre-stored mapping between the application pages and authentication trigger conditions.
在实施中,可以在银行应用程序中设置身份验证触发接口,将银行应用程序的页面与身份验证触发条件的对应关系存储在同一个身份验证触发接口,当页面生命周期监测到的页面集合中的页面标识时,可以通过调用身份验证触发接口,并根据监测到的页面标识,确定监测到的页面标识对应的身份验证触发条件。In implementation, an authentication trigger interface can be set up in the banking application. The correspondence between the pages of the banking application and the authentication trigger conditions is stored in the same authentication trigger interface. When a page identifier in the page set is detected during the page lifecycle, the authentication trigger interface can be called, and the authentication trigger condition corresponding to the detected page identifier can be determined based on the detected page identifier.
步骤103,如果应用程序当前的状态信息满足目标应用状态条件,则进行用户身份验证处理。Step 103: If the current state information of the application meets the target application state conditions, then perform user authentication processing.
在实施中,页面生命周期监听器监测到页面集合中的页面标识后,并确定应用程序当前的状态信息满足页面标识对应的身份验证触发条件的对应关系,则可以对用户进行身份验证。其中,身份验证的方式可以是弹出一个锁屏页面,用户可以在锁屏页面中输入之前设置的验证密码,来通过身份验证。另外还可以通过其他验证方式,例如,通过指纹验证、虹膜验证或人脸验证等。In implementation, after the page lifecycle listener detects a page identifier in the page collection and determines that the application's current state information matches the authentication trigger condition corresponding to that page identifier, it can then authenticate the user. Authentication can be achieved by displaying a lock screen where the user can enter a previously set verification password. Alternatively, other authentication methods can be used, such as fingerprint verification, iris verification, or facial recognition.
可选的,当目标页面对应有多个目标身份验证触发条件时,如果应用程序当前的状态信息满足所有目标身份验证触发条件,则进行用户身份验证处理。Optionally, when a target page corresponds to multiple target authentication trigger conditions, user authentication processing is performed if the current state information of the application meets all target authentication trigger conditions.
在实施中,在选择银行应用程序中业务功能之后,银行应用程序的状态信息可能需要满足多个身份验证触发条件,才对用户进行身份验证。即银行应用程序中业务功能对应的页面可以与多个身份验证触发条件对应。当页面生命周期监听器监测到页面集合中的页面标识后,并监测到的页面标识与多个身份验证触发条件对应,则银行应用程序的状态信息需要满足页面标识对应的所有身份验证触发条件后,才可对用户进行身份验证。In implementation, after selecting a business function within a banking application, the application's state information may need to satisfy multiple authentication trigger conditions before authenticating the user. That is, the page corresponding to a business function within the banking application can correspond to multiple authentication trigger conditions. When the page lifecycle listener detects a page identifier in the page set, and that page identifier corresponds to multiple authentication trigger conditions, the banking application's state information must satisfy all authentication trigger conditions corresponding to that page identifier before authenticating the user.
可选的,在执行完步骤103之后,可以根据身份验证的结果执行以下方法:如果用户身份验证通过,则显示目标页面,如果用户身份验证不通过,则拒绝显示目标页面。Optionally, after performing step 103, the following method can be executed based on the authentication result: if the user authentication is successful, the target page is displayed; if the user authentication is unsuccessful, the target page is refused to be displayed.
在实施中,用户可以通过输入密码等方式来通过银行应用程序中设置的身份验证,如果用户通过身份验证后,银行应用程序将对应的页面显示在终端屏幕上,供用户选择相应的业务功能。如果用户没有通过身份验证,银行应用程序可以不将对应的页面显示在终端屏幕上。另外,银行应用程序还可以对当前登录的账户进行处理,例如,退出当前银行应用程序中登录的账户,并发提醒消息到账户对应的手机号。In practice, users can authenticate themselves through the banking application by entering a password or similar method. If the user is successfully authenticated, the application will display the corresponding page on the terminal screen, allowing the user to select the appropriate service function. If the user fails authentication, the application may not display the corresponding page on the terminal screen. Additionally, the banking application can manage currently logged-in accounts, such as logging out of the account and sending a notification message to the account's associated mobile phone number.
本申请实施例可以将业务功能相对应的页面添加到页面集合中,并将页面和页面对应的身份验证触发条件对应存储,通过监测到的页面集合中将要显示的页面,确定对应的身份验证触发条件,再根据应用程序当前的状态信息是否满足身份验证触发条件来确定是否对用户进行身份验证。在实际应用中不同的业务功能可能对应相同的页面、相同的身份验证触发条件,基于上述对应关系,技术人员无需重复在不同业务功能的代码中编写身份验证触发条件的代码,简化了技术人员的编写代码的过程,提高了效率。This application embodiment can add pages corresponding to business functions to a page collection and store the pages and their corresponding authentication trigger conditions. By monitoring the pages to be displayed in the page collection, the corresponding authentication trigger conditions are determined. Then, based on whether the application's current state information meets the authentication trigger conditions, it is determined whether to authenticate the user. In practical applications, different business functions may correspond to the same pages and the same authentication trigger conditions. Based on the above correspondence, technicians do not need to repeatedly write authentication trigger condition code in the code of different business functions, simplifying the coding process and improving efficiency.
本申请实施例中,应用程序可对应用程序的页面与身份验证触发条件的对应关系进行实时更新,相应的处理可以如下:In this embodiment of the application, the application can update the correspondence between the application's pages and the authentication triggering conditions in real time. The corresponding processing can be as follows:
接收更新请求,更新请求中携带有待添加的页面和对应的待添加的身份验证条件;确定页面集合中不包括待添加的页面;将待添加的页面添加到页面集合中,并将待添加的页面和待添加的身份验证条件,对应的添加到对应关系中。Receive an update request, which includes the page to be added and the corresponding authentication condition to be added; determine that the page to be added is not included in the page set; add the page to be added to the page set, and add the page to be added and the authentication condition to be added to the corresponding relationship.
在实施中,银行应用程序中的业务功能对应触发身份验证的条件可能需要改更,或者,可能需要为新的业务功能添加对应的触发身份验证的条件时,技术人员可以预先编写更新请求,更新请求中可以携带业务功能对应页面的页面标识和对应的身份验证触发条件。然后通过服务器向终端的银行应用程序中发送更新请求。终端在接收到更新请求后,可以根据更新请求中的携带的页面标识和触发身份验证的条件,对原页面标识和触发身份验证的条件的对应关系(即接收更新请求之前的页面标识和触发身份验证的条件的对应关系)进行更新。如果在原页面集合(即接收更新请求之前的页面集合)中没有更新请求携带的页面标识,则将更新请求携带的页面标识添加到原页面集合中,得到更新后的页面集合。并在原页面标识和触发身份验证的条件的对应关系中添加更新请求中携带的页面标识和触发身份验证的条件。In implementation, when the authentication conditions for business functions in a banking application may need to be changed, or when new authentication conditions may need to be added for new business functions, technical personnel can pre-write update requests. These update requests can carry the page identifier of the page corresponding to the business function and the corresponding authentication trigger conditions. The update request is then sent from the server to the banking application on the terminal. Upon receiving the update request, the terminal can update the original mapping between page identifiers and authentication trigger conditions (i.e., the mapping between page identifiers and authentication trigger conditions before receiving the update request) based on the page identifiers and authentication trigger conditions carried in the update request. If the page identifier carried in the update request is not present in the original page set (i.e., the page set before receiving the update request), the page identifier carried in the update request is added to the original page set, resulting in the updated page set. The mapping between page identifiers and authentication trigger conditions is then updated by adding the page identifier and authentication trigger conditions carried in the update request.
如果原页面集合中包括更新请求中携带的页面标识,则相应的处理可以如下:确定页面集合中包括待添加的页面;在对应关系中,将待添加的页面对应的身份验证条件信息,修改为待添加的身份验证条件。If the original page set includes the page identifier carried in the update request, the corresponding processing can be as follows: determine if the page set includes the page to be added; in the correspondence, modify the authentication condition information corresponding to the page to be added to the authentication condition to be added.
在实施中,如果在原页面集合中存在更新请求携带的页面标识,则将原页面标识和触发身份验证的条件的对应关系中的触发身份验证的条件修改为更新请求中携带的身份验证触发条件,完成对页面标识对应身份验证触发条件的修改。In implementation, if the page identifier carried in the update request exists in the original page set, the authentication triggering condition in the correspondence between the original page identifier and the authentication triggering condition is modified to the authentication triggering condition carried in the update request, thus completing the modification of the authentication triggering condition corresponding to the page identifier.
上述所有可选技术方案,可以采用任意结合形成本公开的可选实施例,在此不再一一赘述。All of the above-mentioned optional technical solutions can be combined in any way to form optional embodiments of this disclosure, and will not be described in detail here.
本申请实施例提供一种触发应用程序中身份验证的装置,该装置可以是上述实施例的终端,参见图3,该装置包括:This application provides a device for triggering authentication in an application. This device can be the terminal described in the above embodiments. Referring to FIG3, the device includes:
监测模块310,被配置为在应用程序中,监测预设的页面集合中各页面的显示指令;The monitoring module 310 is configured to monitor the display instructions of each page in a preset set of pages in the application.
确定模块320,被配置为当检测到目标页面的显示指令时,基于预先存储的所述应用程序的页面与身份验证触发条件的对应关系,确定所述目标页面对应的目标身份验证触发条件;The determination module 320 is configured to, when a display instruction for a target page is detected, determine the target authentication trigger condition corresponding to the target page based on a pre-stored correspondence between pages of the application and authentication trigger conditions.
处理模块330,被配置为如果所述应用程序当前的状态信息满足所述目标身份验证触发条件,则进行用户身份验证处理。The processing module 330 is configured to perform user authentication processing if the current state information of the application meets the target authentication triggering condition.
可选的,所述处理模块330,被配置为:Optionally, the processing module 330 is configured to:
当所述目标页面对应有多个目标身份验证触发条件时,如果所述应用程序当前的状态信息满足所有目标身份验证触发条件,则进行用户身份验证处理。When the target page corresponds to multiple target authentication trigger conditions, if the current state information of the application meets all target authentication trigger conditions, then user authentication processing is performed.
可选的,所述装置还包括第一更新模块340,被配置为:Optionally, the device further includes a first update module 340, configured to:
接收更新请求,所述更新请求中携带有待添加的页面和对应的待添加的身份验证条件;Receive an update request, which carries the page to be added and the corresponding authentication conditions to be added;
确定所述页面集合中不包括所述待添加的页面;It is determined that the page to be added is not included in the page set;
将所述待添加的页面添加到所述页面集合中,并将所述待添加的页面和所述待添加的身份验证条件,对应的添加到所述对应关系中。The page to be added is added to the page set, and the page to be added and the authentication condition to be added are added to the corresponding relationship.
可选的,所述装置还包括第二更新模块350,被配置为:Optionally, the device further includes a second update module 350, configured to:
接收更新请求,所述更新请求中携带有待添加的页面和对应的待添加的身份验证条件;Receive an update request, which carries the page to be added and the corresponding authentication conditions to be added;
确定所述页面集合中包括所述待添加的页面;Determine that the page to be added is included in the page set;
在所述对应关系中,将所述待添加的页面对应的身份验证条件信息,修改为所述待添加的身份验证条件。In the correspondence, the authentication condition information corresponding to the page to be added is modified to the authentication condition to be added.
可选的,所述装置还包括显示模块360,被配置为:Optionally, the device further includes a display module 360, configured to:
如果用户身份验证通过,则显示所述目标页面,如果用户身份验证不通过,则拒绝显示所述目标页面。If the user's authentication is successful, the target page is displayed; if the user's authentication is unsuccessful, the target page is refused to be displayed.
需要说明的是:上述实施例提供的触发应用程序中身份验证的装置在触发应用程序中身份验证时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的触发应用程序中身份验证的装置与触发应用程序中身份验证的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that the above embodiments of the device for authenticating identity in the application triggering authentication are only illustrative examples of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the device for authenticating identity in the application triggering authentication provided in the above embodiments and the method embodiments for authenticating identity in the application triggering authentication belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.
图4示出了本申请一个示例性实施例提供的终端400的结构框图。该终端400可以是:智能手机、平板电脑、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio LayerIV,动态影像专家压缩标准音频层面4)播放器、笔记本电脑或台式电脑。终端400还可能被称为用户设备、便携式终端、膝上型终端、台式终端等其他名称。Figure 4 shows a structural block diagram of a terminal 400 provided in an exemplary embodiment of this application. The terminal 400 may be a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The terminal 400 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.
通常,终端400包括有:处理器401和存储器402。Typically, terminal 400 includes a processor 401 and a memory 402.
处理器401可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器401可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器401也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central ProcessingUnit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器401可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器401还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。Processor 401 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 401 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 401 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 401 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 401 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
存储器402可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器402还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器402中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器401所执行以实现本申请中方法实施例提供的触发应用程序中身份验证的方法。Memory 402 may include one or more computer-readable storage media, which may be non-transitory. Memory 402 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in memory 402 is used to store at least one instruction, which is executed by processor 401 to implement the method for triggering authentication in an application provided in the method embodiments of this application.
在一些实施例中,终端400还可选包括有:外围设备接口403和至少一个外围设备。处理器401、存储器402和外围设备接口403之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口403相连。具体地,外围设备包括:射频电路404、触摸显示屏405、摄像头406、音频电路407、定位组件408和电源409中的至少一种。In some embodiments, the terminal 400 may also optionally include a peripheral device interface 403 and at least one peripheral device. The processor 401, memory 402, and peripheral device interface 403 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 403 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 404, a touch display screen 405, a camera 406, an audio circuit 407, a positioning component 408, and a power supply 409.
外围设备接口403可被用于将I/O(Input/Output,输入/输出)相关的至少一个外围设备连接到处理器401和存储器402。在一些实施例中,处理器401、存储器402和外围设备接口403被集成在同一芯片或电路板上;在一些其他实施例中,处理器401、存储器402和外围设备接口403中的任意一个或两个可以在单独的芯片或电路板上实现,本实施例对此不加以限定。Peripheral device interface 403 can be used to connect at least one I/O (Input/Output) related peripheral device to processor 401 and memory 402. In some embodiments, processor 401, memory 402 and peripheral device interface 403 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 401, memory 402 and peripheral device interface 403 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
射频电路404用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路404通过电磁信号与通信网络以及其他通信设备进行通信。射频电路404将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路404包括:天线系统、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等等。射频电路404可以通过至少一种无线通信协议来与其它终端进行通信。该无线通信协议包括但不限于:城域网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路404还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本申请对此不加以限定。The radio frequency (RF) circuit 404 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 404 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 404 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 404 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 404 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: metropolitan area networks (MANs), various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks (WLANs), and/or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 404 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.
显示屏405用于显示UI(User Interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏405是触摸显示屏时,显示屏405还具有采集在显示屏405的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器401进行处理。此时,显示屏405还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏405可以为一个,设置终端400的前面板;在另一些实施例中,显示屏405可以为至少两个,分别设置在终端400的不同表面或呈折叠设计;在再一些实施例中,显示屏405可以是柔性显示屏,设置在终端400的弯曲表面上或折叠面上。甚至,显示屏405还可以设置成非矩形的不规则图形,也即异形屏。显示屏405可以采用LCD(LiquidCrystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。Display screen 405 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 405 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 401 for processing. In this case, display screen 405 can also be used to provide virtual buttons and/or a virtual keyboard, also known as soft buttons and/or a soft keyboard. In some embodiments, there may be one display screen 405, which serves as the front panel of terminal 400; in other embodiments, there may be at least two display screens, respectively disposed on different surfaces of terminal 400 or in a folded design; in still other embodiments, display screen 405 may be a flexible display screen, disposed on a curved or folded surface of terminal 400. Furthermore, display screen 405 may be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. Display screen 405 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).
摄像头组件406用于采集图像或视频。可选地,摄像头组件406包括前置摄像头和后置摄像头。通常,前置摄像头设置在终端的前面板,后置摄像头设置在终端的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头、长焦摄像头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件406还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以用于不同色温下的光线补偿。The camera assembly 406 is used to acquire images or videos. Optionally, the camera assembly 406 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 406 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash is a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.
音频电路407可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波转换为电信号输入至处理器401进行处理,或者输入至射频电路404以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分别设置在终端400的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器401或射频电路404的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路407还可以包括耳机插孔。The audio circuit 407 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting them into electrical signals that are input to the processor 401 for processing, or to the radio frequency circuit 404 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each positioned at a different location on the terminal 400. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 401 or the radio frequency circuit 404 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 407 may also include a headphone jack.
定位组件408用于定位终端400的当前地理位置,以实现导航或LBS(LocationBased Service,基于位置的服务)。定位组件408可以是基于美国的GPS(GlobalPositioning System,全球定位系统)、中国的北斗系统、俄罗斯的格雷纳斯系统或欧盟的伽利略系统的定位组件。The positioning component 408 is used to locate the current geographic location of the terminal 400 in order to enable navigation or LBS (Location Based Service). The positioning component 408 can be a positioning component based on the US GPS (Global Positioning System), China's BeiDou system, Russia's Grenas system, or the European Union's Galileo system.
电源409用于为终端400中的各个组件进行供电。电源409可以是交流电、直流电、一次性电池或可充电电池。当电源409包括可充电电池时,该可充电电池可以支持有线充电或无线充电。该可充电电池还可以用于支持快充技术。Power supply 409 is used to power the various components in terminal 400. Power supply 409 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 409 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
在一些实施例中,终端400还包括有一个或多个传感器410。该一个或多个传感器410包括但不限于:加速度传感器411、陀螺仪传感器412、压力传感器413、指纹传感器414、光学传感器415以及接近传感器416。In some embodiments, the terminal 400 further includes one or more sensors 410. The one or more sensors 410 include, but are not limited to: an accelerometer 411, a gyroscope 412, a pressure sensor 413, a fingerprint sensor 414, an optical sensor 415, and a proximity sensor 416.
加速度传感器411可以检测以终端400建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器411可以用于检测重力加速度在三个坐标轴上的分量。处理器401可以根据加速度传感器411采集的重力加速度信号,控制触摸显示屏405以横向视图或纵向视图进行用户界面的显示。加速度传感器411还可以用于游戏或者用户的运动数据的采集。Accelerometer 411 can detect the magnitude of acceleration on the three coordinate axes of a coordinate system established with terminal 400. For example, accelerometer 411 can be used to detect the components of gravitational acceleration on the three coordinate axes. Processor 401 can control touch screen 405 to display the user interface in landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 411. Accelerometer 411 can also be used for games or for acquiring user motion data.
陀螺仪传感器412可以检测终端400的机体方向及转动角度,陀螺仪传感器412可以与加速度传感器411协同采集用户对终端400的3D动作。处理器401根据陀螺仪传感器412采集的数据,可以实现如下功能:动作感应(比如根据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。The gyroscope sensor 412 can detect the orientation and rotation angle of the terminal 400. The gyroscope sensor 412, in conjunction with the accelerometer sensor 411, can collect 3D motion data from the user on the terminal 400. Based on the data collected by the gyroscope sensor 412, the processor 401 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.
压力传感器413可以设置在终端400的侧边框和/或触摸显示屏405的下层。当压力传感器413设置在终端400的侧边框时,可以检测用户对终端400的握持信号,由处理器401根据压力传感器413采集的握持信号进行左右手识别或快捷操作。当压力传感器413设置在触摸显示屏405的下层时,由处理器401根据用户对触摸显示屏405的压力操作,实现对UI界面上的可操作性控件进行控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中的至少一种。The pressure sensor 413 can be disposed on the side bezel of the terminal 400 and/or on the lower layer of the touch display screen 405. When the pressure sensor 413 is disposed on the side bezel of the terminal 400, it can detect the user's grip signal on the terminal 400, and the processor 401 can perform left/right hand recognition or quick operation based on the grip signal collected by the pressure sensor 413. When the pressure sensor 413 is disposed on the lower layer of the touch display screen 405, the processor 401 can control the operable controls on the UI interface based on the user's pressure operation on the touch display screen 405. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
指纹传感器414用于采集用户的指纹,由处理器401根据指纹传感器414采集到的指纹识别用户的身份,或者,由指纹传感器414根据采集到的指纹识别用户的身份。在识别出用户的身份为可信身份时,由处理器401授权该用户执行相关的敏感操作,该敏感操作包括解锁屏幕、查看加密信息、下载软件、支付及更改设置等。指纹传感器414可以被设置终端400的正面、背面或侧面。当终端400上设置有物理按键或厂商Logo时,指纹传感器414可以与物理按键或厂商Logo集成在一起。The fingerprint sensor 414 is used to collect the user's fingerprint. The processor 401 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 414, or the fingerprint sensor 414 identifies the user's identity based on the collected fingerprint. When the user's identity is identified as trusted, the processor 401 authorizes the user to perform relevant sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, making payments, and changing settings. The fingerprint sensor 414 can be located on the front, back, or side of the terminal 400. When the terminal 400 has physical buttons or a manufacturer's logo, the fingerprint sensor 414 can be integrated with the physical buttons or manufacturer's logo.
光学传感器415用于采集环境光强度。在一个实施例中,处理器401可以根据光学传感器415采集的环境光强度,控制触摸显示屏405的显示亮度。具体地,当环境光强度较高时,调高触摸显示屏405的显示亮度;当环境光强度较低时,调低触摸显示屏405的显示亮度。在另一个实施例中,处理器401还可以根据光学传感器415采集的环境光强度,动态调整摄像头组件406的拍摄参数。An optical sensor 415 is used to collect ambient light intensity. In one embodiment, the processor 401 can control the display brightness of the touch screen 405 based on the ambient light intensity collected by the optical sensor 415. Specifically, when the ambient light intensity is high, the display brightness of the touch screen 405 is increased; when the ambient light intensity is low, the display brightness of the touch screen 405 is decreased. In another embodiment, the processor 401 can also dynamically adjust the shooting parameters of the camera assembly 406 based on the ambient light intensity collected by the optical sensor 415.
接近传感器416,也称距离传感器,通常设置在终端400的前面板。接近传感器416用于采集用户与终端400的正面之间的距离。在一个实施例中,当接近传感器416检测到用户与终端400的正面之间的距离逐渐变小时,由处理器401控制触摸显示屏405从亮屏状态切换为息屏状态;当接近传感器416检测到用户与终端400的正面之间的距离逐渐变大时,由处理器401控制触摸显示屏405从息屏状态切换为亮屏状态。The proximity sensor 416, also known as a distance sensor, is typically located on the front panel of the terminal 400. The proximity sensor 416 is used to detect the distance between the user and the front of the terminal 400. In one embodiment, when the proximity sensor 416 detects that the distance between the user and the front of the terminal 400 is gradually decreasing, the processor 401 controls the touchscreen display 405 to switch from a screen-on state to a screen-off state; when the proximity sensor 416 detects that the distance between the user and the front of the terminal 400 is gradually increasing, the processor 401 controls the touchscreen display 405 to switch from a screen-off state to a screen-on state.
本领域技术人员可以理解,图4中示出的结构并不构成对终端400的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。Those skilled in the art will understand that the structure shown in FIG4 does not constitute a limitation on terminal 400, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
在示例性实施例中,还提供了一种计算机可读存储介质,例如包括指令的存储器,上述指令可由终端中的处理器执行以完成上述触发应用程序中身份验证的方法。该计算机可读存储介质可以是非暂态的。例如,所述计算机可读存储介质可以是ROM(Read-OnlyMemory,只读存储器,)、RAM(Random Access Memory,随机存取存储器)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions executable by a processor in a terminal to complete the method for triggering authentication in an application. The computer-readable storage medium may be non-transitory. For example, the computer-readable storage medium may be ROM (Read-Only Memory), RAM (Random Access Memory), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims (7)
Publications (2)
| Publication Number | Publication Date |
|---|---|
| HK40048714A HK40048714A (en) | 2021-12-10 |
| HK40048714B true HK40048714B (en) | 2023-11-17 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111241499B (en) | Application program login method, device, terminal and storage medium | |
| CN111881423B (en) | Restricting function use authorization methods, devices, and systems | |
| CN111191227A (en) | Method and apparatus for preventing execution of malicious code | |
| CN111128115B (en) | Information verification method and device, electronic equipment and storage medium | |
| CN108804180A (en) | Display method, device, terminal and storage medium of user interface | |
| CN115329309A (en) | Verification method, verification device, electronic equipment and storage medium | |
| CN111831385B (en) | Service trusted information processing method, device, equipment and storage medium | |
| CN112330380A (en) | Order creation method and device, computer equipment and computer readable storage medium | |
| CN111047328B (en) | Mobile payment method, device, system and storage medium | |
| CN110290191B (en) | Resource transfer result processing method, device, server, terminal and storage medium | |
| CN112036887B (en) | Resource transfer method, device, equipment and storage medium | |
| CN109995804B (en) | Target resource information display method, information providing method and device | |
| CN110738491B (en) | Numerical value transfer method, system, device, terminal and storage medium | |
| US12111998B2 (en) | Touch control method and apparatus, device and storage medium | |
| CN112764824B (en) | Method, device, equipment and storage medium for triggering identity verification in application program | |
| CN111131619B (en) | Account switching processing method, device and system | |
| CN111079119A (en) | Verification method, device, equipment and storage medium | |
| CN111191254A (en) | Access verification method and device, computer equipment and storage medium | |
| CN115718634A (en) | Page display method, page configuration method and terminal | |
| HK40048714B (en) | Method and apparatus for triggering identity verification in application program, device and storage medium | |
| CN114826799A (en) | Information acquisition method, device, terminal and storage medium | |
| CN112699364A (en) | Method, device and equipment for processing verification information and storage medium | |
| CN112132472A (en) | Resource management method and device, electronic equipment and computer readable storage medium | |
| CN114464302B (en) | Health service reservation method, device, terminal, storage medium and product | |
| CN119989310B (en) | Application access method, system, device and computer-readable storage medium |