Mobile terminal agent processing method, system and equipment based on natural language processing

By using a mobile intelligent agent processing method based on natural language processing to parse intent and entities, dynamically adjust script parameters, and optimize the model using federated learning, the problems of complexity and inefficiency in mobile operations are solved, achieving efficient and intelligent automated operations.

CN121996754APending Publication Date: 2026-05-08广州三七极耀网络科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
广州三七极耀网络科技有限公司
Filing Date
2025-12-29
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing technologies for mobile operation and control suffer from problems such as complex operation, low efficiency, low level of intelligence, and insufficient flexibility. They are difficult to operate and control using natural language and cannot achieve true automation or flexible setting of timed tasks.

Method used

A mobile intelligent agent processing method based on natural language processing is adopted. By receiving natural language commands, the method uses a natural language processing model to parse intent and entities, queries the operation knowledge graph, dynamically adjusts script parameters by combining a context-aware engine, optimizes the script through reinforcement learning, and uses a federated learning framework to collaboratively optimize model performance.

Benefits of technology

It achieves a complete closed loop from instruction parsing to script execution, improves the automation and intelligence level of mobile terminal operations, enhances the accuracy of natural language command parsing and the efficiency of script generation, strengthens the flexibility and adaptability of operations, and optimizes the operation execution effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121996754A_ABST
    Figure CN121996754A_ABST
Patent Text Reader

Abstract

The invention discloses a mobile terminal agent processing method, system and device based on natural language processing, and the method specifically comprises the steps: analyzing a natural language command, and extracting an operation intention and an operation entity; on the basis of the operation intention and the operation entity, querying a pre-constructed operation knowledge graph, and determining a similar historical operation script recommended by reusing the operation knowledge graph or generating a new operation script by comparing a query result with a preset similarity threshold value; dynamically adjusting parameters of the operation script to be executed according to the equipment state and the environment information; and collecting feedback data of the execution process and the execution result, inputting the feedback data into the reinforcement learning model, optimizing parameters of the operation script, and updating the optimized parameters to the operation knowledge graph. According to the method, intelligent processing of mobile terminal operation based on natural language processing is realized, a complete closed loop is formed from instruction analysis to script execution and optimization, and the automation and intelligence level of mobile terminal operation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a mobile intelligent agent processing method, system, and device based on natural language processing. Background Technology

[0002] With the rapid development of the mobile internet, the number of mobile devices and applications has exploded. This trend has made the demand for testing, data collection, and automation of mobile devices and applications increasingly urgent and ever-increasing.

[0003] However, in the current field of mobile operation and control, traditional methods mainly rely on manual operation and script writing. This approach has revealed many significant drawbacks in practical applications: 1. Complex Operation: Manual operation and script writing are extremely cumbersome, involving numerous details and steps, requiring operators to have a high level of technical expertise. For example, when writing automated test scripts, operators need to have a deep understanding of the application's architecture, interfaces, and various operational logics, while also mastering a specific scripting language. This is quite difficult for ordinary users, greatly limiting the widespread adoption of automated operation and control.

[0004] 2. Low efficiency: Traditional methods require a significant amount of time for repetitive manual operations or script writing when dealing with repetitive tasks. For example, in large-scale application testing, manual methods are not only extremely inefficient for repetitive testing operations under different versions and scenarios, but are also prone to inaccurate test results due to human error. Even when using scripts, rewriting or modifying scripts for each new test requirement requires a significant investment of time, making it difficult to keep up with the rapid iterative pace of application development.

[0005] 3. Low level of intelligence: Traditional methods are difficult to control using natural language. Users cannot use intuitive and convenient natural language commands to drive mobile devices to perform corresponding operations. For example, if a user wants to take a picture with a simple command like "open the camera and switch to night mode," traditional methods cannot directly understand and execute this command. Users need to perform a series of cumbersome manual operations or write complex scripts, which greatly reduces the user experience and makes the operation of mobile devices inconvenient and unintelligent.

[0006] 4. Insufficient flexibility: Traditional methods are difficult to set up scheduled tasks flexibly, making it impossible to achieve true automation and control. For example, if users want to automatically perform operations such as data backup and system updates at specific times, traditional methods cannot meet this need. Users need to manually perform the operations at the specified time, or rely on complex scheduled script settings. Moreover, the scripts have poor universality and portability, and may need to be rewritten for different devices or environments, further increasing the difficulty and cost of operation. Summary of the Invention

[0007] The purpose of this invention is to provide a mobile intelligent agent processing method, system, and device based on natural language processing, which realizes intelligent processing of mobile terminal operations based on natural language processing, forming a complete closed loop from instruction parsing to script execution and optimization, thereby improving the automation and intelligence level of mobile terminal operations and solving at least one of the aforementioned prior art problems.

[0008] In a first aspect, the present invention provides a mobile intelligent agent processing method based on natural language processing, the method specifically comprising: It receives natural language commands input by the user, parses the natural language commands using a natural language processing model, and extracts the operation intent and operation entity; Based on the operation intent and operation entity, a pre-built operation knowledge graph is queried. By comparing the query results with a preset similarity threshold, it is determined whether to reuse the similar historical operation scripts recommended by the operation knowledge graph or generate new operation scripts. The context-aware engine acquires device status and environmental information in real time, and dynamically adjusts the parameters of the operation script to be executed based on the device status and environmental information. The operation script with adjusted parameters is executed, and feedback data on the execution process and results is collected. The feedback data is input into the reinforcement learning model to optimize the parameters of the operation script, and the optimized parameters are updated to the operation knowledge graph. By leveraging a federated learning framework, model update data from multiple mobile devices is aggregated to collaboratively optimize the global performance of natural language processing and reinforcement learning models.

[0009] Secondly, the present invention provides a mobile intelligent agent processing system based on natural language processing, the system specifically comprising: The command parsing module is used to receive natural language commands input by the user, parse the natural language commands using a natural language processing model, and extract the operation intent and operation entity. The graph query module is used to query a pre-built operation knowledge graph based on operation intent and operation entity. By comparing the query results with a preset similarity threshold, it determines whether to reuse the similar historical operation scripts recommended by the operation knowledge graph or generate new operation scripts. The context-aware module is used to obtain device status and environmental information in real time through the context-aware engine, and dynamically adjust the parameters of the operation script to be executed based on the device status and environmental information. The feedback optimization module is used to execute the operation script with adjusted parameters, collect feedback data on the execution process and results, input the feedback data into the reinforcement learning model, optimize the parameters of the operation script, and update the operation knowledge graph with the optimized parameters. The Federated Learning module is used to leverage the Federated Learning framework to aggregate model update data from multiple mobile devices and collaboratively optimize the global performance of natural language processing and reinforcement learning models.

[0010] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, and a computer program stored in the memory, wherein when the computer program is executed on the processor, it implements the mobile intelligent agent processing method based on natural language processing as described in any of the above methods.

[0011] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the mobile intelligent agent processing method based on natural language processing as described in any of the above methods.

[0012] Compared with the prior art, the present invention has at least one of the following technical effects: 1. This invention realizes intelligent processing of mobile terminal operations based on natural language processing, forming a complete closed loop from instruction parsing to script execution and optimization, thereby improving the automation and intelligence level of mobile terminal operations.

[0013] 2. This invention improves the accuracy and completeness of natural language command parsing by standardizing, jointly extracting, completing contextual information, and post-processing natural language commands to accurately extract operational intent and entities.

[0014] 3. This invention uses specific training steps to obtain a lightweight natural language understanding model, which reduces the consumption of computing resources while ensuring model performance and improves the applicability of the model on mobile devices.

[0015] 4. This invention determines whether to reuse historical scripts or generate new scripts based on multiple similarity calculations and weighted fusion, thereby improving the efficiency and accuracy of script generation and reducing repetitive work.

[0016] 5. This invention collects and processes contextual information from multiple dimensions and dynamically adjusts script parameters, enabling the operation script to adapt to different real-time scenarios and enhancing the flexibility and adaptability of mobile terminal operations.

[0017] 6. This invention collects feedback data and inputs it into the reinforcement learning model to optimize script parameters, thereby achieving continuous optimization of the operation script and improving the effectiveness and performance of operation execution.

[0018] 7. This invention utilizes experience replay and proximal policy optimization algorithms to update policy network parameters, enabling reinforcement learning models to more effectively output script parameters to optimize and adjust actions, thereby improving optimization results.

