# US 2026/0087385 A1 · Method for generating training data, and electronic device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0087385 A1
- Document ID: US20260087385A1
- Status: Published application
- Kind: A1
- Application number: 19/403,504
- Filed: 2025-11-28
- Published: 2026-03-26
- Earliest claimed: 2025-09-19
- Assignees: Beijing Baidu Netcom Science Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science Technology Co., Ltd.
- Inventors: Le Zhang; Yu Shi; Jingbo Zhou
- Web page: https://patentgrep.com/patent/US20260087385A1

## CPC

- G06N 5/04: Inference or reasoning models
- G06F 3/0481: based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
- G06F 3/04845: for image manipulation, e.g. dragging, rotation, expansion or change of colour
- G06N 20/00: Machine learning
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for generating training data is performed by an electronic device, including: obtaining interaction data with an application, determining a state transition image based on the interaction data, generating a plurality of pieces of trajectory data based on the state transition image, obtaining reasoning reference information corresponding to the operation data in the trajectory data output by a multimodal model, by inputting the trajectory data into the multimodal model, and generating training data for training an interaction agent model based on the trajectory data and the reasoning reference information corresponding to the operation data in the trajectory data.

## Claims

### Claim 1

A method for generating training data, comprising:
obtaining interaction data with an application, wherein the interaction data comprises a plurality of pieces of operation data, a pre-operation user interface image corresponding to each piece of operation data, and a post-operation user interface image corresponding to each piece of operation data;
determining a state transition image based on the interaction data, wherein a node in the state transition image is the user interface image, and a connecting edge between every two user interface images is operation data associated with the two user interface images;
generating a plurality of pieces of trajectory data based on the state transition image, wherein each piece of trajectory data indicates a trajectory image and an operation data sequence corresponding to a task;
obtaining reasoning reference information corresponding to the operation data in the trajectory data output by a multimodal model, by inputting the trajectory data into the multimodal model, wherein the reasoning reference information describes a reasoning process for the operation data; and
generating training data for training an interaction agent model based on the trajectory data and the reasoning reference information corresponding to the operation data in the trajectory data.

### Claim 2 (depends on 1)

The method according to claim 1, wherein obtaining the interaction data with the application comprises:
obtaining any user interface image of the application;
identifying the any user interface image, and determining a set of operable elements in the any user interface image; and
obtaining corresponding operation data and the post-operation user interface image by performing an operation on each operable element in the set of operable elements.

### Claim 3 (depends on 1)

The method according to claim 1, wherein after determining the state transition image, the method further comprises:
in a case that the state transition image comprises a cyclic path, determining a target task corresponding to the cyclic path;
determining a start user interface image and an end user interface image in the cyclic path based on the target task; and
obtaining an acyclic state transition image corresponding to the target task by disconnecting a connecting edge between the start user interface image and the end user interface image.

### Claim 4 (depends on 1)

The method according to claim 1, wherein generating the trajectory image comprises:
determining an operation object corresponding to the operation data based on operation data corresponding to each connecting edge in the state transition image;
obtaining a marked user interface image by marking the operation object in the pre-operation user interface image corresponding to the operation data; and
obtaining the trajectory image corresponding to the task by sequentially concatenating all marked user interface images corresponding to each task based on an operation sequence from front to back.

### Claim 5 (depends on 1)

The method according to claim 1, wherein after determining the state transition image, the method further comprises:
in a case that a number of nodes comprised in any branch in the state transition image is greater than a threshold, decomposing a task corresponding to the any branch into a plurality of subtasks; and
decomposing a state transition image corresponding to the any branch into a plurality of sub-state transition image branches based on the plurality of subtasks, wherein one sub-state transition image branch corresponds to one subtask.

### Claim 6 (depends on 5)

The method according to claim 5, wherein after decomposing the any branch into the plurality of sub-branches, the method further comprises:
determining a reference user interface image of each subtask;
in a case that a start user interface image corresponding to any subtask does not match the reference user interface image, determining a subtask in the state transition image, wherein the subtask corresponds to the end user interface image, matches the start user interface image of the any subtask and comprises a minimum number of nodes; and
obtaining a complete state transition image of the any subtask by performing concatenation and completion on the state transition image corresponding to the any subtask, based on the state transition image corresponding to the one subtask.

### Claim 7 (depends on 5)

The method according to claim 5, wherein decomposing the task corresponding to the any branch into the plurality of subtasks comprises at least one of:
obtaining a plurality of subtasks corresponding to the any branch, and a start user interface image and an end user interface image corresponding to each subtask output by a multimodal model, by inputting the trajectory image and the operation data sequence corresponding to the any branch into the multimodal model; or
determining a plurality of subtasks comprised in the task corresponding to the any branch based on a quantity of entities and/or operation data comprised in the task corresponding to the any branch.

### Claim 8 (depends on 1)

The method according to claim 1, wherein after generating the plurality of pieces of trajectory data, the method further comprises:
determining a similarity between any two pieces of trajectory data based on the trajectory images in the pieces of trajectory data; and
in a case that the similarity between any two pieces of trajectory data is greater than a similarity threshold, deleting one of the any two pieces of trajectory data from the plurality of pieces of trajectory data.

### Claim 9

