Application permission management and control method based on system control and electronic equipment

By using system controls on electronic devices instead of applications to obtain permissions, the security risks caused by frequent pop-up windows in the existing technology are solved, safer and controllable permissions management is achieved, and applications are prevented from excessive acquisition of user information and counterfeit operations. event.

CN118568705APending Publication Date: 2024-08-30HUAWEI TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202310224187.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing electronic devices frequently pop up windows when granting permissions, causing users to accidentally grant too many permissions to applications, which poses security risks. In addition, applications may fake operation events, affecting information security.

Method used

By implementing an application permission management and control method based on system controls on electronic devices, system controls are used to obtain permissions instead of applications, avoiding pop-up windows prompting users to grant permissions, and user operation events are processed at the operating system level to ensure the security of permission acquisition.

Benefits of technology

Effectively prevent applications from obtaining too much user privacy information, improve information security, reduce user interference, avoid application counterfeiting incidents, and ensure the controllability and security of permission management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568705A
    Figure CN118568705A
Patent Text Reader

Abstract

The invention discloses an application permission management and control method based on a system control and electronic equipment. A system control is displayed on an interface of an application, and an operating system of the electronic equipment grants authority to the system control by operating the system control by a user so as to replace the application to acquire information. And the application does not directly acquire authority and information from the operating system of the electronic equipment. Therefore, when the application runs, the electronic equipment does not need to prompt the user to grant the permission to the application in a manner of popping up a window. On the basis, corresponding to the permissions carrying the relevant information of the user, the application cannot directly obtain the permissions. On the basis, the application does not use the permission too much to obtain the related information, so that the information is ensured to be safe and controllable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information security technology, and in particular to a method and electronic device for application permission management based on system controls. Background Art

[0002] In order to meet the needs of users, more and more applications (referred to as applications) are installed on electronic devices. These applications will prompt users to grant permissions to the application through pop-up windows, such as granting access rights to personal privacy information (such as contact information, gallery information, location information, etc.). When users unconsciously grant access rights to personal privacy information to an application, the application will obtain too much personal privacy information of the user, posing a security risk. Summary of the invention

[0003] The method and electronic device for application permission management based on system controls provided in the embodiments of the present application effectively prevent applications from excessively obtaining users' personal privacy information.

[0004] In order to achieve the above-mentioned purpose, the embodiment of the present application adopts the following technical solution.

[0005] In the first aspect, an embodiment of the present application provides a method for application permission management based on system controls. The execution subject of the method can be an electronic device or a component located in the electronic device (for example, a chip, a chip system or a processor, etc.). The following description takes the execution subject being an electronic device as an example. The method includes: the electronic device displays a first interface of the application, and the first interface includes a system control. The application runs in a first process, and the system control runs in a second process, and the second process is different from the first process. The electronic device receives a first operation on the system control. In response to the first operation, the electronic device obtains first information corresponding to the system control. The electronic device sends the first information to the application.

[0006] This application can be understood as a third-party application, and the above applications can also be understood as some system applications that can be uninstalled by users.

[0007] The system control can replace / overwrite the first application control of the same function in the display interface of the application.

[0008] The first information can be understood as the user's private information, such as the user's phone number, bank card number, location information, etc. The first information can also be understood as the analysis result after analyzing the user's private information, such as the recognition result of the user's payment QR code, etc.

[0009] In this way, the system control is displayed on the interface of the application, and the user operates the system control, and the operating system of the electronic device grants the system control permission to obtain information on behalf of the application. Instead of the application directly obtaining permissions and information from the operating system of the electronic device. It can be seen that when the application is running, the electronic device does not need to prompt the user to grant permissions to the application by means of a pop-up window. Based on this, the application will not directly obtain permissions that carry relevant information about the user. On this basis, the application will not use permissions too much to obtain relevant information to ensure that the information is safe and controllable.

[0010] In addition, the electronic device does not need to prompt the user to grant permissions to the application through a pop-up window on the application interface, effectively preventing multiple pop-up windows from disturbing the user. In addition, the user's operation events on the system controls are directly transmitted to the operating system of the electronic device, and processed by the operating system of the electronic device (such as filtering the operation events, security verification, etc.), so that the operation events are not processed by the application, avoiding the situation where the application counterfeits the operation events, and improving the security of the control.

[0011] It should be understood that for the same installation package of an application, when the installation package is installed on device A that supports the system control function, after the corresponding interface of the application is opened on device A, the system control can be displayed on the interface. Device A can provide corresponding information to the application according to the user's operation of the system control. When the installation package is installed on device B that does not support the system control function, after the corresponding interface of the application is opened on device B, the corresponding application control can be displayed on the interface; or, device B will not display the corresponding application control, and the background of the application will be displayed in the area corresponding to the system control.

[0012] In one design, before the electronic device receives the first operation on the system control, it also includes: the electronic device receives a first request sent by an application, the first request is used to request to load the system control, the first request carries attribute information of a first application control corresponding to the system control, and the first application control is a control in the application used to trigger the acquisition of the first information. The electronic device displays a first window according to the attribute information of the first application control, and the system control is displayed in the first window.

[0013] In one design solution, the electronic device obtains the first information corresponding to the system control, which may specifically be: the electronic device verifies the authority of the system control. When the authority of the system control is passed, the electronic device obtains the first information.

[0014] In one design solution, the attribute information of the first application control includes at least one of the following: size information of the control, style of the control, type of the control, life cycle of the control, and position information of the control.

[0015] In one design, the life cycle of the system control is determined according to the life cycle of the application.

[0016] In one design, in response to a first operation, the electronic device obtains the first information, which can be specifically implemented as follows: in response to the first operation, the electronic device verifies the legitimacy of the operation event corresponding to the first operation. After determining that the operation event is a legitimacy event, the electronic device obtains the first permission according to the attribute information of the operation event, and the first permission is the permission to obtain the first information. The electronic device obtains the first information according to the first permission.

[0017] In one design, the system control may include a location system control; the first interface includes an address input box, which may be specifically implemented as follows: in response to an operation on the location system control, the electronic device displays a second interface, and multiple addresses are displayed on the second interface. In response to an operation on a first address among the multiple addresses, the electronic device displays the first address in the address input box.

[0018] In one design, the system control may include a location system control; the first interface includes an address input box, which may be specifically implemented as follows: in response to an operation on the location system control, the electronic device displays a third interface, and a map is displayed on the third interface. In response to an operation on a first location on the map, the electronic device displays information of the first location in the address input box.

[0019] In one design, the first interface also includes a second application control; the method further includes: in response to an operation on the second application control, the electronic device displays an authorization interface, the authorization interface includes authorization information and a confirmation control. In response to the operation on the confirmation control, the electronic device grants the application permission corresponding to the authorization information.

[0020] In a second aspect, an embodiment of the present application provides an electronic device, which may include: a display module, a first receiving module, an acquisition module, and a sending module. The display module is used to display a first interface of an application, and the first interface includes a system control. The application runs in a first process, and the system control runs in a second process, and the second process is different from the first process. The first receiving module is used to receive a first operation on the system control. The acquisition module is used to obtain first information corresponding to the system control in response to the first operation. The sending module is used to send the first information to the application.

[0021] In this way, the system control is displayed on the interface of the application, and the user operates the system control, and the operating system of the electronic device grants the system control permission to obtain information on behalf of the application. Instead of the application directly obtaining permissions and information from the operating system of the electronic device. It can be seen that when the application is running, the electronic device does not need to prompt the user to grant permissions to the application by means of a pop-up window. Based on this, the application will not directly obtain permissions that carry relevant information about the user. On this basis, the application will not use permissions too much to obtain relevant information to ensure that the information is safe and controllable.