[0019] 8. This invention utilizes a federated learning framework to aggregate data from multiple mobile terminals to collaboratively optimize the model, thereby improving the global performance of natural language processing and reinforcement learning models while protecting privacy. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart illustrating a mobile intelligent agent processing method based on natural language processing, according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the structure of a mobile intelligent agent processing system based on natural language processing according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0022] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0023] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0024] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0025] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0026] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0027] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0028] In this application embodiment, the entity executing the process includes a terminal device. This terminal device includes, but is not limited to, devices capable of executing the methods disclosed in this application, such as servers, computers, smartphones, and tablets. Figure 1 A flowchart illustrating a mobile intelligent agent processing method based on natural language processing, according to an embodiment of the present invention, is shown below in detail: S101 receives natural language commands input by the user, parses the natural language commands using a natural language processing model, and extracts the operation intent and operation entity.

[0029] In this embodiment, a user interface is built on the mobile device. This interface is designed to be simple and intuitive, and includes text input functionality. Users input natural language commands in the text input boxes of the interface by touching the screen or connecting an external keyboard or other input device. After the user completes the input of the natural language command and clicks the submit button, the mobile device immediately transmits the natural language command to a natural language processing model pre-deployed on the device's local machine or a cloud server. During transmission, to ensure data integrity and security, encrypted transmission technology is used to encrypt the natural language command, preventing data from being stolen or tampered with during transmission.

[0030] After receiving an encrypted natural language command, the natural language processing model first decrypts it to recover the original natural language command text. Next, the model preprocesses the natural language command, including removing irrelevant characters such as extra spaces and punctuation marks, and converting the command to lowercase (this step is unnecessary if the model is not case-sensitive), in order to reduce the complexity of subsequent processing.

[0031] Natural language processing models utilize their pre-trained semantic understanding module to perform semantic analysis on pre-processed natural language commands. This semantic understanding module is trained on a large corpus and can identify words, phrases, and sentence structures in natural language, and understand their semantic meaning. During the analysis, the model identifies key information in the command and breaks it down into different semantic units.

[0032] Next, the model further analyzes each semantic unit to extract the operation intent and operation entity. The operation intent refers to the type of operation the user wants the mobile device to perform, while the operation entity is the specific object targeted by the operation. For example, if a user wants to open a music player app on their mobile device and play a song by a specific artist, they might input a natural language command like "Open music player, play Jay Chou's songs." For the semantic unit "Open music player," the model identifies the operation intent as "open" and the operation entity as "music player"; for the semantic unit "play Jay Chou's songs," the model identifies the operation intent as "play" and the operation entity as "Jay Chou's songs." In this way, the natural language processing model successfully extracts the operation intent and operation entity from the user's input natural language commands, providing accurate foundational information for subsequent operation knowledge graph queries and operation script generation.

[0033] S102, based on the operation intent and operation entity, query the pre-built operation knowledge graph, and by comparing the query results with the preset similarity threshold, determine whether to reuse the similar historical operation scripts recommended by the operation knowledge graph or generate new operation scripts.

[0034] In this embodiment, an operation knowledge graph is pre-constructed. This operation knowledge graph stores a large amount of information related to mobile device operations in the form of a graph structure, including various operation intentions, operation entities, and the relationships between them, as well as corresponding historical operation scripts. When constructing the operation knowledge graph, a large amount of common mobile device operation scenario data is collected, and this data is organized and analyzed to extract operation intentions, operation entities, and corresponding operation scripts. This information is then organized into a graph structure according to certain rules and logic. For example, for the operation scenario of "opening the camera to take a picture," "open" is taken as the operation intention, "camera" as the operation entity, and the specific script code for implementing this operation is recorded. This information is then stored and associated in the operation knowledge graph.

[0035] After obtaining the operation intent and operation entity from the natural language processing model, these are input as query conditions into a pre-built operation knowledge graph query interface. The query interface traverses and matches the input operation intent and operation entity within the operation knowledge graph. It starts from the nodes of the operation knowledge graph and searches along the edges to find combinations of nodes and edges that match the input operation intent and operation entity. For example, if the input operation intent is "open" and the operation entity is "music player," the query interface will search the operation knowledge graph for nodes and edges that contain the "open" operation intent and are associated with the "music player" operation entity.

[0036] During the query process, multiple historical operation records related to the query conditions may be found. For each found historical operation record, its similarity to the current query conditions is calculated. The similarity calculation comprehensively considers the similarity of the operation intent and the similarity of the operation entity. For the operation intent, semantic similarity is compared, for example, using a word vector model to convert the operation intent into a vector representation, and then calculating the cosine similarity between the vectors. For the operation entity, if it is a specific application name or device name, string matching is performed directly; if it is a more complex description, semantic similarity calculation methods are also used. The similarity of the operation intent and the similarity of the operation entity are combined according to a certain weight to obtain the overall similarity between the historical operation records and the current query conditions.

[0037] A similarity threshold is preset, determined based on the actual application scenario and requirements, for example, 0.8. The calculated similarity of each historical operation record is compared with the preset similarity threshold. If the similarity of a historical operation record is greater than or equal to the preset similarity threshold, it means that the historical operation record is very similar to the current query condition. In this case, the script for that similar historical operation recommended by the operation knowledge graph is identified as a reusable script. For example, if a historical operation record is found with the operation intent "open" and the operation entity "music player", and the similarity between the current query's operation intent and operation entity reaches 0.85, which is greater than the preset threshold of 0.8, then the script for opening the music player corresponding to that historical operation record is reused.

[0038] If the similarity of all historical operation records is less than a preset similarity threshold, it means that not enough similar historical operation scripts were found. In this case, a new operation script needs to be generated based on the current operation intent and operation entity. When generating a new script, based on the basic operation rules and logic stored in the operation knowledge graph, combined with the operation intent and operation entity, and in accordance with the operation protocol and interface specifications of the mobile device, a new script capable of performing the corresponding operation is written. For example, if the current operation intent is "adjust screen brightness" and the operation entity is "adjust brightness to 50%", and no historical records with sufficiently high similarity are found in the operation knowledge graph, then a new operation script to set the screen brightness to 50% is generated according to the interface rules for adjusting screen brightness on mobile devices. Finally, the generated new operation script is stored in the operation knowledge graph so that it can be referenced and reused for similar operations in the future.

[0039] S103 obtains device status and environmental information in real time through the context-aware engine, and dynamically adjusts the parameters of the operation script to be executed based on the device status and environmental information.

[0040] In this embodiment, the context-aware engine integrates multiple sensor interfaces and system information acquisition modules, enabling deep interaction with various sensors and the operating system on the mobile device. For example, it connects to the device's accelerometer, gyroscope, light sensor, and temperature sensor, and can acquire real-time information such as the device's motion status (e.g., acceleration, rotation angle), ambient light intensity, and temperature. Simultaneously, through interaction with the operating system, it can obtain information such as the device's battery level, network connection status (e.g., Wi-Fi connection status, mobile data network signal strength), and currently running applications.

[0041] Upon receiving the execution script, the context-aware engine immediately begins information collection. It continuously acquires the latest device status and environmental information from various sensors and system modules at a preset collection frequency. For example, the light sensor collects ambient light intensity data every second; the battery monitoring module obtains the device's current remaining battery percentage in real time. This collected information is then organized and stored to form a real-time device status and environmental information dataset.

[0042] Next, parameter analysis is performed on the script to be executed. The script contains multiple adjustable parameters, which are potentially related to the device's status and environmental information. For example, a photo-taking script might include parameters such as exposure compensation, ISO, and white balance; a video playback script might include parameters such as brightness, volume, and playback speed. By analyzing the script's function and expected results, we determine which device status and environmental factors might affect each parameter. For instance, the exposure compensation parameter might be affected by ambient light intensity; in low-light environments, the exposure compensation value needs to be increased appropriately. The volume parameter might be affected by the noise level of the environment in which the device is located; in noisy environments, the volume needs to be increased appropriately.

[0043] Based on real-time acquired device status and environmental information datasets, the parameters of the operation script are dynamically adjusted. Taking the photo-taking operation script as an example, when the context-aware engine detects low ambient light intensity, it automatically increases the exposure compensation parameter to improve the brightness of the photo. Simultaneously, depending on the device's battery level, if the battery is low, the ISO parameter may be appropriately reduced to conserve power. For the video playback operation script, if high ambient noise is detected, the volume parameter is automatically increased; if the current network connection is a mobile data network with a weak signal, the playback speed parameter may be reduced to ensure smooth video playback.

