CN113792327A - Authority management method, user interface and electronic equipment - Google Patents

Authority management method, user interface and electronic equipment Download PDF

Info

Publication number
CN113792327A
CN113792327A CN202110926389.2A CN202110926389A CN113792327A CN 113792327 A CN113792327 A CN 113792327A CN 202110926389 A CN202110926389 A CN 202110926389A CN 113792327 A CN113792327 A CN 113792327A
Authority
CN
China
Prior art keywords
application
user interface
displayed
time
period
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
Application number
CN202110926389.2A
Other languages
Chinese (zh)
Other versions
CN113792327B (en
Inventor
蒲兴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Glory Smart Technology Development Co ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202110926389.2A priority Critical patent/CN113792327B/en
Publication of CN113792327A publication Critical patent/CN113792327A/en
Application granted granted Critical
Publication of CN113792327B publication Critical patent/CN113792327B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/629Protecting access to data via a platform, e.g. using keys or access control rules to features or functions of an application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Abstract

The application discloses an authority management method, a user interface and electronic equipment, the method can divide applications into white list applications and black list applications according to the adaptation degree of different applications to single authorization, the adaptation degree of the white list applications to the single authorization is good, so that when the application is subjected to authority configuration, a single authorization option exists, a user can select whether to perform single authorization on the application according to own requirements, the adaptation degree of the black list applications to the single authorization is poor, so that when the application is subjected to authority configuration, the single authorization option does not exist, and the problem of abnormal operation after the user performs single authorization on the application is solved.

Description

Authority management method, user interface and electronic equipment
Technical Field
The present application relates to the field of terminals and communication technologies, and in particular, to a rights management method, a user interface, and an electronic device.
Background
With the development of the internet, more and more applications can be installed on electronic devices. In the operation process, hardware and software resources of the electronic equipment need to be called to support the operation of the electronic equipment. And hardware and software resources of the electronic equipment relate to privacy information of the user, so that in the process of opening the application or running the application for the first time, the electronic equipment displays an authority window to prompt the user to grant authority, and after the permission of the user is obtained, the application is allowed to call corresponding hardware or software resources in the electronic equipment.
According to different authorization durations, a plurality of authorization modes are also provided in the authority window: the method comprises the following steps of always allowing, allowing during use, allowing and forbidding the operation of the application, wherein the operation permission of the current time means that the application is allowed to use the authority only during the single operation of the application. However, different applications have different adaptation degrees to the authorization method allowed by the current operation, and when the authorization method allowed by the current operation is configured for the application, the application may return to the foreground operation again, and the access right may not be obtained, or the user data may be lost.
Therefore, how to manage access to permissions by different applications and avoid the problems that the applications cannot access the permissions and user data is lost are problems to be solved urgently at present.
Disclosure of Invention
Some embodiments of the application provide a rights management method, a user interface and an electronic device.
The method provided by some embodiments of the application can provide different authorization modes for different applications and different permissions, and avoids the problem of abnormal operation caused by the fact that the application is not adaptive to single authorization.
In a first aspect, an embodiment of the present application provides a rights management method, including:
the electronic equipment displays a first window of a first application, and the first window displays an authority item with a first authority;
if the first application is a white list application, the first application is allowed to use the first permission during the single running of the first application, and the authorization mode of the first permission comprises a first authorization mode which is allowed to use the first permission during the single running of the first application; otherwise, the authorization mode of the first authority does not include the first authorization mode; when the user interface of the white list application is displayed again after a period of time after being closed, one of the following exceptions exists: the user data of the white list application is lost, the first function of the white list application fails to invoke the first right, or the exception does not exist.
By implementing the method provided by the first aspect, whether the application is a white list application can be analyzed in advance according to the condition that the application uses the valid permission during a single running period. The white list application is an application which has a good degree of single authorization and only has user data loss or failure in function calling the authority in the running process or does not have the exception. If the application is a white list application, the application is proved to have good adaptation degree to single authorization, and the electronic device can provide an option of single authorization of the authority in an authorization window of the application, so that a user can select whether to perform single authorization on the application according to own requirements. Otherwise, the application is a blacklist application, that is, the application has a poor adaptation degree to single authorization, the electronic device may not provide the option of single authorization of the right in the authorization window of the application, thereby avoiding the problem of abnormal operation after the user performs single authorization on the application.
With reference to the first aspect, in a possible implementation manner, the method further includes: if the user data is lost when the user interface of the first application is displayed again after a period of time after being closed and displayed, the electronic device still operates the first application within the period of time after the user interface of the first application is closed and displayed, the duration of the period of time exceeds a preset duration, and the electronic device recovers the first authority of the first application after the duration of the period of time exceeds the preset duration.
When the application is in the running process and has the condition of user data loss, the running of the application is possibly caused by the fact that the application is finished after the background running exceeds a certain time, the electronic equipment can run in the background of the application without finishing running the application, only the effective permission granted to the application in a single running period is recovered, the condition of user data loss is avoided, the running condition of the application is improved, and the experience of a user is improved.
With reference to the first aspect, in a possible implementation manner, the method further includes: and after the user interface of the first application is closed to display and displayed again after the period of time, the user interface of the first application does not present the exception of user data loss.
With reference to the first aspect, in a possible implementation manner, the method further includes: after the user interface of the first application is closed and displayed, and when the user interface of the first application is displayed again after the period of time, the electronic equipment does not display the starting interface of the first application.
After the application enters the background operation, the application is always in the operation process, and when the application returns to the foreground operation again, the application does not need to be restarted, so that the starting interface of the application cannot be displayed.
With reference to the first aspect, in a possible implementation manner, the launch interface includes one or more of the following pages provided by the first application when waiting for the first application to be launched: a start page, an advertisement page.
With reference to the first aspect, in a possible implementation manner, the user interface of the first application is a video playing interface, and the user data is a video playing progress.
That is to say, when the application has data loss, the application may be a video playing application, and when the application is switched to the background and returns to the foreground again after a period of time, there may be a case where the playing progress is cleared, and the video returns to the starting point again to start playing. The video playing application is suitable for being always kept running after being switched to the background running, so that the problem of user data loss is avoided.
With reference to the first aspect, in a possible implementation manner, the method further includes: if the first function calls the first permission to be abnormal after the user interface of the first application is closed and displayed for a period of time and displayed again, the electronic equipment finishes running the first application under the condition that the user interface of the first application is closed and displayed for more than preset time, and the electronic equipment recovers the first permission of the first application.
When the application is in the operation process and has the condition of function calling permission failure, the application is probably always operated in the background after being switched to the background operation, and the effective permission obtained in the single operation period of the application is recovered by the electronic equipment after the background operation exceeds the preset time length, so that when the application starts the function, the permission required by the function cannot be obtained, and the function operation failure is caused.
With reference to the first aspect, in a possible implementation manner, the method further includes: and after the user interface of the first application is closed and displayed, when the user interface of the first application is displayed again after a period of time, the first function successfully calls the first permission.
With reference to the first aspect, in a possible implementation manner, the method further includes: and after the user interface of the first application is closed and displayed, when the user interface of the first application is displayed again after a period of time, the electronic equipment displays the starting interface of the first application.
After the application enters the background operation, the application exceeds the preset duration, the electronic device ends the operation of the application, and when the application returns to the foreground operation again, the electronic device needs to pull up the process of the application again, so that the electronic device can display the start interface of the application when starting the application.
With reference to the first aspect, in a possible implementation manner, the first function is a voice chat function, and the first right is a microphone.
That is to say, when the application has a data loss condition, the function may be a voice chat function, the application may normally use the voice chat function before switching to the background operation, when the application enters the background operation and exceeds a preset time, the electronic device recovers the microphone permission of the application, and when the application returns to the foreground again, there may be a case that the voice chat function cannot acquire the voice information of the user. The application is suitable for ending running after the application is switched to the background and the preset time is exceeded, so that the problem that the function calling permission of the application fails is solved.
With reference to the first aspect, in a possible implementation manner, the method further includes: after the user interface of the first application is closed and displayed and is displayed again after a period of time, the electronic equipment responds to the operation of starting the first function, displays a second window and prompts a user to grant the first application with the first permission.
That is to say, when the application returns to the foreground operation again, the electronic device may actively display the permission window when the function of the application requires permission, and prompt the user to grant permission to the application, thereby ensuring normal operation of the application.
With reference to the first aspect, in a possible implementation manner, the method further includes: for some sensitive rights (e.g. location, shooting, recording, etc.) only a single authorization may be recommended, e.g. a default selection is recommended to allow this option only once.
In a second aspect, an embodiment of the present application provides another authorization management method, where the method includes: the electronic device allows the first application to use a first privilege during a single run of the first application; the electronic equipment closes the user interface for displaying the first application, and displays the user interface of the first application again after a period of time; and the electronic equipment responds to the operation of starting the first function, displays a second window and prompts a user to grant the first application with the first permission.
When the electronic device grants the effective right to the application during the single running period, if the application is switched to the background running and exceeds the preset time length, the electronic device actively recovers the right of the application, and at this time, when the application returns to the foreground running again, the electronic device can actively display the right window to prompt the user to grant the right to the application when the function of the application needs the right, thereby ensuring the normal running of the application.
With reference to the second aspect, in one possible implementation manner, before the electronic device allows the first application to use the first right during a single run of the first application, the method further includes: the electronic equipment displays a first window of the first application, the first window displays a permission item of the first permission, the authorization mode of the first permission comprises a first authorization mode, and the first authorization mode is to allow the first permission to be used during the single running of the first application.
That is, the electronic device may grant the application the rights valid during a single run, i.e., allow the application to use the rights during a single run of the application, upon receiving the user selection of the option for a single authorization.
With reference to the second aspect, in a possible implementation manner, the first application is a white list application, and when a user interface of the white list application is closed and displayed again after a period of time elapses, one of the following exceptions exists: the user data of the white list application is lost, the first function of the white list fails to call the first permission, or the exception does not exist.
That is, the electronic device allows the application to use the right during a single run of the application, which indicates that the application is well adapted to the single authorization, that is, the application only has an exception that the user data is lost or the function fails to invoke the right during the run process, or does not have the exception.
With reference to the second aspect, in a possible implementation manner, if the user interface of the first application is lost when displayed again after being closed and displayed for a period of time, the electronic device still runs the first application for a period of time after the user interface of the first application is closed and displayed, the duration of the period of time exceeds a preset duration, and after the duration of the period of time exceeds the preset duration, the electronic device recovers the first permission of the first application.
When the application is in the running process and has the condition of user data loss, the running of the application is possibly caused by the fact that the application is finished after the background running exceeds a certain time, the electronic equipment can run in the background of the application without finishing running the application, only the effective permission granted to the application in a single running period is recovered, the condition of user data loss is avoided, the running condition of the application is improved, and the experience of a user is improved.
With reference to the second aspect, in a possible implementation manner, the method further includes: and after the user interface of the first application is closed to display and displayed again after the period of time, the user interface of the first application does not present the exception of user data loss.
With reference to the second aspect, in a possible implementation manner, the method further includes: after the user interface of the first application is closed and displayed, and when the user interface of the first application is displayed again after the period of time, the electronic equipment does not display the starting interface of the first application.
After the application enters the background operation, the application is always in the operation process, and when the application returns to the foreground operation again, the application does not need to be restarted, so that the starting interface of the application cannot be displayed.
With reference to the second aspect, in a possible implementation manner, the launch interface includes one or more of the following pages provided by the first application when waiting for the first application to be launched: a start page, an advertisement page.
With reference to the second aspect, in a possible implementation manner, the user interface of the first application is a video playing interface, and the user data is a video playing progress.
That is to say, when the application has data loss, the application may be a video playing application, and when the application is switched to the background and returns to the foreground again after a period of time, there may be a case where the playing progress is cleared, and the video returns to the starting point again to start playing. The video playing application is suitable for being always kept running after being switched to the background running, so that the problem of user data loss is avoided.
With reference to the second aspect, in a possible implementation manner, the method further includes: if the first function calls the first permission to be abnormal after the user interface of the first application is closed and displayed for a period of time and displayed again, the electronic equipment finishes running the first application under the condition that the user interface of the first application is closed and displayed for more than preset time, and the electronic equipment recovers the first permission of the first application.
When the application is in the operation process and has the condition of function calling permission failure, the application is probably always operated in the background after being switched to the background operation, and the effective permission obtained in the single operation period of the application is recovered by the electronic equipment after the background operation exceeds the preset time length, so that when the application starts the function, the permission required by the function cannot be obtained, and the function operation failure is caused.
With reference to the second aspect, in a possible implementation manner, the method further includes: and after the user interface of the first application is closed and displayed, when the user interface of the first application is displayed again after a period of time, the first function successfully calls the first permission.
With reference to the second aspect, in a possible implementation manner, the method further includes: and after the user interface of the first application is closed and displayed, when the user interface of the first application is displayed again after a period of time, the electronic equipment displays the starting interface of the first application.
After the application enters the background operation, the application exceeds the preset duration, the electronic device ends the operation of the application, and when the application returns to the foreground operation again, the electronic device needs to pull up the process of the application again, so that the electronic device can display the start interface of the application when starting the application.
With reference to the second aspect, in a possible implementation manner, the first function is a voice chat function, and the first right is a microphone.
That is to say, when the application has a data loss condition, the function may be a voice chat function, the application may normally use the voice chat function before switching to the background operation, when the application enters the background operation and exceeds a preset time, the electronic device recovers the microphone permission of the application, and when the application returns to the foreground again, there may be a case that the voice chat function cannot acquire the voice information of the user. The application is suitable for ending running after the application is switched to the background and the preset time is exceeded, so that the problem that the function calling permission of the application fails is solved.
In a third aspect, an embodiment of the present application provides an electronic device, including: a display screen, a memory, one or more processors, a plurality of applications, and one or more programs; wherein the one or more programs are stored in the memory; characterized in that the one or more processors, when executing the one or more programs, cause the electronic device to implement the method as described in the first aspect or any one of the embodiments of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium including instructions that, when executed on an electronic device, cause the electronic device to perform the method described in the first aspect or any one of the implementation manners of the first aspect.
In a fifth aspect, the present application provides a computer program product, which when run on a computer, causes the computer to perform the method as described in the first aspect or any one of the implementation manners of the first aspect.
By implementing the technical scheme provided by the embodiment of the application, when the application is subjected to authority configuration, the electronic device can determine whether to provide an authorization mode of single authorization for the authority in the authority window of the application according to whether the application is a white list application or a black list application, so that the user is prevented from selecting the authorization mode which can influence the operation of the application.
Drawings
FIG. 1 is a diagram illustrating the relationship between different authorization modes of an application and the running state of the application;
FIGS. 2A-2C are a scenario of a single authorization for an application;
fig. 3 is a hardware structure diagram of an electronic device according to an embodiment of the present disclosure;
fig. 4 is a software structure diagram of an electronic device according to an embodiment of the present application;
FIGS. 5A-5H illustrate some of the user interfaces provided by embodiments of the present application;
fig. 6 is a flowchart illustrating a rights management method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described in detail and clearly with reference to the accompanying drawings. In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" in the text is only an association relationship describing an associated object, and means that three relationships may exist, for example, a and/or B may mean: three cases of a alone, a and B both, and B alone exist, and in addition, "a plurality" means two or more than two in the description of the embodiments of the present application.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of embodiments of the application, unless stated otherwise, "plurality" means two or more.
The term "User Interface (UI)" in the following embodiments of the present application is a media interface for interaction and information exchange between an application program or an operating system and a user, and implements conversion between an internal form of information and a form acceptable to the user. The user interface is source code written by java, extensible markup language (XML) and other specific computer languages, and the interface source code is analyzed and rendered on the electronic equipment and finally presented as content which can be identified by a user. A commonly used presentation form of the user interface is a Graphical User Interface (GUI), which refers to a user interface related to computer operations and displayed in a graphical manner. It may be a visual interface element such as text, an icon, a button, a menu, a tab, a text box, a dialog box, a status bar, a navigation bar, a Widget, etc. displayed in the display of the electronic device.
For ease of understanding, a brief explanation of the manner in which application authorization involves authorization is first provided.
Because the application is opened for the first time or in the process of running the application, the electronic equipment displays an authority window to prompt a user to grant authority, and a plurality of authorization modes can be displayed in the authority window: and the permission, permission during the use period, permission and prohibition of the operation, and the like are always given, so that the user can grant the permission of applying different durations according to different requirements.
The always permission means that the application always has the right after the right is granted to the application. The permission during use means that after the application is granted with the right, the application only has the right in the process of using the application by the user. The operation permission refers to that after the permission is granted to the application, the application only has the permission in the process that the user uses the application for the last time. Prohibited is the refusal of granting permission to an application.
Fig. 1 illustrates the relationship between the above authorization manner and the running state of the application.
As can be seen from fig. 1, the running states of the application include three types: foreground running, background running and closing. It should be noted that the operational state of the application mentioned here is understood from the point of view of the user. From the perspective of a user, foreground operation refers to operation of an application by the electronic device, and an operation process of the application is visible to the user, and the application can interact with the user, for example, the user can browse a user interface provided by the application through display of the electronic device. Background running refers to the electronic device running the application, but the running process of the application is invisible to the user, and the application cannot interact with the user. Off means that the electronic device is not running an application. When the electronic device is a mobile phone, a user may switch an application from foreground running to background running through a sliding operation (e.g., a sliding operation) in a display screen, where the sliding operation of the user may enable a user interface displayed by the electronic device to be switched from a user interface of the application to another interface, e.g., a main interface of the electronic device. The user can view the historical access records of the applications through the multitasking window, wherein user interfaces of one or more applications viewed by the user in the historical view can be displayed in the multitasking window, and the electronic device can receive a sliding operation (for example, a sliding operation) acted on the user interface of one application by the user, completely close the application, namely, end the running of the application.
The application is in a closed state at stages 0-t1 and t8-t9, the application is in a foreground running state after stages t1-t3, t4-t5, t7-t8 and t9, and the application is in a background running state at stages t3-t4 and t5-t 7. When the authorization mode is forbidden, no matter whether the application runs or not, the application has no authority, when the authorization mode is always allowed, the application always has the authority after acquiring the authority at the time t2, when the authorization mode is allowed in the use period, the application runs in the foreground every time after acquiring the authority at the time t2, and the background running time does not exceed a threshold value, wherein the threshold value is the time length of t5-t 6), the application all has the authority, when the authorization mode is allowed in the current running, the application only has the authority in the single running process after acquiring the authority at the time t2, and the background running time does not exceed the threshold value, namely the stage t2-t 6.
It can be seen that, when the authorization mode is the permission of the current operation, after the application permission is granted, the application only has the permission in the process of single operation and the time of the application entering the background operation does not exceed the threshold, and when the time of the application background operation exceeds the threshold, the electronic device can recover the permission of the application.
It is understood that the aforementioned permission grant case is for a single permission, in other embodiments of the present application, the operation permission may also be referred to as a use permission, a single permission, a one-time authorization, a single permission, an only this time, and the like, and the present application does not limit the name.
In the following embodiments of the present application, for convenience of description, an authorization manner allowed in this operation is referred to as single authorization.
Fig. 2A-2C illustrate a scenario in which an application is single-authorized.
Fig. 2A shows an authority window 01 that the electronic device prompts to authorize the browser when the browser is first opened, where after the user grants the browser the authority allowed for the current operation, the browser can obtain the authority to access the location information in the process of the current operation.
Fig. 2B shows the user interface of the browser displayed by the electronic device after the browser authorization is completed, and the browser is in the foreground operating state. The area 02 in the user interface is used for displaying some news pushed by the browser for the user when the browser enables a nearby news pushing function, and the news is searched by the browser in combination with the geographic position of the user. At this time, when the browser is opened, the electronic device grants the access right of the position information to the browser, so that the news pushing function near the browser can normally operate at this time.
FIG. 2C illustrates a user interface displayed by the electronic device when the browser switches from foreground to background operation and after a period of time, again, when the browser is operating in the foreground. At this time, when the duration of the period of time is greater than the threshold, the electronic device recovers the authority of the browser for accessing the position information after the browser is switched from the foreground to the background to run and the threshold time elapses. Then, when the browser returns to the foreground operation again, the nearby news push function of the application cannot operate normally. At this time, news recommended nearby cannot be displayed in the area 02, and the prompt information 03 for prompting that the application cannot acquire the position information of the electronic device is displayed in the area 02, so that the positioning fails and news nearby cannot be searched.
As can be seen from fig. 2A to 2C, when the elapsed time exceeds the threshold after the application is switched to the background operation, the electronic device may recover the authority valid during the single operation of the application, which may result in a failure of the function (the nearby news push function) of the application to invoke the authority (the location information).
The method comprises the steps that after single authorization is carried out on an application, when the time for switching the application to a background operation exceeds a threshold value, an electronic device can end operation of the application, namely, the process of the application is killed, so that the single operation process of the application is ended, when the application is restarted, a history interface displayed by the application before switching to the background can be displayed again, and the application can request a user to grant permission again because the application starts a new operation stage, so that the problem that the application does not display a permission window any more and prompts the user for authorization after the permission of the application is recovered is solved.
However, the application killing process also has a certain problem, and some applications may not be completely restored to the historical interface displayed by the application before being switched to the background when being restarted after being closed, for example, for a video playing application, the historical interface may refer to a video playing interface, and when the video playing application returns to the foreground again for display, the last video playing progress may not be located, that is, there is a problem of user data loss, which still affects the experience of the user on the application.
In the above, whether the function call authority fails or the user data is lost, the problem of abnormal operation of the application is caused by poor adaptation of the application to single authorization. Therefore, how to control access of different applications to the permission and avoid the problem of abnormal operation of the applications is a problem to be solved urgently at present.
The embodiment of the application provides an authority management method, and the method can divide applications into blacklist applications and white list applications according to the adaptation degree of different applications to single authorization, the adaptation degree of the white list applications to the single authorization is good, so that when the authority of the applications is configured, the authorization mode comprises the single authorization, the adaptation degree of the white list applications to the single authorization is poor, and when the authority of the applications is configured, the authorization mode does not comprise the single authorization.
Therefore, when the application has poor adaptation degree to the single authorization, the user can be prevented from performing the single authorization on the application in a mode of removing the option of the single authorization, so that the problem of abnormal operation when the application configures the single authorization is avoided. Generally speaking, the method can be combined with the adaptation situation of different applications to single authorization, and an authorization mode can be customized in a personalized manner, so that reasonable authorization of the applications is realized, and the problem that the applications have larger abnormal operation due to the configuration of the authority is avoided.
When the white list application is switched from foreground operation to background operation and is displayed again after a period of time, the user data of the white list application is lost, the function calling authority of the white list application fails, or the abnormality does not exist; otherwise, the blacklist application has the two exceptions.
Furthermore, the white list application can be further subdivided into two subclasses, the first subclass is mainly used for the situation that the application only fails to have function access permission when the application returns to the foreground for running after entering the background for a period of time, the electronic device can recover the permission of the application after the application enters the background for running for a preset time to kill the process of the application, the second subclass is mainly used for the situation that the application only loses user data when the application returns to the foreground after entering the background for running for a period of time, and the electronic device can only recover the permission of the application after the application enters the background for running for a preset time without killing the process of the application. The application is specifically authorized once in the application detection stage for which subclass in the white list, and whether the application kills the process of the application after the application is switched to the background operation for a preset time or not or whether the problem of abnormal function access authority exists or the problem of user data loss exists when the application is not killed is observed, so that the application is determined to be specifically suitable for killing the process or not, and the subclass in the white list is divided.
That is to say, the method can further eliminate the problem of minor running exception after a single authorization is performed on the application as much as possible by killing or not killing the process of the application when the application runs in the background. Therefore, the electronic equipment can further control the application to adopt different running modes according to the adaptation degree of the application to the single authorization, the problem of abnormal running of the application is solved, and the experience of a user is improved.
The embodiment of the application also provides an authority management method, the method can grant the first authority which is effective in a single running period to the application, when the application is switched from foreground running to background running, and after a period of time, the application returns to the foreground running again, the electronic device can respond to the operation of starting the application function and display an authority window, and the authority window is used for prompting a user to grant the first authority to the application.
This is because, when the application has a right valid during a single running, if the time for switching the application to the background running exceeds the threshold, the electronic device will recover the right of the application, but the application does not sense the right recovery, and still continues to run under the setting that the right exists by default, which also causes a situation that the function cannot run normally when the application starts the function that needs the right. Therefore, the method can actively display the authorization window when the application returns to the foreground operation again and the function needing the authority is started, prompt the user to grant the application authority, and avoid the problem that the application fails to have the function access authority.
The application mentioned in the method is a white list application, and when the application is the white list application, an authorization mode of single authorization exists in an authority window displayed by the electronic equipment, so that a user can grant effective authority to the application during single operation according to an option corresponding to the single authorization in the authority window. For a description of the white list application, reference may be made to the foregoing description, which is not repeated.
In addition, when the application is switched from foreground to background operation, the electronic device may also end or not end the operation of the application after a preset time, and whether the specific application ends the operation may be selected in advance according to whether the application ends the operation or does not end the operation, and whether a function call permission failure exists or a user data loss condition exists. For a detailed description about whether the application finishes running, reference may be made to the following contents, which are not described herein at first.
Fig. 3 shows a hardware structure diagram of the electronic device 100 provided in the embodiment of the present application.
The electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a Personal Digital Assistant (PDA), an Augmented Reality (AR) device, a Virtual Reality (VR) device, an Artificial Intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device, and/or a smart city device, and the embodiment of the present application does not particularly limit the specific type of the electronic device.
The electronic device 100 may include a processor 101, a memory 102, a wireless communication module 103, a mobile communication module 104, an antenna 103A, an antenna 104A, a power switch 105, a sensor module 106, an audio module 107, a camera 108, a display 109, and the like. Among other things, the sensor module 106 may include a gyroscope sensor 106A, an air pressure sensor 106B, a touch sensor 106C, and the like. The wireless communication module 103 may include a WLAN communication module, a bluetooth communication module, and the like. The above-mentioned portions can transmit data through a bus.
In some embodiments, the processor 101 may be configured to determine whether an application is a whitelist application or a blacklist application, or, further, which subclass of applications in the whitelist the application is.
In some embodiments, the memory 102 may be used to store a black and white list, in which the categories of different applications, i.e. whether the application is a white list application or a black list application, or a certain subclass of the application is recorded.
In some embodiments, the mobile communication module 104 and the wireless communication module 103 may be used to receive black and white lists sent by other devices, such as a server. The black and white list can be obtained by testing each application by the server. For the server testing process, reference may be made to the following contents, which are not described herein in detail.
The electronic device 100 may implement display functions via the GPU, the display screen 109, and the application processor, among others. The GPU is a microprocessor for image processing, and is connected to the display screen 109 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 101 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 109 is used to display images, videos, and the like. The display screen 109 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 109, N being a positive integer greater than 1.
In some embodiments, the display screen 109 may be configured to display a user interface provided by an application, and when configuring an authority for the application, an authority window of the application is displayed, and specifically, for content displayed in the display screen 109, reference may be made to subsequent UI embodiments, which is not described herein again.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The electronic device may be a portable terminal device, such as a mobile phone, a tablet computer, a wearable device, or the like, which carries an iOS, Android, Microsoft, or other operating system, and may also be a non-portable terminal device such as a Laptop computer (Laptop) with a touch-sensitive surface or touch panel, a desktop computer with a touch-sensitive surface or touch panel, or the like. The software system of the electronic device 100 may employ a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention uses an Android system with a layered architecture as an example to exemplarily illustrate a software structure of the electronic device 100.
Fig. 4 is a block diagram of a software structure of the electronic device 100 according to the embodiment of the present application.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 4, the application packages may include camera, gallery, calendar, phone, contacts, navigation, WLAN, music, settings, text messages, etc. applications.
In some embodiments, during the running of the application, the application may need to access other application programs to obtain resources required for its functions, for example, to access pictures in a gallery, and at this time, the electronic device 100 may display an authorization window to prompt the user to request permission for the application to access other application programs, such as the above-mentioned camera, gallery, calendar and other application programs.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 4, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc. Before the application program accesses the data, the electronic device 100 may display an authorization window to prompt the user to request the application to grant the right to access the data.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions of the electronic device 100. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), Media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
Some of the user interfaces involved in the rights management method are described below in conjunction with fig. 5A-5H.
In the user interfaces shown in fig. 5A to 5H, taking the electronic device 100 running a browser application as an example, the browser application refers to a class of application programs for retrieving, presenting and transmitting network information resources, in other embodiments of the present application, the electronic device may run other applications, and the application run by the electronic device is not limited in this embodiment of the present application.
FIG. 5A illustrates an exemplary user interface 21 for an application menu on the electronic device 100, which user interface 21 may be referred to as a main interface of the electronic device 100.
As shown in fig. 5A, the user interface 21 may include: status bar 211, calendar indicator 212, weather indicator 213, settings icon 214, browser icon 215. Wherein:
the status bar 211 may include one or more signal strength indicators for mobile communication signals, one or more signal strength indicators for wireless fidelity (WiFi) signals, a battery status indicator, and a time indicator. Calendar indicator 212 may be used to indicate the current time. Weather indicator 213 may be used to indicate the weather type.
As shown in fig. 5A, the electronic apparatus 100 may detect an operation of opening the browser for the first time, that is, detect a user operation acting on the browser icon 215, and in response to the user operation, display the user interface 31 shown in fig. 5B. Here, opening the browser for the first time may refer to opening the browser for the first time after the electronic device 100 installs or updates the browser, or opening the browser when the browser does not occupy data in the storage space of the electronic device 100.
As shown in fig. 5B, the user interface 31 is a user interface provided by the browser, and the user interface may be a main page provided by the browser, or a start page displayed when the browser is first opened. In fig. 5B, the user interface 31 is a home page provided by a browser.
In addition, a permission window 311 is also included on the user interface 31. The permission window 311 is used to display one or more permissions requested to be acquired by the browser. The permission window 311 includes a permission item 311A, where the permission item 311A indicates an access permission of the browser for requesting the location information, where the permission item 311A further includes an authorization manner provided by the electronic device 100, where the authorization manner may include an authorization manner that the current operation is permitted, an authorization manner that the current application is permitted and prohibited when the current application is used, and different authorization manners indicate different durations of the authorization permission of the application by the electronic device 100. In the right item 311A shown in fig. 5B, the right item 311A includes a first authorization option 3111A, and the first authorization option 3111A indicates an authorization manner allowed by the electronic device 100 for the current operation provided by the browser. The electronic device 100 provides the first authorization option 3111A in the permission window 311, which is determined according to the degree of adaptation of the browser to the authorization manner, where the electronic device 100 provides the first authorization option 3111A by the browser, which indicates that the browser is well adapted to the single authorization, and the problem of abnormal application operation due to the fact that the electronic device 100 configures the single authorization for the browser is solved, or the problem of abnormal application operation is small.
It can be understood that when the browser does not adapt to the single authorization well, the authorization manner allowed by the operation will not be displayed in the authority item 311A, that is, referring to fig. 5C, in the authority window 311, in the authority item 311A regarding the location information, compared to the authority item 311A in fig. 5B, the electronic device 100 does not provide the option of the single authorization.
That is, when the browser is poorly adapted to a single authorization, the electronic device 100 may not provide an option corresponding to the single authorization.
In addition, in the user interface shown in fig. 5B, the permission window 311 further includes a cancel option 311B and a confirm option 311C, where the cancel option 311B is used to cancel the configuration of the permission to the browser at this time, and the confirm option 311C is used to configure the permission to the browser according to the permission window 311, where when the first authorization option 3111A in the permission option 311A is in a selected state, it indicates that the user configures the permission to allow the user to access the location information of the electronic device 100 in the process of the current operation for the browser. Thereafter, when the electronic device 100 receives the user operation acting on the determination control 311C, the electronic device 100 completes the permission configuration for the browser, runs the browser in the foreground, and displays a user interface 41 as shown in fig. 5D, where the user interface 41 may be a running interface provided by the browser.
As shown in fig. 5D, the user interface 41 is used to display a search entry of the browser, a search keyword, and news recommended by the browser according to the location information. The user interface 41 includes a news display area 411, where the news display area 411 is used to display information searched according to the location information of the electronic device 100 when the browser starts a nearby news push function. This is because, before the application is run, the user grants the right to allow access to the location information during the current run to the application in the right window 311 as shown in fig. 5B, and thus the browser can successfully acquire nearby news and present it in the news-presentation area 411.
Fig. 5E shows that, when the electronic device 100 detects an operation (e.g., a sliding operation) for switching the application running state during the browser is running in the foreground, the electronic device 100 switches the browser from the foreground running to the background running. Thereafter, the user interface displayed by the electronic apparatus 100 is switched from the execution interface (user interface 41) provided by the browser to the main interface of the electronic apparatus 100 as shown in fig. 5F.
Optionally, the electronic device 100 may have another way of switching the application running state, for example, when the electronic device 100 runs a browser, another application may be triggered to be started through the browser, at this time, the electronic device 100 may display a user interface of the another application, and at this time, the browser is switched from foreground running to background running. The embodiment of the present application does not limit the manner of switching the application running state.
As shown in fig. 5F, after the browser is switched to the background operation and the first time elapses, the electronic apparatus 100 detects a user operation acting on the browser icon 215 in the user interface 21 shown in fig. 5F, and in response to the user operation, the electronic apparatus 100 again operates the browser in the foreground.
After the browser is switched to the background running, the electronic device 100 may have two optional modes: one is to shut down the browser's process when a threshold time is reached, and one is to run the browser in the background all the time. Thus, when the electronic device 100 uses the first mode, when the electronic device 100 runs the browser in the foreground again, the electronic device 100 starts the browser first, that is, creates a process of the browser, and then displays a running interface of the browser. When the electronic device 100 uses the second mode, when the electronic device 100 runs the browser in the foreground again, the electronic device 100 does not need to create a process of the browser, and the running interface of the browser is directly displayed. Then, when the electronic device 100 creates a browser process, the electronic device 100 may first display a launch page of the browser, or a launch interface waiting for the browser to launch, such as an advertisement page.
That is, when the electronic device 100 switches to the background operation in the browser and a threshold time (less than the first time) elapses, the electronic device 100 may kill the browser process, and when the time reaches the first time and the user operation acting on the browser icon 215 is detected, the electronic device 100 may pull up the browser process, display the browser launch interface 51 shown in fig. 5G, and wait for the browser launch to be completed. Then, the electronic device 100 displays an operation interface of the browser shown in fig. 5H, where the operation interface is a user interface displayed during the foreground operation process when the browser is switched from the foreground operation to the background operation in the previous time, that is, the user interface 41 shown in fig. 5D. When the electronic device 100 has been running the browser in the background after the electronic device 100 switches the browser to the background running, and when the time reaches the first time and the user operation acting on the browser icon 215 is detected, the electronic device 100 directly displays the user interface 41 shown in fig. 5H.
In the user interface 41 shown in fig. 5H, since the browser has a news pushing function in the interface and needs to call the location information of the electronic device 100 to obtain nearby information, the electronic device 100 may display an authority window 412 shown in fig. 5H, request the user to grant the authority for the application to access the location information, and after the user agrees to grant the authority, the browser may continue to recommend nearby news to the user, thereby avoiding a problem that the browser cannot display the nearby news.
Fig. 6 is a flowchart illustrating a rights management method provided in an embodiment of the present application.
As shown in fig. 6, the method includes:
s101, the electronic device 100 displays a first window for configuring a first authority of a first application.
The first window is used for displaying one or more rights requested to be obtained by the first application. Wherein, the first window displays the authority item with the first authority.
Before the electronic device 100 displays the first window, the electronic device 100 may detect a first operation that triggers the right to configure the first application. Specifically, the electronic device 100 displays the first window of the first application in response to the first operation.
The electronic device 100 may trigger the configuration of the first application right in three cases:
1) configuration of electronic device 100 for triggering first application right in setting application program
That is, the electronic apparatus 100 may configure the authority of the first application by setting the application program. Specifically, the electronic device 100 may find the permission list of the first application by setting the permission management in the application program, so as to configure the first permission of the first application. Then, at this time, the first operation may be a click operation for the option corresponding to the rights management.
2) Under the condition that the first application is not operated, the electronic device 100 triggers the configuration of the authority of the first application when the first application is opened for the first time
The first opening of the first application by the electronic device 100 may refer to the first opening of the first application by the electronic device 100 after the first application is installed or updated.
At this time, the electronic device 100 may trigger the display of an authority window of the first application by opening the first application, where the authority window indicates the authority that the first application requests to acquire. Then, at this time, the first operation may be a click operation on an icon of the first application, where the click operation may be used to trigger the opening of the first application and then trigger the display of an authority window of the first application, and indicate that the user configures the authority of the first application.
It is to be understood that the first operation is not limited to a click operation on an icon of the first application, and the first operation may be any operation for triggering the opening of the first application, for example, a voice input, or an operation for acting on another application for triggering the opening of the first application during the running of the other application.
Referring to fig. 5A, the first application may be a browser, and the first operation may refer to a user operation on a browser icon 215.
3) In the process of running the first application, the electronic device 100 starts the function of the first application, and triggers the configuration of the authority of the first application
When the function of the first application can be normally started only when the electronic device 100 grants the corresponding permission to the first application, when the electronic device 100 detects that the operation of starting the function of the first application is triggered, a permission window of the first application is displayed, where the permission window is used to request a user to grant a first permission required by the function of the first application. Then, at this time, the first operation may refer to an operation of triggering the opening of the function of the first application.
It should be understood that, the above three cases of triggering the first application authority configuration are not limited, and the embodiment of the present application does not limit this case.
In addition, the electronic device 100 may determine whether to display the single-authorization option in the permission window according to the adaptation of the application to the single authorization.
When the first application is a white list application, the first application is allowed to use the first authority during the single running of the first application, and the authorization mode of the first authority comprises a first authorization mode which is allowed to use the first authority during the single running of the first application. In other words, when the first application is a whitelist application, a single-authorization option of the first right may be included in the first window; when the first application is a blacklist application, the first application is not allowed to use the first authority during the single running of the first application, and the authorization mode of the first authority does not include the first authorization mode. In other words, when the first application is a blacklist application, the first window does not contain a single-authorization option of the first right.
The white list application refers to an application with a good adaptation degree to single authorization, and when a user interface of the white list application is closed and displayed for a period of time, the following exception exists: the user data of the white list application is lost, the first function of the white list application fails to call the first permission, or the abnormality does not exist. Here, the first function refers to a function requiring a first right in the whitelist application. In contrast, the blacklist application refers to an application with a poor adaptation degree to single authorization, and the two exceptions exist when a user interface of the blacklist application is closed and displayed after a period of time.
The single-grant option is used to trigger the electronic device 100 to grant a first right to the first application that is valid during a single run. The single running period refers to a running period in which the application runs from the beginning to the end, and in the continuous phase, the time of the first application running in the background cannot exceed the threshold value. And when the time of the first application running in the background exceeds the preset time length, a first permission is granted to the first application in the single running period, and a continuous stage before the first application is run to the preset time length node is started. That is, when the time of the background running of the first application exceeds the threshold, the electronic device 100 will recover the first right granted to the first application and valid during the single running, the first application enters the next running, or the first application ends running.
In this embodiment, the electronic device 100 may store a configuration table, where the configuration table indicates two types of applications, one type of application is a white list application, and the other type of application is a black list application. In this way, before the electronic device 100 displays a window (e.g., a first window) in which the first application configures the first right, the electronic device 100 may determine whether the first application is a whitelist application or a blacklist application according to the configuration table, thereby deciding whether to provide a single-authorization option of the first right in the window.
The configuration table may configure a single authorization for the first application in advance, that is, a first authority valid during a single operation period is granted to the first application, and test whether the first application has an abnormal operation condition. And if the first application is switched from foreground operation to background operation and returns to the foreground operation again after a period of time, and one item of the white list application is abnormal or is not abnormal, the first application is indicated as the white list application, and the result is recorded in the configuration table. If the first application has two exceptions mentioned in the white list application in the test process, the first application is indicated as the black list application, and the result is recorded in the configuration table.
Therefore, when the user configures the application with the right, the user is prevented from selecting an authorization mode which can influence the running of the application as much as possible, and the experience of the user is improved.
Referring to fig. 5B-5C, when the first application is a white list application, the first window may be the authority window 311 shown in fig. 5B, the first authority is location information, the authority item is an authority item 311A, the first authorization manner is an authorization manner indicated in the first authorization option 3111A, and when the first application is a black list application, the first window may be the authority window 311 shown in fig. 5C.
S102, the electronic device 100 grants a first right valid during single operation to the first application.
Specifically, the electronic device 100 may detect an operation acting on the first window, and in response to the operation, grant the first application a first right valid during a single execution, i.e., allow the first application to use the first right during the single execution of the first application.
The operation may refer to an operation of configuring the authority by the user, for example, referring to fig. 5B, the operation may refer to a selection operation acting on the first authorization option 3111A and a user operation acting on the determination option 311C, so that the electronic device 100 may complete granting the application the authority to access the location information in a single running process. The first authority is position information.
It should be noted that the electronic device 100 grants the first application the first right valid during the single run, which indicates that the first application mentioned in S102-S106 is the white list application.
S103, the electronic device 100 closes the user interface displayed by the first application.
The user interface of the electronic device 100 for closing the first application display contains two meanings:
1) before the electronic device 100 closes the user interface displayed by the first application, the electronic device 100 displays the user interface of the first application, that is, the electronic device 100 runs the first application in the foreground.
2) The electronic device 100 only closes the user interface displayed by the first application, i.e., the electronic device 100 runs the first application in the background.
In other words, the electronic device 100 closing the user interface displayed by the first application may refer to the electronic device 100 switching the first application from foreground running to background running.
Referring to fig. 5D, the user interface 41 may refer to a user interface of the first application displayed when the electronic device 100 runs the first application in the foreground, and as can be seen from the news exhibition area 411, the application may acquire the location information of the electronic device 100, and run the nearby news push function successfully according to the location information, and exhibit news acquired according to the location information in the news exhibition area 411.
Specifically, the electronic device 100 may switch the first application from foreground running to background running, that is, the electronic device 100 detects an operation of a user and switches the application running in the foreground to the background running in response to the operation. The operation may be an operation of returning to the main interface of the electronic device 100, or an operation of starting another application, and the operation of switching the running state of the first application is not limited in this embodiment of the application.
Referring to fig. 5E, the operation may refer to a slide-up operation applied to the display screen, which may be used to switch a user interface of a browser displayed by the electronic apparatus 100 to a main interface of the electronic apparatus 100.
And S104, after a period of time, the electronic equipment 100 displays the user interface of the first application again.
The electronic apparatus 100 displaying the user interface of the first application again may mean that the electronic apparatus 100 runs the first application again in the foreground. The user interface may refer to a user interface displayed by the application at the last foreground runtime. Referring to fig. 5H, when the electronic device runs the first application again in the foreground, the displayed user interface may be referred to as the user interface 41.
Since the first permission is a permission that is valid during a single operation configured for the first application by the electronic device 100, when the elapsed time after the first application is switched to the background operation is longer than a preset time period (e.g., 5 minutes), the electronic device 100 may recover the first permission of the first application.
In addition, whether the single authorization option is displayed in the permission window or not is determined according to the adaptation condition of the first application to the single authorization, and whether the first application is finished running or not after the preset time length after the user interface of the first application is closed and displayed can be further determined.
This is because the running condition of the application may be different when the application is displayed again after the user interface is turned off and displayed for a while.
If the user data is lost when the user interface of the first application is displayed again after being closed and displayed for a period of time, the electronic device still runs the first application within the period of time when the user interface of the first application is closed and displayed, and the running of the first application is not finished. At this time, after some applications are switched from foreground operation to background operation, if the applications end operating in the background and return to the foreground operation again, for the state of returning to the foreground operation again, some applications may not be able to recover or may not completely recover the user interface displayed in the foreground operation last time, and there is a situation that user data is lost. Taking the video playing application as an example, the user interface displayed again may refer to a video playing interface, the user data may refer to a video playing progress, and some video playing applications may return to the foreground operation again, and cannot recover to the previous foreground operation, the node where the video is played may start to play the video again from the starting point of the video. Therefore, the problem of user data loss when returning to the foreground again can be avoided by not killing the application process. In this way, after the user interface of the first application is closed to be displayed and is displayed again after a period of time, the user interface of the first application does not present an exception of user data loss.
If the first function calls the first permission to be abnormal after the user interface of the first application is closed and displayed for a while and when the user interface of the first application is displayed again, the electronic device 100 may end the operation of the first application when the user interface of the first application is closed and displayed for more than a preset time period. The reason is that the first permission of the first application is an effective permission during a single operation period, and when the user interface of the first application is closed and displayed and exceeds a preset time length, the electronic device 100 may recover the first permission of the first application, and some applications may not sense the absence of the first permission, so that the first application cannot acquire the first permission required by the first function, that is, the first function of the application fails to call the first permission, and the application operation is abnormal. Taking chat applications as an example, the first function may be a voice chat function, the first permission may be a microphone, and when some chat applications may return to the foreground again for operation, because the permission to access the microphone is recovered, the chat applications cannot acquire the voice information of the user, but the prompt information is not displayed to prompt the user to open the microphone permission, so that the voice chat function is disabled. Therefore, the single running stage of the application can be actively ended by killing the application process, and the problem that the function calling authority fails when the application returns to the foreground again is avoided. In this way, after the user interface of the first application is closed and displayed, the first function of the first application can successfully call the first permission when the user interface of the first application is displayed again after the first time.
Therefore, the configuration table can further subdivide two subclasses of applications in the white list application, the applications in the first subclass can only recover the application permission after the applications enter the background operation for a period of time, the operation of the applications is kept, and the applications in the second subclass can recover the application permission when the applications enter the background operation, and the operation of the applications is finished.
Therefore, the electronic equipment can further control the application to adopt different authorization details according to the adaptation degree of the application to the single authorization, the problem of abnormal operation of the application when the application is subjected to the single authorization is avoided, and the experience of a user is improved.
Similarly, the subclass of the white list applications to which each application is specifically applicable can be determined by the exceptions that exist in the application when the user interface of the test application is displayed again after a period of time after the display is closed.
When the first application is an application of the first subclass, after the user interface of the first application is closed and displayed, and the first application is displayed again after a period of time, the first application is directly operated from the background to the foreground, and the electronic device 100 does not display the start interface of the first application, where the start interface includes one or more pages, such as a start page and an advertisement page, provided by the first application when the first application is started. Referring to fig. 5G, the launch interface may refer to the user interface 51.
When the first application is an application of the second subclass, after the user interface of the first application is closed and displayed, and is displayed again after a period of time, the first application is switched from foreground operation to background operation, and then the first application is started again after a preset time period, and is operated in the foreground. Then, in the process of restarting the first application by the electronic device 100, the electronic device 100 may first pull up the process of the application and display the start interface of the first application, and then display the running interface of the application after the start of the first application is completed. Referring to fig. 5F to 5H, when the electronic device 100 receives a user operation on the browser icon 215 from the user, and runs the browser again in the foreground, the electronic device 100 displays the user interface 51 shown in fig. 5G, and then displays the user interface 41 provided by the browser shown in fig. 5H.
In summary, when the electronic device 100 determines that the first application is the first sub-class application, the start interface of the first application is not displayed when the electronic device 100 displays the user interface of the first application again, and when the electronic device 100 determines that the first application is the second sub-class application, the start interface of the first application is displayed when the electronic device 100 displays the user interface of the first application again.
And S105, responding to the operation of starting the first function, displaying a second window by the electronic device 100, wherein the second window is used for prompting the user to grant the first application with the first permission.
After the electronic device 100 recovers the first right of the first application, the electronic device 100 may display the right window again, i.e. the second window, to prompt the user that the first right is recovered and the first application needs to be granted the first right again. In this way, the electronic device 100 may actively prompt the user to authorize the application, and may avoid the application from affecting the operation of the application due to the lack of the permission.
Referring to fig. 5H, this second window may be referred to as a rights window 412.
S106, the electronic device 100 completes configuration of the first permission of the first application.
The electronic device 100 may complete the configuration of the first right by receiving an operation of granting the first right to the application by the user, and granting the first right to the application, or by receiving an operation of denying the first right to the application by the user, and denying the first right to the application.
Therefore, the user can determine whether to grant the first permission to the first application again according to the requirement of the user, and the operability of the user is improved.
It will be appreciated that the black and white list described above is only for a single right of an application, e.g. the application may contain the option of a single authorization for a first right of the application, and the application may not contain the option of a single authorization for a second right of the application. This is because the application adapts differently to a single authorization for different permissions. Therefore, the electronic equipment can adjust the authorization modes of different authorities in the authority window according to the adaptation degree of the application to the single authorization aiming at different authorities, and the problem that the user experience is influenced due to abnormal operation of the application caused by the single authorization is avoided as much as possible.
The embodiments of the present application can be combined arbitrarily to achieve different technical effects.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions described in accordance with the present application are generated, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
One of ordinary skill in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the above method embodiments. And the aforementioned storage medium includes: various media capable of storing program codes, such as ROM or RAM, magnetic or optical disks, etc.
In short, the above description is only an example of the technical solution of the present invention, and is not intended to limit the scope of the present invention. Any modifications, equivalents, improvements and the like made in accordance with the disclosure of the present invention are intended to be included within the scope of the present invention.