[0022] In addition, the electronic device does not need to prompt the user to grant permissions to the application through a pop-up window on the application interface, effectively preventing multiple pop-up windows from disturbing the user. In addition, the user's operation events on the system controls are directly transmitted to the operating system of the electronic device, and processed by the operating system of the electronic device (such as filtering the operation events, security verification, etc.), so that the operation events are not processed by the application, avoiding the situation where the application counterfeits the operation events, and improving the security of the control.

[0023] In one design, the electronic device further includes: a second receiving module. The second receiving module is used to receive a first request sent by an application, the first request is used to request to load a system control, the first request carries attribute information of a first application control corresponding to the system control, and the first application control is a control in the application used to trigger the acquisition of the first information. The display module is used to display a first window according to the attribute information of the first application control, and the system control is displayed in the first window.

[0024] In one design solution, the acquisition module is used to: verify the authority of the system control; and when the authority of the system control is passed, obtain the first information.

[0025] In one design solution, the attribute information of the first application control includes at least one of the following: size information of the control, style of the control, type of the control, life cycle of the control, and position information of the control.

[0026] In one design, the system control may include a location system control. The first interface may include an address input box. The display module is used to display a second interface in response to an operation on the location system control, and the second interface displays multiple addresses. The sending module is used to display the first address in the address input box in response to an operation on a first address among the multiple addresses.

[0027] In one design, the system control may include a location system control. The first interface may include an address input box. The display module is used to display a third interface in response to an operation on the location system control, and a map is displayed on the third interface. The sending module is used to display information of the first location in the address input box in response to an operation on the first location on the map.

[0028] In one design, the first interface also includes a second application control; the electronic device also includes: an authorization module. The display module is used to display an authorization interface in response to an operation on the second application control, the authorization interface including authorization information and a confirmation control. The authorization module is used to grant the application permission corresponding to the authorization information in response to an operation on the confirmation control.

[0029] In a third aspect, an embodiment of the present application provides an electronic device, which may include: a display module, an extended control module, and the extended control module includes a window management unit, an acquisition unit, and a sending unit. The display module is used to display a first interface of an application, and the first interface includes a system control. The application runs in a first process, and the system control runs in a second process, and the second process is different from the first process. The window management unit is used to receive a first operation on the system control. The acquisition unit is used to obtain first information corresponding to the system control in response to the first operation. The sending unit is used to send the first information to the application.

[0030] In this way, the system control is displayed on the interface of the application, and the user operates the system control, and the operating system of the electronic device grants the system control permission to obtain information on behalf of the application. Instead of the application directly obtaining permissions and information from the operating system of the electronic device. It can be seen that when the application is running, the electronic device does not need to prompt the user to grant permissions to the application by means of a pop-up window. Based on this, the application will not directly obtain permissions that carry relevant information about the user. On this basis, the application will not use permissions too much to obtain relevant information to ensure that the information is safe and controllable.

[0031] In addition, the electronic device does not need to prompt the user to grant permissions to the application through a pop-up window on the application interface, effectively preventing multiple pop-up windows from disturbing the user. In addition, the user's operation events on the system controls are directly transmitted to the operating system of the electronic device, and processed by the operating system of the electronic device (such as filtering the operation events, security verification, etc.), so that the operation events are not processed by the application, avoiding the situation where the application counterfeits the operation events, and improving the security of the control.

[0032] In one design scheme, the electronic device may further include: a control management service module, the control management service module includes a receiving unit and a control creation unit, and the extended control module also includes a window creation unit and a loading unit. Among them, the receiving unit is used to receive a first request sent by an application, the first request is used to request to load a system control, the first request carries the attribute information of a first application control corresponding to the system control, and the first application control is a control in the application used to trigger the acquisition of the first information. The control creation unit is used to create a system control according to the attribute information of the first application control. The window creation unit is used to create a first window according to the attribute information of the first application control. The loading unit is used to display the system control in the first window.

[0033] In one design solution, the acquisition module is used to: verify the authority of the system control; and when the authority of the system control is passed, obtain the first information.

[0034] In one design solution, the attribute information of the first application control includes at least one of the following: size information of the control, style of the control, type of the control, life cycle of the control, and position information of the control.

[0035] In one design, the life cycle of the system control is determined according to the life cycle of the application.

[0036] In one design, the acquisition unit further includes an event filtering unit and a permission requesting unit. The event filtering unit is used to perform security verification on the operation event corresponding to the first operation in response to the first operation. The permission requesting unit is used to obtain a first permission according to the attribute information of the operation event after determining that the operation event is a security event, and the first permission is a permission to obtain the first information.

[0037] In one design solution, the acquisition unit may further include an information acquisition unit. The information acquisition unit is configured to acquire the first information according to the first authority.

[0038] In one design, the system control may include a location system control. The first interface may include an address input box. The display module is used to display a second interface in response to an operation on the location system control, and the second interface displays multiple addresses. The sending module is used to display the first address in the address input box in response to an operation on a first address among the multiple addresses.

[0039] In one design, the system control may include a location system control. The first interface may include an address input box. The display module is used to display a third interface in response to an operation on the location system control, and a map is displayed on the third interface. The sending module is used to display information of the first location in the address input box in response to an operation on the first location on the map.

[0040] In one design, the first interface also includes a second application control; the electronic device also includes: an authorization module. The display module is used to display an authorization interface in response to an operation on the second application control, the authorization interface including authorization information and a confirmation control. The authorization module is used to grant the application permission corresponding to the authorization information in response to an operation on the confirmation control.

[0041] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; and a memory, wherein the memory stores a code; when the code is executed by the processor, the electronic device executes the method described in the first aspect.

[0042] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method as described in the first aspect.

[0043] Among them, the specific implementation methods and corresponding technical effects of each embodiment in the above-mentioned second to fifth aspects can refer to the specific implementation methods and technical effects of the above-mentioned first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A schematic diagram of an interface of an electronic device provided in an embodiment of the present application;

[0045] Figure 2 A schematic diagram of another interface of an electronic device provided in an embodiment of the present application;

[0046] Figure 3 A schematic diagram of another interface of an electronic device provided in an embodiment of the present application;

[0047] Figure 4-1 A schematic diagram of another interface of an electronic device provided in an embodiment of the present application;

[0048] Figure 4-2 A schematic diagram of another interface of an electronic device provided in an embodiment of the present application;

[0049] Figure 5 A schematic diagram of another interface of an electronic device provided in an embodiment of the present application;

[0050] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0051] Figure 7 A schematic diagram of a software architecture of an electronic device provided in an embodiment of the present application;

[0052] Figure 8A schematic diagram of another software architecture of an electronic device provided in an embodiment of the present application;

[0053] Fig. 9 A schematic diagram of an application scenario of a method for application permission management based on system controls provided in an embodiment of the present application;

[0054] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0055] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] The technical solution in the embodiment of the present application will be described below in conjunction with the drawings in the embodiment of the present application. Among them, in the description of the present application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; "and / or" in the present application is only a kind of association relationship describing the associated objects, indicating that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. And, in the description of the present application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or its similar expression refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not necessarily limit the differences. At the same time, in the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design solutions. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.

[0057] Currently, when an electronic device runs an application, the application will prompt the user to grant permissions to the application through a pop-up window.