[0044] During parameter adjustment, specific adjustment ranges and rules are set. For example, the exposure compensation parameter is adjusted between -3EV and +3EV to avoid over-adjustment leading to overexposure or underexposure of the photo; the volume parameter is limited according to the device's maximum volume to prevent excessive volume from causing user discomfort. Simultaneously, the adjustment rules consider the interactions between different parameters to ensure that the adjusted parameter combination achieves the best execution effect for the operation script.

[0045] Finally, the adjusted parameters are updated into the execution script, forming a new executable script. Before executing the new script, a simple validity check is performed to ensure that the adjusted script does not contain errors or conflicts. For example, it checks whether the adjusted volume parameter is within the range supported by the device, and whether the adjusted playback speed parameter meets the requirements for video playback. After the checks are completed, the new script is submitted to the execution module for execution, thereby enabling dynamic adjustment of the operation script parameters based on device status and environmental information, improving the adaptability and effectiveness of the operation.

[0046] S104: Execute the operation script with adjusted parameters, collect feedback data on the execution process and results, input the feedback data into the reinforcement learning model, optimize the parameters of the operation script, and update the operation knowledge graph with the optimized parameters.

[0047] In this embodiment, after dynamically adjusting the operation script parameters, the mobile agent sends the adjusted operation script to the execution module of the mobile device. Upon receiving the script, the execution module performs a preliminary legality check, such as verifying whether the operation instructions in the script are compatible with the hardware and software support of the mobile device, and whether the parameter values ​​are within a reasonable range. If the check passes, the execution module executes each operation step by step according to the operation sequence and parameter settings specified in the script. For example, if the operation script is used to open the camera and take a picture, the execution module first calls the device's camera application interface, sets the camera's functions according to the adjusted parameters, such as exposure compensation, ISO, and white balance, and then triggers the photo-taking operation.

[0048] During the execution of the operation script, the mobile intelligent agent collects feedback data through various methods. Firstly, it utilizes the mobile device's built-in system monitoring tools to obtain real-time performance metrics such as CPU usage, memory consumption, and battery drain during script execution. This data reflects the operation script's resource consumption, helping to assess the script's execution efficiency and its impact on device performance. Secondly, it interacts with the applications involved in the operation script to obtain internal state information about the applications during execution. For example, in a photo-taking operation, it obtains information such as the camera application's image quality metrics and focus status; in an application test script, it obtains information such as the application's response time and page loading status.

[0049] After the operation script is executed, the mobile agent collects feedback data on the execution results. For photo taking, the feedback data includes image quality metrics such as photo sharpness, color reproduction, and exposure accuracy; for application testing, the feedback data includes the pass rate of test cases, the number and type of defects found, etc. This data can intuitively reflect whether the execution effect of the operation script has achieved the expected goals.

[0050] The collected feedback data on the execution process and results is organized and preprocessed before being input into the reinforcement learning model. Based on this feedback data, and in conjunction with a pre-set reward mechanism and optimization objective, the reinforcement learning model optimizes the parameters of the operation script. For example, if feedback data shows that the image sharpness does not meet expectations, the reinforcement learning model analyzes parameters that may affect sharpness, such as ISO and shutter speed, and adjusts these parameters according to certain optimization strategies to improve image sharpness. During the optimization process, the reinforcement learning model continuously tries different parameter combinations, gradually finding the optimal parameter settings through interaction with the feedback data.

[0051] Finally, the optimized parameters of the reinforcement learning model are updated in the operation knowledge graph. The operation knowledge graph stores the relationships between various operation intentions, operation entities, operation scripts, and their parameters. When updating parameters, the corresponding historical operation script record is first located based on the operation intention and operation entity, and then the optimized parameters replace the original parameter values. In this way, when encountering similar operation needs in the future, the operation knowledge graph can provide more optimized operation script parameter recommendations, improving the performance and efficiency of the entire mobile intelligent agent processing method.

[0052] S105 utilizes a federated learning framework to aggregate model update data from multiple mobile terminals, collaboratively optimizing the global performance of natural language processing and reinforcement learning models.

[0053] In this embodiment, firstly, a federated learning system architecture is constructed. Local models, including natural language processing models and reinforcement learning models, are deployed on multiple mobile terminals, and their architecture is consistent with that of the central server. Each mobile terminal acts as a node in the federated learning process, possessing the ability to independently process data and update its local model. Simultaneously, a federated learning management platform is built on the central server to coordinate the model update process across the mobile terminals, enabling data aggregation and global model optimization.

[0054] After each mobile terminal completes a certain number of tasks, it generates corresponding model update data. For natural language processing (NLP) models, during the process of processing user-input NLP commands, the mobile terminal fine-tunes and updates the parameters of the local NLP model based on metrics such as the accuracy and efficiency of the parsing results. For example, if an error occurs while parsing certain complex semantic NLP commands, the mobile terminal will adjust the model parameters in reverse based on the correct parsing result to improve the model's ability to understand similar semantics. For reinforcement learning models, the mobile terminal also generates model update data during the process of optimizing the operation script parameters based on feedback data. For example, reinforcement learning models continuously try different parameter combinations and update the weights of the parameters in the model based on the performance of the operation script, enabling the model to recommend better operation script parameters.

[0055] Each mobile terminal encrypts the locally generated model update data. Homomorphic encryption is used, which allows computations to be performed on encrypted data without prior decryption, thus ensuring data security and privacy during transmission. The encrypted model update data is then uploaded to the central server's federated learning management platform via secure communication protocols such as HTTPS.

[0056] After receiving encrypted model update data from multiple mobile terminals, the central server's federated learning management platform performs aggregation operations on this data. Thanks to homomorphic encryption, the management platform can directly perform aggregation calculations on the encrypted data, summarizing the model update data from each mobile terminal. For example, for parameter update data of a natural language processing model, the management platform will perform weighted averaging of the parameter update values ​​from each terminal to obtain a global parameter update trend.

[0057] After data aggregation, the central server uses the aggregated data to optimize the global natural language processing (NLP) model and reinforcement learning (RLM) model. For the NLP model, the parameters of the global model are adjusted based on the aggregated parameter update trends, enabling the global model to absorb the optimization experience from various mobile terminals and improve its ability to parse natural language commands. For the RLM model, the parameters of the global model are also updated based on the aggregated data, improving the accuracy and rationality of the model's recommended operation script parameters.

[0058] The optimized global model parameters are then encrypted again and distributed to each mobile terminal via a secure communication protocol. Upon receiving the encrypted global model parameters, each mobile terminal decrypts them and updates its local natural language processing (NLP) and reinforcement learning (RLM) models with the decrypted parameters. This ensures that the local models on each mobile terminal are synchronized with the global model, achieving the goal of aggregating update data from multiple mobile terminal models using a federated learning framework to collaboratively optimize the global performance of the NLP and RLM models. By continuously repeating this process, both models can continuously learn and optimize, improving performance in mobile agent processing methods.

[0059] In some embodiments, step S101 above, which involves parsing natural language commands using a natural language processing model to extract operation intent and operation entities, specifically includes: The natural language commands are standardized using domain terminology to obtain the processed command text. The command text is input into a lightweight natural language understanding model trained with domain adaptation, and the operation intention and operation entity are jointly extracted from the command text. During the joint extraction process, a state cache is maintained to store the most recent interaction context. When the current command text is detected to contain a preset pronoun or its components are determined to be omitted, the most relevant entity information is retrieved from the state cache to complete the semantic representation of the current command text. The intent classification results and entity recognition results output by the lightweight natural language understanding model are post-processed based on confidence filtering, and then assembled into a structured operation instruction object by combining them with a pre-defined semantic role framework.

[0060] In this embodiment, the first step is to standardize domain terminology. In mobile application scenarios, different domains have their own specific terminology and expressions. For example, in photography, "large aperture" and "long exposure" are common terms; in office work, "document editing" and "spreadsheet processing" are common expressions. When the system receives a natural language command from the user, it activates a domain terminology database, which pre-collects and organizes common and standardized terms from various domains. The system matches the natural language command with the domain terminology database, replacing any non-standard, colloquial, or scenario-specific expressions in the command with standard terms. For example, if the user inputs "open the camera aperture wider," the system identifies "open the camera aperture wider" as the standard photography term "large aperture," thus converting the command into "set large aperture," obtaining the processed command text.