An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor and storing instructions executable by the at least one processor;
wherein when the instructions are executed by the at least one processor, the at least one processor is caused to:
obtain interaction data with an application, wherein the interaction data comprises a plurality of pieces of operation data, a pre-operation user interface image corresponding to each piece of operation data, and a post-operation user interface image corresponding to each piece of operation data;
determine a state transition image based on the interaction data, wherein a node in the state transition image is the user interface image, and a connecting edge between every two user interface images is operation data associated with the two user interface images;
generate a plurality of pieces of trajectory data based on the state transition image, wherein each piece of trajectory data indicates a trajectory image and an operation data sequence corresponding to a task;
obtain reasoning reference information corresponding to the operation data in the trajectory data output by a multimodal model, by inputting the trajectory data into the multimodal model, wherein the reasoning reference information describes a reasoning process for the operation data; and
generate training data for training an interaction agent model based on the trajectory data and the reasoning reference information corresponding to the operation data in the trajectory data.

### Claim 10 (depends on 9)

The electronic device according to claim 9, wherein when the instructions are executed by the at least one processor, the at least one processor is caused to:
obtain any user interface image of the application;
identify the any user interface image, and determining a set of operable elements in the any user interface image; and
obtain corresponding operation data and the post-operation user interface image by performing an operation on each operable element in the set of operable elements.

### Claim 11 (depends on 9)

The electronic device according to claim 9, wherein when the instructions are executed by the at least one processor, the at least one processor is further caused to:
in a case that the state transition image comprises a cyclic path, determine a target task corresponding to the cyclic path;
determine a start user interface image and an end user interface image in the cyclic path based on the target task; and
obtain an acyclic state transition image corresponding to the target task by disconnecting a connecting edge between the start user interface image and the end user interface image.

### Claim 12 (depends on 9)

The electronic device according to claim 9, wherein when the instructions are executed by the at least one processor, the at least one processor is caused to:
determine an operation object corresponding to the operation data based on operation data corresponding to each connecting edge in the state transition image;
obtain a marked user interface image by marking the operation object in the pre-operation user interface image corresponding to the operation data; and
obtain the trajectory image corresponding to the task by sequentially concatenating all marked user interface images corresponding to each task based on an operation sequence from front to back.

### Claim 13 (depends on 9)

The electronic device according to claim 9, wherein when the instructions are executed by the at least one processor, the at least one processor is further caused to:
in a case that a number of nodes comprised in any branch in the state transition image is greater than a threshold, decompose a task corresponding to the any branch into a plurality of subtasks; and
decompose a state transition image corresponding to the any branch into a plurality of sub-state transition image branches based on the plurality of subtasks, wherein one sub-state transition image branch corresponds to one subtask.

### Claim 14 (depends on 13)

The electronic device according to claim 13, wherein when the instructions are executed by the at least one processor, the at least one processor is further caused to:
determine a reference user interface image of each subtask;
in a case that a start user interface image corresponding to any subtask does not match the reference user interface image, determine a subtask in the state transition image, wherein the subtask corresponds to the end user interface image, matches the start user interface image of the any subtask and comprises a minimum number of nodes; and
obtain a complete state transition image of the any subtask by performing concatenation and completion on the state transition image corresponding to the any subtask, based on the state transition image corresponding to the one subtask.

### Claim 15 (depends on 13)

The electronic device according to claim 13, wherein when the instructions are executed by the at least one processor, the at least one processor is caused to:
obtain a plurality of subtasks corresponding to the any branch, and a start user interface image and an end user interface image corresponding to each subtask output by a multimodal model, by inputting the trajectory image and the operation data sequence corresponding to the any branch into the multimodal model; or
determine a plurality of subtasks comprised in the task corresponding to the any branch based on a quantity of entities and/or operation data comprised in the task corresponding to the any branch.

### Claim 16 (depends on 9)

The electronic device according to claim 9, wherein when the instructions are executed by the at least one processor, the at least one processor is further caused to:
determine a similarity between any two pieces of trajectory data based on the trajectory images in the pieces of trajectory data; and
in a case that the similarity between any two pieces of trajectory data is greater than a similarity threshold, delete one of the any two pieces of trajectory data from the plurality of pieces of trajectory data.

### Claim 17

A non-transitory computer readable storage medium, storing computer instructions, wherein the computer instructions are configured to enable a computer to perform a method for generating training data, the method comprising:
obtaining interaction data with an application, wherein the interaction data comprises a plurality of pieces of operation data, a pre-operation user interface image corresponding to each piece of operation data, and a post-operation user interface image corresponding to each piece of operation data;
determining a state transition image based on the interaction data, wherein a node in the state transition image is the user interface image, and a connecting edge between every two user interface images is operation data associated with the two user interface images;
generating a plurality of pieces of trajectory data based on the state transition image, wherein each piece of trajectory data indicates a trajectory image and an operation data sequence corresponding to a task;
obtaining reasoning reference information corresponding to the operation data in the trajectory data output by the multimodal model, by inputting the trajectory data into a multimodal model, wherein the reasoning reference information describes a reasoning process for the operation data; and
generating training data for training an interaction agent model based on the trajectory data and the reasoning reference information corresponding to the operation data in the trajectory data.