[0058] For example, Figure 1Schematic diagram of the application interface when the application is running on the electronic device 100. When the application is running, the electronic device displays Figure 1 The application interface 101 shown. Figure 1 Window 102 is displayed on the application interface 101 shown. It should be understood that window 102 can be a window provided by the operating system. In window 102, a prompt message "Do you want to allow the application to access photos, media content and files on your device?" is displayed. Window 102 also displays a control 103 for prohibiting, a control 105 for allowing only once, and a control 104 for always allowing. When the user clicks control 105, the application can access photos, media content and files on the electronic device during this operation. Later, when the electronic device runs the application again, the application will also pop up a pop-up window. Figure 1 The interface shown is for user authorization, but after the user clicks the control 105 multiple times (such as twice), the application will default to user authorization each time it runs, resulting in the application using excessive permissions to access photos, media content, and files on the electronic device each time it runs, regardless of whether the application needs to access the above information, which will lead to user privacy leakage and pose a security risk.

[0059] Another example: Figure 2 Schematic diagram of the application interface when the application is running on the electronic device 100. When the application is running, the electronic device displays Figure 2 The application interface 201 shown. Figure 2 The application interface 201 shown in the figure displays a window 202. It should be understood that the window 202 may be a window provided by the operating system. The window 202 displays a prompt message "The application needs to use your location permission. Do you allow it?" The window 202 also displays a control 203 for prohibition, a control 205 for allowing only once, and a control 204 for always allowing. When the user clicks the control 205, the application can obtain the location information of the electronic device during this operation. Afterwards, when the electronic device runs the application again, the application will also pop up a pop-up window. Figure 2 The interface shown is for user authorization, but after the user clicks the control 205 multiple times (such as twice), the application will default to user authorization each time it runs, resulting in the application using excessive permissions to access the above information each time it runs, regardless of whether the application needs to obtain the location information of the electronic device, which will lead to the leakage of user privacy and pose a security risk.

[0060] In order to solve the above technical problems, the embodiments of the present application provide a method for application permission management based on system controls, which is applied to electronic devices. Based on the methods provided in the following embodiments of the present application, the system controls can be displayed on the interface of the application, and the operating system of the electronic device grants the system controls permissions through user operation to obtain information on behalf of the application. Rather than the application directly obtaining permissions from the operating system of the electronic device to obtain information. It can be seen that when the application is running, the electronic device does not need to prompt the user to grant permissions to the application by means of a pop-up window. Based on this, the application will not directly obtain permissions corresponding to those permissions that carry relevant information of the user. On this basis, the application will not use permissions too much to obtain relevant information to ensure that the information is safe and controllable.

[0061] In addition, the electronic device does not need to prompt the user to grant permissions to the application through a pop-up window on the application interface, effectively preventing multiple pop-up windows from disturbing the user. In addition, the user's operation events on the system controls are directly transmitted to the operating system of the electronic device, and processed by the operating system of the electronic device (such as filtering the operation events, security verification, etc.), so that the operation events are not processed by the application, avoiding the situation where the application counterfeits the operation events, and improving the security of the control.

[0062] Among them, the above-mentioned applications can be understood as third-party applications, and the above-mentioned applications can also be understood as some system applications that can be uninstalled by users, which is not specifically limited in the embodiments of the present application.

[0063] The above-mentioned system control may refer to a control with functional attributes. For example, the system control may be a control for obtaining a geographic location, a system control may be a control for obtaining contact information, or a system control may be a control for obtaining an image. Of course, the system control may be a control with other functionalities, such as a system control may be a control for obtaining an email address. These are not listed one by one in the embodiments of the present application.

[0064] The system control can replace / overwrite the first application control of the same function in the display interface of the application. The application runs in the first process and the system control runs in the second process. That is, the process in which the system control runs is different from the process in which the application runs.

[0065] For example, the first application control may include a control A for obtaining a geographic location, a control B for obtaining contact information, and a control C for obtaining an image displayed on the display interface of the application. Then, correspondingly, the system control in the embodiment of the present application may be a system control that implements the function of control A, control B, or control C.

[0066] The following system control is used to obtain the geographic location, which is used as an example for explanation:

[0067] For example, during the running of the application, the electronic device 100 displays the following Figure 3 The application interface 301 shown includes a system control (control for address positioning) 303. When the user clicks on the system control 303, in response to the user's click operation, the electronic device 100 performs security verification on the click event corresponding to the click operation. After the security verification is passed, the electronic device obtains the location information of the electronic device, such as "A Province B City C District D Community". The electronic device sends the location information to the application, and the application displays the location information on the application interface. For example, Figure 5 As shown, the location information "Province A, City B, District C, Community D" is displayed in the address input box 302 displayed on the application interface 301 of the application.

[0068] For example, compared with the above example, when the user clicks Figure 3 When the control 303 shown is used, the electronic device may display the following Figure 4-1 The interface 301 shown in the figure displays a window 307 on the interface, in which multiple addresses are displayed, and the user can select a desired address from the multiple addresses. For example, "Building E, Community D, District C, City B, Province A". After that, the electronic device sends the location information of the address to the application and performs the same operation as the above example, which will not be repeated here.

[0069] For example, compared with the above example, when the user clicks Figure 3 When the control 303 shown is used, the electronic device may also display Figure 4-2 The interface 301 shown in FIG. 1 shows a window 308 on the interface. A map is displayed in the window 308. The user can select any location on the map by operating the map. Figure 4-2 As shown in A7, the location information corresponding to A7 is "Building E, Community D, District C, City B, Province A". Afterwards, the electronic device sends the location information of the address to the application and performs the same operations as the above example, which will not be repeated here.

[0070] Of course, after the user clicks control 303, various windows for selecting / inputting location information may pop up. For example, the window may display an input box for searching information. When the user enters the required address in the input box, the window may also display addresses associated with the address. Furthermore, the user may select a desired address from these addresses. Therefore, the embodiments of the present application may be applied to a variety of scenarios, which are not specifically limited here, and may be designed according to actual needs during specific implementation.

[0071] It can be seen that when running an application, the electronic device does not need to prompt the user to grant permissions to the application through a pop-up window. Based on this, the application will not directly obtain permissions that carry relevant information about the user. On this basis, the application will not use permissions too much to obtain relevant information to ensure that information is secure and controllable.

[0072] When an application needs to obtain location information, the user can click on the system control, and the operating system of the electronic device authorizes the system control to obtain permission to obtain location information, so that the system control obtains location information based on the permission; when the application does not need to obtain location information, the user will not operate the system control, and the system control of the electronic device will not obtain permission to obtain location information, nor will it obtain location information.

[0073] Of course, in an embodiment of the present application, the above-mentioned interface not only displays system controls, but also second application controls, which may refer to controls with functional attributes. For example, the second application control is used to trigger the acquisition of user authorization information. When the user clicks on the second application control, the electronic device displays an authorization interface, on which authorization information and a confirmation control are displayed. When the user clicks on the confirmation control, the electronic device grants the application permission to the corresponding authorization information. Exemplarily, the interface displayed by the application is a login interface, on which a login control is displayed. When the user clicks on the login control, the electronic device displays an authorization interface, on which "Do you need to use application account A to log in?" and a permission login control are displayed. When the user clicks on the permission login control, the electronic device grants the application permission to use application account A to log in.

[0074] Among them, the above-mentioned electronic device can be a mobile phone, a tablet computer, a laptop, a notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a netbook, a personal digital assistant (PDA), a wearable electronic device and other devices. The specific form of the electronic device is not particularly limited in the embodiments of the present application.

[0075] Figure 6 It is a structural block diagram of the above electronic equipment.

[0076] like Figure 6As shown, the electronic device 100 may include a processor 210, an external memory interface 220, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, a memory 250, an antenna 1, a wireless communication module 260, a display screen 270, and a sensor module 280, etc. The sensor module 280 may include a pressure sensor 280A, an acceleration sensor 280B, a touch sensor 280C, etc.

[0077] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0078] The processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0079] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0080] The processor 210 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may store instructions or data that the processor 210 has just used or cyclically used. If the processor 210 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.

