Companion robot autonomous task planning method and device

CN123014452APending Publication Date: 2026-10-30SHENZHEN ZHIBAN BETA TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610982727.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-02
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0004]本发明提供一种陪伴机器人自主任务规划方法及装置,用以解决现有技术中技能扩展性差、缺乏场景理解以及缺乏多步规划能力至少之一的技术问题

Benefits of technology

[0015]本发明提供的陪伴机器人自主任务规划方法及装置,通过将目标任务的上下文数据输入场景识别模型,得到所述场景识别模型基于生活场景图谱识别的所述目标任务对应的目标场景模式;基于所述目标场景模式对应的场景模式模板对所述目标任务进行任务分解并排序,得到各子任务及各子任务的执行顺序和依赖关系;为各子任务匹配所需资源,并基于所述执行顺序、依赖关系和预设的约束条件生成执行计划,由于生活场景图谱将老年人的生活环境知识系统化、结构化,为智能规划提供了知识基础,基于场景模式的任务分解,增强了对场景的理解,使复杂任务的自动分解成为可能,无需为每种任务单独编程,技能扩展性较好,且具有多步规划能力,从而显著提升了复杂任务的自主完成率,提高了异常恢复成功率,并大幅降低了老年人需要手动干预任务执行的次数。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123014452A_ABST
    Figure CN123014452A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of artificial intelligence, and provides a companion robot autonomous task planning method and device, which comprises the following steps: inputting context data of a target task into a scene recognition model to obtain a target scene mode corresponding to the target task recognized by the scene recognition model based on a life scene graph, wherein the life scene graph comprises entity nodes, relationship edges and scene modes, the context data is graph structure data comprising user position semantic features, user state and behavior features, time context features and task semantic features; performing task decomposition and sorting on the target task based on a scene mode template corresponding to the target scene mode to obtain each subtask and an execution sequence and a dependency relationship of each subtask; matching required resources for each subtask, and generating an execution plan based on the execution sequence, the dependency relationship and preset constraint conditions. The method has good skill expandability, scene understanding capability and multi-step planning capability.
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 method and apparatus for autonomous task planning for companion robots. Background Technology

[0002] The current service robot task planning and execution mainly rely on the following solutions: Set up a predefined skill library, which means that developers write fixed skill scripts in advance and trigger and execute the skill scripts through voice commands; If-Then automation rules are rules that require manual configuration of trigger conditions and actions. Single-round instruction execution based on the Large Language Model (LLM) involves receiving natural language instructions, parsing them, and then calling the corresponding APIs to execute them.

[0003] The above solutions suffer from poor skill extensibility due to the use of predefined skill libraries, the lack of understanding of real-life scenarios in the If-Then automation rules, and the lack of multi-step planning capabilities in the task planning methods based on large language models, thus failing to meet the needs of the complex life scenarios of the elderly. Summary of the Invention

[0004] This invention provides a method and apparatus for autonomous task planning for companion robots, which addresses the technical problems in the prior art, such as poor skill scalability, lack of scene understanding, and lack of multi-step planning capabilities.

[0005] This invention provides an autonomous task planning method for companion robots, comprising the following steps: The context data of the target task is input into the scene recognition model to obtain the target scene pattern corresponding to the target task based on the life scene graph. The life scene graph includes entity nodes, relationship edges and scene patterns. The context data is graph structure data composed of user location semantic features, user state and behavior features, time context features and task semantic features. Based on the scene pattern template corresponding to the target scene pattern, the target task is decomposed and sorted to obtain each sub-task and the execution order and dependency relationship of each sub-task. Match the required resources to each subtask, and generate an execution plan based on the execution order, dependencies, and preset constraints; The scene recognition model is trained based on contextual data samples and corresponding scene pattern labels.

[0006] According to the autonomous task planning method for companion robots provided by the present invention, before inputting the context data of the target task into a scene recognition model to obtain the target scene pattern corresponding to the target task identified by the scene recognition model based on a life scene map, the method further includes: Continuously collect environmental perception data and user behavior data of the companion robot; The life scenario map is constructed based on the environmental perception data and user behavior data.

[0007] According to the present invention, an autonomous task planning method for a companion robot decomposes and sorts the target task based on a scene pattern template corresponding to the target scene pattern, obtaining each sub-task and the execution order and dependencies of each sub-task, including: Analyze the scene mode template corresponding to the target scene mode; Based on the analysis results, the target task is decomposed into multiple subtasks, and the execution order and dependencies of each subtask are obtained.

[0008] According to the present invention, an autonomous task planning method for a companion robot matches the required resources for each sub-task and generates an execution plan based on the execution order, dependencies, and preset constraints, including: Match the required APIs, device control commands, and / or human intervention resources for each subtask; Verify the time constraints, space constraints, and capability constraints of each sub-task; After the constraint verification is passed, an execution plan is generated based on the execution order and dependencies.

