Method, apparatus and device for controlling artificial intelligence body and medium
By acquiring user input and environmental data, the system dynamically identifies the task requirements and functional modules of the AI agent, generates power distribution strategies, solves the problem of energy waste in existing technologies, and achieves efficient energy management and improved user experience for the AI agent.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NORTHEASTERN UNIV CHINA
- Filing Date
- 2026-04-27
- Publication Date
- 2026-07-03
Smart Images

Figure CN122086252B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a control method, apparatus, device, and medium for an artificial intelligence agent. Background Technology
[0002] With the rapid development of artificial intelligence (AI) technology, AI agents are gradually integrating into all aspects of daily life, especially providing personalized services such as emotional companionship, health monitoring, and daily living assistance for specific groups like the elderly and those living alone. Currently, the control method for AI agents typically involves uniformly managing the activation or deactivation of all functional modules; either all modules operate at full power, or the entire system enters hibernation or shuts down. However, this one-size-fits-all energy control approach leads to serious energy waste. Summary of the Invention
[0003] In view of this, the present invention provides a control method, device, electronic device and medium for an artificial intelligence agent to solve the technical problem of serious energy waste in existing energy control methods.
[0004] Firstly, a method for controlling an artificial intelligence agent is provided, the method comprising:
[0005] Acquire user input commands, user interaction data, historical task data, and environmental data, wherein the user interaction data includes at least one of the following: user voice data, user facial expression data, and user body data;
[0006] Based on user input commands, user interaction data, historical task data, and environmental data, at least one task to be executed is determined.
[0007] Based on the preset mapping relationship between tasks and functional modules, multiple candidate functional modules for each task to be executed are determined.
[0008] Based on environmental data, multiple candidate functional modules for each task to be executed are adjusted to determine multiple target functional modules for each task to be executed.
[0009] Based on multiple target functional modules, task types, and historical task data for each task to be executed, determine the task priority, task energy consumption level, and target task execution time for each task to be executed.
[0010] Based on multiple target functional modules, task priorities, task energy consumption levels, and target task execution duration, a power allocation strategy for the artificial intelligence agent is generated.
[0011] Implement power distribution strategies to control the power supply to the artificial intelligence entity.
[0012] Secondly, a control device for an artificial intelligence agent is provided, the device comprising:
[0013] The acquisition module is used to acquire user input commands, user interaction data, historical task data, and environmental data. Among them, user interaction data includes at least one of the following: user voice data, user facial expression data, and user body data.
[0014] The first determining module is used to determine at least one task to be executed based on user input instructions, user interaction data, historical task data, and environmental data.
[0015] The second determining module is used to determine multiple candidate functional modules for each task to be executed based on a preset mapping relationship between tasks and functional modules.
[0016] The third determination module is used to adjust multiple candidate functional modules for each task to be executed based on environmental data, and to determine multiple target functional modules for each task to be executed.
[0017] The fourth determination module is used to determine the task priority, task energy consumption level and target task execution time of each task to be executed based on multiple target functional modules, task types and historical task data of each task to be executed.
[0018] The generation module is used to generate a power allocation strategy for the artificial intelligence agent based on multiple target functional modules, task priorities, task energy consumption levels, and target task execution duration.
[0019] The control module is used to execute power distribution strategies and control the power supply to the artificial intelligence entity.
[0020] Thirdly, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the control method for the aforementioned artificial intelligence agent.
[0021] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the control method for the aforementioned artificial intelligence agent.
[0022] The aforementioned control method, device, electronic equipment, and storage medium for the AI agent achieves precise identification of the user's explicit and implicit needs through multi-source information fusion, forming a complete queue of tasks to be executed. Based on environmental data, the candidate functional modules for each task are dynamically adjusted to determine the final target functional module, ensuring smooth execution of tasks under various environmental conditions while avoiding energy waste due to environmental incompatibility. Subsequently, based on the target functional modules, task types, and historical task data for each task, task priority, energy consumption level, and target task execution duration are determined, generating a differentiated power allocation strategy. By executing the power allocation strategy, the target functional modules required for the tasks are precisely powered, while other modules remain in sleep or low-power states. This achieves precise on-demand energy allocation, overcoming the limitations of traditional unified power management. While ensuring user experience, it significantly reduces energy consumption and extends the AI agent's battery life. Attached Figure Description
[0023] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0024] Figure 1 This is a flowchart illustrating a control method for an artificial intelligence agent according to an embodiment of the present invention;
[0025] Figure 2 This is a schematic diagram of the structure of the control device for an artificial intelligence agent in one embodiment of the present invention. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in the present invention are only for illustrative and descriptive purposes and are not intended to limit the scope of protection of the present invention.
[0027] Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this invention illustrate operations implemented according to some embodiments of the invention. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or performed simultaneously. Moreover, those skilled in the art, guided by the content of this invention, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0028] Furthermore, the embodiments described herein are merely some, not all, of the embodiments of the invention. The components of the embodiments of the invention described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0029] It should be noted that the term "comprising" will be used in the embodiments of the present invention to indicate the presence of a feature subsequently declared, but does not exclude the addition of other features. It should also be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0030] With the rapid development of artificial intelligence technology, AI agents (such as intelligent companion robots and virtual personal assistants) are gradually integrating into all aspects of daily life, especially providing personalized services such as emotional companionship, health monitoring, and life assistance for specific groups such as the elderly and those living alone. These intelligent agents typically integrate multiple functional modules such as multimodal interaction (such as voice and vision), affective computing, environmental perception, and complex task execution. Their processing capabilities are increasing, and the tasks they undertake are becoming more and more complex.
[0031] However, the improvement in functionality and performance has also brought significant energy consumption issues. Currently, most intelligent agents adopt power management methods based on fixed strategies or unified management, such as setting inactive sleep timers or globally reducing performance based on battery percentage. These traditional methods have obvious drawbacks: First, they cannot perceive the context and intent of user interactions, and may enter sleep mode when the user is about to perform an important interaction, or maintain a high-performance state when executing low-priority background tasks, resulting in energy waste. Second, they lack the ability to predict the type and computational intensity of upcoming tasks, and cannot pre-allocate resources before high-load tasks arrive, which may lead to stuttering or response delays during task execution, seriously affecting the user experience. Furthermore, in environments with unstable network connections, traditional power management strategies cannot intelligently and dynamically switch between cloud computing and edge computing, either causing functionality to be interrupted due to network outages or exhausting power due to continuous attempts to connect to the cloud.
[0032] Based on this, this application proposes a control method for an artificial intelligence agent. By automatically analyzing user intent, the queue of tasks to be executed, and the environmental context, the method accurately predicts the energy consumption demand of the artificial intelligence agent and formulates the optimal power supply allocation strategy. This avoids blind energy allocation, makes energy allocation more rational, and maximizes the working time of the intelligent agent after a single charge while maintaining or even enhancing the user experience.
[0033] The following is a detailed description of this case, in conjunction with the relevant accompanying drawings in the instruction manual.
[0034] Please see Figure 1 This description and embodiment provide a control method for an artificial intelligence agent, specifically including the following steps:
[0035] S10: Acquire user input commands, user interaction data, historical task data, and environmental data;
[0036] User interaction data includes at least one of the following: user voice data, user facial expression data, and user body language data.
[0037] It is understood that the executing entity of this invention can be a control device for an artificial intelligence agent, or it can be a terminal or a server; no specific limitation is made here. This embodiment of the invention will be described using a server as an example of the executing entity.
[0038] In this step, the AI agent is an intelligent entity with autonomous perception, understanding, decision-making, and execution capabilities. It typically exists in the form of software or a combination of hardware and software, capable of interacting with the environment or users and autonomously completing specific tasks. User input commands refer to instructions actively conveyed by the user to the AI agent through voice, text, or touch, such as "How's the weather today?" or "Tell me a story." These commands directly reflect the user's explicit task requirements. User interaction data includes at least one of user voice data, user facial expression data, and user body language data. By collecting multimodal interaction data generated during user interaction with the AI agent, a more comprehensive understanding of the user's true state can be achieved. Historical task data contains a large number of accumulated user historical task execution records, used to analyze user habits and behavioral patterns. Environmental data refers to the set of states of the external environment in which the AI agent exists. The system task list contains currently registered or scheduled autonomous system tasks.
[0039] In practical applications, AI agents can be intelligent companion robots, virtual personal assistants, etc., which use microphone arrays and cameras to collect users' voice tone, facial expressions and body movements to fully perceive the user's real state.
[0040] S20: Based on user input instructions, user interaction data, historical task data, and environmental data, determine at least one task to be executed.
[0041] In this step, by comprehensively analyzing the acquired user input commands, user interaction data, historical task data, and environmental data, we can accurately identify the user's explicit needs while inferring the user's implicit needs, thereby obtaining one or more tasks to be executed, including real-time interaction tasks and potential interaction tasks, providing a complete task basis for subsequent energy allocation.
[0042] In one embodiment of this application, a specific scheme for determining a task to be executed is provided. In S20, at least one task to be executed is determined based on user input instructions, user interaction data, historical task data, and environmental data. This specifically includes the following steps S21-S26:
[0043] S21: Extract features from user input commands to obtain task text feature vectors.
[0044] In this step, the user input command can be either a voice command or a text command. When the user input command is a voice command, automatic speech recognition technology converts the speech into text, resulting in a text-based user input command. Subsequently, the user input command undergoes text preprocessing, including word segmentation, stop word removal, and part-of-speech tagging, resulting in preprocessed text. Then, feature extraction technology is used to vectorize the preprocessed text, generating a task text feature vector. This task text feature vector effectively represents the semantic information of the user input command.
[0045] Optionally, the feature extraction technique can be at least one of bag-of-words model, TF-IDF, Word2Vec or BERT, and this embodiment does not limit it.
[0046] S22: Input the task text feature vector into the preset task classification model, classify the task text feature vector through the preset task classification model, and determine at least one user interaction task corresponding to the user input command.
[0047] In this step, the preset task classification model is a classifier trained based on labeled historical task data. This classifier includes at least one of support vector machines, random forests, or deep learning networks. The extracted task text feature vectors are input into the preset task classification model, which calculates the matching probability between the text features and each preset task type. The preset task type with the highest matching probability is determined as the task type corresponding to the user's input command. The task type identified by the preset task classification model can be one or multiple. For example, when a user voice inputs "What's the weather like today?", the preset task classification model classifies this input command and calculates that the weather query task has the highest matching probability, thus identifying it as a single weather query task. When a user inputs "Check the weather, then play music, and finally remind me to take my medicine," the preset task classification model performs serialization analysis on this input command, sequentially identifying three different tasks: a weather query task, a music playback task, and a timed reminder task.
[0048] S23: Perform sentiment analysis and intent recognition on the task text feature vector and user interaction data to generate user state data;
[0049] User status data includes user emotional state and user interaction intent.
[0050] In this step, features are extracted from user interaction data to obtain corresponding feature vectors. The feature vectors corresponding to user interaction data and task text feature vectors are then input into a multimodal fusion model for concatenation to obtain a fused feature vector, which is used to determine the user's current emotional state and interaction intent.
[0051] The above methods can accurately perceive the user's actual status, providing a basis for decision-making in subsequent power distribution strategies.
[0052] In one embodiment of this application, a specific user state data determination scheme is provided. In S23, sentiment analysis and intent recognition are performed on the task text feature vector and user interaction data to generate user state data, specifically including the following steps S231-S234:
[0053] S231: Data type for obtaining user interaction data.
[0054] S232: Extract features from user interaction data using preset feature extraction rules corresponding to the data type to obtain the feature vector of the user interaction data.
[0055] For steps S231-S232, after collecting user interaction data, the system identifies which category the currently acquired data belongs to, calls the corresponding feature extraction rules to extract features, and obtains feature vectors.
[0056] In practical applications, for user voice data, acoustic feature extraction rules are used to extract features such as speech rate, pitch, and energy to generate speech feature vectors; for user facial expression data, facial feature extraction rules are used to extract the coordinates of key points such as eyebrows, eyes, and corners of the mouth through facial key point detection technology to generate facial expression feature vectors; for user limb data, skeletal feature extraction rules are used to extract the positions and movement trajectories of key skeletal points such as the head, shoulders, elbows, and wrists through pose estimation technology to generate motion feature vectors.
[0057] S233: Input the feature vector and the task text feature vector into the multimodal fusion model to obtain the fused feature vector.
[0058] In this step, the extracted feature vectors and task text feature vectors are input into a multimodal fusion model. The multimodal fusion model uses a feature-level fusion approach, concatenating the speech feature vectors, facial expression feature vectors, action feature vectors, and task text feature vectors to generate a unified fused feature vector. This fused feature vector integrates multi-dimensional information from the user's speech, facial expressions, body language, and text, enabling a more comprehensive representation of the user's true state.
[0059] S234: Input the fused feature vector into the preset state classification model, and perform classification calculation on the fused feature vector through the preset state classification model to obtain the user's emotional state and user interaction intent.
[0060] In this step, the fused feature vector is input into a preset state classification model. Through nonlinear transformation and classification calculation of the fused feature vector, a first probability distribution of the user's emotional state and a second probability distribution of the user's interaction intent are output. The emotional category with the highest probability value is selected from the first probability distribution as the user's emotional state, and the intent category with the highest probability value is selected from the second probability distribution as the user's interaction intent.
[0061] Optionally, the pre-defined state classification model includes at least one fully connected layer and a softmax output layer, and is trained under supervised supervision using labeled fused feature vectors, with model parameters optimized using a cross-entropy loss function. Training data includes fused feature vectors output from the multimodal fusion model and their corresponding sentiment and intent labels. Through end-to-end training, the classification model learns to map the fused features to sentiment and intent categories.
[0062] In practical applications, a user's emotional state includes at least one of happiness, sadness, anxiety, anger, and calmness. For example, when a user speaks faster, raises their tone, and frowns, their emotional state is judged to be anxious. A user's interaction intent includes at least one of instructions, small talk, asking for help, greeting, and ending the interaction. For example, when a user's text content contains keywords such as "help me" or "hurry up" and their body posture is forward, their interaction intent is judged to be instructions.
[0063] S24: Based on at least one user interaction task, user status data, and historical task data, determine whether there is a potential interaction task.
[0064] In this step, the current user interaction task is matched and analyzed with user state data and historical task data to determine whether there are potential interaction tasks related to the current context. For example, when a user initiates a storytelling task while feeling sad, historical task data is retrieved and it is found that users in a sad state usually have a need for emotional support when initiating a storytelling task, thus indicating the existence of a potential interaction task. Alternatively, even if there is no historical task data indicating that a user needs support when initiating a storytelling task while feeling sad, a pre-defined supplementary task indicates that the user needs emotional support, thus indicating the existence of a potential interaction task. Furthermore, if a user initiates a weather check task while feeling calm, and there are no related supplementary tasks in the historical data, then no potential interaction task is identified.
[0065] In one embodiment of this application, a specific scheme for determining potential interaction tasks is provided. In S24, based on at least one user interaction task, user state data, and historical task data, it is determined whether a potential interaction task exists. This specifically includes the following steps S241-S246:
[0066] S241: Based on the preset mapping relationship between emotion type and supplementary task, determine whether there is a corresponding supplementary task for the user's emotion state.
[0067] In this step, the preset mapping relationship between emotion type and supplementary task is a set of supplementary tasks pre-configured for specific user emotion types. For example, when a user's emotional state is sadness, the corresponding supplementary task is an emotional companionship task.
[0068] S242: If there is a corresponding supplementary task for the user's emotional state, match the supplementary task with at least one user interaction task, and determine whether the at least one user interaction task contains a supplementary task.
[0069] S243: If a supplementary task is not included in at least one user interaction task, the supplementary task shall be regarded as a potential interaction task.
[0070] For steps S242-S243, when it is confirmed that a corresponding supplementary task exists for the user's emotional state, this supplementary task is matched with at least one user interaction task to determine whether it is already included in at least one user interaction task initiated by the user. For example, when a user initiates a storytelling task with a sad emotion, the supplementary task corresponding to the sad emotion is identified as an emotional companionship task. This emotional companionship task is matched with the user interaction task (i.e., the storytelling task). If it is found that the storytelling task does not include an emotional companionship task, it is determined that the current user interaction task does not cover the supplementary task. In this case, the supplementary task is included as a potential interaction task in the task queue to be executed. Conversely, if the user interaction task already includes the supplementary task, it is not added again to avoid task redundancy.
[0071] By using the above methods, we can proactively identify implicit needs that users have not yet explicitly expressed based on their emotional state, and incorporate necessary supplementary tasks into the execution plan without interfering with users' proactive interactions, thereby improving the completeness of the service.
[0072] S244: Match the user status data, at least one user interaction task, and historical task data to determine whether there is a historical task event in the historical task data that contains the user status data and at least one user interaction task.
[0073] In this step, historical task data includes a user's long-term accumulated records of task executions. Each historical task event includes information such as the user's emotional state, task type, and execution method. Using the current user's emotional state and current user interaction task as indexes, the system searches the historical task data to determine if a matching historical task event exists.
[0074] S245: If the historical task data contains historical task events that include user status data and at least one user interaction task, obtain at least one historical task from the historical task events and determine whether at least one historical task is completely identical to at least one user interaction task.
[0075] S246: If at least one historical task is not exactly the same as at least one user interaction task, the different historical tasks shall be treated as potential interaction tasks.
[0076] For steps S245-S246, if the historical task data contains a historical task event that includes user state data and at least one user interaction task, at least one historical task from that historical task event is retrieved, and it is determined whether the at least one historical task is completely identical to at least one user interaction task. For example, when a user initiates a storytelling task while in a sad mood, a historical task event is retrieved from the historical task data. In this event, after initiating the storytelling task while in a sad mood, the user also executed two historical tasks: emotional support and extending the interaction time. These two historical tasks are compared with the current user interaction task (i.e., the storytelling task) to determine whether they are completely identical.
[0077] Furthermore, if at least one historical task is not entirely identical to at least one user interaction task, the different historical tasks are considered as potential interaction tasks. For example, if the two historical tasks of emotional companionship and extending interaction time in a historical task event are not entirely identical to the current user interaction task (storytelling task), then both emotional companionship and extending interaction time are identified as potential interaction tasks.
[0078] By combining the above methods with two approaches—supplementary task inference and historical behavior matching—we can comprehensively identify potential hidden needs of users, providing an accurate basis for forming a complete queue of tasks to be executed.
[0079] S25: If there are potential interaction tasks, combine at least one user interaction task and the potential interaction task into at least one task to be executed.
[0080] S26: If there is no potential interaction task, at least one user interaction task shall be treated as at least one task to be executed.
[0081] For steps S25-S26, if a potential interaction task is determined to exist, the user-initiated interaction task is merged with the potential interaction tasks inferred based on the user's state and historical behavior to form a complete queue of tasks to be executed. For example, when a user initiates a storytelling task with a sad emotion, the system combines the storytelling task with the inferred emotional support task to obtain a queue of tasks to be executed containing both tasks. While executing the storytelling task, the system proactively provides emotional interaction to the user, satisfying the user's implicit needs.
[0082] Furthermore, if it is determined that there are no potential interactive tasks, only the explicit tasks actively initiated by the user will be treated as tasks to be executed, without adding any additional supplementary tasks. For example, when a user initiates a weather check task in a calm state, the system will only treat the weather check task as a task to be executed and execute it in the usual way, without adding any other tasks.
[0083] The above methods can intelligently determine whether there are potential interactive tasks based on user status and historical behavior, and dynamically adjust the queue of tasks to be executed accordingly. This avoids adding unnecessary task burdens when users have no implicit needs, and can proactively provide supplementary services when users have implicit needs, thus realizing intelligent and humanized task scheduling.
[0084] S30: Based on the preset mapping relationship between tasks and functional modules, determine multiple candidate functional modules for each task to be executed.
[0085] In this step, the preset mapping relationship between tasks and functional modules is a set of required functional modules pre-configured for different task types. For example, the candidate functional modules for a storytelling task include a speech synthesis module, microphone array, emotion perception module, network module, and storage module; the candidate functional modules for a weather check task include a network module and a speech module. Based on the task type of each task to be executed, the preset mapping relationship is queried to obtain the set of candidate functional modules corresponding to each task.
[0086] S40: Based on environmental data, filter and replace multiple candidate functional modules for each task to be executed, and determine multiple target functional modules for each task to be executed.
[0087] In this step, environmental data includes at least one of network connection quality, cloud service response latency, ambient light intensity, and ambient noise level in decibels. Based on this environmental data, candidate functional modules are dynamically adjusted to ultimately determine the multiple target functional modules required for the actual execution of each task.
[0088] In practical applications, when the network connection quality is detected to be lower than a preset threshold or the cloud service response latency is detected to be higher than a preset threshold, the network module in the candidate functional modules will be replaced with the edge computing module, and the content that originally needed to be obtained from the cloud will be switched to be read from local storage; when the ambient light level is detected to be lower than a preset threshold, the display module will be replaced with an auxiliary lighting module, or the power supply priority of the display module will be reduced; when the ambient noise level is detected to be higher than a preset threshold, the power supply of the voice interaction module will be enhanced, and the visual interaction module will be enabled as an auxiliary.
[0089] In one embodiment of this application, a specific functional module adjustment scheme is provided. In S40, based on environmental data, multiple candidate functional modules of each task to be executed are adjusted to determine multiple target functional modules of each task to be executed. Specifically, this includes the following steps S41-S43:
[0090] S41: For any task to be executed, based on the preset mapping relationship between environmental data and functional modules, determine whether the functional modules among multiple candidate functional modules include the functional modules corresponding to the environmental data;
[0091] The environmental data includes at least one of the following: network connection quality data and cloud service response latency data.
[0092] In this step, a pre-defined mapping relationship between environmental data and functional modules associates different types of environmental data with corresponding functional modules. For example, network connection quality data and cloud service response latency data correspond to network communication modules. Multiple candidate functional modules for the current task are traversed to determine if any functional modules are associated with the environmental data. For instance, for a storytelling task, candidate functional modules include a speech synthesis module, microphone array, emotion perception module, network module, and storage module. Since the network module is associated with network connection quality in the environmental data, the result is that the candidate functional modules include the functional module corresponding to the environmental data.
[0093] S42: When multiple candidate functional modules include functional modules corresponding to environmental data, compare the environmental data with the preset environmental threshold to determine whether the environmental data meets the preset environmental conditions.
[0094] In this step, when multiple candidate functional modules include functional modules corresponding to environmental data, the environmental data is compared with preset environmental thresholds to determine whether the environmental data meets the preset environmental conditions. The preset environmental thresholds are set according to different environmental data types; for example, network connection quality corresponds to a signal strength threshold, and cloud service response latency corresponds to a latency threshold. The collected current environmental data is compared with the corresponding preset thresholds to determine whether the current environmental conditions meet normal operating requirements. For example, if the network connection quality is lower than the preset signal strength threshold or the cloud service response latency is higher than the preset latency threshold, the environmental data is determined not to meet the preset environmental conditions.
[0095] S43: If the environmental data does not meet the preset environmental conditions, based on the preset mapping relationship between the environmental data and the replacement module, the functional module corresponding to the environmental data is replaced to obtain multiple target functional modules for the task to be executed.
[0096] In this step, the pre-defined mapping relationship between environmental data and replacement modules configures corresponding replacement modules for different abnormal environmental conditions. For example, when the network connection quality is poor or the cloud latency is high, the network communication module is replaced with the edge computing module, switching the task execution from cloud-dependent to local processing. For instance, for a storytelling task, when the network connection quality is detected to be below a preset threshold, the network module in the candidate functional modules is replaced with the edge computing module, so that the story content is read from local storage instead of being obtained through the network, thereby avoiding response delays or task interruptions caused by network problems.
[0097] By using the above methods, the functional modules required to perform tasks can be dynamically adjusted according to actual environmental conditions, ensuring that tasks can be completed smoothly in various environments, while avoiding energy waste caused by environmental incompatibility.
[0098] S50: Based on multiple target functional modules, task types, and historical task data of each task to be executed, determine the task priority, task energy consumption level, and target task execution time of each task to be executed.
[0099] In this step, task priority is determined based on task type, task timeliness, and user status data. The task energy consumption level is determined based on the task type and the combination of target functional modules used. The execution time of the target task is estimated based on the average execution time of similar tasks in historical task data and the current user status.
[0100] In one embodiment of this application, a specific scheme for determining the task parameters of a task to be executed is provided. In S50, based on multiple target functional modules, task types, and historical task data of each task to be executed, the task priority, task energy consumption level, and target task execution duration of each task to be executed are determined, specifically including the following steps S51-S57:
[0101] S51: Determine the task priority of each task to be executed based on the preset mapping relationship between task type and task priority.
[0102] In this step, the preset mapping relationship between task type and task priority is that different priority levels are pre-configured according to different task types. For example, real-time interactive tasks related to users (such as voice dialogue and storytelling) are configured with high priority, while system-autonomous tasks (such as data backup and log upload) are configured with low priority. Based on the task type of each task to be executed, this preset mapping relationship is queried to determine the task priority corresponding to each task.
[0103] S52: Based on the preset mapping relationship between functional modules and power consumption values, determine the target power consumption value of each target functional module.
[0104] In this step, a preset mapping relationship between functional modules and power consumption values records the power consumption value of each functional module under different power supply states. For example, the power consumption of the speech synthesis module is 300mW in full power state, 200mW in standard state, and 80mW in frequency reduction state. Based on this preset mapping relationship, the target power consumption value corresponding to each module under different power supply states is determined.
[0105] S53: Based on the preset mapping relationship between task type and preset task execution duration, determine the preset task execution duration for each task to be executed.
[0106] In this step, the preset mapping relationship between task type and preset task execution duration is based on the baseline execution duration pre-configured for different task types. For example, the preset execution duration for a weather check task is 3 seconds, for a storytelling task it is 15 minutes, and for a music playback task it is 5 minutes. Based on the task type of each task to be executed, this preset mapping relationship is queried to obtain the preset task execution duration for each task.
[0107] S54: Determine whether the historical task data contains each task to be executed.
[0108] S55: If the historical task data contains tasks to be executed, determine the historical task execution duration of each task to be executed in the historical task data based on the task type.
[0109] For steps S54-S55, the historical task data includes the user's long-term accumulated historical task execution records. Each record includes information such as task type, historical execution duration, and historical emotional state. Using the task type of the current task to be executed as an index, the historical task data is searched to see if there are any execution records of the same task type. If the historical task data contains all tasks to be executed, the historical duration of at least one execution of that task type in the historical records is obtained, and its average value is calculated as the historical task execution duration. For example, for a storytelling task, if the historical records show that the user's average duration for previous storytelling tasks is 18 minutes, then this value is determined as the historical task execution duration. If the task type does not exist in the historical task data, the historical task execution duration is set to null.
[0110] S56: Based on the preset task execution duration and the historical task execution duration, determine the target task execution duration for each task to be executed.
[0111] In this step, when the task type exists in the historical task data, the execution time of the historical task is weighted and averaged with the execution time of the preset task to obtain the execution time of the target task. For example, the execution time of the target task = (execution time of the historical task + execution time of the preset task) / 2. When the task type does not exist in the historical task data, the execution time of the preset task is directly used as the execution time of the target task.
[0112] S57: Based on the number of modules of multiple target functional modules, multiple target power consumption values and target task execution time, determine the task energy consumption level of each task to be executed.
[0113] In this step, the total power consumption of each target functional module is first calculated, and then the total energy consumption value is calculated, i.e., total energy consumption = total power consumption value × target task execution time. Finally, based on the preset threshold range in which the total energy consumption value falls, the corresponding task energy consumption level is determined. For example, when the total energy consumption value is less than 50mWh, the task energy consumption level is low; when the total energy consumption value is between 50mWh and 500mWh, the task energy consumption level is medium; and when the total energy consumption value is greater than 500mWh, the task energy consumption level is high.
[0114] By combining the above methods with preset values for task types, personalized adjustments based on historical data, and precise calculation of module power consumption, the task priority, target task execution time, and task energy consumption level of each task to be executed are accurately determined, providing a reliable data foundation for the generation of subsequent power allocation strategies.
[0115] S60: Generates a power allocation strategy for the artificial intelligence agent based on multiple target functional modules, task priorities, task energy consumption levels, and target task execution duration.
[0116] In this step, the power supply priority of each target functional module is determined according to task priority; the higher the task priority, the higher the power supply priority of the corresponding functional module. The power supply range of each target functional module is determined based on the task's energy consumption level: high-energy-consuming tasks receive full power, medium-energy-consuming tasks receive standard power, and low-energy-consuming tasks receive reduced-frequency power. Based on the above determinations, a power allocation strategy is generated, including power supply priority ranking, power supply adjustment instructions, and sleep / wake-up instructions.
[0117] Optionally, the power supply priority and power can be dynamically adjusted based on user status data. When the user's emotional state is anxious or the interaction intent is to ask for help, the power supply priority of the relevant modules of the current task is increased and the power supply is adjusted to full power mode to respond to the user's needs as quickly as possible.
[0118] In practical applications, when the task to be executed is image rendering, complex natural language processing, or large-scale data computation, if the current network conditions are good, the power supply adjustment command instructs the network communication module to provide full power and sends the computation task request to the cloud computing submodule. If the network conditions are poor, the command instructs the local edge computing submodule to run at full power while limiting the power consumption of other non-core modules. When the task to be executed is a continuous voice dialogue task or an emotion interaction task, the power supply adjustment command instructs priority to ensure the power supply of the voice interaction submodule and the emotion perception module and maintain them in a low-latency response state, while placing other non-real-time tasks such as the skill learning module and the data backup module in a low-power waiting mode.
[0119] In one embodiment of this application, a specific power allocation strategy generation scheme is provided. In S60, a power allocation strategy for the artificial intelligence agent is generated based on multiple target functional modules, task priorities, task energy consumption levels, and target task execution duration. This specifically includes the following steps S61-S66:
[0120] S61: Determine the power supply priority of each target functional module based on task priority.
[0121] In this step, the power supply priority of the functional modules corresponding to different tasks is different. For example, for 3D rendering tasks with high energy consumption, the corresponding GPU module is determined to be high priority, that is, full power supply; when the user initiates a storytelling task, the speech synthesis module, microphone array, emotion perception module and other components required for the storytelling task are all assigned medium priority, that is, standard power supply.
[0122] Optionally, the power supply priority can be dynamically adjusted based on user status data. When the user's emotional state is anxious or the interaction intent is to ask for help, the power supply priority of the relevant modules for the current task can be raised to the highest level.
[0123] S62: Determine the power supply level of each target functional module based on the preset mapping relationship between task energy consumption level and power supply level.
[0124] In this step, task power consumption levels are categorized as low, medium, and high, while power supply levels include full power, standard power, and reduced-frequency power. A pre-defined mapping relationship between task power consumption levels and power supply levels associates different power consumption levels with their corresponding power supply levels. For example, high-power tasks correspond to full power supply, medium-power tasks to standard power supply, and low-power tasks to reduced-frequency power supply. Based on the task power consumption level of each task to be executed, this pre-defined mapping relationship is queried to determine the power supply level corresponding to the target functional module required to execute the task. For example, for a 3D rendering task with a high power consumption level, its corresponding GPU module is determined to be at the full power supply level; for a storytelling task with a medium power consumption level, its corresponding voice module is determined to be at the standard power supply level.
[0125] S63: Determine the power supply range of each target functional module based on the preset mapping relationship between the power supply level and the preset power supply range.
[0126] S64: Generate power supply adjustment instructions based on the power supply range of each target functional module.
[0127] For steps S63-S64, the preset power supply range between the power supply level and the preset power supply range is configured with corresponding voltage and current parameters according to different power supply levels. For example, full power supply corresponds to high voltage and current upper limit being lifted, standard power supply corresponds to rated voltage and rated current, frequency reduction power supply corresponds to low voltage and current limit, and shutdown corresponds to zero voltage and zero current. Based on the power supply level of each target functional module, this preset mapping relationship is queried to determine the specific power supply voltage and current upper limit values for each module. For example, the voice synthesis module has a voltage of 3.3V and a current upper limit of 300mA under full power supply level, a voltage of 2.8V and a current upper limit of 200mA under standard power supply level, and a voltage of 1.8V and a current upper limit of 80mA under frequency reduction power supply level. These power supply parameters are encapsulated into power supply adjustment instructions. Each instruction corresponds to the power supply control requirements of each target functional module, and includes at least the target module identifier, power supply voltage value, current upper limit value, and power supply mode (continuous power supply, on-demand power supply, or pulse power supply).
[0128] S65: Generate sleep / wake instructions based on multiple target function modules and the remaining function modules of the artificial intelligence entity other than the target function modules.
[0129] In this step, multiple target functional modules required for the current task are marked as awake to ensure they remain operational during task execution; other functional modules unrelated to the current task are marked as dormant or shut down to avoid unnecessary energy consumption. For example, when performing a storytelling task, the speech synthesis module, microphone array, emotion perception module, network module, and storage module are marked as awake, while the skill learning module, data backup module, etc., are marked as dormant.
[0130] Optionally, conditional sleep / wake-up instructions can be generated based on the task execution sequence. For example, after the network module completes the acquisition of story content, it can be switched from full power to reduced frequency or sleep mode; after the story task ends, the voice module can be switched to low-power listening mode, while waking up the target function module required for the next task to be executed.
[0131] S66: Generates a power allocation strategy based on power supply priority, power supply adjustment instructions, and sleep / wake-up instructions.
[0132] In this step, a complete power allocation strategy is generated based on power supply priority, power supply range, and sleep / wake-up instructions, serving as the power supply control scheme for the functional modules within the AI agent. The power allocation strategy includes the power supply priority and power supply range for each target functional module. The power supply priority guides the power management circuit to prioritize power supply to which modules when resources are limited; the power supply range guides the power management circuit to provide precise voltage and current to each module. Furthermore, the power allocation strategy also includes sleep / wake-up instructions for all functional modules, guiding the power management circuit on when to wake up or put each functional module into sleep mode.
[0133] The above method generates a complete power allocation strategy that includes power supply priority sorting, power supply adjustment instructions, and sleep / wake-up instructions, providing a comprehensive and accurate basis for subsequent precise power supply control.
[0134] S70: Executes power distribution strategies to control the power supply to the AI agent.
[0135] In this step, after generating the power allocation strategy, the strategy is executed to control the power supply to the AI agent. First, based on the power supply priority, the power supply sequence and protection level of each target functional module are determined. The target functional module with the highest power supply priority is given priority in ensuring its power supply, guaranteeing a stable power supply even when the total system power is limited or insufficient. For target functional modules with lower power supply priority, their power supply priority is reduced accordingly or they are placed in standby mode. Second, according to the power supply adjustment instructions in the power allocation strategy, specific upper limits for the power supply voltage and current are set for each target functional module. Modules requiring full-power operation are provided with high voltage and current restrictions are lifted; modules requiring standard power supply are provided with rated operating voltage and current; modules requiring reduced-frequency power supply have their voltage reduced and current limited; and other modules unrelated to the currently executed task are put into hibernation or completely shut down. Meanwhile, according to the sleep and wake-up instructions in the power supply distribution strategy, the functional modules of the artificial intelligence agent are dynamically switched. Multiple target functional modules required for the current task to be executed are woken up and maintained in normal working state. The remaining functional modules except the target functional modules are switched to sleep or shutdown state. According to the task execution sequence, the target functional modules are put into sleep in time after use and woken up in advance when needed.
[0136] Optionally, when the user is detected to be anxious, a high-priority signal for the task to be performed is generated. Even if the AI agent is currently in an energy-saving state, full power is provided to all target functional modules necessary to perform the high-priority interactive task to ensure system response speed.
[0137] The above method enables precise power supply control of the AI agent, supplying power only to the core modules required to perform the task, while keeping the other modules in a low-power or sleep state, which not only ensures user experience but also significantly improves energy efficiency.
[0138] In a real-world application scenario, at 10 AM, Grandma Zhang, an elderly woman living alone, wakes up the AI assistant in her living room. The camera detects that Grandma Zhang's expression is calm but her movements are slow. Her voice command, "How's the weather today?", is captured through the microphone and is spoken in a calm tone, indicating a routine information query and a stable emotional state. The task to be executed is identified as "weather query," which requires activation of the network communication module, natural language processing module, and speech synthesis module. The current Wi-Fi signal strength is detected as good (-50dBm), and the cloud service response latency is 50ms, indicating a low-latency state. Based on this data, it is inferred that "weather query" is a low-power, short-duration task, with a total energy consumption of approximately 50mWh and an execution time of approximately 3 seconds. The power allocation strategy is as follows: Power priority is given to the network module before the natural language processing and speech synthesis modules, and then to other modules. The power scheduling command is as follows: the network module, natural language processing module, and speech synthesis module are provided with standard operating voltage. Simultaneously, due to good network conditions, the computational tasks are offloaded to the cloud. The sleep / wake-up command is as follows: the network communication module, natural language processing module, and speech synthesis module are activated, while the remaining functional modules enter low-power sleep mode. Upon task completion, a command to enter low-power sleep mode is immediately sent to the network communication module, natural language processing module, and speech synthesis module. Simultaneously, due to detected user activity, the emotion perception module and voice wake-up module maintain low-power monitoring mode, with only basic circuitry operating at extremely low power consumption. Subsequently, this power allocation strategy is executed, and the network module, natural language processing module, and speech synthesis module are precisely powered on to 3.3V. After task completion, the output of these modules is reduced to a holding voltage of 0.5V.
[0139] As can be seen, the above solution accurately identifies users' explicit and implicit needs through multi-source information fusion, forming a complete queue of tasks to be executed. Based on environmental data, the candidate functional modules for each task are dynamically adjusted to determine the final target functional module, ensuring smooth task execution under various environmental conditions and avoiding energy waste due to environmental incompatibility. Subsequently, based on the target functional module, task type, and historical task data for each task, task priority, energy consumption level, and target task execution duration are determined, generating a differentiated power allocation strategy. By executing the power allocation strategy, the target functional modules required for the tasks are precisely powered, while other modules remain in sleep or low-power states. This achieves precise on-demand energy allocation, breaking through the limitations of traditional unified power management. While ensuring user experience, it significantly reduces energy consumption and extends the agent's battery life.
[0140] In one embodiment, a control system for an artificial intelligence agent is provided. The system includes the artificial intelligence agent, a multimodal perception module, a task energy consumption prediction module, a dynamic energy scheduling module, and a power management circuit. Specifically, the multimodal perception module is used to collect user interaction data, input content, and environmental data of the artificial intelligence agent in real time. The task energy consumption prediction module, connected to the multimodal perception module, is used to predict the energy consumption level and execution duration of at least one task to be executed by the artificial intelligence agent based on the collected data. The dynamic energy scheduling module, connected to the task energy consumption prediction module, is used to generate a real-time power allocation strategy based on the predicted energy consumption level and execution duration. The power allocation strategy includes at least a power priority ranking for different functional modules, power adjustment instructions, and sleep / wake-up instructions. The power management circuit is an independent PCB board integrating a multi-output DC-DC programmable power supply, a battery management chip, and a supercapacitor charging and discharging management circuit. The power management circuit is connected to the dynamic energy scheduling module and coupled to the main power supply and backup power supply of the artificial intelligence agent to execute the power allocation strategy and achieve precise power supply control for each functional module of the artificial intelligence agent. The power management circuit includes: a multi-output programmable power supply, each output connected to one or more functional modules of the AI agent, with independent control over its output voltage and current limits; a power path management unit for intelligently switching the power supply paths of the main power supply and backup power supply, achieving seamless switching when the main power supply fails; and a real-time power consumption metering unit for accurately measuring the real-time power consumption of each output and feeding the data back to the dynamic energy scheduling module to form a closed-loop control. Furthermore, the system also includes a personalized learning module connected to the multimodal perception module and the dynamic energy scheduling module. This module learns typical user behaviors at different times and locations based on historical task data and generates habitual power consumption curves. This allows the dynamic energy scheduling module to incorporate these historical habitual power consumption curves when generating power allocation strategies, proactively reducing the power supply to relevant modules during periods of user inactivity or low interaction. In addition, during normal operation, the power management circuit uses the main power supply to trickle charge the supercapacitor bank; when a high-power task is predicted to be performed and the main power supply is powering the battery, the dynamic energy scheduling module instructs the power management circuit to connect the supercapacitor bank and the main battery in parallel to provide peak power support for the high-power task, thereby extending the single-cycle lifespan of the main battery.
[0141] In one embodiment, a control device for an artificial intelligence agent is provided, which corresponds one-to-one with the control method for the artificial intelligence agent in the above embodiments. For example... Figure 2 As shown, the control device 100 for the artificial intelligence agent includes: an acquisition module 101, a first determination module 102, a second determination module 103, a third determination module 104, a fourth determination module 105, a generation module 106, and a control module 107. Detailed descriptions of each functional module are as follows:
[0142] The acquisition module 101 is used to acquire user input commands, user interaction data, historical task data and environmental data, wherein the user interaction data includes at least one of the following: user voice data, user facial expression data and user body data;
[0143] The first determining module 102 is used to determine at least one task to be executed based on user input instructions, user interaction data, historical task data and environmental data.
[0144] The second determining module 103 is used to determine multiple candidate functional modules for each task to be executed based on a preset mapping relationship between tasks and functional modules.
[0145] The third determining module 104 is used to adjust multiple candidate functional modules of each task to be executed based on environmental data, and to determine multiple target functional modules of each task to be executed.
[0146] The fourth determination module 105 is used to determine the task priority, task energy consumption level and target task execution time of each task to be executed based on multiple target functional modules, task types and historical task data of each task to be executed.
[0147] The generation module 106 is used to generate a power allocation strategy for the artificial intelligence agent based on multiple target functional modules, task priorities, task energy consumption levels and target task execution duration.
[0148] The control module 107 is used to execute the power distribution strategy and control the power supply to the artificial intelligence entity.
[0149] In one embodiment, the first determining module 102 is specifically used for:
[0150] Feature extraction is performed on user input commands to obtain task text feature vectors;
[0151] The task text feature vector is input into a preset task classification model. The task text feature vector is classified by the preset task classification model to determine at least one user interaction task corresponding to the user input command.
[0152] Sentiment computing and intent recognition are performed on task text feature vectors and user interaction data to generate user state data, which includes user emotional state and user interaction intent.
[0153] Based on at least one user interaction task, user status data, and historical task data, determine whether there are potential interaction tasks.
[0154] If potential interaction tasks exist, at least one user interaction task and potential interaction tasks will be combined into at least one task to be executed;
[0155] If no potential interaction task exists, at least one user interaction task will be treated as at least one task to be executed.
[0156] In one embodiment, the first determining module 102 is further configured to:
[0157] Data types for obtaining user interaction data;
[0158] By using preset feature extraction rules corresponding to the data type, feature extraction is performed on the user interaction data to obtain the feature vector of the user interaction data.
[0159] The feature vector and the task text feature vector are input into the multimodal fusion model to obtain the fused feature vector;
[0160] The fused feature vector is input into a preset state classification model, and the preset state classification model performs classification calculations on the fused feature vector to obtain the user's emotional state and user interaction intent.
[0161] In one embodiment, the first determining module 102 is further configured to:
[0162] Based on the pre-defined mapping relationship between emotion type and supplementary task, determine whether there is a corresponding supplementary task for the user's emotional state;
[0163] If there is a corresponding supplementary task for the user's emotional state, match the supplementary task with at least one user interaction task and determine whether the supplementary task is included in at least one user interaction task.
[0164] If no supplementary task is included in at least one user interaction task, the supplementary task will be treated as a potential interaction task.
[0165] Match user status data, at least one user interaction task, and historical task data to determine whether there are any historical task events in the historical task data that contain user status data and at least one user interaction task.
[0166] If the historical task data contains a historical task event that includes user status data and at least one user interaction task, obtain at least one historical task from the historical task event and determine whether at least one historical task is completely identical to at least one user interaction task.
[0167] If at least one historical task is not exactly the same as at least one user interaction task, the different historical tasks will be treated as potential interaction tasks.
[0168] In one embodiment, the third determining module 104 is specifically used for:
[0169] For any task to be executed, based on the preset mapping relationship between environmental data and functional modules, it is determined whether the functional modules among multiple candidate functional modules include the functional modules corresponding to the environmental data. The environmental data includes at least one of the following: network connection quality data and cloud service response latency data.
[0170] When multiple candidate functional modules include functional modules corresponding to environmental data, the environmental data is compared with a preset environmental threshold to determine whether the environmental data meets the preset environmental conditions.
[0171] If the environmental data does not meet the preset environmental conditions, the functional modules corresponding to the environmental data are replaced based on the preset mapping relationship between the environmental data and the replacement modules, resulting in multiple target functional modules for the task to be executed.
[0172] In one embodiment, the fourth determining module 105 is specifically used for:
[0173] The task priority of each task to be executed is determined based on the preset mapping relationship between task type and task priority;
[0174] Based on the preset mapping relationship between functional modules and power consumption values, the target power consumption value of each target functional module is determined;
[0175] Based on the preset mapping relationship between task type and preset task execution duration, the preset task execution duration of each task to be executed is determined;
[0176] Determine whether the historical task data contains the tasks to be executed;
[0177] If the historical task data contains tasks to be executed, determine the historical task execution duration of each task to be executed in the historical task data based on the task type;
[0178] Based on the preset task execution duration and the historical task execution duration, determine the target task execution duration for each task to be executed;
[0179] Based on the number of modules of multiple target functional modules, multiple target power consumption values, and target task execution time, the task energy consumption level of each task to be executed is determined.
[0180] In one embodiment, the generation module 106 is specifically used for:
[0181] Based on task priority, determine the power supply priority of each target functional module;
[0182] Based on the preset mapping relationship between task energy consumption level and power supply level, the power supply level of each target functional module is determined;
[0183] Based on the preset mapping relationship between power supply level and preset power supply range, the power supply range of each target functional module is determined;
[0184] Based on the power supply range of each target functional module, a power supply adjustment command is generated;
[0185] Based on multiple target functional modules and the remaining functional modules of the artificial intelligence entity other than the target functional modules, a sleep / wake-up command is generated.
[0186] A power allocation strategy is generated based on power supply priority, power supply adjustment instructions, and sleep / wake-up instructions.
[0187] This invention provides a control device 100 for an artificial intelligence agent. Through multi-source information fusion, it accurately identifies the user's explicit and implicit needs, forming a complete queue of tasks to be executed. Based on environmental data, it dynamically adjusts the candidate functional modules of each task to determine the final target functional module, ensuring smooth execution of tasks under various environmental conditions and avoiding energy waste due to environmental incompatibility. Subsequently, based on the target functional modules, task types, and historical task data of each task, it determines task priority, energy consumption level, and target task execution duration, generating a differentiated power allocation strategy. By executing the power allocation strategy, the target functional modules required for the tasks are precisely powered, while other modules remain in sleep or low-power states. This achieves precise on-demand energy allocation, breaking through the limitations of traditional unified power management. While ensuring user experience, it significantly reduces energy consumption and extends the agent's battery life.
[0188] Specific limitations regarding the control device for the AI agent can be found in the limitations on the control method for the AI agent described above, and will not be repeated here. Each module in the aforementioned control device for the AI agent can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in the electronic device, or stored in software in the memory of the electronic device, so that the processor can call and execute the operations corresponding to each module.
[0189] In one embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the control method of the aforementioned artificial intelligence agent.
[0190] In one embodiment, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the control method of the artificial intelligence agent described above.
[0191] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or electronic device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0192] Those skilled in the art will understand that 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 non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0193] 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 used as 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 device can be divided into different functional units or modules to complete all or part of the functions described above.
[0194] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A control method for an artificial intelligence agent, characterized in that, include: Acquire user input commands, user interaction data, historical task data, and environmental data, wherein the user interaction data includes at least one of the following: user voice data, user facial expression data, and user body data; Based on the user input instructions, the user interaction data, the historical task data, and the environmental data, at least one task to be executed is determined; Based on the preset mapping relationship between tasks and functional modules, multiple candidate functional modules for each task to be executed are determined. Based on the environmental data, multiple candidate functional modules for each task to be executed are adjusted to determine multiple target functional modules for each task to be executed. Based on the multiple target functional modules, task types, and historical task data of each task to be executed, the task priority, task energy consumption level, and target task execution duration of each task to be executed are determined. Based on the multiple target functional modules, the task priority, the task energy consumption level, and the target task execution duration, a power allocation strategy for the artificial intelligence agent is generated. The power distribution strategy is executed to control the power supply to the artificial intelligence agent.
2. The control method for an artificial intelligence agent according to claim 1, characterized in that, The step of determining at least one task to be executed based on the user input command, the user interaction data, the historical task data, and the environmental data specifically includes: The user input instructions are subjected to feature extraction to obtain a task text feature vector; The task text feature vector is input into a preset task classification model, and the task text feature vector is classified by the preset task classification model to determine at least one user interaction task corresponding to the user input command. Sentiment calculation and intent recognition are performed on the task text feature vector and the user interaction data to generate user state data, wherein the user state data includes user emotional state and user interaction intent; Based on the at least one user interaction task, the user status data, and the historical task data, determine whether there are potential interaction tasks; If potential interaction tasks exist, at least one user interaction task and potential interaction tasks will be combined into at least one task to be executed; If no potential interaction task exists, at least one user interaction task will be treated as at least one task to be executed.
3. The control method for an artificial intelligence agent according to claim 2, characterized in that, The step of performing sentiment analysis and intent recognition on the task text feature vector and the user interaction data to generate user state data specifically includes: Data types for obtaining user interaction data; By using preset feature extraction rules corresponding to the data type, feature extraction is performed on the user interaction data to obtain the feature vector of the user interaction data; The feature vector and the task text feature vector are input into the multimodal fusion model to obtain the fused feature vector; The fused feature vector is input into a preset state classification model, and the fused feature vector is classified and calculated by the preset state classification model to obtain the user's emotional state and the user's interaction intention.
4. The control method for an artificial intelligence agent according to claim 2, characterized in that, The step of determining whether a potential interaction task exists based on the at least one user interaction task, the user status data, and the historical task data specifically includes: Based on the preset mapping relationship between emotion type and supplementary task, determine whether there is a corresponding supplementary task for the user's emotional state; If there is a corresponding supplementary task for the user's emotional state, match the supplementary task with at least one user interaction task and determine whether the supplementary task is included in at least one user interaction task. If no supplementary task is included in at least one user interaction task, the supplementary task will be treated as a potential interaction task. Match user status data, at least one user interaction task, and historical task data to determine whether there are any historical task events in the historical task data that contain user status data and at least one user interaction task. If the historical task data contains a historical task event that includes user status data and at least one user interaction task, obtain at least one historical task from the historical task event and determine whether at least one historical task is completely identical to at least one user interaction task. If at least one historical task is not exactly the same as at least one user interaction task, the different historical tasks will be treated as potential interaction tasks.
5. The control method for an artificial intelligence agent according to claim 1, characterized in that, The step of adjusting multiple candidate functional modules for each task to be executed based on the environmental data, and determining multiple target functional modules for each task to be executed, specifically includes: For any task to be executed, based on the preset mapping relationship between environmental data and functional modules, it is determined whether the multiple candidate functional modules include the functional module corresponding to the environmental data, wherein the environmental data includes at least one of the following: network connection quality data and cloud service response latency data; When the candidate functional modules include a functional module corresponding to environmental data, the environmental data is compared with a preset environmental threshold to determine whether the environmental data meets the preset environmental conditions. If the environmental data does not meet the preset environmental conditions, the functional modules corresponding to the environmental data are replaced based on the preset mapping relationship between the environmental data and the replacement modules, resulting in multiple target functional modules for the task to be executed.
6. The control method for an artificial intelligence agent according to claim 1, characterized in that, The step of determining the task priority, task energy consumption level, and target task execution duration of each task to be executed based on the multiple target functional modules, task types, and historical task data specifically includes: The task priority of each task to be executed is determined based on a preset mapping relationship between task type and task priority. Based on the preset mapping relationship between functional modules and power consumption values, the target power consumption value of each target functional module is determined; Based on the preset mapping relationship between task type and preset task execution duration, the preset task execution duration of each task to be executed is determined; Determine whether the historical task data contains the tasks to be executed; If the historical task data contains tasks to be executed, determine the historical task execution duration of each task to be executed in the historical task data based on the task type. Based on the preset task execution duration and the historical task execution duration, the target task execution duration for each task to be executed is determined; Based on the number of modules of multiple target functional modules, multiple target power consumption values, and target task execution time, the task energy consumption level of each task to be executed is determined.
7. The control method for an artificial intelligence agent according to claim 1, characterized in that, The step of generating a power allocation strategy for the artificial intelligence agent based on the multiple target functional modules, the task priority, the task energy consumption level, and the target task execution duration specifically includes: Based on the task priorities, the power supply priorities of each target functional module are determined; Based on the preset mapping relationship between task energy consumption level and power supply level, the power supply level of each target functional module is determined; Based on the preset mapping relationship between power supply level and preset power supply range, the power supply range of each target functional module is determined; Based on the power supply range of each target functional module, a power supply adjustment command is generated; Based on multiple target functional modules and the remaining functional modules of the artificial intelligence entity other than the target functional modules, a sleep / wake-up command is generated. The power allocation strategy is generated based on the power supply priority, the power supply adjustment command, and the sleep / wake-up command.
8. A control device for an artificial intelligence agent, characterized in that, include: The acquisition module is used to acquire user input commands, user interaction data, historical task data, and environmental data, wherein the user interaction data includes at least one of the following: user voice data, user facial expression data, and user body data. The first determining module is used to determine at least one task to be executed based on the user input instruction, the user interaction data, the historical task data, and the environmental data. The second determining module is used to determine multiple candidate functional modules for each task to be executed based on a preset mapping relationship between tasks and functional modules. The third determining module is used to adjust multiple candidate functional modules of each task to be executed based on the environmental data, and to determine multiple target functional modules of each task to be executed. The fourth determining module is used to determine the task priority, task energy consumption level and target task execution time of each task to be executed based on the multiple target functional modules, task type and historical task data of each task to be executed; The generation module is used to generate a power allocation strategy for the artificial intelligence agent based on the multiple target functional modules, the task priority, the task energy consumption level, and the target task execution duration. The control module is used to execute the power distribution strategy and control the power supply to the artificial intelligence agent.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the control method for the artificial intelligence agent as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the control method for the artificial intelligence agent as described in any one of claims 1 to 7.