[0061] Next, the processed command text is input into a lightweight natural language understanding model trained with domain adaptation. During the training phase, this lightweight natural language understanding model utilizes a large amount of domain-specific data for domain-adaptive training. For example, if applied to mobile office applications, it is trained using a large amount of natural language command data related to office operations, enabling the model to better understand and process commands within that domain. After receiving the command text, the model simultaneously extracts the operation intent and the operation entity. Traditional models might extract the intent first and then the entity, or vice versa, while this model uses a joint extraction approach, which can more accurately grasp the relationship between intent and entity in the command text. For example, for the command text "Create a document named Project Report," the model will identify the intent as "Create a document" and simultaneously extract the operation entity "Project Report."

[0062] During the joint extraction process, the system maintains a state cache to store the context of recent interactions. When a user interacts with a mobile device, the actions are often not one-off, independent operations, but rather contextually related. For example, if a user first enters "open camera" and then enters "take a picture," these two commands have a clear contextual relationship. When the system detects that the current command text contains a predefined pronoun, such as "this" or "that," or determines that a component is omitted, it retrieves the most relevant entity information from the state cache to complete the semantic representation of the current command text. For instance, if a user first enters "view document A" and then enters "edit this document," the system detects that "this" is a pronoun, finds the information for "document A" in the state cache, and completes the current command to "edit document A," making the semantics more complete and accurate.

[0063] Finally, the intent classification and entity recognition results output by the lightweight natural language understanding model undergo post-processing based on confidence filtering. When outputting results, the model assigns a confidence score to each intent classification and entity recognition result, representing the model's level of trust in the result. The system presets a confidence threshold; when the confidence score of a result is lower than this threshold, the result is considered potentially inaccurate, and further processing or confirmation from the user is initiated. For example, if the model outputs the intent "Open application" but the confidence score is low, the system might prompt the user, "Do you want to open an application? Please specify the application name." Simultaneously, the system combines a preset semantic role framework to assemble the filtered intents and entities into structured operation instruction objects. The semantic role framework defines the relationships and roles between the components of the operation instruction, such as subject, predicate, and object. By assembling intents and entities according to the semantic role framework, clear and standardized structured operation instructions can be formed, facilitating subsequent operation execution. For example, the intent "Open camera" and the entity "camera" can be assembled into a structured operation instruction object: "Operation: Open; Object: Camera."

[0064] Furthermore, the training steps of the lightweight natural language understanding model include: A corpus containing mobile device operation commands is constructed and labeled, wherein each command in the corpus is labeled with an intent tag and an entity sequence tag; Select a basic Transformer encoder model and add a parallel task head for intent classification and entity recognition on top of the basic Transformer encoder model to form a composite model to be fine-tuned. The composite model is subjected to two-stage progressive fine-tuning. In the first stage, the encoder part is fine-tuned using domain corpus with a self-supervised task. In the second stage, parallel task heads are enabled to perform end-to-end joint fine-tuning based on labeled corpus in a multi-task learning manner. By employing knowledge distillation technology, a pre-trained teacher model is used to guide the training of a finely tuned composite model, resulting in a lightweight natural language understanding model.

[0065] In this embodiment, a corpus containing mobile device operation commands is first constructed and annotated. Mobile device application scenarios encompass various operation commands, such as "turn on airplane mode" and "adjust screen brightness to 50%" in phone settings, "send a message to friend A in WeChat saying 'Let's have dinner together tonight'" in application operations, and "open a map and search for nearby restaurants" related to system navigation. To construct a comprehensive and representative corpus, data is collected from multiple channels, including mobile device user manuals, user feedback records, and user-shared operating experiences in online forums. After collecting a large number of raw commands, professionals are organized to annotate each command. The annotation work is divided into two parts: first, annotating the command with intent tags, for example, for "turn on airplane mode," the intent is annotated as "enable airplane mode function"; for "send a message to friend A in WeChat saying 'Let's have dinner together tonight'," the intent is annotated as "send a message with specific content on WeChat." Second, annotating entity sequence tags, for example, there is no entity in "turn on airplane mode"; in "send a message to friend A in WeChat saying 'Let's have dinner together tonight'," the entity sequence is annotated as "WeChat, friend A, dinner together tonight." This annotation ensures that each instruction in the corpus has clear intent and entity information, providing a high-quality data foundation for subsequent model training.

[0066] Next, a basic Transformer encoder model is selected, and parallel task heads for intent classification and entity recognition are added on top of it to form a composite model to be fine-tuned. The basic Transformer encoder model has powerful language representation capabilities, capable of capturing long-range dependencies and semantic information in text. We choose the widely used and stable Transformer architecture in the field of natural language processing as the foundation. On top of the basic encoder model, two parallel task heads are added, one for intent classification and the other for entity recognition. The intent classification task head receives the semantic representation output by the encoder and maps it to different intent categories through fully connected layers and a softmax function, thereby achieving the classification of instruction intent. The entity recognition task head also receives the encoder output and uses structures such as Conditional Random Fields (CRF) to predict entity labels for each word in the text, identifying the entity sequence in the instruction. The composite model constructed in this way can handle both intent classification and entity recognition tasks simultaneously, improving the overall performance and efficiency of the model.

[0067] Then, the composite model undergoes a two-stage progressive fine-tuning process. In the first stage, the encoder part is fine-tuned using a self-supervised task with domain corpus. The self-supervised task utilizes a large amount of unlabeled data from the domain corpus to design pre-training tasks, such as the Masked Language Modeling (MLM) task. In the MLM task, some words in the corpus are randomly masked, and the model predicts the masked words based on the context. This allows the encoder part to better learn the linguistic features and semantic representations of mobile device operation commands, enhancing the model's adaptability to domain-specific language. In the second stage, parallel task heads are enabled for end-to-end joint fine-tuning based on labeled corpus using a multi-task learning approach. At this stage, the model simultaneously uses labeled intent labels and entity sequence labels to train both the intent classification task head and the entity recognition task head. The multi-task learning approach allows the two tasks to mutually reinforce each other, sharing the semantic representations learned by the encoder, further improving the model's accuracy and generalization ability. Through this two-stage progressive fine-tuning, the composite model gradually adapts to the task requirements of the mobile device operation command domain.

[0068] Finally, knowledge distillation is employed, using a pre-trained teacher model to guide the training of a fine-tuned composite model, resulting in a lightweight natural language understanding model. The teacher model is typically a large, complex, and high-performance pre-trained model, thoroughly trained on a large amount of general and domain-specific data, possessing powerful language understanding and processing capabilities. During knowledge distillation, the teacher model generates soft labels for the input instruction data. These soft labels contain richer and more detailed information about the teacher model's understanding of the instructions. The fine-tuned composite model, acting as the student model, learns not only the hard labels (real intent labels and entity sequence labels) from the labeled corpus but also the soft labels generated by the teacher model. In this way, the student model can absorb the knowledge and experience of the teacher model, improving its performance and generalization ability while maintaining a relatively small model size. After knowledge distillation training, the final lightweight natural language understanding model is obtained, which can run efficiently on mobile devices and accurately parse the intent and entities of operation instructions.

[0069] In some embodiments, step S102 above, which involves querying a pre-built operation knowledge graph based on the operation intent and operation entity, and determining whether to reuse the similar historical operation scripts recommended by the operation knowledge graph or generate new operation scripts by comparing the query results with a preset similarity threshold, specifically includes: Based on the operation intent and operation entity, a pre-built operation knowledge graph is queried. The nodes of the operation knowledge graph are used to represent historical operation tasks and associate and store historical scripts and execution contexts. For candidate historical task nodes in the operation knowledge graph, the semantic similarity between the current instruction and the candidate historical task nodes in terms of operation intent, the set similarity in terms of operation entities, and the context matching degree between the real-time context and the historical context are calculated in parallel. The semantic similarity, set similarity, and context matching are weighted and fused to obtain the comprehensive recommendation score for each candidate historical task node; The highest comprehensive recommendation score is compared with a preset reuse threshold. If the highest comprehensive recommendation score exceeds the preset reuse threshold, the historical operation script associated with the corresponding candidate historical task node is used. If the highest comprehensive recommendation score does not exceed the preset reuse threshold, a new operation script is generated.

[0070] In this embodiment, firstly, an operation knowledge graph is constructed. This operation knowledge graph uses nodes to represent historical operation tasks. Each node not only records the basic information of the historical operation task but also stores the corresponding historical script and the context information when the task was executed. For example, for the historical operation task of "adding goods to the shopping cart on a specific e-commerce platform," the node will store the specific script for completing the task, such as a series of clicks, inputs, and other operation instructions. It will also record the context when the task was executed, such as the type of device used (mobile phone or computer), network environment (Wi-Fi or mobile data), and the specific version of the e-commerce platform. By collecting a large number of different types of historical operation tasks and related information, a comprehensive and rich operation knowledge graph is constructed, providing a data foundation for subsequent queries and matching.

[0071] Upon receiving the current operation instruction, the operation intent and operation entity are extracted from the instruction. The operation intent clarifies the user's desired goal, such as "purchase goods" or "query information"; the operation entity refers to the specific object related to the operation, such as "red phone" in the instruction "purchase a red phone". Based on the extracted operation intent and operation entity, a query is performed in a pre-built operation knowledge graph. The query process traverses each node in the knowledge graph, searching for candidate historical task nodes that may be related to the current operation intent and operation entity.

[0072] For the candidate historical task nodes obtained from the query, the similarity between the current instruction and these candidate nodes is calculated in parallel across multiple dimensions. Regarding the operation intent, semantic analysis techniques from natural language processing are employed to calculate the semantic similarity between the operation intent of the current instruction and the operation intent represented by the candidate historical task nodes. For example, if the current instruction intent is "query the weather," and the candidate historical task node intent is "get the weather conditions," semantic analysis can determine that they have a high semantic similarity. Regarding the operation entity, a set similarity calculation is performed on the operation entities in the current instruction and the operation entities associated with the candidate historical task nodes. For example, if the current instruction entity is "red phone," and the candidate node entity is "blue phone," the set similarity is obtained by comparing their differences in attributes such as color and model. Simultaneously, the context matching degree between the real-time context and the historical context is also calculated. The real-time context is the environmental information during the execution of the current operation, such as device and network, while the historical context is the environmental information during the execution of the candidate historical task nodes. By comparing this information, the degree of context matching is evaluated.

[0073] After completing the above similarity calculations, semantic similarity, set similarity, and contextual matching are weighted and fused. Different weights are assigned to these three similarity metrics based on different application scenarios and requirements. For example, in scenarios where the accuracy of operational intent is extremely important, the weight of semantic similarity can be set higher; while in scenarios with strict requirements on operational entities, the weight of set similarity is correspondingly increased. Through weighted fusion, a comprehensive recommendation score is obtained for each candidate historical task node. This score comprehensively reflects the degree of matching between the current instruction and the candidate historical task node across multiple key dimensions.

[0074] Finally, the highest overall recommendation score is compared with a preset reuse threshold. The preset reuse threshold is a standard value set based on practical application experience and a large amount of test data, used to determine whether historical operation scripts can be reused. If the highest overall recommendation score exceeds the preset reuse threshold, it indicates that the current instruction and the corresponding candidate historical task node are highly matched in multiple aspects. In this case, the historical operation script associated with the candidate historical task node is used to improve operational efficiency and accuracy. If the highest overall recommendation score does not exceed the preset reuse threshold, it indicates that the current instruction does not meet the reuse requirements for matching with any candidate historical task nodes. In this case, a new operation script is generated based on the current operational intent and the operational entity to ensure the operation can be completed smoothly.

[0075] In some embodiments, step S103 above, which involves acquiring device status and environmental information in real time through a context-aware engine and dynamically adjusting the parameters of the operation script to be executed based on the device status and environmental information, specifically includes: The context-aware engine collects device intrinsic state, network state, and spatiotemporal environment information in parallel to form raw context information. The original context information is normalized and features are extracted to generate a standardized context feature vector. The context feature vector is input into the policy decision layer, and matching is performed based on the pre-set context-policy rule base to output the adjustment policy identifier; Based on the adjustment strategy identifier, query the parameter adjustment mapping table to obtain specific adjustment instructions for various parameters in the operation script; Parse the script to be executed and locate the adjustable parameter nodes within it; Based on specific adjustment instructions, the values ​​of adjustable parameter nodes are dynamically modified to generate a target executable script that adapts to the real-time context.

[0076] In this embodiment, the context-aware engine begins to collect device intrinsic state, network status, and spatiotemporal environmental information in parallel to form raw contextual information. Regarding the device intrinsic state, the context-aware engine interacts with various hardware and software modules of the device. For example, on a smartphone, it obtains battery power information, communicating with the battery management module to understand the current remaining battery percentage in real time; it obtains storage space usage, querying the file system to determine used and available storage capacity; and it also obtains a list of currently running applications, acquiring relevant information through the system process management interface. Regarding network status, the context-aware engine detects the type of network the device is connected to, such as Wi-Fi, 4G, and 5G, by interacting with the network interface module; it also measures network signal strength using the device's built-in network signal detection tools; and it obtains network bandwidth information by sending test data packets to a specific server and analyzing the returned results to determine the current network upload and download speeds. For spatiotemporal environmental information, the context-aware engine utilizes the device's built-in positioning module, such as a GPS positioning chip, to obtain the device's current geographical location information, including longitude and latitude; it also obtains the current time information through the device's system clock; and based on the geographical location and time information, it combines the weather forecast interface to obtain local weather conditions, such as sunny, rainy, and temperature. These collected device-endogenous states, network states, and spatiotemporal environmental information collectively constitute the original contextual information.

[0077] The original contextual information is normalized and features are extracted to generate a standardized contextual feature vector. Normalization eliminates dimensional differences between different types of information, making them comparable. For example, battery percentage ranges from 0-100%, while network bandwidth might be measured in Mbps; normalization converts both to the 0-1 range. Feature extraction extracts representative and crucial features from the original contextual information. For example, for device status, features include whether the battery level is below 20% (low battery feature) and whether storage space is less than 1GB (storage shortage feature); for network status, features include whether the network type is Wi-Fi (stable network feature) and whether the network signal strength is greater than -70dBm (strong signal feature); for spatiotemporal environmental information, features include whether it is currently operating time (based on time information) and whether the current weather is rainy (based on weather conditions). These extracted features are combined to form a standardized contextual feature vector, which comprehensively and accurately describes the current device status and environmental conditions.

[0078] The context feature vector is input into the policy decision layer, which performs matching based on a pre-built context-policy rule base and outputs an adjustment policy identifier. The policy decision layer is an intelligent decision-making module that internally stores a pre-built context-policy rule base. This rule base is derived from extensive experiments and experience, containing adjustment policies for operation script parameters under different context combinations. For example, the rule base might contain a rule: when the device battery level is below 20% and it is not charging, and the network type is mobile data network, the corresponding adjustment policy is to reduce the resolution parameter of video playback in the operation script. When the context feature vector is input into the policy decision layer, the decision layer matches each feature in the vector with the rules in the rule base one by one. If a rule that matches perfectly is found, the adjustment policy identifier corresponding to that rule is directly output; otherwise, a similarity algorithm is used to find the closest rule, and the corresponding adjustment policy identifier is output.

[0079] Based on the adjustment strategy identifier, the parameter adjustment mapping table is queried to obtain the specific adjustment instructions for various parameters in the operation script. The parameter adjustment mapping table is a predefined table that records the specific adjustment methods for operation script parameters corresponding to different adjustment strategy identifiers. For example, for an adjustment strategy identifier that lowers the video playback resolution, the parameter adjustment mapping table will explicitly indicate that the video resolution parameter will be adjusted from 1080p to 720p; for an adjustment strategy identifier that increases the number of data retransmissions when the network signal is weak, the mapping table will specify that the number of data retransmissions parameter will be increased from 3 to 5. By querying this mapping table, the specific parameter adjustment instructions for the current situation can be quickly and accurately obtained.

[0080] Next, the script to be executed is parsed to locate the adjustable parameter nodes. The script is typically stored in a specific format, such as XML or JSON. Parsing the script involves reading and analyzing this data to identify the various parameter nodes within it. For example, a video playback script might contain video resolution parameter nodes, volume parameter nodes, and playback speed parameter nodes. By developing appropriate parsing algorithms, these adjustable parameter nodes can be accurately located, preparing for subsequent parameter modifications.

[0081] Finally, based on the specific adjustment instructions, the values ​​of adjustable parameter nodes are dynamically modified to generate a target executable script adapted to the real-time scenario. For example, if the specific adjustment instruction is to change the video resolution parameter from 1080p to 720p, then after locating the video resolution parameter node, the value of that node is changed from "1080p" to "720p". Similarly, other parameter nodes are modified according to the corresponding adjustment instructions. After modification, the generated new script is a target executable script adapted to the real-time scenario. This script can perform corresponding operations with optimal parameter settings based on the current device status and environmental conditions, improving operational efficiency and stability.