[0009] The autonomous task planning method for a companion robot provided by the present invention further includes: While executing each subtask according to the execution plan, the status of each subtask is monitored in real time; In the event of deviations or anomalies in the states of each subtask, a dynamic replanning mechanism is triggered.

[0010] The autonomous task planning method for a companion robot provided by the present invention further includes: executing each sub-task according to the execution plan, and updating the life scene map based on the task execution results after the task execution is completed.

[0011] According to the autonomous task planning method for companion robots provided by the present invention, the training method of the scene recognition model is as follows: The context data sample is input into the scene recognition model to obtain the scene pattern prediction value output by the scene recognition model; Substitute the scene pattern predictions and scene pattern labels into the loss function. When the loss function converges, the model training is complete.

[0012] The present invention also provides an autonomous task planning device for a companion robot, comprising the following modules: The target scene pattern recognition module is used to input the context data of the target task into the scene recognition model to obtain the target scene pattern corresponding to the target task based on the life scene graph. The life scene graph includes entity nodes, relationship edges and scene patterns. The context data is graph structure data composed of user location semantic features, user state and behavior features, time context features and task semantic features. The task decomposition module is used to decompose and sort the target task based on the scene mode template corresponding to the target scene mode, so as to obtain each sub-task and the execution order and dependency relationship of each sub-task. The execution plan generation module is used to match the required resources for each subtask and generate an execution plan based on the execution order, dependencies and preset constraints. The scene recognition model is trained based on contextual data samples and corresponding scene pattern labels.

[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the program to implement the autonomous task planning method for companion robots as described above.

[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the autonomous task planning method for companion robots as described above.

[0015] The present invention provides a method and apparatus for autonomous task planning of companion robots. This method involves inputting the context data of the target task into a scene recognition model to obtain the target scene pattern corresponding to the target task, identified by the scene recognition model based on a life scene graph. The target task is then decomposed and sorted based on the scene pattern template corresponding to the target scene pattern, resulting in sub-tasks and their execution order and dependencies. Required resources are matched for each sub-task, and an execution plan is generated based on the execution order, dependencies, and preset constraints. Because the life scene graph systematizes and structures the elderly's knowledge of their living environment, it provides a knowledge base for intelligent planning. Task decomposition based on scene patterns enhances the understanding of the scene, making the automatic decomposition of complex tasks possible. It eliminates the need for separate programming for each task, offers good skill scalability, and has multi-step planning capabilities, thereby significantly improving the autonomous completion rate of complex tasks, increasing the success rate of anomaly recovery, and greatly reducing the number of times the elderly need to manually intervene in task execution. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0017] Figure 1 This is a flowchart illustrating the autonomous task planning method for companion robots provided by the present invention.

[0018] Figure 2 This is a schematic diagram of the autonomous task planning device for companion robots provided by the present invention.

[0019] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0021] Existing service robot task planning and execution solutions have significant shortcomings when facing complex life scenarios for the elderly: poor skill scalability, requiring developers to recode each new skill, failing to cover the rich and varied needs of the elderly; lack of scenario understanding, the system does not understand complex scenario contexts, such as "rainy day + elderly with arthritis + preparing to go out" which requires multiple related actions, and existing task planning systems cannot automatically connect them; lack of multi-step planning capabilities, unable to autonomously decompose complex tasks, such as "preparing to go to the hospital for a check-up tomorrow" which involves multiple steps such as appointment confirmation, route planning, medication list, and advance reminders; and lack of exception handling and dynamic adjustment capabilities, existing planning systems cannot autonomously adjust their execution plans when unexpected events occur during execution (such as: a booked taxi being canceled).

[0022] To address one of the aforementioned technical problems in the prior art, embodiments of the present invention provide an autonomous task planning method for companion robots. The executing entity of this method can be a companion robot, specifically its main control unit. The specific process is as follows: Figure 1 As shown, the process includes the following steps S110 to S130: Step S110: Input the context data of the target task into the scene recognition model to obtain the target scene pattern corresponding to the target task identified by the scene recognition model based on the life scene map.

[0023] The life scenario graph includes entity nodes, relationship edges, and scenario patterns. Entity nodes are the basic atoms that constitute a scenario. Relationship edges are used to connect scattered entities into a rule network, defining when, under what conditions, or how entities are associated. Scenario patterns are fixed business process paradigms summarized and extracted from the knowledge graph network composed of entity nodes and relationship edges.

[0024] For example, entity nodes include entities such as people (users, family members, doctors), locations (various areas of home, hospitals, supermarkets), items (medicines, walking aids, keys) and services (taxi, food delivery).

[0025] Relationships include: spatial relationships (e.g., medicines are in the second drawer of the bedside table), temporal relationships (e.g., a check-up is scheduled for the 15th of each month), dependency relationships (e.g., a walking aid is needed when going out), and user preference relationships (e.g., preferring route A).

[0026] Taking the medical treatment scenario as an example: the physical nodes include: the elderly, family members, doctors, hospitals, medicines, medical insurance cards, and taxi services; the relationship edges include: monthly check-up on the 15th, reliance on family members for outings, location of medicines, and preference for routes that do not carpool; the scenario mode is the standard medical treatment process: notification of family accompaniment → health self-test and collection of items → vehicle reservation and waiting for travel → medical treatment order record → return trip and home medication.

[0027] The contextual data for the target task is graph-structured data comprising user location semantic features, user state and behavioral features, temporal context features, and task semantic features. Specifically, user location semantic features are the user's home location, such as bedroom or living room, as indicated by a living scene map; user state and behavioral features represent the user's current behavioral state; and temporal context features represent the current time, periodic time, and scheduled time information. Task semantic features, user location semantic features, user state and behavioral features, and temporal context features can be obtained through semantic recognition of the target task, and can also be perceived by the companion robot through its environmental sensors when it receives the target task. For example, the companion robot can perceive the user's (elderly person's) location and behavior through a camera.

