Method, device, chip and terminal for detecting rationality of application permission use
By entering the target application's permission usage record information into the preset classification model, the rationality of the application's permission usage is detected, which solves the problem that users are difficult to judge when granting application permissions, and provides reasonable detection results to help users make decisions.
Patent Information
- Application Number
- CN202111009139.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-30
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2041-08-30
AI Technical Summary
It is difficult for users to make reasonable judgments when deciding whether to grant the application permission to access certain system resources of the operating system.
By obtaining the target permission usage record information of the target application and inputting it into the preset classification model, we obtain the reasonable detection result of the target application using the target permission.
Help users determine whether to grant target applications access to target permissions based on reasonable detection results, solving the problem that users find it difficult to make reasonable judgments.
Smart Images

Figure CN114091047B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of permission management, and in particular, relates to a method, device, chip and terminal for detecting the rationality of permission use of an application. Background Art
[0002] At present, more and more applications are installed on terminals. Usually, these applications need to apply for corresponding application permissions before accessing system resources of the operating system, such as permissions to read contacts, read call records, and access cameras.
[0003] Therefore, users often encounter the situation of whether to grant a certain application program the permission to access certain system resources of the operating system. In view of this situation, it is usually difficult for users to make a reasonable judgment. Summary of the invention
[0004] The embodiments of the present application provide a method, device, chip and terminal for detecting the rationality of application permission usage, which can help users determine whether to grant a certain application program permission to access certain system resources of the operating system.
[0005] A first aspect of an embodiment of the present application provides a method for detecting the rationality of permission usage of an application, including:
[0006] For the target permission, obtain the target permission usage record information of the target application;
[0007] Inputting the target permission usage record information of the target application into a preset classification model, and obtaining the rationality detection result of the target application using the target permission output by the preset classification model, wherein the rationality detection result is divided into types: rational and unreasonable;
[0008] Output the rationality test results.
[0009] A second aspect of an embodiment of the present application provides a classification model training method, comprising:
[0010] For the target permissions, obtain the usage record information of multiple sample permissions of the sample application;
[0011] Obtain the rationality label of each sample permission usage record information, where the rationality label is divided into the following types: rational and unreasonable;
[0012] Based on the permission usage record information of each sample and the corresponding rationality label, supervised learning is performed on the classification model to be trained. After the supervised learning of the classification model to be trained is completed, a preset classification model is obtained.
[0013] A third aspect of an embodiment of the present application provides a device for detecting the rationality of permission usage of an application, including:
[0014] A first acquisition unit is used to acquire target permission usage record information of a target application for a target permission;
[0015] The detection unit is used to input the target permission usage record information of the target application into a preset classification model to obtain a rationality detection result of the target application using the target permission output by the preset classification model, wherein the rationality detection result is divided into types: reasonable and unreasonable;
[0016] The output unit is used to output the rationality detection result.
[0017] A fourth aspect of an embodiment of the present application provides a training device for a classification model, comprising:
[0018] A second acquisition unit is used to acquire, for a target permission, a plurality of sample permission usage record information of a sample application;
[0019] The third acquisition unit is used to acquire the rationality label of each sample permission usage record information, wherein the rationality label is divided into types: reasonable and unreasonable;
[0020] The training unit is used to perform supervised learning on the classification model to be trained based on the permission usage record information of each sample and the corresponding rationality label, and obtain the preset classification model after completing the supervised learning of the classification model to be trained.
[0021] The fifth aspect of the embodiment of the present application provides a chip, including a processor, the processor is used to read and execute a computer program stored in a memory to implement the steps of the method of the first aspect and / or the second aspect above.
[0022] A sixth aspect of an embodiment of the present application provides a terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method of the first aspect and / or the second aspect when executing the computer program.
[0023] A seventh aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the method of the first aspect and / or the second aspect are implemented.
[0024] In an embodiment of the present application, by inputting the target permission usage record information of the target application into a preset classification model, a rationality detection result of the target application using the target permission output by the preset classification model is obtained, so that the user can have a clearer understanding of whether the use of the target permission by the target application is reasonable based on the rationality detection result, thereby helping the user to make a judgment on whether to grant the target application access to the target permission, thereby solving the problem of users having difficulty in making reasonable judgments when it comes to whether to grant a certain application permission to access certain system resources of the operating system. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the method scheme of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0026] Figure 1 is a schematic diagram of the hardware structure of the terminal provided in the embodiment of the present application;
[0027] Figure 2 is a schematic diagram of the software structure of the terminal provided in the embodiment of the present application;
[0028] Figure 3 It is a schematic diagram of the implementation flow of the method for detecting the rationality of the permission usage of an application provided in an embodiment of the present application;
[0029] Figure 4 It is a schematic diagram of the implementation flow of the training method of the preset classification model provided in the embodiment of the present application;
[0030] Figure 5 This is a schematic diagram of a first implementation flow of obtaining a rationality label for sample permission usage record information provided in an embodiment of the present application;
[0031] Figure 6 This is a schematic diagram of a second implementation flow of obtaining a rationality label of sample permission usage record information provided in an embodiment of the present application;
[0032] Figure 7 It is a structural diagram of a device for detecting rationality of application permission usage provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the purpose, method scheme and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0034] The "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more than two, "at least one" and "one or more" mean one, two or more than two.
[0035] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0036] The method of the embodiment of the present application can be applied to a variety of terminals, for example, mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), and other terminals with application programs installed. The embodiment of the present application does not impose any restrictions on the specific type of the terminal.
[0037] Take the above terminal as a mobile phone as an example. Figure 1 FIG. 1 is a schematic diagram showing a partial structure of a mobile phone provided in an embodiment of the present application. Figure 1 The mobile phone includes: a radio frequency (RF) circuit 110, a memory 120, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a wireless fidelity (Wi-Fi) module 170, a processor 180, and a power supply 190. Those skilled in the art will understand that Figure 1 The mobile phone structure shown in the figure does not constitute a limitation on the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0038] The memory 120 can be used to store software programs and modules, and the processor 180 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 120. The memory 120 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 120 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0039] The processor 180 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 120, and calling data stored in the memory 120, it executes various functions of the mobile phone and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 180 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 180 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array).
[0040] The processor 180 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also called a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state.
[0041] It is understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal. In other embodiments of the present application, the device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0042] Figure 2 1 is a schematic diagram of the software structure of the mobile phone 100 of the embodiment of the present application. Taking the operating system of the mobile phone 100 as an example, in some embodiments, the Android system is divided into four layers, namely, the application layer, the application framework layer (framework, FWK), the system layer and the hardware abstraction layer, and the layers communicate with each other through software interfaces.
[0043] like Figure 2 As shown, the above application layer may include a series of application packages, and the application packages may include short message, calendar, camera, video, navigation, gallery, call and other applications.
[0044] The application framework layer provides an application programming interface (API) and a programming framework for the application programs of the application layer. The application framework layer may include some predefined functions, such as a function for receiving events sent by the application framework layer.
[0045] like Figure 2 As shown, the application framework layer may include a window manager, a resource manager, a notification manager, and the like.
[0046] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc. The content provider is used to store and obtain data and make this data accessible to applications. This data can include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0047] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0048] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0049] The application framework layer may also include: a view system, which includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text notification icon may include a view for displaying text and a view for displaying pictures.
[0050] The system layer may include multiple functional modules, such as sensor service module, physical state recognition module, 3D graphics processing library (such as OpenGL ES), etc.
[0051] Among them, the sensor service module is used to monitor the sensor data uploaded by various sensors at the hardware layer to determine the physical state of the mobile phone 100; the physical state recognition module is used to analyze and recognize user gestures, faces, etc.; the three-dimensional graphics processing library is used to implement three-dimensional graphics drawing, image rendering, synthesis and layer processing, etc.
[0052] The hardware abstraction layer is a layer between hardware and software. The hardware abstraction layer can include display drivers, camera drivers, sensor drivers, etc., which are used to drive related hardware of the hardware layer, such as display screens, cameras, sensors, etc.
[0053] The following embodiments can be implemented on a mobile phone having the above hardware structure / software structure. The following is an explanation of the method, device, chip and terminal for detecting the rationality of the use of permissions of an application provided in the embodiments of the present application.
[0054] At present, there are more and more applications installed on terminals. Usually, these applications (hereinafter referred to as "applications") need to apply for corresponding application permissions before accessing system resources of the operating system, such as the permissions to read contacts, read call records, and access the camera.
[0055] In order to avoid leaking the user's privacy, permission management is required. The following is an example of an Android system installed on the terminal. It can be understood that the embodiment of the present application does not limit the type of operating system installed on the terminal.
[0056] Specifically, the Android system has always been known for its openness and freedom. Compared with other "closed" operating systems, although it is more free to use, it also loses a certain degree of security accordingly. The changes in the management of permissions in the Android system can be roughly divided into four periods.
[0057] In the first period, there were almost no restrictions on apps. In the early Android system (before Android 6.0), before installing an app, all the permissions requested by the app would be listed. If the installation continued, it would be deemed that the user agreed to grant the app the permissions it needed. Users often did not have the right to choose authorization, and could only view the permission list and choose to continue installation or cancel installation. This is very convenient for developers, as they only need to configure the permissions required by the app in the manifest file, and then the app can directly call these permissions. However, for users, since all these operations are beyond the control of users (unless they choose not to install), this method poses a huge security risk.
[0058] In the second period, some security applications began to manage permissions. In order to solve the increasingly serious problem of unreasonable use of some sensitive permissions, security applications were developed to monitor and prompt other applications for obtaining sensitive permissions on mobile phones. For example, when products such as 360 Mobile Guard and Tencent Mobile Manager detect that an App is trying to access privacy permissions such as the camera, they will inform the user in a more obvious way (such as a pop-up window) and provide an option for the user to refuse to grant permissions. At first, these security applications were relatively smooth, but as mobile phone and other terminal manufacturers began to make major modifications to the native system, the performance of security applications was unsatisfactory.
[0059] In the third period, mobile phone and other terminal manufacturers became the main force of permission management. As time went on, mobile phone and other terminal manufacturers began to optimize ROM and added functions such as permission prompts, management, and optimization for third-party software.
[0060] In the above three periods, the App does not need to make any changes when applying for permissions, only the Manifest needs to be configured. This is also called static permission management.
[0061] In the fourth period, we began to focus on optimizing the system's permission management function. Android 6.0, launched in 2015, added the function of dynamic permission management. Apps need to modify the permission code before they can use the corresponding permissions normally. It can be understood as: first determine whether the user has authorized a certain permission; if a certain permission is not authorized, you need to apply for the permission, and only when the user authorizes the permission can you continue the operation.
[0062] After going through the above-mentioned major periods, major manufacturers now have their own permission management mechanisms. Here is a brief description of the features of each manufacturer:
[0063] Android native: In Android 10, the location permission options are divided into "During Use" (new item), "Always Allow", "Deny", and App background positioning is reduced; in Android 11, whenever an app requests permissions related to location information, microphone, or camera, the user-facing permission dialog box will include a "This time only" option. If the user selects this option in the dialog box, the system grants a temporary one-time authorization to the app. In addition, if the app targets Android 11 or higher and has not been used for several months, the system protects user data by automatically resetting runtime sensitive permissions that the user has granted the app. This action has the same effect as the user viewing permissions in the system settings and changing the app's access level to deny.
[0064] In addition, some manufacturers have taken the lead in launching functions such as "flares" and "blank passes", which further expose the behavior of applications obtaining permissions to the user's view, and give users the right to grant more operations (such as allowing permissions but providing virtual information), which plays a certain role in controlling the behavior of applications abusing permissions.
[0065] There are also some manufacturers who take the lead in forming a software green alliance to formulate norms for the use of permissions by some applications and conduct regular evaluations of applications. Apps that pass the evaluations will have special marks in the store for users to refer to.
[0066] From this, we can see that manufacturers now have certain control measures on application usage permissions, especially some sensitive permissions, and even provide the function of providing virtual authorization. However, few manufacturers pay attention to a question, that is, whether the behavior of some applications using permissions is reasonable and to what extent.
[0067] For example, some manufacturers simply display some of the behaviors of the application to users without deeper interpretation. Some manufacturers have the function of recording permission behaviors, but they only show users how many times a certain permission is used during operation of an application, whether it is allowed, etc., without deeper interpretation, which often causes confusion to users, such as: why does the application use so many permissions, is this reasonable, etc.
[0068] Therefore, currently, it is usually difficult for users to make reasonable judgments when it comes to whether to grant a certain application program permission to access certain system resources of the operating system.
[0069] To address this issue, generally, you can set up an application blacklist or whitelist to remind users to reject certain applications' applications for certain permissions. However, faced with a large number of applications and permission usage, the system often finds it difficult to make a judgment, and therefore has certain limitations.
[0070] Based on this, the embodiments of the present application provide a method, device, chip and terminal for detecting the rationality of application permission usage, which can help users determine whether to grant a certain application program permission to access certain system resources of the operating system.
[0071] Specifically, the present application provides a method, device, chip and terminal for detecting the rationality of application permission usage. By inputting the target permission usage record information of the target application into a preset classification model, a rationality detection result of the target application using the target permission output by the preset classification model is obtained, so that the user can make a judgment on whether to grant the target application access to the target permission based on the rationality detection result.
[0072] In order to better understand the method for detecting the rationality of permission usage provided in the embodiment of the present application, the specific implementation process is introduced from the implementation level in conjunction with the accompanying drawings.
[0073] For example, Figure 3 A schematic flow chart of a method for detecting the rationality of permission usage of an application provided in an embodiment of the present application is shown. The method for detecting the rationality of permission usage of an application configured by the above terminal can be executed, and specifically includes the following steps 301 to 304.
[0074] Step 301: For a target permission, obtain target permission usage record information of a target application.
[0075] In an embodiment of the present application, the above-mentioned target permissions may refer to preset privacy permissions. For example, permissions such as reading contacts, reading location information, reading external storage space, reading text messages, reading call records, accessing cameras, recording, and making calls. The above-mentioned target application may refer to an application installed on the terminal, or an application that needs to be detected according to user needs. This application does not limit the above-mentioned target permissions and the types of the above-mentioned target applications, nor does it limit the sources of the above-mentioned target applications.
[0076] For example, the target application may be a game application, a navigation application, a social application, or other application types.
[0077] In some embodiments of the present application, the target permission usage record information of the above-mentioned target application may include at least one of the following information: the proportion of first permission application times, the proportion of second permission application times, the proportion of allowed times, the flow of access data and the number of permission closure times.
[0078] Among them, the proportion of the first permission application times is the ratio of the number of times the target application applies for the target permission when the target application runs in the foreground to the total number of times the target application applies for the target permission; the proportion of the second permission application times is the ratio of the number of times the target application applies for the target permission when the target application runs in the background to the total number of times the target application applies for the target permission; the proportion of allowed times is the ratio of the number of times the target application applies for the target permission and is allowed to the total number of times the target application applies for the target permission; the access data is the data obtained by the target application based on the target permission; the number of permission closures is the number of times the target permission of the target application is set to closed.
[0079] Specifically, in some embodiments of the present application, since the application is in the background, according to the principle of "apply as you use it", in theory no permissions should be applied for (except for navigation applications). Therefore, the permission usage of the target application can be distinguished based on whether the target application is running in the foreground or the background, and whether the permission usage of the application is reasonable can be judged based on the proportion of the first permission application times and / or the proportion of the second permission application times.
[0080] In some embodiments of the present application, if the target application is often rejected when applying for a certain target permission, it means that the target application is likely to have malicious intent in applying for the target permission. Therefore, whether the application's permission usage is reasonable can be judged based on the number of times the target application applies for the target permission and is allowed.
[0081] In addition, some applications currently integrate many software development kits (SDKs) to achieve the purpose of pushing advertisements in order to achieve business purposes. Therefore, in some embodiments of the present application, the flow of access data can be obtained to determine whether the access data is provided to the SDK, and then determine whether the application's permission usage is reasonable. That is, when the access data is provided to the SDK, it can be determined that the application's permission usage is somewhat unreasonable, otherwise, it is determined that the application's permission usage is reasonable.
[0082] When a target permission of a target application is frequently actively closed by the user, then this target permission may not be important to the target application, or may easily cause user disgust. Therefore, in some embodiments of the present application, it is possible to determine whether the application's permission usage is reasonable for the target permission based on the number of times the permission is closed.
[0083] It should be noted that the above is only an example of the type of information included in the target permission usage record information of the target application. It is understandable that in other embodiments of the present application, other types of information may also be included. For example, the frequency of the target application using the target permission in a certain time period and other information are not limited in the present application.
[0084] Step 302: Input the target permission usage record information of the target application into a preset classification model to obtain a rationality detection result of the target application using the target permission, wherein the rationality detection result is divided into types: rational and unreasonable.
[0085] In the embodiment of the present application, the preset classification model may be a pre-trained model used to detect whether target permission usage record information of a target application is reasonable.
[0086] Optionally, the unreasonableness in the above rationality detection results can be divided into different types of unreasonableness.
[0087] For example, in some embodiments of the present application, the above-mentioned unreasonableness can be divided into several types, such as severe unreasonableness, moderate unreasonableness, and mild unreasonableness; or, the above-mentioned unreasonableness can only include severe unreasonableness and mild unreasonableness, etc. The present application does not limit the way of dividing unreasonableness.
[0088] In some implementations of the present application, the above step 301, obtaining the target permission usage record information of the target application for the target permission, may refer to obtaining the target permission usage record information of each target permission of the target application for one or more target permissions.
[0089] Accordingly, the above step 302 may refer to inputting the target permission usage record information of each target permission of the target application into the preset classification model in sequence, and obtaining the rationality detection results of the target application using each target permission respectively.
[0090] Step 303: output the rationality detection result.
[0091] When outputting the rationality detection results, it can be achieved through pop-up windows, providing cards, sending text messages, regularly providing analysis reports, etc. This application does not impose any restrictions on this.
[0092] The present application inputs the target permission usage record information of the target application into a preset classification model to obtain a rationality detection result of the target application's use of the target permission output by the preset classification model, so that the user can have a clearer understanding of whether the target application's use of the target permission is reasonable based on the rationality detection result, and then help the user make a judgment on whether to grant the target application access to the target permission, solving the problem that users find it difficult to make reasonable judgments when it comes to whether to grant a certain application permission to access certain system resources of the operating system.
[0093] In the embodiment of the present application, in the above step 302, before inputting the target permission usage record information of the target application into the preset classification model, the above preset classification model can be obtained first.
[0094] Among them, the preset classification model can be a classification model obtained based on supervised learning or unsupervised learning, or it can be a classification model obtained by non-machine learning, and this application does not impose any restrictions on this.
[0095] Specifically, in some embodiments of the present application, Figure 4 As shown, the above-mentioned preset classification model can be generated in a supervised manner based on the following steps 401 to 403.
[0096] Step 401, for the target permission, obtain multiple sample permission usage record information of the sample application.
[0097] The sample applications may include applications of the same type as the target application.
[0098] For example, if the target application is a navigation application, the sample applications may include navigation applications from different manufacturers, or navigation applications from the same manufacturer in different versions.
[0099] Specifically, since the rationality evaluation results for the same permission usage record for different types of applications are often different, when using a preset classification model to perform rationality detection on the target permission usage record information of the target application, the preset classification model is required to be trained with multiple sample permission usage record information of applications of the same type as the target application during the training process, so that the trained preset classification model can output relatively accurate rationality detection results based on the target permission usage record information of the target application.
[0100] It should be noted that when distinguishing the types of applications, the distinction can be made based on the functions of the applications. That is, when the rationality of using the target permission for a function of an application is detected, all applications containing the function can be identified as applications of the same type.
[0101] It can be understood that the above-mentioned sample application may include the above-mentioned target application.
[0102] Furthermore, the information types included in the plurality of sample permission usage record information of the sample application and the target permission usage record information of the target application may be the same.
[0103] For example, the multiple sample permission usage record information of the above-mentioned sample application may include at least one of the following information: the percentage of sample first permission application times, the percentage of sample second permission application times, the percentage of sample allowed times, the flow of sample access data, and the number of times sample permissions are closed.
[0104] Among them, the proportion of the sample's first permission application times is the ratio of the number of times the sample application applies for the target permission when running in the foreground to the total number of times the sample application applies for the target permission; the proportion of the sample's second permission application times is the ratio of the number of times the sample application applies for the target permission when running in the background to the total number of times the sample application applies for the target permission; the proportion of the sample's allowed times is the ratio of the number of times the sample application applies for the target permission and is allowed to the total number of times the sample application applies for the target permission; the sample access data is the data obtained by the sample application based on the target permission; the sample permission closure times is the number of times the target permission of the sample application is set to closed.
[0105] Step 402, obtaining the rationality label of each sample permission usage record information.
[0106] When the classification model is trained in a supervised manner, the sample permission usage record information is required to be a sample with a label. Therefore, after obtaining multiple sample permission usage record information of the sample application, it is necessary to obtain the rationality label of each sample permission usage record information.
[0107] In an embodiment of the present application, the rationality label of the sample permission usage record information corresponds to the rationality detection result output by the preset classification model. The only difference between the two is that the former is the output during the model training process, and the latter is the output during the model usage process.
[0108] Therefore, the types of rationality label division mentioned above may also include: reasonable and unreasonable.
[0109] Furthermore, in the types of rationality label classification, the unreasonable types can also have the same classification as the unreasonable types in the rationality detection results. That is, they can also be classified into different types of unreasonableness.
[0110] For example, in some embodiments of the present application, the unreasonableness in the types of rationality label classification may include: severe unreasonableness, moderate unreasonableness and slight unreasonableness.
[0111] Optionally, in some implementations of the present application, the above step 402 of obtaining the rationality label of each sample permission usage record information can be obtained by unsupervised learning.
[0112] Specifically, an anomaly detection algorithm may be used to screen multiple sample permission usage record information to obtain a rationality label for each sample permission usage record information.
[0113] Among them, the above-mentioned anomaly detection algorithm, also known as outlier detection, is a detection process to find objects whose behavior is significantly different from the expected object. These detected objects are called anomalies or outliers. That is, the sample permission usage record information labeled as unreasonable in this application.
[0114] The anomaly detection algorithm in the embodiment of the present application can be implemented by using an anomaly detection algorithm based on statistical method, linear method, distance method, etc., and the present application does not impose any restrictions on this.
[0115] Optional, such as Figure 5 As shown, in some embodiments of the present application, in the process of using an anomaly detection algorithm to screen multiple sample permission usage record information and obtain the rationality label of each sample permission usage record information, it can be specifically implemented by the following steps 501 to 503.
[0116] Step 501, obtaining the hierarchical screening ratio of the anomaly detection algorithm.
[0117] In the embodiment of the present application, the above-mentioned hierarchical screening ratio can be determined according to the rationality label division method. For example, the total number of rationality label division types is the same as the number of hierarchical screening ratio divisions.
[0118] For example, when the types of rationality label division mentioned above include: reasonable and unreasonable; and when the unreasonable types in the rationality label division include: severely unreasonable, moderately unreasonable and slightly unreasonable, the graded screening ratio can be set as: severely unreasonable x%, moderately unreasonable (yx)%, slightly unreasonable (zyx)%, and reasonable (1-zyx)%.
[0119] Step 502: perform hierarchical screening on multiple sample permission usage record information based on the hierarchical screening ratio to obtain a first initial label for each sample permission usage record information.
[0120] Specifically, based on the examples of the aforementioned steps, in some embodiments of the present application, when the graded screening ratio is: severely unreasonable x%, moderately unreasonable (yx)%, slightly unreasonable (zyx)%, and reasonable (1-zyx)%, the top x% of abnormal data can be screened out from multiple sample permission usage record information as severely unreasonable data, and then the top y% of abnormal data can be screened out from multiple sample permission usage record information to obtain (yx)% of moderately unreasonable data, and so on, to obtain the first initial label of each sample permission usage record information.
[0121] Step 503, calculate the accuracy of the first initial label of unreasonable type in the first initial label, and after updating the graded screening ratio according to the accuracy, return to execute the step of graded screening of multiple sample permission usage record information based on the graded screening ratio and subsequent steps, until the accuracy of the first initial label is stable within the preset accuracy range, and use the first initial label of each sample permission usage record information as the rationality label of each sample permission usage record information.
[0122] It should be noted that, since there is no prior value input in the process of using the unsupervised learning method to obtain the first initial label of the above-mentioned sample permission usage record information, the above-mentioned graded screening ratio can be tried from a relatively large range first and then continuously narrowed, or tried from a relatively small range first and then continuously expanded to obtain the rationality label of each sample permission usage record information.
[0123] That is, in an embodiment of the present application, after obtaining the first initial label of each sample permission usage record information, it is necessary to calculate the accuracy of the first initial label of each sample permission usage record information that is of unreasonable type, and after updating the graded screening ratio according to the accuracy, return to execute the step of graded screening of multiple sample permission usage record information based on the graded screening ratio and subsequent steps, until the accuracy of the first initial label is stabilized within the preset accuracy range, and the first initial label of each sample permission usage record information is used as the rationality label of each sample permission usage record information.
[0124] Specifically, in practical applications, since the proportion of abnormal data in multiple sample permission usage record information is small, for example, only about 0.01% of the total data, it is only necessary to calculate the accuracy of the unreasonable first initial label of each sample permission usage record information determined by the anomaly detection algorithm, without determining whether the first initial label of each sample permission usage record information is accurate one by one, and then calculating the accuracy of the first initial label of each sample permission usage record information.
[0125] Therefore, after obtaining the first initial label of each sample permission usage record information, the sample permission usage record information labeled as unreasonable can be verified by manual verification or other methods to determine whether it corresponds to its label, and then the accuracy rate of the first initial label of unreasonable type in the first initial label of each sample permission usage record information can be calculated.
[0126] In an embodiment of the present application, after calculating the accuracy of the first initial label of each sample permission usage record information whose type is unreasonable, when the accuracy is large, for example, 100%, it means that the graded screening ratio of labels whose type is unreasonable may be too low. Therefore, the graded screening ratio of labels whose type is unreasonable can be increased. Otherwise, the graded screening ratio of labels whose type is unreasonable can be reduced. When the accuracy of the first initial label is stable within the preset accuracy range, the first initial label of each sample permission usage record information is used as the rationality label of each sample permission usage record information.
[0127] In the embodiment of the present application, the accuracy of the above-mentioned first initial label is stable within the preset accuracy range, which may mean that: after the accuracy of the first initial label is within the preset accuracy range, if the hierarchical screening ratio is increased according to the above-mentioned accuracy, the accuracy decreases, and, if the hierarchical screening ratio is reduced according to the above-mentioned accuracy, the accuracy reaches 100%. Moreover, when the accuracy of the first initial label has stabilized, the first initial label representing each sample permission usage record information can be used as a rationality label for each sample permission usage record information.
[0128] Optionally, in an embodiment of the present application, the above-mentioned preset accuracy range can be set according to actual experience, for example, it can be set to 99.99% to 99.999%, and the present application does not impose any limitation on this.
[0129] In addition to using the above Figure 5 In addition to obtaining the rationality label of each sample permission usage record information in the manner shown, in some embodiments of the present application, when the number of sample permission usage record information is relatively large, in order to improve the efficiency of obtaining the rationality label of each sample permission usage record information, in some embodiments of the present application, after supervised learning is performed on the classification model to be trained based on a preset number of sample permission usage record information and corresponding rationality labels, such as Figure 6 As shown, the following steps 601 to 602 may also be used to implement the process.
[0130] Step 601: input the sample permission usage record information with undetermined rationality labels into the classification model to be trained, and obtain the second initial label of the sample permission usage record information with undetermined rationality labels output by the classification model to be trained.
[0131] Step 602: verify and correct the unreasonable second initial labels in the second initial labels to obtain the rationality labels of the sample permission usage record information whose rationality labels have not been determined.
[0132] In the embodiment of the present application, the efficiency of using the classification model to evaluate the rationality of the sample permission usage record information is generally better than using the above Figure 5 The unsupervised method shown is efficient in calculating the rationality labels of each sample permission usage record information, and, since after supervised learning is performed on the classification model to be trained based on a preset number of sample permission usage record information and corresponding rationality labels, the classification model to be trained is used to predict the rationality of the sample permission usage record information with undetermined rationality labels, and the accuracy of the second initial label obtained is relatively high. Therefore, after supervised learning is performed on the classification model to be trained based on a preset number of sample permission usage record information and corresponding rationality labels, the classification model to be trained can be used to evaluate the rationality of the sample permission usage record information with undetermined rationality labels, and the second initial labels of each sample permission usage record information with undetermined rationality labels are obtained, and the second initial labels of the unreasonable type in the second initial labels are verified and corrected to obtain the rationality labels of the sample permission usage record information with undetermined rationality labels, so as to improve the efficiency of obtaining the rationality labels of each sample permission usage record information.
[0133] Step 403 , based on each sample permission usage record information and the corresponding rationality label, supervised learning is performed on the classification model to be trained, and after the supervised learning of the classification model to be trained is completed, a preset classification model is obtained.
[0134] In the embodiment of the present application, by using the above Figures 4 to 6 The preset classification model generated in this way evaluates the rationality of the target application using the target permission to obtain a rationality detection result, so that the user can have a clearer understanding of whether the target application using the target permission is reasonable based on the rationality detection result, and then help him make a judgment on whether to grant the target application access to the target permission, which solves the problem that it is difficult for users to make reasonable judgments when it comes to whether to grant a certain application permission to access certain system resources of the operating system.
[0135] It should be noted that the above is merely an example of how to generate a preset classification model and does not limit the scope of protection of the present application. In other embodiments of the present application, the above preset classification model may also be generated by other methods.
[0136] For example, in some embodiments of the present application, the above-mentioned classification model can be trained in an unsupervised manner to obtain the above-mentioned preset classification model.
[0137] Specifically, as mentioned above Figure 5 The unsupervised method shown uses the hierarchical screening ratio determined after obtaining the rationality labels of each sample permission usage record information as a preset value, uses more sample permission usage record information for unsupervised learning, and adjusts the hierarchical screening ratio within a small range to obtain the final preset classification model.
[0138] It should be noted that when the amount of data is small, the preset classification model obtained based on the unsupervised learning can be based on manual verification of the unsupervised learning test results, so a better rationality detection effect can be obtained. When the amount of data is large, it is difficult to give a good verification result based on manual verification. Therefore, based on the above Figure 4 The supervised learning classification model shown is better for rationality detection.
[0139] Optionally, in some embodiments of the present application, after evaluating the rationality of the target application's use of the target permission using a preset classification model and obtaining a rationality detection result, a processing suggestion may be output based on the rationality detection result.
[0140] Specifically, in some embodiments of the present application, the above-mentioned permission usage rationality detection method can also perform the following steps after obtaining the rationality detection result: if the rationality detection result is severely unreasonable, a first prompt message is output to prompt the user to deny the target application from using the target permission; if the rationality detection result is moderately unreasonable, a second prompt message is output to prompt the user to limit the target application from using the target permission; if the rationality detection result is slightly unreasonable, a third prompt message is output to prompt the user that there are a few abnormalities when the target application uses the target permission, so as to further help the user determine whether to grant the target application access to the target permission.
[0141] Optionally, in some embodiments of the present application, the above-mentioned permission usage rationality detection method may also perform the following steps after obtaining the rationality detection result: if the rationality detection result is reasonable, the target application is allowed to use the above-mentioned target permission within a preset time period, or a fourth prompt information is output to prompt the user that the target application is using the above-mentioned target permission normally.
[0142] This application allows users to easily understand the behavior and degree of abnormality of an application on privacy permissions (sensitive permissions) without having to have professional knowledge, and decide whether to handle it based on the prompt information.
[0143] Moreover, since the user can be not only the user of the terminal manufacturer, but also the user of the application, the user-based processing can better urge the application developer to rectify the unreasonable use of application permissions. This application allows users to participate more in application permission management and manage malicious applications together with the terminal manufacturer, rather than just the terminal manufacturer and application developer "fighting wits and courage", which is conducive to promoting the management of application usage permissions.
[0144] In the embodiment of the present application, the above-mentioned preset time period can be set at the factory, and the present application does not impose any restrictions on this.
[0145] The present application also provides a classification model training method, which is implemented based on the following steps A01 to A03:
[0146] Step A01, for the target permission, obtaining multiple sample permission usage record information of the sample application;
[0147] Step A02, obtaining a rationality label of each sample permission usage record information, where the rationality label is divided into the following types: rational and unreasonable;
[0148] Step A03, based on each sample permission usage record information and the corresponding rationality label, supervised learning is performed on the classification model to be trained. After the supervised learning of the classification model to be trained is completed, a preset classification model is obtained.
[0149] The sample application may be an application of the same type as the target application, so that the preset classification model may be used to detect the rationality of permission usage of the target application.
[0150] It should be noted that the specific implementation of the above steps A01 to A03 can refer to the above Figure 4-Figure 6 The description of the illustrated implementation manner will not be repeated here.
[0151] It should also be noted that, for the sake of simplicity of description, the aforementioned method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited to the described order of actions, and in some embodiments of the present application, certain steps may be performed in other orders.
[0152] Figure 7 A schematic diagram of the structure of a device 700 for detecting rationality of permission usage of an application provided in an embodiment of the present application is shown, which includes a first acquisition unit 701, a detection unit 702 and an output unit 703.
[0153] The first acquisition unit 701 is used to acquire target permission usage record information of a target application for a target permission;
[0154] The detection unit 702 is used to input the target permission usage record information of the target application into a preset classification model to obtain a rationality detection result of the target application using the target permission output by the preset classification model, wherein the rationality detection result is divided into types: reasonable and unreasonable;
[0155] The output unit 703 is used to output the rationality detection result.
[0156] It should be noted that, for the convenience and simplicity of description, the specific working process of the permission usage rationality detection device 700 described above can refer to the above Figures 1 to 6 The corresponding process of the method will not be described in detail here.
[0157] Exemplarily, an embodiment of the present application further provides a training device for a classification model, comprising:
[0158] A second acquisition unit is used to acquire, for a target permission, a plurality of sample permission usage record information of a sample application;
[0159] The third acquisition unit is used to obtain the rationality label of each sample permission usage record information, and the rationality label classification types include: reasonable and unreasonable;
[0160] The training unit is used to perform supervised learning on the classification model to be trained based on the permission usage record information of each sample and the corresponding rationality label, and obtain a preset classification model after completing the supervised learning of the classification model to be trained.
[0161] Illustratively, an embodiment of the present application further provides a chip, including a processor, the processor being used to read and execute a computer program stored in a memory to implement the steps of the above-mentioned method for detecting rationality of permission usage.
[0162] Exemplarily, an embodiment of the present application further provides a terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for detecting rationality of permission usage when executing the computer program.
[0163] Exemplarily, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for detecting rationality of permission usage are implemented.
[0164] Illustratively, an embodiment of the present application further provides a computer product, which stores computer instructions, and when the computer instructions are executed, the steps of the above-mentioned method for detecting rationality of permission usage are implemented.
[0165] In each of the above-mentioned embodiments of the present application, by inputting the target permission usage record information of the target application into the preset classification model, a rationality detection result of the target application using the target permission output by the preset classification model is obtained, so that the user can have a clearer understanding of whether the target application is reasonable to use the target permission based on the rationality detection result, and then help the user make a judgment on whether to grant the target application access to the target permission, solving the problem that the user is difficult to make a reasonable judgment when it comes to whether to grant a certain application program access to certain system resources of the operating system. It allows users to easily understand the behavior and abnormality of the application on privacy permissions (sensitive permissions) without having professional knowledge, and decide whether to process it based on the prompt information.
[0166] Moreover, since the user can be not only the user of the terminal manufacturer, but also the user of the application, it is possible to better urge the application developer to rectify the unreasonable use of application permissions. This application can enable users to participate more in application permission management and control malicious applications together with the terminal manufacturer, rather than just the terminal manufacturer and application developer "fighting wits and courage".
[0167] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0168] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0169] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the method scheme. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0170] In the embodiments provided in the present application, it should be understood that the disclosed device / user terminal and method can be implemented in other ways. For example, the device / user terminal embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0171] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0172] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0173] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.
[0174] The above embodiments are only used to illustrate the method scheme of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the method schemes described in the aforementioned embodiments can still be modified, or some of the method features therein can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding method schemes from the spirit and scope of the method schemes of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A method for detecting the rationality of application permission usage, characterized in that: include: For the target permission, obtain the target permission usage record information of the target application; Inputting the target permission usage record information of the target application into a preset classification model, and obtaining a rationality detection result of the target application using the target permission output by the preset classification model, wherein the rationality detection result is divided into types: rational and unreasonable; Outputting the rationality detection result; The target permission usage record information includes at least one of the following information: the proportion of first permission application times, the proportion of second permission application times, the proportion of allowed times, the flow direction of access data, and the number of permission closure times; Among them, the proportion of the first permission application times is the ratio of the number of times the target application applies for the target permission when the target application runs in the foreground to the total number of times the target application applies for the target permission, the proportion of the second permission application times is the ratio of the number of times the target application applies for the target permission when the target application runs in the background to the total number of times the target application applies for the target permission, the proportion of allowed times is the ratio of the number of times the target application applies for the target permission and is allowed to the total number of times the target application applies for the target permission, the access data is the data obtained by the target application based on the target permission; the number of permission closing times is the number of times the target permission of the target application is set to closed.
2. The method for detecting rationality of permission use according to claim 1, characterized in that: The preset classification model is generated based on the following method: For the target permission, obtaining a plurality of sample permission usage record information of sample applications, wherein the sample applications include applications of the same type as the target application; Obtaining a rationality label of each sample permission usage record information, wherein the rationality label is divided into types: reasonable and unreasonable; Based on the permission usage record information of each sample and the corresponding rationality label, supervised learning is performed on the classification model to be trained, and after the supervised learning of the classification model to be trained is completed, the preset classification model is obtained.
3. The method for detecting rationality of permission use according to claim 2, characterized in that: The rationality label of obtaining the permission usage record information of each sample includes: The plurality of sample permission usage record information are screened using an anomaly detection algorithm to obtain a rationality label for each sample permission usage record information.
4. The method for detecting rationality of rights use according to claim 3, characterized in that: The using of an anomaly detection algorithm to screen the plurality of sample permission usage record information to obtain a rationality label of each sample permission usage record information includes: Get the hierarchical screening ratio of the anomaly detection algorithm; Based on the hierarchical screening ratio, the plurality of sample permission usage record information are hierarchically screened to obtain a first initial label of each sample permission usage record information; wherein the first initial label is divided into types: reasonable and unreasonable; After calculating the accuracy of the first initial label of unreasonable type in the first initial label and updating the graded screening ratio according to the accuracy, return to execute the step of graded screening of the multiple sample permission usage record information based on the graded screening ratio and subsequent steps, until the accuracy of the first initial label stabilizes within the preset accuracy range, and the first initial label of each sample permission usage record information is used as the rationality label of each sample permission usage record information.
5. The method for detecting rationality of rights use according to claim 2, characterized in that: After the classification model to be trained is subjected to supervised learning based on a preset number of sample permission usage record information and corresponding rationality labels, obtaining rationality labels of each sample permission usage record information further includes: Inputting the sample permission usage record information whose rationality label is not determined into the classification model to be trained, and obtaining the second initial label of the sample permission usage record information whose rationality label is not determined output by the classification model to be trained; wherein the types of the second initial label classification include: rational and unreasonable; The unreasonable second initial labels in the second initial labels are verified and corrected to obtain the rationality labels of the sample permission usage record information of the undetermined rationality labels.
6. The method for detecting rationality of rights use according to any one of claims 1 to 5, characterized in that: The unreasonableness includes: severe unreasonableness, moderate unreasonableness and slight unreasonableness; The method for detecting rationality of permission use also includes: If the rationality detection result is severely unreasonable, outputting a first prompt message, wherein the first prompt message is used to prompt the user to deny the target application from using the target permission; If the rationality detection result is moderately unreasonable, outputting a second prompt message, wherein the second prompt message is used to prompt the user to restrict the target application from using the target permission; If the rationality detection result is slightly unreasonable, a third prompt message is output, and the third prompt message is used to prompt the user that there are a few anomalies when the target application uses the target permission.
7. The method for detecting rationality of permission use according to any one of claims 1 to 5, characterized in that: The method for detecting rationality of permission use also includes: If the rationality detection result is reasonable, the target application is allowed to use the target permission within a preset period of time, or a fourth prompt information is output, wherein the fourth prompt information is used to prompt the user that the target application is using the target permission normally.
8. A classification model training method, characterized in that: include: For the target permissions, obtain the usage record information of multiple sample permissions of the sample application; Obtaining a rationality label for each sample permission usage record information, where the rationality label is classified into the following types: rational and unreasonable; Based on the permission usage record information of each sample and the corresponding rationality label, supervised learning is performed on the classification model to be trained, and after the supervised learning of the classification model to be trained is completed, a preset classification model is obtained; The multiple sample permission usage record information includes at least one of the following information: the percentage of the number of times the sample first permission is applied for, the percentage of the number of times the sample second permission is applied for, the percentage of the number of times the sample is allowed, the flow direction of the sample access data, and the number of times the sample permission is closed; Among them, the proportion of the sample's first permission application times is the ratio of the number of times the sample application applies for the target permission when running in the foreground to the total number of times the sample application applies for the target permission; the proportion of the sample's second permission application times is the ratio of the number of times the sample application applies for the target permission when running in the background to the total number of times the sample application applies for the target permission; the proportion of the sample's allowed times is the ratio of the number of times the sample application applies for the target permission and is allowed to the total number of times the sample application applies for the target permission; the sample access data is the data obtained by the sample application based on the target permission; the sample permission closure times is the number of times the target permission of the sample application is set to closed.
9. A device for detecting the rationality of the use of application permissions, characterized in that: include: A first acquisition unit is used to acquire target permission usage record information of a target application for a target permission; A detection unit, configured to input the target permission usage record information of the target application into a preset classification model, and obtain a rationality detection result of the target application using the target permission output by the preset classification model, wherein the rationality detection result is divided into types including: rational and unreasonable; An output unit, used for outputting the rationality detection result; The target permission usage record information includes at least one of the following information: the proportion of first permission application times, the proportion of second permission application times, the proportion of allowed times, the flow direction of access data, and the number of permission closure times; Among them, the proportion of the first permission application times is the ratio of the number of times the target application applies for the target permission when the target application runs in the foreground to the total number of times the target application applies for the target permission, the proportion of the second permission application times is the ratio of the number of times the target application applies for the target permission when the target application runs in the background to the total number of times the target application applies for the target permission, the proportion of allowed times is the ratio of the number of times the target application applies for the target permission and is allowed to the total number of times the target application applies for the target permission, the access data is the data obtained by the target application based on the target permission; the number of permission closures is the number of times the target permission of the target application is set to closed.
10. A training device for a classification model, characterized in that: include: A second acquisition unit is used to acquire, for a target permission, a plurality of sample permission usage record information of a sample application; The third acquisition unit is used to acquire the rationality label of each sample permission usage record information, wherein the rationality label is divided into types: reasonable and unreasonable; A training unit, configured to perform supervised learning on the classification model to be trained based on the permission usage record information of each sample and the corresponding rationality label, and obtain a preset classification model after completing the supervised learning of the classification model to be trained; The multiple sample permission usage record information includes at least one of the following information: the percentage of the number of times the sample first permission is applied for, the percentage of the number of times the sample second permission is applied for, the percentage of the number of times the sample is allowed, the flow direction of the sample access data, and the number of times the sample permission is closed; Among them, the proportion of the sample's first permission application times is the ratio of the number of times the sample application applies for the target permission when running in the foreground to the total number of times the sample application applies for the target permission; the proportion of the sample's second permission application times is the ratio of the number of times the sample application applies for the target permission when running in the background to the total number of times the sample application applies for the target permission; the proportion of the sample's allowed times is the ratio of the number of times the sample application applies for the target permission and is allowed to the total number of times the sample application applies for the target permission; the sample access data is the data obtained by the sample application based on the target permission; the sample permission closure times is the number of times the target permission of the sample application is set to closed.
11. A chip, comprising a processor, characterized in that: The processor is used to read and execute the computer program stored in the memory to implement the steps of the method according to any one of claims 1 to 8.
12. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
13. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Permission management method, device and system and computer readable storage medium
CN112765591A
Application permission management method and device
CN113032766A