[0082] In some embodiments, step S104 above, which involves executing the adjusted operation script, collecting feedback data on the execution process and results, inputting the feedback data into the reinforcement learning model, optimizing the parameters of the operation script, and updating the optimized parameters to the operation knowledge graph, specifically includes: The operation script with adjusted parameters is executed, and feedback data including execution results, process time and interaction accuracy is collected through the monitor. The feedback data is structured to construct a reinforcement learning input vector that includes the current script parameter state and the overall performance reward; The reinforcement learning input vector is fed into a locally deployed reinforcement learning model, which is driven to learn based on historical states, action and reward sequences, and outputs actions to optimize and adjust the script parameters. Based on the optimized adjustment actions output by the reinforcement learning model, a set of optimized script parameter suggestions is generated; The optimized script parameter suggestions are associated with the context information that generated this optimization and stored in the optimization parameter set of the corresponding script node in the operation knowledge graph.

[0083] In this embodiment, the operation script with adjusted parameters is executed, and feedback data, including execution results, process time, and interaction accuracy, is collected by a monitor. Once the operation script has completed parameter adjustments, the system starts the script execution module to run the script. During script execution, the monitor monitors the script's execution status in real time. Regarding the execution results, the monitor determines whether the script has successfully completed its predetermined task. For example, in a data processing script, successful data processing and generation of a correct result file constitutes successful execution; data errors or program crashes indicate execution failure. Regarding process time, the monitor records the total time taken from the start to the end of the script, accurate to the millisecond level, to accurately assess the script's execution efficiency. Interaction accuracy primarily targets scripts involving human-computer interaction or device-to-device interaction. For example, in a robot control script, the monitor records the deviation between the robot's actual actions and the expected actions to measure the accuracy of the interaction. These execution results, process time, and interaction accuracy information collectively constitute the feedback data, providing a foundation for subsequent parameter optimization.

[0084] The feedback data is structured to construct a reinforcement learning input vector containing the current script parameter state and a comprehensive performance reward. The structuring process involves organizing and classifying the collected feedback data to meet the input requirements of the reinforcement learning model. For example, the execution result is converted to binary form, with 1 for success and 0 for failure; the process time is normalized to a range of 0 to 1; and the interaction accuracy is also standardized accordingly. Simultaneously, the parameter state of the current script is obtained, including the values ​​of each parameter. Then, based on preset performance evaluation rules, a comprehensive performance reward value is calculated by integrating the execution result, process time, and interaction accuracy. For example, a higher performance reward value is given if the execution is successful, the process time is short, and the interaction accuracy is high; otherwise, a lower value is given. Finally, the current script parameter state and the comprehensive performance reward value are combined into a vector, which is the input vector of the reinforcement learning model, comprehensively reflecting the execution status and performance of the current script.

[0085] The reinforcement learning input vector is fed into a locally deployed reinforcement learning model, driving the model to learn based on historical states, actions, and reward sequences, and output actions to optimize script parameters. The locally deployed reinforcement learning model has been pre-trained and possesses a certain level of learning and decision-making capabilities. When the input vector enters the model, it analyzes and learns based on the current script parameter state and overall performance reward value in the input vector, combined with its internally stored historical state, action, and reward sequences. Historical states record the parameter states during previous script executions, actions refer to previous adjustments to the script parameters, and rewards are the performance reward values ​​obtained after previous executions. By analyzing this historical data and the current input vector, the model can learn how to adjust parameters under different parameter states to obtain better performance rewards. Finally, the model outputs an optimization action for the script parameters, such as increasing the value of a parameter, decreasing the value of a parameter, or keeping a parameter unchanged.

[0086] Based on the optimization and adjustment actions output by the reinforcement learning model, a set of optimized script parameter suggestions is generated. After receiving the optimization and adjustment actions, the system calculates the optimized script parameter suggestions based on the current script parameter state and the specific requirements of the adjustment actions. For example, if the adjustment action is to increase the value of a parameter, the system will calculate the suggested value of the increased parameter based on the preset increase amount and the current value of the parameter; if the adjustment action is to decrease the value of a parameter, the system will similarly calculate the suggested value of the decreased parameter according to the corresponding rules. These optimized script parameter suggestions are generated based on the learning results of the reinforcement learning model and have high rationality and effectiveness.

[0087] Finally, the optimized script parameter suggestions are associated with the context information that generated the optimization and stored in the optimized parameter set of the corresponding script node in the operation knowledge graph. The operation knowledge graph is a graphical data structure used to store and manage operation-related knowledge, containing nodes of various operation scripts and the relationships between them. When storing optimized script parameter suggestions, the system first determines the node corresponding to the script in the operation knowledge graph. Then, the optimized parameter suggestions are associated with the context information that generated the optimization (such as device status and environmental conditions at the time of execution). This context information helps to quickly find suitable parameter optimization solutions in similar situations later. Finally, the associated information is stored in the optimized parameter set of the corresponding script node for subsequent querying and use. In this way, the operation knowledge graph can continuously accumulate and update optimization experience for script parameters, providing more intelligent and efficient support for subsequent operations.

[0088] Furthermore, the step of inputting the reinforcement learning input vector into a locally deployed reinforcement learning model, driving the model to learn based on historical states, actions, and reward sequences, and outputting actions to optimize and adjust script parameters, specifically includes: The reinforcement learning input vector and the resulting new state are combined to form an empirical unit and stored in a local empirical replay buffer. When the preset learning trigger conditions are met, a batch of experience units are randomly sampled from the experience replay buffer; Using the sampled empirical cells, calculate the estimated dominance function values ​​for each state-action pair; Based on the advantage function estimate, the parameters of the local policy network are updated using the proximal policy optimization algorithm, so that the action distribution output by the local policy network tends to produce high-reward actions. The state of the script parameters to be optimized is input into the updated local policy network. Based on the action probability distribution output by the local policy network, specific parameters are selected to optimize and adjust the action by combining the exploration and exploitation strategies.

[0089] In this embodiment, the reinforcement learning input vector and the resulting new state are combined to construct an experience unit and stored in a local experience replay buffer. During the execution of the operation script, after obtaining the reinforcement learning input vector, the system simulates the parameter adjustment action corresponding to the input vector, thereby obtaining a new state after script execution. This new state contains various key information after script execution, such as whether the execution result has changed, whether the process time has changed, and whether the interaction accuracy has improved. The reinforcement learning input vector and the new state are encapsulated according to a specific data structure to construct an experience unit. This experience unit completely records the state changes of the script under the action of the current input vector. Subsequently, the constructed experience unit is stored in the local experience replay buffer. The experience replay buffer is a data structure used to store historical experience. It can store a large number of experience units, providing rich data samples for subsequent model learning. By storing experience units, the model can break the temporal correlation between data, avoid overfitting caused by continuously learning similar data, and improve the stability and generalization ability of learning.

[0090] When preset learning trigger conditions are met, a batch of experience units is randomly sampled from the experience replay buffer. The learning trigger conditions can be set according to actual needs; for example, they can be set to trigger learning at regular time intervals, or to trigger learning when the number of experience units stored in the experience replay buffer reaches a certain threshold. Once the trigger conditions are met, the system will randomly select a batch of experience units from the experience replay buffer. The purpose of random sampling is to increase the diversity of samples, avoid the model always learning similar experiences, and thus improve the model's generalization ability. This batch of sampled experience units will serve as the data foundation for subsequent model learning.

[0091] Using sampled empirical units, the system calculates the advantage function estimate for each state-action pair. The advantage function is a crucial metric in reinforcement learning used to measure the advantage of taking an action in a given state relative to the average action. For each sampled empirical unit, the system analyzes its reinforcement learning input vector (i.e., the current state and action) and the new state, and calculates the reward obtained from taking the action in that state using a pre-defined reward function. Then, by comparing this reward with the average reward of all possible actions in that state, the system calculates the advantage function estimate. The advantage function estimate reflects the merit of the current action, providing an important basis for subsequent policy updates.