[0028] The scene recognition model is trained based on contextual data samples and corresponding scene pattern labels. Therefore, the trained scene recognition model can match known scene patterns from the life scene graph according to the contextual data corresponding to the current target task, obtain the scene pattern and its corresponding confidence level, and output the scene pattern with the highest confidence level as the target scene pattern.

[0029] For example, let's take the scenario where Grandpa Li gives a voice task to the companion robot: "Hey companion, I'm going to the community hospital for a follow-up hypertension check-up tomorrow (October 15th). Please make sure everything is arranged properly and nothing is forgotten." After receiving this voice task, the companion robot will extract the corresponding contextual data. The user location semantic features are Grandpa Li's location when he said this, and the target location is the community hospital. The user status and behavior features are Grandpa Li's current status and behavior (living alone, history of hypertension, mobility issues requiring family accompaniment). The time context feature is October 15th, and the task semantic feature is a follow-up hypertension check-up. Based on the contextual data of this task, the scene recognition model, combined with a life scene graph, will identify the target scene pattern corresponding to this task as a medical check-up scene pattern.

[0030] Step S120: Based on the scene mode template corresponding to the target scene mode, decompose and sort the target task to obtain each sub-task and the execution order and dependency relationship of each sub-task.

[0031] The scene pattern template is a structured template, consisting of the following four parts: 1. Standard subtask unit list, which records the standard subtasks contained in the corresponding scene mode; 2. The inherent execution order of subtasks; 3. Pre-dependencies between subtasks; 4. Built-in parameter rules, including the callable interface type, trigger conditions, and time offset rules for each subtask.

[0032] Taking a medical follow-up visit as an example, this scenario template is for a medical follow-up visit, and its content is as follows: 1) List of built-in standard subtask units: The list includes the following standard sub-tasks: family accompaniment notification, morning health self-test reminder, follow-up examination item collection reminder, travel vehicle reservation, travel waiting reminder, medical treatment order record, and return trip and home medication reminder.

[0033] 2) The inherent execution order of subtasks: family accompaniment notification → morning health self-test reminder → follow-up examination item collection reminder → travel vehicle reservation → travel waiting reminder → medical treatment order record → return trip and home medication reminder.

[0034] 3) Prerequisite dependencies between subtasks: Family accompaniment notification confirmation must be completed before subsequent item preparation and vehicle reservation can be triggered; You must complete the morning health self-test reminder and the reminder to collect items for follow-up examinations before you can execute the waiting and travel reminder.

[0035] 4) Built-in rule parameters: It has built-in offset duration parameters for each task, and supports automatically shifting the preset offset duration parameter forward according to the review time to generate the specific execution time point of each subtask.

[0036] Resource parameters are pre-bound for each standard subtask. These parameters include API interface resources, device control commands, and / or manual intervention resources that each subtask needs to call.

[0037] API interface resources include: family message push interface, voice reminder interface, and ride-hailing service interface; device control instructions are the control instructions of sub-tasks on the companion robot; human intervention resources refer to human resources and related communication resources that require the participation of external personnel and cannot be performed by the companion robot, including: family companion intervention resources (family contact channels, family member contact persons), family physical assistance resources (organizing items, accompanying travel and assisting with medical treatment, etc.), and, when necessary, human communication resources such as community grid workers, elderly care workers, and online doctors.

[0038] Step S130: Match the required resources for each subtask, and generate an execution plan based on the execution order, dependencies, and preset constraints. The required resources are those bound to each subtask in the scene mode template. Each subtask can only execute after the corresponding resources are configured.

