CN112733097A - Authority granting method, device, electronic equipment and readable storage medium - Google Patents
Authority granting method, device, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN112733097A CN112733097A CN201910972028.4A CN201910972028A CN112733097A CN 112733097 A CN112733097 A CN 112733097A CN 201910972028 A CN201910972028 A CN 201910972028A CN 112733097 A CN112733097 A CN 112733097A
- Authority
- CN
- China
- Prior art keywords
- authority
- state
- target
- permission
- application program
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
- G06F21/31—User authentication
- G06F21/316—User authentication by observing the pattern of computer usage, e.g. typical user behaviour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Social Psychology (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Storage Device Security (AREA)
Abstract
The application provides a permission granting method, a permission granting device, an electronic device and a readable storage medium, and relates to the technical field of computers. In the using process of the application program, if an authority using request of the application program is received, the preset authority state of each target authority of the application program is obtained, wherein the authority state of each target authority is generated according to the historical setting record of each target authority. And if the permission state of the requested permission is the granted state, allowing the application program to use the requested permission. And if the authority state of the requested authority is a refused state, displaying an authority application popup frame of the requested authority, and determining whether to allow the application program to use the requested authority or not according to the received selection operation. Therefore, in the use of the application program, only the preset permission application bullet frame with the permission state being the refusal state can be popped up, the number of the permission application bullet frames in the use process of the application program can be reduced, and the user experience is improved.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for granting permission, an electronic device, and a readable storage medium.
Background
In order to better protect the privacy of the user, at present, after an application program is installed on an electronic device, when the application program needs to use a certain authority or certain authorities, a corresponding authority request popup box is popped up to request the authorization from the user. Although the method can protect the privacy of the user, the number of the permission request popup boxes is large, so that the permission request popup boxes are inconvenient for the user to use, and the user experience is poor.
Disclosure of Invention
In view of the above, an object of the present application is to provide a method, an apparatus, an electronic device and a readable storage medium for granting permission.
In order to achieve the above purpose, the embodiments of the present application employ the following technical solutions:
in a first aspect, an embodiment of the present application provides a method for granting permission, which is applied to an electronic device, and the method includes:
in the using process of an application program, if an authority using request of the application program is received, acquiring preset authority states of all target authorities of the application program, wherein the authority states of all the target authorities are generated according to historical setting records of all the target authorities, and the authority states comprise an granting state and a refusing state;
if the authority state of the requested authority in the authority use request is the granted state, allowing the application program to use the requested authority;
and if the authority state of the requested authority in the authority use request is a refused state, displaying an authority application popup frame of the requested authority, and determining whether the application program is allowed to use the requested authority according to the received selection operation.
In a second aspect, an embodiment of the present application provides an authority granting apparatus, which is applied to an electronic device, and the apparatus includes:
the obtaining module is used for obtaining preset authority states of all target authorities of the application program if an authority use request of the application program is received in the use process of the application program, wherein the authority states of all the target authorities are generated according to historical setting records of all the target authorities, and the authority states comprise an granting state and a refusing state;
the authorization module is used for allowing the application program to use the requested authority when the authority state of the requested authority in the authority use request is an authorization state;
the authorization module is further configured to display a permission application popup box of the requested permission when the permission state of the requested permission in the permission use request is a refusal state, and determine whether to allow the application program to use the requested permission according to the received selection operation.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, where the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the authority granting method described in any one of the foregoing embodiments.
In a fourth aspect, the present application provides a readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the authority granting method according to any one of the foregoing embodiments.
According to the permission granting method, the permission granting device, the electronic device and the readable storage medium, in the using process of the application program, if a permission using request of the application program is received, the preset permission state of each target permission of the application program is obtained. And the authority states of all target authorities of the application program are generated according to the historical setting records of all target authorities, and the authority states comprise an authorization state and a rejection state. And if the permission state of the requested permission in the permission use request is the granted state, allowing the application program to use the requested permission. And if the authority state of the requested authority is a refused state, displaying an authority application popup frame of the requested authority, and determining whether the application program is allowed to use the requested authority or not according to the received selection operation. Therefore, when the application program needs to use a certain authority or certain authorities, only the preset authority application bullet frame with the authority state as the refusal state is popped, but the corresponding authority application bullet frame is not popped for each authority which needs to be used. And the preset authority state is generated according to the historical setting record of each target authority, and the authority state configured in the mode is fit with the habit of the user.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a block schematic diagram of an electronic device provided in an embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for granting permission according to an embodiment of the present application;
FIG. 3 is a second flowchart illustrating a method for granting permissions according to an embodiment of the present application;
FIG. 4 is a block diagram of a privilege granting apparatus according to an embodiment of the present application;
fig. 5 is a second block diagram of a right granting apparatus according to an embodiment of the present application.
Icon: 100-an electronic device; 110-a memory; 120-a processor; 130-a communication unit; 200-a right granting device; 210-a setup module; 220-an obtaining module; 230-authorization module.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It is noted that relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The following two schemes are generally adopted in the prior art for granting rights. The first scheme is as follows: if the electronic device runs android5.1 (android system 5.1 version, API level 22) or lower and the tarketSDK of the application is 22 or lower, the system will directly require the user to grant all permissions when the user installs the application. When the user is required to grant ownership limit, the authority groups required by the application program are displayed, and the state of each authority group is defaulted to be the grant state.
The second scheme is as follows: if the android6.0 (6.0 version of android system, API level 23) or higher version is run by the electronic device and the tarketSDK of the application program is 23 or higher version, when the application program uses a certain authority, the authority is requested to the user in a manner of requesting a popup box by the authority.
The inventor of the present application finds that, in the above two schemes, the first scheme is only used for the case that the tarketSDK version is less than 23, and the presented permission group, and the permission group defaults to the granted state, which is inconvenient for protecting the privacy of the user, and the user does not know which permissions are granted by default. Although the second scheme is convenient for protecting the privacy of the user, the number of the permission request bullet frames is increased, sometimes four or five permission request bullet frames are connected, so that the application of permission is relatively fragmentary, and the user is disturbed by frequent bullet frames.
The process of finding the defects of the above scheme is the result of the practice and the careful study of the applicant. Therefore, the discovery process of the above-mentioned problems and the solution proposed by the embodiments of the present application in the following description should be the contribution of the inventor to the present application in the course of the present application.
Referring to fig. 1, fig. 1 is a block diagram of an electronic device 100 according to an embodiment of the present disclosure. The electronic device 100 may be an Android system or another system. The electronic device 100 may be, but is not limited to, a smart phone, a tablet computer, a Personal Digital Assistant (PDA), and the like. The electronic device 100 includes a memory 110, a processor 120, and a communication unit 130. The elements of the memory 110, the processor 120 and the communication unit 130 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines.
The memory 110 is used to store programs or data. The Memory 110 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processor 120 is used to read/write data or programs stored in the memory 110 and perform corresponding functions. For example, the memory 110 stores therein a right granting device 200, and the right granting device 200 includes at least one software function module which can be stored in the memory 110 in the form of software or firmware (firmware). The processor 120 executes various functional applications and data processing by running software programs and modules stored in the memory 110, such as the authority granting apparatus 200 in the embodiment of the present application, that is, implements the authority granting method in the embodiment of the present application.
The communication unit 130 is used for establishing a communication connection between the electronic apparatus 100 and another communication terminal via a network, and for transceiving data via the network.
It should be understood that the structure shown in fig. 1 is only a schematic structural diagram of the electronic device 100, and the electronic device 100 may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for granting permission according to an embodiment of the present application. The method is applied to the electronic device 100. The following describes the specific flow of the authority granting method in detail.
Step S120, in the using process of the application program, if the permission use request of the application program is received, obtaining the preset permission state of each target permission of the application program.
In this embodiment, the electronic device 100 has an application program installed thereon. The electronic device 100 stores therein a preset authority state of authority required for each application, that is, the electronic device 100 stores therein a preset authority state of each target authority of each application. The permission states include a grant state and a deny state. The authority state of each target authority is generated according to the historical setting record of each target authority, so that the set authority state can accord with the use habit of a user. During the application program usage, when the application program needs to use a certain target authority or some target authorities, an authority usage request is generated. After receiving the permission use request, the permission states of the target permissions of the application program can be obtained firstly, so as to obtain the permission states of the permissions requested by the application program.
Step S130, determining whether the permission status of the requested permission in the permission use request is a granted status.
In this embodiment, the permission use request may include an identifier of the target permission that is required by the application at this time (i.e., an identifier of the requested permission). After the authority state of each target authority of the application program is obtained, searching can be carried out according to the identification of the requested authority so as to obtain the authority state of the requested authority, and therefore whether the authority state of the requested authority is a granted state or not is judged.
If the permission status of the requested permission in the permission use request is the granted status, step S140 is executed. If the permission status of the requested permission in the permission use request is a refused status, step S150 is executed.
Step S140, allowing the application to use the requested right.
The authority state of the requested authority is a grant state, which represents that the authority is configured in advance as follows: the requested rights are granted to the application, i.e., the application is allowed to use the requested rights. Thus, upon determining that the permission status of the requested permission is a granted status, the application is allowed to use the requested permission.
And step S150, displaying the permission application popup frame of the requested permission, and determining whether to allow the application program to use the requested permission according to the received selection operation.
The permission state of the requested permission is a refusal state, which represents that the permission state is configured to: the requested rights are not granted to the application, i.e., the application is not allowed to use the requested rights. However, at this time, the application needs to use the requested authority, and thus, when it is determined that the authority status of the requested authority is a refusal status, an authority application popup box regarding the requested authority may be displayed. The permission application box can comprise requested permission, granting options and refusing options. After receiving a selection operation of the user for the permission application popup box, whether the application program is allowed to use the requested permission can be determined according to the selection operation.
Optionally, after the received selection operation of the user, the authority state of the target authority of the application program may be updated according to the authority state corresponding to the selection operation, so that the number of authority application pop-up boxes may be further reduced.
Alternatively, the rights in steps S120 to S150 refer to specific rights, not to a group of rights. The permission group includes at least one specific permission. For example, the LOCATION of the authority group includes: a COARSE LOCATION ACCESS _ COARSE _ LOCATION, a FINE LOCATION ACCESS _ FINE _ LOCATION. The rough position is obtained by obtaining rough longitude and latitude information of a user in a WiFi or mobile base station mode, and the error of the positioning precision is 30-1500 m approximately. The accurate position is obtained by receiving the positioning information of the satellite through a GPS chip, and the positioning accuracy is within 10 meters.
Assuming that the requested authority is ACCESS _ FINE _ LOCATION, if the authority state of the ACCESS _ FINE _ LOCATION configured in advance is a reject state, the authority request box regarding the ACCESS _ FINE _ LOCATION may include: ACCESS _ FINE _ LOCATION, grant option, and deny option. If the user selects the reject option, the application is not allowed to use the ACCESS _ FINE _ LOCATION right. If the user selects the grant option, the application is allowed to use the ACCESS _ FINE _ LOCATION right.
After the user selects the grant option, the permission status of the target permission (i.e. requested permission ACCESS _ FINE _ LOCATION) of the application program stored in the electronic device 100 may be updated from the deny status to the grant status. Therefore, when the application program needs to use the authority next time, the authority application popup frame related to the authority is not displayed any more.
Alternatively, the rights in steps S120 to S150 may also refer to a group of rights. That is, the electronic apparatus 100 stores therein the authority states of the respective authority groups of the respective application programs. The permission states of the permission groups of the application program are generated according to the historical setting records of the permission groups.
In an implementation manner of this embodiment, in order to protect the privacy of the user and clearly inform the user of the authority requested by the application program, the authority in steps S120 to S150 refers to a specific authority. Therefore, when an application program needs to use a certain target authority, whether the application program can use the certain target authority needs to be judged according to the preset authority states of all target authorities of the application program, so that the situation that after a certain authority in a certain authority group is granted, the authority group is directly in the granted state is avoided, and the application program can subsequently directly use any authority in the authority group. Meanwhile, when the permission application bullet frame is displayed, the specific requested permission can be displayed, so that the user can know the permission to be granted to the application program, and the user is prevented from only knowing the name of the permission group.
Referring to fig. 3, fig. 3 is a second flowchart illustrating a method for granting permission according to an embodiment of the present application. Before step S120, the method further comprises step S110.
And step S110, after the application program is installed, setting the authority state of each target authority according to the historical setting record of each target authority.
In this embodiment, after an application is installed and the authority states of the target authorities required by the application are not set, the authority states of the target authorities can be set according to the history setting records of the target authorities stored in the electronic device 100. Subsequently, in the using process of the application program, whether the application program is allowed to use a certain target permission or some target permissions can be judged according to the set permission state of each target permission of the application program. And when the permission is judged not to be allowed according to the permission state, displaying a permission application popup frame to enable a user to select whether the permission is allowed or not. Therefore, the permission state of the target permission of each application program is set according to the history setting record, the permission application bullet frame number in the application program using process can be reduced, and the user experience is improved.
In this embodiment, when the authority state of each target authority is set, the authority state can be set according to the degree of the user watching each target authority. Wherein, the larger the weight degree is, the smaller the authorized probability is. Optionally, the authorization probability of each target authority at this time may be calculated according to the history setting record of each target authority. And then judging whether the authorized probability of each target authority is greater than the corresponding preset probability. And if the current authorized probability of a target authority is greater than the corresponding preset probability, setting the authority state of the target authority to be an authorization state. And if the current authorized probability of one target authority is not greater than the corresponding preset probability, setting the authority state of the target authority to be a refused state. And for the target authority with the authority state being a refusal state, when the application program needs to use the target authority, displaying an authority application popup box related to the target authority so that the user can select whether to grant the target authority.
Alternatively, the preset probability may be set according to actual requirements, for example, to 0.5. The preset probabilities corresponding to different target authorities can be the same or different, and can be set according to actual conditions. For example, the preset probability corresponding to the target authority a is 0.6, and the preset probability corresponding to the target authority b is 0.55. And when the authorization probability of the target permission a is more than 0.6, setting the permission state of the target permission a of the application program to be the granting state. And when the authorization probability of the target authority b is more than 0.55, setting the authority state of the target authority b of the application program to be the authorization state.
In this embodiment, after the permission states are set according to the authorized probability, the permission states of the target permissions set according to the authorized probability may be displayed. And then receiving the confirmation operation of the user on the authority state of each target authority, and storing the final authority state of each target authority corresponding to the confirmation operation. Wherein, the confirmation operation comprises the operation of changing the authority state and the operation of accepting the setting.
Optionally, after setting the permission states of all target permissions of the application according to the authorized probability, the setting result may be displayed through one pop frame or multiple pop frames, so that the user can know the setting condition of the permission state of each target permission. Wherein, one bullet frame can include the authority state setting condition of a target authority, which is convenient for users to read. The authority state setting condition of a plurality of target authorities can be included in one bullet frame, and the number of the bullet frames can be reduced.
The bullet box can include all acceptance options and permission change options. When the user considers that the whole setting result does not need to be modified, all the accepting options can be directly selected. When the user considers that the setting of a certain target permission or certain target permissions needs to be modified, the user can directly select the granted option or the refused option in the permission change options corresponding to the target permission to be modified, and then click all the accepted options, so that the setting result can be modified into the setting result desired by the user.
Because the authorized probability is obtained by calculation according to the historical setting record of the target authority, the setting result obtained according to the authorized probability is in accordance with the habit of the user, the user can not change the setting result, and the user only needs to receive the setting. Therefore, the user can preset the authority states of all authorities of the application program by one key, and the number of authority application pop-up boxes in the use process of the application program is reduced.
In an implementation manner of this embodiment, the history setting record includes: the total setting times of the target authority and the setting times of the target authority to be in an authorization state. The total setting times of the target authority may be the total number of the applications installed on the electronic device 100 and completing the authority state setting on the target authority; the number of authorized states refers to the number of times that the user determines that the authority state of the target authority is set to be the authorized state. The ratio of the number of times of setting as the authorization state to the total number of times of setting as the target authority can be directly used as the authorization probability of the target authority.
In another implementation manner of this embodiment, the history setting record includes: the authorization probability of the last target authority and the authority state of the last user on the target authority are confirmed. When the authorization probability of the current target authority is calculated, the authorization probability of the current target authority can be calculated according to the authorization probability of the last target authority, the confirmation operation of the last user on the authority state of the target authority and an exponential weighted average algorithm.
Wherein, the calculation formula used in calculating the authorized probability by the exponential weighted average algorithm is as follows:
Vt=aVt-1+(1-a)Pt-1t=2,3,...,n
wherein, VtRepresenting the authorized probability of the current target authority; vt-1Representing the probability of being granted of the last target permission; t represents the number of times; a represents a preset weight; pt-1Representing the last user selection value for the target privilege. If the authority state of the target authority is obtained as an authorization state through the last confirmation operation of the user on the authority state of the target authority, Pt-1Is 1, otherwise, if the authority status of the obtained target authority is a refused status, Pt-1Is 0. V1The initial value may be determined by the user, e.g., set to 1. The preset weight can be set according to actual requirements, the larger the value of the preset weight is, the more reference value is in the past setting, and otherwise, the latest selection reference value of the user is higher. The preset weights used by different target authorities may be the same or different.
The following illustrates how the probability of being authorized is calculated.
For the target authority C, it is assumed that the preset probability is 0.5 and the preset weight is 0.8. Substituting the preset weight into the above calculation formula to obtain: vt=0.8Vt-1+0.2Pt-1t=2,3,...,n。
The application 1 is installed to the electronic device 100, and it is determined from the installation package of the application 1 that the rights required by the application 1 include the target right C. The electronic apparatus 100 does not have a history of setting of the target authority C, that is, the authority state of the target authority C is set for the first time at this time. V can be preset at this time1Since 1 is greater than 0.5, the authority state of the target authority C can be set to the granted state according to the granted probability. After the setting result is displayed to the user, if the confirmation operation of the user is: setting the authority state of the target authority C as a refusal state to obtain P1Is 0.
Based on the above calculation formula, it can be calculated to obtain: v2=0.8×V1+0.2 × 0 ═ 0.8 × 1+0 ═ 0.8. If the application 2 is subsequently installed in the electronic device 100, the rights required by the application 2 also include the target rights C. At this time, the authority state of the target authority C is set for the second time according to the authorized probability. Since 0.8 is greater than 0.5, the authority state of the target authority C is set to the granted state when the authority state of the target authority C is set according to the granted probability for the second time. After the setting result is displayed to the user, if the confirmation operation of the user is: setting the authority state of the target authority C as a refusal state to obtain P2Is 0.
It can then be calculated: v3=0.8×V2+0.2 × 0 ═ 0.8 × 0.8+0 ═ 0.64. Since 0.64 is greater than 0.5, the grant state is set when the right state of the target right C is set for the third time. If the user's confirmation operation is: setting the authority state of the target authority C as a refusal state to obtain P3Is 0.
Then, it can be calculated to obtain: v4=0.8×V3+0.2 × 0 ═ 0.8 × 0.64+0 ═ 0.512. Since 0.64 is greater than 0.5, the grant state is set when the authority state of the target authority C is set for the fourth time. If the user's confirmation operation is: setting the authority state of the target authority C as a refusal state to obtain P4Is 0.
In this embodiment, the authority states of the respective target authorities are set based on the history setting records stored in the electronic device 100, and thus, the setting of the authority states is still completed when the electronic device 100 is not networked. And the total set times of the target authority and the set times of the target authority as an authorization state, or the authorization probability of the last target authority and the confirmation operation of the last user on the authority state of the target authority can be recorded as the history set record, so that the sensitivity of the user to each authority is recorded with the minimum storage cost.
In the embodiment of the application, when the application program is installed for the first time and the authority state of the authority required by the application program is not preset, the authorized probability of the authority at this time is calculated through an exponential weighted average algorithm according to the previous rewarding program (namely, the conditions of authority granting and authority refusing) of a certain authority of a user. And then predicting whether the user will grant the authority according to the authorization probability. When the user is predicted to grant a right, setting the right state of the right of the application program as a grant state; when it is predicted that the user will refuse to grant an authority, the authority state of the authority of the application program is set to a refusal state. Therefore, when the authority state is set at this time, the authority state of the authority which some users can grant in the past can be set as the granting state, and the authority state of the authority which some users do not want to grant in the past can be set as the refusing state. And then displaying the setting, receiving the confirmation operation of the user on the setting, and saving the final authority state corresponding to the confirmation operation. When the application program needs to use a certain authority, if the authority state of the authority is the granted state, the application program is allowed to use the certain authority; and if the authority state of the authority is a refused state, displaying an authority request popup box related to the certain authority for the user to select. Therefore, the authority states of all authorities of the application program can be preset at first, and the user is prevented from being troubled by frequent frame flipping. Meanwhile, by means of displaying all the permissions needed by the application program, a user can conveniently know which permissions are specifically needed by the application program.
In order to execute the corresponding steps in the above embodiments and various possible manners, an implementation manner of the authority granting device 200 is given below, and optionally, the authority granting device 200 may adopt the device structure of the electronic device 100 shown in fig. 1. Further, referring to fig. 4, fig. 4 is a block diagram illustrating an authority granting apparatus 200 according to an embodiment of the present application. It should be noted that the basic principle and the technical effects of the permission granting device 200 provided in the present embodiment are the same as those of the above embodiments, and for the sake of brief description, no part of the present embodiment is mentioned, and reference may be made to the corresponding contents in the above embodiments. The right granting device 200 may include: an obtaining module 220 and an authorizing module 230.
The obtaining module 220 is configured to, in the using process of the application program, obtain the preset permission state of each target permission of the application program if the permission using request of the application program is received. The authority state of each target authority is generated according to the historical setting record of each target authority, and the authority state comprises an granting state and a refusing state.
The authorization module 230 is configured to allow the application program to use the requested right when the right status of the requested right in the right use request is the granted status.
The authorization module 230 is further configured to display an authority application popup box of the requested authority when the authority status of the requested authority in the authority use request is a refusal status, and determine whether to allow the application to use the requested authority according to the received selection operation.
Referring to fig. 5, fig. 5 is a second block diagram of a right granting apparatus 200 according to an embodiment of the present application. The authority granting apparatus 200 may further include a setting module 210.
The setting module 210 is configured to set the permission state of each target permission according to the history setting record of each target permission after the application is installed.
In this embodiment, the setting module 210 is specifically configured to:
calculating the authorized probability of each target authority according to the history setting record of each target authority;
judging whether the authorized probability of each target authority is greater than the corresponding preset probability;
if so, setting the authority state of the target authority to be a granted state;
and if not, setting the authority state of the target authority to be a refusal state.
In this embodiment, the setting module 210 is further specifically configured to:
displaying the authority state of each target authority set according to the authorization probability;
and receiving confirmation operation of a user on the authority state of each target authority, and storing the final authority state of each target authority corresponding to the confirmation operation, wherein the confirmation operation comprises operation of changing the authority state and operation of accepting setting.
In this embodiment, the setting module 210 is specifically configured to: and calculating the authorization probability of the target authority at this time according to the authorization probability of the target authority at the last time, the confirmation operation of the authority state of the target authority by the user at the last time and an exponential weighted average algorithm.
Alternatively, the modules may be stored in the memory 110 shown in fig. 1 in the form of software or Firmware (Firmware) or be fixed in an Operating System (OS) of the electronic device 100, and may be executed by the processor 120 in fig. 1. Meanwhile, data, codes of programs, and the like required to execute the above-described modules may be stored in the memory 110.
The embodiment of the application also provides a readable storage medium, on which a computer program is stored, and the computer program realizes the permission granting method when being executed by a processor.
In summary, the embodiments of the present application provide an authority granting method, an authority granting device, an electronic device, and a readable storage medium. In the using process of the application program, if an authority using request of the application program is received, the preset authority state of each target authority of the application program is obtained. And the authority states of all target authorities of the application program are generated according to the historical setting records of all target authorities, and the authority states comprise an authorization state and a rejection state. And if the permission state of the requested permission in the permission use request is the granted state, allowing the application program to use the requested permission. And if the authority state of the requested authority is a refused state, displaying an authority application popup frame of the requested authority, and determining whether the application program is allowed to use the requested authority or not according to the received selection operation. Therefore, when the application program needs to use a certain authority or certain authorities, only the preset authority application bullet frame with the authority state as the refusal state is popped, but the corresponding authority application bullet frame is not popped for each authority which needs to be used. And the preset authority state is generated according to the historical setting record of each target authority, and the authority state configured in the mode is fit with the habit of the user.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (12)
1. An authority granting method applied to an electronic device, the method comprising:
in the using process of an application program, if an authority using request of the application program is received, acquiring preset authority states of all target authorities of the application program, wherein the authority states of all the target authorities are generated according to historical setting records of all the target authorities, and the authority states comprise an granting state and a refusing state;
if the authority state of the requested authority in the authority use request is the granted state, allowing the application program to use the requested authority;
and if the authority state of the requested authority in the authority use request is a refused state, displaying an authority application popup frame of the requested authority, and determining whether the application program is allowed to use the requested authority according to the received selection operation.
2. The method of claim 1, further comprising:
and after the application program is installed, setting the authority state of each target authority according to the historical setting record of each target authority.
3. The method according to claim 2, wherein the setting the authority status of each target authority according to the historical setting record of each target authority comprises:
calculating the authorized probability of each target authority according to the history setting record of each target authority;
judging whether the authorized probability of each target authority is greater than the corresponding preset probability;
if so, setting the authority state of the target authority to be a granted state;
and if not, setting the authority state of the target authority to be a refusal state.
4. The method according to claim 3, wherein the setting of the authority status of each target authority according to the historical setting record of each target authority further comprises:
displaying the authority state of each target authority set according to the authorized probability;
and receiving confirmation operation of a user on the authority state of each target authority, and storing the final authority state of each target authority corresponding to the confirmation operation, wherein the confirmation operation comprises operation of changing the authority state and operation of accepting setting.
5. The method according to claim 4, wherein the calculating the authorization probability of each target authority of this time according to the history setting record of each target authority comprises:
and calculating the authorization probability of the target authority at this time according to the authorization probability of the target authority at the last time, the confirmation operation of the authority state of the target authority by the user at the last time and an exponential weighted average algorithm.
6. An authority granting apparatus applied to an electronic device, the apparatus comprising:
the obtaining module is used for obtaining preset authority states of all target authorities of the application program if an authority use request of the application program is received in the use process of the application program, wherein the authority states of all the target authorities are generated according to historical setting records of all the target authorities, and the authority states comprise an granting state and a refusing state;
the authorization module is used for allowing the application program to use the requested authority when the authority state of the requested authority in the authority use request is an authorization state;
the authorization module is further configured to display a permission application popup box of the requested permission when the permission state of the requested permission in the permission use request is a refusal state, and determine whether to allow the application program to use the requested permission according to the received selection operation.
7. The apparatus of claim 6, further comprising:
and the setting module is used for setting the authority state of each target authority according to the historical setting record of each target authority after the application program is installed.
8. The apparatus of claim 7, wherein the setup module is specifically configured to:
calculating the authorized probability of each target authority according to the history setting record of each target authority;
judging whether the authorized probability of each target authority is greater than the corresponding preset probability;
if so, setting the authority state of the target authority to be a granted state;
and if not, setting the authority state of the target authority to be a refusal state.
9. The apparatus of claim 8, wherein the setup module is further specifically configured to:
displaying the authority state of each target authority set according to the authorization probability;
and receiving confirmation operation of a user on the authority state of each target authority, and storing the final authority state of each target authority corresponding to the confirmation operation, wherein the confirmation operation comprises operation of changing the authority state and operation of accepting setting.
10. The apparatus of claim 9, wherein the setup module is specifically configured to:
and calculating the authorization probability of the target authority at this time according to the authorization probability of the target authority at the last time, the confirmation operation of the authority state of the target authority by the user at the last time and an exponential weighted average algorithm.
11. An electronic device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor to implement the method of granting permission of any of claims 1-5.
12. A readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing the rights granting method as claimed in any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910972028.4A CN112733097B (en) | 2019-10-14 | 2019-10-14 | Permission granting method and device, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910972028.4A CN112733097B (en) | 2019-10-14 | 2019-10-14 | Permission granting method and device, electronic equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112733097A true CN112733097A (en) | 2021-04-30 |
CN112733097B CN112733097B (en) | 2023-07-04 |
Family
ID=75588484
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910972028.4A Active CN112733097B (en) | 2019-10-14 | 2019-10-14 | Permission granting method and device, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112733097B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113901436A (en) * | 2021-12-10 | 2022-01-07 | 南栖仙策(南京)科技有限公司 | Authority distribution method and device, electronic equipment and storage medium |
CN114417366A (en) * | 2021-12-22 | 2022-04-29 | 大连中科创达软件有限公司 | Authority processing method and device, vehicle-mounted terminal and readable storage medium |
WO2024139621A1 (en) * | 2022-12-31 | 2024-07-04 | 中兴通讯股份有限公司 | Permission management method, terminal and computer readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103905651A (en) * | 2014-04-30 | 2014-07-02 | 北京邮电大学 | Method and system for application permission management in intelligent terminal |
CN104751071A (en) * | 2015-03-16 | 2015-07-01 | 联想(北京)有限公司 | Information processing method and electronic equipment |
WO2015196714A1 (en) * | 2014-06-24 | 2015-12-30 | 小米科技有限责任公司 | Permission management method, device and system |
CN106469270A (en) * | 2015-08-17 | 2017-03-01 | 中国移动通信集团公司 | A kind of management method of application permission, equipment and system |
CN108537011A (en) * | 2018-03-16 | 2018-09-14 | 维沃移动通信有限公司 | A kind of application permission processing method, terminal and server |
-
2019
- 2019-10-14 CN CN201910972028.4A patent/CN112733097B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103905651A (en) * | 2014-04-30 | 2014-07-02 | 北京邮电大学 | Method and system for application permission management in intelligent terminal |
WO2015196714A1 (en) * | 2014-06-24 | 2015-12-30 | 小米科技有限责任公司 | Permission management method, device and system |
CN104751071A (en) * | 2015-03-16 | 2015-07-01 | 联想(北京)有限公司 | Information processing method and electronic equipment |
CN106469270A (en) * | 2015-08-17 | 2017-03-01 | 中国移动通信集团公司 | A kind of management method of application permission, equipment and system |
CN108537011A (en) * | 2018-03-16 | 2018-09-14 | 维沃移动通信有限公司 | A kind of application permission processing method, terminal and server |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113901436A (en) * | 2021-12-10 | 2022-01-07 | 南栖仙策(南京)科技有限公司 | Authority distribution method and device, electronic equipment and storage medium |
CN114417366A (en) * | 2021-12-22 | 2022-04-29 | 大连中科创达软件有限公司 | Authority processing method and device, vehicle-mounted terminal and readable storage medium |
WO2024139621A1 (en) * | 2022-12-31 | 2024-07-04 | 中兴通讯股份有限公司 | Permission management method, terminal and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112733097B (en) | 2023-07-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112733097B (en) | Permission granting method and device, electronic equipment and readable storage medium | |
CN110298188B (en) | Control method and system for dynamic access authority | |
CN110298176B (en) | Intelligent terminal App permission privacy risk monitoring and evaluating system and method | |
CN102122329B (en) | Third party control of location information access | |
US8897817B1 (en) | Blurring location information | |
JP5889376B2 (en) | Location-based system permissions and coordination in electronic devices | |
KR101227707B1 (en) | Method and device for controlling use of context information of a user | |
EP3491779A1 (en) | Blockchain-implemented method and system | |
US8782084B2 (en) | System, method, and computer program product for conditionally allowing access to data on a device based on a location of the device | |
CN107770146B (en) | User data authority control method and device | |
CN105051749A (en) | Policy based data protection | |
US20160092887A1 (en) | Application license distribution and management | |
WO2019199465A1 (en) | TRUSTED PLATFORM MODULE-BASED PREPAID ACCESS TOKEN FOR COMMERCIAL IoT ONLINE SERVICES | |
CN113591068B (en) | Online login device management method and device and electronic device | |
CN111523098A (en) | Data authority management method and device | |
CN109714393A (en) | A kind of method and device that application program is recommended | |
WO2020198958A1 (en) | Techniques involving a security heat map | |
CN110990244A (en) | Target equipment identification determining method and device, electronic equipment and readable storage medium | |
US10628559B2 (en) | Application management | |
CN105701567A (en) | Vehicle network scheduling method and device | |
CN114020755A (en) | Image map tile publishing method, image map tile generating method and device | |
US11272368B2 (en) | Controlling access to protected resource using a heat map | |
US20230093075A1 (en) | Systems and methods for controlling third-party access of protected data | |
US20210064658A1 (en) | Geofencing queries based on query intent and result semantics | |
JP6336177B2 (en) | Calculation device, calculation method and calculation program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |