A function recognition method and system based on AI enhancement
Through AI-enhanced functional recognition methods, multimodal semantic analysis and genetic algorithms are used to solve the encryption and confusion problems in Android application function recognition, high-accuracy functional recognition and industry classification are achieved, manual intervention costs are reduced, and dynamic behavior analysis is supported.
Patent Information
- Application Number
- CN202510649882.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2045-05-20
AI Technical Summary
The prior art has the problem of analysis failure and misjudgment caused by APK file encryption, reinforcement or obfuscation in Android application function recognition. Static code analysis is difficult to understand the functional logic, resource file analysis cannot obtain complete information, and lacks context semantic support.
Using a functional recognition method based on AI enhancement, a multimodal semantic analysis model is used to compose semantic understanding of compliance declaration text, third-party module descriptions and device resource call records, and adjust domain correlation parameters through multidimensional semantic spatial mapping and genetic algorithms, and deduce behavioral features in combination with a task-oriented inference engine to achieve cross-grained domain correlation matching.
It improves the accuracy of functional recognition, improves the accuracy and expansion capabilities of industry classification, reduces the cost of manual review, supports real-time analysis of application dynamic behavior, and reduces subjective errors introduced by manual intervention.
Smart Images

Figure CN120181095B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a function recognition method and system based on AI enhancement. Background Art
[0002] In the mobile app ecosystem, Android app feature identification is an important foundation for users to screen apps and developers to optimize feature promotion. Traditional feature identification technologies mainly rely on the following two solutions:
[0003] 1. Static code analysis technology:
[0004] By analyzing the APK file to obtain source code or bytecode, the system APIs, components, and methods called in the code can be analyzed to infer the application's functionality. For example, by detecting code snippets that call the camera or location services, it can be determined whether the application has a photo or location function. However, this technology has the following drawbacks:
[0005] APK files often use encryption, hardening, or obfuscation technologies (such as ProGuard), which can lead to analysis failures or extremely poor readability of the generated code, seriously affecting analysis efficiency. Obfuscated class names, method names, and variable names are replaced with meaningless characters, making it difficult for static code analysis to understand functional logic. In particular, in scenarios where multiple modules interact or are dynamically loaded, the accuracy of function recognition is significantly reduced.
[0006] 2. Resource file analysis technology:
[0007] By parsing static files such as layout files, string resources, or icon resources in the APK, we can extract descriptions of interface elements related to functions (such as payment buttons). However, this method has the following limitations:
[0008] Some applications encrypt resource files for protection, or dynamically generate interface elements at runtime, making it impossible for static analysis to obtain complete information. The text descriptions in resource files are usually short and vague (such as "Next" and "Confirm"), lacking contextual semantic support, and easily leading to misjudgment (such as misclassifying a general button as a specific function entrance). Summary of the Invention
[0009] The technical problem to be solved by the present invention is to provide an AI-enhanced function recognition method and system that can accurately capture business domain keywords and functional behavior characteristics in complex contexts.
[0010] In order to solve the above technical problems, the technical solutions of the present invention are as follows:
[0011] In a first aspect, a function recognition method based on AI enhancement is provided, the method comprising:
[0012] Step 1: Using a pre-trained multimodal semantic analysis model, we conduct a composite semantic understanding of the mobile app's compliance declaration text, third-party module descriptions, and device resource call records, extracting feature identifiers associated with the business domain and application behavior.
[0013] Step 2: Convert feature identifiers into multidimensional semantic space mappings. Based on the pre-established domain knowledge feature library, calculate the correlation in feature space and adaptively adjust domain relevance parameters using a genetic algorithm. Combined with dynamic matching thresholds, cross-granularity domain correlation matching is implemented to output domain division conclusions.
[0014] Step 3: Based on the domain division conclusions, feature identifiers, and device resource call records, a task-oriented reasoning engine is used to deduce behavioral features. The behavioral feature generation trajectory is dynamically optimized through a reinforcement learning strategy, and the logical correlation between the resource call configuration and the application behavioral features is verified.
[0015] Furthermore, using a multimodal semantic analysis model pre-trained with corpus data, we implement complex semantic understanding of mobile application compliance declaration texts, third-party module descriptions, and device resource call records, extracting feature identifiers associated with business domains and application behaviors, including:
[0016] Step 11: Based on the pre-trained Chinese semantic understanding model, perform context-aware semantic parsing on the compliance statement text, eliminate word segmentation ambiguity through a full-word masking mechanism, and use a multi-layer attention network to extract keywords related to the business domain;
[0017] Step 12: Perform structured parsing of the third-party module description to identify the module interface call relationships and function description fragments. Combined with the transfer learning strategy, the module functions are mapped to standardized function labels to generate feature identifiers associated with the third-party module behavior.
[0018] Step 13: Parse the permission request data in the device resource call record, construct a resource call feature vector based on the permission category and call frequency, and jointly encode the keywords, standardized function labels, and resource call feature vectors through a multimodal fusion mechanism to form a multi-dimensional semantic feature;
[0019] Step 14: Perform confidence check on the multi-dimensional semantic features. If the check value is lower than the preset threshold, semantic completion and conflict resolution are performed on the feature identifier, and the optimized feature identifier is output.
[0020] Furthermore, based on a pre-trained Chinese semantic understanding model, we conduct context-aware semantic parsing of the compliance statement text, eliminate word segmentation ambiguity through a full-word masking mechanism, and use a multi-layer attention network to extract keywords related to the business field, including:
[0021] Step 111: Preprocess the compliance statement text, including text sentence segmentation, symbol filtering, and stop word removal, to form a standardized input text sequence;
[0022] Step 112: Input the input text sequence into the pre-trained Chinese semantic understanding model, and perform overall masking on the continuous word segments in the text through the whole-word masking mechanism to suppress the semantic deviation caused by word segmentation ambiguity and generate context-aware semantic features;
[0023] Step 113: Using the multi-layer self-attention network of the semantic understanding model, the semantic features are enhanced, and the keyword segments related to the business domain in the text are identified through the attention weight distribution, and their semantic feature vectors are extracted;
[0024] Step 114: Perform classification training on the semantic feature vectors, dynamically adjust the category weights based on historical annotation data, and filter out keywords with confidence levels higher than a preset threshold.
[0025] Furthermore, the feature identifiers are converted into multi-dimensional semantic space mappings. Based on the pre-established domain knowledge feature library, the domain relevance parameters are adaptively adjusted through feature space correlation calculation and genetic algorithm. Combined with the dynamic matching threshold, cross-granularity domain correlation matching is implemented to output domain division conclusions, including:
[0026] Step 21: Input each feature identifier in the keyword into the pre-trained semantic embedding model to generate the corresponding high-dimensional semantic vector, and establish the initial mapping relationship based on the pre-built industry knowledge graph vector library; the semantic embedding model is trained using a contrastive learning strategy;
[0027] Step 22: Use a genetic algorithm to dynamically adjust industry relevance parameters, including weight coefficients and similarity thresholds, generate a fitness function based on historical matching data, and optimize the parameter combination through iterative crossover and mutation operations to obtain an optimized parameter combination;
[0028] Step 23: Based on the optimized parameter combination, perform cross-level similarity calculation on the semantic vector of each feature identifier, including matching coarse-grained industry classification with fine-grained sub-fields, screen candidate industries using cosine similarity scores, and determine the final matching result based on a dynamic threshold;
[0029] Step 24: Perform multi-level aggregation on the candidate industries, and generate domain division conclusions through a probability weighted fusion strategy based on the hierarchical structure of the industry knowledge graph.
[0030] Furthermore, a genetic algorithm is used to dynamically adjust industry correlation parameters, including weight coefficients and similarity thresholds, to generate a fitness function based on historical matching data. The parameter combination is optimized through iterative crossover and mutation operations to obtain the optimized parameter combination, including:
[0031] Step 221: extract industry-related sample data from the historical matching database and construct a fitness function;
[0032] Step 222: Initialize the parameter population of the genetic algorithm, randomly generate an initial parameter combination set including weight coefficients and similarity thresholds, and each parameter combination represents an individual;
[0033] Step 223: Perform fitness evaluation on each individual, calculate its score based on the fitness function, and select the corresponding population;
[0034] Step 224: Perform a crossover operation on the remaining individuals, randomly select parent individuals using a two-point crossover method, exchange their weight coefficients and parameter segments of the threshold interval, and generate a parameter combination for the offspring generation;
[0035] Step 225: performing a mutation operation on the offspring parameter combination, and randomly adjusting the values of the weight coefficient and the threshold parameter;
[0036] Step 226: Merge the selected population with the mutated offspring population to form a new generation parameter combination, and repeat the crossover and mutation operations until the preset number of iterations is reached to obtain the final population;
[0037] Step 227: Select the corresponding optimized parameter combination from the final population.
[0038] Furthermore, the fitness function is defined as the weighted sum of the matching success rate and the industry coverage rate.
[0039] Furthermore, based on the domain division conclusions, feature identifiers, and device resource call records, a task-oriented reasoning engine is used to derive behavioral features. The behavioral feature generation trajectory is dynamically optimized through a reinforcement learning strategy, and the logical correlation between resource call configuration and application behavioral features is verified, including:
[0040] Based on the domain division conclusions, the task-oriented reasoning engine is initialized, the preset standard behavior set and permission-function mapping rule library are loaded, and the initial candidate behavior feature set for functional reasoning is constructed;
[0041] Input feature identifiers and device resource call records into the inference engine, and filter out candidate sets that match the standard behavior set based on semantic similarity calculation;
[0042] Adopt reinforcement learning strategy to optimize behavior features to generate trajectories and obtain optimized candidate behaviors;
[0043] Verify the optimized candidate behavior to obtain a verified behavior description;
[0044] Based on the permission-function mapping rule base, a logical correlation analysis is performed on the verified behavior description to determine whether the permission configuration in the device resource call record is associated with the derived behavior characteristics, so as to obtain the final application behavior description and permission verification results that meet the specifications.
[0045] The second aspect is an AI-enhanced function recognition system, including:
[0046] The extraction module uses a multimodal semantic analysis model pre-trained with corpus data to perform complex semantic understanding on mobile app compliance declaration text, third-party module descriptions, and device resource call records, extracting feature identifiers associated with business domains and application behaviors.
[0047] The processing module is used to convert feature identifiers into multidimensional semantic space mappings. Based on the pre-established domain knowledge feature library, it uses feature space correlation calculations and genetic algorithms to adaptively adjust domain relevance parameters. It also combines dynamic matching thresholds to implement cross-granularity domain correlation matching and output domain division conclusions.
[0048] The processing module is used to derive behavioral features based on domain division conclusions, feature identifiers, and device resource call records using a task-oriented reasoning engine. It dynamically optimizes behavioral feature generation trajectories through reinforcement learning strategies and verifies the logical correlation between resource call configuration and application behavioral features.
[0049] According to a third aspect, a computing device includes:
[0050] one or more processors;
[0051] The storage device is used to store one or more computer programs, and when the one or more computer programs are executed by the one or more processors, the one or more processors implement the method.
[0052] In a fourth aspect, a computer-readable storage medium stores a computer program, which implements the method when executed by a processor.
[0053] The above solution of the present invention includes at least the following beneficial effects.
[0054] A pre-trained multimodal semantic analysis model performs in-depth semantic analysis of compliance declaration text, third-party module descriptions, and device resource call records. Combined with a full-word masking mechanism to eliminate ambiguity in Chinese word segmentation, it accurately captures business domain keywords and functional behavior characteristics in complex contexts. Compared to traditional static keyword matching, recognition accuracy is improved by 23.6%, effectively addressing the issues of semantic fragmentation and poor adaptability to industry terminology.
[0055] Using a genetic algorithm to dynamically adjust industry relevance parameters (weight coefficients and similarity thresholds), combined with a pre-built industry knowledge graph vector library, we achieve cross-granularity correlation matching. Through adaptive parameter optimization, the industry classification accuracy rate reaches 92.4%, and the adaptation time for newly added industries is reduced to less than 1 minute.
[0056] Using a task-oriented reasoning engine and reinforcement learning strategies, it dynamically optimizes function generation paths, ensuring that the output application behavior descriptions conform to the specifications of the standard behavior set. Furthermore, based on a permission-function mapping rule base, it automatically verifies the relevance of resource call configurations and functional logic, identifying redundant or missing permissions with an accuracy rate of 89.7%, significantly reducing manual review costs.
[0057] Through an end-to-end AI-enhanced processing flow, it supports real-time analysis of dynamic application behaviors (such as hot updates and cloud configuration), with single request processing time under 100ms. Furthermore, a closed-loop update mechanism based on reinforcement learning continuously optimizes models and knowledge bases without relying on manual rule configuration.
[0058] Full-process automation design (e.g., manual intervention is only used for auxiliary correction of low-confidence matches) reduces the need for manual labeling and rule configuration, avoids subjective errors introduced by manual intervention in traditional technologies, and improves the objectivity and consistency of function identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 This is a flow chart of a function recognition method based on AI enhancement provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0060] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0061] like Figure 1 As shown, an embodiment of the present invention proposes a function recognition method based on AI enhancement, the method comprising the following steps:
[0062] Step 1: Using a pre-trained multimodal semantic analysis model, we conduct a composite semantic understanding of the mobile app's compliance declaration text, third-party module descriptions, and device resource call records, extracting feature identifiers associated with the business domain and application behavior.
[0063] Step 2: Convert feature identifiers into multidimensional semantic space mappings. Based on the pre-established domain knowledge feature library, calculate the correlation in feature space and adaptively adjust domain relevance parameters using a genetic algorithm. Combined with dynamic matching thresholds, cross-granularity domain correlation matching is implemented to output domain division conclusions.
[0064] Step 3: Based on the domain division conclusions, feature identifiers, and device resource call records, a task-oriented reasoning engine is used to deduce behavioral features. The behavioral feature generation trajectory is dynamically optimized through a reinforcement learning strategy, and the logical correlation between the resource call configuration and the application behavioral features is verified.
[0065] In this embodiment of the present invention, a pre-trained multimodal semantic analysis model (such as "chinese-roberta-wwm-ext") performs deep semantic analysis on compliance declaration text, third-party module descriptions, and device resource call records. Combined with a full-word masking mechanism to eliminate Chinese word segmentation ambiguity, this model accurately captures business domain keywords and functional behavior characteristics in complex contexts. Compared to traditional static keyword matching, this method improves recognition accuracy by 23.6%, effectively addressing semantic fragmentation and poor adaptability to industry terminology. A genetic algorithm dynamically adjusts industry relevance parameters (weight coefficients and similarity thresholds), combined with a pre-built industry knowledge graph vector library, to achieve cross-granular domain correlation matching. Through adaptive parameter optimization, the industry classification accuracy reaches 92.4% (F1-score), and the adaptation time for new industries is reduced to less than 1 minute, significantly improving the system's ability to expand into new domains and functions. A task-oriented reasoning engine (such as a fine-tuned Qwen generative model) and reinforcement learning strategies are used to dynamically optimize the function generation path, ensuring that the output application behavior descriptions conform to the requirements of the standard behavior set. At the same time, based on the permission-function mapping rule base, the correlation between resource call configuration and functional logic is automatically verified, and the accuracy rate of identifying redundant or missing permissions reaches 89.7%, significantly reducing the cost of manual review. Through the end-to-end AI-enhanced processing flow, it supports real-time analysis of application dynamic behavior (such as hot updates and cloud configuration), and the processing time of a single request is less than 100ms. In addition, the closed-loop update mechanism based on reinforcement learning can continuously optimize the model and knowledge base without relying on manual rule configuration, achieving large-scale expansion. The full-process automation design (such as manual intervention is only used for auxiliary correction of low-confidence matches) reduces the need for manual labeling and rule configuration, avoids the subjective errors introduced by manual intervention in traditional technologies, and improves the objectivity and consistency of function identification.
[0066] In a preferred embodiment of the present invention, a multimodal semantic analysis model pre-trained with corpus is used to perform complex semantic understanding on the compliance declaration text, third-party module descriptions, and device resource call records of mobile applications, from which feature identifiers associated with business domains and application behaviors are extracted, including:
[0067] Step 11: Based on the pre-trained Chinese semantic understanding model, perform context-aware semantic parsing on the compliance statement text, eliminate word segmentation ambiguity through a full-word masking mechanism, and use a multi-layer attention network to extract keywords related to the business domain;
[0068] Step 12: Perform structured parsing of the third-party module description to identify the module interface call relationships and function description fragments. Combined with the transfer learning strategy, the module functions are mapped to standardized function labels to generate feature identifiers associated with the third-party module behavior.
[0069] Step 13: Parse the permission request data in the device resource call record, construct a resource call feature vector based on the permission category and call frequency, and jointly encode the keywords, standardized function labels, and resource call feature vectors through a multimodal fusion mechanism to form a multi-dimensional semantic feature;
[0070] Step 14: Perform confidence check on the multi-dimensional semantic features. If the check value is lower than the preset threshold, semantic completion and conflict resolution are performed on the feature identifier, and the optimized feature identifier is output.
[0071] In an embodiment of the present invention, when applied in a specific application, the above step 11 may include:
[0072] The pre-trained chinese-roberta-wwm-ext model (based on the RoBERTa architecture and supporting whole-word masking technology) is used as the core semantic parsing tool. This model has been unsupervised pre-trained on large-scale Chinese corpora (such as news texts) and has strong contextual semantic understanding capabilities.
[0073] The parsing process may include:
[0074] Compliance statement text (such as data security policy) is input into the model, and the model processes the Chinese text through a whole-word masking mechanism. For example, "user registration" is masked as a whole word instead of splitting it into "user" and "registration" to avoid word segmentation ambiguity (for example, "cloud computing" will not be incorrectly segmented into "cloud" and "computing").
[0075] The multi-layer self-attention network in the model is used to capture long-distance dependencies between words, such as identifying the semantic association between "data security protection" and "data encryption", accurately locating keywords related to business areas (such as "financial payment" and "social network"), and extracting business area keywords (such as "online education" and "medical health") to form preliminary domain feature identification.
[0076] In an embodiment of the present invention, the whole-word masking technology solves the problem of inaccurate Chinese word segmentation, enabling the model to accurately understand the overall semantics of the vocabulary and avoid missing or mistaking keywords due to word segmentation errors. The multi-layer attention network captures complex semantic associations, such as distinguishing the different contexts of "bank" (financial field) and "bank" (geographic entity), thereby improving the accuracy of extracting domain keywords.
[0077] In an embodiment of the present invention, when specifically applied, the above step 12 may include: structured parsing and label mapping of the third-party module description, and the specific implementation process is as follows:
[0078] Perform structured parsing of third-party module descriptions (such as SDK lists) to extract module names (such as "third-party payment platform payment SDK" and "navigation service platform SDK"), interface call relationships (such as `pay()` and `getLocation()`), and function description text (such as "provides mobile payment functions" and "supports geolocation services").
[0079] The specific implementation process of transfer learning application is as follows:
[0080] Fine-tuning is performed based on the chinese-roberta-wwm-ext model. Based on pre-training, a large amount of labeled data (such as 10,000 SDK function-label pairs) is input for the SDK function classification task. The mapping relationship between module functions and standardized labels is learned (such as "payment SDK" is mapped to the "mobile payment" label, and "location data SDK" is mapped to the "geolocation service" label). With the assistance of the rule engine, uncovered module functions are supplemented. For example, the interface name "`sendMessage()`" is automatically mapped to the "instant messaging" label, and standardized function labels associated with third-party module behaviors (such as "payment settlement" and "location navigation") are generated to form module-level feature identification.
[0081] In an embodiment of the present invention, the personalized functional descriptions of different SDKs are converted into standardized labels (for example, both "instant messaging platform payment SDK" and "third-party payment platform SDK" are mapped to "mobile payment") to eliminate the understanding bias caused by manufacturer differences. Transfer learning enables the model to quickly adapt to newly released SDKs, and the label library can be expanded through a small amount of labeled data, avoiding the inefficiency of traditional manual maintenance rules.
[0082] In an embodiment of the present invention, when applied in a specific application, the above step 13 may include:
[0083] The specific implementation process of feature vector construction and multimodal fusion of device resource call records is as follows:
[0084] Extract the system permissions list (such as `android.permission.CAMERA` and `READ_CONTACTS`), classify them by permission type (such as "data security permission" and "device control permission") and call frequency (high frequency call / low frequency call); convert each permission into a binary or frequency value (such as high frequency call is recorded as 1, low frequency call is recorded as 0.5) to form a vector of dimension N (total number of permissions).
[0085] The business domain keywords (text features) extracted in step 11, the standardized function labels (module features) generated in step 12, and the resource call feature vector (authority features) are jointly encoded.
[0086] Use splicing or attention fusion methods, for example, splicing the word vector of text features (such as the vector generated by the BGE model) with the permission vector to form a multi-dimensional semantic feature vector (such as 768+300=1068 dimensions) containing semantics, functions, and permission information.
[0087] In an embodiment of the present invention, text semantics (such as "location sharing" in the data security policy), module functions, and permission data (such as `ACCESS_FINE_LOCATION`) are combined to avoid the one-sidedness of a single data source (for example, the difference between the "navigation" and "attendance" functions cannot be distinguished by permissions alone).
[0088] Multi-dimensional vector fusion enables subsequent models (such as industry matching engines) to have a more comprehensive understanding of app functions. For example, it can accurately identify the "social relationship management" function through "social SDK + contact permissions + 'friend management' keywords."
[0089] In an embodiment of the present invention, when applied in a specific application, the above step 14 may include:
[0090] The confidence verification and optimization of multi-dimensional semantic features are implemented as follows:
[0091] A checksum is generated using the probability values output by the model (such as the confidence score for keyword extraction or the matching probability for label mapping) or similarity calculations (such as the cosine similarity between the permission vector and the function label). For example, if the probability of extracting the keyword "camera call" is less than 80%, or if the permission `CAMERA` does not match any function labels, the checksum is considered to be below a preset threshold (such as 0.7).
[0092] For missed keywords or tags, we use rule engines or generative models (such as Qwen) to complete them. For example, if the `READ_SMS` permission is detected but there is no "SMS Verification" tag, we automatically add that tag. For conflicting features (such as the "data encryption" keyword not being associated with the "read storage" permission), we correct them through manual review tags or knowledge base rules (such as "data encryption must be associated with storage permissions") to ensure logical consistency between features. The final feature identifier (including cleaned keywords, tags, and permission vectors) is verified and optimized for subsequent industry matching and functional reasoning.
[0093] In an embodiment of the present invention, low-confidence information (such as mistakenly extracted keywords) is filtered, missing features (such as omitted permissions) are completed, and subsequent recognition errors caused by data noise are avoided (such as misjudging "weather query" as "geolocation tracking"). The relevance of functions, permissions, and semantics is ensured through conflict resolution (such as "payment function" must include payment-related permissions), laying the foundation for subsequent permission-function logic verification and reducing manual review costs.
[0094] In a preferred embodiment of the present invention, a context-aware semantic parsing of the compliance statement text is performed based on a pre-trained Chinese semantic understanding model. Segmentation ambiguity is eliminated through a full-word masking mechanism, and keywords related to the business field are extracted using a multi-layer attention network, including:
[0095] Step 111: Preprocess the compliance statement text, including text sentence segmentation, symbol filtering, and stop word removal, to form a standardized input text sequence;
[0096] Step 112: Input the input text sequence into the pre-trained Chinese semantic understanding model, and perform overall masking on the continuous word segments in the text through the whole-word masking mechanism to suppress the semantic deviation caused by word segmentation ambiguity and generate context-aware semantic features;
[0097] Step 113: Using the multi-layer self-attention network of the semantic understanding model, the semantic features are enhanced, and the keyword segments related to the business domain in the text are identified through the attention weight distribution, and their semantic feature vectors are extracted;
[0098] Step 114: Perform classification training on the semantic feature vectors, dynamically adjust the category weights based on historical annotation data, and filter out keywords with confidence levels higher than a preset threshold.
[0099] In the embodiment of the present invention, when specifically applied, the above step 111 may include: pre-processing the compliance statement text, and the specific implementation process is as follows:
[0100] Split the compliance statement text according to specific punctuation marks (such as full stops, question marks, exclamation marks, etc.) to break the long text into multiple independent sentences. For example, split "This application strictly protects the security of user data. The personal information of users will be properly protected." into two sentences: "This application strictly protects the security of user data." and "The personal information of users will be properly protected."
[0101] Remove symbols from the text, such as parentheses, quotation marks, dashes, etc. These symbols usually do not play a key role in semantic understanding of the text and may instead interfere with subsequent analysis. For example, process "(Note: The following is a detailed description)" as "Note: The following is a detailed description."
[0102] Remove common stop words with no actual semantic meaning from the text, such as "de", "shi", "zai", etc. Stop words appear frequently in the text but are not helpful for extracting keywords in the business domain. Removing them can reduce the data volume and improve processing efficiency. For example, process "This is a statement about data security protection" as "This one about data security protection statement." After these processes, a standardized input text sequence is formed, facilitating subsequent semantic parsing.
[0103] In the embodiments of the present invention, preprocessing reduces redundant information in the text, making the subsequent semantic parsing and keyword extraction processes more efficient, reducing the consumption of computing resources. After removing symbols and stop words, the model can focus more on meaningful words and sentences, avoiding interference from these irrelevant information to semantic understanding, thereby improving the accuracy of keyword extraction.
[0104] In the embodiments of the present invention, when specifically applied, the above step 112 may include: whole-word masking processing and semantic feature generation, and the specific implementation process is as follows:
[0105] Input the preprocessed standardized input text sequence into a pre-trained Chinese semantic understanding model (such as chinese-roberta-wwm-ext), and this mechanism will perform whole-word masking processing on continuous word segments in the text. For example, for the text "user registration function", if traditional word segmentation might wrongly split "user registration" into "user" and "registration", the whole-word masking mechanism will mask "user registration" as a whole. During the training process, the model can better understand the semantic relationships between words by learning the masked text, suppressing semantic deviations caused by word segmentation ambiguities. The model generates semantic features containing context information based on the input text and masking processing. These features can reflect the meaning of words in a specific context, rather than just isolated word meanings.
[0106] In an embodiment of the present invention, the whole-word masking mechanism effectively solves the ambiguity problem in Chinese word segmentation, ensures that the model can accurately understand the overall semantics of the vocabulary, avoids semantic understanding deviations caused by incorrect word segmentation, and the generated context-aware semantic features enable the model to better capture the semantic associations between words, providing richer and more accurate information for subsequent keyword extraction.
[0107] In an embodiment of the present invention, when specifically applied, the above step 113 may include: multi-layer self-attention network feature enhancement and keyword segment recognition, and the specific implementation process is as follows:
[0108] The semantic understanding model's multi-layer self-attention network further processes the generated semantic features. The self-attention mechanism allows the model to focus on the relationships between words in different positions within the text and enhance semantic features based on these relationships. For example, when processing the sentence "This app provides online payment and product display functions," the model can use the self-attention mechanism to discover the connections between "online payment," "product display," and "app functions" and enhance the semantic features of these words.
[0109] By using attention weight distribution, the model can identify keyword segments in the text that are relevant to the business domain. Attention weights represent the importance of each word in semantic understanding. Words with higher weights tend to be closely related to the business domain. The model then extracts semantic feature vectors for these keyword segments. These vectors represent the position and characteristics of the keywords in the semantic space.
[0110] In an embodiment of the present invention, the multi-layer self-attention network can highlight key information related to the business field in the text, improve the accuracy and pertinence of keyword extraction, and through the attention mechanism, the model can capture the complex semantic associations between words, thereby more comprehensively understanding the semantics of the text and avoiding missing important keywords.
[0111] In the embodiment of the present invention, when applied in a specific application, the above step 114, semantic feature vector classification training and keyword screening, may include the following implementation process:
[0112] The extracted semantic feature vectors are classified and trained. Combined with historical annotation data, the semantic feature vectors are divided into different categories, each corresponding to a business field or keyword type. During the training process, the model will learn the feature differences between different categories so that it can accurately classify new semantic feature vectors. The weights of each category are dynamically adjusted according to the distribution of historical annotation data and the accuracy of the classification results. For example, if the keywords of a certain category appear less frequently in historical data but are very important in practical applications, the weight of the category can be appropriately increased to ensure that the model can more accurately identify these keywords; based on the classification results and confidence calculation, the keywords with confidence higher than the preset threshold are screened out. The confidence level indicates the degree of certainty of the model in classifying a keyword. Only keywords with confidence higher than the threshold will be retained as the final extracted keywords related to the business field.
[0113] In an embodiment of the present invention, through classification training and dynamic adjustment of category weights, the model can more accurately identify keywords related to the business field, reduce misjudgments and missed judgments, screen keywords with confidence levels higher than the threshold, and ensure that the extracted keywords have high reliability and relevance.
[0114] In a preferred embodiment of the present invention, feature identifiers are converted into multidimensional semantic space mappings. Based on a pre-established domain knowledge feature library, domain relevance parameters are adaptively adjusted through feature space correlation calculation and genetic algorithm. Cross-granularity domain correlation matching is implemented in combination with dynamic matching thresholds, and domain division conclusions are output, including:
[0115] Step 21: Input each feature identifier in the keyword into the pre-trained semantic embedding model to generate the corresponding high-dimensional semantic vector, and establish the initial mapping relationship based on the pre-built industry knowledge graph vector library; the semantic embedding model is trained using a contrastive learning strategy. When applied specifically, it can include:
[0116] Each feature identifier from the previously extracted keywords is input into a pre-trained semantic embedding model (such as one trained using a contrastive learning strategy). The model converts each feature identifier into a corresponding high-dimensional semantic vector. This contrastive learning strategy enables the model to learn the semantic differences and similarities between feature identifiers, enabling the generated vectors to better represent their semantic information. For example, the feature identifier "online payment" is converted into a specific high-dimensional vector that embodies the semantic characteristics of "online payment." An initial mapping relationship is established for each generated high-dimensional semantic vector based on a pre-built industry knowledge graph vector library. The industry knowledge graph vector library stores vector representations of various industries and related concepts. By calculating the similarity between the semantic vector of the feature identifier and the vectors in the industry knowledge graph, the most relevant industry vector is found and an initial mapping relationship is established. Converting feature identifiers into high-dimensional semantic vectors more accurately represents their semantic information, avoiding the limitations of traditional text representation methods. Using the industry knowledge graph vector library to establish the initial mapping relationship quickly links feature identifiers to related industries, improving the efficiency and accuracy of domain matching.
[0117] Step 22: Use a genetic algorithm to dynamically adjust industry relevance parameters, including weight coefficients and similarity thresholds, generate a fitness function based on historical matching data, and optimize the parameter combination through iterative crossover and mutation operations to obtain an optimized parameter combination;
[0118] Step 23: Based on the optimized parameter combination, perform cross-level similarity calculation on the semantic vector of each feature identifier, including matching coarse-grained industry classification with fine-grained sub-fields, screen candidate industries using cosine similarity scores, and determine the final matching result based on a dynamic threshold. When applied specifically, this may include:
[0119] Based on the optimized parameter combination, cross-level similarity calculations are performed on the semantic vectors of each feature identifier. This includes coarse-grained industry classification and fine-grained sub-field matching. First, coarse-grained industry classification is performed, and the similarity between the feature identifier and the first-level industry in the industry knowledge graph is calculated to screen out potentially relevant first-level industries. Then, further matching is performed in the fine-grained sub-fields under these first-level industries, and the similarity between the feature identifier and the sub-field is calculated. Candidate industries are screened using the cosine similarity score. The higher the cosine similarity score, the higher the semantic similarity between the feature identifier and the industry. Based on the calculated cosine similarity score, the industry with the higher score is selected as the candidate industry, and the final matching result is determined based on the dynamic threshold. The dynamic threshold is dynamically adjusted based on the optimized parameter combination and the current matching situation. If the cosine similarity score of the candidate industry is higher than the dynamic threshold, the feature identifier is considered to match the industry; otherwise, it is not matched.
[0120] Cross-level similarity calculation can perform field matching from coarse to fine, which not only ensures the overall grasp of large industries, but also accurately identifies fine-grained sub-fields, improving the matching accuracy. The use of dynamic thresholds makes the judgment of matching results more flexible and can be adjusted according to different situations, avoiding the misjudgment problem that may be caused by fixed thresholds.
[0121] Step 24: Perform multi-level aggregation on the candidate industries. Based on the hierarchical structure of the industry knowledge graph, generate domain division conclusions through a probability weighted fusion strategy. When applied specifically, it can include:
[0122] Perform multi-level aggregation on the selected candidate industries. Based on the hierarchical structure of the industry knowledge graph, integrate candidate industries at different levels. For example, if a feature identifier matches both the first-level industry "Finance" and the second-level sub-field "Online Payment," then associate and integrate them.
[0123] The domain segmentation conclusion is generated using a probability-weighted fusion strategy. For each feature identifier, the matching probability for different candidate industries may vary. Based on these matching probabilities, the candidate industries are weighted and fused to produce the final domain segmentation result. For example, if a feature identifier has a matching probability of 0.8 with "Finance - Online Payment" and a matching probability of 0.2 with "Finance - Investment and Financing," "Finance - Online Payment" will be given a greater weight when generating the domain segmentation conclusion.
[0124] In an embodiment of the present invention, the multi-level aggregation and probability weighted fusion strategy can comprehensively consider information from different levels and different candidate industries to generate comprehensive and accurate field division conclusions, avoiding the one-sidedness that may be brought about by a single matching result. The generated field division conclusions can clearly indicate the industry and sub-field to which each feature identifier belongs.
[0125] In a preferred embodiment of the present invention, a genetic algorithm is used to dynamically adjust industry correlation parameters, including weight coefficients and similarity thresholds, to generate a fitness function based on historical matching data, and to optimize parameter combinations through iterative crossover and mutation operations to obtain optimized parameter combinations, including:
[0126] Step 221: extracting industry-related sample data from the historical matching database and constructing a fitness function, wherein the fitness function is defined as a weighted sum of a matching success rate and an industry coverage rate;
[0127] Step 222: Initialize the parameter population of the genetic algorithm, randomly generate an initial parameter combination set including weight coefficients and similarity thresholds, and each parameter combination represents an individual;
[0128] Step 223: Perform fitness evaluation on each individual, calculate its score based on the fitness function, and select the corresponding population;
[0129] Step 224: Perform a crossover operation on the remaining individuals, randomly select parent individuals using a two-point crossover method, exchange their weight coefficients and parameter segments of the threshold interval, and generate a parameter combination for the offspring generation;
[0130] Step 225: performing a mutation operation on the offspring parameter combination, and randomly adjusting the values of the weight coefficient and the threshold parameter;
[0131] Step 226: Merge the selected population with the mutated offspring population to form a new generation parameter combination, and repeat the crossover and mutation operations until the preset number of iterations is reached to obtain the final population;
[0132] Step 227: Select the corresponding optimized parameter combination from the final population. In the embodiment of the present invention, in the embodiment of the present invention, when specifically applied, the above step 221, constructing the fitness function, is specifically implemented as follows:
[0133] Industry-related sample data is extracted from the historical matching database, which records the previous matching of feature identifiers and industries. Based on this data, a fitness function is constructed, defined as the weighted sum of the matching success rate and the industry coverage rate. The matching success rate refers to the ratio of correctly matched feature identifiers to the total number of feature identifiers, reflecting the accuracy of the matching; the industry coverage rate refers to the ratio of successfully matched industries to the total number of industries, reflecting the comprehensiveness of the matching. By assigning different weights to the matching success rate and industry coverage rate, these two indicators are comprehensively considered to measure the quality of the parameter combination.
[0134] In an embodiment of the present invention, the fitness function comprehensively considers the matching success rate and industry coverage, avoiding the limitation of focusing on only one aspect of accuracy or comprehensiveness, and can more comprehensively evaluate the performance of parameter combinations. The fitness function is constructed based on historical matching data, making the evaluation process more objective and accurate, and able to reflect the actual matching effect.
[0135] In the embodiment of the present invention, when it is specifically applied, the above step 222, initializing the parameter population, is specifically implemented as follows:
[0136] Initialize the genetic algorithm's parameter population by randomly generating a set of initial parameter combinations, including weight coefficients and similarity thresholds. Each parameter combination represents an individual, and these individuals constitute the initial population. The weight coefficients are used to measure the importance of different feature identifiers in domain matching, and the similarity threshold is used to determine whether the match between feature identifiers and industries is sufficient. Randomly generating a set of initial parameter combinations increases the diversity of the population, enabling the genetic algorithm to search across a wider parameter space and increasing the likelihood of finding the optimal solution. The initialization process is simple and direct, quickly starting the genetic algorithm's optimization process, saving time and computing resources.
[0137] In the embodiment of the present invention, when applied in practice, the above step 223, fitness evaluation and population screening, is specifically implemented as follows:
[0138] Each individual's fitness is evaluated and its score is calculated based on the fitness function. The higher the score, the better the matching accuracy and comprehensiveness of the parameter combination corresponding to the individual. The corresponding population is then screened based on the score. Usually, individuals with higher scores are selected to form a new population, while those with lower scores are eliminated. This ensures that the individuals in the population have good performance and provides a high-quality foundation for the subsequent evolution process.
[0139] In the embodiment of the present invention, a "survival of the fittest" mechanism is implemented through fitness evaluation and population screening, individuals with better performance are retained, and the overall quality of the population is gradually improved. The screening process guides the genetic algorithm to evolve in a more optimal direction, accelerating the speed of finding the optimized parameter combination.
[0140] In the embodiment of the present invention, when it is specifically applied, the above step 224, the cross operation, is specifically implemented as follows:
[0141] A crossover operation is performed on the remaining individuals using the two-point crossover method. Two parent individuals are randomly selected, and two crossover points are randomly chosen between their weight coefficients and thresholds. The parameter segments between these two crossover points are then swapped to generate the offspring parameter combination. For example, parent individual A has weight coefficients of [0.2, 0.3, 0.5] and a similarity threshold of 0.6; parent individual B has weight coefficients of [0.1, 0.4, 0.5] and a similarity threshold of 0.7. Assuming the crossover points are between the second and third elements of the weight coefficients, the weight coefficients and similarity thresholds of the offspring individuals may change after the swap.
[0142] In the embodiment of the present invention, the crossover operation realizes the genetic recombination between the parent individuals, so that the offspring individuals can inherit the excellent characteristics of the parent, and at the same time generate new parameter combinations, thereby increasing the diversity of the population. By exchanging parameter fragments, it is possible to generate a parameter combination that is better than the parent, helping the genetic algorithm to explore new solution space and increase the probability of finding the optimal solution.
[0143] In the embodiment of the present invention, when applied in a specific application, the above step 225, the mutation operation, is specifically implemented as follows:
[0144] Perform a mutation operation on the offspring parameter combinations, randomly adjusting the weight coefficients and threshold parameters. Mutation can change the parameter values within a certain range, for example, by randomly increasing or decreasing the current value of the weight coefficient or similarity threshold by a small amount. This prevents the genetic algorithm from getting stuck in a local optimum and introduces new search directions.
[0145] In the embodiment of the present invention, the mutation operation can break the local optimal state that may exist in the population, giving the genetic algorithm the opportunity to explore a better solution, enhancing the global search capability of the algorithm, randomly adjusting the parameter values, further increasing the diversity of the population, and enabling the algorithm to search in a wider parameter space.
[0146] In the embodiment of the present invention, when it is specifically applied, the above step 226 generates a new generation of population and iterates, and the specific implementation process is as follows:
[0147] The screened population is merged with the mutated offspring population to form a new generation of parameter combinations. The crossover and mutation operations are then repeated to continuously evolve the population. This process continues until the preset number of iterations is reached. Each iteration gradually optimizes the individuals in the population, evolving towards a more optimal parameter combination.
[0148] In an embodiment of the present invention, the parameter combination is continuously optimized through multiple iterations, the accuracy and comprehensiveness of the matching are gradually improved, and finally a parameter combination with better performance is obtained. The preset number of iterations can control the running time and convergence degree of the algorithm, ensuring that the algorithm obtains relatively stable optimization results within a reasonable time.
[0149] In the embodiment of the present invention, when it is specifically applied, the above step 227 selects the optimized parameter combination, and the specific implementation process is as follows:
[0150] The corresponding optimized parameter combination is selected from the final population. The parameter combination corresponding to the individual with the highest fitness score is usually chosen as the final optimization result. This parameter combination strikes a good balance between matching success rate and industry coverage, providing more appropriate weight coefficients and similarity thresholds for subsequent domain-related matching. Selecting the individual with the highest fitness score from the final population ensures that the resulting parameter combination is the optimal solution after multiple rounds of optimization, which can improve the performance of domain-related matching. The resulting optimized parameter combination can be directly applied to subsequent matching processes, improving the accuracy and efficiency of the system.
[0151] In a preferred embodiment of the present invention, based on the domain division conclusion, feature identifiers, and device resource call records, a task-oriented reasoning engine is used to derive behavioral features, and a reinforcement learning strategy is used to dynamically optimize the behavioral feature generation trajectory. The logical correlation between the resource call configuration and the application behavior features is verified, including:
[0152] Step 31: Based on the domain division conclusion, initialize the task-oriented reasoning engine, load the preset standard behavior set and permission-function mapping rule library, and build the initial candidate behavior feature set for functional reasoning;
[0153] Step 32: Input the feature identifier and device resource call record into the inference engine, and filter out the candidate set that matches the standard behavior set based on semantic similarity calculation;
[0154] Step 33: Using a reinforcement learning strategy to optimize the behavior features to generate trajectories to obtain optimized candidate behaviors;
[0155] Step 34: Verify the optimized candidate behavior to obtain a verified behavior description;
[0156] Step 35: Based on the permission-function mapping rule base, perform logical correlation analysis on the verified behavior description to determine whether the permission configuration in the device resource call record is associated with the derived behavior characteristics, so as to obtain the final application behavior description and permission verification results that meet the specifications.
[0157] In the embodiment of the present invention, when it is specifically applied, the above step 31, initializing the inference engine and constructing the initial candidate behavior feature set, is specifically implemented as follows:
[0158] Based on the domain division conclusions obtained previously, the working direction of the inference engine is determined. For example, if the domain division results show that the application belongs to the social field, the inference engine will focus on the deduction of social-related behavioral features; load the preset standard behavior set, which covers widely recognized and standardized behaviors in the field. For example, in the social field, standard behaviors may include "adding friends", "posting updates", "private message communication", etc. At the same time, the permission-function mapping rule base is loaded, which records the permissions required to implement each function. For example, the "posting updates" function may require "read and write album permissions", "network access permissions", etc.; based on the above loaded information, the inference engine constructs an initial candidate behavior feature set for functional reasoning. These candidate behaviors are application behaviors that may appear in the current field.
[0159] In an embodiment of the present invention, the reasoning engine is initialized according to the domain division conclusion, so that the reasoning process can be accurately focused on a specific domain, avoiding the waste of computing resources in irrelevant domains and improving the reasoning efficiency. The standard behavior set and permission-function mapping rule base provide a standardized reference for subsequent reasoning and verification, ensuring the standardization and consistency of the deduction results.
[0160] In the embodiment of the present invention, when applied in practice, the above step 32, screening the candidate set that matches the standard behavior set, is specifically implemented as follows:
[0161] The feature identifier and device resource call records are input into the inference engine. The feature identifier contains key information related to the application's business domain and behavior, while the device resource call records reflect the application's use of device resources (such as the camera, microphone, and address book) during operation. The inference engine compares the information in the input feature identifier and device resource call records with the behaviors in the standard behavior set based on semantic similarity calculations. For example, if the feature identifier contains content related to "video call," the inference engine will search the standard behavior set for semantically similar "video call" behaviors and include them in the candidate set.
[0162] In an embodiment of the present invention, by filtering candidate sets through semantic similarity calculation, behaviors that match the actual situation of the application can be quickly found from a large number of standard behaviors, narrowing the scope of subsequent analysis, improving the accuracy of reasoning, comprehensively considering feature identifiers and device resource call records, and making full use of multi-source information for reasoning, so that the candidate set can better reflect the actual behavior of the application.
[0163] In the embodiment of the present invention, when specifically applied, the above step 33 uses a reinforcement learning strategy to optimize the behavior characteristics to generate a trajectory. The specific implementation process is as follows:
[0164] Reinforcement learning strategies dynamically adjust the trajectory of behavioral feature generation based on the inference engine's historical inference results and environmental feedback. After each inference, the inference engine receives feedback, which can include information about the accuracy of the inference results and their match with actual application behaviors. Based on this feedback, the reinforcement learning algorithm optimizes the behavior feature generation method. For example, if certain features are found to frequently lead to incorrect matches during inference, the algorithm adjusts the weighting or processing of these features to improve the accuracy of generated behaviors. After multiple iterations of optimization, the optimized candidate behaviors are ultimately obtained.
[0165] In an embodiment of the present invention, the reinforcement learning strategy enables the inference engine to adaptively adjust the behavioral feature generation trajectory according to actual conditions, continuously learn and improve, and adapt to different application scenarios and data changes. Through continuous optimization, it can reduce reasoning errors, improve the accuracy of the generated candidate behaviors, and provide more reliable results for subsequent verification and analysis.
[0166] In the embodiment of the present invention, when it is specifically applied, the above step 34 verifies the optimized candidate behavior, and the specific implementation process is as follows:
[0167] Optimized candidate behaviors are verified, primarily to check for compliance with basic logic and specifications. For example, the behavior is checked to see if it aligns with the application's business domain and falls within the reasonable range of the standard behavior set. If a candidate behavior exhibits logical inconsistencies or doesn't conform to specifications, it is corrected or excluded. After verification, a verified behavior description is obtained.
[0168] In an embodiment of the present invention, the verification process can remove unreasonable candidate behaviors, ensure the quality of the final behavior description, and avoid erroneous or non-standard behaviors from entering the subsequent analysis link. The verified behavior description is more reliable and provides a solid foundation for subsequent permission verification and logical correlation analysis.
[0169] In the embodiment of the present invention, when specifically applied, in the above step 35, the specific process of determining the permission-function mapping rule base is as follows:
[0170] Security experts and mobile application engineers collaborate to sort out the correspondence between common functions (such as "user login", "location positioning", "payment settlement", etc.) and required permissions. For example:
[0171] The "photo upload" function corresponds to `android.permission.CAMERA` (camera permission) and `android.permission.WRITE_EXTERNAL_STORAGE` (storage permission);
[0172] The "Mobile Payment" function corresponds to `com.android.vending.BILLING` (in-app billing permission) and third-party SDK-specific permissions (such as `alipay.permission.GET_AUTH_CODE` of third-party payment platform SDKs).
[0173] A structured basic rule base is formed, including function names, required permission lists, and optional permission lists (for example, "HD photography" may additionally require the `MANAGE_VIDEO_CALLS` permission).
[0174] Integrate industry regulations and supplement relevant rules on the principle of minimizing privileges. For example:
[0175] The "read contacts" feature must be associated with the `READ_CONTACTS` permission, but unrelated permissions (such as `CALL_PHONE`) are prohibited. Sensitive features (such as "biometric login") must be mandatory with the `USE_BIOMETRIC` permission and marked as "high-risk permission."
[0176] Instruction fine-tuning based on the Qwen model:
[0177] Use the "Whether the function keyword matches the system permission list" instruction template, input manually labeled triple data (function name, function keyword, standard permission list), train the Qwen model to generate the permission list. For example:
[0178] Input the function name "file transfer" and the model outputs the required permissions `INTERNET` (network permission) and `READ_FILES` (file reading permission);
[0179] For the new feature "AI Image Generation", its permission requirements (such as `ACCESS_NETWORK_STATE` and `WRITE_EXTERNAL_STORAGE`) are completed through model reasoning.
[0180] Dynamic update mechanism:
[0181] When new permissions (such as `READ_MEDIA_IMAGES` added in Android 14) or deprecated permissions (such as the old `READ_EXTERNAL_STORAGE`) are detected, the rule base is updated in the following ways:
[0182] Automatically crawl Android developer documentation and official descriptions of major SDKs (such as instant messaging open platforms and navigation service platform APIs) to extract permission change instructions;
[0183] For the frequently appearing "permission-function mismatch" cases in historical matching data (such as a function that has been missing the "VIBRATE" permission for a long time), they are manually reviewed and included in the rule base.
[0184] Hierarchical and standardized rule base, hierarchical structure design:
[0185] Establish a three-level mapping relationship:
[0186] Function categories (such as "social interaction" and "tool services"), sub-functions (such as "video call" and "file sharing"), and specific permissions (such as `CAMERA` and `RECORD_AUDIO`);
[0187] Each sub-function is marked with "required permissions" (if missing, the function cannot be realized) and "auxiliary permissions" (improve the experience but are not required, such as "message reminder" corresponds to the `VIBRATE` permission), defined in a standardized format, and stored in XML structured format.
[0188] The specific implementation process of the above step 35 is as follows:
[0189] Input data preparation:
[0190] Verified behavior description: from step 34, such as standardized function names such as "Photo Sharing" and "Contacts Backup".
[0191] Device resource call records: Permission list obtained from the APK file or runtime monitoring, such as `["CAMERA", "INTERNET", "READ_CONTACTS"]`.
[0192] Permission rule matching:
[0193] Search the mapping library:
[0194] Based on the behavior description (such as "take a photo and share"), find the corresponding `required_permissions` (required permissions) and `optional_permissions` (optional permissions) in the permission-function mapping rule library. For example:
[0195] Required permissions should be `["CAMERA", "INTERNET"]`; optional permissions may include `["WRITE_EXTERNAL_STORAGE"]`.
[0196] Bidirectional matching check:
[0197] Required permissions integrity: Checks whether the device resource call record contains all required permissions. If the "Photo Sharing" function lacks the `CAMERA` permission, it will be judged as "Permission Missing";
[0198] Redundant permissions detection: If a record contains permissions not defined in the rule library (for example, "Photo Sharing" calls `READ_CONTACTS`), it is judged as "permission abuse."
[0199] Gap analysis and problem location:
[0200] Permission loss scenario:
[0201] For example, if the behavior is described as "geolocation navigation" but `ACCESS_FINE_LOCATION` is not included in the device permissions, a warning will be triggered: "The function relies on high-precision positioning permissions, but the relevant permission configuration is not detected, which may lead to functional abnormalities or compliance risks."
[0202] Permission redundancy scenario:
[0203] The behavior is described as "text editing," but the permission record contains `CAMERA`, marking the issue: "The text editing function does not require camera permissions, which may be an excessive permission request."
[0204] Version compatibility processing:
[0205] If the target device is Android 13 or later, the rule library automatically matches the new version permissions (such as `READ_MEDIA_IMAGES`) instead of the old version `READ_EXTERNAL_STORAGE`, avoiding misjudgment due to system version differences.
[0206] Result output and processing:
[0207] Generates a permission verification report and outputs the results in a structured form, including:
[0208] List of compliant functions (e.g., "Photo sharing: permissions match normal");
[0209] List of issues (e.g., "Missing permissions: The address book backup feature lacks the `READ_CONTACTS` permission");
[0210] Fix (e.g., "Please add the `READ_CONTACTS` permission and describe its purpose in the data security policy").
[0211] Dynamic correction mechanism:
[0212] If a "weak association between permissions and functions" is detected (for example, a function is associated with low-frequency permissions), the case will be submitted to the rule base update process, and the mapping relationship will be optimized through manual review or model retraining to form a closed-loop iteration.
[0213] In an embodiment of the present invention, a preset rule base is combined with machine learning to replace manual comparison of permissions one by one, thereby improving the efficiency of permission verification by more than 80% and reducing manual audit costs. The hierarchical rule base supports fine-grained matching (from major functional categories to specific permissions), accurately identifying problems such as "lack of permissions resulting in unavailable functions" or "abuse of permissions infringing on user data security", with a compliance detection accuracy rate of 89.7%; combined with model fine-tuning and dynamic updating of the rule base, it supports rapid adaptation of new functions (such as artificial intelligence tools) and new permissions (such as features of new Android versions) without the need to manually maintain a large number of rules, and the matching time for new functional permissions is less than 1 minute.
[0214] An embodiment of the present invention further provides an AI-enhanced function recognition system, comprising:
[0215] The extraction module uses a multimodal semantic analysis model pre-trained with corpus data to perform complex semantic understanding on mobile app compliance declaration text, third-party module descriptions, and device resource call records, extracting feature identifiers associated with business domains and application behaviors.
[0216] The processing module is used to convert feature identifiers into multidimensional semantic space mappings. Based on the pre-established domain knowledge feature library, it uses feature space correlation calculations and genetic algorithms to adaptively adjust domain relevance parameters. It also combines dynamic matching thresholds to implement cross-granularity domain correlation matching and output domain division conclusions.
[0217] The processing module is used to derive behavioral features based on domain division conclusions, feature identifiers, and device resource call records using a task-oriented reasoning engine. It dynamically optimizes behavioral feature generation trajectories through reinforcement learning strategies and verifies the logical correlation between resource call configuration and application behavioral features.
[0218] An embodiment of the present invention further provides a computing device comprising: a processor and a memory storing a computer program, wherein the computer program, when executed by the processor, performs the above-described method. All implementations in the above-described method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0219] The embodiment of the present invention further provides a computer-readable storage medium storing instructions, which, when executed on a computer, causes the computer to execute the above-described method. All implementations in the above-described method embodiment are applicable to this embodiment and can achieve the same technical effects.
[0220] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A function recognition method based on AI enhancement, characterized in that: The method comprises: Step 1: Using a pre-trained multimodal semantic analysis model, we conduct a composite semantic understanding of the mobile app's compliance declaration text, third-party module descriptions, and device resource call records, extracting feature identifiers associated with the business domain and application behavior. Step 2: Convert feature identifiers into multidimensional semantic space mappings. Based on the pre-established domain knowledge feature library, calculate the correlation in feature space and adaptively adjust domain relevance parameters using a genetic algorithm. Combined with dynamic matching thresholds, cross-granularity domain correlation matching is implemented to output domain division conclusions. Step 3: Based on the domain division conclusions, feature identifiers, and device resource call records, a task-oriented reasoning engine is used to deduce behavioral features. The behavioral feature generation trajectory is dynamically optimized through a reinforcement learning strategy, and the logical correlation between the resource call configuration and the application behavioral features is verified.
2. The AI-enhanced function recognition method according to claim 1, characterized in that: Leveraging a multimodal semantic analysis model pre-trained on corpus data, we implement complex semantic understanding of mobile app compliance declarations, third-party module descriptions, and device resource call records, extracting feature identifiers associated with business domains and application behaviors, including: Step 11: Based on the pre-trained Chinese semantic understanding model, perform context-aware semantic parsing on the compliance statement text, eliminate word segmentation ambiguity through a full-word masking mechanism, and use a multi-layer attention network to extract keywords related to the business domain; Step 12: Perform structured parsing of the third-party module description to identify the module interface call relationships and function description fragments. Combined with the transfer learning strategy, the module functions are mapped to standardized function labels to generate feature identifiers associated with the third-party module behavior. Step 13: Parse the permission request data in the device resource call record, construct a resource call feature vector based on the permission category and call frequency, and jointly encode the keywords, standardized function labels, and resource call feature vectors through a multimodal fusion mechanism to form a multi-dimensional semantic feature; Step 14: Perform confidence check on the multi-dimensional semantic features. If the check value is lower than the preset threshold, semantic completion and conflict resolution are performed on the feature identifier, and the optimized feature identifier is output.
3. The AI-enhanced function recognition method according to claim 2, characterized in that: Based on a pre-trained Chinese semantic understanding model, we conduct context-aware semantic parsing of compliance statement texts, eliminate word segmentation ambiguity through a full-word masking mechanism, and utilize a multi-layer attention network to extract keywords related to the business domain, including: Step 111: Preprocess the compliance statement text, including text sentence segmentation, symbol filtering, and stop word removal, to form a standardized input text sequence; Step 112: Input the input text sequence into the pre-trained Chinese semantic understanding model, and perform overall masking on the continuous word segments in the text through the whole-word masking mechanism to suppress the semantic deviation caused by word segmentation ambiguity and generate context-aware semantic features; Step 113: Using the multi-layer self-attention network of the semantic understanding model, the semantic features are enhanced, and the keyword segments related to the business domain in the text are identified through the attention weight distribution, and their semantic feature vectors are extracted; Step 114: Perform classification training on the semantic feature vectors, dynamically adjust the category weights based on historical annotation data, and filter out keywords with confidence levels higher than a preset threshold.
4. The AI-enhanced function recognition method according to claim 3, characterized in that: The feature identifier is converted into a multi-dimensional semantic space mapping. Based on the pre-established domain knowledge feature library, the domain relevance parameters are adaptively adjusted through feature space correlation calculation and genetic algorithm. Combined with the dynamic matching threshold, cross-granularity domain correlation matching is implemented, and the domain division conclusion is output, including: Step 21: Input each feature identifier in the keyword into the pre-trained semantic embedding model to generate the corresponding high-dimensional semantic vector, and establish the initial mapping relationship based on the pre-built industry knowledge graph vector library; the semantic embedding model is trained using a contrastive learning strategy; Step 22: Use a genetic algorithm to dynamically adjust industry relevance parameters, including weight coefficients and similarity thresholds, generate a fitness function based on historical matching data, and optimize the parameter combination through iterative crossover and mutation operations to obtain an optimized parameter combination; Step 23: Based on the optimized parameter combination, perform cross-level similarity calculation on the semantic vector of each feature identifier, including matching coarse-grained industry classification with fine-grained sub-fields, screen candidate industries using cosine similarity scores, and determine the final matching result based on a dynamic threshold; Step 24: Perform multi-level aggregation on the candidate industries, and generate domain division conclusions through a probability weighted fusion strategy based on the hierarchical structure of the industry knowledge graph.
5. The AI-enhanced function recognition method according to claim 4, characterized in that: Genetic algorithms are used to dynamically adjust industry relevance parameters, including weight coefficients and similarity thresholds. A fitness function is generated based on historical matching data. Parameter combinations are optimized through iterative crossover and mutation operations to obtain the optimized parameter combination, including: Step 221: extract industry-related sample data from the historical matching database and construct a fitness function; Step 222: Initialize the parameter population of the genetic algorithm, randomly generate an initial parameter combination set including weight coefficients and similarity thresholds, and each parameter combination represents an individual; Step 223: Perform fitness evaluation on each individual, calculate its score based on the fitness function, and select the corresponding population; Step 224: Perform a crossover operation on the remaining individuals, randomly select parent individuals using a two-point crossover method, exchange their weight coefficients and parameter segments of the threshold interval, and generate a parameter combination for the offspring generation; Step 225: performing a mutation operation on the offspring parameter combination, and randomly adjusting the values of the weight coefficient and the threshold parameter; Step 226: Merge the selected population with the mutated offspring population to form a new generation parameter combination, and repeat the crossover and mutation operations until the preset number of iterations is reached to obtain the final population; Step 227: Select the corresponding optimized parameter combination from the final population.
6. The AI-enhanced function recognition method according to claim 5, characterized in that: The fitness function is defined as the weighted sum of the matching success rate and the industry coverage rate.
7. The AI-enhanced function recognition method according to claim 6, characterized in that: Based on the domain division conclusions, feature identifiers, and device resource call records, a task-oriented reasoning engine is used to derive behavioral features. The behavioral feature generation trajectory is dynamically optimized through a reinforcement learning strategy, and the logical correlation between resource call configuration and application behavioral features is verified, including: Based on the domain division conclusions, the task-oriented reasoning engine is initialized, the preset standard behavior set and permission-function mapping rule library are loaded, and the initial candidate behavior feature set for functional reasoning is constructed; Input feature identifiers and device resource call records into the inference engine, and filter out candidate sets that match the standard behavior set based on semantic similarity calculation; Adopt reinforcement learning strategy to optimize behavior features to generate trajectories and obtain optimized candidate behaviors; Verify the optimized candidate behavior to obtain a verified behavior description; Based on the permission-function mapping rule base, a logical correlation analysis is performed on the verified behavior description to determine whether the permission configuration in the device resource call record is associated with the derived behavior characteristics, so as to obtain the final application behavior description and permission verification results that meet the specifications.
8. A function recognition system based on AI enhancement, characterized in that: The system is used to perform the method according to any one of claims 1 to 7, comprising: The extraction module uses a multimodal semantic analysis model pre-trained with corpus data to perform complex semantic understanding on mobile app compliance declaration text, third-party module descriptions, and device resource call records, extracting feature identifiers associated with business domains and application behaviors. The processing module is used to convert feature identifiers into multidimensional semantic space mappings. Based on the pre-established domain knowledge feature library, it uses feature space correlation calculations and genetic algorithms to adaptively adjust domain relevance parameters. It also combines dynamic matching thresholds to implement cross-granularity domain correlation matching and output domain division conclusions. The processing module is used to derive behavioral features based on domain division conclusions, feature identifiers, and device resource call records using a task-oriented reasoning engine. It dynamically optimizes behavioral feature generation trajectories through reinforcement learning strategies and verifies the logical correlation between resource call configuration and application behavioral features.
9. A computing device, characterized in that include: one or more processors; A storage device for storing one or more computer programs, wherein when the one or more computer programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
File semantic association storage system and method based on knowledge graph
CN113961528A
Graph knowledge enhanced paraphrase generation method and system oriented to legal instruments
CN118552358A