[0039] The autonomous task planning method for companion robots in this embodiment involves inputting the context data of the target task into a scene recognition model to obtain the target scene pattern corresponding to the target task, which is identified by the scene recognition model based on a life scene graph. The target task is then decomposed and sorted based on the scene pattern template corresponding to the target scene pattern, resulting in sub-tasks and their execution order and dependencies. Required resources are matched for each sub-task, and an execution plan is generated based on the execution order, dependencies, and preset constraints. In this embodiment, because the life scene graph systematizes and structures the elderly's knowledge of their living environment, it provides a knowledge base for intelligent planning. Task decomposition based on scene patterns enhances the understanding of the scene, making the automatic decomposition of complex tasks possible. It eliminates the need for separate programming for each task, has good skill scalability, and possesses multi-step planning capabilities, thereby significantly improving the autonomous completion rate of complex tasks, increasing the success rate of anomaly recovery, and greatly reducing the number of times the elderly need to manually intervene in task execution.

[0040] In some embodiments, before step S110, which inputs the context data of the target task into the scene recognition model to obtain the target scene pattern corresponding to the target task identified by the scene recognition model based on the life scene map, the process of constructing a life scene map is further included, specifically including: The continuous collection of environmental perception data and user behavior data from companion robots can be understood as historical data from the lives of the elderly, which includes data on the aforementioned entities, relationship edges, and scene patterns.

[0041] The life scene graph is constructed based on the environmental perception data and user behavior data. Specifically, a knowledge graph network is first constructed based on entities and relation edges. The knowledge graph network can be constructed according to the construction logic of the knowledge graph. Then, on the basis of the knowledge graph network, candidate sub-task chains corresponding to different scene patterns are offline summarized and extracted, and solidified into scene pattern templates with inherent temporal sequence and resource binding relationship for use in scene recognition and task decomposition, and finally the life scene graph is obtained.

[0042] For example, scenario pattern templates corresponding to different scenario patterns can be summarized and extracted in the following way: extract the corresponding knowledge subgraphs according to the scenario type; perform frequent sequence or path mining on historical behavior or execution logs in the knowledge subgraphs to obtain candidate subtasks and their order; set the candidate subtasks according to the preset rule parameters in the historical behavior or execution logs to form a fixed business process paradigm; write the paradigm into the scenario pattern template library and manage the version, thereby summarizing and extracting scenario pattern templates.

[0043] In this embodiment, a life scene map is constructed in advance based on historical data of the elderly's lives. This is equivalent to providing a knowledge base for the scene recognition model, which helps the scene recognition model to more accurately identify the target scene pattern.

[0044] In some embodiments, step S120 involves decomposing and sorting the target task based on the scene mode template corresponding to the target scene mode to obtain each subtask and its execution order and dependencies, including: Step S121: Parse the scene mode template corresponding to the target scene mode. It can be understood that the companion robot has a preset mapping relationship between scene modes and their scene mode templates. The scene mode template corresponding to the target scene mode is obtained and parsed through this mapping relationship. Specifically, the parsing can be performed according to the four parts of the scene mode template mentioned above, obtaining the parsing results corresponding to the four parts.

[0045] Step S122: Based on the parsing results, decompose the target task into multiple subtasks and obtain the execution order and dependencies of each subtask. Specifically, the execution order and dependencies of each subtask can be obtained by parsing the inherent temporal execution order of the subtasks and the prerequisite dependencies between subtasks in the scene mode template.

[0046] Following the example above, in step S122, the target task is decomposed into seven subtasks using the context data of the target task and the parsing results described above, and these subtasks are executed in the order of subtask 1 to subtask 7: Subtask 1 (to be executed at 18:00 on October 14): Send a reminder (text + voice) to Grandpa Li's family via the family communication interface, informing them that "Grandpa Li needs to go to the community hospital for a follow-up examination of high blood pressure at 9:00 tomorrow (October 15), and you need to accompany him. Please arrange your time in advance," and confirm whether the family can accompany him on time.

