技术领域technical field
本发明涉及信息安全技术领域,特别是涉及一种隐私保护方法及装置、移动终端。The present invention relates to the technical field of information security, and in particular, to a privacy protection method and device, and a mobile terminal.
背景技术Background technique
在信息时代,随着信息量的加大,财产信息、隐私信息等个人信息的安全性逐渐成为人们关注的问题。由于手机等移动智能终端已经成为人们生活的必需品,而其往往会保存用户大量的个人信息,例如,银行账户信息、隐私照片等等。一旦移动终端丢失,用户的个人信息就可能存在泄露的风险,尤其是用户的财产信息和隐私信息等将受到极大的挑战,给用户带来极大的不变。In the information age, with the increase in the amount of information, the security of personal information such as property information and private information has gradually become a concern of people. Since mobile smart terminals such as mobile phones have become necessities of people's lives, they often store a large amount of personal information of users, such as bank account information, private photos, and so on. Once the mobile terminal is lost, the user's personal information may be at risk of leakage, especially the user's property information and privacy information will be greatly challenged, which will bring great changes to the user.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供一种隐私保护方法及装置、移动终端,以解决用户终端被他人使用所带来的个人信息等泄露的技术问题。Embodiments of the present invention provide a privacy protection method and device, and a mobile terminal, so as to solve the technical problem of leakage of personal information caused by the use of the user terminal by others.
本发明提供一种隐私保护方法,其包括:The present invention provides a privacy protection method, which includes:
获取预设时间内每个应用程序的使用时长;Get the usage time of each application within the preset time;
根据预设转换规则将所述使用时长生成系数向量;Generate a coefficient vector for the usage duration according to a preset conversion rule;
判断所述系数向量与系数矩阵是否满足预设关系,其中所述系数矩阵为根据用户使用每个所述应用程序的历史使用时长数据生成的矩阵;Judging whether the coefficient vector and the coefficient matrix satisfy a preset relationship, wherein the coefficient matrix is a matrix generated according to the historical usage duration data of each of the application programs used by the user;
若所述系数向量与所述系数矩阵满足所述预设关系,则进入隐私保护模式。If the coefficient vector and the coefficient matrix satisfy the preset relationship, the privacy protection mode is entered.
本发明还提供一种隐私保护装置,其包括:The present invention also provides a privacy protection device, which includes:
获取单元,用于获取预设时间内每个应用程序的使用时长;an acquisition unit, used to acquire the usage time of each application within a preset time;
转换单元,用于根据预设转换规则将所述使用时长生成系数向量;a conversion unit, configured to generate a coefficient vector for the duration of use according to a preset conversion rule;
判断单元,用于判断所述系数向量与系数矩阵是否满足预设关系,其中所述系数矩阵为根据用户使用每个所述应用程序的历史使用时长数据生成的矩阵;a judging unit for judging whether the coefficient vector and the coefficient matrix satisfy a preset relationship, wherein the coefficient matrix is a matrix generated according to the historical use duration data of each of the application programs used by the user;
隐私保护单元,用于若所述系数向量与所述系数矩阵满足所述预设关系,则进入隐私保护模式。A privacy protection unit, configured to enter a privacy protection mode if the coefficient vector and the coefficient matrix satisfy the preset relationship.
本发明又提供一种移动终端,其包括:The present invention further provides a mobile terminal, which includes:
存储有可执行程序代码的存储器;a memory in which executable program code is stored;
与所述存储器耦合的处理器;a processor coupled to the memory;
所述处理器调用所述存储器中存储的所述可执行程序代码,执行本发明提供的任一种隐私保护方法。The processor invokes the executable program code stored in the memory to execute any privacy protection method provided by the present invention.
本发明提供一种隐私保护方法及装置、移动终端。该隐私保护方法通过获取预设时间内每个应用程序的使用时长;根据预设转换规则将所述使用时长生成系数向量;判断所述系数向量与系数矩阵是否满足预设关系,其中所述系数矩阵为根据用户使用每个所述应用程序的历史使用时长数据生成的矩阵;若所述系数向量与所述系数矩阵满足所述预设关系,则进入隐私保护模式。该方法利用当前用户使用每个应用程序的使用时长来判断是否为机主本人,当判断出当前用户不是机主本人时,终端进入隐私保护模式,从而保护机主本人的个人信息的安全性,尤其是在终端丢失的情况下,可以在预设时间后使终端进入隐私保护模式,避免机主本人的个人信息长时间暴漏给他人。The present invention provides a privacy protection method and device, and a mobile terminal. The privacy protection method obtains the usage duration of each application within a preset time; generates a coefficient vector from the usage duration according to a preset conversion rule; determines whether the coefficient vector and the coefficient matrix satisfy a preset relationship, wherein the coefficient The matrix is a matrix generated according to the historical usage duration data of each application program used by the user; if the coefficient vector and the coefficient matrix satisfy the preset relationship, the privacy protection mode is entered. The method utilizes the usage time of each application program used by the current user to determine whether the user is the host himself. When it is determined that the current user is not the host himself, the terminal enters the privacy protection mode, thereby protecting the security of the personal information of the host himself. Especially when the terminal is lost, the terminal can be put into the privacy protection mode after a preset time, so as to prevent the personal information of the owner from being exposed to others for a long time.
附图说明Description of drawings
图1为本发明优选实施例中隐私保护方法的流程图。FIG. 1 is a flowchart of a privacy protection method in a preferred embodiment of the present invention.
图2为本发明优选实施例中隐私保护方法的又一流程图。FIG. 2 is another flowchart of the privacy protection method in the preferred embodiment of the present invention.
图3为本发明优选实施例中隐私保护装置的结构示意图。FIG. 3 is a schematic structural diagram of a privacy protection device in a preferred embodiment of the present invention.
图4为本发明优选实施例中隐私保护装置的另一结构示意图。FIG. 4 is another schematic structural diagram of the privacy protection device in the preferred embodiment of the present invention.
图5为本发明优选实施例中隐私保护装置的又一结构示意图。FIG. 5 is another structural schematic diagram of the privacy protection device in the preferred embodiment of the present invention.
图6为本发明的移动终端的结构示意图。FIG. 6 is a schematic structural diagram of a mobile terminal of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present invention.
本发明中的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。例如,在不脱离本发明的范围的情况下,可以将第一控件称为第二控件,且类似地,可将第二控件称为第一控件。第一控件与第二控件两者都是控件,但其不是同一控件。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。The terms "first", "second", etc. in the present invention may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, a first control could be termed a second control, and, similarly, a second control could be termed a first control, without departing from the scope of the present invention. Both the first control and the second control are controls, but they are not the same control. Furthermore, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion.
请参照图1,图1为本发明优选实施例中隐私保护方法的流程图。该隐私保护方法可以应用于个人计算机、手持式或膝上型设备、移动电话、个人数字助理(PDA)等电子设备上,在此不做具体限制。Please refer to FIG. 1 , which is a flowchart of a privacy protection method in a preferred embodiment of the present invention. The privacy protection method can be applied to electronic devices such as personal computers, handheld or laptop devices, mobile phones, personal digital assistants (PDAs), etc., which are not specifically limited herein.
下面对本优选实施例中的隐私保护方法做详细地说明。The privacy protection method in this preferred embodiment will be described in detail below.
一般来说,不同用户在终端内安装的应用程序不同,而且不同用户对每个应用程序使用时长也不同,因此可以采用用户使用每个应用程序的使用时长来表征用户习惯,从而根据使用时长来区分不同用户。Generally speaking, different users install different applications in the terminal, and different users use each application for different durations. Therefore, the user's usage duration of each application can be used to characterize the user's habits, so as to determine the usage duration according to the usage duration. Differentiate between different users.
为了可以通过使用时长来区分机主本人和其他用户,需要获取机主本人的历史使用时长数据,通过历史使用时长数据来描述机主本人使用应用程序的使用习惯。具体地,获取预设周期中多个预设时间内每个应用程序的历史使用时长数据以及预设周期中每个应用程序的历史使用时长数据的平均值。In order to distinguish the owner from other users by the usage time, it is necessary to obtain the historical usage time data of the owner, and use the historical usage data to describe the usage habits of the owner using the application. Specifically, the historical usage duration data of each application within a plurality of preset times in the preset period and the average value of the historical usage duration data of each application in the preset period are acquired.
在本优选实施例中,预设周期为30天,预设时间为1天,假设终端内安装有M款应用程序,那么终端将获取30天中每天每个应用程序的历史使用时长数据。可以理解的是,在30天中,每个应用程序将对应了30个历史使用时长数据,通过对每个应用程序对应的30个历史使用时长数据取平均值来获得30天内每个应用程序的历史使用时长数据的平均值。In this preferred embodiment, the preset period is 30 days, and the preset time is 1 day. Assuming that M types of applications are installed in the terminal, the terminal will obtain historical usage duration data of each application every day for 30 days. It is understandable that, in 30 days, each application will correspond to 30 historical usage time data, and by taking the average of the 30 historical usage data corresponding to each application to obtain the data of each application within 30 days. Average value of historical usage data.
需要说明的是,预设周期不局限于30天,还可以为更长或更短的周期。另外,预设时间也不局限于以天为单位。在其优选实施例中,也可以以时间段为单位,例如,预设时间可以为上午8点至晚上8点的12小时内等,在此不做具体限制。It should be noted that the preset period is not limited to 30 days, and may also be a longer or shorter period. In addition, the preset time is not limited to the unit of days. In its preferred embodiment, the unit may also be a time period. For example, the preset time may be within 12 hours from 8:00 am to 8:00 pm, etc., which is not specifically limited here.
终端根据这些历史使用时长数据生成历史使用时长矩阵。该历史使用时长矩阵包括M个行向量和30个列向量。每个行向量分别对应每个应用程序的30个历史使用时长数据,每个列向量对应了每天M个应用程序的历史使用时长数据。The terminal generates a historical usage duration matrix according to the historical usage duration data. The historical usage duration matrix includes M row vectors and 30 column vectors. Each row vector corresponds to 30 historical usage duration data of each application, and each column vector corresponds to the historical usage duration data of M applications per day.
若用字母A表示历史使用时长矩阵,则历史使用时长矩阵A表达式为:A=[X1,X2,...,X30]M×30。这里X1、X2和X30均为列向量,其分别表示为第一天、第二天和第30天机主本人使用各个应用程序的历史使用时长向量。为了清楚地表述历史使用时长向量的意义,下面给出历史使用时长向量X1的表达式:X1=[x1,x2,...,xM]T,其中,x1、x2和xM分别表示在第一天内第一款应用程序、第二款应用程序和第M款应用程序的历史使用时长数据。由于X2、X30等其余的列向量的表达式与X1的表达式的形式相同,为了说明书的简洁性,在此不进行一一列举。很容易理解的是,历史使用时长矩阵A的维数为M×30。If the letter A is used to represent the historical usage duration matrix, the historical usage duration matrix A is expressed as: A=[X1 , X2 , . . . , X30 ]M×30 . Here, X1 , X2 , and X30 are all column vectors, which are respectively expressed as the historical usage duration vectors of each application used by the owner on the first day, the second day, and the 30th day. In order to clearly express the meaning of the historical usage duration vector, the expression of the historical usage duration vector X1 is given below: X1 =[x1 ,x2 ,...,xM ]T , where x1 , x2 and xM represent the historical usage time data of the first app, the second app, and the M-th app in the first day, respectively. Since the expressions of the remaining column vectors such as X2 , X30 and the like are the same as the expressions of X1 , they are not listed here for the sake of brevity of the description. It is easy to understand that the dimension of the historical usage duration matrix A is M×30.
在获取到历史使用时长矩阵A后,将对历史使用时长矩阵A的每个行向量中的元素取平均值操作,从而获得在30天内每个应用程序的历史使用时长数据的平均值。为了便于理解,用表示M款应用程序的历史使用时长数据的平均值向量,的表达式为:其中,和分别表示在30天内第一款应用程序、第二款应用程序和第M款应用程序的历史使用时长数据的平均值。很容易理解的是,平均值向量的维数为M×1。After obtaining the historical usage duration matrix A, average the elements in each row vector of the historical usage duration matrix A, so as to obtain the average value of the historical usage duration data of each application within 30 days. For ease of understanding, use represents the average vector of historical usage time data of M apps, The expression is: in, and Represents the average of the historical usage data of the first app, the second app, and the Mth app in 30 days. It is easy to understand that the mean vector The dimension of is M×1.
将平均值向量变换成维数为M×30的平均值矩阵其中,平均值矩阵的每个列向量均为平均值向量也就是说,平均值矩阵是以30个平均值向量为列向量的矩阵。the mean vector Transform into an average matrix of dimension M × 30 where the mean matrix Each column vector of is a mean vector That is, the mean matrix is a vector of 30 averages is a matrix of column vectors.
本优选实施例中,采用历史使用时长数据与所述平均值之差生成用于表征机主本人使用应用程序习惯的特征矩阵。具体地,将历史使用时长矩阵A与平均值矩阵做差生成特征矩阵。用字母B表示特征矩阵,表达式为In this preferred embodiment, the difference between the historical usage duration data and the average is used to generate a feature matrix that is used to represent the habit of the owner himself in using the application program. Specifically, compare the historical usage time matrix A with the average matrix Do the difference to generate the feature matrix. The character matrix is represented by the letter B, and the expression is
在获得用户使用习惯的特征矩阵B后,将对该特征矩阵B进行求解,从而获得该特征矩阵B的特征值和特征向量。可以理解的是,特征值的数量为30个,特征向量的个数也为30个。在本优选实施例中,将30个特征向量生成一个特征向量矩阵。After the characteristic matrix B of the user's usage habits is obtained, the characteristic matrix B is solved to obtain the characteristic value and characteristic vector of the characteristic matrix B. It can be understood that the number of eigenvalues is 30, and the number of eigenvectors is also 30. In this preferred embodiment, 30 eigenvectors are generated into one eigenvector matrix.
具体地,特征向量矩阵中的30个特征向量按照对应的特征值从大到小的顺序排列,即最大特征值对应的特征向量为特征向量矩阵的第一个列向量,最小特征值对应的特征向量为特征向量矩阵的最后一个列向量,其他的28个特征向量按照对应的特征值大小进行排列放置,从而形成特征向量矩阵。Specifically, the 30 eigenvectors in the eigenvector matrix are arranged in descending order of the corresponding eigenvalues, that is, the eigenvector corresponding to the largest eigenvalue is the first column vector of the eigenvector matrix, and the eigenvector corresponding to the smallest eigenvalue is the first column vector of the eigenvector matrix. The vector is the last column vector of the eigenvector matrix, and the other 28 eigenvectors are arranged according to the corresponding eigenvalues to form the eigenvector matrix.
若特征向量矩阵用表式,特征向量矩阵的表达式为:可以理解的是,每个特征向量均为一个30×1的列向量(如:为一个30×1的列向量),那么特征向量矩阵的维数为30×30。If the eigenvector matrix is used table, eigenvector matrix The expression is: Understandably, each feature vector is a 30×1 column vector (eg: is a 30×1 column vector), then the eigenvector matrix The dimension is 30×30.
将特征矩阵B映射到特征向量矩阵以生成系数矩阵。具体地,系数矩阵等于特征向量的转置右乘以特征矩阵B。可以理解的是,系数矩阵的维数为30×30,这样在后续进行判断时,会导致终端计算量较大,占用终端内中央处理器较多,使得终端出现卡顿等问题。map eigenmatrix B to eigenvector matrix to generate the coefficient matrix. Specifically, the coefficient matrix is equal to the transpose right of the eigenvector multiplied by the eigenmatrix B. It can be understood that the dimension of the coefficient matrix is 30×30, which will result in a large amount of calculation in the terminal, occupy a lot of the central processing unit in the terminal, and cause the terminal to freeze and other problems when making subsequent judgments.
一般采用几个特征向量即可以描述机主本人的使用习惯。因此,为了降低终端的计算量,我们选取特征向量矩阵的前N个列向量生成一个新的特征向量矩阵,新的特征向量矩阵用表示,其表达式为:可以理解的是,当N取30时,新的特征向量矩阵将与特征向量矩阵相同。Generally, several feature vectors can be used to describe the usage habits of the owner himself. Therefore, in order to reduce the calculation amount of the terminal, we choose the eigenvector matrix The first N column vectors of to generate a new eigenvector matrix, the new eigenvector matrix is means, its expression is: It is understandable that when N takes 30, the new eigenvector matrix will be with the eigenvector matrix same.
将特征矩阵B映射到新的特征向量矩阵以生成系数矩阵,其中,系数矩阵用W表示,其表达式为一般来说,N的取值在2至5范围内,因此,系数矩阵的维数相对减少,大大降低终端的计算量,提高计算速度,避免占用过多的中央处理器。Map the eigenmatrix B to a new eigenvector matrix to generate a coefficient matrix, where the coefficient matrix is denoted by W and its expression is Generally speaking, the value of N is in the range of 2 to 5. Therefore, the dimension of the coefficient matrix is relatively reduced, which greatly reduces the calculation amount of the terminal, improves the calculation speed, and avoids occupying too much central processing unit.
由于不同用户的使用习惯不同,N值也不同,若采用相同的N值来描述不同的机主本人的习惯,那么势必会降低准确率。为了可以找到与机主本人对应的N值,下面将给出计算N值的步骤。Due to the different usage habits of different users, the N value is also different. If the same N value is used to describe the habits of different owners, the accuracy will inevitably be reduced. In order to find the N value corresponding to the owner himself, the steps for calculating the N value will be given below.
获取机主本人在某一个预设时间内每个应用程序的历史使用时长数据。在本优选实施例中,获取第31天内机主本人使用每个应用程序的历史使用时长数据。在此可以将第31天划分到预设周期内,即预设周期为从30天变为31天,前30天的历史使用时长数据用于计算获取系数矩阵,第31天的历史使用时长数据用于计算N值。当然也可以采用31天中任意30天的历史使用时长数据来计算获取系数矩阵,剩余一天的历史使用时长数据用于计算N值,在此不做具体限制。Get the historical usage time data of each application within a preset period of time by the owner. In this preferred embodiment, the historical usage duration data of each application program used by the owner himself within the 31st day is obtained. Here, the 31st day can be divided into a preset period, that is, the preset period is changed from 30 days to 31 days, the historical usage time data of the first 30 days is used to calculate the acquisition coefficient matrix, and the historical usage time data of the 31st day Used to calculate the N value. Of course, the historical usage duration data of any 30 days in the 31 days can also be used to calculate and obtain the coefficient matrix, and the historical usage duration data of the remaining day is used to calculate the N value, which is not limited here.
根据第31天的历史使用时长数据生成历史使用时长向量X31,历史使用时长向量X31为一个M×1的列向量,每个元素对应一款应用程序的历史使用时长数据。The historical usage duration vector X31 is generated according to the historical usage duration data on the 31st day. The historical usage duration vector X31 is an M×1 column vector, and each element corresponds to the historical usage duration data of an application.
N值为使得历史使用时长向量X31和系数矩阵满足第一预设关系的最小值。具体地,其中,第一预设阈值ε1可以根据实际情况进行选取,一般第一预设阈值ε1取值越小,表征用户行为习惯的精度越高。The value of N is the minimum value that makes the historical use duration vector X31 and the coefficient matrix satisfy the first preset relationship. specifically, The first preset threshold ε1 may be selected according to the actual situation. Generally, the smaller the value of the first preset threshold ε1 is, the higher the accuracy of characterizing the user's behavioral habits is.
在获取到N值后,将N值带入新的特征向量矩阵和系数矩阵W中,就可以获得最终的新的特征向量矩阵和系数矩阵W的表达式。After getting the N value, bring the N value into the new eigenvector matrix and coefficient matrix W, the final new eigenvector matrix can be obtained and the expression for the coefficient matrix W.
在步骤S101中,获取预设时间内每个应用程序的使用时长;In step S101, the usage duration of each application within a preset time is obtained;
在本优选实施例中,获取当前用户在一天时间内使用每款应用程序的使用时长。例如,当前用户在一天内多次使用“微信”应用,终端就会获取一天时间内每次使用“微信”应用的时长,并将多个使用“微信”应用的时长求和作为该“微信”应用的使用时长;而对于一些未使用的应用程序,终端将会获取到未使用的应用程序的使用时长为零。In this preferred embodiment, the usage time of each application program used by the current user in one day is obtained. For example, if the current user uses the "WeChat" application multiple times in one day, the terminal will obtain the duration of each use of the "WeChat" application within one day, and the sum of the durations of multiple "WeChat" applications will be used as the "WeChat" The usage time of the application; for some unused applications, the terminal will obtain the usage time of the unused application as zero.
可以理解的是,当终端中有M款应用程序时,终端每天都会获取M个使用时长,这M个使用时长对应了这M款应用程序。当终端获取到M个使用时长后,将根据M个使用时长生成使用时长向量。It is understandable that when there are M types of application programs in the terminal, the terminal acquires M usage durations every day, and the M usage durations correspond to the M applications. After the terminal obtains the M usage durations, it will generate a usage duration vector according to the M usage durations.
在本优选实施例中,用Xλ表示使用时长向量,则使用时长向量Xλ表示为Xλ=[xλ1,xλ2,...,xλM]T,其中,xλ1表示预设时间内第一款应用程序的使用时长,xλ2表示预设时间内第二款应用程序的使用时长,xλM表示预设时间内第M款应用程序的使用时长。在本优选实施例中,使用时长向量Xλ为一个M×1的列向量。当然在其他实施例中,使用时长向量也可以为行向量,在此不做具体限制。In this preferred embodiment, Xλ is used to represent the use duration vector, then the use duration vector Xλ is represented as Xλ =[xλ1 ,xλ2 ,...,xλM ]T , where xλ1 represents the preset time The usage time of the first application in the system, xλ2 represents the usage time of the second application within the preset time, and xλM represents the usage time of the M-th application within the preset time. In this preferred embodiment, the duration vector Xλ is an M×1 column vector. Of course, in other embodiments, the use duration vector may also be a row vector, which is not specifically limited here.
在步骤S102中,根据预设转换规则将所述使用时长生成系数向量;In step S102, a coefficient vector is generated from the use duration according to a preset conversion rule;
在本优选实施例中,根据预设转换规则将所述使用时长生成系数向量具体为:根据预设转换规则将所述使用时长向量转换为系数向量。预设转换规则为一降维系数关系式。具体地,以P表示系数向量,那么根据预设转换规则,系数向量P与使用时长向量Xλ之间的转换关系为:In this preferred embodiment, generating the coefficient vector for the usage duration according to the preset conversion rule is specifically: converting the usage duration vector into a coefficient vector according to the preset conversion rule. The preset conversion rule is a dimensionality reduction coefficient relationship. Specifically, the coefficient vector is represented by P, then according to the preset conversion rule, the conversion relationship between the coefficient vector P and the use duration vector Xλ is:
通过上述预设转换规则后,维数为M×1的使用时长向量Xλ转换至维数为N×1的系数向量P。一般来说,N的取值在2至5之间,因此,通过上述预设转换规则的转换后,生成的系数向量P的维数将大大降低,从而降低终端的计算量,减少对中央处理器的占用时间。After passing the above-mentioned preset conversion rules, the use duration vector Xλ with dimension M×1 is converted into coefficient vector P with dimension N×1. Generally speaking, the value of N is between 2 and 5. Therefore, after the conversion by the above preset conversion rules, the dimension of the generated coefficient vector P will be greatly reduced, thereby reducing the calculation amount of the terminal and reducing the need for central processing. the occupied time of the device.
在步骤S103中,判断所述系数向量与系数矩阵是否满足预设关系,其中所述系数矩阵为根据用户使用每个所述应用程序的历史使用时长数据生成的矩阵;In step S103, it is judged whether the coefficient vector and the coefficient matrix satisfy a preset relationship, wherein the coefficient matrix is a matrix generated according to the historical usage duration data of each application program used by the user;
在本优选实施例中,判断系数向量与系数矩阵是否满足预设关系,具体包括:判断系数向量中的元素与系数矩阵中的元素之差的平方和是否大于第二预设阈值。也就是说,判断系数向量中的元素与系数矩阵中的元素是否满足如下关系:In this preferred embodiment, judging whether the coefficient vector and the coefficient matrix satisfy a preset relationship specifically includes: judging whether the sum of the squares of the differences between the elements in the coefficient vector and the elements in the coefficient matrix is greater than a second preset threshold. That is to say, it is judged whether the elements in the coefficient vector and the elements in the coefficient matrix satisfy the following relationship:
其中ε2为第二预设阈值。若系数向量中的元素与系数矩阵中的元素之差的平方和大于第二预设阈值ε2,则判定系数向量与系数矩阵满足预设关系。 where ε2 is the second preset threshold. If the sum of the squares of the differences between the elements in the coefficient vector and the elements in the coefficient matrix is greater than the second preset threshold ε2 , it is determined that the coefficient vector and the coefficient matrix satisfy the preset relationship.
在步骤S104中,若所述系数向量与所述系数矩阵满足所述预设关系,则进入隐私保护模式。In step S104, if the coefficient vector and the coefficient matrix satisfy the preset relationship, the privacy protection mode is entered.
若系数向量与系数矩阵满足预设关系,则说明当前用户不是机主本人。为了保护机主本人的个人信息的安全性,终端将进入隐私保护模式。本优选实施例中的隐私保护方法,尤其在终端丢失的情况下,可以在预设时间后使终端进入隐私保护模式,避免机主本人的个人信息长时间暴漏给他人,不给他人进行非法操作留下时间,间接地保护了机主本人的个人信息的安全。If the coefficient vector and the coefficient matrix satisfy the preset relationship, it means that the current user is not the machine owner. In order to protect the security of the owner's personal information, the terminal will enter the privacy protection mode. The privacy protection method in this preferred embodiment, especially when the terminal is lost, can make the terminal enter the privacy protection mode after a preset time, so as to prevent the personal information of the owner from being leaked to others for a long time, and not to illegally conduct illegal activities for others. The operation leaves time and indirectly protects the security of the owner's personal information.
在此,隐私保护模式可以为仅部分功能可以使用模式,其他涉及机主个人信息的功能无法访问。例如,在隐私保护模式中,当前用户只能拨打电话,而无法查看通讯录、相册、使用应用程序等功能。当然,隐私保护模式不局限于上述形式,也可以采用其他形式,在此不做具体限制。Here, the privacy protection mode can be a mode where only some functions can be used, and other functions involving the owner's personal information cannot be accessed. For example, in the privacy protection mode, the current user can only make calls, but cannot view functions such as contacts, photo albums, and applications. Of course, the privacy protection mode is not limited to the above forms, and other forms can also be used, which are not specifically limited here.
另外,隐私保护模式也可以根据机主本人的选择设置来生成。例如,机主本人将相册、银行应用程序设置在隐私保护模式中,那么当其他用户使用该终端时,其他用户将无法访问相册和银行应用程序,但可以访问通讯录、聊天应用程序等未设置在隐私保护模式中的功能。In addition, the privacy protection mode can also be generated according to the selection settings of the owner. For example, if the owner himself sets the photo album and banking application in the privacy protection mode, when other users use the terminal, other users will not be able to access the photo album and banking application, but can access the address book, chat application, etc. Function in privacy protection mode.
本优选实施例中的隐私保护方法,其通过获取预设时间内每个应用程序的使用时长;根据预设转换规则将所述使用时长生成系数向量;判断所述系数向量与系数矩阵是否满足预设关系;若所述系数向量与所述系数矩阵满足所述预设关系,则进入隐私保护模式。该方法利用当前用户使用每个应用程序的使用时长来判断是否为机主本人,当判断出当前用户不是机主本人时,终端进入隐私保护模式,从而保护机主本人的个人信息的安全性。In the privacy protection method in this preferred embodiment, the usage duration of each application program within a preset time is obtained; a coefficient vector is generated from the usage duration according to a preset conversion rule; and whether the coefficient vector and the coefficient matrix meet the predetermined requirements Set the relationship; if the coefficient vector and the coefficient matrix satisfy the preset relationship, enter the privacy protection mode. The method uses the duration of each application program used by the current user to determine whether the user is the owner. When it is determined that the current user is not the owner, the terminal enters the privacy protection mode, thereby protecting the security of the owner's personal information.
请参照图2,图2为本发明优选实施例中隐私保护方法的又一流程图。该隐私保护方法可以应用于个人计算机、手持式或膝上型设备、移动电话、个人数字助理(PDA)等电子设备上,在此不做具体限制。Please refer to FIG. 2 , which is another flowchart of the privacy protection method in the preferred embodiment of the present invention. The privacy protection method can be applied to electronic devices such as personal computers, handheld or laptop devices, mobile phones, personal digital assistants (PDAs), etc., which are not specifically limited herein.
下面对本优选实施例中的隐私保护方法做详细地说明。The privacy protection method in this preferred embodiment will be described in detail below.
在步骤S201中,获取预设周期中多个所述预设时间内每个所述应用程序的历史使用时长数据以及所述预设周期中每个所述应用程序的历史使用时长数据的平均值;In step S201, obtain the historical usage duration data of each of the application programs within a plurality of preset periods in the preset period and the average value of the historical usage duration data of each of the application programs in the preset period ;
一般来说,不同用户在终端内安装的应用程序不同,而且不同用户对每个应用程序使用时长也不同,因此可以采用用户使用每个应用程序的使用时长来表征用户习惯,从而根据使用时长来区分不同用户。Generally speaking, different users install different applications in the terminal, and different users use each application for different durations. Therefore, the user's usage duration of each application can be used to characterize the user's habits, so as to determine the usage duration according to the usage duration. Differentiate between different users.
为了可以通过使用时长来区分机主本人和其他用户,需要获取机主本人的历史使用时长数据,通过历史使用时长数据来描述机主本人使用应用程序的使用习惯。具体地,获取预设周期中多个预设时间内每个应用程序的历史使用时长数据以及预设周期中每个应用程序的历史使用时长数据的平均值。In order to distinguish the owner from other users by the usage time, it is necessary to obtain the historical usage time data of the owner, and use the historical usage data to describe the usage habits of the owner using the application. Specifically, the historical usage duration data of each application within a plurality of preset times in the preset period and the average value of the historical usage duration data of each application in the preset period are acquired.
在本优选实施例中,预设周期为30天,预设时间为1天,假设终端内安装有M款应用程序,那么终端将获取30天中每天每个应用程序的历史使用时长数据。可以理解的是,在30天中,每个应用程序将对应了30个历史使用时长数据,通过对每个应用程序对应的30个历史使用时长数据取平均值来获得30天内每个应用程序的历史使用时长数据的平均值。In this preferred embodiment, the preset period is 30 days, and the preset time is 1 day. Assuming that M types of applications are installed in the terminal, the terminal will obtain historical usage duration data of each application every day for 30 days. It is understandable that, in 30 days, each application will correspond to 30 historical usage time data, and by taking the average of the 30 historical usage data corresponding to each application to obtain the data of each application within 30 days. Average value of historical usage data.
需要说明的是,预设周期不局限于30天,还可以为更长或更短的周期。另外,预设时间也不局限于以天为单位。在其优选实施例中,也可以以时间段为单位,例如,预设时间可以为上午8点至晚上8点的12小时内等,在此不做具体限制。It should be noted that the preset period is not limited to 30 days, and may also be a longer or shorter period. In addition, the preset time is not limited to the unit of days. In its preferred embodiment, the unit may also be a time period. For example, the preset time may be within 12 hours from 8:00 am to 8:00 pm, etc., which is not specifically limited here.
根据这些历史使用时长数据生成历史使用时长矩阵。该历史使用时长矩阵包括M个行向量和30个列向量。每个行向量分别对应每个应用程序的30个历史使用时长数据,每个列向量对应了每天M个应用程序的历史使用时长数据。A historical usage duration matrix is generated based on these historical usage duration data. The historical usage duration matrix includes M row vectors and 30 column vectors. Each row vector corresponds to 30 historical usage duration data of each application, and each column vector corresponds to the historical usage duration data of M applications per day.
若用字母A表示历史使用时长矩阵,则历史使用时长矩阵A表达式为:A=[X1,X2,...,X30]M×30。这里X1、X2和X30均为列向量,其分别表示为第一天、第二天和第30天机主本人使用各个应用程序的历史使用时长向量。为了清楚地表述历史使用时长向量的意义,下面给出历史使用时长向量X1的表达式:X1=[x1,x2,...,xM]T,其中,x1、x2和xM分别表示在第一天内第一款应用程序、第二款应用程序和第M款应用程序的历史使用时长数据。由于X2、X30等其余的列向量的表达式与X1的表达式的形式相同,为了说明书的简洁性,在此不进行一一列举。很容易理解的是,历史使用时长矩阵A的维数为M×30。If the letter A is used to represent the historical usage duration matrix, the historical usage duration matrix A is expressed as: A=[X1 , X2 , . . . , X30 ]M×30 . Here, X1 , X2 , and X30 are all column vectors, which are respectively expressed as the historical usage duration vectors of each application used by the owner on the first day, the second day, and the 30th day. In order to clearly express the meaning of the historical usage duration vector, the expression of the historical usage duration vector X1 is given below: X1 =[x1 ,x2 ,...,xM ]T , where x1 , x2 and xM represent the historical usage time data of the first app, the second app, and the M-th app in the first day, respectively. Since the expressions of the remaining column vectors such as X2 , X30 and the like are the same as the expressions of X1 , they are not listed here for the sake of brevity of the description. It is easy to understand that the dimension of the historical usage duration matrix A is M×30.
在获取到历史使用时长矩阵A后,将对历史使用时长矩阵A的每个行向量中的元素取平均值操作,从而获得在30天内每个应用程序的历史使用时长数据的平均值。为了便于理解,用表示M款应用程序的历史使用时长数据的平均值向量,的表达式为:其中,和分别表示在30天内第一款应用程序、第二款应用程序和第M款应用程序的历史使用时长数据的平均值。很容易理解的是,平均值向量的维数为M×1。After obtaining the historical usage duration matrix A, average the elements in each row vector of the historical usage duration matrix A, so as to obtain the average value of the historical usage duration data of each application within 30 days. For ease of understanding, use represents the average vector of historical usage time data of M apps, The expression is: in, and Represents the average of the historical usage data of the first app, the second app, and the Mth app in 30 days. It is easy to understand that the mean vector The dimension of is M×1.
将平均值向量变换成维数为M×30的平均值矩阵其中,平均值矩阵的每个列向量均为平均值向量也就是说,平均值矩阵是以30个平均值向量为列向量的矩阵。the mean vector Transform into an average matrix of dimension M × 30 where the mean matrix Each column vector of is a mean vector That is, the mean matrix is a vector of 30 averages is a matrix of column vectors.
在步骤S202中,根据所述历史使用时长数据与所述平均值之差生成特征矩阵,其中所述特征矩阵用于表征用户使用所述应用程序的习惯;In step S202, a feature matrix is generated according to the difference between the historical usage duration data and the average value, wherein the feature matrix is used to represent the user's habit of using the application;
本优选实施例中,采用历史使用时长数据与所述平均值之差生成用于表征机主本人使用应用程序习惯的特征矩阵。具体地,将历史使用时长矩阵A与平均值矩阵做差生成特征矩阵。用字母B表示特征矩阵,表达式为In this preferred embodiment, the difference between the historical usage duration data and the average is used to generate a feature matrix that is used to represent the habit of the owner himself in using the application program. Specifically, compare the historical usage time matrix A with the average matrix Do the difference to generate the feature matrix. The character matrix is represented by the letter B, and the expression is
在步骤S203中,计算所述特征矩阵的特征向量矩阵;In step S203, calculate the eigenvector matrix of the eigenmatrix;
在获得用户使用习惯的特征矩阵B后,将对该特征矩阵B进行求解,从而获得该特征矩阵B的特征值和特征向量。可以理解的是,特征值的数量为30个,特征向量的个数也为30个。在本优选实施例中,将30个特征向量生成一个特征向量矩阵。After the characteristic matrix B of the user's usage habits is obtained, the characteristic matrix B is solved to obtain the characteristic value and characteristic vector of the characteristic matrix B. It can be understood that the number of eigenvalues is 30, and the number of eigenvectors is also 30. In this preferred embodiment, 30 eigenvectors are generated into one eigenvector matrix.
具体地,特征向量矩阵中的30个特征向量按照对应的特征值从大到小的顺序排列,即最大特征值对应的特征向量为特征向量矩阵的第一个列向量,最小特征值对应的特征向量为特征向量矩阵的最后一个列向量,其他的28个特征向量按照对应的特征值大小进行排列放置,从而形成特征向量矩阵。Specifically, the 30 eigenvectors in the eigenvector matrix are arranged in descending order of the corresponding eigenvalues, that is, the eigenvector corresponding to the largest eigenvalue is the first column vector of the eigenvector matrix, and the eigenvector corresponding to the smallest eigenvalue is the first column vector of the eigenvector matrix. The vector is the last column vector of the eigenvector matrix, and the other 28 eigenvectors are arranged according to the corresponding eigenvalues to form the eigenvector matrix.
若特征向量矩阵用表式,特征向量矩阵的表达式为:可以理解的是,每个特征向量均为一个30×1的列向量(如:为一个30×1的列向量),那么特征向量矩阵的维数为30×30。If the eigenvector matrix is used table, eigenvector matrix The expression is: Understandably, each feature vector is a 30×1 column vector (eg: is a 30×1 column vector), then the eigenvector matrix The dimension is 30×30.
在步骤S204中,将所述特征矩阵映射到所述特征向量矩阵以生成系数矩阵;In step S204, the feature matrix is mapped to the feature vector matrix to generate a coefficient matrix;
将特征矩阵B映射到特性向量矩阵以生成系数矩阵。具体地,系数矩阵等于特征向量的转置右乘以特征矩阵B。可以理解的是,系数矩阵的维数为30×30,这样在后续进行判断时,会导致终端计算量较大,占用终端内中央处理器较多,使得终端出现卡顿等问题。Map the feature matrix B to the feature vector matrix to generate the coefficient matrix. Specifically, the coefficient matrix is equal to the transpose right of the eigenvector multiplied by the eigenmatrix B. It can be understood that the dimension of the coefficient matrix is 30×30, which will result in a large amount of calculation in the terminal, occupy a lot of the central processing unit in the terminal, and cause the terminal to freeze and other problems when making subsequent judgments.
一般采用几个特征向量即可以描述机主本人的使用习惯。因此,为了降低终端的计算量,我们选取特征向量矩阵的前N个列向量生成一个新的特征向量矩阵,新的特征向量矩阵用表示,其表达式为:可以理解的是,当N取30时,新的特征向量矩阵将与特征向量矩阵相同。Generally, several feature vectors can be used to describe the usage habits of the owner himself. Therefore, in order to reduce the calculation amount of the terminal, we choose the eigenvector matrix The first N column vectors of to generate a new eigenvector matrix, the new eigenvector matrix is means, its expression is: It is understandable that when N takes 30, the new eigenvector matrix will be with the eigenvector matrix same.
将特征矩阵B映射到新的特征向量矩阵以生成系数矩阵,其中,系数矩阵用W表示,其表达式为一般来说,N的取值在2至5范围内,因此,系数矩阵的维数相对减少,大大降低终端的计算量,提高计算速度,避免占用过多的中央处理器。Map the eigenmatrix B to a new eigenvector matrix to generate a coefficient matrix, where the coefficient matrix is denoted by W and its expression is Generally speaking, the value of N is in the range of 2 to 5. Therefore, the dimension of the coefficient matrix is relatively reduced, which greatly reduces the calculation amount of the terminal, improves the calculation speed, and avoids occupying too much central processing unit.
由于不同用户的使用习惯不同,N值也不同,若采用相同的N值来描述不同的机主本人的习惯,那么势必会降低准确率。为了可以找到与机主本人对应的N值,下面将给出计算N值的步骤。Due to the different usage habits of different users, the N value is also different. If the same N value is used to describe the habits of different owners, the accuracy will inevitably be reduced. In order to find the N value corresponding to the owner himself, the steps for calculating the N value will be given below.
获取机主本人在某一个预设时间内每个应用程序的历史使用时长数据。在本优选实施例中,获取第31天内每个应用程序的历史使用时长数据,在此可以将第31天划分到预设周期内,即预设周期为从30天变为31天,前30天的历史使用时长数据用于计算获取系数矩阵,第31天的历史使用时长数据用于计算N值。当然也可以采用31天中任意30天的历史使用时长数据来计算获取系数矩阵,剩余一天的历史使用时长数据用于计算N值,在此不做具体限制。Get the historical usage time data of each application within a preset period of time by the owner. In this preferred embodiment, the historical usage duration data of each application within the 31st day is obtained, and the 31st day can be divided into a preset period, that is, the preset period is changed from 30 days to 31 days, and the first 30 days The historical usage duration data of the day is used to calculate the acquisition coefficient matrix, and the historical usage duration data of the 31st day is used to calculate the N value. Of course, the historical usage duration data of any 30 days in the 31 days can also be used to calculate and obtain the coefficient matrix, and the historical usage duration data of the remaining day is used to calculate the N value, which is not limited here.
根据第31天的历史使用时长数据生成历史使用时长向量X31,历史使用时长向量X31为一个M×1的列向量,每个元素对应一款应用程序的历史使用时长数据。The historical usage duration vector X31 is generated according to the historical usage duration data on the 31st day. The historical usage duration vector X31 is an M×1 column vector, and each element corresponds to the historical usage duration data of an application.
N值为使得历史使用时长向量X31和系数矩阵满足第一预设关系的最小值。具体地,其中,第一预设阈值ε1可以根据实际情况进行选取,一般第一预设阈值ε1取值越小,表征用户行为习惯的精度越高。The value of N is the minimum value that makes the historical use duration vector X31 and the coefficient matrix satisfy the first preset relationship. specifically, The first preset threshold ε1 may be selected according to the actual situation. Generally, the smaller the value of the first preset threshold ε1 is, the higher the accuracy of characterizing the user's behavioral habits is.
在获取到N值后,将N值带入新的特征向量矩阵和系数矩阵W中,就可以获得最终的新的特征向量矩阵和系数矩阵W的表达式。After getting the N value, bring the N value into the new eigenvector matrix and coefficient matrix W, the final new eigenvector matrix can be obtained and the expression for the coefficient matrix W.
在步骤S205中,获取预设时间内每个应用程序的使用时长;In step S205, obtain the usage duration of each application within a preset time;
在本优选实施例中,获取当前用户在预设时间内(如:1天内)使用每个应用程序的使用时长。例如,当前用户在一天内多次使用“微信”应用,终端就会获取一天时间内每次使用“微信”应用的时长,并将多个使用“微信”应用的时长求和作为该“微信”应用的使用时长;而对于一些未使用的应用程序,终端将会获取到未使用的应用程序的使用时长为零。In this preferred embodiment, the usage duration of each application program used by the current user within a preset time (eg, one day) is acquired. For example, if the current user uses the "WeChat" application multiple times in one day, the terminal will obtain the duration of each use of the "WeChat" application within one day, and the sum of the durations of multiple "WeChat" applications will be used as the "WeChat" The usage time of the application; for some unused applications, the terminal will obtain the usage time of the unused application as zero.
可以理解的是,当终端中有M款应用程序时,终端每天都会获取M个使用时长,这M个使用时长对应了这M款应用程序。当终端获取到M个使用时长后,将根据M个使用时长生成使用时长向量。It is understandable that when there are M types of application programs in the terminal, the terminal acquires M usage durations every day, and the M usage durations correspond to the M applications. After the terminal obtains the M usage durations, it will generate a usage duration vector according to the M usage durations.
在本优选实施例中,用Xλ表示使用时长向量,则使用时长向量Xλ表示为Xλ=[xλ1,xλ2,...,xλM]T,其中,xλ1表示预设时间内第一款应用程序的使用时长,xλ2表示预设时间内第二款应用程序的使用时长,xλM表示预设时间内第M款应用程序的使用时长。在本优选实施例中,使用时长向量Xλ为一个M×1的列向量。当然在其他实施例中,使用时长向量也可以为行向量,在此不做具体限制。In this preferred embodiment, Xλ is used to represent the use duration vector, then the use duration vector Xλ is represented as Xλ =[xλ1 ,xλ2 ,...,xλM ]T , where xλ1 represents the preset time The usage time of the first application in the system, xλ2 represents the usage time of the second application within the preset time, and xλM represents the usage time of the M-th application within the preset time. In this preferred embodiment, the duration vector Xλ is an M×1 column vector. Of course, in other embodiments, the use duration vector may also be a row vector, which is not specifically limited here.
在步骤S206中,根据预设转换规则将所述使用时长生成系数向量;In step S206, a coefficient vector is generated from the use duration according to a preset conversion rule;
在本优选实施例中,根据预设转换规则将所述使用时长生成系数向量具体为:根据预设转换规则将所述使用时长向量转换为系数向量。预设转换规则为一降维系数关系式,即将使用时长向量Xλ的维数降低。具体地,以P表示系数向量,那么根据预设转换规则,系数向量P与使用时长向量Xλ之间的转换关系为:In this preferred embodiment, generating the coefficient vector for the usage duration according to the preset conversion rule is specifically: converting the usage duration vector into a coefficient vector according to the preset conversion rule. The preset conversion rule is a dimensionality reduction coefficient relationship, that is, the dimension of the use duration vector Xλ is reduced. Specifically, the coefficient vector is represented by P, then according to the preset conversion rule, the conversion relationship between the coefficient vector P and the use duration vector Xλ is:
通过上述预设转换规则后,维数为M×1的使用时长向量Xλ转换至维数为N×1的系数向量P。一般来说,N的取值在2至5之间,因此,通过上述预设转换规则的转换后,生成的系数向量P的维数将大大降低,从而降低终端的计算量,减少对中央处理器的占用时间。After passing the above-mentioned preset conversion rules, the use duration vector Xλ with dimension M×1 is converted into coefficient vector P with dimension N×1. Generally speaking, the value of N is between 2 and 5. Therefore, after the conversion by the above preset conversion rules, the dimension of the generated coefficient vector P will be greatly reduced, thereby reducing the calculation amount of the terminal and reducing the need for central processing. the occupied time of the device.
在步骤S207中,判断所述系数向量中的元素与所述系数矩阵中的元素之差的平方和是否大于预设阈值;若所述系数向量中的元素与所述系数矩阵中的元素之差的平方和大于所述预设阈值,则执行步骤S208;若所述系数向量中的元素与所述系数矩阵中的元素之差的平方和不大于所述预设阈值,则执行步骤S211;In step S207, it is judged whether the sum of the squares of the differences between the elements in the coefficient vector and the elements in the coefficient matrix is greater than a preset threshold; if the difference between the elements in the coefficient vector and the elements in the coefficient matrix is If the sum of squares of is greater than the preset threshold, step S208 is executed; if the sum of squares of the differences between the elements in the coefficient vector and the elements in the coefficient matrix is not greater than the preset threshold, step S211 is executed;
在本实施例中,判断系数向量中的元素与系数矩阵中的元素是否满足如下关系:其中ε2为预设阈值。若系数向量中的元素与系数矩阵中的元素之差的平方和大于预设阈值ε2,则说明当前用户可能不是机主本人,为了进一步确定当前用户是否为机主本人,终端将执行步骤S208。若系数向量中的元素与系数矩阵中的元素之差的平方和不大于预设阈值ε2,则说明当前用户是机主本人,此时终端将执行步骤S211。In this embodiment, it is judged whether the elements in the coefficient vector and the elements in the coefficient matrix satisfy the following relationship: where ε2 is the preset threshold. If the sum of the squares of the differences between the elements in the coefficient vector and the elements in the coefficient matrix is greater than the preset threshold ε2 , it means that the current user may not be the owner of the machine. In order to further determine whether the current user is the owner of the machine, the terminal will execute step S208 . If the sum of the squares of the differences between the elements in the coefficient vector and the elements in the coefficient matrix is not greater than the preset threshold ε2 , it means that the current user is the owner himself, and the terminal will execute step S211.
在步骤S208中,获取用户输入的身份验证信息;In step S208, obtain the identity verification information input by the user;
在步骤S207判断出当前用户可能不是机主本人的情况下,终端将弹出提示对话框,以提示当前用户输入其身份验证信息。在此,身份验证信息可以为用户名、电话号码、密码等,在此不做具体限制。In the case where it is determined in step S207 that the current user may not be the owner himself, the terminal will pop up a prompt dialog box to prompt the current user to input his identity verification information. Here, the authentication information may be a user name, a phone number, a password, etc., which are not specifically limited here.
在步骤S209中,判断所述身份验证信息是否与预设验证信息相匹配;In step S209, determine whether the identity verification information matches the preset verification information;
在获取到身份验证信息后,将判断该身份验证信息是否与预设验证信息相匹配;若该身份验证信息与预设验证信息相匹配,则说明当前用户为机主本人,此时当前用户可以正常使用终端;若身份验证信息与预设验证信息不匹配,则进一步说明当前用户不是机主本人,此时终端执行步骤S210。After the identity verification information is obtained, it will be judged whether the identity verification information matches the preset verification information; if the identity verification information matches the preset verification information, it means that the current user is the owner himself, and the current user can The terminal is used normally; if the identity verification information does not match the preset verification information, it further indicates that the current user is not the owner, and the terminal performs step S210 at this time.
在步骤S210中,若所述身份验证信息与预设验证信息不相匹配,则进入隐私保护模式;In step S210, if the identity verification information does not match the preset verification information, enter the privacy protection mode;
在通过步骤S209进一步判断出当前用户不是机主本人时,终端进入隐私保护模式,从而使得机主本人的个人信息不被其他用户看到,保证机主本人的个人信息的安全性。本优选实施例中的隐私保护方法,尤其在终端丢失的情况下,可以在预设时间后使终端进入隐私保护模式,避免机主本人的个人信息长时间暴漏给他人,不给他人进行非法操作留下时间,间接地保护了机主本人的个人信息的安全。When it is further determined through step S209 that the current user is not the owner, the terminal enters the privacy protection mode, so that the personal information of the owner is not seen by other users and the security of the owner's personal information is guaranteed. The privacy protection method in this preferred embodiment, especially when the terminal is lost, can make the terminal enter the privacy protection mode after a preset time, so as to prevent the personal information of the owner from being leaked to others for a long time, and not to illegally conduct illegal activities for others. The operation leaves time and indirectly protects the security of the owner's personal information.
在步骤S211中,保存所述使用时长至下一个所述预设周期内的历史使用时长数据。In step S211, the historical usage duration data of the usage duration to the next preset period is saved.
若步骤S207判断出系数向量中的元素与系数矩阵中的元素之差的平方和不大于预设阈值ε2,则说明当前用户是机主本人,此时当前用户可以正常使用终端。If it is determined in step S207 that the sum of the squares of the differences between the elements in the coefficient vector and the elements in the coefficient matrix is not greater than the preset threshold ε2 , it means that the current user is the owner himself, and the current user can use the terminal normally.
为了可以更加准确的将机主本人和其他用户区分开,机主本人的历史使用时长数据是非常重要的数据,其必须可以反映出机主本人的使用习惯才行。由于机主本人在不同阶段会使用不同的应用程序,或者不同阶段对每个应用程序的使用情况不同。若一直使用同一个预设周期内的历史使用时长数据,那么必然会降低根据使用时长区分不同用户的准确率,因此,终端需要间隔预设周期对历史使用时长数据进行更新。In order to more accurately distinguish the owner from other users, the historical usage data of the owner is very important data, which must reflect the usage habits of the owner. Because the owner himself will use different applications at different stages, or the usage of each application at different stages is different. If the historical usage duration data in the same preset period is used all the time, the accuracy of distinguishing different users according to the usage duration will inevitably decrease. Therefore, the terminal needs to update the historical usage duration data at preset intervals.
在终端判断出当前用户是机主本人后,将该使用时长保存在下一个预设周期内的历史使用时长数据,这样便于对预设周期内的历史使用时长数据进行更新。After the terminal determines that the current user is the owner, the usage duration is stored in the historical usage duration data in the next preset period, which facilitates updating the historical usage duration data in the preset period.
本优选实施例中的隐私保护方法,其利用当前用户使用每个应用程序的使用时长来判断是否为机主本人,当判断出当前用户可能不是机主本人时,通过获取身份验证信息进一步判断当前用户是否为机主本人。若判断出当前用户不是机主本人时,终端进入隐私保护模式,从而保护机主本人的个人信息的安全性。当判断出当前用户是机主本人时,终端保存此次使用时长向量至下一个预设周期内的历史使用时长数据,以便于按照预设周期更新历史使用时长数据,使得历史使用时长数据可以准确地表征机主本人的使用习惯,增加该方法判断的准确性。The privacy protection method in this preferred embodiment uses the duration of each application program used by the current user to determine whether the current user is the owner of the computer. Whether the user is the owner himself. If it is determined that the current user is not the owner, the terminal enters the privacy protection mode, so as to protect the security of the personal information of the owner. When judging that the current user is the owner, the terminal saves the current usage duration vector to the historical usage duration data in the next preset cycle, so as to update the historical usage duration data according to the preset cycle, so that the historical usage duration data can be accurate To characterize the usage habits of the owner himself, and increase the accuracy of the judgment of this method.
请参照图3,图3为本发明优选实施例的隐私保护装置的结构示意图。该隐私保护装置300可以应用于个人计算机、手持式或膝上型设备、移动电话、个人数字助理(PDA)等电子设备上,在此不做具体限制。Please refer to FIG. 3 , which is a schematic structural diagram of a privacy protection device according to a preferred embodiment of the present invention. The privacy protection apparatus 300 may be applied to electronic devices such as personal computers, handheld or laptop devices, mobile phones, personal digital assistants (PDAs), etc., which are not specifically limited herein.
本实施例中的隐私保护装置300包括:获取单元301、转换单元302、判断单元303和隐私保护单元304。其中,获取单元301用于获取预设时间内每个应用程序的使用时长;转换单元302用于根据预设转换规则将所述使用时长生成系数向量;判断单元303用于判断所述系数向量与系数矩阵是否满足预设关系,其中所述系数矩阵为根据用户使用每个所述应用程序的历史使用时长数据生成的矩阵;隐私保护单元304用于若所述系数向量与所述系数矩阵满足所述预设关系,则进入隐私保护模式。The privacy protection device 300 in this embodiment includes: an acquisition unit 301 , a conversion unit 302 , a judgment unit 303 and a privacy protection unit 304 . Wherein, the obtaining unit 301 is used to obtain the use duration of each application within a preset time; the conversion unit 302 is used to generate a coefficient vector for the use duration according to the preset conversion rule; the judgment unit 303 is used to judge the coefficient vector and the Whether the coefficient matrix satisfies the preset relationship, wherein the coefficient matrix is a matrix generated according to the historical use duration data of each of the application programs used by the user; the privacy protection unit 304 is used for if the coefficient vector and the coefficient matrix meet the requirements. If the preset relationship is selected, the privacy protection mode is entered.
下面对本优选实施例中的隐私保护装置300进行详细地说明。The privacy protection device 300 in this preferred embodiment will be described in detail below.
一般来说,不同用户在终端内安装的应用程序不同,而且不同用户对每个应用程序使用时长也不同,因此可以采用用户使用每个应用程序的使用时长来表征用户习惯,从而根据使用时长来区分不同用户。Generally speaking, different users install different applications in the terminal, and different users use each application for different durations. Therefore, the user's usage duration of each application can be used to characterize the user's habits, so as to determine the usage duration according to the usage duration. Differentiate between different users.
为了可以使得隐私保护装置300通过使用时长来区分机主本人和其他用户,隐私保护装置300需要获取机主本人的历史使用时长数据,通过历史使用时长数据来描述机主本人使用应用程序的使用习惯。In order to enable the privacy protection device 300 to distinguish the owner from other users according to the usage time, the privacy protection device 300 needs to obtain the historical usage duration data of the owner, and describe the usage habits of the owner using the application program through the historical usage data. .
在一优选实施例中,隐私保护装置300还包括获取映射单元,如图4所示。获取映射单元305包括获取子单元3051、生成子单元3052、计算子单元3053和映射子单元3054。In a preferred embodiment, the privacy protection apparatus 300 further includes an acquisition mapping unit, as shown in FIG. 4 . The acquisition and mapping unit 305 includes an acquisition subunit 3051 , a generation subunit 3052 , a calculation subunit 3053 and a mapping subunit 3054 .
获取子单元3051获取预设周期中多个预设时间内每个应用程序的历史使用时长数据以及预设周期中每个应用程序的历史使用时长数据的平均值。The acquiring subunit 3051 acquires the historical usage duration data of each application within a plurality of preset times in the preset period and the average value of the historical usage duration data of each application in the preset period.
在本优选实施例中,预设周期为30天,预设时间为1天,假设终端内安装有M款应用程序,那么获取子单元3051将获取30天中每天每个应用程序的历史使用时长数据。可以理解的是,在30天中,每个应用程序将对应了30个历史使用时长数据,通过对每个应用程序对应的30个历史使用时长数据取平均值来获得30天内每个应用程序的历史使用时长数据的平均值。In this preferred embodiment, the preset period is 30 days, and the preset time is 1 day. Assuming that M types of application programs are installed in the terminal, the acquisition subunit 3051 will acquire the historical usage time of each application program in each day of the 30 days data. It is understandable that, in 30 days, each application will correspond to 30 historical usage time data, and by taking the average of the 30 historical usage data corresponding to each application to obtain the data of each application within 30 days. Average value of historical usage data.
获取子单元3051根据这些历史使用时长数据生成历史使用时长矩阵。该历史使用时长矩阵包括M个行向量和30个列向量。每个行向量分别对应每个应用程序的30个历史使用时长数据,每个列向量对应了每天M个应用程序的历史使用时长数据。The acquiring subunit 3051 generates a historical usage duration matrix according to the historical usage duration data. The historical usage duration matrix includes M row vectors and 30 column vectors. Each row vector corresponds to 30 historical usage duration data of each application, and each column vector corresponds to the historical usage duration data of M applications per day.
若用字母A表示历史使用时长矩阵,则历史使用时长矩阵A表达式为:A=[X1,X2,...,X30]M×30。这里X1、X2和X30均为列向量,其分别表示为第一天、第二天和第30天机主本人使用各个应用程序的历史使用时长向量。历史使用时长向量X1的表达式:X1=[x1,x2,...,xM]T,其中,x1、x2和xM分别表示在第一天内第一款应用程序、第二款应用程序和第M款应用程序的历史使用时长数据。由于X2、X30等其余的列向量的表达式与X1的表达式的形式相同,为了说明书的简洁性,在此不进行一一列举。很容易理解的是,历史使用时长矩阵A的维数为M×30。If the letter A is used to represent the historical usage duration matrix, the historical usage duration matrix A is expressed as: A=[X1 , X2 , . . . , X30 ]M×30 . Here, X1 , X2 , and X30 are all column vectors, which are respectively expressed as the historical usage duration vectors of each application used by the owner on the first day, the second day, and the 30th day. The expression of the historical usage duration vector X1 : X1 =[x1 ,x2 ,...,xM ]T , where x1 , x2 and xM respectively represent the first application in the first day Historical usage data for the program, the second application, and the M-th application. Since the expressions of the remaining column vectors such as X2 , X30 and the like are the same as the expressions of X1 , they are not listed here for the sake of brevity of the description. It is easy to understand that the dimension of the historical usage duration matrix A is M×30.
在获取子单元3051获取到历史使用时长矩阵A后,将对历史使用时长矩阵A的每个行向量中的元素取平均值操作,从而获得在30天内每个应用程序的历史使用时长数据的平均值。为了便于理解,用表示M款应用程序的历史使用时长数据的平均值向量,的表达式为:其中,和分别表示在30天内第一款应用程序、第二款应用程序和第M款应用程序的历史使用时长数据的平均值。很容易理解的是,平均值向量的维数为M×1。After the acquisition subunit 3051 acquires the historical usage duration matrix A, it will perform an average operation on the elements in each row vector of the historical usage duration matrix A, so as to obtain the average of the historical usage duration data of each application within 30 days value. For ease of understanding, use represents the average vector of historical usage time data of M apps, The expression is: in, and Represents the average of the historical usage data of the first app, the second app, and the Mth app in 30 days. It is easy to understand that the mean vector The dimension of is M×1.
获取子单元3051将平均值向量变换成维数为M×30的平均值矩阵其中,平均值矩阵的每个列向量均为平均值向量也就是说,平均值矩阵是以30个平均值向量为列向量的矩阵。Get subunit 3051 converts the mean vector Transform into an average matrix of dimension M × 30 where the mean matrix Each column vector of is a mean vector That is, the mean matrix is a vector of 30 averages is a matrix of column vectors.
获取子单元3051将获取的历史使用时长矩阵A和平均值矩阵传递至生成子单元3052,生成子单元3052将根据历史使用时长矩阵A与平均值矩阵做差生成用于表征机主本人使用应用程序习惯的特征矩阵。用字母B表示特征矩阵,表达式为Obtaining the historical usage duration matrix A and the average value matrix to be obtained by the subunit 3051 Passed to the generation sub-unit 3052, the generation sub-unit 3052 will use the historical use duration matrix A and the average value matrix The difference is to generate a feature matrix that is used to characterize the owner's habit of using the application program. The character matrix is represented by the letter B, and the expression is
生成子单元3052将生成的特征矩阵B传递至计算子单元3053,由计算子单元3053对该特征矩阵B进行求解,从而获得该特征矩阵B的特征值和特征向量。可以理解的是,特征值的数量为30个,特征向量的个数也为30个。在本优选实施例中,计算子单元3053将30个特征向量生成一个特征向量矩阵。The generation subunit 3052 transfers the generated feature matrix B to the calculation subunit 3053, and the calculation subunit 3053 solves the feature matrix B, thereby obtaining the eigenvalues and eigenvectors of the feature matrix B. It can be understood that the number of eigenvalues is 30, and the number of eigenvectors is also 30. In this preferred embodiment, the calculation subunit 3053 generates an eigenvector matrix from 30 eigenvectors.
具体地,特征向量矩阵中的30个特征向量按照对应的特征值从大到小的顺序排列,即最大特征值对应的特征向量为特征向量矩阵的第一个列向量,最小特征值对应的特征向量为特征向量矩阵的最后一个列向量,其他的28个特征向量按照对应的特征值大小进行排列放置,从而形成特征向量矩阵。Specifically, the 30 eigenvectors in the eigenvector matrix are arranged in descending order of the corresponding eigenvalues, that is, the eigenvector corresponding to the largest eigenvalue is the first column vector of the eigenvector matrix, and the eigenvector corresponding to the smallest eigenvalue is the first column vector of the eigenvector matrix. The vector is the last column vector of the eigenvector matrix, and the other 28 eigenvectors are arranged according to the corresponding eigenvalues to form the eigenvector matrix.
若特征向量矩阵用表式,特征向量矩阵的表达式为:可以理解的是,每个特征向量均为一个30×1的列向量(如:为一个30×1的列向量),那么特征向量矩阵的维数为30×30。If the eigenvector matrix is used table, eigenvector matrix The expression is: Understandably, each feature vector is a 30×1 column vector (eg: is a 30×1 column vector), then the eigenvector matrix The dimension is 30×30.
一般采用几个特征向量即可以描述机主本人的使用习惯。因此,为了降低计算量,计算子单元3053在计算特征向量矩阵后,需要进一步计算N值,根据N值选取特征向量矩阵的前N个列向量生成一个新的特征向量矩阵,新的特征向量矩阵用表示,其表达式为:可以理解的是,当N取30时,新的特征向量矩阵将与特征向量矩阵相同。Generally, several feature vectors can be used to describe the usage habits of the owner himself. Therefore, in order to reduce the amount of calculation, the calculation sub-unit 3053 is calculating the eigenvector matrix After that, it is necessary to further calculate the N value, and select the eigenvector matrix according to the N value The first N column vectors of to generate a new eigenvector matrix, the new eigenvector matrix is means, its expression is: It is understandable that when N takes 30, the new eigenvector matrix will be with the eigenvector matrix same.
计算子单元3053计算N值具体步骤为:计算子单元3053获取机主本人在某一个预设时间内每个应用程序的历史使用时长数据。在本优选实施例中,计算子单元3053获取第31天内每个应用程序的历史使用时长数据。在此可以将第31天划分到预设周期内,即预设周期为从30天变为31天,前30天的历史使用时长数据用于计算获取系数矩阵,第31天的历史使用时长数据用于计算N值。当然也可以采用31天中任意30天的历史使用时长数据来计算获取系数矩阵,剩余一天的历史使用时长数据用于计算N值,在此不做具体限制。The specific steps for the calculation subunit 3053 to calculate the N value are as follows: the calculation subunit 3053 obtains the historical usage duration data of each application program by the owner himself within a certain preset time. In this preferred embodiment, the calculation subunit 3053 obtains the historical usage duration data of each application within the 31st day. Here, the 31st day can be divided into a preset period, that is, the preset period is changed from 30 days to 31 days, the historical usage time data of the first 30 days is used to calculate the acquisition coefficient matrix, and the historical usage time data of the 31st day Used to calculate the N value. Of course, the historical usage duration data of any 30 days in the 31 days can also be used to calculate and obtain the coefficient matrix, and the historical usage duration data of the remaining day is used to calculate the N value, which is not limited here.
计算子单元3053根据第31天的历史使用时长数据生成历史使用时长向量X31,历史使用时长向量X31为一个M×1的列向量,每个元素对应一款应用程序的历史使用时长数据。The calculation subunit 3053 generates a historical usage duration vector X31 according to the historical usage duration data on the 31st day. The historical usage duration vector X31 is an M×1 column vector, and each element corresponds to the historical usage duration data of an application.
计算子单元3053计算N值,使得历史使用时长向量X31和系数矩阵满足关系式:其中,第一预设阈值ε1可以根据实际情况进行选取,一般第一预设阈值ε1取值越小,表征用户行为习惯的精度越高。The calculation subunit 3053 calculates the N value, so that the historical use duration vector X31 and the coefficient matrix satisfy the relational expression: The first preset threshold ε1 may be selected according to the actual situation. Generally, the smaller the value of the first preset threshold ε1 is, the higher the accuracy of characterizing the user's behavioral habits is.
计算子单元3053在计算出N值后,将根据N值和特征向量矩阵生成新的特征向量矩阵用并将新的特征向量矩阵用传递至映射子单元3054,由映射子单元3054将特征矩阵B映射到特征向量矩阵以生成系数矩阵,其中,系数矩阵用W表示,其表达式为一般来说,N的取值在2至5范围内,因此,系数矩阵的维数相对减少,大大降低计算量。After calculating the N value, the calculation sub-unit 3053 will Generate a new eigenvector matrix with and use the new eigenvector matrix with Passed to the mapping subunit 3054, which maps the feature matrix B to the feature vector matrix by the mapping subunit 3054 to generate a coefficient matrix, where the coefficient matrix is denoted by W, and its expression is Generally speaking, the value of N is in the range of 2 to 5. Therefore, the dimension of the coefficient matrix is relatively reduced, which greatly reduces the amount of calculation.
当获取单元301获取当前用户在预设时间内使用每个应用程序的使用时长后,将根据该使用时长生成使用时长向量。在本优选实施例中,预设时间为1天,获取单元301将获取当前用户在一天时间内使用每款应用程序的使用时长。例如,当前用户在一天内多次使用“微信”应用,获取单元301就会获取一天时间内每次使用“微信”应用的时长,并将多个使用“微信”应用的时长求和作为该“微信”应用的使用时长;而对于一些未使用的应用程序,获取单元301将会获取到未使用的应用程序的使用时长为零。After the obtaining unit 301 obtains the usage duration of each application program used by the current user within the preset time, a usage duration vector will be generated according to the usage duration. In this preferred embodiment, the preset time is 1 day, and the obtaining unit 301 will obtain the usage duration of each application program used by the current user within one day. For example, if the current user uses the "WeChat" application multiple times in one day, the obtaining unit 301 will obtain the duration of each use of the "WeChat" application in one day, and use the sum of the multiple usage durations of the "WeChat" application as the "WeChat" application. The usage duration of the WeChat" application; and for some unused applications, the acquiring unit 301 will acquire the usage duration of the unused applications as zero.
可以理解的是,当终端中有M款应用程序时,获取单元301每天都会获取M个使用时长,这M个使用时长对应了这M款应用程序。当获取单元301获取到M个使用时长后,将根据M个使用时长生成使用时长向量。It can be understood that when there are M types of application programs in the terminal, the acquiring unit 301 acquires M usage durations every day, and the M usage durations correspond to the M applications. After the acquiring unit 301 acquires the M usage durations, a usage duration vector will be generated according to the M usage durations.
在本优选实施例中,用Xλ表示使用时长向量,则使用时长向量Xλ表示为Xλ=[xλ1,xλ2,...,xλM]T,其中,xλ1表示预设时间内第一款应用程序的使用时长,xλ2表示预设时间内第二款应用程序的使用时长,xλM表示预设时间内第M款应用程序的使用时长。在本优选实施例中,使用时长向量Xλ为一个M×1的列向量。当然在其他实施例中,使用时长向量也可以为行向量,在此不做具体限制。In this preferred embodiment, Xλ is used to represent the use duration vector, then the use duration vector Xλ is represented as Xλ =[xλ1 ,xλ2 ,...,xλM ]T , where xλ1 represents the preset time The usage time of the first application in the system, xλ2 represents the usage time of the second application within the preset time, and xλM represents the usage time of the M-th application within the preset time. In this preferred embodiment, the duration vector Xλ is an M×1 column vector. Of course, in other embodiments, the use duration vector may also be a row vector, which is not specifically limited here.
获取单元301将生成的使用时长向量传递至转换单元302。转换单元302根据预设转换规则将所述使用时长生成系数向量具体为:通过预设转换规则将使用时长向量转换成系数向量。在本优选实施例中,预设转换规则为一降维系数关系式。具体地,以P表示系数向量,那么根据预设转换规则,系数向量P与使用时长向量Xλ之间的关系为:通过上述预设转换规则后,维数为M×1的使用时长向量Xλ转换至维数为N×1的系数向量P。The acquiring unit 301 transfers the generated usage duration vector to the converting unit 302 . The conversion unit 302 specifically generates the coefficient vector for the usage duration according to the preset conversion rule: converting the usage duration vector into a coefficient vector according to the preset conversion rule. In this preferred embodiment, the preset conversion rule is a dimensionality reduction coefficient relational expression. Specifically, the coefficient vector is represented by P, then according to the preset conversion rule, the relationship between the coefficient vector P and the use duration vector Xλ is: After passing the above-mentioned preset conversion rules, the use duration vector Xλ with dimension M×1 is converted into coefficient vector P with dimension N×1.
转换单元302将转换生成的系数向量P传递至判断单元303,判断单元303将判断系数向量与系数矩阵是否满足预设关系。The conversion unit 302 transfers the converted coefficient vector P to the judgment unit 303, and the judgment unit 303 judges whether the coefficient vector and the coefficient matrix satisfy a preset relationship.
在一优选实施例中,判断单元303具体用于判断系数向量中的元素与系数矩阵中的元素之差的平方和是否大于第二预设阈值。也就是说,判断系数向量中的元素与系数矩阵中的元素是否满足如下关系:In a preferred embodiment, the judging unit 303 is specifically configured to judge whether the sum of the squares of the differences between the elements in the coefficient vector and the elements in the coefficient matrix is greater than the second preset threshold. That is to say, it is judged whether the elements in the coefficient vector and the elements in the coefficient matrix satisfy the following relationship:
若判断单元303判断出系数向量中的元素与系数矩阵中的元素之差的平方和大于第二预设阈值ε2,则判断单元303判定系数向量与系数矩阵满足预设关系,说明当前用户不是机主本人。判断单元303将向隐私保护单元304发送第一信号,使得隐私保护单元304根据第一信号使得终端进入隐私保护模式。If the judging unit 303 judges that the sum of the squares of the differences between the elements in the coefficient vector and the elements in the coefficient matrix is greater than the second preset threshold ε2 , the judging unit 303 judges that the coefficient vector and the coefficient matrix satisfy the preset relationship, indicating that the current user is not The owner himself. The determination unit 303 will send the first signal to the privacy protection unit 304, so that the privacy protection unit 304 makes the terminal enter the privacy protection mode according to the first signal.
在此,隐私保护模式可以为仅部分功能可以使用模式,其他涉及机主个人信息的功能无法访问。例如,在隐私保护模式中,当前用户只能拨打电话,而无法查看通讯录、相册、使用应用程序等功能。当然,隐私保护模式不局限于上述形式,也可以采用其他形式,在此不做具体限制。Here, the privacy protection mode can be a mode where only some functions can be used, and other functions involving the owner's personal information cannot be accessed. For example, in the privacy protection mode, the current user can only make calls, but cannot view functions such as contacts, photo albums, and applications. Of course, the privacy protection mode is not limited to the above forms, and other forms can also be used, which are not specifically limited here.
本优选实施例中的隐私保护装置300,其通过获取单元301获取预设时间内每个应用程序的使用时长;转换单元302根据预设转换规则将所述使用时长生成系数向量;判断单元303判断所述系数向量与系数矩阵是否满足预设关系;若所述系数向量与所述系数矩阵满足所述预设关系,则隐私保护单元304进入隐私保护模式。该装置利用当前用户使用每个应用程序的使用时长来判断是否为机主本人,当判断单元303判断出当前用户不是机主本人时,隐私保护单元304将使终端进入隐私保护模式,从而保护机主本人的个人信息的安全性。In the privacy protection device 300 in this preferred embodiment, the acquisition unit 301 acquires the usage duration of each application within a preset time; the conversion unit 302 generates a coefficient vector for the usage duration according to the preset conversion rule; the determination unit 303 determines Whether the coefficient vector and the coefficient matrix satisfy the preset relationship; if the coefficient vector and the coefficient matrix satisfy the preset relationship, the privacy protection unit 304 enters the privacy protection mode. The device uses the duration of each application program used by the current user to determine whether the user is the host himself. When the judgment unit 303 determines that the current user is not the host himself, the privacy protection unit 304 will make the terminal enter the privacy protection mode, thereby protecting the computer. The security of the personal information of the master himself.
请参照图5,图5为本发明优选实施例的隐私保护装置的又一结构示意图。该隐私保护装置400可以应用于个人计算机、手持式或膝上型设备、移动电话、个人数字助理(PDA)等电子设备上,在此不做具体限制。Please refer to FIG. 5 , which is another schematic structural diagram of the privacy protection device according to the preferred embodiment of the present invention. The privacy protection device 400 can be applied to electronic devices such as personal computers, handheld or laptop devices, mobile phones, personal digital assistants (PDAs), etc., which are not specifically limited herein.
本实施例中的隐私保护装置400包括:获取映射单元401、获取单元402、转换单元403、判断单元404、获取判断单元405、隐私保护单元406和保存单元407。其中,获取映射单元401包括获取子单元4011、生成子单元4012、计算子单元4013和映射子单元4014。The privacy protection device 400 in this embodiment includes: an acquisition mapping unit 401 , an acquisition unit 402 , a conversion unit 403 , a determination unit 404 , an acquisition determination unit 405 , a privacy protection unit 406 , and a storage unit 407 . The acquiring and mapping unit 401 includes an acquiring sub-unit 4011 , a generating sub-unit 4012 , a calculating sub-unit 4013 and a mapping sub-unit 4014 .
获取子单元4011获取预设周期中多个预设时间内每个应用程序的历史使用时长数据以及预设周期中每个应用程序的历史使用时长数据的平均值。在本优选实施例中,预设周期为30天,预设时间为1天,假设终端内安装有M款应用程序,那么获取子单元4011将获取30天中每天每个应用程序的历史使用时长数据。The acquiring subunit 4011 acquires the historical usage duration data of each application within a plurality of preset times in the preset period and the average value of the historical usage duration data of each application in the preset period. In this preferred embodiment, the preset period is 30 days and the preset time is 1 day. Assuming that M types of application programs are installed in the terminal, the acquisition subunit 4011 will acquire the historical usage time of each application program in each day of the 30 days data.
可以理解的是,在30天中,每个应用程序将对应了30个历史使用时长数据,通过对每个应用程序对应的30个历史使用时长数据取平均值来获得30天内每个应用程序的历史使用时长数据的平均值.It is understandable that, in 30 days, each application will correspond to 30 historical usage time data, and by taking the average of the 30 historical usage data corresponding to each application to obtain the data of each application within 30 days. Average value of historical usage data.
获取子单元4011根据这些历史使用时长数据生成历史使用时长矩阵。该历史使用时长矩阵包括M个行向量和30个列向量。每个行向量分别对应每个应用程序的30个历史使用时长数据,每个列向量对应了每天M个应用程序的历史使用时长数据。The acquiring subunit 4011 generates a historical usage duration matrix according to the historical usage duration data. The historical usage duration matrix includes M row vectors and 30 column vectors. Each row vector corresponds to 30 historical usage duration data of each application, and each column vector corresponds to the historical usage duration data of M applications per day.
若用字母A表示历史使用时长矩阵,则历史使用时长矩阵A表达式为:A=[X1,X2,...,X30]M×30。这里X1、X2和X30均为列向量,其分别表示为第一天、第二天和第30天机主本人使用各个应用程序的历史使用时长向量。历史使用时长向量X1的表达式:X1=[x1,x2,...,xM]T,其中,x1、x2和xM分别表示在第一天内第一款应用程序、第二款应用程序和第M款应用程序的历史使用时长数据。由于X2、X30等其余的列向量的表达式与X1的表达式的形式相同,为了说明书的简洁性,在此不进行一一列举。很容易理解的是,历史使用时长矩阵A的维数为M×30。If the letter A is used to represent the historical usage duration matrix, the historical usage duration matrix A is expressed as: A=[X1 , X2 , . . . , X30 ]M×30 . Here, X1 , X2 , and X30 are all column vectors, which are respectively expressed as the historical usage duration vectors of each application used by the owner on the first day, the second day, and the 30th day. The expression of the historical usage duration vector X1 : X1 =[x1 ,x2 ,...,xM ]T , where x1 , x2 and xM respectively represent the first application in the first day Historical usage data for the program, the second application, and the M-th application. Since the expressions of the remaining column vectors such as X2 , X30 and the like are the same as the expressions of X1 , they are not listed here for the sake of brevity of the description. It is easy to understand that the dimension of the historical usage duration matrix A is M×30.
在获取子单元4011获取到历史使用时长矩阵A后,将对历史使用时长矩阵A的每个行向量中的元素取平均值操作,从而获得在30天内每个应用程序的历史使用时长数据的平均值。为了便于理解,用表示M款应用程序的历史使用时长数据的平均值向量,的表达式为:其中,和分别表示在30天内第一款应用程序、第二款应用程序和第M款应用程序的历史使用时长数据的平均值。很容易理解的是,平均值向量的维数为M×1。After the acquisition subunit 4011 acquires the historical usage duration matrix A, it will perform an average operation on the elements in each row vector of the historical usage duration matrix A, so as to obtain the average of the historical usage duration data of each application within 30 days value. For ease of understanding, use represents the average vector of historical usage time data of M apps, The expression is: in, and Represents the average of the historical usage data of the first app, the second app, and the Mth app in 30 days. It is easy to understand that the mean vector The dimension of is M×1.
获取子单元4011将平均值向量变换成维数为M×30的平均值矩阵其中,平均值矩阵的每个列向量均为平均值向量也就是说,平均值矩阵是以30个平均值向量为列向量的矩阵。Get subunit 4011 converts the mean vector Transform into an average matrix of dimension M × 30 where the mean matrix Each column vector of is a mean vector That is, the mean matrix is a vector of 30 averages is a matrix of column vectors.
获取子单元4011将获取的历史使用时长矩阵A和平均值矩阵传递至生成子单元4012,生成子单元4012将根据历史使用时长矩阵A与平均值矩阵做差生成用于表征机主本人使用应用程序习惯的特征矩阵。用字母B表示特征矩阵,表达式为Obtaining the historical usage duration matrix A and the average value matrix to be obtained by the subunit 4011 Passed to the generation sub-unit 4012, the generation sub-unit 4012 will use the historical use duration matrix A and the average matrix The difference is to generate a feature matrix that is used to characterize the owner's habit of using the application program. The character matrix is represented by the letter B, and the expression is
生成子单元4012将生成的特征矩阵B传递至计算子单元4013,由计算子单元4013对该特征矩阵B进行求解,从而获得该特征矩阵B的特征值和特征向量。可以理解的是,特征值的数量为30个,特征向量的个数也为30个。在本优选实施例中,将30个特征向量生成一个特征向量矩阵。The generation subunit 4012 transfers the generated feature matrix B to the calculation subunit 4013, and the calculation subunit 4013 solves the feature matrix B, thereby obtaining the eigenvalues and eigenvectors of the feature matrix B. It can be understood that the number of eigenvalues is 30, and the number of eigenvectors is also 30. In this preferred embodiment, 30 eigenvectors are generated into one eigenvector matrix.
具体地,特征向量矩阵中的30个特征向量按照对应的特征值从大到小的顺序排列,即最大特征值对应的特征向量为特征向量矩阵的第一个列向量,最小特征值对应的特征向量为特征向量矩阵的最后一个列向量,其他的28个特征向量按照对应的特征值大小进行排列放置,从而形成特征向量矩阵。Specifically, the 30 eigenvectors in the eigenvector matrix are arranged in descending order of the corresponding eigenvalues, that is, the eigenvector corresponding to the largest eigenvalue is the first column vector of the eigenvector matrix, and the eigenvector corresponding to the smallest eigenvalue is the first column vector of the eigenvector matrix. The vector is the last column vector of the eigenvector matrix, and the other 28 eigenvectors are arranged according to the corresponding eigenvalues to form the eigenvector matrix.
若特征向量矩阵用表式,特征向量矩阵的表达式为:可以理解的是,每个特征向量均为一个30×1的列向量(如:为一个30×1的列向量),那么特征向量矩阵的维数为30×30。If the eigenvector matrix is used table, eigenvector matrix The expression is: Understandably, each feature vector is a 30×1 column vector (eg: is a 30×1 column vector), then the eigenvector matrix The dimension is 30×30.
一般采用几个特征向量即可以描述机主本人的使用习惯。因此,为了降低计算量,计算子单元4013在计算特征向量矩阵后,需要进一步计算N值,根据N值选取特征向量矩阵的前N个列向量生成一个新的特征向量矩阵,新的特征向量矩阵用表示,其表达式为:可以理解的是,当N取30时,新的特征向量矩阵将与特征向量矩阵相同。Generally, several feature vectors can be used to describe the usage habits of the owner himself. Therefore, in order to reduce the amount of calculation, the calculation sub-unit 4013 is calculating the eigenvector matrix After that, it is necessary to further calculate the N value, and select the eigenvector matrix according to the N value The first N column vectors of to generate a new eigenvector matrix, the new eigenvector matrix is means, its expression is: It is understandable that when N takes 30, the new eigenvector matrix will be with the eigenvector matrix same.
计算子单元4013计算N值具体步骤为:计算子单元4013获取机主本人在某一个预设时间内每个应用程序的历史使用时长数据。在本优选实施例中,计算子单元4013获取第31天内每个应用程序的历史使用时长数据。在此可以将第31天划分到预设周期内,即预设周期为从30天变为31天,前30天的历史使用时长数据用于计算获取系数矩阵,第31天的历史使用时长数据用于计算N值。当然也可以采用31天中任意30天的历史使用时长数据来计算获取系数矩阵,剩余一天的历史使用时长数据用于计算N值,在此不做具体限制。The specific steps of calculating the N value by the calculation subunit 4013 are as follows: the calculation subunit 4013 obtains the historical usage duration data of each application program by the owner himself within a certain preset time. In this preferred embodiment, the calculation subunit 4013 obtains the historical usage duration data of each application within the 31st day. Here, the 31st day can be divided into a preset period, that is, the preset period is changed from 30 days to 31 days, the historical usage time data of the first 30 days is used to calculate the acquisition coefficient matrix, and the historical usage time data of the 31st day Used to calculate the N value. Of course, the historical usage duration data of any 30 days in the 31 days can also be used to calculate and obtain the coefficient matrix, and the historical usage duration data of the remaining day is used to calculate the N value, which is not limited here.
计算子单元4013根据第31天的历史使用时长数据生成历史使用时长向量X31,历史使用时长向量X31为一个M×1的列向量,每个元素对应一款应用程序的历史使用时长数据。The calculation subunit 4013 generates a historical usage duration vector X31 according to the historical usage duration data on the 31st day. The historical usage duration vector X31 is an M×1 column vector, and each element corresponds to the historical usage duration data of an application.
计算子单元4013计算N值,使得历史使用时长向量X31和系数矩阵满足关系式:其中,第一预设阈值ε1可以根据实际情况进行选取,一般第一预设阈值ε1取值越小,表征用户行为习惯的精度越高。The calculation subunit 4013 calculates the N value so that the historical usage duration vector X31 and the coefficient matrix satisfy the relational expression: The first preset threshold ε1 may be selected according to the actual situation. Generally, the smaller the value of the first preset threshold ε1 is, the higher the accuracy of characterizing the user's behavioral habits is.
计算子单元4013在计算出N值后,将根据N值和特征向量矩阵生成新的特征向量矩阵用并将新的特征向量矩阵用传递至映射子单元4014,由映射子单元4014将特征矩阵B映射到特征向量矩阵以生成系数矩阵,其中,系数矩阵用W表示,其表达式为一般来说,N的取值在2至5范围内,因此,系数矩阵的维数相对减少,大大降低计算量。After calculating the N value, the calculation subunit 4013 will Generate a new eigenvector matrix with and use the new eigenvector matrix with Passed to the mapping subunit 4014, which maps the feature matrix B to the feature vector matrix by the mapping subunit 4014 to generate a coefficient matrix, where the coefficient matrix is denoted by W, and its expression is Generally speaking, the value of N is in the range of 2 to 5. Therefore, the dimension of the coefficient matrix is relatively reduced, which greatly reduces the amount of calculation.
当获取单元402获取当前用户在预设时间内使用每个应用程序的使用时长后,将根据该使用时长生成使用时长向量。在本优选实施例中,预设时间为1天,获取单元402将获取当前用户在一天时间内使用每款应用程序的使用时长。例如,当前用户在一天内多次使用“微信”应用,获取单元402就会获取一天时间内每次使用“微信”应用的时长,并将多个使用“微信”应用的时长求和作为该“微信”应用的使用时长;而对于一些未使用的应用程序,获取单元402将会获取到未使用的应用程序的使用时长为零。After the obtaining unit 402 obtains the usage duration of each application program used by the current user within the preset time, a usage duration vector will be generated according to the usage duration. In this preferred embodiment, the preset time is 1 day, and the obtaining unit 402 will obtain the usage time of each application program used by the current user within one day. For example, if the current user uses the "WeChat" application multiple times in one day, the obtaining unit 402 will obtain the duration of each use of the "WeChat" application in one day, and use the sum of the multiple durations of using the "WeChat" application as the "WeChat" application. For some unused applications, the acquiring unit 402 will acquire the usage duration of the unused applications as zero.
在本优选实施例中,用Xλ表示使用时长向量,则使用时长向量Xλ表示为Xλ=[xλ1,xλ2,...,xλM]T,其中,xλ1表示预设时间内第一款应用程序的使用时长,xλ2表示预设时间内第二款应用程序的使用时长,xλM表示预设时间内第M款应用程序的使用时长。在本优选实施例中,使用时长向量Xλ为一个M×1的列向量。当然在其他实施例中,使用时长向量也可以为行向量,在此不做具体限制。In this preferred embodiment, Xλ is used to represent the use duration vector, then the use duration vector Xλ is represented as Xλ =[xλ1 ,xλ2 ,...,xλM ]T , where xλ1 represents the preset time The usage time of the first application in the system, xλ2 represents the usage time of the second application within the preset time, and xλM represents the usage time of the M-th application within the preset time. In this preferred embodiment, the duration vector Xλ is an M×1 column vector. Of course, in other embodiments, the use duration vector may also be a row vector, which is not specifically limited here.
获取单元402将生成的使用时长向量传递至转换单元403。转换单元403根据预设转换规则将使用时长生成系数向量具体为:通过预设转换规则将使用时长向量转换成系数向量,其中,该系数向量的维数小于使用时长向量的维数。在本优选实施例中,预设转换规则为一降维系数关系式。具体地,以P表示系数向量,那么根据预设转换规则,系数向量P与使用时长向量Xλ之间的关系为:通过上述预设转换规则后,维数为M×1的使用时长向量Xλ转换至维数为N×1的系数向量P。The acquiring unit 402 transfers the generated usage duration vector to the converting unit 403 . The conversion unit 403 generates the coefficient vector of the usage duration according to the preset conversion rule specifically: converting the usage duration vector into a coefficient vector according to the preset conversion rule, wherein the dimension of the coefficient vector is smaller than the dimension of the usage duration vector. In this preferred embodiment, the preset conversion rule is a dimensionality reduction coefficient relational expression. Specifically, the coefficient vector is represented by P, then according to the preset conversion rule, the relationship between the coefficient vector P and the use duration vector Xλ is: After passing the above-mentioned preset conversion rules, the use duration vector Xλ with dimension M×1 is converted into coefficient vector P with dimension N×1.
转换单元403将转换生成的系数向量P传递至判断单元404,判断单元404将判断系数向量中的元素与系数矩阵中的元素之差的平方和是否大于预设阈值。The conversion unit 403 transfers the converted coefficient vector P to the judgment unit 404, and the judgment unit 404 judges whether the sum of the squares of the differences between the elements in the coefficient vector and the elements in the coefficient matrix is greater than a preset threshold.
在本实施例中,判断单元404将判断系数向量中的元素与系数矩阵中的元素是否满足如下关系:若系数向量中的元素与系数矩阵中的元素之差的平方和大于预设阈值ε2,则说明当前用户可能不是机主本人,为了进一步确定当前用户是否为机主本人,判断单元404将向获取判断单元405发送第二信号。In this embodiment, the judging unit 404 will judge whether the elements in the coefficient vector and the elements in the coefficient matrix satisfy the following relationship: If the sum of the squares of the differences between the elements in the coefficient vector and the elements in the coefficient matrix is greater than the preset threshold ε2 , it means that the current user may not be the owner of the machine. In order to further determine whether the current user is the owner of the machine, the judgment unit 404 will send The acquisition determination unit 405 sends the second signal.
获取判断单元405将根据第二信号获取用户输入的身份验证信息,并判断该身份验证信息是否与预设验证信息相匹配。若身份验证信息与预设验证信息不匹配,则进一步说明当前用户不是机主本人,此时获取判断单元405将向隐私保护单元406发送第三信号,使得隐私保护单元406根据第三信号使得终端进入隐私保护模式,从而使得机主本人的个人信息不被其他用户看到,保证机主本人的个人信息的安全性。The acquisition determination unit 405 will acquire the identity verification information input by the user according to the second signal, and determine whether the identity verification information matches the preset verification information. If the identity verification information does not match the preset verification information, it is further indicated that the current user is not the owner of the computer. At this time, the acquisition and determination unit 405 will send a third signal to the privacy protection unit 406, so that the privacy protection unit 406 makes the terminal according to the third signal. Enter the privacy protection mode, so that the owner's personal information is not seen by other users, and the security of the owner's personal information is guaranteed.
若判断单元404判断出系数向量中的元素与系数矩阵中的元素之差的平方和不大于预设阈值ε2,则说明当前用户是机主本人,此时当前用户可以正常使用终端。If the judging unit 404 judges that the sum of the squares of the differences between the elements in the coefficient vector and the elements in the coefficient matrix is not greater than the preset threshold ε2 , it indicates that the current user is the owner himself, and the current user can use the terminal normally.
为了可以更加准确的将机主本人和其他用户区分开,机主本人的历史使用时长数据是非常重要的数据,其必须可以反映出机主本人的使用习惯才行,因此需要定期更换历史使用时长数据。在判断单元404判断出当前用户是机主本人后,判断单元404将向保存单元407发送第四信号,使得保存单元407根据第四信号将该使用时长保存在下一个预设周期内的历史使用时长数据,这样便于对预设周期内的历史使用时长数据进行更新。In order to more accurately distinguish the owner from other users, the historical usage time data of the owner is very important data, which must reflect the usage habits of the owner, so the historical usage time needs to be changed regularly data. After the judging unit 404 judges that the current user is the owner, the judging unit 404 will send a fourth signal to the saving unit 407, so that the saving unit 407 saves the usage duration in the historical usage duration in the next preset period according to the fourth signal data, which facilitates updating the historical usage duration data within a preset period.
本优选实施例中的隐私保护装置400,其利用当前用户使用每个应用程序的使用时长来判断是否为机主本人,当判断单元404判断出当前用户不是机主本人时,通过获取判断单元405获取身份验证信息进一步判断当前用户是否为机主本人。若判断出当前用户不是机主本人时,隐私保护单元406使得终端进入隐私保护模式,从而保护机主本人的个人信息的安全性。当判断出当前用户是机主本人时,保存单元407保存此次使用时长向量至下一个预设周期内的历史使用时长数据,以便于按照预设周期更新历史使用时长数据,使得历史使用时长数据可以准确地表征机主本人的使用习惯,增加该装置识别用户的准确性。The privacy protection device 400 in this preferred embodiment uses the duration of each application program used by the current user to determine whether the user is the owner. Obtain the authentication information to further determine whether the current user is the owner himself. If it is determined that the current user is not the owner, the privacy protection unit 406 makes the terminal enter the privacy protection mode, so as to protect the security of the personal information of the owner. When it is determined that the current user is the owner himself, the saving unit 407 saves the current use duration vector to the historical use duration data in the next preset period, so as to update the historical use duration data according to the preset period, so that the historical use duration data It can accurately characterize the usage habits of the owner himself, and increase the accuracy of the device to identify the user.
本发明还提供一种移动终端,如平板电脑、手机等移动终端,请参阅图6,图6为本发明实施例提供的移动终端结构示意图。该移动终端500可以包括射频(RF,RadioFrequency)电路501、包括有一个或一个以上计算机可读存储介质的存储器502、输入单元503、显示单元504、传感器505、包括有一个或者一个以上处理核心的处理器506、以及电源507等部件。本领域技术人员可以理解,图6中示出的移动终端结构并不构成对移动终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。The present invention also provides a mobile terminal, such as a tablet computer, a mobile phone and other mobile terminals. Please refer to FIG. 6 , which is a schematic structural diagram of a mobile terminal provided by an embodiment of the present invention. The mobile terminal 500 may include a radio frequency (RF, Radio Frequency) circuit 501, a memory 502 including one or more computer-readable storage media, an input unit 503, a display unit 504, a sensor 505, a memory 502 including one or more processing cores The processor 506, the power supply 507 and other components. Those skilled in the art can understand that the structure of the mobile terminal shown in FIG. 6 does not constitute a limitation on the mobile terminal, and may include more or less components than those shown, or combine some components, or arrange different components.
射频电路501可用于收发信息,或通话过程中信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器506处理;另外,将涉及上行的数据发送给基站。此外,射频电路501还可以通过无线通信与网络和其他设备通信。The radio frequency circuit 501 can be used to send and receive information, or to receive and send signals during a call. In particular, after receiving the downlink information of the base station, it is handed over to one or more processors 506 for processing; in addition, it sends the uplink data to the base station. . In addition, the radio frequency circuit 501 can also communicate with the network and other devices through wireless communication.
存储器502可用于存储应用程序和数据。存储器502存储的应用程序中包含有可执行代码。应用程序可以组成各种功能模块。处理器506通过运行存储在存储器502的应用程序,从而执行各种功能应用以及数据处理。Memory 502 may be used to store applications and data. The application program stored in the memory 502 contains executable code. Applications can be composed of various functional modules. The processor 506 executes various functional applications and data processing by executing application programs stored in the memory 502 .
输入单元503可用于接收输入的数字、字符信息或用户特征信息(比如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。输入单元503可包括触摸显示屏、物理键盘、功能键、指纹识别模组等中的一种或多种。The input unit 503 can be used to receive input numbers, character information or user characteristic information (such as fingerprints), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. The input unit 503 may include one or more of a touch display screen, a physical keyboard, a function key, a fingerprint recognition module, and the like.
显示单元504可用于显示由用户输入的信息或提供给用户的信息以及移动终端的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。The display unit 504 may be used to display information input by the user or information provided to the user and various graphical user interfaces of the mobile terminal, which may be composed of graphics, text, icons, videos and any combination thereof.
移动终端500还可包括至少一种传感器505,比如环境光传感器、接近传感器、重力加速度传感器等。The mobile terminal 500 may further include at least one sensor 505, such as an ambient light sensor, a proximity sensor, a gravitational acceleration sensor, and the like.
处理器506是移动终端500的控制中心,利用各种接口和线路连接整个移动终端500的各个部分,通过运行或执行存储在存储器502内的应用程序,以及调用存储在存储器502内的数据,执行移动终端500的各种功能和处理数据,从而对移动终端500进行整体监控。The processor 506 is the control center of the mobile terminal 500, uses various interfaces and lines to connect various parts of the entire mobile terminal 500, and executes by running or executing the application program stored in the memory 502 and calling the data stored in the memory 502. Various functions of the mobile terminal 500 and processing data, so as to monitor the mobile terminal 500 as a whole.
移动终端500还包括电源507(比如电池),用于给各个部件供电。当然,移动终端500还可以包括音频电路、摄像头、蓝牙模块等,在此不再赘述。The mobile terminal 500 also includes a power source 507, such as a battery, for powering the various components. Of course, the mobile terminal 500 may also include an audio circuit, a camera, a Bluetooth module, and the like, which will not be repeated here.
在本优选实施例中,移动终端中的处理器506会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行代码加载到存储器502中,并由处理器508来运行存储在存储器502中的应用程序,从而实现各种功能:获取预设时间内每个应用程序的使用时长;根据预设转换规则将所述使用时长生成系数向量;判断所述系数向量与系数矩阵是否满足预设关系,其中所述系数矩阵为根据用户使用每个所述应用程序的历史使用时长数据生成的矩阵;若所述系数向量与所述系数矩阵满足所述预设关系,则进入隐私保护模式。In this preferred embodiment, the processor 506 in the mobile terminal will load the executable code corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and the processor 508 will run the executable code stored in the memory 502. The application program in the memory 502, thereby realizing various functions: obtaining the usage duration of each application within a preset time; generating a coefficient vector for the usage duration according to a preset conversion rule; judging whether the coefficient vector and the coefficient matrix satisfy A preset relationship, wherein the coefficient matrix is a matrix generated according to the historical usage duration data of each application program used by the user; if the coefficient vector and the coefficient matrix satisfy the preset relationship, the privacy protection mode is entered .
在一优选实施例中,处理器506在执行获取预设时间内每个应用程序的使用时长之前,还执行:获取预设周期中多个所述预设时间内每个所述应用程序的历史使用时长数据以及所述预设周期中每个所述应用程序的历史使用时长数据的平均值;根据所述历史使用时长数据与所述平均值之差生成特征矩阵,其中所述特征矩阵用于表征用户使用所述应用程序的习惯;计算所述特征矩阵的特征向量矩阵;将所述特征矩阵映射到所述特征向量矩阵以生成系数矩阵。In a preferred embodiment, before the processor 506 executes obtaining the usage duration of each application within a preset time, the processor 506 further executes: obtaining the history of each application within a plurality of preset times in a preset period use duration data and an average value of historical usage duration data of each of the applications in the preset period; generate a feature matrix according to the difference between the historical usage duration data and the average, wherein the feature matrix is used for Characterizing a user's habit of using the application; computing an eigenvector matrix of the feature matrix; mapping the feature matrix to the eigenvector matrix to generate a coefficient matrix.
在一优选实施例中,处理器506在执行判断所述系数向量与系数矩阵是否满足预设关系时,具体执行:判断所述系数向量中的元素与所述系数矩阵中的元素之差的平方和是否大于预设阈值;若所述系数向量中的元素与所述系数矩阵中的元素之差的平方和大于所述预设阈值,则判定所述系数向量与系数矩阵满足预设关系。In a preferred embodiment, when the processor 506 determines whether the coefficient vector and the coefficient matrix satisfy a preset relationship, the processor 506 specifically performs: determining the square of the difference between the elements in the coefficient vector and the elements in the coefficient matrix; Whether the sum is greater than a preset threshold; if the sum of the squares of the differences between the elements in the coefficient vector and the elements in the coefficient matrix is greater than the preset threshold, it is determined that the coefficient vector and the coefficient matrix satisfy a preset relationship.
在一优选实施例中,处理器506在执行判断所述系数向量与系数矩阵是否满足预设关系之后,还执行:若所述系数向量与系数矩阵不满足预设关系,则保存所述使用时长为下一个所述预设周期内的历史使用时长数据。In a preferred embodiment, after determining whether the coefficient vector and the coefficient matrix meet the preset relationship, the processor 506 also executes: if the coefficient vector and the coefficient matrix do not meet the preset relationship, save the usage duration. It is the historical usage duration data in the next preset period.
在一优选实施例中,处理器506在执行进入隐私保护模式之前,还用于执行:获取输入的身份验证信息;判断所述身份验证信息是否与预设验证信息相匹配;若所述身份验证信息与预设验证信息不相匹配,则进入隐私保护模式。In a preferred embodiment, before entering the privacy protection mode, the processor 506 is further configured to: obtain the input authentication information; determine whether the authentication information matches the preset authentication information; If the information does not match the preset verification information, enter the privacy protection mode.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见上文针对隐私保护方法的详细描述,此处不再赘述。In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to the detailed description of the privacy protection method above, which will not be repeated here.
本发明实施例提供的隐私保护装置,譬如为计算机、平板电脑、具有触摸功能的手机等等,所述隐私保护装置与上文实施例中的隐私保护方法属于同一构思,在所述隐私保护装置上可以运行所述隐私保护方法实施例中提供的任一方法,其具体实现过程详见所述隐私保护方法实施例,此处不再赘述。The privacy protection device provided by the embodiment of the present invention is, for example, a computer, a tablet computer, a mobile phone with a touch function, etc. The privacy protection device and the privacy protection method in the above embodiment belong to the same concept. In the privacy protection device Any method provided in the privacy protection method embodiment may be executed on the above-mentioned privacy protection method, and the specific implementation process thereof may be referred to in the privacy protection method embodiment, which will not be repeated here.
需要说明的是,对本发明所述隐私保护方法而言,本领域普通测试人员可以理解实现本发明实施例所述隐私保护方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,所述计算机程序可存储于一计算机可读取存储介质中,如存储在终端的存储器中,并被该终端内的至少一个处理器执行,在执行过程中可包括如所述隐私保护方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储器(ROM,Read OnlyMemory)、随机存取记忆体(RAM,Random Access Memory)等。It should be noted that, for the privacy protection method of the present invention, ordinary testers in the art can understand that all or part of the process of implementing the privacy protection method of the embodiment of the present invention can be completed by controlling the relevant hardware through a computer program , the computer program can be stored in a computer-readable storage medium, such as stored in the memory of the terminal, and executed by at least one processor in the terminal, and the execution process can include methods such as the privacy protection method. Example flow. The storage medium may be a magnetic disk, an optical disk, a read only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), and the like.
本发明实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。上述提到的存储介质可以是只读存储器,磁盘或光盘等。上述的各装置或系统,可以执行相应方法实施例中的方法。Each functional unit in this embodiment of the present invention may be integrated into one processing module, or each unit may exist physically alone, or two or more units may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, and the like. The above-mentioned apparatuses or systems may execute the methods in the corresponding method embodiments.
综上所述,虽然本发明已以优选实施例揭露如上,但上述优选实施例并非用以限制本发明,本领域的普通技术人员,在不脱离本发明的精神和范围内,均可作各种更动与润饰,因此本发明的保护范围以权利要求界定的范围为准。In summary, although the present invention has been disclosed above with preferred embodiments, the above preferred embodiments are not intended to limit the present invention. Those of ordinary skill in the art can make various Therefore, the protection scope of the present invention is subject to the scope defined by the claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201611089208.0ACN106709365B (en) | 2016-11-30 | 2016-11-30 | Privacy protection method and device and mobile terminal |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201611089208.0ACN106709365B (en) | 2016-11-30 | 2016-11-30 | Privacy protection method and device and mobile terminal |
| Publication Number | Publication Date |
|---|---|
| CN106709365A CN106709365A (en) | 2017-05-24 |
| CN106709365Btrue CN106709365B (en) | 2019-09-13 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201611089208.0AActiveCN106709365B (en) | 2016-11-30 | 2016-11-30 | Privacy protection method and device and mobile terminal |
| Country | Link |
|---|---|
| CN (1) | CN106709365B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102104679A (en)* | 2010-12-09 | 2011-06-22 | 中兴通讯股份有限公司 | Method and device for preventing mobile terminal from being used by invalid user |
| CN103945060A (en)* | 2014-04-04 | 2014-07-23 | 惠州Tcl移动通信有限公司 | Mobile terminal processing method and system based on sensor recognition |
| CN104361303A (en)* | 2014-10-22 | 2015-02-18 | 小米科技有限责任公司 | Terminal exception processing method and device and electronic equipment |
| CN105025170A (en)* | 2015-08-05 | 2015-11-04 | 张京源 | Detection and alarm method of mobile phone in non-normal use |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102104679A (en)* | 2010-12-09 | 2011-06-22 | 中兴通讯股份有限公司 | Method and device for preventing mobile terminal from being used by invalid user |
| CN103945060A (en)* | 2014-04-04 | 2014-07-23 | 惠州Tcl移动通信有限公司 | Mobile terminal processing method and system based on sensor recognition |
| CN104361303A (en)* | 2014-10-22 | 2015-02-18 | 小米科技有限责任公司 | Terminal exception processing method and device and electronic equipment |
| CN105025170A (en)* | 2015-08-05 | 2015-11-04 | 张京源 | Detection and alarm method of mobile phone in non-normal use |
| Publication number | Publication date |
|---|---|
| CN106709365A (en) | 2017-05-24 |
| Publication | Publication Date | Title |
|---|---|---|
| CN104423576B (en) | Management of virtual assistant operational items | |
| US9678797B2 (en) | Dynamic resource management for multi-process applications | |
| US9600670B2 (en) | Provisioning location-based security policy | |
| US20150256476A1 (en) | Resource management based on device-specific or user-specific resource usage profiles | |
| CN107193598B (en) | Application starting method, mobile terminal and computer readable storage medium | |
| CN107967419A (en) | One kind solution lock control method and mobile terminal | |
| US10599913B2 (en) | Face model matrix training method and apparatus, and storage medium | |
| CN105159530A (en) | Applied display object switching method and device | |
| US11164022B2 (en) | Method for fingerprint enrollment, terminal, and non-transitory computer readable storage medium | |
| CN110741387B (en) | Face recognition method and device, storage medium and electronic equipment | |
| US11017109B1 (en) | Dynamic sandboxing of user data | |
| CN106096358B (en) | A kind of unlocking control method and mobile terminal | |
| CN107548482A (en) | Thermal management in computing devices based on workload detection | |
| CN103189853A (en) | Method and apparatus for providing efficient context classification | |
| CN106778128B (en) | Information protection method, device and terminal | |
| US20160294835A1 (en) | Initiating a Secure Action Via Physical Manipulation | |
| US10970515B2 (en) | Method and electronic device for verifying fingerprint | |
| CN108174018A (en) | A kind of information processing method and terminal | |
| US20210374342A1 (en) | Electronic device for inputting characters and method of operation of same | |
| CN106203053A (en) | A kind of person's handwriting unlocking method and terminal | |
| CN106709365B (en) | Privacy protection method and device and mobile terminal | |
| CN106778296B (en) | Access method, device and terminal for access object | |
| CN110020167A (en) | User's gender identification method, device, storage medium and electronic equipment | |
| CN106778335B (en) | Privacy protection method and device for application installation and mobile terminal | |
| CN105739697B (en) | terminal function triggering method and terminal function trigger device |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| CB02 | Change of applicant information | ||
| CB02 | Change of applicant information | Address after:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after:OPPO Guangdong Mobile Communications Co., Ltd. Address before:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant before:Guangdong OPPO Mobile Communications Co., Ltd. | |
| GR01 | Patent grant | ||
| GR01 | Patent grant |