[0092] Based on the advantage function estimate, the proximal policy optimization algorithm is used to update the parameters of the local policy network, making the action distribution output by the local policy network more inclined to produce high-reward actions. The proximal policy optimization algorithm is an advanced reinforcement learning algorithm that can effectively improve policy performance while ensuring the stability of policy updates. During the parameter update process, the system fine-tunes the parameters of the local policy network based on the calculated advantage function estimate. Specifically, the algorithm adjusts the parameters in the direction that increases the advantage function estimate, making the policy network more inclined to output actions that yield high rewards under the same conditions. Through continuous iterative parameter updates, the performance of the local policy network will gradually improve, better guiding the optimization and adjustment of script parameters.

[0093] The system inputs the script parameter state to be optimized into the updated local policy network. Based on the action probability distribution output by the local policy network, and combining exploration and exploitation strategies, a specific parameter optimization action is selected. When script parameter optimization is needed, the system inputs the current script parameter state into the updated local policy network. The policy network outputs an action probability distribution based on the input parameter state, representing the probability of different parameter adjustment actions. To balance exploration and exploitation, the system employs certain strategies to select specific parameter optimization actions. The exploration strategy involves selecting less common but potentially high-reward actions with a certain probability to discover new optimization directions; the exploitation strategy involves selecting actions with a high current probability that have been proven to yield good rewards. By combining these two strategies, the system can continuously explore new optimization possibilities while ensuring optimization efficiency, ultimately selecting a suitable parameter optimization action for optimizing the script parameters.

[0094] In some embodiments, step S105 above, which involves using a federated learning framework to aggregate model update data from multiple mobile terminals and collaboratively optimize the global performance of the natural language processing model and the reinforcement learning model, specifically includes: A global baseline model for natural language processing and reinforcement learning models is initialized through a central server, and the global baseline model is distributed to multiple mobile terminals. Each mobile terminal can train two global benchmark models locally using private data, and generate its own local model update data. This enables each mobile terminal to perform privacy protection and compression processing on the local model update data, resulting in secure update data. Each mobile terminal uploads security update data to the central server. The central server decrypts and aggregates the security update data from multiple mobile terminals, and calculates the global aggregated update data for the natural language processing model and the reinforcement learning model, respectively. The central server applies globally aggregated update data to optimize the global baseline model it maintains, and then distributes the optimized global baseline model as the new global baseline model to each mobile terminal.

[0095] In this embodiment, a central server initializes global baseline models for both the natural language processing (NLP) and reinforcement learning (RBL) models and distributes these models to multiple mobile terminals. The central server possesses powerful computing and storage capabilities, enabling it to handle model initialization and distribution. During the initialization phase, the central server constructs global baseline models for both the NLP and RBL models based on a pre-defined model architecture and initial parameter values. These initial models form the basis for subsequent local training on each mobile terminal. After initialization, the central server utilizes its communication network with the mobile terminals to accurately distribute the two global baseline models to each terminal. Each mobile terminal, upon receiving the model, stores it locally, preparing it for subsequent local training.

[0096] Next, each mobile terminal trains the two global benchmark models locally using its own private data, generating its own local model update data. Mobile terminals collect a large amount of private data during daily use; this data is diverse and unique, and is of significant value for model training and optimization. For example, for natural language processing models, mobile terminals may collect user-input text data and speech recognition data; for reinforcement learning models, they may collect user state, action, and reward data during interactions with the application. Each mobile terminal uses this private data to train the received global benchmark model on its local device. During training, the model continuously adjusts its parameters based on the input data to adapt to the characteristics and distribution of the local data. After a certain number of training iterations, each mobile terminal generates local model update data for both the natural language processing and reinforcement learning models. This data reflects the direction and extent to which the local data adjusts the model parameters.

[0097] Then, each mobile terminal performs privacy protection and compression processing on the local model update data to obtain secure update data. Since the local model update data contains users' private information, each mobile terminal needs to perform privacy protection processing on this data to protect user privacy and prevent data leakage. Common privacy protection methods include encryption technology, such as using symmetric or asymmetric encryption algorithms to encrypt the data, ensuring that only an authorized central server can decrypt the data. Simultaneously, to reduce data transmission bandwidth and storage costs, each mobile terminal also compresses the encrypted data. The compression algorithm can be selected appropriately based on the characteristics of the data, such as lossless or lossy compression, minimizing the data size while ensuring data availability. After privacy protection and compression processing, the local model update data becomes secure update data, which can be securely transmitted to the central server.

[0098] Each mobile terminal uploads security update data to a central server. The central server decrypts and aggregates this data from multiple mobile terminals to calculate global aggregated update data for both the natural language processing (NLP) and reinforcement learning (RLM) models. Each mobile terminal uploads its security update data to the central server via a communication connection. Upon receiving this data, the central server first decrypts it using the corresponding decryption key to recover the original local model update data. Then, the central server uses an aggregation algorithm to aggregate these update data from different mobile terminals. The goal of the aggregation algorithm is to integrate the local update information from each mobile terminal into a global update information that reflects the comprehensive characteristics of all mobile terminal data. For the NLP and RLM models, aggregation algorithms suitable for their respective characteristics are used to calculate the global aggregated update data for both models.

[0099] Finally, the central server applies globally aggregated update data to optimize its maintained global baseline model, and then distributes the optimized global baseline model as the new global baseline model to each mobile terminal. The central server applies the calculated globally aggregated update data to its maintained global baseline models for natural language processing and reinforcement learning models, updating and optimizing the model parameters. The optimized global baseline model can integrate data information from multiple mobile terminals, exhibiting better generalization ability and performance. After optimization, the central server again distributes the optimized global baseline model to each mobile terminal, initiating a new round of training and optimization. Through continuous iteration of the above steps, the global performance of the natural language processing and reinforcement learning models will be continuously improved, better meeting user needs.

[0100] Reference Figure 2 An embodiment of the present invention provides a mobile intelligent agent processing system 2 based on natural language processing, the system 2 specifically comprising: The command parsing module 201 is used to receive natural language commands input by the user, parse the natural language commands using a natural language processing model, and extract the operation intent and operation entity. The graph query module 202 is used to query a pre-built operation knowledge graph based on operation intent and operation entity, and determine whether to reuse the similar historical operation scripts recommended by the operation knowledge graph or generate new operation scripts by comparing the query results with a preset similarity threshold. The context-aware module 203 is used to obtain device status and environmental information in real time through the context-aware engine, and dynamically adjust the parameters of the operation script to be executed based on the device status and environmental information. The feedback optimization module 204 is used to execute the operation script with adjusted parameters, collect feedback data on the execution process and results, input the feedback data into the reinforcement learning model, optimize the parameters of the operation script, and update the optimized parameters to the operation knowledge graph. Federated Learning Module 205 is used to leverage the federated learning framework to aggregate model update data from multiple mobile devices and collaboratively optimize the global performance of natural language processing models and reinforcement learning models.

[0101] It is understandable that, such as Figure 1 The content of the embodiments of the mobile intelligent agent processing method based on natural language processing shown are all applicable to the embodiments of the mobile intelligent agent processing system based on natural language processing. The specific functions implemented by the embodiments of the mobile intelligent agent processing system based on natural language processing are as follows: Figure 1 The mobile intelligent agent processing method embodiment based on natural language processing shown is the same, and the beneficial effects achieved are the same as those described above. Figure 1 The beneficial effects achieved by the illustrated embodiment of the mobile intelligent agent processing method based on natural language processing are also the same.

[0102] It should be noted that the information interaction and execution process between the above systems are based on the same concept as the method embodiments of the present invention. For details on their specific functions and technical effects, please refer to the method embodiments section, which will not be repeated here.

[0103] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0104] Reference Figure 3The present invention also provides a computer device 3, including: a memory 302 and a processor 301, and a computer program 303 stored in the memory 302. When the computer program 303 is executed on the processor 301, it implements the mobile terminal intelligent agent processing method based on natural language processing as described in any of the above methods.

[0105] The computer device 3 may be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device 3 may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art will understand that... Figure 3 The computer device 3 is merely an example and does not constitute a limitation on the computer device 3. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as input / output devices, network access devices, etc.

[0106] The processor 301 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0107] In some embodiments, the memory 302 may be an internal storage unit of the computer device 3, such as a hard disk or memory of the computer device 3. In other embodiments, the memory 302 may be an external storage device of the computer device 3, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 3. Furthermore, the memory 302 may include both internal and external storage units of the computer device 3. The memory 302 is used to store the operating system, applications, boot loader, data, and other programs, such as the program code of the computer program. The memory 302 can also be used to temporarily store data that has been output or will be output.

[0108] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the mobile intelligent agent processing method based on natural language processing as described in any of the above methods.