[0047] Subtask 2 (to be executed at 7:30 on October 15): Remind Grandpa Li to measure his fasting blood pressure and record the blood pressure value (for the doctor's reference).

[0048] Subtask 3 (to be executed at 8:00 AM on October 15th): Remind Grandpa Li and his family via voice (and simultaneously send a text reminder) to inform them of the list of items needed for the follow-up visit (ID card, medical insurance card, hypertension medication, blood pressure record, walking aid), and remind the family to go to the corresponding location at Grandpa Li's home to collect the items and place them in a prominent position at the door for easy access.

[0049] Subtask 4 (to be executed at 8:40 on October 15): Call the taxi service, book a vehicle according to Grandpa Li's preferences (no carpooling, convenient route), and arrange to pick him up at the entrance of the community at 8:55.

[0050] Subtask 5 (to be executed at 8:50 AM on October 15th): Remind Grandpa Li and his family to bring all their belongings via voice message, inform them of the taxi reservation information (vehicle model, license plate number, and arrival time), and remind the family to accompany Grandpa Li to the entrance of the community to board the taxi.

[0051] Subtask 6 (executed during medical treatment): The robot will remind family members via voice to assist in recording the doctor's orders (such as medication adjustments and the next follow-up appointment). At the same time, the robot will record and save the orders via voice for easy reference later.

[0052] Subtask 7 (to be executed after the follow-up examination): Remind the family and Grandpa Li to bring their medicine and belongings via voice message, assist in calling a taxi for the return trip through the taxi interface, remind Grandpa Li to take his medicine on time after arriving home via voice message, and send feedback to the family that the follow-up examination has been completed.

[0053] In this embodiment, by parsing the scene pattern template, the subtasks that need to be executed to complete the target task, as well as their execution order and dependencies, can be obtained quickly and accurately.

[0054] In some embodiments, step S130, matching the required resources for each subtask and generating an execution plan based on the execution order, dependencies, and preset constraints, includes: Step S131: Match the required APIs, device control commands, and / or human intervention resources for each subtask. Specifically, after decomposing the subtasks, it is known what resources each subtask needs. For example, subtask 1 above requires communication interface API resources, so permission for communication interface API resources is matched for subtask 1; completing subtask 3 above requires family intervention, so human intervention resources are matched for subtask 3.

[0055] Device control commands can be categorized into explicit and implicit device control commands. Explicit device control commands refer to the robot's control commands determined during the task planning phase and directly issued by the main control module, such as waving, smiling, nodding, starting recording, accompanying movement, screen display, and control of associated smart devices. Implicit device control commands refer to facial expression and action feedback commands automatically generated based on the perception of the user's emotions or interaction state during voice interaction. For example, subtask 6 must match explicit sound pickup / recording and storage device control commands and can be combined with implicit attentive listening feedback strategies; subtasks 2, 3, 5, and 7 must match or optionally match explicit voice broadcasting, screen display, gesturing actions, and optional health / medication device control commands, and bind implicit emotional feedback strategies during periods of voice interaction.

[0056] Human intervention, as an independent type in the resource library, is represented in the user's life scenario knowledge graph as personnel entities and resource parameters that have a service relationship with the elderly. During matching, candidate personnel are screened based on the intervention type (confirmation, on-site assistance, accompaniment, collaborative recording, etc.) marked in the sub-tasks. Collaborative tasks are issued via the communication interface and receipts are collected. If necessary, backup personnel or degradation strategies are triggered. Sub-tasks 1, 3, 5, 6, and 7 all involve or can optionally involve matching human intervention resources.

[0057] It should be noted that not all subtasks need to be configured with all three types of resources at the same time. The matching is based on the needs of the subtask. Some subtasks only require API interfaces, such as ride-hailing reservations, which only require calling the API of the ride-hailing app. Some subtasks only require device control commands. Some subtasks must be configured with human intervention resources.

[0058] Step S132: Verify the time constraints, space constraints, and capability constraints for each subtask. Specifically, in the scenario pattern template, each standard subtask is pre-bound with a corresponding constraint type label (time, space, and capability).

[0059] Time constraints: Subtasks must be executed within the specified time, time window, and sequence; they cannot be executed ahead of schedule or behind schedule.

[0060] Spatial constraints: Subtasks are associated with fixed semantic locations, limited activity areas, item storage locations, and travel start and end points.

[0061] Capability constraints: Robot's own limitations: It cannot walk physically, cannot operate objects, can only provide information / interface / reminders, cannot tidy up items on its own, and cannot accompany others on walks; User capability constraints: The elderly person has limited mobility, cannot go out alone, must be accompanied by a family member, and cannot organize their belongings independently. User capability constraints are derived from the user's personal profile attributes. The scene mode template has built-in role capability constraints. For example, the time constraints, space constraints, and capability constraints here can be preset by the built-in parameter rules in Part 4 of the scene mode template and bound to each sub-task.

[0062] Step S133: After the constraint verification is passed, an execution plan is generated based on the execution order and dependencies. Specifically, this execution plan includes a timeline, milestones, and checkpoints for the execution of sub-tasks. The companion robot executes each sub-task based on this execution plan to complete the target task.

[0063] The timeline refers to the planned trigger time, executable time window, and sequential relationship of each subtask determined in the execution plan based on the inherent timing of the subtasks and the built-in parameter rules. This allows us to understand which subtask is executed at which time (segment).

[0064] Milestones are used to mark whether key results at the stage have been achieved, so as to advance subsequent sub-tasks or stages (multiple sub-tasks constitute a stage). That is, in the process of executing each sub-task according to the execution plan, milestones are used to determine the completion of sub-tasks or stage tasks so as to trigger the next sub-task or the next stage task.

[0065] Checkpoints are used to verify the process status during the execution of subtasks, in order to support real-time monitoring and timely detection of deviations and anomalies (such as vehicle delays, user discomfort, etc.), so as to ensure the reliable execution of subtasks.

[0066] It should be noted that for sub-tasks primarily performed by humans (e.g., tidying up and checking items), given the robot's limitations (lack of physical manipulation capabilities, etc.), completion judgment is mainly based on feedback from the matched human intervention resource and communication interface acknowledgments. For example, the companion robot receives a voice command from a human indicating the completion of the sub-task. Optionally, sensor or visual perception results can be used as auxiliary verification, but the robot's autonomous visual judgment is not the default or sole condition for completion.

[0067] In this embodiment, an execution plan containing timelines, milestones, and checkpoints for subtask execution is generated by the execution order and dependencies, ensuring that each subtask can be executed reliably in sequence.

[0068] In some embodiments, the companion robot autonomous task planning method further includes: While executing each subtask according to the execution plan, the status of each subtask is monitored in real time to detect whether there are any deviations or anomalies in the execution of the subtask. For example, deviations or anomalies include identifying sudden situations such as taxi delays, sudden weather changes, or user physical discomfort.

[0069] Specifically, deviations or anomalies in the execution of subtasks can be identified using the following four criteria: 1) Time dimension standard: Each subtask has a preset standard execution time, time window (execution duration of the subtask), and allowable fault tolerance time. If the actual execution time exceeds the preset time window or the timeout exceeds the allowable fault tolerance time, the time deviation is judged as abnormal. For example: the taxi is preset to arrive at 8:55. If it arrives 5 minutes late, the taxi is judged as abnormally late.

