Application permission management and control method based on system control, and electronic device
By using system controls on electronic devices instead of applications to obtain information, the problem of users unconsciously authorizing applications to obtain too much private information is solved, and information security is controllable and operational event security is improved.
Patent Information
- Application Number
- PCT/CN2023/135045
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-28
- Filing Date
- 2023-11-29
- Publication Date
- 2024-09-06
AI Technical Summary
When existing electronic devices run applications, they prompt users to grant permissions through pop-up windows, causing users to unconsciously authorize applications to obtain too much personal privacy information, posing security risks.
Using a method based on system controls, by displaying system controls on the application interface, the user operating system controls obtain information on behalf of the application. The operating system of the electronic device directly handles permissions and information, preventing applications from directly obtaining permissions and ensuring information security.
It effectively prevents applications from obtaining too much user privacy information, improves information security, reduces interference from multiple pop-up windows, prevents application counterfeiting operations, and ensures user privacy and security.
Smart Images

Figure CN2023135045_06092024_PF_FP
Abstract
Description
System control-based application permission management method and electronic device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on February 28, 2023, with application number 202310224187.2 and application name “Method and electronic device for application permission management based on system controls”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] 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
[0003] To meet user needs, more and more applications (apps) are installed on electronic devices. These apps prompt users to grant permissions through pop-up windows, such as granting access to personal privacy information (such as contacts, gallery information, location information, etc.). If users unknowingly grant access to personal privacy information to an app, the app will obtain excessive amounts of the user's personal privacy information, posing a security risk.
[0004] Summary of the Invention
[0005] 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.
[0006] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions.
[0007] 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.
[0008] 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.
[0009] The system control can replace / override the first application control with the same function in the display interface of the application.
[0010] 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.
[0011] In this way, a system control is displayed on the application interface. When the user operates the system control, the electronic device's operating system grants the system control permission to obtain information on behalf of the application. Instead of the application directly obtaining permissions and information from the electronic device's operating system. As can be seen, when the application is running, 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 does not directly obtain permissions that carry relevant user information. On this basis, the application will not excessively use permissions to obtain relevant information, ensuring that information is secure and controllable.
[0012] Furthermore, electronic devices no longer need to prompt users to grant permissions via pop-up windows on the application interface, effectively preventing the nuisance of multiple pop-up windows. Furthermore, user operation events on system controls are directly transmitted to the electronic device's operating system, where they are processed (such as filtering and security verification). This prevents application-generated operation events from being processed, thus improving control security.
[0013] It should be understood that for the same application installation package, when the installation package is installed on device A that supports the system control function, the system controls can be displayed on the corresponding interface of the application when the installation package is opened on device A. Device A can provide corresponding information to the application based on the user's operation of the system controls. However, when the installation package is installed on device B that does not support the system control function, the corresponding application controls can be displayed on the corresponding interface when the application is opened on device B; alternatively, device B will not display the corresponding application controls and will display the application background in the area corresponding to the system controls.
[0014] In one design, before the electronic device receives the first operation on the system control, the electronic device further includes: receiving a first request from an application, the first request being used to request loading the system control, the first request carrying attribute information of a first application control corresponding to the system control, the first application control being a control in the application used to trigger acquisition of the first information. The electronic device displays a first window based on the attribute information of the first application control, with the system control displayed in the first window.
[0015] 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.
[0016] 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.
[0017] In one design solution, the lifecycle of the system control is determined according to the lifecycle of the application.
[0018] In one design, in response to a first operation, the electronic device obtains the first information. This 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 a first permission based on attribute information of the operation event, where the first permission is the permission to obtain the first information. The electronic device obtains the first information based on the first permission.
[0019] In one design, the system control may include a location system control; the first interface includes an address input box. Specifically, in response to an operation on the location system control, the electronic device displays a second interface, wherein 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.
[0020] In one design, the system controls may include a location system control; the first interface includes an address input box. Specifically, in response to an operation on the location system control, the electronic device displays a third interface, which displays a map. In response to an operation on a first location on the map, the electronic device displays information about the first location in the address input box.
[0021] In one design, the first interface further includes a second application control; the method further includes: in response to an operation on the second application control, the electronic device displaying an authorization interface including 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.
[0022] 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 system controls. The application runs in a first process, and the system controls run 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.
[0023] In this way, a system control is displayed on the application interface. When the user operates the system control, the electronic device's operating system grants the system control permission to obtain information on behalf of the application. Instead of the application directly obtaining permissions and information from the electronic device's operating system. As can be seen, when the application is running, 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 does not directly obtain permissions that carry relevant user information. On this basis, the application will not excessively use permissions to obtain relevant information, ensuring that information is secure and controllable.
[0024] Furthermore, electronic devices no longer need to prompt users to grant permissions via pop-up windows on the application interface, effectively preventing the nuisance of multiple pop-up windows. Furthermore, user operation events on system controls are directly transmitted to the electronic device's operating system, where they are processed (such as filtering and security verification). This prevents application-generated operation events from being processed, thus improving control security.
[0025] In one design, the electronic device further includes a second receiving module configured to receive a first request from an application, the first request being configured to request the loading of a system control, the first request carrying attribute information of a first application control corresponding to the system control, the first application control being a control in the application used to trigger the acquisition of the first information. The display module is configured to display a first window based on the attribute information of the first application control, wherein the system control is displayed in the first window.
[0026] 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.
[0027] 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.
[0028] In one design solution, the system control may include a location system control. The first interface may include an address input box. The display module is configured to display a second interface in response to an operation on the location system control, wherein the second interface displays multiple addresses. The sending module is configured to display the first address in the address input box in response to an operation on a first address among the multiple addresses.
[0029] In one design solution, the system control may include a location system control. The first interface may include an address input box. The display module is configured to display a third interface, wherein a map is displayed on the third interface, in response to an operation on the location system control. The sending module is configured to display information about the first location in the address input box in response to an operation on the first location on the map.
[0030] In one design, the first interface further includes a second application control; the electronic device further includes an authorization module. The display module is configured 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 configured to grant the application permission corresponding to the authorization information in response to an operation on the confirmation control.
[0031] 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.
[0032] In this way, a system control is displayed on the application interface. When the user operates the system control, the electronic device's operating system grants the system control permission to obtain information on behalf of the application. Instead of the application directly obtaining permissions and information from the electronic device's operating system. As can be seen, when the application is running, 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 does not directly obtain permissions that carry relevant user information. On this basis, the application will not excessively use permissions to obtain relevant information, ensuring that information is secure and controllable.
[0033] Furthermore, electronic devices no longer need to prompt users to grant permissions via pop-up windows on the application interface, effectively preventing the nuisance of multiple pop-up windows. Furthermore, user operation events on system controls are directly transmitted to the electronic device's operating system, where they are processed (such as filtering and security verification). This prevents application-generated operation events from being processed, thus improving control security.
[0034] 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. The receiving unit is used to receive a first request sent by an application, the first request is used to request the loading of a system control, the first request carries the attribute information of the 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 based on the attribute information of the first application control. The window creation unit is used to create a first window based on the attribute information of the first application control. The loading unit is used to display the system control in the first window.
[0035] 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.
[0036] 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.
[0037] In one design solution, the lifecycle of the system control is determined according to the lifecycle of the application.
[0038] In one design, the acquisition unit further includes an event filtering unit and a permission requesting unit. The event filtering unit is configured to, in response to a first operation, perform security verification on an operation event corresponding to the first operation. The permission requesting unit is configured to, after determining that the operation event is a security event, obtain a first permission based on attribute information of the operation event, where the first permission is a permission to obtain the first information.
[0039] 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.
[0040] In one design solution, the system control may include a location system control. The first interface may include an address input box. The display module is configured to display a second interface in response to an operation on the location system control, wherein the second interface displays multiple addresses. The sending module is configured to display the first address in the address input box in response to an operation on a first address among the multiple addresses.
[0041] In one design solution, the system control may include a location system control. The first interface may include an address input box. The display module is configured to display a third interface, wherein a map is displayed on the third interface, in response to an operation on the location system control. The sending module is configured to display information about the first location in the address input box in response to an operation on the first location on the map.
[0042] In one design, the first interface further includes a second application control; the electronic device further includes an authorization module. The display module is configured 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 configured to grant the application permission corresponding to the authorization information in response to an operation on the confirmation control.
[0043] 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 code; when the code is executed by the processor, the electronic device executes the method described in the first aspect.
[0044] 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 described in the first aspect.
[0045] 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
[0046] FIG1 is a schematic diagram of an interface of an electronic device provided in an embodiment of the present application;
[0047] FIG2 is a schematic diagram of another interface of an electronic device provided in an embodiment of the present application;
[0048] FIG3 is a schematic diagram of another interface of an electronic device provided in an embodiment of the present application;
[0049] FIG4-1 is a schematic diagram of another interface of an electronic device provided in an embodiment of the present application;
[0050] FIG4-2 is a schematic diagram of another interface of an electronic device provided in an embodiment of the present application;
[0051] FIG5 is a schematic diagram of another interface of an electronic device provided in an embodiment of the present application;
[0052] FIG6 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0053] FIG7 is a schematic diagram of a software architecture of an electronic device provided in an embodiment of the present application;
[0054] FIG8 is a schematic diagram of another software architecture of an electronic device provided in an embodiment of the present application;
[0055] FIG9 is 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;
[0056] FIG10 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0057] FIG11 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. 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. The "and / or" in the present application is only a description of the association relationship of 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. In addition, 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 similar expressions refers to any combination of these items, including any combination of single 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, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit differences. At the same time, in the embodiments of the present application, words such as "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 schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way for easy understanding.
[0059] 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.
[0060] For example, FIG1 is a schematic diagram of an application interface when an application is running on an electronic device 100. When the application is running, the electronic device displays the application interface 101 shown in FIG1. A window 102 is displayed on the application interface 101 shown in FIG1. It should be understood that this window 102 may be a window provided by the operating system. Window 102 displays a prompt message "Do you want to allow the application to access photos, media content, and files on your device?" Window 102 also displays a control 103 for disabling, 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 run. Subsequently, when the electronic device runs the application again, the application will pop up the interface shown in FIG1 for user authorization. However, if the user clicks control 105 multiple times (e.g., twice), the application will automatically grant user authorization each time it runs. This results in the application excessively using permissions to access photos, media content, and files on the electronic device each time it runs, regardless of whether the application needs to access such information. This can lead to privacy leaks and security risks.
[0061] As another example, FIG2 is a schematic diagram of an application interface when running an application on electronic device 100. When the application is running, the electronic device displays application interface 201 as shown in FIG2. A window 202 is displayed on application interface 201 as shown in FIG2. It should be understood that window 202 may be a window provided by the operating system. Window 202 displays a prompt message "This application requires your location permission. Do you allow it?" Window 202 also displays a control 203 for disabling, a control 205 for allowing only once, and a control 204 for always allowing. When the user clicks control 205, the application can obtain the electronic device's location information during this run. Subsequently, when the electronic device runs the application again, the application will pop up the interface shown in FIG2 for user authorization. However, if the user clicks control 205 multiple times (e.g., twice), the application will automatically grant user authorization each time it runs. This results in the application excessively using permissions to access the electronic device's location information each time it runs, regardless of whether the application needs to obtain the location information. This can lead to privacy leaks and security risks.
[0062] 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, system controls can be displayed on the interface of the application. When the user operates the system controls, the operating system of the electronic device grants the system controls permissions to obtain information on behalf of the application. Instead of 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 through a pop-up window. Based on this, the application will not directly obtain 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.
[0063] Furthermore, electronic devices no longer need to prompt users to grant permissions via pop-up windows on the application interface, effectively preventing the nuisance of multiple pop-up windows. Furthermore, user operation events on system controls are directly transmitted to the electronic device's operating system, where they are processed (such as filtering and security verification). This prevents application-generated operation events from being processed, thus improving control security.
[0064] 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 this application.
[0065] The above-mentioned system controls may refer to controls with functional attributes. For example, a 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, system controls may also be controls with other functionalities, such as a system control for obtaining an email address. These functions are not listed one by one in the embodiments of this application.
[0066] The system control can replace / overwrite the first application control of the same function in the application's display interface. The application runs in a first process and the system control runs in a second process. In other words, the process running the system control is different from the process running the application.
[0067] 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. Accordingly, the system control in the embodiment of the present application may be a system control that implements the functions of control A, control B, or control C.
[0068] The following system control is used to obtain the geographic location, as an example:
[0069] Exemplarily, during the operation of the application, the application interface 301 displayed by the electronic device 100 as shown in Figure 3 includes a system control (a 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 a 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 the location information is "Province A, City B, District C, Community D". The electronic device sends the location information to the application, and the application displays the location information on the application interface. For example, as shown in Figure 5, the location information "Province A, City B, District C" is displayed in the address input box 302 displayed on the application interface 301 of the application.
[0070] For example, when a user clicks control 303 shown in FIG3 , the electronic device may display interface 301 as shown in FIG4-1 , which displays window 307 . Window 307 displays multiple addresses, allowing the user to select a desired address. For example, "Building E, Community D, District C, City B, Province A." The electronic device then sends the location information of the address to the application and performs the same operations as in the above example, which will not be repeated here.
[0071] For example, compared to the above example, when the user clicks control 303 shown in FIG3 , the electronic device may also display interface 301 shown in FIG4-2 , which displays window 308 . Window 308 displays a map, and the user can select any location on the map by manipulating the map, such as A7 in FIG4-2 , which corresponds to the location information "Building E, Community D, District C, City B, Province A." The electronic device then sends the location information of this address to the application and performs the same operations as in the above example, which will not be repeated here.
[0072] Of course, after the user clicks control 303, various windows for selecting / entering location information may pop up. For example, the window may display an input box for searching information. When the user enters a desired address in the input box, the window may also display addresses associated with the address. Furthermore, the user can select a desired address from these addresses. Therefore, the embodiments of the present application can be applied to a variety of scenarios, which are not specifically limited here. The specific implementation can be designed according to actual needs.
[0073] As can be seen, when running an app, the electronic device does not need to prompt the user to grant permissions via a pop-up window. Based on this, the app does not directly access permissions that carry user-related information. Furthermore, the app will not excessively use permissions to obtain relevant information, ensuring information security and controllability.
[0074] 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.
[0075] 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.
[0076] Among them, the above-mentioned electronic devices can be mobile phones, tablet computers, laptops, notebook computers, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, personal digital assistants (PDAs), wearable electronic devices and other devices. The specific form of the electronic devices is not particularly limited in the embodiments of the present application.
[0077] FIG6 is a structural block diagram of the electronic device.
[0078] As shown in FIG6 , 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 270, and a sensor module 280. The sensor module 280 may include a pressure sensor 280A, an acceleration sensor 280B, a touch sensor 280C, and the like.
[0079] It is understood that the structures illustrated in the embodiments of the present application do not constitute specific limitations on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0080] 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 processing unit (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). Different processing units may be independent devices or integrated into one or more processors.
[0081] 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.
[0082] Processor 210 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 210 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 210. If processor 210 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 210 latency, and thus improves system efficiency.
[0083] The charging management module 240 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 240 can receive charging input from the wired charger via the USB interface 230. In some wireless charging embodiments, the charging management module 240 can receive wireless charging input via the electronic device's wireless charging coil. While charging the battery 242, the charging management module 240 can also power the electronic device through the power management module 241.
[0084] 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 provides power to the processor 210, the internal memory 221, the display 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 count, and battery health status (leakage, impedance). 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.
[0085] 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.
[0086] Antenna 1 is used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antenna can be used in conjunction with a tuning switch.
[0087] The wireless communication module 260 can provide wireless communication solutions for electronic devices, 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. The wireless communication module 260 can be one or more devices that integrate at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 1, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 210. The wireless communication module 260 can also receive signals to be sent from the processor 210, frequency modulate them, amplify them, and convert them into electromagnetic waves for radiation through the antenna 1. In some embodiments, the wireless communication module 260 receives application messages sent by the server.
[0088] The electronic device implements display functionality through a GPU, display screen 270, and an application processor. A GPU is a microprocessor for image processing that connects display screen 270 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs that execute program instructions to generate or modify display information.
[0089] Display screen 270 is used to display images, videos, and the like. 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 (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, the electronic device can include one or N display screens 270, where N is a positive integer greater than one.
[0090] In some embodiments, the display screen 207 displays an interface 301 as shown in FIG3 , which displays a control 303 for positioning and a control 305 for obtaining user information. The interface 301 also displays an input box 302 for inputting a location.
[0091] In some examples, the display screen 207 displays an interface 301 as shown in FIG. 3 , which displays a control 303 for a location-based function. When a user clicks control 303 , the electronic device 100 receives the user's click. In response, the display screen 207 of the electronic device 100 displays an interface 301 as shown in FIG. 4-1 , which displays a window 307 displaying multiple addresses. For example, as shown in FIG. 4-1 , the multiple addresses may include: District C, City B, Province A; District D, Community C, City B, Province A; Building E, Community D, District C, City B, Province A; and District F, Community C, City B, Province A. When the user selects "Building E, Community D, District C, City B, Province A" from the multiple addresses, the display screen 207 of the electronic device 100 displays an interface 301 as shown in FIG. 5 , and the user enters "District C, City B, Province A" in the input box 302 displayed on the interface 301 .
[0092] In some examples, the display screen 207 displays an interface 301 as shown in FIG3 , on which a control 303 for a positioning function is displayed. When a user clicks on the control 303 , the electronic device 100 receives the user's click operation. In response to this operation, the display screen 207 of the electronic device 100 displays an interface 301 as shown in FIG4-2 , on which a window 308 is displayed, in which a map is displayed. The user can operate the map, such as zooming in, zooming out, or sliding the map. When the user selects a location on the map (such as point A7 in FIG4-2 ), the electronic device can obtain the address of point A7, such as "Building E, Community D, District C, City B, Province A". The electronic device displays the address in an input box 302 on the interface 301 as shown in FIG5 , in which "District C, City B, Province A" can be displayed.
[0093] 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 processor 210 via external memory interface 220 to implement data storage. For example, files such as music and videos can be stored on the external memory card. In some embodiments, an external storage device is connected via memory interface 220 to copy the installation package of the application to be installed from the external storage device.
[0094] The memory 250 can be used to store computer executable program code, which includes instructions. The memory 250 may include a program storage area and a data storage area. Among them, the program storage area can 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 can 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.
[0095] Pressure sensor 280A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 280A can be located on display screen 270. There are many types of pressure sensors 280A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force acts on pressure sensor 280A, the capacitance between the electrodes changes. The electronic device determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 270, the electronic device detects the touch intensity based on pressure sensor 280A. The electronic device can also calculate the touch location based on the detection signal from pressure sensor 280A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, a command to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, a command to create a new short message is executed.
[0096] Accelerometer 280B can detect the magnitude of the electronic device's acceleration 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 electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.
[0097] Touch sensor 280C, also known as a "touch device," can be disposed on display screen 270. Touch sensor 280C and display screen 270 form a touch screen, also known as a "touch screen." Touch sensor 280C is configured to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to an application processor to determine the type of touch event. Visual output related to the touch operations can be provided via display screen 270. In other embodiments, touch sensor 280C can also be disposed on the surface of the electronic device, at a location different from that of display screen 270.
[0098] In some embodiments, the touch sensor 280C detects a user's touch operation on the control 303 for the positioning function displayed on the interface 301 shown in Figure 3. In some embodiments, the touch sensor 280C detects a user's touch operation on the control 305 for obtaining user information displayed on the interface 301 shown in Figure 3.
[0099] Of course, the electronic device may also include other functional units, which is not limited in the embodiments of the present application.
[0100] In addition, the actions and terms involved in the various embodiments of this application can refer to each other without limitation. The message names or parameter names in the messages exchanged between the various devices in the embodiments of this application are only examples, and other names can also be used in specific implementations without limitation.
[0101] FIG7 is a schematic diagram of the software architecture of an electronic device provided in an embodiment of the present application. As shown in FIG7 , the software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The present application embodiment takes the Android system of the layered architecture as an example:
[0102] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other via software interfaces. In some embodiments, the system is divided into four layers: application layer, application framework layer, runtime and system libraries layer, and kernel layer.
[0103] The application layer can include a series of application packages.
[0104] As shown in FIG7 , the application package may include application programs (also referred to as applications) such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
[0105] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0106] As shown in FIG7 , the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
[0107] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.
[0108] 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.
[0109] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).
[0110] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0111] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically, without requiring user interaction. For example, the Notification Manager can be used to notify users of completed downloads, message reminders, and so on. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog interfaces on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.
[0112] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0113] In an 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 configured to receive requests from applications and create system controls based on the requests. The extended control module is configured to, after performing a first operation on a system control, perform security verification on the operation event corresponding to the first operation, obtain information after the verification is successful, and send the information to the application.
[0114] 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 part of a control management service. The control management service may run in a process to distinguish it from the process running the application.
[0115] The runtime includes the core library and the virtual machine. The runtime is responsible for scheduling and management of the Android system.
[0116] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the core library.
[0117] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0118] The system library can 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.
[0119] The surface manager is used to manage the display subsystem and provide the fusion of two-dimensional (2D) and three-dimensional (3D) layers for multiple applications.
[0120] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0121] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0122] A 2D graphics engine is a drawing engine for 2D drawings.
[0123] 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.
[0124] FIG8 is another software architecture diagram of an electronic device provided by an embodiment of the present application. As shown in FIG8, the control management service shown in FIG7 may include a control information unit, a life cycle unit and a control style control unit.
[0125] 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: control size information, control style, control type, control lifecycle, and control location information. The control information unit can determine the system control based on the attribute information of the first application control.
[0126] 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.
[0127] 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.
[0128] As shown in FIG8 , the extended control module shown in FIG7 may include a window creation unit, a window loading unit, a window management unit, an event filtering unit, and an information acquisition unit.
[0129] The window creation unit can be used to create / eliminate a window, wherein the window can include a first window.
[0130] The window loading unit may be configured to load the first window to display the system control in the first window.
[0131] The window management unit can be used to distribute the operation events of the system control to the event filtering unit.
[0132] The event filtering unit can be used to filter operation events to determine security events.
[0133] The permission requesting 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.
[0134] The information acquisition unit may be configured to access / acquire the first information according to the first authority.
[0135] Figure 9 is a flow chart of a method for application permission management based on system controls provided in an embodiment of the present application. As shown in Figure 9, the method is applied to an electronic device on which an application is installed. The method may include steps S701-S707. Please refer to Figures 8 and 9 simultaneously. Specifically, the method may be described in the following stages:
[0136] In the first stage, the system controls are displayed.
[0137] 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.
[0138] 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.
[0139] 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.
[0140] 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.
[0141] The following are examples of when an application sends its first request:
[0142] The first type is that during the application startup process, the application sends a first request. For example, when a user clicks on the application icon, the electronic device starts the application in response to the user's click operation. At this time, the application sends the first request.
[0143] The second type is that the application sends the first request while the application is running. "Application running" can be understood as the running state of the application after it is started. For example, after the application is started, the application is running in the foreground or in the background. At this time, the application sends the first request.
[0144] The third type is that after the application is started, when it needs to display a specified application interface, the application sends a first request; wherein, the specified application interface can be understood as an interface with a control for triggering the acquisition of user privacy information. For example, the user clicks on the control for adding a delivery address, and the electronic device responds to the user's click operation by displaying an "add delivery address" interface (e.g., a control for positioning is displayed on the interface). When the interface is loaded and displayed, the application sends a first request. This application does not make specific limitations here.
[0145] In some examples, the attribute information of the first application control may include at least one of the following: control size information, control style, control type, control lifecycle, and control location information. The lifecycle of the system control is determined based on the lifecycle of the first application control, which in turn is determined based on the lifecycle of the application. That is, the system control is valid while the application is running.
[0146] For example, as shown in FIG8 , S701 may specifically include: ① When an application is launched or when an application launches a designated application interface, the control loading module of the application loads a 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 to the control management service of the electronic device to load a system control.
[0147] Exemplarily, when an application is started, the control layout container determines that a target control exists among the application's controls, or when an application starts a specified application interface, the control layout container determines that a target control (such as the first application control described above) exists in the specified application interface. The target control is the control used to trigger the acquisition of the first information. The control layout container sends a request to the control management service of the electronic device to load the system control, 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 can create a system control based on the attribute information of the target control and display the system control on the application interface of the application overwriting / replacing the target control.
[0148] For example, in a shopping app, when a user clicks a control for adding a shipping address displayed on the app's interface, the app's control loading module loads a control layout container. The control layout container determines the target controls on the add shipping address interface. These target controls include Control 1 for triggering the acquisition of location information and Control 2 for triggering the acquisition of user information. The control layout container then sends a first request to the electronic device's control management service to load system controls. This first request carries the attribute information for Control 1 and Control 2.
[0149] 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.
[0150] S702: The electronic device displays a first window according to the attribute information of the first application control, and the first window displays the system control.
[0151] 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. Specifically, as shown in FIG8 , the control information unit of the control management service can determine the size of the system control based on 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 based on 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 based on the style information of the first application control.
[0152] In some examples, the extended control module of the electronic device creates the first window based on the attribute information of the first application control. Specifically, as shown in FIG8 , S702 may specifically be: ④ The control management service sends a second request to the extended control module of the electronic device, the second request being used to request the creation of the first window, the second request carrying the position information and size information of the first application control. The window creation unit in the extended control module creates the first window based on the position information and size information of the first application control.
[0153] Continuing with the above example, the electronic device's control management service 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 electronic device's control management service 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.
[0154] In some examples, the electronic device displays the system control in the first window, which can be specifically implemented as follows: as shown in FIG8 , ⑤ the window loading unit of the extended control module loads the system control onto the first window, that is, displays the system control in the first window.
[0155] Continuing with the above example, the system control obtained in S702 is loaded onto the first window, resulting in the display effect shown in FIG3 . As shown in FIG3 , control 303 is displayed overlaid at the location of control 1. That is, control 1 is obscured by control 303 in FIG3 . The size, style, and position of control 303 are all determined based on the attribute information of control 1. As shown in FIG3 , control 305 is displayed overlaid at the location of control 2. For example, control 2 is obscured by control 305 in FIG3 . The size, style, and position of control 305 are all determined based on the attribute information of control 2.
[0156] 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:
[0157] In the second stage, application permissions are managed based on system controls.
[0158] S703: The electronic device receives a first operation on a system control on a first window of an application.
[0159] The first operation can be understood as a triggering 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.
[0160] Specifically, as shown in FIG8 , 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.
[0161] Continuing with the above example, when the user is adding a delivery address, the user can click on the control 303 shown in Figure 3. Similarly, when the user is adding recipient information, the user can click on the control 305 shown in Figure 3.
[0162] 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: For example, 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:
[0163] S704: In response to the first operation, the electronic device performs security verification on the operation event corresponding to the first operation.
[0164] 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, etc.
[0165] Specifically, as shown in Figure 8, S704 can be specifically as follows: ⑦ 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.
[0166] 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.
[0167] As shown in FIG8 , S704 may specifically be as follows: (10) After the event filtering unit determines that the operation event is a security event, the permission request unit of the extended control module obtains a first permission. The first permission may be, for example, access permission / acquisition permission for the first information. 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 based on the attribute information of the operation event. 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.
[0168] Continuing with the above example, when the user clicks on the control 303 shown in FIG3 , the extended control module in the operating system of the electronic device performs a 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 permission to obtain 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 on the control 305 shown in FIG3 , the extended control module in the operating system of the electronic device performs a 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 permission to obtain user information. After obtaining the permission, the extended control module in the operating system of the electronic device executes S705.
[0169] S705: The electronic device obtains first information.
[0170] Specifically, as shown in FIG8 , After the verification is passed, the information acquisition unit of the extended control module acquires the first information according to the first authority.
[0171] Exemplarily, after obtaining 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 location information in real time. Alternatively, after obtaining permission for obtaining location information, the extended control module in the operating system of the electronic device obtains 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 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 location information of shopping malls that the user frequently visits.
[0172] Exemplarily, after obtaining permission to obtain user information, the extended control module in the operating system of the electronic device obtains default user information. For example, in a 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 default user information. Alternatively, after obtaining permission to obtain user information, the extended control module in the operating system of the electronic device obtains historical user information. For example, in a 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.
[0173] S706: The electronic device sends the first information to the application. Correspondingly, the application receives the first information.
[0174] Specifically, as shown in FIG8 , The information acquiring unit may send the first information to the information monitoring module of the application through a sending unit (such as a callback interface).
[0175] 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.
[0176] S707: The application displays the first information.
[0177] Specifically, as shown in FIG8 , After the information monitoring module monitors the first information, the information monitoring module sends the first information to the control layout container for display.
[0178] Continuing with the above example, after the application receives the first message, the electronic device displays interface 301 shown in FIG5 . On this interface, default consignee information, such as "Xiao A," is displayed in the consignee input box. In addition, consignee Xiao A's associated information (such as the mobile phone number "12345678910") is displayed in the mobile phone input box. On this interface, default location information, such as "Province A, City B, District C," is displayed in the region input box.
[0179] The following describes in detail the method for application permission management based on system controls provided in the embodiments of the present application for specific application scenarios:
[0180] Scenario 1: Acquisition of location information.
[0181] For example, the above application is a shopping application, and when the application is running, the user needs to add a delivery address. The electronic device performs the above-mentioned first stage operation, and at this time, the electronic device 100 displays the interface 301 as shown in Figure 3. The 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 above-mentioned second stage operation, and at this time the electronic device can obtain multiple addresses, such as the multiple addresses displayed in the window 307 shown in Figure 4-1. When the user selects the address "Building E, Community D, District C, City B, Province A", the electronic device displays the interface 301 as shown in Figure 5, and "District C, City B, Province A" is displayed in the address input box 302 on the interface 301.
[0182] It should be understood that the system control 303 shown in Figure 3 overrides / 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. The electronic device's operating system performs security verification on the click event corresponding to the click operation, obtains the location information, and sends the location information to the application for presentation to the user. When the user does not need to obtain location information, the user does not operate the system control, the electronic device's operating system does not obtain permission to obtain location information, and does not obtain location information.
[0183] Scenario 2: User information acquisition.
[0184] Similarly, the user needs to add the consignee information. The electronic device performs the operations of the first stage described above. At this time, the electronic device 100 displays the interface 301 shown in Figure 3. A system control 305 for obtaining user information is displayed on this interface 301. When the user clicks the system control 305, the electronic device 100 performs the operations of the second stage described above. At this time, the electronic device sends the first information obtained, such as the first information "Xiao A" and "Xiao A's mobile phone number is 12345678910", to the application. The application displays the interface 301 shown in Figure 5. On this interface 301, "Xiao A" is displayed in the consignee input box 304, and "12345678910" is displayed in the mobile phone number input box. It can be seen that compared with the prior art, the system control 303 shown in Figure 3 covers / replaces the first application control for obtaining user information on the application. When the user needs to obtain user information, the user clicks the system control. The operating system of the electronic device performs security verification on the click event corresponding to the click operation, obtains the 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 to obtain user information, and will not obtain user information.
[0185] 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.
[0186] 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 of users and reducing information security risks.
[0187] Furthermore, electronic devices no longer need to prompt users to grant permissions to applications through pop-up windows on the application interface, effectively preventing the interference of multiple pop-up windows on the user. Furthermore, user operation events on system controls are directly transmitted to the electronic device's operating system, which processes them (such as filtering and security verification). This allows operation events to bypass application processing, preventing applications from impersonating operation events, and fundamentally preventing the problem of operation event impersonation, thereby improving the security of controls.
[0188] 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 by each other. The technical features in different embodiments can be combined to form new embodiments based on their internal logical relationships.
[0189] The embodiment of 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. For example, please refer to Figure 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.
[0190] Display module 110 is used to display the first interface of the application, which includes system controls. The application runs in a first process, and the system controls run in a second process, which is different from the first process. Exemplarily, display unit 1330 may perform step S702 above. Display module 110 may be display screen 270 shown in FIG6 .
[0191] The first receiving module 120 is configured to receive a first operation on a system control. For example, the first receiving module 120 may execute the above-mentioned step S703. The first receiving module 120 may be the touch sensor 280C shown in FIG6.
[0192] The acquisition module 130 is configured to acquire first information corresponding to the system control in response to the first operation. Exemplarily, the acquisition module 130 may execute the above steps S704-S705. The acquisition module 130 may be the processor 210 shown in FIG6.
[0193] The sending module 140 is used to send the first information to the application. For example, the sending module 140 can execute the above step S706. The sending module 140 can be an interface in the electronic device 100 shown in FIG6.
[0194] In some embodiments, the electronic device 100 further includes:
[0195] Second receiving module 150. The second receiving module 150 is configured to receive a first request sent by an application. The first request is configured to request the loading of a system control. The first request carries attribute information of a first application control corresponding to the system control. The first application control is a control in the application that triggers the acquisition of the first information. Exemplarily, the second receiving module 150 may execute step S701 above. The second receiving module 150 may be the processor 210 shown in FIG. 6 .
[0196] The display module 110 is configured to display a first window according to the attribute information of the first application control, wherein the first window displays the system control. Exemplarily, the display module 110 may execute the above step S702.
[0197] In some embodiments, the acquisition module 130 is used to: verify the authority of the system control; and when the authority of the system control is passed, obtain the first information.
[0198] 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.
[0199] 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 configured to display a second interface in response to an operation on the location system control, wherein the second interface displays multiple addresses. The sending module 140 is configured 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-described step S707.
[0200] 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 configured to display a third interface, displaying a map, in response to an operation on the location system control. The sending module 140 is configured to display information about the first location in the address input box in response to an operation on the first location on the map. For example, the display module 110 may execute step S707 above.
[0201] In one design, the first interface further includes a second application control; the electronic device 100 further includes an authorization module. The display module is configured 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 configured to grant the application permission corresponding to the authorization information in response to an operation on the confirmation control.
[0202] 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 of users and reducing information security risks.
[0203] Furthermore, electronic devices no longer need to prompt users to grant permissions to applications through pop-up windows on the application interface, effectively preventing the interference of multiple pop-up windows on the user. Furthermore, user operation events on system controls are directly transmitted to the electronic device's operating system, which processes them (such as filtering and security verification). This allows operation events to bypass application processing, preventing applications from impersonating operation events, and fundamentally preventing the problem of operation event impersonation, thereby improving the security of controls.
[0204] The embodiment of 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. For example, please refer to Figure 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,
[0205] Display module 1100 is used to display the first interface of the application, which includes system controls. The application runs in a first process, and the system controls run in a second process, which is different from the first process. Exemplarily, display module 1100 may perform step S702 above. Display module 1100 may be display screen 270 shown in FIG6 .
[0206] The window management unit 1210 is configured to receive a first operation on a system control. For example, the window management unit 1210 may execute the above step S703. The window management unit 1210 may be the touch sensor 280C shown in FIG6 .
[0207] The acquisition unit 1220 is configured to acquire first information corresponding to the system control in response to the first operation. Exemplarily, the acquisition unit 1220 may execute the above steps S704-S705. The acquisition unit 1220 may be the processor 210 shown in FIG6 .
[0208] The sending unit 1230 is configured to send the first information to the application. For example, the sending unit 1230 may execute the above-mentioned step S706. The sending unit 1230 may be an interface in the electronic device 100 shown in FIG6.
[0209] 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.
[0210] Receiving unit 1310 is configured to receive a first request sent by an application, the first request being configured to load a system control. The first request carries attribute information of a first application control corresponding to the system control. The first application control is a control in the application that triggers the acquisition of the first information. Exemplarily, receiving unit 1310 may execute step S701 above. Receiving unit 1310 may be processor 210 shown in FIG6 .
[0211] The control creation unit 1320 is configured to create a system control based on the attribute information of the first application control. For example, the control creation unit 1320 may execute the above-mentioned step S702. The control creation unit 1320 may be the processor 210 shown in FIG6.
[0212] The window creation unit 1240 is configured to create a first window according to the attribute information of the first application control. Exemplarily, the window creation unit 1240 may execute the above-mentioned step S702. The window creation unit 1240 may be the processor 210 shown in FIG6.
[0213] 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 the processor 210 shown in FIG6.
[0214] 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.
[0215] In some embodiments, the lifecycle of the system control is determined according to the lifecycle of the application.
[0216] 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.
[0217] In some embodiments, the acquisition unit 1220 further includes an event filtering unit 1221 and a permission requesting unit 1222.
[0218] The event filtering unit 1221 is configured 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 execute the above-mentioned step S704. The event filtering unit 1221 may be the processor 210 shown in FIG6 .
[0219] The permission request unit 1222 is configured to obtain a first permission based on 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 may perform the above-mentioned step S705. The permission request unit 1222 may be the processor 210 shown in FIG6.
[0220] In some embodiments, the acquisition unit 1220 may further include an information acquisition unit 1223. The information acquisition unit 1223 is configured to acquire the first information according to the first permission. Exemplarily, the information acquisition unit 1223 may execute the above-mentioned step S705. The information acquisition unit 1223 may be the processor 210 shown in FIG6.
[0221] 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 configured to display a second interface in response to an operation on the location system control, wherein the second interface displays multiple addresses. The acquisition unit 1220 is configured 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-described step S707.
[0222] 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 configured to display a third interface, wherein a map is displayed, in response to an operation on the location system control. The acquisition unit 1220 is configured to display information about 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-described step S707.
[0223] In one design, the first interface further includes a second application control; the electronic device further includes an authorization module. The display module is configured 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 configured to grant the application permission corresponding to the authorization information in response to an operation on the confirmation control.
[0224] In some examples, referring to FIG. 1 , the confirmation control may be control 104 or control 105 in FIG. 1 .
[0225] In some examples, referring to FIG. 2 , the confirmation control may be control 204 or control 205 in FIG. 2 .
[0226] 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 of users and reducing information security risks.
[0227] Furthermore, electronic devices no longer need to prompt users to grant permissions to applications through pop-up windows on the application interface, effectively preventing the interference of multiple pop-up windows on the user. Furthermore, user operation events on system controls are directly transmitted to the electronic device's operating system, which processes them (such as filtering and security verification). This allows operation events to bypass application processing, preventing applications from impersonating operation events, and fundamentally preventing the problem of operation event impersonation, thereby improving the security of controls.
[0228] 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.
[0229] An embodiment of the present application also provides a computer-readable storage medium, comprising instructions, which, when executed on a computer, enables the computer to execute any of the above methods.
[0230] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the above methods.
[0231] 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.
[0232] All or part of any features or steps in the various embodiments of the present application may be freely combined, and the combined technical solutions are also within the scope of the present application.
[0233] 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 can 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 "a plurality" means two or more. Words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not limit them to be necessarily different.
[0234] In the description of this 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 this application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0235] 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.
[0236] In the several embodiments provided in this 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 merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, 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.
[0237] The units described as separate components may or may not be physically separate, 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 places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0238] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0239] 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 and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0240] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection 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 the memory stores codes; when the codes are executed by the processor, the electronic device executes the method according to any one of claims 1 to 7.
16. A computer-readable storage medium, characterized in that: The method comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Application permission management and control method based on system control and electronic equipment
CN118568705A
Immediate access conferring method aiming at low interference of mobile platform
CN103116716A
Method for protecting user privacy data and terminal
CN107341406A
Method and system for controlling sensitive data request
CN107426435A