[0081] The charging management module 240 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 240 may receive charging input from a wired charger through the USB interface 230. In some wireless charging embodiments, the charging management module 240 may receive wireless charging input through a wireless charging coil of the electronic device. While the charging management module 240 is charging the battery 242, it may also power the electronic device through the power management module 241.

[0082] The power management module 241 is used to connect the battery 242, the charging management module 240 and the processor 210. The power management module 241 receives input from the battery 242 and / or the charging management module 240, and supplies power to the processor 210, the internal memory 221, the display screen 270, the camera 293, and the wireless communication module 260. The power management module 241 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 241 can also be set in the processor 210. In other embodiments, the power management module 241 and the charging management module 240 can also be set in the same device.

[0083] The wireless communication function of the electronic device can be implemented through the antenna 1, the wireless communication module 260, the modem processor and the baseband processor.

[0084] Antenna 1 is used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0085] The wireless communication module 260 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to electronic devices. The wireless communication module 260 can be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 1, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 210. The wireless communication module 260 can also receive the signal to be sent from the processor 210, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, the wireless communication module 260 receives application messages sent by the server.

[0086] The electronic device implements the display function through a GPU, a display screen 270, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 270 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 may include one or more GPUs that execute program instructions to generate or change display information.

[0087] The display screen 270 is used to display images, videos, etc. The display screen 270 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include 1 or N display screens 270, where N is a positive integer greater than 1.

[0088] In some embodiments, the display screen 207 displays the following Figure 3The interface 301 shown has a control 303 for positioning and having a positioning function and a control 305 for obtaining user information displayed on the interface 301. The interface 301 also has an input box 302 for inputting the location.

[0089] In some examples, display screen 207 displays the following Figure 3 The interface 301 shown in FIG. 1 shows a control 303 for the positioning function. When the user clicks the control 303, the electronic device 100 receives the user's click operation. In response to the operation, the display screen 207 of the electronic device 100 displays the following: Figure 4-1 The interface 301 shown in FIG. 1 shows a window 307 on the interface 301, and multiple addresses are displayed in the window 307. For example, Figure 4-1 As shown, the multiple addresses may include: District C, City B, Province A, Community D, District C, City B, Province A, Building E, Community D, District C, City B, Province A, and Community F, District C, City B, Province A. When the user selects the address "Building E, Community D, District C, City B, Province A" from the multiple addresses, the display screen 207 of the electronic device 100 displays the following: Figure 5 In the interface 301 shown, input “Province A, City B, District C” in the input box 302 displayed on the interface 301 .

[0090] In some examples, display screen 207 displays the following Figure 3 The interface 301 shown in FIG. 1 shows a control 303 for the positioning function. When the user clicks the control 303, the electronic device 100 receives the user's click operation. In response to the operation, the display screen 207 of the electronic device 100 displays the following: Figure 4-2 The interface 301 shown in FIG. 1 shows a window 308 on the interface 301, in which a map is displayed. The user can operate the map, such as zooming in on the map, zooming out on the map, sliding the map, etc. When the user selects a location on the map (such as Figure 4-2 When the electronic device is in the state of A7, the electronic device can obtain the address of A7, such as "Building E, Community D, District C, City B, Province A". The electronic device displays the address on the Figure 5 In the input box 302 on the interface 301 shown, “Province A, City B, District C” may be displayed in the input box 302 .

[0091] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 210 through the external memory interface 220 to implement a data storage function. For example, files such as music and videos are saved in the external memory card. In some embodiments, an external storage device is connected through the memory interface 220 to copy the installation package of the application to be installed from the external storage device.

[0092] The memory 250 can be used to store computer executable program codes, which include instructions. The memory 250 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device (such as audio data, a phone book, etc.), etc. In addition, the memory 250 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 210 executes various functional applications and data processing of the electronic device by running instructions stored in the memory 250 and / or instructions stored in a memory provided in the processor.

[0093] The pressure sensor 280A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 280A can be set on the display screen 270. There are many types of pressure sensors 280A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 280A, the capacitance between the electrodes changes. The electronic device determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 270, the electronic device detects the touch operation intensity according to the pressure sensor 280A. The electronic device can also calculate the touch position according to the detection signal of the pressure sensor 280A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0094] The acceleration sensor 280B can detect the magnitude of the acceleration of the electronic device in all directions (generally three axes). When the electronic device is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0095] The touch sensor 280C is also called a "touch control device". The touch sensor 280C can be set on the display screen 270, and the touch sensor 280C and the display screen 270 form a touch screen, also called a "touch control screen". The touch sensor 280C is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 270. In other embodiments, the touch sensor 280C can also be set on the surface of the electronic device, which is different from the position of the display screen 270.

[0096] In some embodiments, the touch sensor 280C detects the user's touch Figure 3 In some embodiments, the touch sensor 280C detects the user's touch operation on the control 303 for positioning function displayed on the interface 301. Figure 3 A touch operation of a control 305 for obtaining user information displayed on the interface 301 is shown.

[0097] Of course, the electronic device may also include other functional units, which are not limited in the embodiments of the present application.

[0098] In addition, the actions, terms, etc. involved in the various embodiments of the present application can refer to each other without limitation. The message name or parameter name in the message exchanged between the various devices in the embodiments of the present application is only an example, and other names can also be used in the specific implementation without limitation.

[0099] Figure 7 A schematic diagram of the software architecture of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. This application embodiment takes the Android system of the layered architecture as an example:

[0100] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the system is divided into four layers, from top to bottom: application layer, application framework layer, runtime and system library, and kernel layer.

[0101] The application layer can include a series of application packages.

[0102] like Figure 7 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications (also referred to as applications).

[0103] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0104] like Figure 7 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0105] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0106] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0107] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).

[0108] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0109] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications from applications running in the background, or a notification that appears on the screen in the form of a dialogue interface. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0110] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0111] In the embodiment of the present application, the application framework layer may further include a control management service and an extended control module. The control management service is used to receive a request sent by the application and create a system control according to the request. The extended control module is used to perform security verification on the operation event corresponding to the first operation after performing a first operation on the system control, obtain information after the verification is passed, and send the information to the application.

[0112] It should be understood that for the methods or devices provided in various embodiments of the present application, the corresponding extended control module may also be a part of the control management service. The control management service may run in a process to distinguish it from the process run by the application.

[0113] The runtime includes the core library and the virtual machine. The runtime is responsible for the scheduling and management of the Android system.

[0114] The core library consists of two parts: one part is the function that the Java language needs to call, and the other part is the core library.

[0115] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0116] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0117] The surface manager is used to manage the display subsystem and provides the fusion of two-dimensional (2D) and three-dimensional (3D) layers for multiple applications.

[0118] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0119] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0120] A 2D graphics engine is a drawing engine for 2D drawings.

[0121] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, sensor driver, and virtual card driver.

[0122] Figure 8 Another software architecture diagram of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 8 As shown above Figure 7 The control management service shown in may include a control information unit, a life cycle unit, and a control style control unit.

[0123] The control information unit can be used to store and manage the attribute information of multiple first application controls corresponding to the system controls when one or more pages create multiple system controls (i.e., system controls). The attribute information of the first application control includes at least one of the following: size information of the control, style of the control, type of the control, life cycle of the control, and location information of the control. The control information unit can determine the system control based on the attribute information of the first application control.

[0124] The life cycle unit can be used to manage the life cycle of each system control. The life cycle unit can determine the life cycle of the system control according to the life cycle of the first application control.

[0125] The control style control unit can be used to determine the style of the system control according to the attribute information of the first application control, and verify the security of the control style configuration.

[0126] like Figure 8 As shown above Figure 7 The extended control module shown in may include a window creation unit, a window loading unit, a window management unit, an event filtering unit and an information acquisition unit.

