WO2022160991A1 - Permission control method and electronic device - Google Patents

Permission control method and electronic device Download PDF

Info

Publication number
WO2022160991A1
WO2022160991A1 PCT/CN2021/138388 CN2021138388W WO2022160991A1 WO 2022160991 A1 WO2022160991 A1 WO 2022160991A1 CN 2021138388 W CN2021138388 W CN 2021138388W WO 2022160991 A1 WO2022160991 A1 WO 2022160991A1
Authority
WO
WIPO (PCT)
Prior art keywords
permission
application
electronic device
target
authority
Prior art date
Application number
PCT/CN2021/138388
Other languages
French (fr)
Chinese (zh)
Inventor
廖晓锋
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022160991A1 publication Critical patent/WO2022160991A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Definitions

  • the present application relates to the field of electronic technology, and in particular, to an authority control method and an electronic device.
  • the embodiments of the present application provide an authority control method and an electronic device, which can greatly improve a user's experience when using an application program.
  • an embodiment of the present application provides a permission control method.
  • the method is executed by an electronic device and includes: acquiring a permission request initiated by an application, where the permission request carries the identification information of the target permission applied for by the application; displaying the corresponding permission request
  • the selection prompt interface includes the selection option and the recommendation result corresponding to the permission request, the selection option includes the allow option and the prohibit option, and the recommendation result includes the recommendation degree of granting the target permission to the application; in response to the user's selection operation on the selection option , grant the target permission to the application, or not grant the target permission to the application.
  • the application can initiate a permission request during the installation process, or when it runs for the first time, or during the running process
  • the identification information of the target permission can include the name or logo of the target permission, etc.
  • the target permission can include phone calls, text messages, contacts, calls, etc.
  • Permissions involving user privacy information such as recording, camera, location information, microphone, calendar, floating window, and opening third-party application requests.
  • the electronic device can display a selection prompt interface corresponding to the permission request, including displaying selection options and recommendation results.
  • the recommendation degree can be a percentage, score, text or other display forms. The recommendation level allows the user to quickly make a choice whether to grant the target permission to the aforementioned application.
  • the electronic device may also play the recommendation result in the form of voice, which is not limited in this embodiment. If the user selects the allow option, the electronic device grants the target permission to the application, and if the user selects the prohibit option, the electronic device does not grant the target permission to the application.
  • the electronic device may determine the recommendation result corresponding to the permission request according to the name of the application and the identification information of the target permission.
  • the electronic device may store the correspondence between different application names and grantable permissions, and then according to the above-mentioned application names, as well as the preset application name and the correspondence between the grantable permissions. , determine the identification information of the grantable permissions of the application, and then determine the recommendation result corresponding to the permission request by matching the identification information of the grantable permissions of the application with the identification information of the target permissions.
  • the electronic device can obtain the selection results of the target permission by different users.
  • the electronic device may determine a recommendation degree for granting the target permission to the application according to the ratio.
  • the electronic device can give the user a reference on the selection of the permission by displaying the recommendation degree of the target permission granted to the application to the user, so that the user has better reference information when selecting, which can greatly improve the user's ability to use the application. program experience.
  • the recommendation result further includes a recommendation degree of not granting the target permission to the application.
  • the electronic device can simultaneously display to the user a recommendation level (eg, 90%) for granting the target permission to an application and a recommendation level (eg, 10%) for not granting the target permission to the application, for example, in Displaying "90%" next to the allowed option and "10%” next to the forbidden option can make the user more clearly understand the reference information about the permission selection, and further improve the user's experience when using the application.
  • a recommendation level eg, 90%
  • a recommendation level eg, 10%
  • the selection option further includes a virtual permission option
  • the recommendation result further includes a recommendation degree for granting the target virtual permission to the application.
  • the user may affect the normal use of the application. For example, if the user chooses to prohibit granting the camera permission to a camera application, the application will Camera function cannot be implemented. If the user chooses to allow the target permission to be granted to the application, but is concerned about the leakage of private information, for example, the user allows the permission to obtain location information to a camera application, the application can continuously obtain the location information of the electronic device, and there is security hidden danger. Therefore, the above recommendation result also includes the recommendation degree of granting the target virtual permission to the application, and displays the recommended program next to the virtual permission option.
  • the virtual information can be generated by: for example, randomly changing the real location information of the electronic device, or uniformly changing it to the default location, or encrypting the real location information to generate corresponding virtual location information.
  • the information is fused with the generated virtual location information again to generate new virtual location information.
  • the user's privacy can be further protected on the basis of improving the user's experience.
  • displaying the selection prompt interface corresponding to the permission request includes: sequentially displaying the selection prompt interface corresponding to each permission request; or, simultaneously Displays the selection prompt interface corresponding to multiple permission requests.
  • the electronic device sequentially displays the selection prompt interface for each permission request, the user can select each permission request in sequence, which can reduce the error rate of the user when selecting. If the electronic device simultaneously displays a selection prompt interface for multiple permission requests, the selection time of the user can be reduced and the selection efficiency can be improved.
  • the above method further includes: receiving a permission switching operation input by the user for the application program; in response to the permission switching operation, switching the first permission category that has been granted to the application program to the second permission category,
  • the first permission class is the target permission
  • the second permission class is the target virtual permission
  • the second permission class is the target permission
  • the user uses an application and grants a virtual permission (ie, the first permission category) to the A permission applied for the application.
  • a virtual permission ie, the first permission category
  • the user uses the application for a period of time, he feels that the application can be used. The reliability is high, and you want to switch the virtual permission of A to the real permission (ie, the second permission category).
  • the user uses another application and grants the real permission (that is, the first permission category) to the B permission applied for by the application.
  • the electronic device also provides a switching interface between real permissions and virtual permissions.
  • users can switch between real permissions and virtual permissions for applications in real time, providing a switchable operation for the user's permission granting. Under the premise of protecting user privacy and security, the user experience is further improved.
  • the method for determining the recommendation result corresponding to the permission request includes: obtaining the application type corresponding to the application; and determining the recommendation result corresponding to the permission request according to the application type and identification information of the target permission.
  • the electronic device can obtain the classification information, introduction information or comment information of the above-mentioned application program from the application market, and obtain the application type of the application program by analyzing the information.
  • the electronic device may locally store the correspondence between the application program and the application type, and directly obtain the application type through the correspondence.
  • the electronic device determines the corresponding recommendation result according to the application type and the identification information of the target authority for display, and can give the user a reference about the authority selection, so that the user has better reference information when choosing. , which can improve the user's experience when using the application.
  • determining the recommendation result corresponding to the permission request according to the identification information of the application type and target permission includes: inputting the identification information of the application type and target permission into a preset machine learning model, and determining the permission request corresponding recommendation results.
  • the identification information of the application type and target authority is processed by training a converged machine learning model, and the corresponding recommendation result is obtained, which can improve the reliability of the obtained recommendation result, so that the user can choose when choosing. It has better reference information to further improve the user's experience when using the application.
  • the recommendation result corresponding to the permission request is determined according to the application type and the identification information of the target permission, including: according to the application type, the corresponding relationship between the preset application type and the grantable permission , determine the identification information of the grantable permission of the application; determine the recommendation result corresponding to the permission request according to the identification information of the grantable permission and the identification information of the target permission.
  • the electronic device determines the identification information of the grantable authority of the application by setting the corresponding relationship between the application type and the grantable authority, and then determines according to the identification information of the information and the target authority.
  • the recommendation result corresponding to the permission request can improve the reliability of the determined recommendation result, so that the user has better reference information when selecting, and further improves the user's experience when using the application.
  • the recommendation result corresponding to the permission request is determined according to the identification information of the grantable authority and the identification information of the target authority, including: according to the identification information of the grantable authority and the identification information of the target authority, Determine the first coefficient corresponding to the target authority.
  • the first coefficient is the first preset value.
  • the grantable authority does not include the target authority, the first coefficient is the application that has applied for the target authority.
  • the proportion of the program in the permission set is the set of the reference application and the permission applied for by the reference application.
  • the application type of the reference application is the same as the application type of the application; the second coefficient is determined according to the first coefficient. , the sum of the first coefficient and the second coefficient is the second preset value; the second coefficient and the identification information of the target authority are input into the preset machine learning model to determine the recommendation result corresponding to the authority request.
  • the first coefficient may be a correlation coefficient
  • the second coefficient may be a vigilance coefficient.
  • the electronic device may first determine whether the grantable authority includes the target authority, and if so, the first coefficient may be set to a first preset value, such as 1 ; If not included, the first coefficient can be determined according to the proportion of the number of applications that have applied for the target permission in the permission set.
  • the second preset value may be 1, that is, the second coefficient is determined by using a relational expression of (1-first coefficient).
  • the electronic device may also input the first coefficient and the identification information of the target authority into the machine learning model to determine the above recommendation result.
  • a corresponding recommendation result can be obtained, which can further improve the obtained recommendation result.
  • the reliability of the application allows users to have better reference information when choosing, and further improves the user's experience when using the application.
  • an embodiment of the present application provides an apparatus, the apparatus is included in an electronic device, and the apparatus has a function of implementing the behavior of the electronic device in the above-mentioned first aspect and possible implementations of the above-mentioned first aspect.
  • the functions can be implemented by hardware, or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules or units corresponding to the above functions. For example, a processing module or unit, a display module or unit, and the like.
  • an embodiment of the present application provides an electronic device, the electronic device includes: a processor, a memory, and an interface; the processor, the memory, and the interface cooperate with each other, so that the electronic device executes any one of the methods in the technical solutions of the first aspect.
  • an embodiment of the present application provides a chip including a processor.
  • the processor is adapted to read and execute the computer program stored in the memory to perform the method of the first aspect and any possible implementations thereof.
  • the chip further includes a memory, and the memory is connected to the processor through a circuit or a wire.
  • the chip further includes a communication interface.
  • an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the processor is made to execute any one of the technical solutions of the first aspect. a way.
  • an embodiment of the present application provides a computer program product, the computer program product includes: computer program code, when the computer program code is run on an electronic device, the electronic device is made to perform any one of the technical solutions of the first aspect method.
  • Fig. 1 is the display schematic diagram of the permission request inquiry interface in the traditional technology
  • FIG. 2 is a schematic structural diagram of an example of an electronic device provided by an embodiment of the present application.
  • FIG. 3 is a block diagram of a software structure of an electronic device provided by an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of an example of an authority control method provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of an example of an interface for displaying a recommendation result provided by an embodiment of the present application
  • FIG. 5 is a schematic diagram of another example of an interface for displaying a recommendation result provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of another example of an interface for displaying a recommendation result provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of another example of an interface for displaying a recommendation result provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of another example of an interface for displaying a recommendation result provided by an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of another example of an authority control method provided by an embodiment of the present application.
  • FIG. 9 is a schematic flowchart of another example of an authority control method provided by an embodiment of the present application.
  • FIG. 10 is a schematic flowchart of another example of an authority control method provided by an embodiment of the present application.
  • FIG. 11 is a schematic diagram of an example of a process of data encoding for the applicable authority and the vigilance coefficient corresponding to the applicable authority provided by the embodiment of the present application;
  • FIG. 12 is a schematic diagram of another example of an interface for displaying a recommendation result provided by an embodiment of the present application.
  • FIG. 13 is a schematic flowchart of another example of an authority control method provided by an embodiment of the present application.
  • FIG. 14 is a schematic diagram of an example of an application setting interface provided by an embodiment of the present application.
  • FIG. 14 is a schematic diagram of an example of a virtual authorization assistant setting interface provided by an embodiment of the present application.
  • FIG. 14 is a schematic diagram of another example of a virtual authorization assistant setting interface provided by an embodiment of the present application.
  • FIG. 14 is a schematic diagram of an example of a designated application interface provided by an embodiment of the present application.
  • FIG. 14 is a schematic diagram of an example of an authority switching interface provided by an embodiment of the present application.
  • first”, “second” and “third” are only used for descriptive purposes, and should not be understood as indicating or implying relative importance or implying the number of indicated technical features. Thus, a feature defined as “first”, “second”, “third” may expressly or implicitly include one or more of that feature.
  • the permission control method provided by the embodiments of the present application can be applied to mobile phones, tablet computers, wearable devices, in-vehicle devices, augmented reality (AR)/virtual reality (VR) devices, notebook computers, and super mobile personal computers (ultra-mobile personal computer, UMPC), netbook, personal digital assistant (personal digital assistant, PDA) and other electronic devices that can install application programs, the embodiments of the present application do not make any restrictions on the specific types of electronic devices.
  • AR augmented reality
  • VR virtual reality
  • UMPC ultra-mobile personal computer
  • PDA personal digital assistant
  • the application will initiate some permission requests to the electronic device during the installation process, or during the use of the application, the user clicks a trigger button on the application interface After that, the application will initiate a corresponding permission request to the electronic device. For example, if the user clicks the camera button on the interface, the application will initiate a permission request to access the camera. Then, the electronic device will display the permission request inquiry interface of the application program (as shown in FIG. 1 ), at this time, the user needs to choose permission or prohibition according to his own judgment.
  • the authority control method and electronic device aim to solve the above technical problems.
  • FIG. 2 is a schematic structural diagram of an example of an electronic device 100 provided by an embodiment of the present application.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM Subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • graphics processor graphics processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the controller may be the nerve center and command center of the electronic device 100 .
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may contain multiple sets of I2C buses.
  • the processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate with each other through the I2C bus interface, so as to realize the touch function of the electronic device 100 .
  • the I2S interface can be used for audio communication.
  • the processor 110 may contain multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is typically used to connect the processor 110 with the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
  • the processor 110 communicates with the camera 193 through a CSI interface, so as to realize the photographing function of the electronic device 100 .
  • the processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the electronic device 100 .
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like.
  • the GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • the structures of the antenna 1 and the antenna 2 in FIG. 2 are only an example.
  • Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
  • the application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR).
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • Wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband code division Multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM , and/or IR technology, etc.
  • GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi-zenith) satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • Display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
  • the electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
  • the ISP is used to process the data fed back by the camera 193 .
  • the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • a digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG Moving Picture Experts Group
  • MPEG2 moving picture experts group
  • MPEG3 MPEG4
  • MPEG4 Moving Picture Experts Group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 .
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing the instructions stored in the internal memory 121 .
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
  • the audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also referred to as a "speaker" is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also referred to as "earpiece" is used to convert audio electrical signals into sound signals.
  • the voice can be answered by placing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
  • the earphone jack 170D is used to connect wired earphones.
  • the earphone interface 170D can be the USB interface 130, or can be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals.
  • the pressure sensor 180A may be provided on the display screen 194 .
  • the capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
  • the electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
  • the gyro sensor 180B may be used to determine the motion attitude of the electronic device 100 .
  • the angular velocity of electronic device 100 about three axes ie, x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the angle at which the electronic device 100 shakes, calculates the distance that the lens module needs to compensate for according to the angle, and allows the lens to counteract the shake of the electronic device 100 through reverse motion to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D.
  • the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).
  • the magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the electronic device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the electronic device 100 emits infrared light to the outside through the light emitting diode.
  • Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 .
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket, so as to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking pictures with fingerprints, answering incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 caused by the low temperature.
  • the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the voice part vibrating bone mass obtained by the bone conduction sensor 180M, so as to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
  • the keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key.
  • the electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
  • Motor 191 can generate vibrating cues.
  • the motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback.
  • touch operations acting on different applications can correspond to different vibration feedback effects.
  • the motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be contacted and separated from the electronic device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 .
  • the electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. Multiple cards can be of the same type or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication.
  • the electronic device 100 employs an eSIM, ie: an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiments of the present application take an Android system with a layered architecture as an example to exemplarily describe the software structure of the electronic device 100 .
  • FIG. 3 is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
  • the application layer can include a series of application packages.
  • the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and so on.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
  • Content providers are used to store and retrieve data and make these data accessible to applications.
  • Data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications.
  • a display interface can consist of one or more views.
  • the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
  • the phone manager is used to provide the communication function of the electronic device 100 .
  • the management of call status including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
  • the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
  • the Android runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
  • the core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
  • a system library can include multiple functional modules. For example: surface manager (surface manager), media library (media library), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • surface manager surface manager
  • media library media library
  • 3D graphics processing library eg: OpenGL ES
  • 2D graphics engine eg: SGL
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still 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.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
  • FIG. 4 is a schematic flowchart of an example of a permission control method 200 provided by an embodiment of the present application. The method includes:
  • S201 Acquire a permission request initiated by an application, where the permission request carries identification information of a target permission applied for by the application.
  • the application can initiate a permission request during the installation process, or when it is run for the first time, or during the running process, and the permission request can carry the identification information of the target permission applied for by the application, such as the name or ID of the target permission.
  • the navigation application will initiate a permission request to obtain the location information of the electronic device.
  • "Location Information" can be the name of the target permission
  • the identifier "AddID" corresponding to the location information can be the ID of the target permission. .
  • the target permissions may include permissions related to user privacy information, such as phone calls, text messages, contacts, call records, cameras, location information, microphones, calendars, floating windows, and requests to open third-party applications.
  • the electronic device can also obtain the application type corresponding to the application. Classification information or profile information of the application to determine its application type; or, the electronic device can analyze the name of the application to determine its application type; or, the electronic device can obtain the application type in the application market or application store.
  • the review information of the application, and the application type of the application is determined by analyzing the review information.
  • the electronic device may call a database interface or script interface corresponding to the application market according to the identifier (eg, ID) or name of the application program to obtain classification information, profile information or comment information about the application program in the application market.
  • an application if its profile information in the application market includes a description of "brand special sale, quality assurance", it can be determined that the application type corresponding to the application is shopping. For an application whose name is “SS Map”, the corresponding application type can be determined by its name as a positioning navigation class. For an application, if the comment area of the application in the application market includes the comment information of "being able to show one's talents and meet more friends", then it can be determined that the application type corresponding to the application is social.
  • a corresponding relationship between an application and an application type can also be established in the electronic device, such as a database or a data table, etc. If the application that initiates the above permission request is in this corresponding relationship, its application type can be directly obtained. ; If the application that initiates the above permission request is not in this corresponding relationship, its application type can be obtained through the above method.
  • S203 Determine a recommendation result corresponding to the permission request according to the application type and the identification information of the target permission, where the recommendation result includes a recommendation degree for granting the target permission to the application.
  • the electronic device can obtain the reference permission set granted by other application programs of the same type, and then match the target permission applied for by the above-mentioned application program with the reference permission in the reference permission set one by one, For example, the name of the target permission is matched with the name of each reference permission one by one. If there is a match between the reference permission and the target permission, the user can be recommended to grant the target permission to the application. If the reference permission does not match the target permission, then The user can be recommended not to grant the target permission to the application.
  • another electronic device can obtain the reference permission information of the application from the server. get.
  • the application type of an application is a positioning and navigation class
  • the reference permissions granted by other applications of the positioning and navigation class obtained by the electronic device from the server include A, B, and C. If the target permission applied for by the application is A, it can be determined that the recommendation degree that allows granting the target permission is 100%; if the target permission applied for by the application is D, it can be determined that the recommendation degree that allows granting the target permission is 0 %, that is, the recommendation level that prohibits granting the target permission is 100%.
  • the recommendation for granting the target permission to the application can be shown to the user.
  • the degree of recommendation is shown in this embodiment by taking the recommendation degree as a percentage as an example, but the recommendation degree may also be shown in scores, text or other forms, and this embodiment does not limit the display form of the recommendation degree.
  • the recommendation degree of granting the target permission to the application program and the recommendation degree of not granting the target permission to the application program can be displayed to the user at the same time. Then, the user can make a selection according to the recommendation result. If the user chooses to allow, the electronic device grants the target permission to the application, and if he chooses to prohibit, the electronic device does not grant the target permission to the application.
  • the electronic device can assign an identifier to the target permission in advance, and assign the same identifier to the recommendation result corresponding to the target permission.
  • the recommendation result may be displayed on the request prompt interface with the target authority with the same identifier.
  • the electronic device can sequentially display the recommendation results corresponding to each target authority, that is, firstly display the recommendation results corresponding to the first target authority, and then display the recommendation corresponding to the second target authority after the user selects result, and so on.
  • the electronic device can simultaneously display the recommendation result corresponding to each target authority, and the user can complete the selection of multiple recommendation results in one display interface.
  • a “select all” button can also be provided.
  • the electronic device can jump to the figure (b) in FIG. 7 for the user to choose whether to allow all or all to prohibit, thereby reducing the number of selections by the user and improving the user's experience.
  • the electronic device can give the user a reference on the permission selection by showing the user the recommendation degree of the target permission granted to the application program, so that the user has better reference information when selecting the application program, which can improve the user's ability to use the application program. experience.
  • the electronic device can also use the trained machine learning model to classify the application type of the application and the identification information of the target permission, and obtain the recommendation result corresponding to the permission request.
  • Another example of a schematic flowchart of an authority control method 300 provided by the embodiment, the method includes:
  • S301 Acquire a permission request initiated by an application, where the permission request carries identification information of a target permission applied for by the application.
  • S303 Input the identification information of the application type and target authority into a preset machine learning model, and obtain a recommendation result corresponding to the authority request, where the recommendation result includes a recommendation degree for granting the target authority to the application.
  • the machine learning model may be a neural network model, a classifier model, or other learning models, which are not limited in this embodiment.
  • the machine learning model can be a random forest classifier, and the electronic device inputs the identification information of the application type and target permission into the random forest classifier, and the recommendation result corresponding to the permission request can be obtained. .
  • the training process of the random forest classifier can be performed by the server. First, a large number of application samples are obtained, and the application type of each application sample is correspondingly obtained, and then the application type of each application sample and the available application type are obtained. The permission application information is input into the initial random forest classifier for classification training until the convergent random forest classifier is obtained.
  • the server may also obtain the selection results of the permissions applied by different users for each application sample (for example, for a certain application sample, 90% of users choose to grant A permission to it), then the server The random forest classifier can also be trained according to the application type of the application sample and the user's selection results.
  • the server may also obtain, according to the user ID, the selection result of the permissions applied by the current user for each application sample during the use of the electronic device, and then obtain the selection result according to the user ID, the application type of the application sample, and the user's selection.
  • the results train a random forest classifier. For example, if a user has granted permission to access location information to all navigation application samples, when another navigation application applies for this permission, it may be recommended to grant the application permission to access location information.
  • step S304 For the implementation process of step S304, reference may be made to the above-mentioned S204, and details are not repeated here.
  • the above authority control method processes the identification information of the application type and target authority by training a converged machine learning model, and obtains the corresponding recommendation result, which can improve the reliability of the obtained recommendation result, so that the user has a better choice when choosing. Reference information to further improve the user's experience when using the application.
  • the electronic device or server may also first store the correspondence between different application types and the predicted grantable permissions, for example, in a data table, database, etc. Determine the recommendation result corresponding to the application that initiated the permission request.
  • the predicted grantable permissions may be determined based on factors such as experience, application functionality, and user needs.
  • FIG. 9 is a schematic flowchart of another example of a permission control method 400 provided by an embodiment of the present application, and the method includes:
  • S401 Acquire a permission request initiated by an application, where the permission request carries identification information of a target permission applied for by the application.
  • S404 Determine a recommendation result corresponding to the permission request according to the identification information of the grantable permission of the application and the identification information of the target permission, where the recommendation result includes a recommendation degree for granting the target permission to the application.
  • the electronic device or server since the electronic device or server stores the correspondence between the application type and the grantable permission, for the application program that initiates the permission request, the electronic device can obtain the corresponding grantable permission identification information according to the application type.
  • the application type of an application is social, and the electronic device can obtain the grantable permissions of the application through the corresponding relationship between the application type and the grantable permissions, including E, F, and G.
  • the electronic device can match the identification information of the determined grantable permission with the identification information of the target permission applied for by the above application, and if there is a match between the grantable permission and the target permission, it can recommend the user to the application Grant the target permission. If there is no grantable permission matching the target permission, you can recommend the user not to grant the target permission to the application.
  • the process of determining the recommendation degree reference may be made to the example in S203 in the foregoing embodiment, and details are not repeated here.
  • step S405 for the implementation process of step S405, reference may be made to the foregoing S204, which will not be repeated here.
  • the electronic device may also store the correspondence between different application program names and the grantable permissions. If the permission request in the above S401 carries the application program name, the The step may be replaced by the following implementation manner: determining the identification information of the grantable permission of the above application program according to the application program name and the corresponding relationship between the preset application program name and the grantable permission.
  • the electronic device determines the identification information of the grantable authority of the application program by setting the corresponding relationship between the application type and the authority that can be granted, and then determines that the authority request corresponds to the identification information according to the identification information and the identification information of the target authority.
  • the recommended result can improve the reliability of the determined recommendation result, so that the user has better reference information when selecting, and further improves the user's experience when using the application.
  • FIG. 10 is a schematic flowchart of another example of an authority control method 500 provided by an embodiment of the present application. The method includes:
  • S501 Acquire a permission request initiated by an application, where the permission request carries identification information of a target permission applied for by the application.
  • S504 Determine a vigilance coefficient corresponding to the target authority according to the identification information of the grantable authority of the application and the identification information of the target authority.
  • a smaller alert coefficient may be set, and if the grantable authority does not include the target authority, a larger alert coefficient may be set.
  • the electronic device may first perform correlation calculation on the identification information of the grantable authority and the identification information of the target authority to obtain the correlation coefficient corresponding to the target authority, and then calculate the corresponding vigilance coefficient according to the obtained correlation coefficient.
  • Table 1 it is assumed that the target permissions applied by the above application are A, B, D and Y, and the grantable permissions of the application are B, C and D. If the target permissions are among the grantable permissions, then The correlation coefficient is 1 (indicating that the target permission is a common permission of this type of application); if the target permission is not among the permissions that can be granted, calculate the set of permissions applied by the application that has applied for the target permission in all such applications.
  • the proportion of the number in the middle (statistics under big data), and the proportion of the number is used as the correlation coefficient; among them, when an application initiates a permission request to an electronic device, the electronic device can apply for the permission of the application. If the identification information is sent to the server, the server can store the corresponding relationship between the application and the identification information of the requested permission, and make statistics on the permissions applied for by the same type of application. For example, count the number of T-type applications. How many applications have applied for permission A, how many applications have applied for permission Y, etc.
  • the correlation coefficient of the Y permission is 0. If 50% of the 100 applications of this type apply for the A permission, the correlation coefficient of the A permission is 0.5; from this, the correlation coefficients corresponding to the target authority can be obtained through correlation calculation: A: 0.5, B; 1, D; 1, Y: 0; then the target is calculated by using the relational formula of (1-correlation coefficient)
  • the vigilance coefficients corresponding to permissions are A: 0.5, B; 0, D; 0, Y: 1.
  • the electronic device can input the vigilance coefficient and the identification information of the target authority into the machine learning model for processing, so as to obtain the recommendation result corresponding to the above-mentioned authority request.
  • the machine learning model can also be a random forest classifier, and the training process of the classifier can be as follows:
  • the permissions B, E, G, and I correspond to The vigilance coefficients are 0.5, 0.8, 0.3, 0.9, set the same size matrix or other forms of data sets
  • the first matrix sets the positions of permissions B, E, G, I to 1, other positions are set to 0,
  • the second The position of authority B, E, G, and I is set as the corresponding vigilance coefficient for each matrix, and the other positions are set to 0, and then the two matrices are normalized, such as average summation, weighted summation, etc. (this implementation The average summation is shown as an example), and the coding result is obtained as a sample set.
  • a coefficient threshold (such as 0.9) may also be set. If the obtained alertness coefficient of the target authority is less than the coefficient threshold, the electronic device will input the alertness coefficient and information of the target authority into the machine learning model , get the recommended result. If the obtained vigilance coefficient of the target authority is greater than or equal to the coefficient threshold, it can be directly determined that the recommendation result is that the target authority is not granted to the application, that is, the recommendation degree of granting the target authority is 0%. Thereby, the calculation amount of the electronic device can be reduced, and the calculation efficiency can be improved.
  • step S506 For the implementation process of step S506, reference may be made to the above-mentioned S405, which will not be repeated here.
  • the above authority control method by setting a vigilance coefficient, and comprehensively processing the vigilance coefficient and the identification information of the target authority by training a convergent machine learning model, to obtain a corresponding recommendation result, which can further improve the reliability of the obtained recommendation result.
  • This enables the user to have better reference information when selecting, and further improves the user's experience when using the application.
  • a positioning and navigation application initiates an application for permission to obtain the location information of electronic devices, but the user only wants to view the route from the WW Building to the TT Building, and does not need to upload their own location information. If the user chooses to prohibit If the app is granted the permission to obtain location information, the app may close abnormally, and if the user chooses to allow the app to be granted the permission to obtain location information, they are concerned that private information will be leaked.
  • the recommendation results obtained in the above-mentioned embodiments may also include the degree of recommendation for granting virtual permissions to applications; wherein, the electronic device may first generate a virtual permission environment, and optionally, a sandbox (Sandboxie ) to create the above-mentioned virtual authority environment, of course, the above-mentioned virtual authority environment can also be created in other ways, which is not limited here; because the virtual authority environment is actually a virtual image of the real authority environment, when the virtual environment is started for the first time, the virtual authority environment The data stored in the virtual rights is empty, therefore, corresponding virtual rights information needs to be generated for the above virtual rights.
  • a sandbox Sandboxie
  • the electronic device can randomly change the real location information of the electronic device, or uniformly change it to the default location, or encrypt the real location information to generate corresponding virtual location information.
  • the real location information can also be It is fused with the generated virtual position information again to generate new virtual position information.
  • the electronic device can obtain the recommendation degree of granting the target real permission to the application program, the recommendation degree of granting the target virtual permission to the application program, and the recommendation degree of not granting the target permission to the application program corresponding to the permission request, and display it to The user makes a selection.
  • the electronic device If the user chooses to grant the real permission, the electronic device outputs the current real location information to the application; if the user chooses to grant the virtual permission, the electronic device outputs the virtual location information generated by randomly changing the real location information to the application
  • the program for example, the current real location information of the electronic device is ZZ Building, and the electronic device can randomly change the real location information ZZ Building to KK Street, etc.; if the user chooses to prohibit granting permission, the application cannot obtain the location information of the electronic device.
  • the user's privacy can be further protected on the basis of improving the user's experience.
  • the recommendation result displayed by the electronic device to the user may include at least one of the recommendation degree of granting the target real permission to the application, the recommendation degree of granting the target virtual permission to the application, and the recommendation degree of not granting the target permission to the application. two.
  • the user uses an application and grants a virtual permission to the A permission applied for by the application. After using the application for a period of time, the user feels that the application is highly reliable and wants to Switch A's virtual permissions to real permissions. Or the user uses another application and grants the real permission to the B permission applied for by the application. When the user uses the application for a period of time, he feels that there is no need to grant the real permission, and wants to switch the real permission of B to the virtual one. permissions.
  • this embodiment also provides an implementation process for switching between real rights and virtual rights. As shown in FIG. 13 , the process may include:
  • S601 Receive an authority switching operation input by a user for an application program, and respond to the authority switching operation.
  • S603 switch the access environment of the application to the real permission environment, and grant the real permission to the application.
  • S604 Generate a virtual permission environment, switch the access environment of the application to the virtual permission environment, and grant the virtual permission to the application.
  • FIG. 14 shows the application setting interface of the electronic device
  • the user clicks the "Virtual Authorization Assistant" button on the interface he can jump to the interface in Fig. 14 (b)
  • the The interface is an interface where the virtual authorization function is not enabled on the electronic device. If the user wants to enable the virtual authorization function of the electronic device, he can click the switch icon 21 to enable the virtual authorization function.
  • the display interface after the virtual authorization function is turned on refer to the (c) diagram interface in FIG. 14 , on which the relevant virtual authorization information can be configured, including: the generation method of the virtual information (referred to as the virtual method, such as performing the real information on the display interface).
  • the electronic device switches the application access environment to the real permission environment, and at this time allows the application 1 to access real photos, media content and file information.
  • the virtual permission function of the "storage" permission is not enabled for Application 2, that is, Application 2 can obtain real photos, media content and file information on the electronic device. If the user wants to switch the permission to a virtual permission, he can directly click the switch icon 25 to enable the virtual permission function.
  • the electronic device After receiving the opening instruction input by the user, the electronic device first generates a virtual permission environment and corresponding virtual permission information according to the method of the above embodiment. In this embodiment, the electronic device can randomly change the real photos, media content and file information, or uniformly change the default content to generate corresponding virtual photos, media content and file information, and then the electronic device switches the application access environment To the virtual rights environment, application 2 is now allowed to access virtual photos, media content and file information.
  • the above permission control method through the introduction of a virtual authorization switch, enables users to switch between real permissions and virtual permissions for applications in real time, providing a switchable operation for the user's permission granting, and on the premise of protecting user privacy. user experience.
  • the SS map application initiates a permission request to the electronic device for obtaining the location information of the electronic device.
  • the electronic device analyzes the name of the SS map application, and determines that its application type is a positioning and navigation class. Then, according to the correspondence between the application type and the grantable permissions, the electronic device can obtain the grantable permissions of the positioning and navigation application, including the permission to obtain the location information of the electronic device, the permission to obtain the microphone of the electronic device, and the access to the storage information of the electronic device. permission.
  • the electronic device performs a correlation calculation on the authority applied by SS Map to obtain the location information of the electronic device and the obtained grantable authority, and judges that the applied authority for obtaining the position information of the electronic equipment is included in the grantable authority, then It is determined that the correlation coefficient corresponding to the applied authority to obtain the location information of the electronic device is 1, and then the corresponding vigilance coefficient is determined to be 0. Then, the electronic device inputs the vigilance coefficient and the permission information for obtaining the location information of the electronic device into the random forest classifier, and obtains the recommendation result corresponding to the permission request initiated by the above-mentioned SS map, including granting the SS map the real permission to obtain the location information of the electronic device.
  • the recommendation degree, the recommendation degree that grants the virtual authority to obtain the location information of the electronic device to the SS map, and the recommendation degree that does not grant the authority to obtain the location information of the electronic device to the SS map are displayed to the user for selection.
  • the SS map cannot obtain the location information of the electronic device.
  • the electronic device If the user chooses to grant the real authority, the electronic device outputs the current real location information to the SS map. If the user wants to switch the real permission to the virtual permission later, the virtual permission function corresponding to obtaining the location information of the electronic device can be turned on through the interface shown in (d) in FIG. 14 , so that the electronic device can switch the application access environment to a virtual authority environment and allow SS Maps to obtain virtual location information of electronic devices.
  • the electronic device constructs a virtual location information and outputs it to the SS map. If the user wants to switch the virtual permission to the real permission later, the virtual permission function corresponding to obtaining the location information of the electronic device can be turned off through the interface shown in (d) in FIG. 14 , thereby enabling the electronic device to switch the application access environment. To the real authority environment, and allow SS map to obtain the real location information of electronic devices.
  • the electronic device includes corresponding hardware and/or software modules for executing each function.
  • the present application can be implemented in hardware or a combination of hardware and computer software with the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functionality for each particular application in conjunction with the embodiments, but such implementations should not be considered beyond the scope of this application.
  • the electronic device may be divided into functional modules according to the foregoing method examples.
  • each function may be divided into various functional modules, such as a processing unit and a display unit, or two or more functions may be integrated. in a module.
  • the above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. It should be noted that, the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
  • the electronic device provided in this embodiment is used to execute the above-mentioned authority control method, and thus can achieve the same effect as the above-mentioned implementation method.
  • the electronic device may also include a processing module, a storage module and a communication module.
  • the processing module may be used to control and manage the actions of the electronic device.
  • the storage module may be used to support the electronic device to execute stored program codes and data, and the like.
  • the communication module can be used to support the communication between the electronic device and other devices.
  • the processing module may be a processor or a controller. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure.
  • the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and the like.
  • the storage module may be a memory.
  • the communication module may specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, and a Wi-Fi chip.
  • the electronic device involved in this embodiment may be a device having the structure shown in FIG. 2 .
  • Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the processor is made to execute the permission control method of any of the foregoing embodiments.
  • Embodiments of the present application further provide a computer program product, which, when the computer program product runs on a computer, causes the computer to execute the above-mentioned relevant steps, so as to implement the authority control method in the above-mentioned embodiment.
  • the embodiments of the present application also provide an apparatus, which may specifically be a chip, a component or a module, and the apparatus may include a connected processor and a memory; wherein, the memory is used for storing computer execution instructions, and when the apparatus is running, The processor can execute the computer-executed instructions stored in the memory, so that the chip executes the permission control methods in the foregoing method embodiments.
  • the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved, reference may be made to the above-provided method. The beneficial effects in the corresponding method will not be repeated here.
  • the disclosed apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or May be integrated into another device, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • Units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium.
  • a readable storage medium including several instructions to make a device (which may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.

Abstract

A permission control method and an electronic device. The method is executed by an electronic device, and comprises: acquiring a permission request initiated by an application, wherein the permission request carries identification information of a target permission applied for by the application; displaying a selection prompt interface corresponding to the permission request, wherein the selection prompt interface comprises selection options and a recommendation result, which corresponds to the permission request, the selection options comprise an allow option and a prohibit option, and the recommendation result comprises a recommendation level for granting the target permission to the application; and in response to a selection operation on a selection option by a user, granting the target permission to the application, or not granting the target permission to the application. By means of the method, a reference with respect to permission selection can be given to a user by means of displaying, to the user, a recommendation level for granting a target permission to an application, such that the user has better reference information during selection, thereby better improving the user experience during the use of the application.

Description

权限控制方法和电子设备Authorization control method and electronic device
本申请要求于2021年1月29日提交国家知识产权局、申请号为202110127457.9、申请名称为“权限控制方法和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110127457.9 and the application name "authority control method and electronic device" filed with the State Intellectual Property Office on January 29, 2021, the entire contents of which are incorporated into this application by reference .
技术领域technical field
本申请涉及电子技术领域,具体涉及一种权限控制方法和电子设备。The present application relates to the field of electronic technology, and in particular, to an authority control method and an electronic device.
背景技术Background technique
目前,为了提高用户的生活质量,各种各样的应用程序(application,APP)应运而生,用户所使用的电子设备安装这些应用程序后,该应用程序往往会向电子设备申请很多不必要、不相关的隐私权限(如通讯录、通话记录、短信、地理位置、相机、麦克风等权限),甚至某些恶意程序会通过获取用户的隐私权限谋求经济利益。At present, in order to improve the quality of life of users, various application programs (application, APP) have emerged. Irrelevant privacy permissions (such as address book, call history, SMS, geographic location, camera, microphone, etc.), and even some malicious programs seek economic benefits by obtaining users' privacy permissions.
在现有的权限控制方法中,当面临这样的应用程序时,通常是由用户自己决定是否授予相应的权限,部分用户面对这样的权限授予操作时往往是茫然的,不知应该允许授予权限还是禁止授予权限,或者进行随机选择。因此,这些问题都会导致用户使用应用程序时的体验度较差。In the existing permission control methods, when faced with such an application, it is usually up to the user to decide whether to grant the corresponding permission. Some users are often at a loss when faced with such a permission granting operation. It is forbidden to grant permissions, or make random selections. Therefore, these problems can lead to a poor user experience when using the application.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种权限控制方法和电子设备,能够较大的提高用户在使用应用程序时的体验度。The embodiments of the present application provide an authority control method and an electronic device, which can greatly improve a user's experience when using an application program.
第一方面,本申请实施例提供一种权限控制方法,该方法由电子设备执行,包括:获取应用程序发起的权限请求,权限请求携带应用程序所申请的目标权限的标识信息;显示权限请求对应的选择提示界面,选择提示界面包括选择选项和权限请求对应的推荐结果,选择选项包括允许选项和禁止选项,推荐结果包括对应用程序授予目标权限的推荐程度;响应于用户对选择选项的选择操作,对应用程序授予目标权限,或者对应用程序不授予目标权限。In a first aspect, an embodiment of the present application provides a permission control method. The method is executed by an electronic device and includes: acquiring a permission request initiated by an application, where the permission request carries the identification information of the target permission applied for by the application; displaying the corresponding permission request The selection prompt interface includes the selection option and the recommendation result corresponding to the permission request, the selection option includes the allow option and the prohibit option, and the recommendation result includes the recommendation degree of granting the target permission to the application; in response to the user's selection operation on the selection option , grant the target permission to the application, or not grant the target permission to the application.
其中,应用程序可以在安装过程中、或者首次运行时、或者运行过程中发起权限请求,目标权限的标识信息可以包括目标权限的名称或标识等,目标权限可以包括电话、短信、通讯录、通话记录、相机、位置信息、麦克风、日历、悬浮窗、打开第三方应用请求等涉及用户隐私信息的权限。电子设备可以显示权限请求对应的选择提示界面,包括显示选择选项和推荐结果,推荐程度可以为百分比、分数、文字或其他展示形式,例如在允许选项的旁边显示“90%推荐”,通过显示该推荐程度可以使用户快速做出是否向上述应用程序授予目标权限的选择。可选地,电子设备也可以以语音形式播放推荐结果,本实施例对此不作限制。若用户选择了允许选项,则电子设备对应用程序授予目标权限,若用户选择了禁止选项,则电子设备对应用程序不授予目标权限。Among them, the application can initiate a permission request during the installation process, or when it runs for the first time, or during the running process, the identification information of the target permission can include the name or logo of the target permission, etc., and the target permission can include phone calls, text messages, contacts, calls, etc. Permissions involving user privacy information, such as recording, camera, location information, microphone, calendar, floating window, and opening third-party application requests. The electronic device can display a selection prompt interface corresponding to the permission request, including displaying selection options and recommendation results. The recommendation degree can be a percentage, score, text or other display forms. The recommendation level allows the user to quickly make a choice whether to grant the target permission to the aforementioned application. Optionally, the electronic device may also play the recommendation result in the form of voice, which is not limited in this embodiment. If the user selects the allow option, the electronic device grants the target permission to the application, and if the user selects the prohibit option, the electronic device does not grant the target permission to the application.
作为一种可实现的方式,电子设备可以根据应用程序的名称和目标权限的标识信 息,确定权限请求对应的推荐结果。示例性的,电子设备可以将不同的应用程序名称与可授予的权限之间的对应关系存储,然后根据上述应用程序的名称、以及预设的应用程序名称与可授予的权限之间的对应关系,确定上述应用程序的可授予的权限的标识信息,再通过将应用程序的可授予的权限的标识信息与目标权限的标识信息进行匹配,以确定权限请求对应的推荐结果。As an achievable manner, the electronic device may determine the recommendation result corresponding to the permission request according to the name of the application and the identification information of the target permission. Exemplarily, the electronic device may store the correspondence between different application names and grantable permissions, and then according to the above-mentioned application names, as well as the preset application name and the correspondence between the grantable permissions. , determine the identification information of the grantable permissions of the application, and then determine the recommendation result corresponding to the permission request by matching the identification information of the grantable permissions of the application with the identification information of the target permissions.
作为另一种可实现的方式,针对该应用程序所申请的目标权限,电子设备可以获取不同用户对该目标权限的选择结果,例如有80%的用户对该应用程序选择了允许授予权限,则电子设备可以根据该比例确定对该应用程序授予目标权限的推荐程度。As another achievable way, for the target permission applied for by the application, the electronic device can obtain the selection results of the target permission by different users. The electronic device may determine a recommendation degree for granting the target permission to the application according to the ratio.
上述实施例中,电子设备通过向用户显示对应用程序授予目标权限的推荐程度,可以给予用户关于权限选择的参考,使得用户在选择时具有较好的参考信息,可以较大提高用户在使用应用程序时的体验度。In the above embodiment, the electronic device can give the user a reference on the selection of the permission by displaying the recommendation degree of the target permission granted to the application to the user, so that the user has better reference information when selecting, which can greatly improve the user's ability to use the application. program experience.
在第一方面的有些实现方式中,推荐结果还包括对应用程序不授予目标权限的推荐程度。In some implementations of the first aspect, the recommendation result further includes a recommendation degree of not granting the target permission to the application.
结合第一方面和上述实现方式,电子设备可以将对应用程序授予目标权限的推荐程度(如90%)和对应用程序不授予目标权限的推荐程度(如10%)同时显示给用户,例如在允许选项的旁边显示“90%”,在禁止选项的旁边显示“10%”,可使用户更加清晰的了解关于权限选择的参考信息,进一步提高了用户在使用应用程序时的体验度。Combining the first aspect and the above implementation manner, the electronic device can simultaneously display to the user a recommendation level (eg, 90%) for granting the target permission to an application and a recommendation level (eg, 10%) for not granting the target permission to the application, for example, in Displaying "90%" next to the allowed option and "10%" next to the forbidden option can make the user more clearly understand the reference information about the permission selection, and further improve the user's experience when using the application.
在第一方面的有些实现方式中,选择选项还包括虚拟权限选项,推荐结果还包括对应用程序授予目标虚拟权限的推荐程度。In some implementations of the first aspect, the selection option further includes a virtual permission option, and the recommendation result further includes a recommendation degree for granting the target virtual permission to the application.
其中,在一些使用场景中,若用户选择禁止向应用程序授予目标权限,则可能会影响该应用程序的正常使用,比如用户选择禁止向一个摄像类的应用程序授予摄像头权限,则该应用程序便不能实现摄像功能。若用户选择允许向应用程序授予目标权限,又担心隐私信息被泄露,比如用户允许向一个摄像类的应用程序授予获取位置信息的权限,该应用程序可不断的获取电子设备的位置信息,存在安全隐患。因此,上述推荐结果还包括对应用程序授予目标虚拟权限的推荐程度,并将该推荐程序显示在虚拟权限选项的旁边。虚拟信息的生成方式可以为:例如对电子设备的真实位置信息进行随机更改、或者统一更改为默认位置、或者对真实位置信息进行加密,以生成对应的虚拟位置信息,另外,还可以将真实位置信息与生成的虚拟位置信息再次融合生成新的虚拟位置信息。Among them, in some usage scenarios, if the user chooses to prohibit granting the target permission to the application, it may affect the normal use of the application. For example, if the user chooses to prohibit granting the camera permission to a camera application, the application will Camera function cannot be implemented. If the user chooses to allow the target permission to be granted to the application, but is worried about the leakage of private information, for example, the user allows the permission to obtain location information to a camera application, the application can continuously obtain the location information of the electronic device, and there is security hidden danger. Therefore, the above recommendation result also includes the recommendation degree of granting the target virtual permission to the application, and displays the recommended program next to the virtual permission option. The virtual information can be generated by: for example, randomly changing the real location information of the electronic device, or uniformly changing it to the default location, or encrypting the real location information to generate corresponding virtual location information. The information is fused with the generated virtual location information again to generate new virtual location information.
结合第一方面和上述实现方式,通过引入虚拟权限的选择,可以在提高用户的体验度的基础上,进一步保护用户的隐私安全。In combination with the first aspect and the above implementation manner, by introducing the option of virtual authority, the user's privacy can be further protected on the basis of improving the user's experience.
在第一方面的有些实现方式中,若应用程序所发起的权限请求的数量为多个,显示权限请求对应的选择提示界面,包括:依次显示每个权限请求对应的选择提示界面;或者,同时显示多个权限请求对应的选择提示界面。In some implementations of the first aspect, if the number of permission requests initiated by the application program is multiple, displaying the selection prompt interface corresponding to the permission request includes: sequentially displaying the selection prompt interface corresponding to each permission request; or, simultaneously Displays the selection prompt interface corresponding to multiple permission requests.
结合第一方面和上述实现方式,若电子设备依次显示每个权限请求的选择提示界面,则用户依次针对每个权限请求进行选择,可减少用户在选择时的误差率。若电子设备同时显示多个权限请求的选择提示界面,可减少用户的选择时间,提高选择效率。In combination with the first aspect and the above implementation manner, if the electronic device sequentially displays the selection prompt interface for each permission request, the user can select each permission request in sequence, which can reduce the error rate of the user when selecting. If the electronic device simultaneously displays a selection prompt interface for multiple permission requests, the selection time of the user can be reduced and the selection efficiency can be improved.
在第一方面的有些实现方式中,上述方法还包括:接收用户针对应用程序输入的权限切换操作;响应于权限切换操作,将已经对应用程序授予的第一权限类别切换为 第二权限类别,在第一权限类别为目标权限时,第二权限类别是目标虚拟权限,或者,在第一权限类别为目标虚拟权限时,第二权限类别是目标权限。In some implementations of the first aspect, the above method further includes: receiving a permission switching operation input by the user for the application program; in response to the permission switching operation, switching the first permission category that has been granted to the application program to the second permission category, When the first permission class is the target permission, the second permission class is the target virtual permission, or, when the first permission class is the target virtual permission, the second permission class is the target permission.
其中,在一些场景中,用户使用一款应用程序,对该应用程序所申请的A权限授予了虚拟权限(即第一权限类别),当用户使用该应用程序一段时间后,觉得该应用程序可信度较高,想要将A的虚拟权限切换为真实权限(即第二权限类别)。或者用户使用另一款应用程序,对该应用程序所申请的B权限授予了真实权限(即第一权限类别),当用户使用该应用程序一段时间后,觉得没有必要授予真实权限,想要将B的真实权限切换为虚拟权限(即第二权限类别)。因此,电子设备还提供了真实权限和虚拟权限的切换界面,通过引入虚拟授权开关使用户可以对应用程序进行真实权限与虚拟权限的实时切换,为用户的权限授予提供了可切换的操作,在保护用户隐私安全的前提下,进一步提高了用户的体验度。Among them, in some scenarios, the user uses an application and grants a virtual permission (ie, the first permission category) to the A permission applied for the application. When the user uses the application for a period of time, he feels that the application can be used. The reliability is high, and you want to switch the virtual permission of A to the real permission (ie, the second permission category). Or the user uses another application and grants the real permission (that is, the first permission category) to the B permission applied for by the application. After using the application for a period of time, the user feels that it is unnecessary to grant the real permission and wants to The real rights of B are switched to virtual rights (ie, the second rights category). Therefore, the electronic device also provides a switching interface between real permissions and virtual permissions. By introducing a virtual authorization switch, users can switch between real permissions and virtual permissions for applications in real time, providing a switchable operation for the user's permission granting. Under the premise of protecting user privacy and security, the user experience is further improved.
在第一方面的有些实现方式中,权限请求对应的推荐结果的确定方式包括:获取应用程序对应的应用类型;根据应用类型和目标权限的标识信息,确定权限请求对应的推荐结果。In some implementations of the first aspect, the method for determining the recommendation result corresponding to the permission request includes: obtaining the application type corresponding to the application; and determining the recommendation result corresponding to the permission request according to the application type and identification information of the target permission.
其中,电子设备可从应用市场中获取上述应用程序的分类信息、简介信息或者评论信息,并通过对这些信息进行分析获得应用程序的应用类型。还或者,电子设备本地可存储应用程序与应用类型的对应关系,通过该对应关系直接获得应用类型。Wherein, the electronic device can obtain the classification information, introduction information or comment information of the above-mentioned application program from the application market, and obtain the application type of the application program by analyzing the information. Alternatively, the electronic device may locally store the correspondence between the application program and the application type, and directly obtain the application type through the correspondence.
结合第一方面和上述实现方式,电子设备根据应用类型和目标权限的标识信息确定对应的推荐结果,以进行展示,可以给予用户关于权限选择的参考,使得用户在选择时具有较好的参考信息,可以提高用户在使用应用程序时的体验度。Combined with the first aspect and the above implementation manner, the electronic device determines the corresponding recommendation result according to the application type and the identification information of the target authority for display, and can give the user a reference about the authority selection, so that the user has better reference information when choosing. , which can improve the user's experience when using the application.
在第一方面的有些实现方式中,根据应用类型和目标权限的标识信息,确定权限请求对应的推荐结果,包括:将应用类型和目标权限的标识信息输入预设的机器学习模型,确定权限请求对应的推荐结果。In some implementations of the first aspect, determining the recommendation result corresponding to the permission request according to the identification information of the application type and target permission includes: inputting the identification information of the application type and target permission into a preset machine learning model, and determining the permission request corresponding recommendation results.
结合第一方面和上述实现方式,通过训练收敛的机器学习模型对应用类型和目标权限的标识信息进行处理,得到对应的推荐结果,可提高所得到的推荐结果的可靠性,使得用户在选择时具有更好的参考信息,进一步提高用户在使用应用程序时的体验度。Combining the first aspect and the above implementation manner, the identification information of the application type and target authority is processed by training a converged machine learning model, and the corresponding recommendation result is obtained, which can improve the reliability of the obtained recommendation result, so that the user can choose when choosing. It has better reference information to further improve the user's experience when using the application.
在第一方面的有些实现方式中,根据应用类型和目标权限的标识信息,确定权限请求对应的推荐结果,包括:根据应用类型、以及预设的应用类型与可授予的权限之间的对应关系,确定应用程序的可授予的权限的标识信息;根据可授予的权限的标识信息和目标权限的标识信息,确定权限请求对应的推荐结果。In some implementations of the first aspect, the recommendation result corresponding to the permission request is determined according to the application type and the identification information of the target permission, including: according to the application type, the corresponding relationship between the preset application type and the grantable permission , determine the identification information of the grantable permission of the application; determine the recommendation result corresponding to the permission request according to the identification information of the grantable permission and the identification information of the target permission.
结合第一方面和上述实现方式,电子设备通过设置应用类型与可授予的权限之间的对应关系,以确定应用程序的可授予的权限的标识信息,进而根据该信息与目标权限的标识信息确定权限请求对应的推荐结果,可提高所确定的推荐结果的可靠性,使得用户在选择时具有更好的参考信息,进一步提高用户在使用应用程序时的体验度。In combination with the first aspect and the above-mentioned implementation manner, the electronic device determines the identification information of the grantable authority of the application by setting the corresponding relationship between the application type and the grantable authority, and then determines according to the identification information of the information and the target authority. The recommendation result corresponding to the permission request can improve the reliability of the determined recommendation result, so that the user has better reference information when selecting, and further improves the user's experience when using the application.
在第一方面的有些实现方式中,根据可授予的权限的标识信息和目标权限的标识信息,确定权限请求对应的推荐结果,包括:根据可授予的权限的标识信息和目标权限的标识信息,确定目标权限对应的第一系数,当可授予的权限包括目标权限时,第一系数为第一预设值,当可授予的权限不包括目标权限时,第一系数为申请过目标权限的应用程序在权限集合中的数量占比,权限集合为参考应用程序和参考应用程序所 申请过的权限的集合,参考应用程序的应用类型与应用程序的应用类型相同;根据第一系数确定第二系数,第一系数和第二系数之和为第二预设值;将第二系数和目标权限的标识信息输入预设的机器学习模型,确定权限请求对应的推荐结果。In some implementations of the first aspect, the recommendation result corresponding to the permission request is determined according to the identification information of the grantable authority and the identification information of the target authority, including: according to the identification information of the grantable authority and the identification information of the target authority, Determine the first coefficient corresponding to the target authority. When the grantable authority includes the target authority, the first coefficient is the first preset value. When the grantable authority does not include the target authority, the first coefficient is the application that has applied for the target authority. The proportion of the program in the permission set. The permission set is the set of the reference application and the permission applied for by the reference application. The application type of the reference application is the same as the application type of the application; the second coefficient is determined according to the first coefficient. , the sum of the first coefficient and the second coefficient is the second preset value; the second coefficient and the identification information of the target authority are input into the preset machine learning model to determine the recommendation result corresponding to the authority request.
其中,第一系数可以为相关性系数,第二系数可以为警惕系数,电子设备可以先判断可授予的权限是否包括目标权限,若包括则可以设置第一系数为第一预设值,例如1;若不包括则可以根据申请过目标权限的应用程序在权限集合中的数量占比确定第一系数。可选地,第二预设值可以为1,即利用(1-第一系数)的关系式确定第二系数。The first coefficient may be a correlation coefficient, and the second coefficient may be a vigilance coefficient. The electronic device may first determine whether the grantable authority includes the target authority, and if so, the first coefficient may be set to a first preset value, such as 1 ; If not included, the first coefficient can be determined according to the proportion of the number of applications that have applied for the target permission in the permission set. Optionally, the second preset value may be 1, that is, the second coefficient is determined by using a relational expression of (1-first coefficient).
在一种实现方式中,电子设备也可以将第一系数和目标权限的标识信息输入机器学习模型确定上述推荐结果。In an implementation manner, the electronic device may also input the first coefficient and the identification information of the target authority into the machine learning model to determine the above recommendation result.
结合第一方面和上述实现方式,通过设置一个警惕系数,并通过训练收敛的机器学习模型对警惕系数和目标权限的标识信息进行综合处理,得到对应的推荐结果,可进一步提高所得到的推荐结果的可靠性,使得用户在选择时具有更好的参考信息,进一步提高用户在使用应用程序时的体验度。Combining the first aspect and the above implementation manner, by setting a vigilance coefficient, and comprehensively processing the vigilance coefficient and the identification information of the target authority by training a convergent machine learning model, a corresponding recommendation result can be obtained, which can further improve the obtained recommendation result. The reliability of the application allows users to have better reference information when choosing, and further improves the user's experience when using the application.
第二方面,本申请实施例提供一种装置,该装置包含在电子设备中,该装置具有实现上述第一方面及上述第一方面的可能实现方式中电子设备行为的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块或单元。例如,处理模块或单元、显示模块或单元等。In a second aspect, an embodiment of the present application provides an apparatus, the apparatus is included in an electronic device, and the apparatus has a function of implementing the behavior of the electronic device in the above-mentioned first aspect and possible implementations of the above-mentioned first aspect. The functions can be implemented by hardware, or by executing corresponding software by hardware. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a processing module or unit, a display module or unit, and the like.
第三方面,本申请实施例提供一种电子设备,电子设备包括:处理器、存储器和接口;处理器、存储器和接口相互配合,使得电子设备执行第一方面的技术方案中任意一种方法。In a third aspect, an embodiment of the present application provides an electronic device, the electronic device includes: a processor, a memory, and an interface; the processor, the memory, and the interface cooperate with each other, so that the electronic device executes any one of the methods in the technical solutions of the first aspect.
第四方面,本申请实施例提供一种芯片,包括处理器。处理器用于读取并执行存储器中存储的计算机程序,以执行第一方面及其任意可能的实现方式中的方法。In a fourth aspect, an embodiment of the present application provides a chip including a processor. The processor is adapted to read and execute the computer program stored in the memory to perform the method of the first aspect and any possible implementations thereof.
可选地,芯片还包括存储器,存储器与处理器通过电路或电线连接。Optionally, the chip further includes a memory, and the memory is connected to the processor through a circuit or a wire.
进一步可选地,芯片还包括通信接口。Further optionally, the chip further includes a communication interface.
第五方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质中存储了计算机程序,当计算机程序被处理器执行时,使得该处理器执行第一方面的技术方案中任意一种方法。In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the processor is made to execute any one of the technical solutions of the first aspect. a way.
第六方面,本申请实施例提供一种计算机程序产品,计算机程序产品包括:计算机程序代码,当计算机程序代码在电子设备上运行时,使得该电子设备执行第一方面的技术方案中任意一种方法。In a sixth aspect, an embodiment of the present application provides a computer program product, the computer program product includes: computer program code, when the computer program code is run on an electronic device, the electronic device is made to perform any one of the technical solutions of the first aspect method.
附图说明Description of drawings
图1是传统技术中权限请求询问界面的展示示意图;Fig. 1 is the display schematic diagram of the permission request inquiry interface in the traditional technology;
图2是本申请实施例提供的一例电子设备的结构示意图;2 is a schematic structural diagram of an example of an electronic device provided by an embodiment of the present application;
图3是本申请实施例提供的一例电子设备的软件结构框图;3 is a block diagram of a software structure of an electronic device provided by an embodiment of the present application;
图4是本申请实施例提供的一例权限控制方法的流程示意图;4 is a schematic flowchart of an example of an authority control method provided by an embodiment of the present application;
图5中的(a)图是本申请实施例提供的一例展示推荐结果的界面示意图;Figure (a) in FIG. 5 is a schematic diagram of an example of an interface for displaying a recommendation result provided by an embodiment of the present application;
图5中的(b)图是本申请实施例提供的另一例展示推荐结果的界面示意图;Figure (b) in FIG. 5 is a schematic diagram of another example of an interface for displaying a recommendation result provided by an embodiment of the present application;
图6是本申请实施例提供的又一例展示推荐结果的界面示意图;6 is a schematic diagram of another example of an interface for displaying a recommendation result provided by an embodiment of the present application;
图7中的(a)图是本申请实施例提供的又一例展示推荐结果的界面示意图;Figure (a) in FIG. 7 is a schematic diagram of another example of an interface for displaying a recommendation result provided by an embodiment of the present application;
图7中的(b)图是本申请实施例提供的又一例展示推荐结果的界面示意图;Figure (b) in FIG. 7 is a schematic diagram of another example of an interface for displaying a recommendation result provided by an embodiment of the present application;
图8是本申请实施例提供的另一例权限控制方法的流程示意图;8 is a schematic flowchart of another example of an authority control method provided by an embodiment of the present application;
图9是本申请实施例提供的又一例权限控制方法的流程示意图;9 is a schematic flowchart of another example of an authority control method provided by an embodiment of the present application;
图10是本申请实施例提供的又一例权限控制方法的流程示意图;FIG. 10 is a schematic flowchart of another example of an authority control method provided by an embodiment of the present application;
图11是本申请实施例提供的一例对可申请权限和可申请权限对应的警惕系数进行数据编码的过程示意图;FIG. 11 is a schematic diagram of an example of a process of data encoding for the applicable authority and the vigilance coefficient corresponding to the applicable authority provided by the embodiment of the present application;
图12是本申请实施例提供的又一例展示推荐结果的界面示意图;FIG. 12 is a schematic diagram of another example of an interface for displaying a recommendation result provided by an embodiment of the present application;
图13是本申请实施例提供的又一例权限控制方法的流程示意图;FIG. 13 is a schematic flowchart of another example of an authority control method provided by an embodiment of the present application;
图14中的(a)图是本申请实施例提供的一例应用设置界面的示意图;Figure (a) in FIG. 14 is a schematic diagram of an example of an application setting interface provided by an embodiment of the present application;
图14中的(b)图是本申请实施例提供的一例虚拟授权助手设置界面的示意图;Figure (b) in FIG. 14 is a schematic diagram of an example of a virtual authorization assistant setting interface provided by an embodiment of the present application;
图14中的(c)图是本申请实施例提供的另一例虚拟授权助手设置界面的示意图;Figure (c) in FIG. 14 is a schematic diagram of another example of a virtual authorization assistant setting interface provided by an embodiment of the present application;
图14中的(d)图是本申请实施例提供的一例指定应用界面的示意图;Figure (d) in FIG. 14 is a schematic diagram of an example of a designated application interface provided by an embodiment of the present application;
图14中的(e)图是本申请实施例提供的一例权限切换界面的示意图。Figure (e) in FIG. 14 is a schematic diagram of an example of an authority switching interface provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请实施例的描述中,“多个”是指两个或多于两个。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. Wherein, in the description of the embodiments of the present application, unless otherwise stated, “/” means or means, for example, A/B can mean A or B; “and/or” in this document is only a description of the associated object The association relationship of , indicates that there can be three kinds of relationships, for example, A and/or B, can indicate that A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "plurality" refers to two or more than two.
以下,术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”、“第三”的特征可以明示或者隐含地包括一个或者更多个该特征。Hereinafter, the terms "first", "second" and "third" are only used for descriptive purposes, and should not be understood as indicating or implying relative importance or implying the number of indicated technical features. Thus, a feature defined as "first", "second", "third" may expressly or implicitly include one or more of that feature.
本申请实施例提供的权限控制方法可以应用于手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等可以安装应用程序的电子设备上,本申请实施例对电子设备的具体类型不作任何限制。The permission control method provided by the embodiments of the present application can be applied to mobile phones, tablet computers, wearable devices, in-vehicle devices, augmented reality (AR)/virtual reality (VR) devices, notebook computers, and super mobile personal computers (ultra-mobile personal computer, UMPC), netbook, personal digital assistant (personal digital assistant, PDA) and other electronic devices that can install application programs, the embodiments of the present application do not make any restrictions on the specific types of electronic devices.
通常,用户在电子设备上安装一款应用程序时,在安装过程中该应用程序会向电子设备发起一些权限请求,或者在使用该应用程序过程中,用户点击了应用程序界面上的一个触发按钮后,该应用程序会向电子设备发起对应的权限请求。例如,用户点击了界面上的相机按钮,应用程序会发起访问摄像头的权限请求。然后,电子设备会将应用程序的权限请求询问界面显示出来(如图1所示),此时需要用户根据自己的判断进行选择允许或者禁止。然而,对于用户不熟悉的应用程序、或者不熟悉的权限、或者其他特殊的情况(如电子设备的初使用者)等,用户并不确定应该选择允许授予权限还是禁止授予权限,导致用户的使用体验度较差。本申请实施例提供的权限控制方法和电子设备,旨在解决上述技术问题。Usually, when a user installs an application on an electronic device, the application will initiate some permission requests to the electronic device during the installation process, or during the use of the application, the user clicks a trigger button on the application interface After that, the application will initiate a corresponding permission request to the electronic device. For example, if the user clicks the camera button on the interface, the application will initiate a permission request to access the camera. Then, the electronic device will display the permission request inquiry interface of the application program (as shown in FIG. 1 ), at this time, the user needs to choose permission or prohibition according to his own judgment. However, for unfamiliar applications, unfamiliar permissions, or other special situations (such as first-time users of electronic devices), the user is not sure whether to allow or prohibit the granting of permissions, resulting in the user's use of Poor experience. The authority control method and electronic device provided by the embodiments of the present application aim to solve the above technical problems.
示例性的,图2是本申请实施例提供的一例电子设备100的结构示意图。电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线 (universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。Exemplarily, FIG. 2 is a schematic structural diagram of an example of an electronic device 100 provided by an embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 100 . The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces. For example, the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate with each other through the I2C bus interface, so as to realize the touch function of the electronic device 100 .
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170 之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 . In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。I2S接口和PCM接口都可以用于音频通信。The PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160 . For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 . MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc. In some embodiments, the processor 110 communicates with the camera 193 through a CSI interface, so as to realize the photographing function of the electronic device 100 . The processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the electronic device 100 .
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from the charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be provided in the processor 110 . In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。图2中的天线1和天线2的结构仅为一种示例。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。 Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. The structures of the antenna 1 and the antenna 2 in FIG. 2 are only an example. Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Wherein, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and passed to the application processor. The application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR). The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system, QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. Wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband code division Multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM , and/or IR technology, etc. GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi-zenith) satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light). emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on. In some embodiments, the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back by the camera 193 . For example, when taking a picture, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193 .
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object is projected through the lens to generate an optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals. In some embodiments, the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。A digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process the input information and can continuously learn by itself. Applications such as intelligent cognition of the electronic device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 . The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。Internal memory 121 may be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing the instructions stored in the internal memory 121 . The internal memory 121 may include a storage program area and a storage data area. The storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like. The storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like. In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。Speaker 170A, also referred to as a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also referred to as "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or a voice message, the voice can be answered by placing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone jack 170D is used to connect wired earphones. The earphone interface 170D can be the USB interface 130, or can be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be provided on the display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, and the like. The capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100 . In some embodiments, the angular velocity of electronic device 100 about three axes (ie, x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the angle at which the electronic device 100 shakes, calculates the distance that the lens module needs to compensate for according to the angle, and allows the lens to counteract the shake of the electronic device 100 through reverse motion to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。Distance sensor 180F for measuring distance. The electronic device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The electronic device 100 emits infrared light to the outside through the light emitting diode. Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 . The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180L is used to sense ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket, so as to prevent accidental touch.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking pictures with fingerprints, answering incoming calls with fingerprints, and the like.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect the temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 caused by the low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于 检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also called "touch panel". The touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to touch operations may be provided through display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone. The audio module 170 can analyze the voice signal based on the vibration signal of the voice part vibrating bone mass obtained by the bone conduction sensor 180M, so as to realize the voice function. The application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。Motor 191 can generate vibrating cues. The motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. The motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 . Different application scenarios (for example: time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be contacted and separated from the electronic device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 . The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. Multiple cards can be of the same type or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication. In some embodiments, the electronic device 100 employs an eSIM, ie: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiments of the present application take an Android system with a layered architecture as an example to exemplarily describe the software structure of the electronic device 100 .
图3是本申请实施例的电子设备100的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。应用程序层可以包括一系列应用程序包。FIG. 3 is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer. The application layer can include a series of application packages.
如图3所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in Figure 3, the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and so on.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application  programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图3所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 3, the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make these data accessible to applications. Data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications. A display interface can consist of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide the communication function of the electronic device 100 . For example, the management of call status (including connecting, hanging up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
Android runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。The Android runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(media libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。A system library can include multiple functional modules. For example: surface manager (surface manager), media library (media library), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still 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.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
为了便于理解,本申请以下实施例将以具有图2和图3所示结构的电子设备为例, 结合附图和应用场景,对本申请实施例提供的权限控制方法进行具体阐述。For ease of understanding, the following embodiments of the present application will take the electronic device having the structure shown in FIG. 2 and FIG. 3 as an example, and combine the drawings and application scenarios to specifically describe the permission control method provided by the embodiments of the present application.
图4是本申请实施例提供的一例权限控制方法200的流程示意图,该方法包括:FIG. 4 is a schematic flowchart of an example of a permission control method 200 provided by an embodiment of the present application. The method includes:
S201,获取应用程序发起的权限请求,该权限请求携带应用程序所申请的目标权限的标识信息。S201: Acquire a permission request initiated by an application, where the permission request carries identification information of a target permission applied for by the application.
其中,应用程序可以在安装过程中、或者首次运行时、或者运行过程中发起权限请求,该权限请求可以携带应用程序所申请的目标权限的标识信息,如目标权限的名称或ID等。例如,当用户打开一个导航应用时,该导航应用会发起申请获取电子设备位置信息的权限请求,“位置信息”可以为目标权限的名称,位置信息对应的标识“AddID”可以为目标权限的ID。Wherein, the application can initiate a permission request during the installation process, or when it is run for the first time, or during the running process, and the permission request can carry the identification information of the target permission applied for by the application, such as the name or ID of the target permission. For example, when a user opens a navigation application, the navigation application will initiate a permission request to obtain the location information of the electronic device. "Location Information" can be the name of the target permission, and the identifier "AddID" corresponding to the location information can be the ID of the target permission. .
可选地,目标权限可以包括电话、短信、通讯录、通话记录、相机、位置信息、麦克风、日历、悬浮窗、打开第三方应用请求等涉及用户隐私信息的权限。Optionally, the target permissions may include permissions related to user privacy information, such as phone calls, text messages, contacts, call records, cameras, location information, microphones, calendars, floating windows, and requests to open third-party applications.
S202,获取应用程序对应的应用类型。S202, an application type corresponding to the application is acquired.
具体地,在电子设备获取到应用程序发起的权限请求后,电子设备还可以获取该应用程序对应的应用类型,可选地,电子设备可以通过下载该应用程序的应用市场或应用商店中,获取该应用程序的分类信息或简介信息,以确定其应用类型;或者,电子设备可以对该应用程序的名称进行分析,以确定其应用类型;还或者,电子设备可以获取应用市场或应用商店中该应用程序的评论信息,通过对评论信息的分析确定该应用程序的应用类型。可选地,电子设备可以根据上述应用程序的标识(如ID)或者名称,调用应用市场对应的数据库接口或脚本接口,以获得应用市场中关于该应用程序的分类信息、简介信息或者评论信息。Specifically, after the electronic device obtains the permission request initiated by the application, the electronic device can also obtain the application type corresponding to the application. Classification information or profile information of the application to determine its application type; or, the electronic device can analyze the name of the application to determine its application type; or, the electronic device can obtain the application type in the application market or application store. The review information of the application, and the application type of the application is determined by analyzing the review information. Optionally, the electronic device may call a database interface or script interface corresponding to the application market according to the identifier (eg, ID) or name of the application program to obtain classification information, profile information or comment information about the application program in the application market.
示例性地,对于一款应用程序,应用市场中对其的简介信息中包括“品牌特卖,质量保证”的描述,那么可以确定该应用程序对应的应用类型为购物类。对于一款应用程序,其名称为“SS地图”,则可以通过其名称确定对应的应用类型为定位导航类。对于一款应用程序,应用市场中该应用程序的评论区中包括“能够展示自己的才能,认识更多的朋友”的评论信息,那么可以确定该应用程序对应的应用类型为社交类。Exemplarily, for an application, if its profile information in the application market includes a description of "brand special sale, quality assurance", it can be determined that the application type corresponding to the application is shopping. For an application whose name is "SS Map", the corresponding application type can be determined by its name as a positioning navigation class. For an application, if the comment area of the application in the application market includes the comment information of "being able to show one's talents and meet more friends", then it can be determined that the application type corresponding to the application is social.
可选地,电子设备中也可以建立一个应用程序与应用类型之间的对应关系,如数据库或数据表等,若发起上述权限请求的应用程序在此对应关系中,则可以直接获得其应用类型;若发起上述权限请求的应用程序不在此对应关系中,则可以通过上述方式获得其应用类型。Optionally, a corresponding relationship between an application and an application type can also be established in the electronic device, such as a database or a data table, etc. If the application that initiates the above permission request is in this corresponding relationship, its application type can be directly obtained. ; If the application that initiates the above permission request is not in this corresponding relationship, its application type can be obtained through the above method.
S203,根据应用类型和目标权限的标识信息,确定权限请求对应的推荐结果,该推荐结果包括对应用程序授予目标权限的推荐程度。S203: Determine a recommendation result corresponding to the permission request according to the application type and the identification information of the target permission, where the recommendation result includes a recommendation degree for granting the target permission to the application.
具体地,电子设备根据上述应用程序的应用类型,可以获取相同类型的其他应用程序已授予的参考权限集合,然后将上述应用程序所申请的目标权限与参考权限集合中的参考权限进行逐个匹配,例如将目标权限的名称与各参考权限的名称进行逐个匹配,若存在参考权限与目标权限匹配上,则可以推荐用户对该应用程序授予目标权限,若未存在参考权限与目标权限匹配上,则可以推荐用户不对该应用程序授予目标权限。可选地,在电子设备对一个应用程序授予一个权限后,可以将该应用程序和对应的权限上报至服务器,那么另一电子设备想要获取该应用程序的参考权限信息时,便可以从服务器获得。Specifically, according to the application type of the above-mentioned application program, the electronic device can obtain the reference permission set granted by other application programs of the same type, and then match the target permission applied for by the above-mentioned application program with the reference permission in the reference permission set one by one, For example, the name of the target permission is matched with the name of each reference permission one by one. If there is a match between the reference permission and the target permission, the user can be recommended to grant the target permission to the application. If the reference permission does not match the target permission, then The user can be recommended not to grant the target permission to the application. Optionally, after the electronic device grants a permission to an application, the application and the corresponding permission can be reported to the server, then another electronic device can obtain the reference permission information of the application from the server. get.
示例性地,假设一款应用程序的应用类型为定位导航类,电子设备从服务器获取到定位导航类的其他应用程序所授予的参考权限包括A、B和C。若该应用程序所申请的目标权限为A,则可以确定允许授予目标权限的推荐程度为100%;若该应用程序所申请的目标权限为D,则可以确定允许授予目标权限的推荐程度为0%,也即禁止授予目标权限的推荐程度为100%。Exemplarily, it is assumed that the application type of an application is a positioning and navigation class, and the reference permissions granted by other applications of the positioning and navigation class obtained by the electronic device from the server include A, B, and C. If the target permission applied for by the application is A, it can be determined that the recommendation degree that allows granting the target permission is 100%; if the target permission applied for by the application is D, it can be determined that the recommendation degree that allows granting the target permission is 0 %, that is, the recommendation level that prohibits granting the target permission is 100%.
S204,展示权限请求对应的推荐结果。S204, displaying the recommendation result corresponding to the permission request.
其中,展示权限请求对应的推荐结果的示意图可以参见图5中的(a)图或(b)图,由图5中的(a)图可知,可以向用户展示对应用程序授予目标权限的推荐程度,本实施例以推荐程度为百分比为例进行示出,但该推荐程度还可以以分数、文字或其他形式示出,本实施例对推荐程度的展示形式不作限制。由图5中的(b)图可知,可以向用户同时展示对应用程序授予目标权限的推荐程度和对应用程序不授予目标权限的推荐程度。然后,用户可以根据推荐结果进行选择,若选择允许则电子设备向该应用程序授予目标权限,若选择禁止则电子设备不向该应用程序授予目标权限。For a schematic diagram showing the recommendation result corresponding to the permission request, please refer to (a) or (b) in FIG. 5 . As can be seen from (a) in FIG. 5 , the recommendation for granting the target permission to the application can be shown to the user. The degree of recommendation is shown in this embodiment by taking the recommendation degree as a percentage as an example, but the recommendation degree may also be shown in scores, text or other forms, and this embodiment does not limit the display form of the recommendation degree. As can be seen from (b) in FIG. 5 , the recommendation degree of granting the target permission to the application program and the recommendation degree of not granting the target permission to the application program can be displayed to the user at the same time. Then, the user can make a selection according to the recommendation result. If the user chooses to allow, the electronic device grants the target permission to the application, and if he chooses to prohibit, the electronic device does not grant the target permission to the application.
另外,若上述应用程序同时申请的目标权限有多个,则电子设备可以事先对目标权限赋予一个标识,并对该目标权限所对应的推荐结果也赋予相同的标识,那么在展示不同目标权限的推荐结果时,可以将推荐结果对应展示在具有相同标识的目标权限的请求提示界面上。作为一种可实现的方式,电子设备可以依次展示出每个目标权限对应的推荐结果,即先展示第一个目标权限对应的推荐结果,待用户选择之后再展示第二个目标权限对应的推荐结果,以此类推。作为另一种可实现的方式,如图6所示,电子设备可以同时展示出每个目标权限对应的推荐结果,用户可以在一个展示界面完成多个推荐结果的选择。作为又一种可实现的方式,如图7中的(a)图所示,在电子设备同时展示每个目标权限对应的推荐结果时,还可以提供“全选”按钮,当用户点击了该按钮后,电子设备可以跳转至图7中的(b)图,供用户选择全部允许还是全部禁止,由此可减少用户的选择次数,提高了用户的体验度。In addition, if the above applications apply for multiple target permissions at the same time, the electronic device can assign an identifier to the target permission in advance, and assign the same identifier to the recommendation result corresponding to the target permission. When recommending the result, the recommendation result may be displayed on the request prompt interface with the target authority with the same identifier. As an achievable way, the electronic device can sequentially display the recommendation results corresponding to each target authority, that is, firstly display the recommendation results corresponding to the first target authority, and then display the recommendation corresponding to the second target authority after the user selects result, and so on. As another achievable manner, as shown in FIG. 6 , the electronic device can simultaneously display the recommendation result corresponding to each target authority, and the user can complete the selection of multiple recommendation results in one display interface. As another achievable way, as shown in (a) of FIG. 7 , when the electronic device simultaneously displays the recommendation result corresponding to each target authority, a “select all” button can also be provided. When the user clicks the After pressing the button, the electronic device can jump to the figure (b) in FIG. 7 for the user to choose whether to allow all or all to prohibit, thereby reducing the number of selections by the user and improving the user's experience.
上述权限控制方法,电子设备通过向用户展示对应用程序授予目标权限的推荐程度,可以给予用户关于权限选择的参考,使得用户在选择时具有较好的参考信息,可以提高用户在使用应用程序时的体验度。In the above permission control method, the electronic device can give the user a reference on the permission selection by showing the user the recommendation degree of the target permission granted to the application program, so that the user has better reference information when selecting the application program, which can improve the user's ability to use the application program. experience.
在另一个实施例中,电子设备还可以采用训练好的机器学习模型对应用程序的应用类型和目标权限的标识信息进行分类,得到上述权限请求对应的推荐结果,如图8所示是本申请实施例提供的另一例权限控制方法300的流程示意图,该方法包括:In another embodiment, the electronic device can also use the trained machine learning model to classify the application type of the application and the identification information of the target permission, and obtain the recommendation result corresponding to the permission request. Another example of a schematic flowchart of an authority control method 300 provided by the embodiment, the method includes:
S301,获取应用程序发起的权限请求,该权限请求携带应用程序所申请的目标权限的标识信息。S301: Acquire a permission request initiated by an application, where the permission request carries identification information of a target permission applied for by the application.
S302,获取应用程序对应的应用类型。S302: Obtain an application type corresponding to the application.
步骤S301和S302的实现过程可以参见上述S201和S202,在此不再赘述。For the implementation process of steps S301 and S302, reference may be made to the foregoing S201 and S202, which will not be repeated here.
S303,将应用类型和目标权限的标识信息输入预设的机器学习模型,得到权限请求对应的推荐结果,该推荐结果包括对应用程序授予目标权限的推荐程度。S303: Input the identification information of the application type and target authority into a preset machine learning model, and obtain a recommendation result corresponding to the authority request, where the recommendation result includes a recommendation degree for granting the target authority to the application.
其中,机器学习模型可以为神经网络模型、分类器模型或者其他学习模型,本实施例对此不作限制。以分类器模型为例,可选地,该机器学习模型可以为随机森林分类器,电子设备将应用类型和目标权限的标识信息输入该随机森林分类器中,可以得 到上述权限请求对应的推荐结果。The machine learning model may be a neural network model, a classifier model, or other learning models, which are not limited in this embodiment. Taking the classifier model as an example, optionally, the machine learning model can be a random forest classifier, and the electronic device inputs the identification information of the application type and target permission into the random forest classifier, and the recommendation result corresponding to the permission request can be obtained. .
在一种可实现的方式中,随机森林分类器的训练过程可以由服务器执行,首先获取大量的应用样本,并对应得到每个应用样本的应用类型,然后将每个应用样本的应用类型和可申请权限的信息输入初始的随机森林分类器进行分类训练,直至得到收敛的随机森林分类器。In an achievable manner, the training process of the random forest classifier can be performed by the server. First, a large number of application samples are obtained, and the application type of each application sample is correspondingly obtained, and then the application type of each application sample and the available application type are obtained. The permission application information is input into the initial random forest classifier for classification training until the convergent random forest classifier is obtained.
在另一种可实现的方式中,服务器还可以获取不同用户对每个应用样本所申请权限的选择结果(例如某一应用样本,有90%的用户选择允许对其授予A权限),那么服务器还可以根据应用样本的应用类型和用户的选择结果对随机森林分类器进行训练。In another achievable manner, the server may also obtain the selection results of the permissions applied by different users for each application sample (for example, for a certain application sample, 90% of users choose to grant A permission to it), then the server The random forest classifier can also be trained according to the application type of the application sample and the user's selection results.
在又一种可实现的方式中,服务器还可以根据用户标识获取当前用户在使用电子设备期间,对各应用样本所申请权限的选择结果,然后根据用户标识、应用样本的应用类型和用户的选择结果对随机森林分类器进行训练。例如,某一用户对导航类的应用样本都授予了允许访问位置信息的权限,那么再有一个导航类的应用程序申请该权限时,可推荐允许向该应用程序授予访问位置信息的权限。In another achievable manner, the server may also obtain, according to the user ID, the selection result of the permissions applied by the current user for each application sample during the use of the electronic device, and then obtain the selection result according to the user ID, the application type of the application sample, and the user's selection. The results train a random forest classifier. For example, if a user has granted permission to access location information to all navigation application samples, when another navigation application applies for this permission, it may be recommended to grant the application permission to access location information.
S304,展示权限请求对应的推荐结果。S304, displaying the recommendation result corresponding to the permission request.
步骤S304的实现过程可以参见上述S204,在此不再赘述。For the implementation process of step S304, reference may be made to the above-mentioned S204, and details are not repeated here.
上述权限控制方法,通过训练收敛的机器学习模型对应用类型和目标权限的标识信息进行处理,得到对应的推荐结果,可提高所得到的推荐结果的可靠性,使得用户在选择时具有更好的参考信息,进一步提高用户在使用应用程序时的体验度。The above authority control method processes the identification information of the application type and target authority by training a converged machine learning model, and obtains the corresponding recommendation result, which can improve the reliability of the obtained recommendation result, so that the user has a better choice when choosing. Reference information to further improve the user's experience when using the application.
在另一个实施例中,电子设备或服务器还可以先将各不同的应用类型与预测的可授予的权限之间的对应关系进行存储,例如以数据表、数据库等方式进行存储,然后再以此确定发起权限请求的应用程序对应的推荐结果。可选地,预测的可授予的权限可以根据经验、应用功能以及用户需求等因素确定。如图9所示是本申请实施例提供的另一例权限控制方法400的流程示意图,该方法包括:In another embodiment, the electronic device or server may also first store the correspondence between different application types and the predicted grantable permissions, for example, in a data table, database, etc. Determine the recommendation result corresponding to the application that initiated the permission request. Optionally, the predicted grantable permissions may be determined based on factors such as experience, application functionality, and user needs. FIG. 9 is a schematic flowchart of another example of a permission control method 400 provided by an embodiment of the present application, and the method includes:
S401,获取应用程序发起的权限请求,该权限请求携带应用程序所申请的目标权限的标识信息。S401: Acquire a permission request initiated by an application, where the permission request carries identification information of a target permission applied for by the application.
S402,获取应用程序对应的应用类型。S402: Acquire an application type corresponding to the application.
步骤S401和S402的实现过程可以参见上述S201和S202,在此不再赘述。For the implementation process of steps S401 and S402, reference may be made to the foregoing S201 and S202, which will not be repeated here.
S403,根据应用类型、以及预设的应用类型与可授予的权限之间的对应关系,确定上述应用程序的可授予的权限的标识信息。S403 , according to the application type and the corresponding relationship between the preset application type and the grantable permission, determine the identification information of the grantable permission of the application program.
S404,根据应用程序的可授予的权限的标识信息和目标权限的标识信息,确定权限请求对应的推荐结果,该推荐结果包括对应用程序授予目标权限的推荐程度。S404: Determine a recommendation result corresponding to the permission request according to the identification information of the grantable permission of the application and the identification information of the target permission, where the recommendation result includes a recommendation degree for granting the target permission to the application.
具体地,因电子设备或服务器存储有应用类型与可授予的权限之间的对应关系,那么对于上述发起权限请求的应用程序,电子设备可以根据其应用类型获得对应的可授予的权限的标识信息。例如,一款应用程序的应用类型为社交类,电子设备通过应用类型与可授予的权限之间的对应关系可以获得该应用程序的可授予的权限包括E、F和G。Specifically, since the electronic device or server stores the correspondence between the application type and the grantable permission, for the application program that initiates the permission request, the electronic device can obtain the corresponding grantable permission identification information according to the application type. . For example, the application type of an application is social, and the electronic device can obtain the grantable permissions of the application through the corresponding relationship between the application type and the grantable permissions, including E, F, and G.
然后,电子设备可以将确定的可授予的权限的标识信息与上述应用程序所申请的目标权限的标识信息进行匹配,若存在可授予的权限与目标权限匹配上,则可以推荐用户对该应用程序授予目标权限,若未存在可授予的权限与目标权限匹配上,则可以 推荐用户不对该应用程序授予目标权限。关于确定推荐程度过程的示例可以参见上述实施例中S203中的示例,在此不再赘述。Then, the electronic device can match the identification information of the determined grantable permission with the identification information of the target permission applied for by the above application, and if there is a match between the grantable permission and the target permission, it can recommend the user to the application Grant the target permission. If there is no grantable permission matching the target permission, you can recommend the user not to grant the target permission to the application. For an example of the process of determining the recommendation degree, reference may be made to the example in S203 in the foregoing embodiment, and details are not repeated here.
S405,展示权限请求对应的推荐结果。S405, displaying the recommendation result corresponding to the permission request.
在一种可实现的方式中,步骤S405的实现过程可以参见上述S204,在此不再赘述。In an achievable manner, for the implementation process of step S405, reference may be made to the foregoing S204, which will not be repeated here.
在另一种可实现的方式中,电子设备还可以将各不同的应用程序名称与可授予的权限之间的对应关系存储,若上述S401中的权限请求携带应用程序名称,则S402和S403的步骤可以替换为以下实现方式:根据应用程序名称、以及预设的应用程序名称与可授予的权限之间的对应关系,确定上述应用程序的可授予的权限的标识信息。In another achievable manner, the electronic device may also store the correspondence between different application program names and the grantable permissions. If the permission request in the above S401 carries the application program name, the The step may be replaced by the following implementation manner: determining the identification information of the grantable permission of the above application program according to the application program name and the corresponding relationship between the preset application program name and the grantable permission.
上述权限控制方法,电子设备通过设置应用类型与可授予的权限之间的对应关系,以确定应用程序的可授予的权限的标识信息,进而根据该标识信息与目标权限的标识信息确定权限请求对应的推荐结果,可提高所确定的推荐结果的可靠性,使得用户在选择时具有更好的参考信息,进一步提高用户在使用应用程序时的体验度。In the above-mentioned authority control method, the electronic device determines the identification information of the grantable authority of the application program by setting the corresponding relationship between the application type and the authority that can be granted, and then determines that the authority request corresponds to the identification information according to the identification information and the identification information of the target authority. The recommended result can improve the reliability of the determined recommendation result, so that the user has better reference information when selecting, and further improves the user's experience when using the application.
在另一个实施例中,在电子设备得到上述应用程序的可授予的权限的标识信息后,还可以根据可授予的权限的标识信息和目标权限的标识信息计算一个警惕系数,进而确定对应的推荐结果。如图10所示是本申请实施例提供的另一例权限控制方法500的流程示意图,该方法包括:In another embodiment, after the electronic device obtains the identification information of the grantable authority of the above application program, it can also calculate a vigilance coefficient according to the identification information of the grantable authority and the identification information of the target authority, and then determine the corresponding recommendation result. FIG. 10 is a schematic flowchart of another example of an authority control method 500 provided by an embodiment of the present application. The method includes:
S501,获取应用程序发起的权限请求,该权限请求携带应用程序所申请的目标权限的标识信息。S501: Acquire a permission request initiated by an application, where the permission request carries identification information of a target permission applied for by the application.
S502,获取应用程序对应的应用类型。S502: Acquire an application type corresponding to the application.
S503,根据应用类型、以及预设的应用类型与可授予的权限之间的对应关系,确定上述应用程序的可授予的权限的标识信息。S503 , according to the application type and the corresponding relationship between the preset application type and the grantable permission, determine the identification information of the grantable permission of the above-mentioned application program.
步骤S501-S503的实现过程可以参见上述S401-S403,在此不再赘述。For the implementation process of steps S501-S503, reference may be made to the above-mentioned S401-S403, which will not be repeated here.
S504,根据应用程序的可授予的权限的标识信息和目标权限的标识信息,确定目标权限对应的警惕系数。S504: Determine a vigilance coefficient corresponding to the target authority according to the identification information of the grantable authority of the application and the identification information of the target authority.
具体地,若可授予的权限包括目标权限,则可以设置一个较小的警惕系数,若可授予的权限不包括目标权限,则可以设置一个较大的警惕系数。Specifically, if the grantable authority includes the target authority, a smaller alert coefficient may be set, and if the grantable authority does not include the target authority, a larger alert coefficient may be set.
可选地,电子设备可以先对可授予的权限的标识信息和目标权限的标识信息进行相关性计算,得到目标权限对应的相关性系数,然后再根据得到的相关性系数计算对应的警惕系数。如表1所示,假设上述应用程序所申请的目标权限为A、B、D和Y,该应用程序的可授予的权限为B、C和D,若目标权限在可授予的权限中,则相关系数为1(表明该目标权限为该类应用程序的常用权限);若目标权限不在可授予的权限中,则计算申请过该目标权限的应用程序在所有该类应用程序所申请权限的集合中(大数据下统计)的数量占比,将该数量占比作为相关系数;其中,当一个应用程序向一个电子设备发起过权限请求时,该电子设备可以将该应用程序所申请的权限的标识信息发送至服务器,则服务器可以存储应用程序和所申请权限的标识信息之间的对应关系,并对相同类型的应用程序所申请的权限进行统计,比如,统计T类应用程序中,有多少个应用程序申请了A权限,多少个应用程序申请了Y权限等。Optionally, the electronic device may first perform correlation calculation on the identification information of the grantable authority and the identification information of the target authority to obtain the correlation coefficient corresponding to the target authority, and then calculate the corresponding vigilance coefficient according to the obtained correlation coefficient. As shown in Table 1, it is assumed that the target permissions applied by the above application are A, B, D and Y, and the grantable permissions of the application are B, C and D. If the target permissions are among the grantable permissions, then The correlation coefficient is 1 (indicating that the target permission is a common permission of this type of application); if the target permission is not among the permissions that can be granted, calculate the set of permissions applied by the application that has applied for the target permission in all such applications. The proportion of the number in the middle (statistics under big data), and the proportion of the number is used as the correlation coefficient; among them, when an application initiates a permission request to an electronic device, the electronic device can apply for the permission of the application. If the identification information is sent to the server, the server can store the corresponding relationship between the application and the identification information of the requested permission, and make statistics on the permissions applied for by the same type of application. For example, count the number of T-type applications. How many applications have applied for permission A, how many applications have applied for permission Y, etc.
例如100个该类应用程序中没有一个应用程序申请Y权限,则Y权限的相关系数 为0,若100个该类应用程序中有50%的应用程序申请A权限,则A权限的相关系数为0.5;由此通过相关性计算可得到目标权限对应的相关性系数分别为A:0.5,B;1,D;1,Y:0;然后采用(1-相关性系数)的关系式计算得到目标权限对应的警惕系数分别为A:0.5,B;0,D;0,Y:1。For example, if none of the 100 applications of this type applies for the Y permission, the correlation coefficient of the Y permission is 0. If 50% of the 100 applications of this type apply for the A permission, the correlation coefficient of the A permission is 0.5; from this, the correlation coefficients corresponding to the target authority can be obtained through correlation calculation: A: 0.5, B; 1, D; 1, Y: 0; then the target is calculated by using the relational formula of (1-correlation coefficient) The vigilance coefficients corresponding to permissions are A: 0.5, B; 0, D; 0, Y: 1.
表1目标权限与对应的警惕系数Table 1 Target authority and corresponding vigilance coefficient
Figure PCTCN2021138388-appb-000001
Figure PCTCN2021138388-appb-000001
S505,将警惕系数和目标权限的标识信息输入预设的机器学习模型,得到权限请求对应的推荐结果,该推荐结果包括对应用程序授予目标权限的推荐程度。S505 , input the vigilance coefficient and the identification information of the target authority into a preset machine learning model, and obtain a recommendation result corresponding to the authority request, where the recommendation result includes a recommendation degree for granting the target authority to the application.
在一种可实现的方式中,电子设备在得到目标权限对应的警惕系数后,可以将警惕系数和目标权限的标识信息输入机器学习模型进行处理,以得到上述权限请求对应的推荐结果。可选地,该机器学习模型同样可以为随机森林分类器,该分类器的训练过程可以如下:In an achievable manner, after obtaining the vigilance coefficient corresponding to the target authority, the electronic device can input the vigilance coefficient and the identification information of the target authority into the machine learning model for processing, so as to obtain the recommendation result corresponding to the above-mentioned authority request. Optionally, the machine learning model can also be a random forest classifier, and the training process of the classifier can be as follows:
首先获取大量的应用样本,可以包括正样本和负样本,并确定每个应用样本的可申请权限和可申请权限对应的警惕系数;然后对可申请权限和可申请权限对应的警惕系数进行数据编码,得到输入样本集和测试样本集;接下来将输入样本集输入初始的随机森林分类器中进行训练,以得到收敛的随机森林分类器;最后采用测试样本集对得到的随机森林分类器进行测试,得到最终可用的随机森林分类器。其中,对可申请权限和可申请权限对应的警惕系数进行数据编码的过程可以参见图11所示,假设可申请权限为B、E、G、I,权限B、E、G、I分别对应的警惕系数为0.5、0.8、0.3、0.9,设置相同大小的矩阵或其他形式的数据集合,第一个矩阵将权限B、E、G、I的位置置为1,其他位置设置为0,第二个矩阵将权限B、E、G、I的位置设置为对应的警惕系数,其他位置置为0,然后将两个矩阵进行归一化处理,如平均求和、加权求和等处理(本实施例以平均求和为例示出),得到编码结果作为样本集。First, obtain a large number of application samples, including positive samples and negative samples, and determine the applicable permissions and the vigilance coefficients corresponding to the applicable permissions for each application sample; then encode the applicable permissions and the vigilance coefficients corresponding to the applicable permissions , get the input sample set and the test sample set; next, input the input sample set into the initial random forest classifier for training to obtain the convergent random forest classifier; finally, use the test sample set to test the obtained random forest classifier , to get the final usable random forest classifier. Among them, the process of data coding of the applicable authority and the vigilance coefficient corresponding to the applicable authority can be seen in Figure 11. Assuming that the applicable authority is B, E, G, and I, the permissions B, E, G, and I correspond to The vigilance coefficients are 0.5, 0.8, 0.3, 0.9, set the same size matrix or other forms of data sets, the first matrix sets the positions of permissions B, E, G, I to 1, other positions are set to 0, the second The position of authority B, E, G, and I is set as the corresponding vigilance coefficient for each matrix, and the other positions are set to 0, and then the two matrices are normalized, such as average summation, weighted summation, etc. (this implementation The average summation is shown as an example), and the coding result is obtained as a sample set.
在另一种可实现的方式中,还可以设置一个系数阈值(如0.9),若得到的目标权限的警惕系数小于该系数阈值,则电子设备将该目标权限的警惕系数和信息输入机器学习模型,得到推荐结果。若得到的目标权限的警惕系数大于或者等于该系数阈值,则可以直接确定推荐结果为对应用程序不授予该目标权限,即授予目标权限的推荐程度为0%。由此可减少电子设备的计算量,提高计算效率。In another achievable manner, a coefficient threshold (such as 0.9) may also be set. If the obtained alertness coefficient of the target authority is less than the coefficient threshold, the electronic device will input the alertness coefficient and information of the target authority into the machine learning model , get the recommended result. If the obtained vigilance coefficient of the target authority is greater than or equal to the coefficient threshold, it can be directly determined that the recommendation result is that the target authority is not granted to the application, that is, the recommendation degree of granting the target authority is 0%. Thereby, the calculation amount of the electronic device can be reduced, and the calculation efficiency can be improved.
S506,展示权限请求对应的推荐结果。S506, displaying the recommendation result corresponding to the permission request.
步骤S506的实现过程可以参见上述S405,在此不再赘述。For the implementation process of step S506, reference may be made to the above-mentioned S405, which will not be repeated here.
上述权限控制方法,通过设置一个警惕系数,并通过训练收敛的机器学习模型对警惕系数和目标权限的标识信息进行综合处理,得到对应的推荐结果,可进一步提高所得到的推荐结果的可靠性,使得用户在选择时具有更好的参考信息,进一步提高用户在使用应用程序时的体验度。The above authority control method, by setting a vigilance coefficient, and comprehensively processing the vigilance coefficient and the identification information of the target authority by training a convergent machine learning model, to obtain a corresponding recommendation result, which can further improve the reliability of the obtained recommendation result. This enables the user to have better reference information when selecting, and further improves the user's experience when using the application.
在一些使用场景中,若用户选择禁止向应用程序授予目标权限,则可能会影响该应用程序的正常使用。比如一款定位导航类的应用程序,发起申请获取电子设备位置信息的权限,但用户此时只是想要查看从WW大厦到TT大厦的路线,并不需要上传自身的位置信息,若用户选择禁止向该应用程序授予获取位置信息的权限,则该应用程序可能会异常关闭,而若用户选择允许向该应用程序授予获取位置信息的权限,又担心隐私信息被泄露。因此,上述各实施例中得到的推荐结果还可以包括对应用程序授予虚拟权限的推荐程度;其中,电子设备可以首先生成虚拟权限环境,可选地,可以在真实权限环境中通过沙箱(Sandboxie)创建上述虚拟权限环境,当然,也可以通过其它方式创建上述虚拟权限环境,此处不作限定;由于虚拟权限环境实际上为真实权限环境的虚拟镜像,在初次启动虚拟环境时,该虚拟权限环境中存储的数据为空,因而,还需要对上述虚拟权限生成对应的虚拟权限信息。本实施例中,电子设备可以对电子设备的真实位置信息进行随机更改、或者统一更改为默认位置、或者对真实位置信息进行加密,以生成对应的虚拟位置信息,另外,还可以将真实位置信息与生成的虚拟位置信息再次融合生成新的虚拟位置信息。In some usage scenarios, if the user chooses to prohibit granting target permissions to an application, it may affect the normal use of the application. For example, a positioning and navigation application initiates an application for permission to obtain the location information of electronic devices, but the user only wants to view the route from the WW Building to the TT Building, and does not need to upload their own location information. If the user chooses to prohibit If the app is granted the permission to obtain location information, the app may close abnormally, and if the user chooses to allow the app to be granted the permission to obtain location information, they are worried that private information will be leaked. Therefore, the recommendation results obtained in the above-mentioned embodiments may also include the degree of recommendation for granting virtual permissions to applications; wherein, the electronic device may first generate a virtual permission environment, and optionally, a sandbox (Sandboxie ) to create the above-mentioned virtual authority environment, of course, the above-mentioned virtual authority environment can also be created in other ways, which is not limited here; because the virtual authority environment is actually a virtual image of the real authority environment, when the virtual environment is started for the first time, the virtual authority environment The data stored in the virtual rights is empty, therefore, corresponding virtual rights information needs to be generated for the above virtual rights. In this embodiment, the electronic device can randomly change the real location information of the electronic device, or uniformly change it to the default location, or encrypt the real location information to generate corresponding virtual location information. In addition, the real location information can also be It is fused with the generated virtual position information again to generate new virtual position information.
如图12所示,电子设备可以得到权限请求对应的对应用程序授予目标真实权限的推荐程度、对应用程序授予目标虚拟权限的推荐程度以及对应用程序不授予目标权限的推荐程度,并展示给用户进行选择。若用户选择授予真实权限,则电子设备将当前的真实位置信息输出给该应用程序;若用户选择授予虚拟权限,则电子设备将对真实位置信息进行随机更改所生成的虚拟位置信息输出给该应用程序,比如,电子设备当前的真实位置信息为ZZ大厦,电子设备可以将真实位置信息ZZ大厦随机更改为KK大街等;若用户选择禁止授予权限,则该应用程序无法获得电子设备的位置信息。本实施例中,通过引入虚拟权限的选择,可以在提高用户的体验度的基础上,进一步保护用户的隐私安全。As shown in FIG. 12, the electronic device can obtain the recommendation degree of granting the target real permission to the application program, the recommendation degree of granting the target virtual permission to the application program, and the recommendation degree of not granting the target permission to the application program corresponding to the permission request, and display it to The user makes a selection. If the user chooses to grant the real permission, the electronic device outputs the current real location information to the application; if the user chooses to grant the virtual permission, the electronic device outputs the virtual location information generated by randomly changing the real location information to the application The program, for example, the current real location information of the electronic device is ZZ Building, and the electronic device can randomly change the real location information ZZ Building to KK Street, etc.; if the user chooses to prohibit granting permission, the application cannot obtain the location information of the electronic device. In this embodiment, by introducing the option of virtual authority, the user's privacy can be further protected on the basis of improving the user's experience.
需要说明的是,电子设备向用户展示的推荐结果可以包括对应用程序授予目标真实权限的推荐程度、对应用程序授予目标虚拟权限的推荐程度以及对应用程序不授予目标权限的推荐程度中的至少两个。It should be noted that the recommendation result displayed by the electronic device to the user may include at least one of the recommendation degree of granting the target real permission to the application, the recommendation degree of granting the target virtual permission to the application, and the recommendation degree of not granting the target permission to the application. two.
在另一些使用场景中,用户使用一款应用程序,对该应用程序所申请的A权限授予了虚拟权限,当用户使用该应用程序一段时间后,觉得该应用程序可信度较高,想要将A的虚拟权限切换为真实权限。或者用户使用另一款应用程序,对该应用程序所申请的B权限授予了真实权限,当用户使用该应用程序一段时间后,觉得没有必要授予真实权限,想要将B的真实权限切换为虚拟权限。对于此问题,本实施例还提供了真实权限与虚拟权限进行权限切换的实施过程,如图13所示,该过程可以包括:In other usage scenarios, the user uses an application and grants a virtual permission to the A permission applied for by the application. After using the application for a period of time, the user feels that the application is highly reliable and wants to Switch A's virtual permissions to real permissions. Or the user uses another application and grants the real permission to the B permission applied for by the application. When the user uses the application for a period of time, he feels that there is no need to grant the real permission, and wants to switch the real permission of B to the virtual one. permissions. For this problem, this embodiment also provides an implementation process for switching between real rights and virtual rights. As shown in FIG. 13 , the process may include:
S601,接收用户针对应用程序输入的权限切换操作,响应于该权限切换操作。S601: Receive an authority switching operation input by a user for an application program, and respond to the authority switching operation.
S602,判断是否切换为申请真实权限,若是执行S603,若否执行S604。S602, it is judged whether to switch to applying for the real authority, if it is, execute S603, and if not, execute S604.
S603,将应用程序的访问环境切换为真实权限环境,向该应用程序授予真实权限。S603, switch the access environment of the application to the real permission environment, and grant the real permission to the application.
S604,生成虚拟权限环境,将应用程序的访问环境切换为虚拟权限环境,向该应用程序授予虚拟权限。S604: Generate a virtual permission environment, switch the access environment of the application to the virtual permission environment, and grant the virtual permission to the application.
其中,图14中的(a)图展示了电子设备的应用设置界面,当用户点击了该界面上的“虚拟授权助手”按钮后,可以跳转至图14中的(b)图界面,该界面为电子设备 未开启虚拟授权功能的界面。若用户想要开启电子设备的虚拟授权功能,则可以点击开关图标21,即可开启虚拟授权功能。开启了虚拟授权功能后的展示界面可参见图14中的(c)图界面,在该界面上可以配置相关的虚拟授权信息,包括:虚拟信息的产生方式(简称虚拟方式,如对真实信息进行随机更改、对真实信息进行加密或对真实信息与虚拟信息进行融合等方式)、虚拟授权指定应用、虚拟授权的功能介绍等。若用户点击了图14中的(c)图上的“指定应用”按钮22,电子设备跳转至图14中的(d)图界面。另外,若用户在上述图12中选择的是授予虚拟权限,但电子设备的虚拟授权功能未开启,则可以由图12跳转至图14中的(b)图来开启虚拟授权功能。Wherein, (a) in Fig. 14 shows the application setting interface of the electronic device, when the user clicks the "Virtual Authorization Assistant" button on the interface, he can jump to the interface in Fig. 14 (b), the The interface is an interface where the virtual authorization function is not enabled on the electronic device. If the user wants to enable the virtual authorization function of the electronic device, he can click the switch icon 21 to enable the virtual authorization function. For the display interface after the virtual authorization function is turned on, refer to the (c) diagram interface in FIG. 14 , on which the relevant virtual authorization information can be configured, including: the generation method of the virtual information (referred to as the virtual method, such as performing the real information on the display interface). Random change, encryption of real information or fusion of real information and virtual information, etc.), virtual authorization designated application, virtual authorization function introduction, etc. If the user clicks the “designate application” button 22 on (c) in FIG. 14 , the electronic device jumps to the interface in (d) in FIG. 14 . In addition, if the user chooses to grant virtual authority in the above FIG. 12, but the virtual authorization function of the electronic device is not enabled, you can jump from FIG. 12 to (b) in FIG. 14 to enable the virtual authorization function.
在图14中的(d)图界面上,列出了电子设备所包含的全部权限(本实施例以共包含5个权限为例示出),当用户点击了某一权限按钮后,电子设备可跳转至该权限对应的应用选择界面。例如,用户点击了“存储”权限按钮23,则跳转至图14中的(e)图界面,在该界面展示出了哪些应用程序已开启虚拟权限功能,哪些应用程序未开启虚拟权限功能。从图14中的(e)图界面上可以看出,应用程序1已开启了“存储”权限的虚拟权限功能,即应用程序1可以获得电子设备上的虚拟照片、媒体内容和文件信息,若用户想要将该权限切换为真实权限,则可以直接点击开关图标24将此虚拟权限功能关闭。电子设备接收到用户输入的关闭指令后,将应用访问环境切换至真实权限环境,此时允许应用程序1访问真实照片、媒体内容和文件信息。On the interface of (d) in FIG. 14 , all the permissions included in the electronic device are listed (in this embodiment, five permissions are included as an example), when the user clicks a certain permission button, the electronic device can Jump to the application selection interface corresponding to the permission. For example, if the user clicks the "storage" permission button 23, the user jumps to the interface (e) in FIG. 14, where the interface displays which applications have enabled the virtual permission function and which applications have not enabled the virtual permission function. It can be seen from the interface (e) in Figure 14 that application 1 has enabled the virtual permission function of the "storage" permission, that is, application 1 can obtain virtual photos, media content and file information on the electronic device. If the user wants to switch the permission to the real permission, he can directly click the switch icon 24 to turn off the virtual permission function. After receiving the closing instruction input by the user, the electronic device switches the application access environment to the real permission environment, and at this time allows the application 1 to access real photos, media content and file information.
从图14中的(e)图界面上还可以看出,应用程序2未开启“存储”权限的虚拟权限功能,即应用程序2可以获得电子设备上的真实照片、媒体内容和文件信息,若用户想要将该权限切换为虚拟权限,则可以直接点击开关图标25将此虚拟权限功能打开。电子设备接收到用户输入的打开指令后,首先按照上述实施例的方法生成虚拟权限环境以及对应的虚拟权限信息。本实施例中,电子设备可以对真实的照片、媒体内容和文件信息进行随机更改、或者统一更改为默认内容,以生成对应的虚拟照片、媒体内容和文件信息,然后电子设备将应用访问环境切换至虚拟权限环境,此时允许应用程序2访问虚拟照片、媒体内容和文件信息。It can also be seen from the interface (e) in Figure 14 that the virtual permission function of the "storage" permission is not enabled for Application 2, that is, Application 2 can obtain real photos, media content and file information on the electronic device. If the user wants to switch the permission to a virtual permission, he can directly click the switch icon 25 to enable the virtual permission function. After receiving the opening instruction input by the user, the electronic device first generates a virtual permission environment and corresponding virtual permission information according to the method of the above embodiment. In this embodiment, the electronic device can randomly change the real photos, media content and file information, or uniformly change the default content to generate corresponding virtual photos, media content and file information, and then the electronic device switches the application access environment To the virtual rights environment, application 2 is now allowed to access virtual photos, media content and file information.
上述权限控制方法,通过引入虚拟授权开关使用户可以对应用程序进行真实权限与虚拟权限的实时切换,为用户的权限授予提供了可切换的操作,在保护用户隐私安全的前提下,进一步提高了用户的体验度。The above permission control method, through the introduction of a virtual authorization switch, enables users to switch between real permissions and virtual permissions for applications in real time, providing a switchable operation for the user's permission granting, and on the premise of protecting user privacy. user experience.
下面以应用程序为SS地图,申请获取电子设备位置信息的权限为例对上述权限控制方法的整个过程再次进行说明:The entire process of the above-mentioned permission control method is described again by taking the application as the SS map and applying for the permission to obtain the location information of the electronic device as an example:
在用户打开SS地图应用时,该SS地图应用便向电子设备发起申请获取电子设备位置信息的权限请求。电子设备通过该SS地图应用的名称进行分析,确定其应用类型为定位导航类。然后电子设备根据应用类型和可授予的权限之间的对应关系,可以得到定位导航类应用的可授予的权限包括获取电子设备位置信息的权限、获取电子设备麦克风的权限以及获取电子设备访问存储信息的权限。When the user opens the SS map application, the SS map application initiates a permission request to the electronic device for obtaining the location information of the electronic device. The electronic device analyzes the name of the SS map application, and determines that its application type is a positioning and navigation class. Then, according to the correspondence between the application type and the grantable permissions, the electronic device can obtain the grantable permissions of the positioning and navigation application, including the permission to obtain the location information of the electronic device, the permission to obtain the microphone of the electronic device, and the access to the storage information of the electronic device. permission.
接下来电子设备对SS地图所申请的获取电子设备位置信息的权限与得到的可授予的权限进行相关性计算,判断得到所申请的获取电子设备位置信息的权限包含在可授予的权限内,则确定所申请的获取电子设备位置信息的权限对应的相关性系数为1,进而确定其对应的警惕系数为0。然后电子设备将警惕系数和获取电子设备位置信息 的权限信息输入随机森林分类器中,得到上述SS地图所发起的权限请求对应的推荐结果,包括对SS地图授予获取电子设备位置信息的真实权限的推荐程度、对SS地图授予获取电子设备位置信息的虚拟权限的推荐程度以及对SS地图不授予获取电子设备位置信息的权限的推荐程度,并展示给用户进行选择。Next, the electronic device performs a correlation calculation on the authority applied by SS Map to obtain the location information of the electronic device and the obtained grantable authority, and judges that the applied authority for obtaining the position information of the electronic equipment is included in the grantable authority, then It is determined that the correlation coefficient corresponding to the applied authority to obtain the location information of the electronic device is 1, and then the corresponding vigilance coefficient is determined to be 0. Then, the electronic device inputs the vigilance coefficient and the permission information for obtaining the location information of the electronic device into the random forest classifier, and obtains the recommendation result corresponding to the permission request initiated by the above-mentioned SS map, including granting the SS map the real permission to obtain the location information of the electronic device. The recommendation degree, the recommendation degree that grants the virtual authority to obtain the location information of the electronic device to the SS map, and the recommendation degree that does not grant the authority to obtain the location information of the electronic device to the SS map are displayed to the user for selection.
若用户选择禁止授予权限,则该SS地图无法获得电子设备的位置信息。If the user chooses to prohibit granting permission, the SS map cannot obtain the location information of the electronic device.
若用户选择授予真实权限,则电子设备将当前的真实位置信息输出给该SS地图。若用户后面想要将真实权限切换为虚拟权限,则可以通过图14中的(d)图所示的界面将获取电子设备位置信息对应的虚拟权限功能打开,进而使电子设备将应用访问环境切换至虚拟权限环境,并允许SS地图获取电子设备的虚拟位置信息。If the user chooses to grant the real authority, the electronic device outputs the current real location information to the SS map. If the user wants to switch the real permission to the virtual permission later, the virtual permission function corresponding to obtaining the location information of the electronic device can be turned on through the interface shown in (d) in FIG. 14 , so that the electronic device can switch the application access environment to a virtual authority environment and allow SS Maps to obtain virtual location information of electronic devices.
若用户选择授予虚拟权限,则电子设备构造一个虚拟位置信息输出给该SS地图。若用户后面想要将虚拟权限切换为真实权限,则可以通过图14中的(d)图所示的界面将获取电子设备位置信息对应的虚拟权限功能关闭,进而使电子设备将应用访问环境切换至真实权限环境,并允许SS地图获取电子设备的真实位置信息。If the user chooses to grant the virtual authority, the electronic device constructs a virtual location information and outputs it to the SS map. If the user wants to switch the virtual permission to the real permission later, the virtual permission function corresponding to obtaining the location information of the electronic device can be turned off through the interface shown in (d) in FIG. 14 , thereby enabling the electronic device to switch the application access environment. To the real authority environment, and allow SS map to obtain the real location information of electronic devices.
上文详细介绍了本申请实施例提供的权限控制方法的示例。可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Examples of the permission control method provided by the embodiments of the present application are described in detail above. It can be understood that, in order to realize the above-mentioned functions, the electronic device includes corresponding hardware and/or software modules for executing each function. Those skilled in the art should easily realize that the present application can be implemented in hardware or a combination of hardware and computer software with the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functionality for each particular application in conjunction with the embodiments, but such implementations should not be considered beyond the scope of this application.
本申请实施例可以根据上述方法示例对电子设备进行功能模块的划分,例如,可以对应各个功能划分为各个功能模块,例如处理单元、显示单元等,也可以将两个或两个以上的功能集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment of the present application, the electronic device may be divided into functional modules according to the foregoing method examples. For example, each function may be divided into various functional modules, such as a processing unit and a display unit, or two or more functions may be integrated. in a module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. It should be noted that, the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。It should be noted that, all relevant contents of the steps involved in the above method embodiments can be cited in the functional description of the corresponding functional module, which will not be repeated here.
本实施例提供的电子设备,用于执行上述权限控制方法,因此可以达到与上述实现方法相同的效果。The electronic device provided in this embodiment is used to execute the above-mentioned authority control method, and thus can achieve the same effect as the above-mentioned implementation method.
在采用集成的单元的情况下,电子设备还可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对电子设备的动作进行控制管理。存储模块可以用于支持电子设备执行存储程序代码和数据等。通信模块,可以用于支持电子设备与其他设备的通信。Where an integrated unit is employed, the electronic device may also include a processing module, a storage module and a communication module. The processing module may be used to control and manage the actions of the electronic device. The storage module may be used to support the electronic device to execute stored program codes and data, and the like. The communication module can be used to support the communication between the electronic device and other devices.
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为射频电路、蓝牙芯片、Wi-Fi芯片等与其他电子设备交互的设备。The processing module may be a processor or a controller. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and the like. The storage module may be a memory. The communication module may specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, and a Wi-Fi chip.
在一个实施例中,当处理模块为处理器,存储模块为存储器时,本实施例所涉及 的电子设备可以为具有图2所示结构的设备。In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device involved in this embodiment may be a device having the structure shown in FIG. 2 .
本申请实施例还提供了一种计算机可读存储介质,计算机可读存储介质中存储了计算机程序,当计算机程序被处理器执行时,使得处理器执行上述任一实施例的权限控制方法。Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the processor is made to execute the permission control method of any of the foregoing embodiments.
本申请实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的权限控制方法。Embodiments of the present application further provide a computer program product, which, when the computer program product runs on a computer, causes the computer to execute the above-mentioned relevant steps, so as to implement the authority control method in the above-mentioned embodiment.
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的权限控制方法。In addition, the embodiments of the present application also provide an apparatus, which may specifically be a chip, a component or a module, and the apparatus may include a connected processor and a memory; wherein, the memory is used for storing computer execution instructions, and when the apparatus is running, The processor can execute the computer-executed instructions stored in the memory, so that the chip executes the permission control methods in the foregoing method embodiments.
其中,本实施例提供的电子设备、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Wherein, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved, reference may be made to the above-provided method. The beneficial effects in the corresponding method will not be repeated here.
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。From the description of the above embodiments, those skilled in the art can understand that for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be allocated by different The function module is completed, that is, the internal structure of the device is divided into different function modules, so as to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or May be integrated into another device, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。Units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, which are stored in a storage medium , including several instructions to make a device (which may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任 何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above content is only a specific embodiment of the present application, but the protection scope of the present application is not limited to this. Covered within the scope of protection of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

  1. 一种权限控制方法,所述方法由电子设备执行,其特征在于,所述方法包括:An access control method, the method being executed by an electronic device, characterized in that the method comprises:
    获取应用程序发起的权限请求,所述权限请求携带所述应用程序所申请的目标权限的标识信息;Obtain a permission request initiated by an application, where the permission request carries the identification information of the target permission applied for by the application;
    显示所述权限请求对应的选择提示界面,所述选择提示界面包括选择选项和所述权限请求对应的推荐结果,所述选择选项包括允许选项和禁止选项,所述推荐结果包括对所述应用程序授予所述目标权限的推荐程度;A selection prompt interface corresponding to the permission request is displayed, the selection prompt interface includes a selection option and a recommendation result corresponding to the permission request, the selection option includes an allow option and a prohibition option, and the recommendation result includes a recommendation for the application the degree of recommendation to grant said target permission;
    响应于用户对所述选择选项的选择操作,对所述应用程序授予所述目标权限,或者对所述应用程序不授予所述目标权限。In response to the user selecting the selection option, the target permission is granted to the application, or the target permission is not granted to the application.
  2. 根据权利要求1所述的方法,其特征在于,所述推荐结果还包括对所述应用程序不授予所述目标权限的推荐程度。The method according to claim 1, wherein the recommendation result further comprises a recommendation degree that the target permission is not granted to the application.
  3. 根据权利要求1或2所述的方法,其特征在于,所述选择选项还包括虚拟权限选项,所述推荐结果还包括对所述应用程序授予目标虚拟权限的推荐程度。The method according to claim 1 or 2, wherein the selection option further includes a virtual permission option, and the recommendation result further includes a recommendation degree for granting the target virtual permission to the application.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,若所述应用程序所发起的权限请求的数量为多个,所述显示所述权限请求对应的选择提示界面,包括:The method according to any one of claims 1-3, wherein if the number of permission requests initiated by the application program is multiple, the displaying a selection prompt interface corresponding to the permission request includes:
    依次显示每个权限请求对应的选择提示界面;Display the selection prompt interface corresponding to each permission request in turn;
    或者,or,
    同时显示多个权限请求对应的选择提示界面。Simultaneously display the selection prompt interface corresponding to multiple permission requests.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述权限请求对应的推荐结果的确定方式包括:The method according to any one of claims 1-4, wherein the method for determining the recommendation result corresponding to the permission request comprises:
    获取所述应用程序对应的应用类型;Obtain the application type corresponding to the application;
    根据所述应用类型和所述目标权限的标识信息,确定所述权限请求对应的推荐结果。A recommendation result corresponding to the permission request is determined according to the application type and the identification information of the target permission.
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述应用类型和所述目标权限的标识信息,确定所述权限请求对应的推荐结果,包括:The method according to claim 5, wherein the determining a recommendation result corresponding to the permission request according to the application type and the identification information of the target permission comprises:
    将所述应用类型和所述目标权限的标识信息输入预设的机器学习模型,确定所述权限请求对应的推荐结果。Input the identification information of the application type and the target permission into a preset machine learning model, and determine the recommendation result corresponding to the permission request.
  7. 根据权利要求5所述的方法,其特征在于,所述根据所述应用类型和所述目标权限的标识信息,确定所述权限请求对应的推荐结果,包括:The method according to claim 5, wherein the determining a recommendation result corresponding to the permission request according to the application type and the identification information of the target permission comprises:
    根据所述应用类型、以及预设的应用类型与可授予的权限之间的对应关系,确定所述应用程序的可授予的权限的标识信息;Determine the identification information of the grantable permission of the application according to the application type and the corresponding relationship between the preset application type and the grantable permission;
    根据所述可授予的权限的标识信息和所述目标权限的标识信息,确定所述权限请求对应的推荐结果。According to the identification information of the grantable authority and the identification information of the target authority, a recommendation result corresponding to the authority request is determined.
  8. 根据权利要求7所述的方法,其特征在于,所述根据所述可授予的权限的标识信息和所述目标权限的标识信息,确定所述权限请求对应的推荐结果,包括:The method according to claim 7, wherein the determining the recommendation result corresponding to the permission request according to the identification information of the grantable permission and the identification information of the target permission comprises:
    根据所述可授予的权限的标识信息和所述目标权限的标识信息,确定所述目标权限对应的第一系数,当所述可授予的权限包括所述目标权限时,所述第一系数为第一预设值,当所述可授予的权限不包括所述目标权限时,所述第一系数为申请过所述目标权限的应用程序在权限集合中的数量占比,所述权限集合为参考应用程序和所述参 考应用程序所申请过的权限的集合,所述参考应用程序的应用类型与所述应用程序的应用类型相同;A first coefficient corresponding to the target authority is determined according to the identification information of the grantable authority and the identification information of the target authority. When the grantable authority includes the target authority, the first coefficient is The first preset value, when the grantable permission does not include the target permission, the first coefficient is the ratio of the number of applications that have applied for the target permission in the permission set, and the permission set is A reference application and a collection of permissions applied for by the reference application, where the application type of the reference application is the same as the application type of the application;
    根据所述第一系数确定第二系数,所述第一系数和所述第二系数之和为第二预设值;A second coefficient is determined according to the first coefficient, and the sum of the first coefficient and the second coefficient is a second preset value;
    将所述第二系数和所述目标权限的标识信息输入预设的机器学习模型,确定所述权限请求对应的推荐结果。The second coefficient and the identification information of the target authority are input into a preset machine learning model, and a recommendation result corresponding to the authority request is determined.
  9. 一种电子设备,其特征在于,包括:处理器、存储器和接口;An electronic device, comprising: a processor, a memory and an interface;
    所述处理器、存储器和接口相互配合,使得所述电子设备执行如权利要求1至8中任一项所述的方法。The processor, memory and interface cooperate to cause the electronic device to perform the method of any one of claims 1 to 8.
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储了计算机程序,当所述计算机程序被处理器执行时,使得所述处理器执行权利要求1至8中任一项所述的方法。A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the processor is made to execute any one of claims 1 to 8 method described in item.
PCT/CN2021/138388 2021-01-29 2021-12-15 Permission control method and electronic device WO2022160991A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110127457.9 2021-01-29
CN202110127457.9A CN114817939A (en) 2021-01-29 2021-01-29 Authority control method and electronic equipment

Publications (1)

Publication Number Publication Date
WO2022160991A1 true WO2022160991A1 (en) 2022-08-04

Family

ID=82526777

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/138388 WO2022160991A1 (en) 2021-01-29 2021-12-15 Permission control method and electronic device

Country Status (2)

Country Link
CN (1) CN114817939A (en)
WO (1) WO2022160991A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116049241A (en) * 2022-08-10 2023-05-02 荣耀终端有限公司 Service recommendation method, electronic equipment and medium
CN116708886A (en) * 2022-11-22 2023-09-05 荣耀终端有限公司 Video processing method, device and storage medium
CN116702100A (en) * 2022-10-21 2023-09-05 荣耀终端有限公司 Authority management method and electronic equipment
CN116708886B (en) * 2022-11-22 2024-05-14 荣耀终端有限公司 Video processing method, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105354489A (en) * 2015-10-29 2016-02-24 小米科技有限责任公司 Right granting method and apparatus
CN108537011A (en) * 2018-03-16 2018-09-14 维沃移动通信有限公司 A kind of application permission processing method, terminal and server
CN110889109A (en) * 2018-09-10 2020-03-17 中兴通讯股份有限公司 Permission determination method and device and computer readable storage medium
CN111814181A (en) * 2020-06-30 2020-10-23 平安科技(深圳)有限公司 System authority authorization method and device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105354489A (en) * 2015-10-29 2016-02-24 小米科技有限责任公司 Right granting method and apparatus
CN108537011A (en) * 2018-03-16 2018-09-14 维沃移动通信有限公司 A kind of application permission processing method, terminal and server
CN110889109A (en) * 2018-09-10 2020-03-17 中兴通讯股份有限公司 Permission determination method and device and computer readable storage medium
CN111814181A (en) * 2020-06-30 2020-10-23 平安科技(深圳)有限公司 System authority authorization method and device, electronic equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116049241A (en) * 2022-08-10 2023-05-02 荣耀终端有限公司 Service recommendation method, electronic equipment and medium
CN116702100A (en) * 2022-10-21 2023-09-05 荣耀终端有限公司 Authority management method and electronic equipment
CN116702100B (en) * 2022-10-21 2024-04-16 荣耀终端有限公司 Authority management method and electronic equipment
CN116708886A (en) * 2022-11-22 2023-09-05 荣耀终端有限公司 Video processing method, device and storage medium
CN116708886B (en) * 2022-11-22 2024-05-14 荣耀终端有限公司 Video processing method, device and storage medium

Also Published As

Publication number Publication date
CN114817939A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
WO2020182065A1 (en) Shortcut function activation method and electronic device
WO2020259452A1 (en) Full-screen display method for mobile terminal, and apparatus
WO2021213164A1 (en) Application interface interaction method, electronic device, and computer readable storage medium
US11868463B2 (en) Method for managing application permission and electronic device
WO2021036770A1 (en) Split-screen processing method and terminal device
CN110276177B (en) Login method of intelligent terminal and electronic equipment
US20230140946A1 (en) Method for Recommending Service, Electronic Device, and System
WO2021253975A1 (en) Permission management method and apparatus for application, and electronic device
WO2020024108A1 (en) Application icon display method and terminal
WO2020107463A1 (en) Electronic device control method and electronic device
WO2022089121A1 (en) Method and apparatus for processing push message
WO2022160991A1 (en) Permission control method and electronic device
CN114006698B (en) token refreshing method and device, electronic equipment and readable storage medium
WO2022166435A1 (en) Picture sharing method and electronic device
CN113590346B (en) Method and electronic equipment for processing service request
WO2021147483A1 (en) Data sharing method and apparatus
CN115016666B (en) Touch processing method, terminal equipment and storage medium
WO2021104000A1 (en) Screen display method and electronic device
WO2022179495A1 (en) Privacy risk feedback method and apparatus, and first terminal device
WO2022222733A1 (en) Data transmission method and related device
WO2022052767A1 (en) Method for controlling device, electronic device, and system
WO2022042774A1 (en) Profile picture display method and electronic device
WO2023197999A1 (en) Display method and electronic device
WO2023155583A1 (en) Cross-device application management method, electronic device, and system
WO2022143273A1 (en) Information processing method and electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21922581

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21922581

Country of ref document: EP

Kind code of ref document: A1