Claims (24)

1. A method of rights management, the method comprising:
the electronic equipment displays a first window of a first application, and the first window displays an authority item with a first authority;
if the first application is a white list application, the first application is allowed to use the first permission during the single running of the first application, and the authorization mode of the first permission comprises a first authorization mode which is to allow the first permission to be used during the single running of the first application; otherwise, the authorization mode of the first authority does not include the first authorization mode;
when the user interface of the white list application is displayed again after a period of time after being closed and displayed, one of the following exceptions exists: the user data of the white list application is lost, the first function of the white list application fails to call the first permission, or the abnormality does not exist.
2. The method of claim 1, further comprising:
if the user data is lost when the user interface of the first application is displayed again after a period of time after being closed and displayed, the electronic device still operates the first application within the period of time after the user interface of the first application is closed and displayed, the duration of the period of time exceeds a preset duration, and the electronic device recovers the first authority of the first application after the duration of the period of time exceeds the preset duration.
3. The method of claim 2, further comprising:
and after the user interface of the first application is closed and displayed, and when the user interface of the first application is displayed again after the period of time, the user interface of the first application does not present the abnormity of user data loss.
4. A method according to claim 2 or 3, characterized in that the method further comprises:
and after the user interface of the first application is closed and displayed, when the user interface of the first application is displayed again after the period of time, the electronic equipment does not display the starting interface of the first application.
5. The method of claim 4, wherein the launch interface comprises one or more of the following pages provided by the first application while waiting for the first application to launch: a start page, an advertisement page.
6. The method according to any one of claims 2 to 5, wherein the user interface of the first application is a video playing interface, and the user data is a video playing progress.
7. The method according to any one of claims 1-6, further comprising:
if the first function calls the first permission to be abnormal after the user interface of the first application is closed and displayed again after a period of time, the electronic equipment finishes running the first application under the condition that the user interface of the first application is closed and displayed for more than preset time, and the electronic equipment recovers the first permission of the first application.
8. The method of claim 7, further comprising:
and after the user interface of the first application is closed and displayed, when the user interface of the first application is displayed again after a period of time, the first function successfully calls the first permission.
9. The method according to claim 7 or 8, characterized in that the method further comprises:
and after the user interface of the first application is closed and displayed, when the user interface of the first application is displayed again after a period of time, the electronic equipment displays the starting interface of the first application.
10. The method of any of claims 7-9, wherein the first function is a voice chat function and the first permission is a microphone.
11. The method according to any one of claims 2-10, further comprising:
the user interface of the first application is displayed again after a period of time after the display is turned off,
and the electronic equipment responds to the operation of starting the first function, displays a second window and prompts a user to grant the first application with the first permission.
12. A method of authorization management, the method comprising:
the electronic device allowing the first application to use a first privilege during a single run of the first application;
the electronic equipment closes the user interface for displaying the first application, and displays the user interface of the first application again after a period of time;
and the electronic equipment responds to the operation of starting the first function, displays a second window and prompts a user to grant the first application with the first permission.
13. The method of claim 12, wherein before the electronic device allows the first application to use the first privilege during a single run of the first application, the method further comprises:
the electronic equipment displays a first window of the first application, the first window displays an authority item of the first authority, the authority mode of the first authority comprises a first authority mode, and the first authority mode is to allow the first authority to be used during the single running of the first application.
14. The method of claim 12 or 13, wherein the first application is a white list application, and when the user interface of the white list application is displayed again after a period of time after the display is closed, one of the following exceptions exists: the user data of the white list application is lost, the first function of the white list fails to call the first authority, or the abnormality does not exist.
15. The method according to any one of claims 12 to 14,
if the user data is lost when the user interface of the first application is displayed again after a period of time after being closed and displayed, the electronic device still operates the first application within the period of time after the user interface of the first application is closed and displayed, the duration of the period of time exceeds a preset duration, and the electronic device recovers the first authority of the first application after the duration of the period of time exceeds the preset duration.
16. The method of claim 15, further comprising:
and after the user interface of the first application is closed and displayed, and when the user interface of the first application is displayed again after the period of time, the user interface of the first application does not present the abnormity of user data loss.
17. The method according to claim 15 or 16, characterized in that the method further comprises:
and after the user interface of the first application is closed and displayed, when the user interface of the first application is displayed again after the period of time, the electronic equipment does not display the starting interface of the first application.
18. The method according to any one of claims 17, wherein the launch interface comprises one or more of the following pages provided by the first application while waiting for the first application to launch: a start page, an advertisement page.
19. The method according to any one of claims 15 to 18, wherein the user interface of the first application is a video playing interface, and the user data is a video playing progress.
20. The method according to any one of claims 12-19, further comprising:
if the first function calls the first permission to be abnormal after the user interface of the first application is closed and displayed again after a period of time, the electronic equipment finishes running the first application under the condition that the user interface of the first application is closed and displayed for more than preset time, and the electronic equipment recovers the first permission of the first application.
21. The method of claim 20, further comprising:
and after the user interface of the first application is closed and displayed, when the user interface of the first application is displayed again after a period of time, the first function successfully calls the first permission.
22. The method according to claim 20 or 21, further comprising:
and after the user interface of the first application is closed and displayed, when the user interface of the first application is displayed again after a period of time, the electronic equipment displays the starting interface of the first application.
23. The method of any of claims 20-22, wherein the first function is a voice chat function and the first privilege is a microphone.
24. An electronic device comprising a processor and a memory, the memory comprising an internal memory and an external memory, the processor being configured to execute a computer program stored in the internal memory or the external memory to implement the method of any of claims 1 to 11, or 12 to 23.
CN202110926389.2A 2021-08-12 2021-08-12 Authority management method, user interface and electronic equipment Active CN113792327B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110926389.2A CN113792327B (en) 2021-08-12 2021-08-12 Authority management method, user interface and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110926389.2A CN113792327B (en) 2021-08-12 2021-08-12 Authority management method, user interface and electronic equipment