[0127] The window creation unit may be used to create / eliminate a window, wherein the window may include a first window.

[0128] The window loading unit may be used to load the first window to display the system control in the first window.

[0129] The window management unit can be used to distribute the operation events of the system control to the event filtering unit.

[0130] The event filtering unit can be used to filter the operation events to determine the security events.

[0131] The permission request unit may be configured to obtain a first permission after the event filtering unit determines that the operation event is a security event, where the first permission is a permission to access / obtain the first information.

[0132] The information acquisition unit may be configured to access / acquire the first information according to the first authority.

[0133] Fig. 9 A flowchart of a method for application permission control based on system controls provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, the method is applied to an electronic device, and an application is installed on the electronic device. The method may include S701-S707, please refer to Figure 8 and Fig. 9 As shown, specifically, the method can be divided into the following stages for description:

[0134] In the first stage, the system controls are displayed.

[0135] S701. An application sends a first request, where the first request is used to request loading of a system control. The first request carries property information of a first application control corresponding to the system control.

[0136] In some examples, the first application control is a control in the application for triggering the acquisition of the first information, that is, the first application control corresponds to the system control. The first information can be understood as the user's private information.

[0137] In some examples, privacy information can be understood as the user's personal private information, for example, the user's information (such as the user's mobile phone number, the user's account information, the user's friend information, etc.), location information, files, photos, media content, etc.

[0138] In some examples, the application may be a third-party application or a system application. The application may be a shopping application, a learning application, an entertainment application, an information query application, etc. Of course, the application may also be other types of applications, such as a communication application, etc., which is not specifically limited in the embodiments of the present application.

[0139] An example of when an application sends the first request is as follows:

[0140] The first one is that during the process of starting the application, the application sends the first request. For example, when the user clicks the icon of the application, the electronic device starts the application in response to the user's click operation. At this time, the application sends the first request.

[0141] The second type is that when the application is running, the application sends the first request; wherein the application running can be understood as the running state of the application after it is started. Exemplarily, after the application is started, the application runs in the foreground or the application runs in the background, at this time, the application sends the first request.

[0142] The third type is that after the application is started, when the specified application interface needs to be displayed, the application sends the first request; wherein the specified application interface can be understood as an interface with a control for triggering the acquisition of user privacy information. Exemplarily, the user clicks on the control for adding a delivery address, and the electronic device responds to the user's click operation and displays an "add delivery address" interface (e.g., the interface displays a control for positioning), and when the interface is loaded and displayed, the application sends the first request. This application does not make specific limitations here.

[0143] In some examples, the property information of the first application control may include at least one of the following: size information of the control, style of the control, type of the control, life cycle of the control, and location information of the control. The life cycle of the system control is determined based on the life cycle of the first application control, and the life cycle of the first application control is determined based on the life cycle of the application. That is, the system control is valid when the application is running.

[0144] For example, Figure 8 As shown, S701 may specifically be: ① When the application is started or when the application starts a specified application interface, the control loading module of the application loads the control layout container. The control layout container records the attribute information of the first application control on the application interface. ② The control layout container sends a first request for loading a system control to the control management service of the electronic device.

[0145] Exemplarily, when the application is started, the control layout container determines that there is a target control in the control of the application, or when the application starts the specified application interface, the control layout container determines that there is a target control (such as the first application control mentioned above) in the specified application interface, and the target control is a control used to trigger the acquisition of the first information. The control layout container sends a request for loading the system control to the control management service of the electronic device, and the request carries the attribute information of the target control. That is, the control layout container sends the attribute information of the target control to the control management service, so that the control management service creates a system control according to the attribute information of the target control, and displays the system control overwriting / replacing the target control on the application interface of the application.

[0146] Exemplarily, the application is a shopping application, when the user clicks on the control for adding a delivery address displayed on the interface of the application, the control loading module of the application loads the control layout container, and the control layout container determines the target control on the interface for adding the delivery address, and the target control includes a control 1 for triggering the acquisition of location information and a control 2 for triggering the acquisition of user information. The control layout container sends a first request for loading a system control to the control management service of the electronic device, and the first request carries the attribute information of control 1 and the attribute information of control 2.

[0147] In addition, in order to receive the response information of the first request in time, ③ the control layout container also sends a request for application monitoring information to the information monitoring module, and the information monitoring module monitors the information received by the application.

[0148] S702: The electronic device displays a first window according to the attribute information of the first application control, and the system control is displayed in the first window.

[0149] In some examples, the control management service of the electronic device creates a system control based on the attribute information of the first application control. Figure 8 As shown, the control information unit of the control management service can determine the size of the system control according to the size information of the first application control. The life cycle unit of the control management service can determine the life cycle of the system control according to the life cycle of the first application control. The control style control unit of the control management service determines the style of the system control according to the style information of the first application control.

[0150] In some examples, the extended control module of the electronic device creates the first window according to the attribute information of the first application control. Figure 8 As shown, S702 may specifically be: ④ The control management service sends a second request to the extended control module of the electronic device, the second request is used to request the creation of a first window, and the second request carries the position information and size information of the first application control. The window creation unit in the extended control module creates the first window according to the position information and size information of the first application control.

[0151] Continuing with the above example, the control management service of the electronic device creates a system control with the same size and style as control 1 based on the attribute information of control 1, and creates a first window with the same size and position as control 1. Similarly, the control management service of the electronic device creates a system control with the same size and style as control 2 based on the attribute information of control 2, and creates a first window with the same size and position as control 2.

[0152] In some examples, the electronic device displays the system controls in the first window, which can be specifically implemented as follows: Figure 8 As shown, ⑤ the window loading unit of the extended control module loads the system control onto the first window, that is, the system control is displayed in the first window.

[0153] Following the above example, the system control obtained in S702 is loaded onto the first window, and the following is obtained: Figure 3 The display effect shown in Figure 3 As shown, control 303 is covered at the position of control 1, that is, control 1 is Figure 3 The size, style, and position of the control 303 are all determined based on the attribute information of the control 1. Figure 3 As shown, a control 305 is overlaid at the position of control 2. For example, control 2 is Figure 3 The control 305 is blocked by the control 305. The size, style and position of the control 305 are all determined according to the attribute information of the control 2.

[0154] After the first stage, the system control is displayed on the application interface of the application. When the electronic device needs to obtain the first information, the user needs to operate the system control. After the user operates the system control, the electronic device can perform the operations in the second stage, as described below:

[0155] In the second stage, application permissions are managed based on system controls.

[0156] S703: The electronic device receives a first operation on a system control on a first window of an application.

[0157] The first operation can be understood as a trigger operation on the system control, and illustratively, the first operation can include a click operation, a press operation, a touch operation, etc. The embodiment of the present application does not make specific limitations.

[0158] Specifically, Figure 8 As shown, S703 may specifically be: ⑥ When the user performs a first operation on the system control on the first window of the application, the kernel of the electronic device receives the first operation of the user.

[0159] Continuing with the above example, when the user is adding a delivery address, the user can click Figure 3 Similarly, when the user is adding recipient information, the user can click Figure 3 Control 305 shown in .

[0160] In response to the first operation, the electronic device obtains the first information of the corresponding system control, which can be specifically implemented as follows: Exemplarily, the operating system of the electronic device can grant the system control the corresponding permission by default. For example, the location system control is granted the location acquisition permission by default, and the picture system control is granted the gallery access permission by default. The electronic device can verify the permission of the system control based on the default permission. When the permission of the system control is passed, the electronic device obtains the first information. The specific implementation is as described in S704-S705. As described below:

[0161] S704: In response to the first operation, the electronic device performs security verification on the operation event corresponding to the first operation.

[0162] The operation event is an event used to trigger the application to implement a specified function, wherein the specified function may include a positioning function, an information acquisition function, an information query function, and the like.

[0163] Specifically, Figure 8As shown, S704 may specifically be: ⑦ After the kernel of the electronic device receives the first operation of the user, the kernel of the electronic device encapsulates the first operation to obtain an operation event. ⑧ The window management unit of the extended control module distributes the operation event. Specifically, the operation event is obtained by the user operating the system control (i.e., the system control). Therefore, the window management unit distributes the operation event to the event filtering unit of the electronic device. ⑨ The event filtering unit filters the operation event. Specifically, the event filtering unit performs security verification on the operation event corresponding to the first operation to determine that the operation event is a security event.

[0164] Exemplarily, the event filtering unit may store response events. When the operation event matches the response event, the event filtering unit determines the operation event as a security event; when the operation event does not match the response event, the event filtering unit determines the operation event as a non-security event.

[0165] like Figure 8 As shown, S704 may specifically be: ⑩ After the event filtering unit determines that the operation event is a security event, the permission request unit of the extended control module obtains the first permission. The first permission may be the access permission / acquisition permission of the first information, etc. Among them, the permission request unit obtains the first permission, which may be specifically implemented as follows: the permission request unit requests the permission management module to obtain the first permission according to the attribute information of the operation event, and the attribute information of the operation event is used to characterize the nature of the operation event. For example, the attribute information of the operation event may include positioning attribute information, and the operation event may be understood as a positioning event.

[0166] Continuing with the above example, when the user clicks Figure 3 When the control 303 shown in FIG. 1 is clicked, the extended control module in the operating system of the electronic device performs security verification on the click event. After the security verification is passed, the extended control module in the operating system of the electronic device obtains the permission for obtaining the location information. After obtaining the permission, the extended control module in the operating system of the electronic device executes S705. Similarly, when the user clicks Figure 3 When the control 305 shown in , the extended control module in the operating system of the electronic device performs security verification on the click event. After the security verification is passed, the extended control module in the operating system of the electronic device obtains the permission for obtaining user information. After obtaining the permission, the extended control module in the operating system of the electronic device executes S705.

[0167] S705: The electronic device obtains first information.

[0168] Specifically, Figure 8 As shown, After the verification is passed, the information acquisition unit of the extended control module acquires the first information according to the first authority.

[0169] Exemplarily, after obtaining the permission for obtaining location information, the extended control module in the operating system of the electronic device obtains the positioning information of the electronic device in real time. For example, in a map navigation scenario, the click event is a navigation event, and the extended control module in the operating system of the electronic device obtains the location information in real time. Alternatively, after obtaining the permission for obtaining location information, the extended control module in the operating system of the electronic device obtains the default location information. For example, in an online taxi-hailing scenario, the click event is a destination selection event, and the extended control module in the operating system of the electronic device obtains home location information or company location information. Alternatively, after obtaining the permission for obtaining location information, the extended control module in the operating system of the electronic device obtains historical location information according to the application scenario. For example, in an online taxi-hailing scenario, the click event is a destination selection event, and the extended control module in the operating system of the electronic device obtains the location information of the shopping mall that the user often goes to.

[0170] Exemplarily, after obtaining the permission for obtaining user information, the extended control module in the operating system of the electronic device obtains the default user information. For example, in the delivery address editing scenario, the click event is a consignee editing event, and the extended control module in the operating system of the electronic device obtains the default user information. Alternatively, after obtaining the permission for obtaining user information, the extended control module in the operating system of the electronic device obtains historical user information. For example, in the user account login scenario, the click event is a user account input event, and the extended control module in the operating system of the electronic device obtains historical login information.

[0171] S706: The electronic device sends the first information to the application. Correspondingly, the application receives the first information.

[0172] Specifically, Figure 8 As shown, The information acquisition unit may send the first information to the information monitoring module of the application through a sending unit (such as a callback interface).

[0173] Exemplarily, the operating system of the electronic device calls the callback interface to send the first information to the application. For example, the operating system of the electronic device calls the callback interface to send the location information and user information to the application.

[0174] S707: The application displays the first information.

[0175] Specifically, Figure 8 As shown, After the information monitoring module monitors the first information, the information monitoring module sends the first information to the control layout container for display.

[0176] Following the above example, after the application receives the first information, the display of the electronic device Figure 5 The display interface 301 shown in the figure displays the default consignee information, such as "Xiao A", in the consignee input box. In addition, the consignee Xiao A's associated information (such as the mobile phone number "12345678910") is displayed in the mobile phone number input box. In the interface, the default location information is displayed in the region input box, such as "Province A, City B, District C".

[0177] The following describes in detail the method for application permission control based on system controls provided in the embodiment of the present application for specific application scenarios:

[0178] Scenario 1: Acquisition of location information.

[0179] For example, the above application is a shopping application. When the application is running, the user needs to add a delivery address. The electronic device performs the above first stage operation. At this time, the electronic device 100 displays the following Figure 3 The interface 301 is shown. A system control 303 for positioning is displayed on the interface 301. When the user clicks the system control 303, the electronic device 100 performs the second stage operation. At this time, the electronic device can obtain multiple addresses, such as Figure 4-1 When the user selects the address "Building E, Community D, District C, City B, Province A", the electronic device displays the following: Figure 5 The interface 301 shown has “Province A, City B, District C” displayed in the address input box 302 on the interface 301.

[0180] It should be understood that Figure 3 The system control 303 shown in covers / replaces the first application control for the positioning function on the application. When the user needs to obtain location information, the user clicks the system control, and the operating system of the electronic device performs security verification on the click event corresponding to the click operation, obtains the location information, and sends the location information to the application to present it to the user. When the user does not need to obtain location information, the user will not operate the system control, the operating system of the electronic device will not obtain the permission for obtaining location information, and will not obtain location information.

[0181] Scenario 2: User information acquisition.

[0182] Similarly, the user needs to add the consignee information. The electronic device performs the above-mentioned first stage operation. At this time, the electronic device 100 displays the following Figure 3The interface 301 shown in FIG. 301 displays a system control 305 for obtaining user information. When the user clicks the system control 305, the electronic device 100 performs the second stage of operation. At this time, the electronic device sends the obtained first information, such as "Xiao A" and "Xiao A's mobile phone number is 12345678910", to the application, and the application displays the following information: Figure 5 The interface 301 shown in the figure shows "Xiao A" in the consignee input box 304 and "12345678910" in the mobile phone number input box. Figure 3 The system control 303 shown in covers / replaces the first application control of the function of obtaining user information on the application. When the user needs to obtain user information, the user clicks the system control, and the operating system of the electronic device performs security verification on the click event corresponding to the click operation, obtains user information, and sends the user information to the application to present it to the user. When the user does not need to obtain user information, the user will not operate the system control, the operating system of the electronic device will not obtain the permission for obtaining user information, and will not obtain user information.

[0183] Therefore, in the above scenarios 1 and 2, the operating system of the electronic device will grant the application permission to obtain location information only when the application needs to obtain location information.

[0184] Based on the above scenarios, the methods provided in the embodiments of the present application can effectively prevent applications from obtaining excessive information after being granted relevant permissions, thereby ensuring the privacy security of users and reducing information security risks.

[0185] In addition, the electronic device does not need to prompt the user to grant permissions to the application through a pop-up window on the application interface, which effectively prevents the interference of multiple pop-up windows to the user. In addition, the user's operation events on the system controls are directly transmitted to the operating system of the electronic device, and processed by the operating system of the electronic device (such as filtering the operation events, security verification, etc.), so that the operation events are not processed by the application, avoiding the situation where the application counterfeits the operation events, fundamentally preventing the problem of operation events being counterfeited, and improving the security of the controls.

[0186] Unless otherwise specified or there is no logical conflict, the terms and / or descriptions between the various embodiments of the present application are consistent and can be referenced to each other. The technical features in different embodiments can be combined to form new embodiments according to their internal logical relationships.

[0187] The present application also provides an electronic device for implementing any of the above methods. For example, an electronic device is provided that includes a unit (or means) for implementing each step performed by the electronic device in the above method S701-S707. Fig.10 , which is a schematic diagram of an electronic device provided in an embodiment of the present application, the electronic device 100 may include: a display module 110, a first receiving module 120, an acquisition module 130 and a sending module 140. Among them,

[0188] The display module 110 is used to display the first interface of the application, and the first interface includes system controls. The application runs in a first process, and the system controls run in a second process, and the second process and the first process are two different processes. Exemplarily, the display unit 1330 can perform the above-mentioned step S702. The display module 110 can be Figure 6 Display screen 270 shown in .

[0189] The first receiving module 120 is used to receive a first operation on the system control. Exemplarily, the first receiving module 120 may execute the above step S703. The first receiving module 120 may be Figure 6 Touch sensor 280C shown in FIG.

[0190] The acquisition module 130 is used to obtain the first information of the corresponding system control in response to the first operation. Exemplarily, the acquisition module 130 can execute the above steps S704-S705. The acquisition module 130 can be Figure 6 The processor 210 shown in .

[0191] The sending module 140 is used to send the first information to the application. Exemplarily, the sending module 140 can execute the above-mentioned step S706. The sending module 140 can be Figure 6 The interfaces in the electronic device 100 shown in FIG.

[0192] In some embodiments, the electronic device 100 further includes:

[0193] The second receiving module 150 is used to receive a first request sent by the application, the first request is used to request to load a system control, the first request carries the property information of a first application control corresponding to the system control, and the first application control is a control in the application used to trigger the acquisition of the first information. Exemplarily, the second receiving module 150 may execute the above step S701. The second receiving module 150 may be Figure 6 The processor 210 shown in .

[0194] The display module 110 is used to display the first window according to the property information of the first application control, and the system control is displayed in the first window. Exemplarily, the display module 110 can perform the above step S702.

[0195] In some embodiments, the acquisition module 130 is used to: verify the authority of the system control; when the authority of the system control is passed, obtain the first information.

[0196] In some embodiments, the attribute information of the first application control includes at least one of the following: size information of the control, style of the control, type of the control, life cycle of the control, and location information of the control.

[0197] In some embodiments, the system control may include a location system control. The first interface may include an address input box. The display module 110 is used to display a second interface in response to an operation on the location system control, and multiple addresses are displayed on the second interface. The sending module 140 is used to display the first address in the address input box in response to an operation on a first address among the multiple addresses. Exemplarily, the display module 110 may perform the above step S707.

[0198] In some embodiments, the system control may include a location system control. The first interface may include an address input box. The display module 110 is used to display a third interface in response to an operation on the location system control, and a map is displayed on the third interface. The sending module 140 is used to display information of the first location in the address input box in response to an operation on the first location on the map. Exemplarily, the display module 110 may perform the above step S707.

[0199] In one design, the first interface also includes a second application control; the electronic device 100 also includes: an authorization module. The display module is used to display an authorization interface in response to an operation on the second application control, and the authorization interface includes authorization information and a confirmation control. The authorization module is used to grant the application permission corresponding to the authorization information in response to an operation on the confirmation control.

[0200] The devices provided in the embodiments of the present application can effectively prevent applications from obtaining excessive information after being granted relevant permissions, thereby ensuring the privacy security of users and reducing information security risks.

[0201] In addition, the electronic device does not need to prompt the user to grant permissions to the application through a pop-up window on the application interface, which effectively prevents the interference of multiple pop-up windows to the user. In addition, the user's operation events on the system controls are directly transmitted to the operating system of the electronic device, and processed by the operating system of the electronic device (such as filtering the operation events, security verification, etc.), so that the operation events are not processed by the application, avoiding the situation where the application counterfeits the operation events, fundamentally preventing the problem of operation events being counterfeited, and improving the security of the controls.

[0202] The present application also provides an electronic device for implementing any of the above methods. For example, an electronic device is provided that includes a unit (or means) for implementing each step performed by the electronic device in the above method S701-S707. Fig.11 , which is a schematic diagram of an electronic device provided by an embodiment of the present application, the electronic device 100 may include: a display module 1100, an extended control module 1200, and the extended control module 1200 includes a window management unit 1210, an acquisition unit 1220 and a sending unit 1230. Among them,

[0203] The display module 1100 is used to display the first interface of the application, and the first interface includes system controls. The application runs in a first process, and the system controls run in a second process, and the second process and the first process are two different processes. Exemplarily, the display module 1100 can perform the above-mentioned step S702. The display module 1100 can be Figure 6 Display screen 270 shown in .

[0204] The window management unit 1210 is used to receive a first operation on a system control. Exemplarily, the window management unit 1210 may execute the above step S703. The window management unit 1210 may be Figure 6 Touch sensor 280C shown in FIG.

[0205] The acquisition unit 1220 is used to obtain the first information of the corresponding system control in response to the first operation. Exemplarily, the acquisition unit 1220 can execute the above steps S704-S705. The acquisition unit 1220 can be Figure 6 The processor 210 shown in .

[0206] The sending unit 1230 is used to send the first information to the application. Exemplarily, the sending unit 1230 may execute the above-mentioned step S706. The sending unit 1230 may be Figure 6 The interfaces in the electronic device 100 shown in FIG.

[0207] In some embodiments, the electronic device 100 may further include: a control management service module 1300, the control management service module 1300 includes a receiving unit 1310 and a control creation unit 1320, and the extended control module 1200 further includes a window creation unit 1240 and a loading unit 1250.

[0208] The receiving unit 1310 is used to receive a first request sent by an application, the first request is used to request to load a system control, the first request carries attribute information of a first application control corresponding to the system control, and the first application control is a control in the application used to trigger the acquisition of the first information. Exemplarily, the receiving unit 1310 may perform the above-mentioned step S701. The receiving unit 1310 may be Figure 6 The processor 210 shown in .

[0209] The control creation unit 1320 is used to create a system control according to the attribute information of the first application control. Exemplarily, the control creation unit 1320 may execute the above step S702. The control creation unit 1320 may be Figure 6 The processor 210 shown in .

[0210] The window creation unit 1240 is used to create a first window according to the attribute information of the first application control. Exemplarily, the window creation unit 1240 can execute the above step S702. The window creation unit 1240 can be Figure 6 The processor 210 shown in .

[0211] The loading unit 1250 is used to display the system control in the first window. Exemplarily, the loading unit 1250 can execute the above step S702. The loading unit 1250 can be Figure 6 The processor 210 shown in .

[0212] In some embodiments, the attribute information of the first application control includes at least one of the following: size information of the control, style of the control, type of the control, life cycle of the control, and location information of the control.

[0213] In some embodiments, the life cycle of the system control is determined according to the life cycle of the application.

[0214] In some embodiments, the acquisition unit 1220 is used to: verify the authority of the system control; when the authority of the system control is passed, obtain the first information.

[0215] In some embodiments, the acquisition unit 1220 further includes an event filtering unit 1221 and a permission requesting unit 1222.

[0216] The event filtering unit 1221 is used to perform security verification on the operation event corresponding to the first operation in response to the first operation. Exemplarily, the event filtering unit 1221 may perform the above-mentioned step S704. The event filtering unit 1221 may be Figure 6 The processor 210 shown in .

[0217] The permission request unit 1222 is used to obtain a first permission according to the attribute information of the operation event after determining that the operation event is a security event. The first permission is a permission to obtain the first information. Exemplarily, the permission request unit 1222 can perform the above-mentioned step S705. The permission request unit 1222 can be Figure 6 The processor 210 shown in .

[0218] In some embodiments, the acquisition unit 1220 may further include an information acquisition unit 1223. The information acquisition unit 1223 is used to acquire the first information according to the first authority. Exemplarily, the information acquisition unit 1223 may perform the above-mentioned step S705. The information acquisition unit 1223 may be Figure 6 The processor 210 shown in .

[0219] In some embodiments, the system control may include a location system control. The first interface may include an address input box. The display module 1100 is used to display a second interface in response to an operation on the location system control, and multiple addresses are displayed on the second interface. The acquisition unit 1220 is used to display the first address in the address input box in response to an operation on a first address among the multiple addresses. Exemplarily, the display module 1100 may perform the above step S707.

[0220] In some embodiments, the system control may include a location system control. The first interface may include an address input box. The display module 1100 is used to display a third interface in response to an operation on the location system control, and a map is displayed on the third interface. The acquisition unit 1220 is used to display information of the first location in the address input box in response to an operation on the first location on the map. Exemplarily, the display module 1100 may perform the above step S707.

[0221] In one design, the first interface also includes a second application control; the electronic device also includes: an authorization module. The display module is used to display an authorization interface in response to an operation on the second application control, the authorization interface including authorization information and a confirmation control. The authorization module is used to grant the application permission corresponding to the authorization information in response to an operation on the confirmation control.

[0222] For some examples, see Figure 1 , the confirmation control can be Figure 1 Control 104 or control 105 in.

[0223] For some examples, see Figure 2 , the confirmation control can be Figure 1 Control 204 or control 205 in.

[0224] The devices provided in the embodiments of the present application can effectively prevent applications from obtaining excessive information after being granted relevant permissions, thereby ensuring the privacy security of users and reducing information security risks.

[0225] In addition, the electronic device does not need to prompt the user to grant permissions to the application through a pop-up window on the application interface, which effectively prevents the interference of multiple pop-up windows to the user. In addition, the user's operation events on the system controls are directly transmitted to the operating system of the electronic device, and processed by the operating system of the electronic device (such as filtering the operation events, security verification, etc.), so that the operation events are not processed by the application, avoiding the situation where the application counterfeits the operation events, fundamentally preventing the problem of operation events being counterfeited, and improving the security of the controls.

[0226] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0227] An embodiment of the present application also provides a computer-readable storage medium, including instructions, which, when executed on a computer, enable the computer to execute any of the above methods.

