Analysis method and analysis system for AI application software of mobile terminal
By combining dynamic symbolic execution, federated averaging, and deep reinforcement learning, the problems of encrypted model parsing and resource scheduling in mobile AI analysis are solved, achieving efficient model behavior analysis and resource optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-04-07
AI Technical Summary
Existing mobile AI analysis technologies suffer from problems such as difficulty in parsing encrypted models, low efficiency of federated learning, and poor resource scheduling adaptability, leading to model behavior analysis failure and resource waste.
The algorithm employs dynamic symbolic execution to parse the structure of the encryption model, combines heterogeneous perception federated averaging algorithm for cross-device collaborative analysis, and uses deep reinforcement learning for adaptive resource scheduling to form a closed-loop analysis system.
It achieves efficient parsing of encrypted models, improves the convergence speed and resource utilization of federated learning, and enhances the accuracy and efficiency of analysis.
Smart Images

Figure CN121807664A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of information technology processing technology, specifically referring to the analysis method and system for mobile AI application software. Background Technology
[0002] With the rapid development of mobile AI technology, mobile AI applications have permeated daily life, but existing analysis techniques have three major limitations: 1. Difficulty in parsing encrypted models: Mainstream mobile AI frameworks all support model encryption. Traditional static decompilation tools cannot extract the network structure of encrypted models (such as convolutional layer parameters and activation function types), resulting in the failure of model behavior analysis. 2. Low efficiency of federated learning: When using the standard FedAvg algorithm for cross-device collaborative analysis, there are problems such as asynchronous model updates and slow convergence speed due to the heterogeneity of computing power of devices. 3. Poor resource scheduling adaptability: The dynamic changes in mobile hardware (CPU / NPU) and network status make fixed analysis strategies prone to "overloading of low-end devices" or "waste of resources on high-end devices". Summary of the Invention
[0003] To address the problems of encryption model parsing failure, low federated learning efficiency, and rigid resource scheduling in existing technologies, this invention provides an analysis method and system for mobile AI applications. By combining dynamic symbolic execution with attention mechanisms, it solves the encryption model parsing problem, proposes the FedAvg++ algorithm to overcome the heterogeneity bottleneck of federated learning, and achieves adaptive resource scheduling through DRL. The three work together to form a closed-loop analysis system.
[0004] To achieve the above functions, the technical solution adopted by the present invention is as follows: An analysis method for mobile AI application software, comprising the following steps: (1) The encryption model structure is parsed using a dynamic symbolic execution algorithm; (2) Cross-device collaborative analysis is performed using a heterogeneous sensing federated averaging algorithm; (3) Adaptive resource scheduling is performed using the deep reinforcement learning (DRL) algorithm.
[0005] Specifically, the dynamic symbolic execution algorithm in step (1) includes: Hijack the core functions of the AI framework and record the memory address and input / output tensor dimensions when the model is loaded; Track the tensor data stream during the model inference process, extract the mean, variance, and sparsity of the output of each layer, and construct the feature trajectory matrix F∈R. (L×3) ; The similarity between the model to be parsed and the pre-trained feature library is calculated based on the attention mechanism. When the similarity is greater than 0.85, it is determined to be of the same type of structure.
[0006] Specifically, the federated averaging algorithm in step (2) includes: Based on device computing power and network bandwidth, the client device level is defined as level 3; Dynamically allocate aggregation weights based on device level and dataset size, and calculate global model parameters; High-end equipment participates in each iteration, mid-range equipment participates every two iterations, and low-end equipment participates every five iterations.
[0007] Specifically, the deep reinforcement learning (DRL) algorithm in step (3) includes: Define the state space as device level, network latency, battery level, and application type, and the action space as analysis frequency and data sampling rate; Based on the reward function: R = λ1·Accuracy-λ2·(CPU%+Memory% / 100)-λ3·BatteryLoss training scheduling policy; The optimal analysis frequency and sampling rate are output based on the real-time status.
[0008] Specifically, the attention weight α i For the convolutional layer, α = 0.8; for the fully connected layer, α = 0.2; the similarity calculation formula is: Sim(Ft arget ,F lib )=Softmax(Σ(L)α i cos(F target [i],F lib [i])).
[0009] Specifically, the device level is defined as: Level=1: FLOPS≥10 12 And the bandwidth is ≥100Mbps; Level=2:10 11 ≤FLOPS<10 12 And 10 ≤ bandwidth < 100Mbps; Level=3: Other cases.
[0010] Specifically, the aggregation weight ω k =(Level(k) / ΣLevel(i))·(size(k) / total size ), where size(k) is the size of the dataset for client k, and total size This represents the total global data volume.
[0011] Specifically, the reward function parameters are λ1=0.6, λ2=0.3, and λ3=0.1, and the PPO algorithm is used to train the scheduling strategy.
[0012] An analysis system for mobile AI applications includes an edge analysis module, an edge aggregation module, a cloud decision-making module, and a security detection module. The edge analysis module is connected to the edge aggregation module, the edge aggregation module to the cloud decision-making module, and the cloud decision-making module to the edge analysis module via encrypted communication. The security detection module is connected to both the edge analysis module and the cloud decision-making module. The edge analysis module is used to parse the encrypted model structure and collect performance data. The edge aggregation module is used to aggregate encrypted features from multiple devices and generate a regional performance baseline. The cloud decision-making module is used to construct a digital twin of the mobile AI application and output optimization solutions based on the federated analysis results. The security detection module is used to detect backdoor attacks based on the model structure and monitor the uploading of abnormal data.
[0013] Specifically, the cloud-based decision-making module simulates model behavior under different devices and scenarios through digital twins, and the output optimization solutions include model pruning, operator replacement, and quantization strategy adjustment.
[0014] Specifically, the detection results of the security detection module include reports on backdoor attack risks and abnormal uploads of privacy data.
[0015] The beneficial effects achieved by adopting the above-described solution in this invention are as follows: 1. The DSE++ algorithm, through a three-step method of "Hook-Tracking-Attention Matching", achieves dynamic parsing of encryption models of mainstream frameworks such as TensorFlowLite and PyTorch Mobile for the first time. By extracting tensor feature trajectories and combining them with the attention mechanism, it improves the parsing accuracy and provides a structural foundation for subsequent performance analysis and security detection. 2. The FedAvg++ algorithm improves convergence speed and reduces communication volume through device hierarchies, dynamic weight allocation, and hierarchical iteration. 3. The DRL algorithm is based on the scheduling strategy trained by PPO, which can adjust the analysis frequency and sampling rate in real time according to device level, network latency and battery power, thereby improving resource utilization. 4. It achieves the integration of encryption model parsing, efficient federated collaboration, and adaptive resource scheduling. Attached Figure Description
[0016] Figure 1 This is a flowchart of the analysis method for mobile AI application software according to the present invention; Figure 2This is a flowchart of the method for dynamic analysis of encrypted models for mobile AI application software, as described in this invention. Figure 3 This is a flowchart of a cross-device federated collaborative analysis method for mobile AI application software, as described in this invention. Figure 4 This is a flowchart of an adaptive resource scheduling method for analysis of mobile AI application software, as described in this invention. Figure 5 This is a system module diagram of the analysis system for mobile AI application software according to the present invention. Detailed Implementation
[0017] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Combined with appendix Figures 1-4 The present invention relates to an analysis method for mobile AI application software, which includes the following steps: (1) The dynamic symbolic execution algorithm DSE++ is used to parse the encryption model structure; (1.1) Hijack the core functions of the AI framework and record the memory address and input / output tensor dimensions when the model is loaded; (1.2) Track the tensor data flow during the model inference process, extract the mean, variance, and sparsity of the output of each layer, and construct the feature trajectory matrix F∈R. (L×3) ; (1.2) Calculate the similarity between the model to be parsed and the pre-trained feature library based on the attention mechanism. When the similarity is greater than 0.85, it is determined to be of the same type of structure. (2) Cross-device collaborative analysis is performed using the FedAvg++ algorithm for heterogeneous sensing; (2.1) Based on the device's computing power and network bandwidth, the client device level is defined as level 3; (2.2) Dynamically allocate aggregation weights based on device level and dataset size, and calculate global model parameters; (2.3) High-end equipment participates in each iteration, mid-range equipment participates once every 2 iterations, and low-end equipment participates once every 5 iterations; (3) Adaptive resource scheduling is performed using the deep reinforcement learning (DRL) algorithm. (3.1) Define the state space as device level, network latency, battery level and application type, and the action space as analysis frequency and data sampling rate; (3.2) Training the scheduling strategy based on the reward function The reward function is: R=λ1·Accuracy-λ2·(CPU%+Memory% / 100)-λ3·BatteryLoss; (3.3) Output the optimal analysis frequency and sampling rate based on the real-time status.
[0019] The attention weight α i For the convolutional layer, α = 0.8; for the fully connected layer, α = 0.2; the similarity calculation formula is: Sim(Ft) arget ,F lib )=Softmax(Σ(L)α i cos(F target [i],F lib [i])).
[0020] The device level is defined as follows: Level=1: FLOPS≥10 12 And the bandwidth is ≥100Mbps; Level=2:10 11 ≤FLOPS<10 12 And 10 ≤ bandwidth < 100Mbps; Level=3: Other cases.
[0021] The aggregation weight ω k =(Level(k) / ΣLevel(i))·(size(k) / total size ), where size(k) is the size of the dataset for client k, and total size This represents the total global data volume.
[0022] The reward function parameters are λ1=0.6, λ2=0.3, and λ3=0.1, and the PPO algorithm is used to train the scheduling strategy.
[0023] Combined with appendix Figure 5An analysis system for mobile AI applications includes an edge analysis module, an edge aggregation module, a cloud decision-making module, and a security detection module. The edge analysis module is connected to the edge aggregation module, the edge aggregation module to the cloud decision-making module, and the cloud decision-making module to the edge analysis module via encrypted communication. The security detection module is connected to both the edge analysis module and the cloud decision-making module. The edge analysis module parses the encrypted model structure and collects performance data. The edge aggregation module aggregates encrypted features from multiple devices and generates a regional performance baseline. The cloud decision-making module constructs a digital twin of the mobile AI application and outputs optimization solutions based on federated analysis results. The security detection module detects backdoor attacks based on the model structure and monitors abnormal data uploads. The cloud decision-making module simulates model behavior under different devices and scenarios using the digital twin, and its output optimization solutions include model pruning, operator replacement, and quantization strategy adjustment. The security detection module's detection results include backdoor attack risks and reports of abnormal privacy data uploads. Example 1
[0024] Intelligent Image Recognition App Analysis Scenario: This application uses the encrypted TFLite model and runs on a Snapdragon 8 Gen3 phone, a high-end device, Level=1.
[0025] (1) Dynamic parsing of the encryption model: (1.1) The edge analysis module hooks the SetInputFromBuffer() function of TFLite to record the input tensor as a 224×224 RGB image and the output as the probability of 1000 object classes; (1.2) Track and extract 16 layers of features to construct a feature trajectory matrix F containing mean (μ), variance (σ), and sparsity (s); (1.3) Matching with the feature library, Sim=0.92, it is parsed as a "MobileNetV2+SSD" structure, with a parsing accuracy of 95.3%; (2) Federated Collaboration Analysis: (2.1) Of the 1000 devices, 300 are Level 1, 500 are Level 2, and 200 are Level 3; (2.2) Dynamic weight ω k The calculation is as follows: high-end equipment accounts for 60%, mid-range equipment for 30%, and low-end equipment for 10%. (2.3) After 28 iterations, the system converged and it was found that "the recognition accuracy decreased by 15% when the illumination was <50 lux". (3) Adaptive resource scheduling: (3.1) The DRL algorithm outputs an analysis frequency of 10Hz and a sampling rate of 100% based on the status of "high-end equipment, 5G network, and 80% battery". (3.2) Resource consumption: CPU increased by 4% and memory increased by 3%, which meets the requirements of lightweight design.
[0026] Optimization results: The cloud-based decision module generates a solution to "add a low-light enhancement layer and INT8 quantization". After execution on the device, the latency is reduced from 32ms to 26ms and the accuracy is restored to 98.5%. Example 2
[0027] Medical ECG monitoring APP analysis Scenario: This application runs on a Huawei Watch GT 3, a mid-range device, Level=2, and uses an encrypted model to analyze ECG data, requiring strict privacy protection.
[0028] (1) Dynamic parsing of the encrypted model: The model is parsed as a "CNN+LSTM" structure, with a 256Hz ECG signal as the input and "normal / abnormal" labels as the output, and the parsing accuracy is 93.8%; (2) Federated collaborative analysis: 1,000 devices from 50 hospitals participated, only uploading encrypted features, without original electrocardiogram data. The aggregation found that "when the heart rate is >120 beats / min, the model misjudgment rate reaches 8%"; (3) Security detection: The security detection module found that the APP uploaded 10 complete ECG data per hour, which exceeded the functional requirements and was judged as "abnormal upload of privacy data".
[0029] Optimization results: The cloud-based solution, by "adjusting the filter cutoff frequency and prohibiting unnecessary uploads," reduced the false positive rate to 2.5% and eliminated privacy risks.
[0030] The present invention and its embodiments have been described above. This description is not restrictive, and the accompanying drawings are only one embodiment of the present invention; the actual structure is not limited thereto. In conclusion, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the invention, such designs should fall within the protection scope of the present invention.
Claims
1. An analysis method for mobile AI application software, characterized in that, Includes the following steps: (1) The encryption model structure is parsed using a dynamic symbolic execution algorithm; (2) Cross-device collaborative analysis is performed using a heterogeneous sensing federated averaging algorithm; (3) Adaptive resource scheduling is performed using the deep reinforcement learning (DRL) algorithm.
2. The analysis method for mobile AI application software according to claim 1, characterized in that, The dynamic symbolic execution algorithm in step (1) includes: Hijack the core functions of the AI framework and record the memory address and input / output tensor dimensions when the model is loaded; Track the tensor data flow during the model inference process, extract the mean, variance, and sparsity of the output of each layer, and construct the feature trajectory matrix; The similarity between the model to be parsed and the pre-trained feature library is calculated based on the attention mechanism. When the similarity is greater than 0.85, it is determined to be of the same type of structure.
3. The analysis method for mobile AI application software according to claim 1, characterized in that, The federated averaging algorithm in step (2) includes: Based on device computing power and network bandwidth, the client device level is defined as level 3; Dynamically allocate aggregation weights based on device level and dataset size, and calculate global model parameters; High-end equipment participates in each iteration, mid-range equipment participates every two iterations, and low-end equipment participates every five iterations.
4. The analysis method for mobile AI application software according to claim 1, characterized in that, The deep reinforcement learning (DRL) algorithm in step (3) includes: The state space is defined as device level, network latency, battery level, and application type, while the action space is defined as analysis frequency and data sampling rate; a scheduling strategy is trained based on the reward function.
5. The analysis method for mobile AI application software according to claim 2, characterized in that, The attention weights are allocated to the convolutional layers and fully connected layers respectively, and are calculated using the corresponding similarity calculation methods.
6. The analysis method for mobile AI application software according to claim 3, characterized in that, The device level is defined as follows: Level=1: FLOPS≥10 12 And the bandwidth is ≥100Mbps; Level=2:10 11 ≤FLOPS<10 12 And 10 ≤ bandwidth < 100Mbps; Level=3: Other cases.
7. The analysis method for mobile AI application software according to claim 3, characterized in that, The aggregation weight is calculated based on the device level, client data size, and total global data volume.
8. The analysis system for mobile AI application software according to any one of claims 1 to 7, characterized in that, The system includes an edge analysis module, an edge aggregation module, a cloud decision-making module, and a security detection module. The edge analysis module is connected to the edge aggregation module, the edge aggregation module to the cloud decision-making module, and the cloud decision-making module to the edge analysis module via encrypted communication. The security detection module is connected to both the edge analysis module and the cloud decision-making module. The edge analysis module is used to parse the encrypted model structure and collect performance data. The edge aggregation module is used to aggregate encrypted features from multiple devices and generate a regional performance baseline. The cloud decision-making module is used to construct a digital twin of the mobile AI application and output an optimization scheme based on the federated analysis results. The security detection module is used to detect backdoor attacks based on the model structure and monitor the uploading of abnormal data.
9. The analysis system for mobile AI application software according to claim 8, characterized in that, The cloud-based decision-making module simulates model behavior under different devices and scenarios using a digital twin, and the output optimization solutions include model pruning, operator replacement, and quantization strategy adjustment; the detection results of the security detection module include backdoor attack risks and abnormal upload reports of privacy data.