Publications (2)

Publication Number Publication Date
CN113792327A true CN113792327A (en) 2021-12-14
CN113792327B CN113792327B (en) 2022-09-02

Family

ID=78875976

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110926389.2A Active CN113792327B (en) 2021-08-12 2021-08-12 Authority management method, user interface and electronic equipment

Country Status (1)

Country Link
CN (1) CN113792327B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160142413A1 (en) * 2014-11-14 2016-05-19 Google Inc. Ephemeral applications
CN106462697A (en) * 2016-09-09 2017-02-22 北京小米移动软件有限公司 Auxiliary service management method and apparatus
US20170053129A1 (en) * 2015-08-20 2017-02-23 Samsung Electronics Co., Ltd. Method and apparatus for managing application data usage
WO2021000807A1 (en) * 2019-06-29 2021-01-07 华为技术有限公司 Processing method and apparatus for waiting scenario in application
CN112352239A (en) * 2019-01-23 2021-02-09 华为技术有限公司 Application permission management method and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160142413A1 (en) * 2014-11-14 2016-05-19 Google Inc. Ephemeral applications
US20170053129A1 (en) * 2015-08-20 2017-02-23 Samsung Electronics Co., Ltd. Method and apparatus for managing application data usage
CN106462697A (en) * 2016-09-09 2017-02-22 北京小米移动软件有限公司 Auxiliary service management method and apparatus
CN112352239A (en) * 2019-01-23 2021-02-09 华为技术有限公司 Application permission management method and electronic equipment
WO2021000807A1 (en) * 2019-06-29 2021-01-07 华为技术有限公司 Processing method and apparatus for waiting scenario in application