[0228] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute any of the above methods.

[0229] An embodiment of the present application also provides a chip, which includes a processor and an interface circuit, the interface circuit is coupled to the processor, the processor is used to run a computer program or instruction to implement the above method, and the interface circuit is used to communicate with other modules outside the chip.

[0230] All or part of any features or steps in the embodiments of the present application can be freely combined, and the combined technical solutions are also within the scope of the present application.

[0231] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" means one or more, and "plurality" means two or more. The words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not limit them to be different.

[0232] In the description of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0233] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0234] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0235] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0236] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0237] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0238] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A method for application permission management based on system controls, applied to electronic devices, characterized in that: The method comprises: Displaying a first interface of an application, wherein the first interface includes a system control; wherein the application runs in a first process, and the system control runs in a second process; receiving a first operation on the system control; In response to the first operation, obtaining first information corresponding to the system control; The first information is sent to the application.

2. The method according to claim 1, characterized in that Before receiving a first operation on the system control, the method further includes: receiving a first request sent by the application, where the first request is used to request to load the system control, the first request carries property information of a first application control corresponding to the system control, and the first application control is a control in the application used to trigger acquisition of first information; A first window is displayed according to the attribute information of the first application control, and the system control is displayed in the first window.

3. The method according to claim 1, characterized in that The acquiring the first information corresponding to the system control includes: Verifying the permissions of the system controls; When the permission of the system control is passed, the first information is obtained.