[0109] In this embodiment, if the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0110] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0111] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0112] In the embodiments disclosed in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0113] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

Claims

1. A mobile intelligent agent processing method based on natural language processing, characterized in that, The method specifically includes: It receives natural language commands input by the user, parses the natural language commands using a natural language processing model, and extracts the operation intent and operation entity; Based on the operation intent and operation entity, a pre-built operation knowledge graph is queried. By comparing the query results with a preset similarity threshold, it is determined whether to reuse the similar historical operation scripts recommended by the operation knowledge graph or generate new operation scripts. The context-aware engine acquires device status and environmental information in real time, and dynamically adjusts the parameters of the operation script to be executed based on the device status and environmental information. The operation script with adjusted parameters is executed, and feedback data on the execution process and results is collected. The feedback data is input into the reinforcement learning model to optimize the parameters of the operation script, and the optimized parameters are updated to the operation knowledge graph. By leveraging a federated learning framework, model update data from multiple mobile devices is aggregated to collaboratively optimize the global performance of natural language processing and reinforcement learning models.

2. The method according to claim 1, characterized in that, The process of parsing natural language commands using a natural language processing model to extract the operation intent and operation entity specifically includes: The natural language commands are standardized using domain terminology to obtain the processed command text. The command text is input into a lightweight natural language understanding model that has been trained in a domain-adaptive manner, and the operation intention and operation entity are jointly extracted from the command text. During the joint extraction process, a state cache is maintained to store the most recent interaction context. When the current command text is detected to contain a preset pronoun or its components are determined to be omitted, the most relevant entity information is retrieved from the state cache to complete the semantic representation of the current command text. The intent classification results and entity recognition results output by the lightweight natural language understanding model are post-processed based on confidence filtering, and then assembled into a structured operation instruction object by combining them with a pre-defined semantic role framework.

3. The method according to claim 2, characterized in that, The training steps of the lightweight natural language understanding model include: A corpus containing mobile device operation commands is constructed and labeled, wherein each command in the corpus is labeled with an intent tag and an entity sequence tag; Select a basic Transformer encoder model and add a parallel task head for intent classification and entity recognition on top of the basic Transformer encoder model to form a composite model to be fine-tuned. The composite model is subjected to two-stage progressive fine-tuning. In the first stage, the encoder part is fine-tuned using domain corpus with a self-supervised task. In the second stage, parallel task heads are enabled to perform end-to-end joint fine-tuning based on labeled corpus in a multi-task learning manner. By employing knowledge distillation technology, a pre-trained teacher model is used to guide the training of a finely tuned composite model, resulting in a lightweight natural language understanding model.

4. The method according to claim 1, characterized in that, The process of querying a pre-built operation knowledge graph based on operation intent and operation entity, and comparing the query results with a preset similarity threshold to determine whether to reuse similar historical operation scripts recommended by the operation knowledge graph or generate new operation scripts, specifically includes: Based on the operation intent and operation entity, a pre-built operation knowledge graph is queried. The nodes of the operation knowledge graph are used to represent historical operation tasks and associate and store historical scripts and execution contexts. For candidate historical task nodes in the operation knowledge graph, the semantic similarity between the current instruction and the candidate historical task nodes in terms of operation intent, the set similarity in terms of operation entities, and the context matching degree between the real-time context and the historical context are calculated in parallel. The semantic similarity, set similarity, and context matching are weighted and fused to obtain the comprehensive recommendation score for each candidate historical task node; The highest comprehensive recommendation score is compared with a preset reuse threshold. If the highest comprehensive recommendation score exceeds the preset reuse threshold, the historical operation script associated with the corresponding candidate historical task node is used. If the highest comprehensive recommendation score does not exceed the preset reuse threshold, a new operation script is generated.

5. The method according to claim 1, characterized in that, The process of acquiring device status and environmental information in real time through a context-aware engine, and dynamically adjusting the parameters of the operation script to be executed based on the device status and environmental information, specifically includes: The context-aware engine collects device intrinsic state, network state, and spatiotemporal environment information in parallel to form raw context information. The original context information is normalized and features are extracted to generate a standardized context feature vector. The context feature vector is input into the policy decision layer, and matching is performed based on the pre-set context-policy rule base to output the adjustment policy identifier; Based on the adjustment strategy identifier, query the parameter adjustment mapping table to obtain specific adjustment instructions for various parameters in the operation script; Parse the script to be executed and locate the adjustable parameter nodes within it; Based on specific adjustment instructions, the values ​​of adjustable parameter nodes are dynamically modified to generate a target executable script that adapts to the real-time context.

6. The method according to claim 1, characterized in that, The operation script with adjusted execution parameters is executed, and feedback data on the execution process and results is collected. This feedback data is then input into a reinforcement learning model to optimize the parameters of the operation script. The optimized parameters are then updated in the operation knowledge graph. Specifically, this includes: The operation script with adjusted parameters is executed, and feedback data including execution results, process time and interaction accuracy is collected through the monitor. The feedback data is structured to construct a reinforcement learning input vector that includes the current script parameter state and the overall performance reward; The reinforcement learning input vector is fed into a locally deployed reinforcement learning model, which is driven to learn based on historical state, action and reward sequences, and outputs actions to optimize and adjust the script parameters. Based on the optimized adjustment actions output by the reinforcement learning model, a set of optimized script parameter suggestions is generated; The optimized script parameter suggestions are associated with the context information that generated this optimization and stored in the optimization parameter set of the corresponding script node in the operation knowledge graph.

7. The method according to claim 6, characterized in that, The process of inputting reinforcement learning input vectors into a locally deployed reinforcement learning model, driving the model to learn based on historical states, actions, and reward sequences, and outputting optimization adjustments to script parameters specifically includes: The reinforcement learning input vector and the resulting new state are combined to form an empirical unit and stored in a local empirical replay buffer. When the preset learning trigger conditions are met, a batch of experience units are randomly sampled from the experience replay buffer; Using the sampled empirical cells, calculate the estimated dominance function values ​​for each state-action pair; Based on the advantage function estimate, the parameters of the local policy network are updated using the proximal policy optimization algorithm, so that the action distribution output by the local policy network tends to produce high-reward actions. The state of the script parameters to be optimized is input into the updated local policy network. Based on the action probability distribution output by the local policy network, specific parameters are selected to optimize and adjust the action by combining the exploration and exploitation strategies.

8. The method according to claim 1, characterized in that, The method of utilizing a federated learning framework to aggregate model update data from multiple mobile terminals and collaboratively optimize the global performance of natural language processing and reinforcement learning models specifically includes: A global baseline model for natural language processing and reinforcement learning models is initialized through a central server, and the global baseline model is distributed to multiple mobile terminals. Each mobile terminal can train two global benchmark models locally using private data, and generate its own local model update data. This enables each mobile terminal to perform privacy protection and compression processing on the local model update data, resulting in secure update data. Each mobile terminal uploads security update data to the central server. The central server decrypts and aggregates the security update data from multiple mobile terminals, and calculates the global aggregated update data for the natural language processing model and the reinforcement learning model, respectively. The central server applies globally aggregated update data to optimize the global baseline model it maintains, and then distributes the optimized global baseline model as the new global baseline model to each mobile terminal.

9. A mobile intelligent agent processing system based on natural language processing, characterized in that, The system specifically includes: The command parsing module is used to receive natural language commands input by the user, parse the natural language commands using a natural language processing model, and extract the operation intent and operation entity. The graph query module is used to query a pre-built operation knowledge graph based on operation intent and operation entity. By comparing the query results with a preset similarity threshold, it determines whether to reuse the similar historical operation scripts recommended by the operation knowledge graph or generate new operation scripts. The context-aware module is used to obtain device status and environmental information in real time through the context-aware engine, and dynamically adjust the parameters of the operation script to be executed based on the device status and environmental information. The feedback optimization module is used to execute the operation script with adjusted parameters, collect feedback data on the execution process and results, input the feedback data into the reinforcement learning model, optimize the parameters of the operation script, and update the operation knowledge graph with the optimized parameters. The Federated Learning module is used to leverage the Federated Learning framework to aggregate model update data from multiple mobile devices and collaboratively optimize the global performance of natural language processing and reinforcement learning models.

10. A computer device, characterized in that, include: The memory and processor, and the computer program stored in the memory, which, when executed on the processor, implement the mobile intelligent agent processing method based on natural language processing as described in any one of claims 1 to 8.