[0070] 2) Business Status Standards: Subtasks are pre-defined as having a normal completion status. If a task is not actually completed, fails to provide feedback, or is interrupted, it is considered an abnormal business deviation. For example, if a family member fails to confirm accompaniment within the specified time after being notified, the subtask is considered to have an abnormal execution. Another example is if a taxi order is canceled.

[0071] 3) External Environment Trigger Criteria: Acquire real-time external environment perception data and match it with the environmental information and relationships stored in the life scenario knowledge graph to determine whether deviation processing is triggered. For example, in a normal travel scenario, if a sudden downpour or strong wind occurs, it is determined that there is a weather change anomaly in the execution of the subtask.

[0072] 4) User status standard: Based on the premise that the user status and behavior are normal, if the user is physically unwell or their behavior deviates from the normal state in real time, it is determined that the user status deviation is abnormal when the subtask is executed.

[0073] When deviations or anomalies occur in the states of various subtasks, a dynamic replanning mechanism is triggered to search for alternative solutions within the constraint space. Specifically, major adjustments require user consent, while minor adjustments are executed autonomously and the user is notified. For example, if a taxi is late, another taxi can be called, a family member can be contacted for pick-up, or a rescheduling request can be made. It's understandable that dynamic replanning only needs to re-execute the affected subtasks based on the scope of the deviation or anomaly, while retaining the correctly executed subtasks, thus avoiding redundant planning and improving efficiency.

[0074] In this embodiment, a dynamic replanning mechanism is used to enable the companion robot to cope with the uncertainties of real life.

[0075] In some embodiments, the companion robot autonomous task planning method further includes: executing each sub-task according to the execution plan, and updating the life scene map based on the task execution results after the task execution is completed, thereby realizing incremental learning of the life scene map.

[0076] Specifically, the results of task execution can be represented by a structured execution log set, which includes the following types of structured information: Subtask execution status: success, failure, timeout, abnormal interruption, and whether it was completed after dynamic replanning.

[0077] Actual execution timing data: the actual execution time, duration, and time deviation of each subtask.

[0078] Resource call logs: API call records and device control command execution records, etc.

[0079] Deviation and user feedback data: types of deviations and anomalies that occur during execution, alternative solutions adopted in dynamic replanning, user voice feedback on preferences, and changes in behavioral habits.

[0080] For example, incremental learning includes: discovering new patterns (e.g., fewer people at Hospital B on Wednesday afternoons), learning from execution deviations (e.g., route A is under construction and requires a detour, so update route preferences), and learning from user feedback (e.g., don't go to the hospital so early, sit in a nearby park for a while, so add waiting preferences).

[0081] In this embodiment, incremental learning enables the life scenario map to continuously evolve, achieving the effect of understanding the user better the longer it is used.

[0082] In some embodiments, the scene recognition model may be a classification model based on a graph neural network (GNN) or a graph attention network (GAT).

[0083] The training method for this scene recognition model is as follows: The context data sample is input into the scene recognition model to obtain the scene pattern prediction value output by the scene recognition model.

[0084] The predicted scene patterns and scene pattern labels are substituted into the loss function. Model training is complete when the loss function converges. The scene pattern labels are manually pre-labeled scene types, and the cross-entropy loss function can be used.

[0085] The autonomous task planning device for companion robots provided by the present invention is described below. The autonomous task planning device for companion robots described below can be referred to in correspondence with the autonomous task planning method for companion robots described above.

[0086] The companion robot autonomous task planning device of this invention embodiment, such as Figure 2 As shown, it includes the following modules: The target scene pattern recognition module 210 is used to input the context data of the target task into the scene recognition model to obtain the target scene pattern corresponding to the target task based on the life scene graph recognized by the scene recognition model. The life scene graph includes entity nodes, relationship edges and scene patterns. The context data is graph structure data composed of user location semantic features, user state and behavior features, time context features and task semantic features.

[0087] The task decomposition module 220 is used to decompose and sort the target task based on the scene mode template corresponding to the target scene mode, so as to obtain each sub-task and the execution order and dependency relationship of each sub-task.

[0088] The execution plan generation module 230 is used to match the required resources for each subtask and generate an execution plan based on the execution order, dependencies and preset constraints.

[0089] The scene recognition model is trained based on contextual data samples and corresponding scene pattern labels.

[0090] The autonomous task planning device for the companion robot in this embodiment inputs the context data of the target task into a scene recognition model to obtain the target scene pattern corresponding to the target task based on the life scene map. Based on the scene pattern template corresponding to the target scene pattern, the device decomposes and sorts the target task to obtain each sub-task and its execution order and dependencies. It matches the required resources for each sub-task and generates an execution plan based on the execution order, dependencies, and preset constraints. Since the life scene map systematizes and structures the elderly's knowledge of their living environment, it provides a knowledge base for intelligent planning. Task decomposition based on scene patterns enhances the understanding of the scene, making the automatic decomposition of complex tasks possible. It eliminates the need for separate programming for each task, has good skill scalability, and possesses multi-step planning capabilities, thereby significantly improving the autonomous completion rate of complex tasks, increasing the success rate of anomaly recovery, and greatly reducing the number of times the elderly need to manually intervene in task execution.

[0091] In some embodiments, the companion robot autonomous task planning device is further configured to continuously collect environmental perception data and user behavior data of the companion robot before inputting the context data of the target task into the scene recognition model to obtain the target scene pattern corresponding to the target task identified by the scene recognition model based on the life scene map; and to construct the life scene map based on the environmental perception data and user behavior data.

[0092] In some embodiments, the task decomposition module 220 is specifically used to parse the scene mode template corresponding to the target scene mode; decompose the target task into multiple sub-tasks according to the parsing result, and obtain the execution order and dependency relationship of each sub-task.

[0093] In some embodiments, the execution plan generation module 230 is specifically used to match the required APIs, device control instructions and / or manual intervention resources for each subtask; to verify the time constraints, space constraints and capability constraints of each subtask; and to generate an execution plan based on the execution order and dependencies after the constraint verification is passed.

[0094] In some embodiments, the companion robot autonomous task planning device further includes: a task monitoring module, used to monitor the status of each sub-task in real time when executing each sub-task according to the execution plan; and to trigger a dynamic replanning mechanism when there are deviations or abnormalities in the status of each sub-task.

[0095] In some embodiments, the companion robot autonomous task planning device further includes a life scene map update module, which is used to execute each sub-task according to the execution plan and update the life scene map based on the task execution results after the task execution is completed.

[0096] In some embodiments, the scene recognition model is trained as follows: The context data sample is input into the scene recognition model to obtain the scene pattern prediction value output by the scene recognition model.

[0097] Substitute the scene pattern predictions and scene pattern labels into the loss function. When the loss function converges, the model training is complete.

[0098] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3 As shown, the electronic device may include: a processor 310, a communications interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communications interface 320, and the memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions in the memory 330 to execute an autonomous task planning method for the companion robot, which includes: The context data of the target task is input into the scene recognition model to obtain the target scene pattern corresponding to the target task based on the life scene graph. The life scene graph includes entity nodes, relationship edges and scene patterns. The context data is graph structure data composed of user location semantic features, user state and behavior features, time context features and task semantic features.

[0099] Based on the scene pattern template corresponding to the target scene pattern, the target task is decomposed and sorted to obtain each subtask and the execution order and dependencies of each subtask.

[0100] Match the required resources to each subtask, and generate an execution plan based on the execution order, dependencies, and preset constraints.

[0101] The scene recognition model is trained based on contextual data samples and corresponding scene pattern labels.

[0102] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0103] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program that can be stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, the computer is able to execute the autonomous task planning method for companion robots provided by the above methods, the method comprising: The context data of the target task is input into the scene recognition model to obtain the target scene pattern corresponding to the target task based on the life scene graph. The life scene graph includes entity nodes, relationship edges and scene patterns. The context data is graph structure data composed of user location semantic features, user state and behavior features, time context features and task semantic features.

[0104] Based on the scene pattern template corresponding to the target scene pattern, the target task is decomposed and sorted to obtain each subtask and the execution order and dependencies of each subtask.

[0105] Match the required resources to each subtask, and generate an execution plan based on the execution order, dependencies, and preset constraints.

[0106] The scene recognition model is trained based on contextual data samples and corresponding scene pattern labels.

[0107] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the autonomous task planning method for companion robots provided by the methods described above, the method comprising: The context data of the target task is input into the scene recognition model to obtain the target scene pattern corresponding to the target task based on the life scene graph. The life scene graph includes entity nodes, relationship edges and scene patterns. The context data is graph structure data composed of user location semantic features, user state and behavior features, time context features and task semantic features.

[0108] Based on the scene pattern template corresponding to the target scene pattern, the target task is decomposed and sorted to obtain each subtask and the execution order and dependencies of each subtask.

[0109] Match the required resources to each subtask, and generate an execution plan based on the execution order, dependencies, and preset constraints.

[0110] The scene recognition model is trained based on contextual data samples and corresponding scene pattern labels.

[0111] The device embodiments described above are merely illustrative. 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 modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0112] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0113] All actions involving the acquisition of signal information or data in this invention are carried out in compliance with the relevant data protection laws and policies of the country where the device is located, and with the authorization granted by the owner of the device.

[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; 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; and these 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.

Claims

1. A method for autonomous task planning for a companion robot, characterized in that, include: The context data of the target task is input into the scene recognition model to obtain the target scene pattern corresponding to the target task based on the life scene graph. The life scene graph includes entity nodes, relationship edges and scene patterns. The context data is graph structure data composed of user location semantic features, user state and behavior features, time context features and task semantic features. Based on the scene pattern template corresponding to the target scene pattern, the target task is decomposed and sorted to obtain each sub-task and the execution order and dependency relationship of each sub-task. Match the required resources to each subtask, and generate an execution plan based on the execution order, dependencies, and preset constraints; The scene recognition model is trained based on contextual data samples and corresponding scene pattern labels.

2. The autonomous task planning method for companion robots according to claim 1, characterized in that, Before inputting the context data of the target task into the scene recognition model to obtain the target scene pattern corresponding to the target task identified by the scene recognition model based on the life scene map, the method further includes: Continuously collect environmental perception data and user behavior data of the companion robot; The life scenario map is constructed based on the environmental perception data and user behavior data.

3. The autonomous task planning method for companion robots according to claim 1, characterized in that, Based on the scene pattern template corresponding to the target scene pattern, the target task is decomposed and sorted to obtain each subtask and its execution order and dependencies, including: Analyze the scene mode template corresponding to the target scene mode; Based on the analysis results, the target task is decomposed into multiple subtasks, and the execution order and dependencies of each subtask are obtained.

4. The autonomous task planning method for companion robots according to claim 1, characterized in that, Matching the required resources to each subtask and generating an execution plan based on the execution order, dependencies, and preset constraints, including: Match the required APIs, device control commands, and / or human intervention resources for each subtask; Verify the time constraints, space constraints, and capability constraints of each sub-task; After the constraint verification is passed, an execution plan is generated based on the execution order and dependencies.

5. The autonomous task planning method for companion robots according to claim 1, characterized in that, Also includes: While executing each subtask according to the execution plan, the status of each subtask is monitored in real time; In the event of deviations or anomalies in the states of each subtask, a dynamic replanning mechanism is triggered.

6. The autonomous task planning method for companion robots according to claim 1, characterized in that, Also includes: Each sub-task is executed according to the execution plan. After the task is completed, the life scene map is updated based on the task execution results.

7. The autonomous task planning method for a companion robot according to any one of claims 1 to 6, characterized in that, The scene recognition model is trained as follows: The context data sample is input into the scene recognition model to obtain the scene pattern prediction value output by the scene recognition model; Substitute the scene pattern predictions and scene pattern labels into the loss function. When the loss function converges, the model training is complete.

8. An autonomous task planning device for a companion robot, characterized in that, include: The target scene pattern recognition module is used to input the context data of the target task into the scene recognition model to obtain the target scene pattern corresponding to the target task based on the life scene graph. The life scene graph includes entity nodes, relationship edges and scene patterns. The context data is graph structure data composed of user location semantic features, user state and behavior features, time context features and task semantic features. The task decomposition module is used to decompose and sort the target task based on the scene mode template corresponding to the target scene mode, so as to obtain each sub-task and the execution order and dependency relationship of each sub-task. The execution plan generation module is used to match the required resources for each subtask and generate an execution plan based on the execution order, dependencies and preset constraints. The scene recognition model is trained based on contextual data samples and corresponding scene pattern labels.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the autonomous task planning method for companion robots as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the autonomous task planning method for companion robots as described in any one of claims 1 to 7.