Permission assignment method, terminal device, storage medium and program product
By automatically assigning permissions based on natural language statements and usage scenarios, and combining artificial intelligence and sandbox technology, the problem of complex application software permission configuration is solved, achieving intelligent permission management and protection against unauthorized applications.
Patent Information
- Application Number
- PCT/CN2026/093397
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-05-16
- Filing Date
- 2026-04-28
- Publication Date
- 2026-11-19
AI Technical Summary
In existing technologies, application software permission configuration is complex, requiring users to configure it manually, and it is difficult to deal with hidden and complex illegal behaviors, lacking intelligent security protection.
By acquiring access control information from natural language statements and combining it with the usage scenarios of terminal devices, permissions are automatically allocated. Artificial intelligence technology is used to match and dynamically adjust access control strategies. A sandbox environment is used to isolate unauthorized applications, and anomaly detection and risk assessment are performed through multimodal data.
It simplifies user permission configuration, improves the flexibility and accuracy of permission allocation, enhances the ability to identify and protect against unauthorized applications, and dynamically adjusts permissions to cope with complex scenarios.
Smart Images

Figure CN2026093397_19112026_PF_FP_ABST
Abstract
Description
Permission allocation methods, terminal devices, storage media, and program products Technical Field
[0001] This application relates to the field of communication technology, such as permission allocation methods, terminal devices, storage media, and program products. Background Technology
[0002] With the widespread use of terminal devices, application software has become an indispensable tool in users' lives. Application software requires permission settings during use.
[0003] Application software requires users to manually configure its permissions, and the configuration process is relatively complex. Summary of the Invention
[0004] This application provides a permission allocation method, terminal device, storage medium, and program product to at least achieve automated permission allocation for applications, reducing the complexity of application permission configuration.
[0005] In a first aspect, embodiments of this application provide a permission allocation method, comprising: obtaining permission control information, the permission control information including natural language statements for controlling the permissions of an application; determining a permission control policy corresponding to the permission control information based on the permission control information, the permission control policy including applicable scenarios associated with the permissions; determining the usage scenario of a terminal device; and determining the permissions of the application in the usage scenario based on the matching result between the usage scenario of the terminal device and the applicable scenario.
[0006] Secondly, embodiments of this application provide a terminal device, including: one or more processors; a storage device for storing one or more programs; and when the one or more programs are executed by the one or more processors, the one or more processors implement the permission allocation method provided in embodiments of this application.
[0007] Thirdly, embodiments of this application provide a storage medium storing a computer program, which, when executed by a processor, implements the permission allocation method provided in embodiments of this application.
[0008] Fourthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the permission allocation method provided in embodiments of this application. Attached Figure Description
[0009] Figure 1 is a flowchart illustrating a permission allocation method provided in an embodiment of this application;
[0010] Figure 2 is a schematic diagram of a system architecture provided in an embodiment of this application;
[0011] Figure 3 is a schematic diagram of a permission allocation process provided in an embodiment of this application;
[0012] Figure 4 is a schematic diagram of a permission allocation device provided in an embodiment of this application;
[0013] Figure 5 is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation
[0014] Unless otherwise specified, the embodiments and features described in this application may be combined arbitrarily with each other.
[0015] The steps illustrated in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases the steps shown or described may be performed in a different order than that shown here.
[0016] In this application, the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0017] The acquisition, storage, use, and processing of data in this application comply with the relevant provisions of laws and regulations.
[0018] With the widespread use of smart terminal devices, application software (hereinafter referred to as "applications") plays an important role in users' lives. However, the existence of malicious and illegal applications, such as those that steal user privacy, maliciously deduct fees, or compromise system security, poses a serious security threat to users. Application security protection technologies, such as access control and virus scanning, typically rely on static rules or signature databases, which are insufficient to cope with increasingly covert and complex illegal behaviors. Furthermore, security systems often require users to manually configure permissions, increasing the complexity of user experience. For example, managing application permissions always requires users to choose whether to grant permissions during the current application use, grant them permanently, or not grant them temporarily, resulting in a poor user experience. Therefore, this application provides an automated and intelligent technical solution that simplifies user operations and improves security.
[0019] In one exemplary embodiment, Figure 1 is a flowchart illustrating a permission allocation method provided in an embodiment of this application. This method is applicable to situations requiring simplified configuration of application permissions. The method can be executed by a permission allocation device, which can be implemented in software and / or hardware and integrated into a terminal device. The terminal device can be any device capable of running applications, such as a mobile phone, computer, or personal digital assistant.
[0020] As shown in Figure 1, the permission allocation method provided in this embodiment includes the following operations:
[0021] S110. Obtain permission control information, wherein the permission control information includes natural language statements that control the permissions of the application.
[0022] Access control information can be considered as information that controls the permissions of an application. Access control information can indicate the permissions an application can use and / or restrict the permissions an application can use. Permissions can be permissions requested by the application. Permissions can be a security management mechanism of the operating system for an application's access to device resources or data. The permissions allocated in this application can cover all or part of the permissions throughout the entire process of application download, installation, and execution. Some permissions can be the functions corresponding to permissions that require authorization to be implemented.
[0023] Different permissions correspond to different functions. For example, camera access permission corresponds to the function of using the camera to capture images. Microphone access permission corresponds to the function of using the microphone to capture sound.
[0024] This operation does not restrict the form of the access control information; it can be either natural language statements or text entered by the user. Natural language statements can be considered statements expressed in natural language. Natural language statements are statements used to control application permissions.
[0025] Different forms of access control information can be obtained through different methods. This operation can obtain access control information through components of the terminal device; for example, this operation can obtain natural language statements captured by the microphone.
[0026] This operation involves the control module in the system that assigns permissions on the terminal device obtaining permission control information. After obtaining the permission control information, it parses the permission control information to control the permissions of applications on the terminal device.
[0027] The control module can be the core part of a system that assigns permissions, and it is responsible for coordinating and managing the various modules of the system.
[0028] S120. Based on the permission control information, determine the permission control policy corresponding to the permission control information, wherein the permission control policy includes the applicable scenarios associated with the permission.
[0029] Access control policies can be considered as strategies for controlling permissions. They can be applied to scenarios where permissions apply, such as scenarios where permissions are granted or disabled.
[0030] The permissions and applicable scenarios in an access control policy can be determined by parsing the access control information. Access control policies can be used to characterize the applicable scenarios of permissions, providing data support for subsequent permission allocation.
[0031] Whether the applicable scenario is a disabled scenario or an authorized scenario can be associated with the intent represented by the access control information. For example, if the access control information restricts the use of permissions, the applicable scenarios included in the access control policy can be scenarios where permissions are disabled. If the access control information allows the use of permissions, the applicable scenarios included in the access control policy can be scenarios where permissions can be used.
[0032] The applicable scenarios can all be scenarios where permissions can be used, also known as authorization scenarios. When the intent of the permission control information is to restrict permissions to disabled scenarios, scenarios that are not disabled can be used as applicable scenarios for permission authorization.
[0033] In this application, the control module can have natural language recognition capabilities. By parsing access control information, the control module can identify the intent to control access expressed through natural language statements. Based on this intent, it determines the required access permissions and the applicable scenarios for those permissions, thereby forming an access control strategy.
[0034] In one example, the natural language statement could be, "Microphone permission can only be enabled when I speak to the phone screen." The corresponding permission is the permission to use the microphone. This is applicable to scenarios where the microphone is used to capture sound and the camera is used to capture images.
[0035] In this operation, the intent can be determined by the control module. After the intent is determined, the access control policy can be assigned to other modules in the system for determination, or it can be transmitted to the server for determination. For example, the control module can determine the intent expressed by natural language statements through an intent recognition model.
[0036] This operation can parse access control information through the control module to obtain the access control policy. This process can be implemented through a model, such as inputting access control information into the model and outputting the access control policy.
[0037] S130. Determine the usage scenario of the terminal device.
[0038] A usage scenario can be considered the context in which a terminal device is used. For example, the current usage scenario of the terminal device determines the permission allocation method within that scenario. The current usage scenario can be the usage scenario in which the terminal device is situated when the usage scenario is determined.
[0039] This application can categorize usage scenarios, which may include work and entertainment scenarios.
[0040] This operation identifies the usage scenario by recognizing environmental information. Environmental information refers to one or more associated environments within the terminal device and application. It can also obtain the usage scenario input by the user. The determination of the usage scenario is not limited here.
[0041] When identifying usage scenarios by recognizing environmental information, this can be achieved through the system's scenario recognition module, or through a combination of the scenario recognition module and the control module. The scenario recognition module acquires environmental information, while the control module identifies this information to determine the usage scenario.
[0042] S140. Based on the matching result between the usage scenario of the terminal device and the applicable scenario, determine the permissions of the application in the usage scenario.
[0043] The matching result can be considered as a representation of whether the use case and the applicable scenario match.
[0044] After determining the use case, this operation matches the use case with the applicable scenarios in the access control policy. For example, if the use case is an entertainment scenario, the applicable scenarios would be scenarios where a microphone is used to capture sound and a camera is used to capture images. The use case and applicable scenarios are then matched. If the use case matches the applicable scenario, the allocation of permissions for that use case can be determined based on the access control policy. If the access control policy indicates that the corresponding permissions should be granted in the applicable scenario, then that permission can be granted for the use case; otherwise, the permission can be disabled for the use case.
[0045] When all applicable scenarios in the access control policy are permission-granting scenarios, the permissions corresponding to the usage scenario can be granted if the usage scenario and the applicable scenario match.
[0046] The permission control strategy of this application can represent the applicable scenarios associated with different permissions. After determining the usage scenario, the applicable scenarios in the permission control strategy can be traversed to assign permissions to the application, so as to determine the permissions under the usage scenario, including the first permission that allows the application to use in the application scenario, and the second permission that restricts the application to use in the application scenario.
[0047] In this application, each permission can have a corresponding permission control policy, and each permission control policy can have corresponding applicable scenarios. This operation can iterate through all the permission control policies corresponding to each permission, determine the matching results between the use scenario and all applicable scenarios of the permission, and assign the permission to the application according to the use scenario.
[0048] This operation allows the control module to match usage scenarios with applicable scenarios in the permission control policy, in order to determine the permissions that applications are allowed to use and the permissions that applications are not allowed to use.
[0049] This application provides a permission allocation method that obtains and parses permission control information to obtain a permission control policy. It simplifies the permission configuration process for users by determining the permission control policy using natural language statements. After determining the permission configuration policy, it assigns permissions to applications based on usage scenarios, increasing the flexibility of permission allocation. This makes the allocated permissions more aligned with the user's intent expressed through natural language statements, thus improving the accuracy of permission allocation.
[0050] Based on the above embodiments, modified embodiments of the above embodiments are proposed. It should be noted that, in order to keep the description brief, only the differences from the above embodiments are described in the modified embodiments.
[0051] In one embodiment, obtaining permission control information includes: in response to a permission request from the application, obtaining natural language statements for controlling the permissions of the application.
[0052] Permission requests can be considered as requests for permissions triggered by an application. The timing of permission requests is not limited here. For example, permission requests may be triggered during application startup, installation, or download.
[0053] In this embodiment, the permission request from the application is obtained, and then the natural language statement input by the user to control the permissions of the application is obtained, so as to respond to the permission request.
[0054] In this embodiment, natural language statements can be obtained through the control module.
[0055] In one embodiment, determining the permission control policy corresponding to the permission control information based on the permission control information includes: identifying control conditions for the permission based on the natural language statement; matching the control conditions with applicable scenarios that the terminal device can recognize; and determining the permission and the applicable scenarios as the permission control policy.
[0056] This embodiment refines the operation of determining the access control policy. When determining control conditions based on natural language statements, the natural language statements can be identified to determine the control conditions expressed by the natural language statements.
[0057] For example, the intent information of a natural language statement can be determined, and then control conditions can be identified from the intent information. Intent information can be considered as information representing the intention, such as the desired goal expressed in the natural language statement. Control conditions can be considered as the conditions for granting or denying control permissions.
[0058] This embodiment can parse natural language statements and understand them to determine intent information. This operation can be implemented through a model.
[0059] Once the intent information is determined, the user-specified conditions can be identified from the intent information and used as control conditions. Control conditions can be "speak to the phone screen" or "at a certain address".
[0060] In this embodiment, natural language statements can also be parsed to directly identify control conditions.
[0061] After determining the control conditions, these conditions can be mapped to applicable scenarios that the terminal device can recognize, that is, matching the control conditions with applicable scenarios that the terminal device can recognize. This facilitates matching with the identified usage scenarios. For example, "facing a mobile phone screen" may involve the microphone capturing voice and the camera detecting images; the corresponding applicable scenario could be a scenario where the microphone captures voice and the camera detects images, such as an entertainment scenario.
[0062] Once the applicable scenarios are determined, permissions and their corresponding applicable scenarios can be stored in the access control policy. When storing applicable scenarios, they can be directly stored as scenarios involving microphone-based voice capture and camera-based image capture. Alternatively, specific scenarios involving microphone-based voice capture and camera-based image capture can be listed, such as entertainment scenarios.
[0063] When storing data in the form of scenarios where voice is captured using a microphone and images are captured using a camera, the matching process can determine whether the scenario uses a microphone to capture voice and a camera to capture images. If so, the scenario and the applicable scenario are considered to match. Otherwise, they do not match. When storing data in the form of specific scenarios, it can be directly determined whether the scenario is a specific scenario. If so, the scenario and the applicable scenario match; otherwise, they do not match.
[0064] In one embodiment, determining the usage scenario of the terminal device includes: acquiring environmental information, the environmental information indicating an environment associated with the terminal device and one or more applications; and determining the usage scenario of the terminal device based on the environmental information.
[0065] The environmental information associated with a terminal device can be the external scene in which the terminal device is located, i.e., the scene outside the terminal device, such as the ambient noise outside the terminal device collected by the microphone. The environmental information associated with a terminal device can also include the location of the terminal, which can be rough location information, such as being represented by the number of the communication base station. The environmental information associated with an application can be the application's state, also known as application status, which can be the state associated with the application's operation. The environmental information associated with an application can also include the application's historical operations.
[0066] In this embodiment, one or more corresponding environmental information from the terminal and application are acquired, and then the environmental information is identified to determine the usage scenario of the terminal device. The identification method is not limited here; for example, it can be implemented using a model. This embodiment also does not limit the method of acquiring environmental information; different environmental information corresponds to different acquisition methods.
[0067] In one example, environmental information is obtained through the scene recognition module in the system. The scene recognition model within the scene recognition model identifies the environmental information to determine the usage scenario.
[0068] The scene recognition module can be considered as a module for recognizing usage scenarios. The scene recognition model can be a deep learning model based on a self-attention mechanism. The scene recognition model can recognize information from multiple modalities, such as information from data sources like sensors, GPS, cameras, and microphones.
[0069] In this embodiment, the scene recognition module may include a scene recognition model, and may also include data preprocessing and post-processing operations. The scene recognition module may also be a scene recognition model, which acquires environmental information and then outputs the usage scenario.
[0070] In one embodiment, determining the permissions of the application in the usage scenario based on the matching result between the usage scenario of the terminal device and the applicable scenario includes: determining the matching result between the usage scenario of the terminal device and the applicable scenario, wherein the matching result indicates whether the usage scenario matches the applicable scenario; and determining a first permission that allows the application to use and a second permission that restricts the application to use based on the matching result.
[0071] The first permission can be the permission that allows the application to use, such as the permission that is granted. The second permission can be considered as the permission that restricts the application to use, such as the permission that is disabled.
[0072] In this embodiment, permission allocation can be implemented based on usage scenarios and applicable scenarios. In this embodiment, a model can be used to determine the matching results and allocate permissions to the application. The model for determining the matching results and permission allocation can be a single model or different models.
[0073] In one example, this embodiment can obtain a matching result by matching the usage scenario and the applicable scenario through the control module. Then, based on the matching result, the control module determines whether the permission corresponding to the matching result allows the application to use it, so as to obtain the first permission and the second permission.
[0074] If the matching result indicates a match, the first permission can include the permissions authorized for the applicable scenario. The second permission can be a permission other than the first permission.
[0075] In one embodiment, the permission allocation method further includes: running the second permission in a sandbox environment, the sandbox environment having an independent operating system and independent storage space, and the sandbox environment containing virtual data associated with the second permission.
[0076] In this embodiment, second-privilege permissions can be run in a sandbox environment to ensure the normal operation of the application. The sandbox environment can be an isolated runtime environment. The independent operating system can be an operating system isolated from the terminal device's operating system. The independent storage space can be an isolated storage space, isolated from the operating system's storage space. Virtual data associated with the second-privilege permissions can exist in the sandbox environment. Virtual data can be considered as virtual data, such as data simulated, generated, or synthesized by a computer, rather than real data.
[0077] In this embodiment, during the execution of the second permission, virtual data associated with the second permission can be obtained from the sandbox environment to ensure the normal operation of the application.
[0078] There are no restrictions on how a sandbox environment is built; it can be constructed using virtual machines, containers, cloud services, or working configuration files. Sandbox environments can be deployed on endpoint devices or in the cloud.
[0079] While various security technologies exist, they lack intelligent thinking capabilities and have certain limitations. Identifying illicit software, such as Trojans, viruses, phishing attacks, and scams, relies on verification from a single angle or aspect, lacking a comprehensive and progressive cognitive judgment. Furthermore, illicit applications constantly change their disguise methods to penetrate security. Moreover, users lack the professional ability to judge the legitimacy of applications given their increasingly covert and complex illicit behavior. This application aims to dynamically detect and identify illicit applications based on their anomalies.
[0080] In one embodiment, the permission allocation method further includes: acquiring multimodal data during the operation of the application; extracting features from the multimodal data to obtain key features; and performing anomaly detection on the application based on the key features to determine the detection result.
[0081] Multimodal data can be considered as data of various types. It can originate from different sources and can contain at least two modalities, such as text, images, audio, and video. Key features are valuable features within the multimodal data, such as those that characterize the data. Valuable features are those that influence anomaly detection. Detection results are the outcomes obtained after anomaly detection in the application.
[0082] This embodiment can acquire multimodal data during application runtime. By fusing data from different modalities, this embodiment can perform comprehensive testing of the application.
[0083] This embodiment can acquire multimodal data during the application's runtime through an application detection and data acquisition module. The application detection and data acquisition module can be considered as a module that collects data during the application's runtime.
[0084] This embodiment can analyze multimodal data and extract key features from it. Then, by analyzing these key features, anomaly detection can be performed on the application.
[0085] In this embodiment, feature extraction and anomaly detection can be implemented using models. For example, feature extraction can be implemented using a multimodal model, and anomaly detection can be implemented using a control module.
[0086] A multimodal model can be considered a model for processing multimodal data, also known as a multimodal processing model. Multimodal models can perform feature extraction. They can extract features from each modality of the multimodal data, obtaining the key features for each modality. These key features can then be transmitted to the control module. After obtaining the key features, the control module fuses them to perform anomaly detection on the application, obtaining the detection results. The control module can implement anomaly detection through the model.
[0087] In one embodiment, the multimodal data includes one or more of the following: text data; image data; audio data; video data; network data; sensor data; and resource data of resources in the terminal device.
[0088] Text data can be considered data in text form. Image data can refer to visual information represented in two-dimensional or three-dimensional form. Audio data can refer to sound represented in time series form. Video data can refer to dynamic visual information composed of a series of image frames. Network data refers to network-related data, such as network traffic and network requests. Sensor data can refer to data generated by sensors. Resource data can refer to data related to the resources of the terminal device, such as memory-related information (e.g., information related to memory usage) and battery-related information (e.g., information related to battery consumption).
[0089] In one embodiment, the permission allocation method further includes: determining risk measurement information corresponding to the detection result; and adjusting the restriction level of a second permission if the risk measurement information is less than a set threshold, wherein the second permission includes permissions to restrict the use of the application.
[0090] Risk measurement information can be considered as information that measures the degree of risk, such as a risk score. The lower the value of the risk measurement information, the lower the risk of the application. A threshold can be considered a critical value used to classify whether an application carries risk. If the risk measurement information is below the threshold, the application can be considered risk-free. If the risk measurement information is greater than or equal to the threshold, the application can be considered risky.
[0091] When the risk measurement information and the set threshold have different magnitudes, different operations can be performed. These operations may include adjusting the degree of restriction of the second permission, maintaining the degree of restriction of the second permission, and outputting prompt information to instruct the user. The content of the prompt information is not limited here.
[0092] In this embodiment, the control module or other models within the system scheduled by the control module can determine risk measurement information for this anomaly detection based on the detection results. The risk measurement information can be determined through the model. The detection results are input into the model, which then outputs the risk measurement information.
[0093] If the risk measurement information is less than a set threshold, the restriction level of the second permission can be adjusted. For example, the restriction level of the second permission can be reduced. This reduction can be done in stages. For instance, if the risk measurement information is continuously less than the set threshold in different anomaly detections, the restriction level of the second permission can be gradually reduced until the second permission is fully authorized. Gradually reducing the restriction level of the second permission can be considered as reducing the scope, duration, and scenarios of the restriction. Gradual reduction can be achieved by decreasing the restriction range by a set amount. The reduction range can be the same or different each time, and different permissions can have the same or different reduction ranges.
[0094] In adjusting the level of restriction on second permissions, the level of restriction can be adjusted for all or some of the second permissions.
[0095] In adjusting the degree of restriction on certain second permissions, the adjusted second permissions can be those that affect the value of risk measurement information. This can influence the value of the risk measurement information by causing it to align with the direction of risk. For example, increasing the risk measurement information.
[0096] In one embodiment, adjusting the restriction level of the second permission when the risk measurement information is less than a set threshold includes: adjusting the restriction level of the second permission from at least one dimension when the risk measurement information is less than a set threshold.
[0097] Dimensions can be used for adjusting secondary permissions. Dimensions include one or more of the following: time dimension, spatial dimension, and scenario dimension. The time dimension can be based on time, such as managing permissions based on available time or duration, or restricted time or duration. The spatial dimension can be based on storage space, where files can be stored; the spatial dimension represents the file access scope of the permission. The file access scope can be considered as the range of files accessed. The scenario dimension represents the applicable scenario for the permission. Different permissions can have the same or different dimensions.
[0098] This embodiment adjusts the permissions of all second permissions, gradually removing them from the sandbox environment and running them in a real environment.
[0099] The granting of permissions in this application can be considered as a phased granting of permissions. Each phase corresponds to a risk measurement value falling below a set threshold. The magnitude of each phase can be the same or can increase progressively in each phase.
[0100] This embodiment gradually opens up permissions, thereby reducing the degree of restriction on the second permission.
[0101] In one embodiment, the permission allocation method further includes: determining a third permission associated with the risk measurement information, the third permission including the permission in the second permission to cause the risk measurement information to take a value in the direction of increasing risk; correspondingly, when the risk measurement information is less than a set threshold, adjusting the restriction level of the second permission, including: when the risk measurement information is less than the set threshold, performing at least one of the following: setting the permissions in the second permission other than the third permission to be allowed to be used by the application; adjusting the restriction level of the third permission from at least one dimension.
[0102] The third authority can be a part of the second authority. Increasing the risk direction can be considered as the direction in which the risk measurement information value increases. The third authority can be the authority that influences the risk measurement information to take a value in the direction of increasing risk. For example, the second authority that causes the risk measurement information to be non-zero.
[0103] In this embodiment, when adjusting the level of restriction, permissions in the second permission, excluding the third permission, can be considered safe permissions and can be set to allow the application to use them, thus moving it out of the sandbox environment. During application execution, it can acquire actual data and run in a real environment. The third permission can be opened from at least one dimension. The level of restriction on the third permission can be reduced according to the extent corresponding to this round of opening.
[0104] In one embodiment, adjusting the degree of restriction of permissions from at least one dimension includes: when the number of times the risk metric information is less than the set threshold reaches a set number, setting the permission with the adjusted degree of restriction to allow the application to use it.
[0105] The "consecutive number" can be the number of times the identified risk metric information is continuously less than a set threshold. The set number can be a pre-defined number. If the risk metric information is consistently less than the set threshold for the specified number of consecutive times in the application, the second permission can be considered to have high security. In this case, the gradually granted third permission or all second permissions can be set to allow the application to use them, and the gradual granting of permissions can be stopped. Permissions with adjusted restrictions can be permissions granted gradually, such as third permission or all second permissions.
[0106] If the number of consecutive times the risk measurement information is less than the set threshold does not reach the set number, the level of restriction on permissions can be adjusted further, according to the magnitude corresponding to this adjustment. The magnitude can be considered the range of permission restriction adjustment. Different adjustments may correspond to the same or different magnitudes.
[0107] In one embodiment, the dimension includes at least one of the following: a time dimension, wherein the adjustment method corresponding to the time dimension includes extending the available duration of the permission; a spatial dimension, wherein the adjustment method corresponding to the spatial dimension includes expanding the file access scope of the permission; and a scenario dimension, wherein the adjustment method corresponding to the scenario dimension includes expanding the applicable scenarios of the permission.
[0108] Available duration can be considered the length of time during which permissions can be used. When granting permissions based on a time dimension, adjustments can be made to permissions by extending their available duration, with the extension amount corresponding to the duration. For example, extending 9:00-12:00 to 9:00-24:00.
[0109] The scope of a file can be represented as a directory hierarchy, with different levels corresponding to different file access scopes. When the dimension is spatial, adjusting permissions can include expanding the file access scope, such as narrowing the directory level. The extent of the expansion can be the range corresponding to the access scope, such as expanding from a second-level directory to a first-level directory.
[0110] When adjusting permissions at the scenario level, the adjustment method can include expanding the applicable scenarios for permissions. The extent of the expansion can be opening up one or more scenarios at a time. For example, expanding from being limited to work scenarios to being usable in entertainment scenarios.
[0111] In one embodiment, the permission allocation method further includes: determining the risk measurement information corresponding to the detection result; if the risk measurement information is greater than or equal to a set threshold, outputting a first prompt message, the first prompt message prompting the user to reacquire permission control information, and continuing to allocate permissions to the application based on the reacquired permission control information.
[0112] The method for determining risk measurement information is described in the above embodiments and will not be repeated here.
[0113] The first message can be considered as a notification that triggers a reassignment of permissions in the event of an application error.
[0114] If the risk measurement information is greater than or equal to the set threshold, the application can be considered to be abnormal. The second permission can be kept in a restricted state, allowing the second permission to run in a sandbox environment, access virtual data, and prohibiting access to real resources.
[0115] If the risk measurement information is greater than or equal to the set threshold, it can be considered that a risk exists during the sandbox phase. A first prompt message can be output to prompt the user to reconfigure permissions. This first prompt message can be in the form of voice or text prompting the user to re-enter natural language statements to configure application permissions. The reconfigured permissions can be all permissions of the application, or permissions that cause the risk measurement information value to be greater than or equal to the set threshold. The first prompt message may also include configuration suggestions for permissions.
[0116] In this embodiment, the process can return to S110 to reacquire permission control information, and then continue to execute S120 and S130 to reassign permissions to the application based on the reacquired permission control information.
[0117] In one embodiment, the permission allocation method further includes: determining the risk measurement information corresponding to the detection result; and outputting a second prompt message when the risk measurement information is greater than or equal to a set threshold, wherein the second prompt message includes the risk measurement information, the analysis conclusion associated with the detection result, and the evidence information corresponding to the analysis conclusion.
[0118] The method for determining risk measurement information is described in the above embodiments and will not be repeated here.
[0119] This embodiment provides another scenario where the risk measurement information is greater than or equal to a set threshold. The second prompt information can be considered as information describing the risk. The analysis conclusion can be considered as a conclusion drawn after analyzing the anomalies in the application, and this analysis conclusion can be a conclusion drawn after summarizing the detection results over a set time period. Evidence information can be considered as information serving as evidence for the analysis conclusion.
[0120] In one example, risk measurement information can be considered a score derived from the risk, i.e., a risk score. Analysis conclusions can include information describing anomalies within the application, such as the presence of a hidden button on the interface. Evidence information can be considered evidence regarding the anomaly, such as which specific interface displayed the hidden button.
[0121] The second prompt message can be determined by the terminal device or by the server; no limitation is made here.
[0122] For example, the control module in the terminal device system determines and outputs the second prompt information based on the model.
[0123] In this application, when the risk measurement information is greater than or equal to a set threshold, one or more of a first prompt message and a second prompt message can be output. Additionally, suggested uninstallation information can also be output for the user to choose from.
[0124] In one embodiment, the permission allocation method further includes: generating a risk report based on the second prompt information; outputting the risk report; obtaining a processing instruction triggered by the user in response to the risk report; and, if the processing instruction includes new permission control information, returning to continue executing the permission allocation method described in Figure 1, that is, returning to continue executing the operations of obtaining the permission control policy, determining the usage scenario, and allocating permissions to the application.
[0125] A risk report can be considered a risk-related report output to the user. Risk reports can be presented in natural language for easy understanding and decision-making. Action instructions can be considered as user-triggered commands based on the risk report to resolve the risks indicated in it.
[0126] In this embodiment, the second prompt information can be converted into a risk report through a model, thereby summarizing the second prompt information and obtaining an easily understandable risk report. For example, a risk report can be generated through a model in the control module.
[0127] For example, a risk report could show that application A's risk measurement information is x points and that there is an image anomaly, specifically by displaying a hidden button on the interface.
[0128] This embodiment can output risk reports to users, such as playing the risk report or displaying the risk report through the interface.
[0129] In this embodiment, the risk report may also include processing suggestions for the risk report, such as "Please confirm whether to uninstall application A, or continue using it and set restrictions." When suggesting setting restrictions in the processing suggestions, the suggestions can be more specific, specifying the restrictions to be set, so that users can configure permissions in a targeted manner.
[0130] The type of instruction processed in this embodiment is not limited, as long as it is an instruction responding to the input of a risk report. This could be an instruction to trigger the uninstallation of an application, or an instruction to reassign permissions. The new permission control information can be considered as permission control information re-entered by the user in response to the risk report, used to reassign permissions based on the risks associated with the risk report.
[0131] If the instruction being processed is new permission control information, S120 and S130 can be re-executed based on the new permission control information to assign permissions to the application based on the new permission control information.
[0132] The following is an exemplary description of this application. Related technologies have limitations in application permission management and the accuracy of application anomaly detection. To address these issues, this application provides a permission allocation method, namely, an intelligent application permission management method based on intent and scene awareness.
[0133] This application uses artificial intelligence (AI) technology to identify the working scenario, also known as the usage scenario, of the terminal device, detect the execution of application software, and utilize the logical judgment capabilities of large-scale internet AI models to identify illegal application behavior. This application is applicable to scenarios implemented using pure software methods or a combination of software and hardware.
[0134] With technological advancements, illicit software is constantly evolving. This application proposes an AI-based method for progressively identifying such software. The proposed intelligent permission management method achieves dynamic control over application behavior by constructing a progressive risk assessment system: First, based on user natural language commands (e.g., commands triggered by natural language statements, such as "Enable microphone only in entertainment scenarios"), dangerous permissions are forcibly placed in a sandbox environment. Real resources are isolated using virtual data (empty contacts / simulated locations), and behavior detection is implemented. Second, a 0-100 risk scoring mechanism (threshold 50 points) is adopted. Permission opening strategies are dynamically adjusted based on execution content analysis (abnormal API calls) and execution pattern analysis (high-frequency sensor access at night). When the target is met, permissions are adjusted according to time (time slots), space (directory hierarchy), and scenario (single scenario). (Extended) This method gradually releases permissions across three dimensions while continuously recording permission adjustment logs. Third, it constructs behavioral profiles through multimodal data collection (text logs / UI screenshots / audio / video streams / network traffic), combining unsupervised learning algorithms for anomaly detection with models for solving classification and regression problems to identify abnormal patterns (such as phishing / data leakage). Finally, for applications deemed high-risk (risk score, also known as risk measurement information ≥ 50 points), features are automatically extracted. Malicious features are matched using a cross-modal evidence chain and a cloud-based knowledge base, also known as a threat signature database (including online public opinion / official announcements). After confirming the risk, sandbox-enhanced isolation or recommended uninstallation is implemented, and the threat signature database is dynamically updated to address new attacks. This database can include signatures for potential threats within the application and can store threat-related features. This method achieves the "minimum necessity" principle through quantitative evaluation, combined with gradual opening to reduce user interference, forming a complete closed loop from intent recognition to threat response.
[0135] Figure 2 is a schematic diagram of a system architecture provided in an embodiment of this application. Referring to Figure 2, the system for implementing permission allocation in this application includes a control module (such as an AI Agent main control module), a scene recognition module (such as a scene recognition AI module, i.e., a model that realizes scene recognition through AI technology), an application detection and data acquisition module, a dynamic permission allocation and sandbox management module, a multimodal processing module, and a model knowledge base and automatic learning and updating module. The following describes each module:
[0136] 1. AI Agent Main Control Module
[0137] Functions: Parses input natural language statements and identifies the intent for access control. It possesses reasoning and decision-making capabilities, as well as task decomposition capabilities. As a core control module, it coordinates and manages other modules in the system, such as coordinating dynamic access control allocation and sandbox management modules, enabling the application of coordinated access control and sandbox technology.
[0138] Technical Implementation: A small-scale on-device model based on Large Language Models (LLMs). It combines deep learning models for natural language understanding and intent recognition. The small-scale on-device model can be considered a lightweight model running on the terminal device. Lightweight means the model is optimized and compressed for permission allocation, making it suitable for this purpose. An LLM can be an AI-based model with a massive dataset. The term "massive dataset" is not limited here; it can be much larger than a set value, such as reaching billions or even trillions of parameters, for example, composed of billions to trillions of neural network parameters.
[0139] 2. Scene Recognition Module
[0140] Function: Sensing the usage scenario of the terminal device, i.e., the situation in which the terminal device is used, such as rest or work, provides a basis for access control. The scenario recognition module can identify various environmental information to determine the usage scenario.
[0141] Technical Implementation: Employs a multimodal Transformer architecture (which can handle the fusion of information from different modalities through a self-attention mechanism). Processes information from data sources such as sensors, GPS, cameras, and microphones.
[0142] 3. Access control and storage module
[0143] Function: Stores configured access control rules, also known as access control policies, including allow, deny, and use permissions when conditions are met. Stores permission call information for different applications and supports dynamic rule updates.
[0144] Technical implementation: Structured database storage access control rules. Combined with local storage and cloud synchronization update mechanisms.
[0145] 4. Dynamic permission allocation and sandbox management module
[0146] Functionality: Dynamically assigns application permissions based on intent and context. Uses sandbox technology (virtual environment) to isolate restricted permissions, ensuring application functionality is available but does not access real data.
[0147] Technical Implementation: Lightweight virtual machine or container technology is used to achieve an independent operating environment. A work profile provides storage and permission isolation. Permission requests are intercepted via API hooks, returning virtual data.
[0148] 5. Application detection and data acquisition module
[0149] Function: Detects the application's operation in both sandbox and non-sandbox modes.
[0150] Collect multimodal data, such as API calls, UI screenshots, audio and video recordings, and network traffic.
[0151] Technical Implementation: Data is collected using a combination of system logs, network traffic monitoring, UI screen recording, and microphone input. This data is obtained with user authorization and then stored in an encrypted manner.
[0152] 6. Multimodal processing module
[0153] Function: Extract features from collected text, image, audio, and video data.
[0154] Technical Implementation: Natural Language Processing (NLP) is used to analyze API call logs. Computer vision is used to analyze the UI interface and detect phishing behavior. Speech recognition is used to analyze audio data.
[0155] In addition, the AI Agent main control module can also perform anomaly detection. It can identify whether the application exhibits malicious behavior, such as data theft, phishing interfaces, or privacy violations. Both unsupervised and supervised learning models can be used for malicious detection.
[0156] 7. Model Knowledge Base and Automatic Learning Update Module
[0157] Function: Updates and identifies the characteristics of malicious applications through channels such as online public opinion and official announcements.
[0158] Continuously optimize the supervised learning model to improve recognition accuracy.
[0159] Technical Implementation: This involves acquiring official security announcements and user feedback data to automatically update the model knowledge base for model updates. The model knowledge base can be deployed in the cloud, also known as a cloud-based knowledge base. This is combined with an incremental learning mechanism to dynamically adjust the anomaly detection model, such as the model in the AI Agent main control module.
[0160] This application utilizes an AI agent master module combined with natural language processing technology to accurately identify personalized needs in permission management and automatically generate permission control rules. Simultaneously, the system employs a multimodal processing module to perform multimodal processing, providing a more accurate basis for permission decisions. When an application permission request occurs, the AI agent master module dynamically determines permission grants based on user intent and usage scenario, and can achieve permission isolation through virtual machines, containers, cloud environments, or working configuration files, thereby enhancing privacy and security while ensuring application functionality. Furthermore, this method includes application detection and anomaly detection mechanisms. Multimodal data (text, vision, audio, video, network traffic, etc.) is collected in both sandbox and non-sandbox modes, and features are extracted using the multimodal processing module to identify malicious or abnormal behavior. Based on the results of multimodal processing, the AI agent master module can apply anomaly detection. The system can further generate risk scores and analysis reports. Based on the risk scores, the system gradually reduces the isolation level, ultimately removing restricted permissions from the sandbox when security conditions are met. It interacts with users through the AI Agent master control module, dynamically adjusts permission restriction policies to ensure system security, and continuously updates the model knowledge base to adapt to new malware threats, achieving more intelligent and adaptive permission management.
[0161] This application is applicable to the intelligent identification of various illegal software, including but not limited to "viruses, phishing, Trojans, and fraudulent software". The terminal device is not limited to mobile phones or computers, and the operating system is not limited.
[0162] The following describes the permission allocation and application detection scheme of this application:
[0163] S1: Determine the usage scenario of the terminal and the intent to allocate permissions to the application.
[0164] The use cases of sensing terminals can provide a basis for application permission restrictions. This application provides an automated permission control system for applications. The control of application permissions is based on the automated implementation of user intent, which is identified from the user's natural language dialogue.
[0165] For example:
[0166] Example 1: When an application launches, it requests microphone permission. The user can say that microphone permission should only be enabled when speaking directly into the phone screen. This is a natural language statement used to control permissions for the application in response to its permission request.
[0167] Example 2: When an application starts, it requests GPS location information. The user can say that no application should obtain my location information at one or more addresses.
[0168] For example 3: When an application starts up, it requests contact information. The user can say that contact information of relatives and friends cannot be shared.
[0169] The user intent recognition and scene recognition in S1 are implemented by the AI Agent main control module and the scene recognition module. For example, the AI Agent main control module can perform intent recognition and scene recognition, while the scene recognition module collects the information required by the scene. Alternatively, the AI Agent main control module can perform intent recognition, and the scene recognition module can perform scene recognition.
[0170] The AI Agent main control module possesses natural language recognition, reasoning and decision-making capabilities, and task decomposition capabilities. The AI Agent main control module can be a small, edge-side running model based on an LLM (Limited Language Model). The scene recognition module can be a multimodal model, implemented using an open-source model based on the Transformer architecture.
[0171] To achieve access control in various situations, the scene awareness described in this application is multifaceted and includes the following environmental information:
[0172] 1. Application state awareness (including but not limited to: whether the application is in the foreground or background, the activities launched by the application, i.e., activities and their various states)
[0173] 2. The location of the terminal (including but not limited to: GPS coordinates, the current Wi-Fi hotspot, the wireless camping area, the base station number, and the cell information).
[0174] 3. The user's environment, such as driving or running (including but not limited to: barometric pressure sensor values, accelerometer values, geomagnetic sensor values, and GPS coordinates).
[0175] 4. The external environment in which the terminal device is located (including but not limited to: ambient noise collected by the microphone, images captured by the camera, and GPS location information).
[0176] 5. Application history (including but not limited to: application call data and probability statistics for each time period).
[0177] Of the information above, sensitive information involving user privacy (such as GPS coordinates, sound, and video) will be avoided. If it is necessary to use such information, the user's authorization will be obtained in advance. If the user does not authorize it, it will not be used.
[0178] When an application launches and requests permissions (such as microphone, GPS, and contact information), the system triggers a natural language recognition process. The system prompts the user for input through natural language dialogue. The user can say, "Only grant microphone permission when I'm speaking into the phone screen," or "No application should collect my location information at a certain address," or "Contact information with family and friends should not be shared." User input enters the AI Agent main control module, which performs the following: Natural Language Understanding: Parses the natural language statement and extracts the intent; Condition Extraction: Identifies the user-specified conditions (i.e., identifies the control conditions for the permission based on the natural language statement), such as "speaking into the phone screen" or "at a certain address"; Scene Mapping (matching the control conditions with applicable scenarios recognizable by the terminal device): Maps the conditions to scenarios recognizable by the terminal device. For example, "speaking into the phone screen" may involve detecting speech through the microphone and detecting images through the camera; Rule Storage: The system stores permission control rules, also known as permission control policies, including permission identification information (used to identify the corresponding permission) and applicable scenarios (the scenarios to which the permission applies). In other words, the permission and the applicable scenarios are determined as the permission control policy.
[0179] S1 will provide the basis for access control of S2.
[0180] S2: Dynamic allocation of application permissions and operation in sandbox mode (or sandbox mode).
[0181] After S1 is executed, the application's permission management will be divided into three categories: fully executable permissions, completely non-executable permissions, and user-defined permissions that can be used in certain scenarios. Fully executable permissions and user-defined permissions for certain scenarios include dangerous permissions. However, the normal execution of the application depends on certain necessary permissions. To ensure the correct execution of the application while protecting user privacy and security, a sandbox mode is provided to ensure application execution. The sandbox mode defined in this application refers to providing a specific application with a virtual, isolated operating system, or isolated memory or file storage space. Operations that are not intended to be performed on the local operating system are executed on the virtual operating system or read from the isolated memory or file storage space.
[0182] Typically, a terminal operating system has hundreds of permissions, categorized as follows: normal permissions, automatically granted during installation; dangerous permissions, granted at runtime; signature permissions, limited to applications with the same signature; and special permissions, controlled at the system level.
[0183] The sandbox mode is used for the prior execution of dangerous permissions. During the prior period, the function calls of dangerous permissions of the application are detected in the sandbox, and the abnormal behavior of the application is examined. This provides a basis for the subsequent gradual removal of permission execution from the sandbox mode and dynamic allocation to the real execution environment.
[0184] The dynamically allocated permissions controlled in this application are dangerous permissions, including but not limited to the following: 1. Calendar read / write permissions; 2. Camera usage permissions; 3. Contact read / write and contact count acquisition permissions; 4. Location acquisition permissions; 5. Microphone usage permissions; 6. Telephone usage permissions; 7. Various sensor usage permissions; 8. SMS reading and sending / receiving permissions; 9. Reading the phone's file storage system and reading user multimedia images, videos, and audio data; 10. Permission to allow application installation; 11. Permission to toggle airplane mode; 12. Floating window permissions; 13. Bluetooth management permissions; 14. Permission to modify system security; 15. Permission to allow startup on boot; 16. Permission to send broadcasts within the system.
[0185] Once the user's intent to control permissions is identified as described in S1, the user's intent will form permission control rules that are stored in the system. When the application executes and requests permissions, the AI Agent main control module matches the permission control policy according to the current terminal's usage scenario, and finds the permissions that can be allowed (i.e., the first permission) and the permissions that cannot be allowed (i.e., the second permission). That is, based on the matching result between the terminal device's usage scenario and the applicable scenario, the permissions of the application in the usage scenario are determined. For permissions that cannot be allowed, sandbox technology is used to allow the application to continue running (i.e., the second permission is run in the sandbox environment). If the permission is related to calling a related device, and the related device cannot run in the sandbox, the permission is refused to be executed, and the user is notified.
[0186] This sandbox mode uses the following technical means: 1. Using a lightweight virtual machine to establish an independent operating system environment and storage space; 2. Using container technology to establish a system and storage space isolated from the original system, or an isolated process space; 3. Deploying cloud services to establish a virtual system in the cloud for each user, with the virtual space serving as the sandbox environment; 4. Using work profiles to achieve an isolated environment.
[0187] Permissions suitable for sandbox technology include: 1. Read and write permissions for the calendar; 2. Read and write permissions and access permissions for the number of contacts; 3. Location access permission; 4. Read and send / receive SMS messages; 5. Access to the phone's file storage system; 6. Permission to install applications; 7. Permission to toggle airplane mode; 8. Permission to modify system security; 9. Permission to allow startup; 10. Permission to send broadcasts within the system.
[0188] The application of sandboxes can be implemented as follows:
[0189] 1. If an application's calendar read permission is restricted, the application will read a virtual calendar database or storage that does not contain the user's related schedules. The restricted application can only read another set of virtual calendar databases or storage.
[0190] 2. If an application's access to contacts is restricted, the application will read a virtual contact database or storage that does not contain user contact information. The restricted application can only read another set of virtual contact databases or storage.
[0191] 3. To restrict an application's SMS permissions, you can create a dedicated SMS storage space for the application, allowing the application to read only from this isolated SMS storage space.
[0192] 4. If you restrict the application's access to read and write to the phone's file storage system, you can provide isolated virtual storage space.
[0193] In the above scenarios, sandbox mode uses a work profile to create an isolated environment. Applications run within this work profile and access isolated storage space, which can be preset to contain empty or virtual data. For example, the calendar database may contain no user schedules, the contacts database may contain no real contact information, and the SMS storage space may contain only virtual messages. The application runs normally but cannot access real data, thus protecting privacy.
[0194] 5. If location permissions are restricted for the application, provide obfuscated or fake location information based on the user's intent, such as a fixed coordinate or a randomly generated location.
[0195] 6. By restricting the application's installation permissions, system security permissions, airplane mode on / off permissions, startup permissions, and system broadcast permissions, the application can run in a virtual, independent operating system. The operation instructions and results executed by the application can be transmitted through a secure pipeline, and the UI display of the application when it is running can be restored on the original operating system.
[0196] S3: Collects multimodal data executed by the application (also known as the application program).
[0197] Multimodal data is acquired from the application's operation in both sandbox and non-sandbox modes. This is performed by the application detection and data acquisition module.
[0198] In sandbox mode: applications run with restricted permissions, and the sandbox provides virtual data (such as an empty contact list or simulated location). In this mode, the operation of the application can be monitored.
[0199] In non-sandbox mode: the application runs with the granted permissions and calls real system modules. The operation of the application is monitored in this mode.
[0200] Information involved in this process should be communicated to the user in advance, and the user's authorization should be obtained. Furthermore, the detection of applications is not limited to all applications; it can include suspicious applications that have been approved and designated by the user.
[0201] In both of the above modes, the multimodal data of the mobile phone includes, but is not limited to, the following:
[0202] Text data: Get text logs of API calls, system interactions, error messages, and application output. You can also get the application's package name, size, etc.
[0203] Visual data: Capture UI screenshots at key moments (such as when permission is requested or sensitive information is displayed).
[0204] Audio data: If the application uses a microphone or generates sound, capture audio and check for unauthorized recordings or suspicious content.
[0205] Video data: Record screen activity, capture dynamic operations and user interactions, and identify automated operations or abnormal behaviors.
[0206] Network data: Detects network traffic, including target addresses, protocols, and data volume, and detects communication with known malicious servers.
[0207] Resource usage data: Detect changes in CPU, memory, and battery consumption over time to identify abnormal usage patterns, such as cryptocurrency mining.
[0208] Sensor data: If the application accesses sensors (such as GPS, accelerometer, barometer, geomagnetic information, etc.), store the accessed data to ensure consistency with the application's functionality.
[0209] S4: Perform feature extraction and anomaly detection on multimodal data.
[0210] The multimodal processing module can handle different types of data, such as text, images, audio, and video, and achieve comprehensive reasoning and generation through cross-modal alignment and fusion techniques. The model in this application possesses cross-modal understanding capabilities, generating text descriptions based on images, audio, and video. The multimodal processing module can be deployed in the cloud or locally.
[0211] Extract relevant features from the multimodal data collected by S3 to facilitate the identification of potential anomalies or suspicious patterns.
[0212] Multimodal data is categorized into text, image, audio, and video data. The multimodal processing module in the system performs the following preprocessing operations on the received data to extract key features:
[0213] Text data, such as text logs or network request records, uses natural language processing techniques to extract semantic features and converts them into vector representations for subsequent analysis.
[0214] Image data: For example, screenshots of application interfaces are first adjusted to a uniform resolution, and then visual features are extracted using a convolutional neural network.
[0215] Audio data: such as dialogue recordings, which are transcribed into text using a speech recognition model, and then analyzed using natural language processing techniques to extract key information.
[0216] Video data: such as screen recordings, using video analysis models to extract dynamic features. These dynamic features can be the characteristics of objects or people in the video that change over time.
[0217] In terms of content, the data executed by an application includes the following types (corresponding to S3), and each type can be analyzed and anomaly detected through the AI Agent master control module:
[0218] Text data analysis: Analyze logs using natural language processing (NLP) techniques to identify API call sequences and detect patterns of malicious behavior that violate rules or are illogical, such as unauthorized access to sensitive data.
[0219] Visual data analysis: Analyze UI screenshots using computer vision algorithms to detect phishing signs, such as interfaces that mimic legitimate applications. Identify hidden or suspicious UI elements that may be used for malicious purposes.
[0220] Audio data analysis: Use speech recognition to convert audio to text, analyze the content, and look for phrases related to privacy violations or social engineering. Compare audio activity with user interactions and check for unauthorized recordings.
[0221] Video data analysis: Use action recognition models to detect automated behaviors or sequences that indicate malicious intent, such as automated clicks or navigation without user input.
[0222] Network data analysis: Analyze network traffic and check for connections to known malicious IP addresses or domains. Detect abnormal data transmission patterns, which may indicate data leakage.
[0223] Resource usage analysis: Statistical methods are used to identify peak or sustained high consumption of resources, which deviate from normal application behavior and may indicate malicious activities such as cryptocurrency mining.
[0224] Sensor data analysis: Verify that sensor data access is consistent with the application's stated functionality and user agreement.
[0225] Table 1 is a schematic table of multimodal data provided in the embodiments of this application. Referring to Table 1, different types of data correspond to different analysis methods and different malicious behaviors.
[0226] Table 1
[0227] Multimodal data analysis can employ LLM, using both unsupervised and supervised learning models to identify malicious behavior in applications and obtain detection results.
[0228] Unsupervised learning: Initial screening of potential anomalies.
[0229] The system first uses unsupervised learning methods to identify cross-modal outliers that deviate from the behavior of most applications (outliers in multimodal data scenarios, arising from abnormal intermodal correlations or semantic conflicts, i.e., some data exhibiting inconsistencies or anomalies across modalities). These outliers represent potentially anomalous behaviors, such as:
[0230] 1. "The interface displays an advertisement but there is no corresponding network request" may indicate advertising fraud or data forgery.
[0231] 2. "Frequent camera access during the night when there is no user interaction" may indicate unauthorized surveillance.
[0232] Unsupervised learning does not require pre-labeled data and can discover new and unknown anomalous patterns.
[0233] Supervised learning: Quickly identify known malicious behaviors.
[0234] For known malicious behavior patterns, the system employs a pre-trained classification model, based on a large amount of labeled malicious and legitimate application sample data, to quickly predict the illegitimacy of an application. This labeled data comes from security expert analysis, user feedback, or databases of historical malware. This method is suitable for efficiently detecting common malicious behaviors; for example, "an application continuously accessing the contact list in the background" has been flagged as data theft.
[0235] The test results may include the aforementioned abnormal or malicious behaviors.
[0236] S5: Progressively remove dangerous permissions from the sandbox.
[0237] The method for progressively removing dangerous permissions from the sandbox: The AI Agent main control module performs detection and risk assessment based on the application's operation in the sandbox, and implements a fine-grained strategy for progressively removing dangerous permissions from the sandbox.
[0238] The assessment criteria for progressively removing dangerous permissions from the sandbox are as follows:
[0239] Analysis of execution content: Detect whether the application exhibits abnormal behavior (such as unauthorized file access or communication with overseas servers).
[0240] Execution pattern analysis: Determine the rationality of behavioral patterns (such as camera access during nighttime when there is no interaction, and high-frequency network requests).
[0241] Execution content analysis can be performed once to determine if the application exhibits abnormal behavior. Execution pattern analysis can be performed multiple times to determine its rationality.
[0242] The application risk scoring rules are as follows: the system presets a scoring range (0-100 points), and the threshold is set to 50 points.
[0243] The following scenarios can lead to an increased rating: frequent calls to the camera's API that are inconsistent with the usage scenario (such as rest); access to the local file system when the user is not interacting with the application; and the application accessing overseas servers without reasonable business needs.
[0244] The gradual permission adjustment strategy is as follows: If the risk score (i.e., risk measurement information) is below a threshold (<50 points), then a threshold is set.
[0245] Gradually grant permissions: Based on application behavior (which can be measured by risk scoring), dangerous permissions will be removed from the sandbox in stages. The stages can be divided into the following dimensions.
[0246] Time dimension: Expand the available time of permissions by time period (e.g., 9:00-12:00 → 9:00-24:00). That is, adjust according to the magnitude corresponding to this adjustment.
[0247] Spatial dimension: Expand the file access scope according to the directory hierarchy (e.g., / app / cache → / data / app).
[0248] Scenario dimension: Expand from a single scenario (such as entertainment) to multiple scenarios (such as work and entertainment).
[0249] Continuous monitoring: Maintain real-time monitoring of S1-S4 and record permission adjustment logs (e.g., "2025-03-31 14:00, grant storage permissions to / data").
[0250] Risk score above the threshold (≥50 points):
[0251] Maintain restricted status: Keep the sandbox isolated or virtual data, and prohibit access to real resources.
[0252] Risks during the sandbox phase (such as risks corresponding to risk scores exceeding a threshold) can be alerted to the user and suggested to uninstall the application, or permissions can be further restricted according to user instructions (i.e., outputting the first prompt information to allocate permissions based on new permission control information). Users can re-provide natural language statements through dialogue with the AI Agent master module to determine the application restriction intent and permission control rules, and thus re-control the application's permissions.
[0253] If the application runs stably and without anomalies in sandbox mode: if the continuous risk score meets the standard (e.g., <50 points for 7 consecutive days), fully open permissions and exit sandbox mode. Meeting the continuous risk score standard can be determined by whether the number of times the standard is met reaches a set limit, or whether the duration of the continuous standard meets the set limit.
[0254] Even after all permissions are removed from the sandbox, S3-4 can still be used to ensure continued application security.
[0255] S6: Update the model knowledge base based on online public opinion or official announcements regarding the characteristics of illegal software.
[0256] Supervised learning models are models that learn from pre-trained data or knowledge bases to analyze multimodal data and identify illegal behaviors. The model in this application, such as the model in the control module, has the ability to learn from online public opinion and official announcements of illegal software characteristics. It can automatically acquire relevant knowledge and improve the model's ability to identify illegal applications in real time.
[0257] S7. Comprehensive assessment and report generation.
[0258] The control module analyzes multimodal data to generate a risk score for the application (ranging from 0 to 100). The control module then uses a generative model to generate a detailed analysis report, i.e., the initial warning message. The generative model can be considered a machine learning model that learns the data distribution and generates new samples. The report includes:
[0259] Risk score: For example, "92" indicates high risk.
[0260] Analysis conclusions: For example, "The app frequently calls GPS at night when there is no user interaction (abnormal behavior), there are hidden buttons in the interface (abnormal image), and the audio mentions 'Please authorize access to contacts' (abnormal audio)." "The app continuously accesses the contact list in the background in the middle of the night, which is consistent with known malicious behavior. Further investigation is recommended."
[0261] Evidence information, such as a chain of evidence: for example, "the screenshot shows the hidden button" or "the audio recording contains 'Please authorize access to contacts'".
[0262] The control module can perform risk scoring and reporting on its own, or it can perform risk scoring and reporting through other modules in the system, or it can perform risk scoring and reporting through a server.
[0263] After the analysis is completed, the results are stored in a cloud database in JSON format. When the server completes the risk scoring and reporting, the results are transmitted to the terminal device through a secure channel for use by the AI Agent master control module in decision-making.
[0264] S8: Task decomposition and supervision of the AI Agent master control module.
[0265] The AI Agent master module acts as an intelligent decision-making center, responsible for receiving S7's risk analysis results, including risk scores, evidence information, and analysis conclusions. It then interacts with users using natural language to determine subsequent actions. By default, if an application exhibits suspicious behavior, the AI Agent master module reports it to the user; if the behavior is highly dangerous, it directly suggests or executes uninstallation. However, users may wish to continue using the application despite knowing about suspicious behavior and imposing specific restrictions. To this end, the AI Agent master module converses with the user using natural language, breaking down the user's instructions into executable tasks, implementing these tasks, and continuously monitoring the execution effect to ensure that the application's behavior meets the user's expectations. Simultaneously, S7's risk analysis results may suggest further investigation, such as "The application continuously accesses the contact list in the background at night, consistent with known malicious behavior; further investigation is recommended." The AI Agent master module will break down the risk analysis results into next steps, such as continuing observation to detect patterns, or directly prohibiting the application's background access to contacts based on user command patterns.
[0266] 1. Receive and present risk assessment
[0267] S8 begins with the AI Agent master module's risk analysis results based on S7, including the application's risk score and analysis conclusions (specific descriptions of suspicious behavior) and evidentiary information. The AI Agent master module then converts this information into a natural language report (i.e., a risk report) for user understanding and decision-making. For example, a report like the following might be generated:
[0268] "App 'A' has a risk score of 85 out of 100. App 'A' frequently accesses location data when not in use, which may pose a privacy risk."
[0269] The AI Agent control module will then present the user with a choice: "Do you want to uninstall this application, or continue using it and set restrictions?"
[0270] The AI Agent main control module analyzes and processes the instructions. If the user chooses to uninstall, the AI Agent main control module will immediately execute the uninstallation operation. However, if the user chooses to keep the application, the AI Agent main control module will further instruct the user to specify the specific restrictions required.
[0271] 2. Engage with users and collect their commands.
[0272] When a user decides to continue using the application, the AI Agent control module will ask the user for permission restrictions in a conversational manner, such as: "Please tell me what restrictions you would like to impose on application 'A'. You can choose to prevent it from starting automatically in the background, block background access to GPS, block ads, or restrict its connection to certain servers."
[0273] Users might respond in natural language, with new permission control information, such as: "I want to continue using this app, but don't let it start in the background or display ads."
[0274] The AI Agent master module uses Natural Language Processing (NLP) technology to parse these instructions (i.e., new access control information, also known as reacquired access control information), identify keywords and intents, and map them to system-supported permissions. For example, "Do not launch in the background" maps to disabling automatic background startup, and "Do not display ads" maps to blocking ad content. This step ensures that the AI Agent master module can accurately understand the user's intentions.
[0275] 3. Break down instructions into tasks
[0276] After understanding the user's instructions, the AI Agent main control module breaks them down into specific, actionable tasks. These tasks are the technical means to implement user restrictions. For example, disabling automatic background startup: adjusting the application's system permissions or settings to disable its startup function when there is no user interaction.
[0277] Ad blocking: This is achieved by intercepting network requests to the ad server or by modifying the application interface to hide ad elements.
[0278] Once the decomposition is complete, the AI Agent master module will directly execute these tasks or delegate them to relevant modules in the system, such as systems that implement access control or network filters.
[0279] 4. Execute tasks and monitor results.
[0280] After the task is executed, the AI Agent main control module continuously activates the application detection and data collection module and the multimodal processing module to monitor the application's running status and ensure that the restrictions are effective. For example, it checks whether the application is still attempting to launch in the background and verifies whether advertisements have been successfully blocked or whether any advertisement content is still being displayed.
[0281] If the restrictions are found to be ineffective (e.g., the app still displays ads in some way), the AI Agent control module will take further action: adjusting task strategies, such as strengthening network filtering rules. It will report the problem to the user: "We tried to block the ads, but some ads may still appear. Would you like to try other methods or uninstall the app?" This real-time monitoring mechanism ensures that the user's security goals are achieved.
[0282] 5. Recording and Optimization
[0283] Throughout the process, the AI Agent control module meticulously records all operations: user instructions, broken-down tasks, specific execution measures, and the application's performance under restrictions. These records not only provide transparent feedback to the user but also offer data support for the AI Agent control module's self-optimization. For example, if a user repeatedly requests ad blocking, the AI Agent control module may proactively suggest this restriction or improve the ad-blocking strategy.
[0284] The AI Agent master module not only provides recommendations based on risk assessments but also communicates with users through natural language, understanding and executing complex and personalized instructions. From generating reports to breaking down tasks, and then to execution and supervision, the AI Agent master module ensures that users can both utilize the application's functionality and maintain security controls. This continuous, context-sensitive interaction allows users to easily manage application behavior, while the AI Agent master module continuously improves its service quality through supervision and learning.
[0285] This application utilizes AI technology based on multimodal data to achieve dynamic protection across the entire application installation security verification chain. By leveraging environmental information for scene recognition, this application can determine the current usage scenario (such as work, entertainment, rest, etc.) in real time, providing precise contextual basis for subsequent permission allocation and risk assessment. This allows for intelligent allocation of initial permissions in different scenarios, compensating for the shortcomings of traditional technologies in protecting unofficial application downloads. In the initial permission allocation and sandbox observation phase, the system uses a virtualized runtime environment to detect application behavior. Through AI, it dynamically analyzes application permission requests, identifies potential sensitive permissions, and, based on risk scoring, gradually opens or restricts permissions, effectively preventing abnormal permission requests and unauthorized resource access. Through continuous detection and behavioral pattern recognition, this application acquires and analyzes long-term behavioral data. Combined with a model that enables multimodal analysis, it performs deep fusion analysis of text, image, audio, and video data, promptly capturing abnormal behavior and generating detailed analysis reports, thereby significantly improving the timeliness and accuracy of security warnings. Ultimately, the AI Agent main control module organically combines the risk analysis results with the user's security policies to achieve intelligent decomposition and monitoring of risky applications. This enables the system to proactively respond to user instructions (such as uninstallation or setting restrictions), ensuring enhanced security throughout the entire application download, installation, and operation process.
[0286] In summary, this application organically integrates scene recognition, dynamic permission management, behavior monitoring, and multimodal deep analysis to form a complete protection system that comprehensively covers all aspects from application download to installation and subsequent operation, thereby improving overall security protection capabilities.
[0287] The following lists all possible applications of this application in the current and future technological environment, as well as the possible expanded application areas that may be explored by combining it with other known or potential technologies:
[0288] 1. Provide security protection for mobile terminals
[0289] Implement app store security verification: As a security testing module for app stores, third-party marketplaces, or enterprise internal application platforms, it provides full-chain security testing before and after an application is listed, including permission analysis and behavior monitoring, to prevent malicious or tampered APKs.
[0290] Real-time terminal security protection: Integrated into mobile devices such as smartphones and tablets, it detects application behavior and permission requests in real time, and intelligently adjusts permissions according to usage scenarios to prevent privacy leaks and data theft.
[0291] 2. Enterprise-level mobile security management
[0292] Enterprise Mobile Device Management (EMM) System: As part of an EMM or mobile security management system, it performs dynamic risk assessments on the installation, updates, and operation of applications within the enterprise to prevent information leaks or system breaches caused by abuse of privileges or malicious behavior.
[0293] Customized risk warning and response platform: Combines with the enterprise's security strategy to proactively prevent potential threats and provide detailed risk reports and emergency response suggestions.
[0294] 3. Internet of Things (IoT) and Smart Home Security
[0295] IoT device application security monitoring: In smart home, wearable devices or industrial IoT devices, similar technologies are applied to perform security verification on the device software to ensure that sensor data, network requests and permission calls comply with preset security policies.
[0296] Unified Security Platform for Smart Homes: Integrates data from various terminal devices and analyzes abnormal operations through multimodal data analysis models to prevent hackers from using home devices as attack springboards.
[0297] 4. Security Applications in Cloud and Edge Computing
[0298] Cloud security monitoring platform: Deployed in the cloud, it performs large-scale data integration and in-depth analysis of multimodal data uploaded from terminals, providing security risk assessment and early warning services for users of different sizes.
[0299] Edge computing security node: Combining the low latency characteristics of 5G, it is deployed as a security detection module on the edge server to realize real-time, local application security verification, thereby improving user experience and response speed.
[0300] 5. Cross-platform and cross-modal security protection
[0301] Security modules applicable to multiple operating systems: Applicable to multiple operating systems, not limited to desktop applications and embedded systems, and achieves broader security verification through the fusion of multimodal data (such as images, audio, and logs).
[0302] Combined with blockchain technology: Utilize blockchain to achieve an immutable record of application authenticity, enhancing the credibility of security verification.
[0303] 6. Security Big Data and Threat Intelligence Platform
[0304] Risk trend and behavior pattern analysis: By aggregating multimodal data from applications and combining machine learning and deep analytics models, cross-scenario risk trend predictions are made to serve as a basis for decision-making.
[0305] Intelligent security consulting services: Providing clients with customized security reports and recommendations to proactively prevent potential threats.
[0306] 7. Support for Standards Development
[0307] Safety Standard Testing Tools: Provides standardized tools for application safety testing and assists in the development and promotion of application safety testing standards.
[0308] Public safety information sharing platform: Enables cross-organizational and cross-domain collaborative security protection.
[0309] 8. Integration with artificial intelligence and other emerging technologies
[0310] Adaptive security policy system: Combined with adaptive AI-based policies, it enables dynamic adjustment and optimization of security policies.
[0311] Virtualization and simulation testing platform: Combining virtualization, sandboxing and simulation technologies, it conducts pre-testing of the security of new applications, verifies their permission calls and behavior in various use scenarios, and identifies potential risks in advance.
[0312] In summary, this application not only possesses advantages in the field of mobile application (such as software applications running on mobile devices) security protection, but also, through the organic integration with various technologies such as enterprise-level management, IoT, cloud / edge computing, big data analytics, blockchain, and standards development, constitutes a comprehensive, multi-layered security protection system. This not only enhances the security experience but also provides solid technical support for building a more secure network ecosystem.
[0313] In an environment where digital security issues are becoming increasingly serious, users are paying more and more attention to privacy and data protection. This application's end-to-end security verification system enhances security.
[0314] When downloading and installing an APK, the system can prompt the user that the application uses the permission allocation method described in this application for permission allocation, and can also perform application security checks. The technical solution described in this application enables more accurate risk identification, more intelligent dynamic permission management, and more timely threat warnings.
[0315] This application utilizes AI technology to collect and analyze multimodal data, effectively identifying abnormal behavior and potential risks. By collecting and analyzing data in real time, this solution dynamically adjusts permission settings based on application behavior in different usage scenarios, ensuring more timely permission adjustments. This application integrates source verification, dynamic permission adjustment, sandbox monitoring, and multimodal deep analysis, forming a comprehensive security protection chain from application download and installation to operation. This application not only identifies known threats but also possesses the ability to intelligently predict and analyze unknown abnormal behaviors, providing users with a higher level of security.
[0316] Figure 3 is a schematic flowchart of a permission allocation method provided in an embodiment of this application. Referring to Figure 3, this embodiment determines the usage scenario of the terminal, also known as the terminal device, and the control conditions corresponding to the natural language statements to obtain the permission control policy. Based on the usage scenario and the permission control policy, dynamic allocation of application permissions is implemented, and the second permission with restricted use is run in a sandbox model.
[0317] During sandbox mode operation, sandbox technology can be selected to create a sandbox environment, which can also be pre-created. Secondary privileges can then be run within the sandbox environment to control these privileges.
[0318] Running in sandbox mode can be considered as running within a sandbox environment. Risk measurement information is determined by monitoring the application's operation both inside and outside the sandbox. Permissions are progressively granted when the risk measurement information is below a set threshold. The application's operation status inside and outside the sandbox is continuously monitored. If the risk measurement information is greater than or equal to the set threshold, the second permission can remain restricted, and the user is notified, such as by outputting a risk report converted from the second notification. When the user inputs new permission control information, the new permission control information is retrieved, and the system returns to determine the permission control conditions based on the new information, taking into account the use case, to determine a new permission control strategy. If the application is instructed to be uninstalled, it is uninstalled.
[0319] During the monitoring of the sandbox's operational status, multimodal data on application execution can be collected, including data collected both inside and outside the sandbox. Then, feature extraction and anomaly detection are performed on the collected multimodal data to determine risk measurement information.
[0320] In this application, during the permission allocation process based on access control information, the control module can perform task decomposition, execution, and monitoring. If permission adjustments are ineffective, the task strategy can be adjusted; otherwise, it will be recorded and optimized.
[0321] In one exemplary embodiment, this application also provides a permission allocation device, which can be integrated into a terminal device. FIG4 is a schematic diagram of the structure of a permission allocation device provided in an embodiment of this application. Referring to FIG4, the permission allocation device includes: an acquisition module 410, configured to acquire permission control information, the permission control information including natural language statements for controlling the permissions of an application; a policy determination module 420, configured to determine the permission control policy corresponding to the permission control information based on the permission control information, the permission control policy including the applicable scenario associated with the permission; a scenario determination module 430, configured to determine the usage scenario of the terminal device; and an allocation module 440, configured to determine the permissions of the application in the usage scenario based on the matching result between the usage scenario of the terminal device and the applicable scenario.
[0322] The permission allocation device provided in this embodiment is used to implement the permission allocation method shown in Figure 1. The implementation principle and technical effect of the permission allocation device provided in this embodiment are similar to those of the permission allocation method shown in Figure 1, and will not be repeated here.
[0323] Based on the above embodiments, modified embodiments of the above embodiments are proposed. It should be noted that, in order to keep the description brief, only the differences from the above embodiments are described in the modified embodiments.
[0324] In one embodiment, the acquisition module 410 is specifically configured to: in response to the permission request of the application, acquire natural language statements for controlling the permissions of the application.
[0325] In one embodiment, the policy determination module 420 is specifically configured to: identify control conditions for the permission based on the natural language statement; match the control conditions with applicable scenarios that the terminal device can recognize; and determine the permission and the applicable scenarios as the permission control policy.
[0326] In one embodiment, the scenario determination module 430 is specifically configured to: acquire environmental information, the environmental information indicating an environment associated with one or more of the terminal device and the application; and determine the usage scenario of the terminal device based on the environmental information.
[0327] In one embodiment, the allocation module 440 is specifically configured to: determine the matching result between the usage scenario of the terminal device and the applicable scenario, wherein the matching result indicates whether the usage scenario matches the applicable scenario; and determine, based on the matching result, a first permission that allows the application to use and a second permission that restricts the application to use.
[0328] In one embodiment, the device further includes a running module configured to run the second permission in a sandbox environment, the sandbox environment having an independent operating system and independent storage space, and the sandbox environment containing virtual data associated with the second permission.
[0329] In one embodiment, the device further includes a detection module configured to: acquire multimodal data during the operation of the application; extract features from the multimodal data to obtain key features; and perform anomaly detection on the application based on the key features to determine the detection result.
[0330] In one embodiment, the device further includes a first adjustment module, comprising: a first determining unit configured to determine risk measurement information corresponding to the detection result; and a first adjusting unit configured to adjust the degree of restriction of a second permission when the risk measurement information is less than a set threshold, wherein the second permission includes the permission to restrict the use of the application.
[0331] In one embodiment, the first adjustment unit is specifically configured to: adjust the degree of restriction of the second permission from at least one dimension when the risk measurement information is less than a set threshold.
[0332] In one embodiment, the first adjustment module further includes a second determining unit, configured to: determine a third permission associated with the risk measurement information, the third permission including the permission in the second permission to make the risk measurement information take a value in the direction of increasing risk; correspondingly, the first adjustment unit is specifically configured to: when the risk measurement information is less than a set threshold, perform at least one of the following: set the permissions in the second permission other than the third permission to allow the application to use; adjust the degree of restriction of the third permission from at least one dimension.
[0333] In one embodiment, the first adjustment unit is specifically configured to: when the number of times the risk measurement information is less than the set threshold reaches a set number, set the permission to adjust the degree of restriction to allow the application to use it.
[0334] In one embodiment, the dimension includes at least one of the following: a time dimension, wherein the adjustment method corresponding to the time dimension includes extending the available duration of the permission; a spatial dimension, wherein the adjustment method corresponding to the spatial dimension includes expanding the file access scope of the permission; and a scenario dimension, wherein the adjustment method corresponding to the scenario dimension includes expanding the applicable scenarios of the permission.
[0335] In one embodiment, the device further includes a second adjustment module, configured to: determine the risk measurement information corresponding to the detection result; and, if the risk measurement information is greater than or equal to a set threshold, output a first prompt message, the first prompt message prompting the user to reacquire permission control information, and continue to allocate permissions to the application based on the reacquired permission control information.
[0336] In one embodiment, the device further includes a third adjustment module, configured to: determine the risk measurement information corresponding to the detection result; and output a second prompt message when the risk measurement information is greater than or equal to a set threshold, wherein the second prompt message includes the risk measurement information, the analysis conclusion associated with the detection result, and the evidence information corresponding to the analysis conclusion.
[0337] In one embodiment, the device further includes a generation module configured to: generate a risk report based on the second prompt information; output the risk report; obtain a processing instruction triggered by the user in response to the risk report; and, if the processing instruction includes new permission control information, return to continue executing the following permission allocation method: obtain permission control information, the permission control information including natural language statements for controlling the permissions of the application; determine the permission control policy corresponding to the permission control information based on the permission control information, the permission control policy including the applicable scenario associated with the permission; determine the usage scenario of the terminal device; and determine the permissions of the application in the usage scenario based on the matching result between the usage scenario of the terminal device and the applicable scenario.
[0338] In one embodiment, the multimodal data includes one or more of the following: text data; image data; audio data; video data; network data; sensor data; and resource data of resources in the terminal device.
[0339] In one exemplary embodiment, this application also provides a terminal device. FIG5 is a schematic diagram of the structure of a terminal device provided in this application embodiment. As shown in FIG5, the terminal device provided in this application includes one or more processors 51 and a storage device 52; the processors 51 in the terminal device may be one or more, and FIG5 takes one processor 51 as an example; the storage device 52 is used to store one or more programs; the one or more programs are executed by the one or more processors 51, so that the one or more processors 51 implement the permission allocation method as described in the embodiment of this application.
[0340] The terminal equipment also includes: a communication device 53, an input device 54, and an output device 55.
[0341] The processor 51, storage device 52, communication device 53, input device 54 and output device 55 in the terminal device can be connected by a bus or other means. Figure 5 shows an example of connection by a bus.
[0342] Input device 54 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the terminal device. Output device 55 may include display devices such as a display screen.
[0343] The communication device 53 may include a receiver and a transmitter. The communication device 53 is configured to perform information transmission and reception communication under the control of the processor 51.
[0344] Storage device 52, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the permission allocation method described in the embodiments of this application (e.g., the acquisition module 410, policy determination module 420, determination module 430, and allocation module 440 in the permission allocation device). Storage device 52 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the terminal device, etc. In addition, storage device 52 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, storage device 52 may further include memory remotely located relative to processor 51, and these remote memories can be connected to the terminal device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0345] In one exemplary embodiment, this application also provides a storage medium storing a computer program. When executed by a processor, the computer program implements any of the methods described in this application. The storage medium stores a computer program that, when executed by a processor, implements the permission allocation method in this application. The permission allocation method includes: obtaining permission control information, the permission control information including natural language statements for controlling the permissions of an application; determining a permission control policy corresponding to the permission control information based on the permission control information, the permission control policy including applicable scenarios associated with the permissions; determining the usage scenario of the terminal device; and determining the permissions of the application in the usage scenario based on the matching result between the usage scenario of the terminal device and the applicable scenario.
[0346] The computer storage medium in this application embodiment can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable CD-ROM, optical storage device, magnetic storage device, or any suitable combination thereof. The computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0347] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit programs for use by or in connection with an instruction execution system, apparatus, or device.
[0348] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, radio frequency (RF), etc., or any suitable combination thereof.
[0349] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0350] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the permission allocation method provided in this application. The implementation principle and technical effects of the computer program product are similar to the permission allocation method in the embodiment shown in FIG1, and will not be repeated here.
[0351] The above description is merely an exemplary embodiment of this application and is not intended to limit the scope of protection of this application.
[0352] Those skilled in the art will understand that the term terminal equipment covers any suitable type of wireless user equipment, such as mobile phones, portable data processing devices, portable web browsers, or vehicle-mounted mobile stations.
[0353] Generally, the various embodiments of this application can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. For example, some aspects can be implemented in hardware, while others can be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device, although this application is not limited thereto.
[0354] Embodiments of this application can be implemented by executing computer program instructions through the data processor of a mobile device, for example, in a processor entity, or through hardware, or through a combination of software and hardware. The computer program instructions can be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages.
[0355] Any block diagram of logical flow in the accompanying drawings of this application may represent program steps, or may represent interconnected logic circuits, modules, and functions, or may represent a combination of program steps and logic circuits, modules, and functions. The computer program may be stored on memory. The memory may be of any type suitable to the local technical environment and may be implemented using any suitable data storage technology, such as, but not limited to, read-only memory (ROM), random access memory (RAM), optical storage devices and systems (Digital Video Disc (DVD) or Compact Disk (CD)), etc. Computer-readable media may include non-transitory storage media. The data processor may be of any type suitable to the local technical environment, such as, but not limited to, general-purpose computers, special-purpose computers, microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), and processors based on multi-core processor architectures.
Claims
1. A permission allocation method, comprising: Obtain permission control information, which includes natural language statements that control the permissions of the application. Based on the access control information, a access control policy corresponding to the access control information is determined, and the access control policy includes the applicable scenarios associated with the access. Determine the usage scenario of the terminal device; Based on the matching result between the usage scenario and the applicable scenario of the terminal device, the permissions of the application under the usage scenario are determined.
2. The method of claim 1, wherein, The acquisition of access control information includes: In response to the permission request of the application, obtain natural language statements to control the permissions of the application.
3. The method of claim 1, wherein, The step of determining the access control policy corresponding to the access control information based on the access control information includes: Based on the natural language statements, the control conditions for the permissions are identified; The control conditions are matched with the applicable scenarios that the terminal device can recognize; The permissions and the applicable scenarios are defined as the permission control policy.
4. The method of claim 1, wherein, Determining the usage scenario of the terminal device includes: Obtain environmental information, which indicates an environment associated with at least one of the terminal device and the application; Based on the environmental information, the usage scenario of the terminal device is determined.
5. The method of claim 1, wherein, The process of determining the application's permissions in the usage scenario based on the matching result between the terminal device's usage scenario and the applicable scenario includes: Determine the matching result between the usage scenario and the applicable scenario of the terminal device, wherein the matching result indicates whether the usage scenario matches the applicable scenario; Based on the matching results, a first permission that allows the application to use and a second permission that restricts the application to use are determined.
6. The method according to claim 5, further comprising: The second permission is run in a sandbox environment, which has an independent operating system and independent storage space, and contains virtual data associated with the second permission.
7. The method according to claim 1, further comprising: Acquire multimodal data during the operation of the application; Feature extraction is performed on the multimodal data to obtain key features; Anomaly detection is performed on the application based on the aforementioned key features, and the detection results are determined.
8. The method according to claim 7, further comprising: Determine the risk measurement information corresponding to the detection results; If the risk measurement information is less than a set threshold, the restriction level of the second permission is adjusted, and the second permission includes the permission to restrict the use of the application.
9. The method of claim 8, wherein, The step of adjusting the restriction level of the second permission when the risk measurement information is less than a set threshold includes: If the risk measurement information is less than the set threshold, the degree of restriction of the second permission shall be adjusted from at least one dimension.
10. The method of claim 8, further comprising: Determine the third permission associated with the risk measurement information, the third permission including the permission in the second permission to make the risk measurement information take a value in the direction of increasing risk; The step of adjusting the restriction level of the second permission when the risk measurement information is less than a set threshold includes: If the risk measurement information is less than the set threshold, perform at least one of the following: Set the permissions in the second permission, excluding the third permission, to allow the application to use them; Adjust the degree of restriction of the third permission from at least one dimension.
11. The method of claim 9 or 10, wherein, Adjusting the degree of restriction of permissions from at least one dimension includes: If the number of times the risk metric information is less than the set threshold reaches a set number, the permission to adjust the restriction level will be set to allow the application to use it.
12. The method of claim 9 or 10, wherein, The dimension includes at least one of the following: The time dimension, and the adjustment methods corresponding to the time dimension include extending the available duration of permissions; Spatial dimension, the adjustment methods corresponding to the spatial dimension include extending the file access scope of permissions; The scenario dimension, and the adjustment methods corresponding to the scenario dimension, include the applicable scenarios for extended permissions.
13. The method of claim 7, further comprising: Determine the risk measurement information corresponding to the detection results; If the risk measurement information is greater than or equal to a set threshold, a first prompt message is output, prompting the user to reacquire permission control information, and permissions are then assigned to the application based on the reacquired permission control information.
14. The method of claim 7, further comprising: Determine the risk measurement information corresponding to the detection results; If the risk measurement information is greater than or equal to a set threshold, a second prompt message is output. The second prompt message includes the risk measurement information, the analysis conclusion associated with the detection result, and the evidence information corresponding to the analysis conclusion.
15. The method of claim 14, further comprising: A risk report is generated based on the second prompt information; Output the aforementioned risk report; Obtain the processing instructions triggered by the user in response to the risk report; If the processing instruction includes new permission control information, the process returns to continue executing the process of determining the permission control policy corresponding to the permission control information, determining the usage scenario of the terminal device, and determining the permissions of the application in the usage scenario based on the matching result between the usage scenario of the terminal device and the applicable scenario.
16. The method of claim 7, wherein, The multimodal data includes at least one of the following: Text data; image data; audio data; video data; network data; sensor data; resource data of resources in the terminal device.
17. A terminal device, comprising: At least one processor; A storage device configured to store at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the permission allocation method as described in any one of claims 1-16.
18. A storage medium storing a computer program that, when executed by a processor, implements the permission allocation method according to any one of claims 1-16.
19. A computer program product comprising a computer program which, when executed by a processor, implements the rights allocation method according to any one of claims 1-16.