Also Published As

Publication number Publication date
CN113792327B (en) 2022-09-02

Similar Documents

Publication Publication Date Title
US11799984B2 (en) Installable web applications
US11803451B2 (en) Application exception recovery
US9436850B2 (en) Mobile terminal and method of controlling a mode screen display therein
US20140179377A1 (en) Mobile electronic device having program notification function and program notification method thereof
WO2017101663A1 (en) Application guiding method and apparatus, and terminal
CN108304234B (en) Page display method and device
KR20050075313A (en) Information processing device and program
WO2023273350A1 (en) Application authorization method and apparatus, and terminal device
CN114020652B (en) Application program management method and electronic equipment
CN110851057A (en) Method and device for configuring configuration options of BIOS
CN113792328A (en) Authority management method, user interface and electronic equipment
CN113792329B (en) Permission optimization method and related equipment
CN113836540A (en) Method, apparatus, storage medium, and program product for managing application rights
CN113792327B (en) Authority management method, user interface and electronic equipment
CN111552537B (en) Theme switching method and device, computer equipment and storage medium
CN114116622A (en) Display device and file display method
CN114173179A (en) Compatible execution method of system upgrading task and video recording task and display equipment
CN112911359A (en) Resource display method, display equipment and remote controller
CN114138343A (en) Terminal and terminal starting method
CN116302295B (en) Interface display method
US10445314B1 (en) Instant unified search
CN116339844A (en) Application starting method and display device
CN115357273B (en) Reminding method for system upgrading and electronic equipment
WO2023202406A1 (en) Display method and electronic device
KR102488645B1 (en) Electronic apparatus and method for providing service of virture operating system

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230912

Address after: 201306 building C, No. 888, Huanhu West 2nd Road, Lingang New Area, Pudong New Area, Shanghai

Patentee after: Shanghai Glory Smart Technology Development Co.,Ltd.

Address before: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee before: Honor Device Co.,Ltd.