# US 2025/0156655 A1 · Method for generating file, electronic device and storage medium

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

- Number: US 2025/0156655 A1
- Document ID: US20250156655A1
- Status: Published application
- Kind: A1
- Application number: 19/020,179
- Filed: 2025-01-14
- Published: 2025-05-15
- Earliest claimed: 2024-07-12
- Assignees: Baidu International Technology (Shenzhen) Co., Ltd.
- Applicants: Baidu International Technology (Shenzhen) Co., Ltd.
- Inventors: Chao Huang; Gang Qiao; Zhenpeng Zhan
- Web page: https://patentgrep.com/patent/US20250156655A1

## CPC

- G06F 40/40: Processing or translation of natural language (natural language analysis G06F40/20; semantic analysis G06F40/30)
- G06F 16/90332: {Natural language query formulation or dialogue systems}
- G06F 40/56: Natural language generation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for generating a file, an electronic device, and a storage medium are disclosed. The method includes inputting M1 first-type files into a first model, and outputting second-type files corresponding to the respective first-type files from the first model; determining a plurality of file pairs according to an output result, wherein each file pair includes a first-type file and a second-type file corresponding to the first-type file; adjusting a second model by using the plurality of file pairs; and inputting M2 first-type files into an adjusted second model, and outputting the second-type files corresponding to the respective first-type files from the adjusted second model, wherein M1 and M2 are positive integers.

## Claims

### Claim 1

A method for generating a file, comprising:
inputting M1 first-type files into a first model, and outputting second-type files corresponding to the respective first-type files from the first model;
determining a plurality of file pairs according to an output result, wherein each file pair comprises a first-type file and a second-type file corresponding to the first-type file;
adjusting a second model by using the plurality of file pairs; and
inputting M2 first-type files into an adjusted second model, and outputting the second-type files corresponding to the respective first-type files from the adjusted second model, wherein M1 and M2 are positive integers.

### Claim 2 (depends on 1)

The method of claim 1, wherein M2 is greater than M1.

### Claim 3 (depends on 1)

The method of claim 1, wherein the M2 first-type files comprise a file to be secured.

### Claim 4 (depends on 1)

The method of claim 1, wherein the M1 first-type files comprise a chapter corpus and the second-type files comprise a dialogue corpus.

### Claim 5 (depends on 4)

The method of claim 4, wherein inputting the M1 first-type files into the first model, and outputting the second-type files corresponding to the respective first-type files from the first model comprises:
inputting the chapter corpus into the first model, and outputting a plurality of dialogue questions associated with the chapter corpus from the first model; and
outputting, from the first model, a corresponding dialogue corpus based on the chapter corpus and the plurality of dialogue questions, wherein the dialogue corpus comprises the plurality of dialogue questions and answers to the dialogue questions.

### Claim 6 (depends on 4)

The method of claim 4, wherein inputting the M1 first-type files into the first model comprises:
generating a prompt for each chapter corpus and inputting the prompt into the first model,
wherein the prompt carries a content of the chapter corpus and identity characteristics of dialogue participants; and the identity characteristics of the dialogue participants are configured to enable the first model to output a dialogue corpus that satisfies the identity characteristics of the dialogue participants.

### Claim 7 (depends on 6)

The method of claim 6, wherein inputting the prompt into the first model comprises:
optimizing the prompt by adopting a prompt optimization method; and
inputting an optimized prompt into the first model.

### Claim 8 (depends on 6)

The method of claim 6, wherein the chapter corpus has a predefined expression style.

### Claim 9 (depends on 8)

The method of claim 8, wherein determining the plurality of file pairs according to the output result comprises:
removing any dialogue corpus which does not conform to the predefined expression style, and removing any dialogue corpus which is inconsistent with the identity characteristics of the dialogue participants from an output result of the first model to obtain a remaining output result; and
determining the plurality of file pairs according to the remaining output result.

### Claim 10

An electronic device, comprising:
at least one processor; and
a memory connected in communication with the at least one processor,
wherein the memory stores an instruction executable by the at least one processor, and the instruction, when executed by the at least one processor, enables the at least one processor to execute:
inputting M1 first-type files into a first model and outputting second-type files corresponding to the respective first-type files from the first model;
determining a plurality of file pairs according to an output result, wherein each file pair comprises a first-type file and a second-type file corresponding to the first-type file;
adjusting a second model by using the plurality of file pairs; and
inputting M2 first-type files into an adjusted second model and outputting the second-type files corresponding to the respective first-type files from the adjusted second model, wherein M1 and M2 are positive integers.

### Claim 11 (depends on 10)

The electronic device of claim 10, wherein M2 is greater than M1.

### Claim 12 (depends on 10)

The electronic device of claim 10, wherein the M2 first-type files comprise a file to be secured.

### Claim 13 (depends on 10)

The electronic device of claim 10, wherein the M1 first-type files comprise a chapter corpus and the second-type files comprise a dialogue corpus.

### Claim 14 (depends on 13)

The electronic device of claim 13, wherein the instruction, when executed by the at least one processor, enables the at least one processor to execute inputting the M1 first-type files into the first model, and outputting the second-type files corresponding to the respective first-type files from the first model by:
inputting the chapter corpus into the first model, and outputting a plurality of dialogue questions related to the chapter corpus from the first model; and
outputting, from the first model, a corresponding dialogue corpus based on the chapter corpus and the plurality of dialogue questions, wherein the dialogue corpus comprises the plurality of dialogue questions and answers to the dialogue questions.

### Claim 15 (depends on 13)

The electronic device of claim 13, wherein the instruction, when executed by the at least one processor, enables the at least one processor to execute inputting the M1 first-type files into the first model by:
generating a prompt for each chapter corpus and inputting the prompt into the first model,
wherein the prompt carries a content of the chapter corpus and identity characteristics of dialogue participants; and the identity characteristics of the dialogue participants are used to enable the first model to output a dialogue corpus that satisfies the identity characteristics of the dialogue participants.

### Claim 16

A non-transitory computer readable storage medium storing a computer instruction wherein the computer instruction causes a computer to perform:
inputting M1 first-type files into a first model and outputting second-type files corresponding to the respective first-type files from the first model;
determining a plurality of file pairs according to an output result, wherein each file pair comprises a first-type file and a second-type file corresponding to the first-type file;
adjusting a second model by using the plurality of file pairs; and
inputting M2 first-type files into an adjusted second model and outputting the second-type files corresponding to the respective first-type files from the adjusted second model, wherein M1 and M2 are positive integers.

### Claim 17 (depends on 16)

The non-transitory computer readable storage medium of claim 16, wherein M2 is greater than M1.

### Claim 18 (depends on 16)

The non-transitory computer readable storage medium of claim 16, wherein the M2 first-type files comprise a file to be secured.

### Claim 19 (depends on 16)

The non-transitory computer readable storage medium of claim 16, wherein the M1 first-type files comprise a chapter corpus and the second-type files comprise a dialogue corpus.

### Claim 20 (depends on 19)

The non-transitory computer readable storage medium of claim 19, wherein the computer instruction further causes the computer to perform inputting the M1 first-type files into the first model, and outputting the second-type files corresponding to the respective first-type files from the first model by:
inputting the chapter corpus into the first model, and outputting a plurality of dialogue questions related to the chapter corpus from the first model; and
outputting, from the first model, a corresponding dialogue corpus based on the chapter corpus and the plurality of dialogue questions, wherein the dialogue corpus comprises the plurality of dialogue questions and answers to the dialogue questions.