4. The method according to claim 2, characterized in that: The attribute information of the first application control includes at least one of the following: size information of the control, style of the control, type of the control, life cycle of the control, and position information of the control.

5. The method according to any one of claims 1 to 4, characterized in that The system control includes a location system control; the first interface includes an address input box, including: In response to the operation of the location system control, displaying a second interface, wherein a plurality of addresses are displayed on the second interface; In response to an operation on a first address among the plurality of addresses, the first address is displayed in the address input box.

6. The method according to any one of claims 1 to 4, characterized in that The system control includes a location system control; the first interface includes an address input box, including: In response to the operation of the location system control, a third interface is displayed, wherein a map is displayed on the third interface; In response to an operation on a first location on the map, information of the first location is displayed in the address input box.

7. The method according to any one of claims 1 to 6, characterized in that The first interface also includes a second application control; and the method further includes: In response to the operation on the second application control, an authorization interface is displayed; the authorization interface includes authorization information and a confirmation control; In response to an operation on the confirmation control, the application is granted permission corresponding to the authorization information.

8. An electronic device, characterized in that: The electronic device comprises: a display module, a first receiving module, an acquisition module and a sending module, wherein: The display module is used to display a first interface of the application, wherein the first interface includes a system control; wherein the application runs in a first process, and the system control runs in a second process; The first receiving module is used to receive a first operation on the system control; The acquisition module is used for acquiring first information corresponding to the system control in response to the first operation; The sending module is used to send the first information to the application.

9. The electronic device according to claim 8, characterized in that: The electronic device further includes: a second receiving module; wherein, The second receiving module is used to receive a first request sent by the application, the first request is used to request to load the system control, the first request carries attribute information of a first application control corresponding to the system control, and the first application control is a control in the application used to trigger the acquisition of the first information; The display module is used to display a first window according to the attribute information of the first application control, and the system control is displayed in the first window.

10. The electronic device according to claim 8, characterized in that: The acquisition module is used for: Verifying the permissions of the system controls; When the permission of the system control is passed, the first information is obtained.

11. The electronic device according to claim 9, characterized in that: The attribute information of the first application control includes at least one of the following: size information of the control, style of the control, type of the control, life cycle of the control, and position information of the control.

12. The electronic device according to any one of claims 8 to 11, characterized in that: The system control includes a location system control; the first interface includes an address input box; The display module is used to display a second interface in response to an operation on the location system control, wherein the second interface displays a plurality of addresses; The sending module is used for displaying a first address in the address input box in response to an operation on the first address among the multiple addresses.

13. The electronic device according to any one of claims 8 to 11, characterized in that: The system control includes a location system control; the first interface includes an address input box; The display module is used to display a third interface in response to an operation on the location system control, wherein the third interface displays a map; The sending module is used for displaying information of the first location in the address input box in response to an operation on the first location on the map.

14. The electronic device according to any one of claims 8 to 13, characterized in that: The first interface also includes a second application control; the electronic device also includes: an authorization module; The display module is used to display an authorization interface in response to an operation on the second application control, wherein the authorization interface includes authorization information and a confirmation control; The authorization module is used to grant the application the permission corresponding to the authorization information in response to an operation on the confirmation control.

15. An electronic device, characterized in that: The electronic device comprises: one or more processors; and a memory, wherein codes are stored in the memory; when the codes are executed by the processor, the electronic device executes the method according to claims 1-7.

16. A computer-readable storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method according to claims 1 to 7.

Citation Information

Cited By

  • Application permission management and control method based on system control, and electronic device

    EP4561041A1

  • Application permission management and control method based on system control, and electronic device

    WO2024179086A1