Methods, apparatus, electronic devices, and storage media for training large-scale models

The training method for large models using interaction samples and dialogue differences improves role-playing abilities by enhancing dialogue accuracy and reducing training costs and time.

JP7871433B2Active Publication Date: 2026-06-08BAIDU INT TECH (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
BAIDU INT TECH (SHENZHEN) CO LTD
Filing Date
2025-01-14
Publication Date
2026-06-08

AI Technical Summary

Technical Problem

Existing large models lack the ability to provide customizable, highly anthropomorphic, and emotionally rich role-playing capabilities, necessitating improved training methods.

Method used

A training method involving interaction samples with images and plots of characters, where an initial large model is trained based on the difference between predicted and sample dialogues to enhance its role-playing abilities.

Benefits of technology

The method enhances the role-playing capabilities of large models by improving dialogue accuracy and reducing training costs and time through controlled matching and self-loop learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007871433000001
    Figure 0007871433000001
  • Figure 0007871433000002
    Figure 0007871433000002
  • Figure 0007871433000003
    Figure 0007871433000003
Patent Text Reader

Abstract

To provide a training method and device for improving role-playing capability of a large model, an electronic device, and a storage medium.SOLUTION: A method includes: obtaining a dialogue sample including images of a plurality of characters, plots including the plurality of characters and multiple rounds of dialogues among the plurality of characters; for one of the multiple characters, inputting the images and plots of the multiple characters and historical dialogue statements corresponding to sample dialogue statements of one character in multiple rounds of dialogues into an initial large model to obtain predicted dialogue statements of the one character; and training the initial large model according to the difference between the predicted dialogue statement and the sample dialogue statement to obtain a target large model.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, particularly to the field of artificial intelligence such as large models and deep learning. Specifically, it relates to a training method, apparatus, electronic device, and storage medium for large models.

Background Art

[0002] The role-playing ability of large models is increasingly considered to be one of the important abilities of large models. For users, there is a need for customizable, highly anthropomorphic, emotional, and warm chatbots, which is the role-playing ability of large models. Therefore, how to improve the role-playing ability of large models is an urgent problem to be solved.

Summary of the Invention

[0003] This application provides a training method, apparatus, electronic device, and storage medium for large models.

[0004] According to one aspect of this application, a training method for a large model is provided, and the method includes: Obtaining an interaction sample, where the interaction sample includes images of a plurality of characters, a plot including the plurality of characters, and a plurality of rounds of interactions between the plurality of characters; Inputting a historical interaction sentence corresponding to a sample interaction sentence of any one of the plurality of characters in the images of the plurality of characters, the plot, and the plurality of rounds of interactions into an initial large model for any one of the plurality of characters, and obtaining a predicted interaction sentence of any one of the characters; Training the initial large model based on the difference between the predicted interaction sentence and the sample interaction sentence to obtain a target large model.

[0005] According to another aspect of the present application, a training device for large-scale models is provided, the device is, A first acquisition module for acquiring a dialogue sample, wherein the dialogue sample includes images of multiple characters, a plot containing the multiple characters, and multiple rounds of dialogue between the multiple characters. A second acquisition module for obtaining a predicted dialogue for any one of the aforementioned characters by inputting the images of the aforementioned characters, the plot, and the historical dialogue corresponding to the sample dialogue of any one of the aforementioned characters in the dialogue of the aforementioned multiple rounds into an initial large-scale model, The system includes a training module for training the initial large-scale model based on the difference between the predicted dialogue and the sample dialogue to obtain a target large-scale model.

[0006] According to another aspect of the present application, an electronic device is provided, the device is At least one processor, Includes memory that is communicably connected to at least one processor, The memory stores instructions that can be executed by the at least one processor, and when an instruction is executed by the at least one processor, the at least one processor is made to perform the method described in the above embodiment.

[0007] According to another aspect of the present application, a non-temporary computer-readable storage medium is provided which stores computer instructions, the computer instructions causing the computer to perform the method described in the above embodiment.

[0008] According to another aspect of the present application, a computer program is provided, and the steps of the method described in the above embodiment are realized when the computer program is executed by a processor.

[0009] Furthermore, the information described in this section is not intended to identify the essential or important features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will be more easily understood from the following specification. [Brief explanation of the drawing]

[0010] The drawings are provided to better understand this solution and do not limit the scope of this application. [Figure 1] This is a schematic flowchart of the training method for a large-scale model provided by one embodiment of the present invention. [Figure 2] This is a schematic flowchart of a training method for a large-scale model provided by another embodiment of the present invention. [Figure 3] This is a schematic flowchart of a training method for a large-scale model provided by another embodiment of the present invention. [Figure 4] This is a schematic flowchart of a training method for a large-scale model provided by another embodiment of the present invention. [Figure 5] This is a schematic diagram of the structure of a training device for large-scale models provided by one embodiment of the present invention. [Figure 6] This is a block diagram of an electronic device for a training method of a large-scale model to realize an embodiment of the present invention. [Modes for carrying out the invention]

[0011] The following description, in conjunction with the drawings, illustrates exemplary embodiments of the present application and includes various details of these embodiments for the sake of clarity; however, these should be considered merely illustrative. Therefore, those skilled in the art should be aware that various changes and modifications can be made to the described embodiments, provided they do not deviate from the scope and spirit of this application. Similarly, for clarity and brevity, well-known functions and structures are omitted from the following description.

[0012] The training method, apparatus, electronic devices, and storage media of a large-scale model of the embodiment of this application will be described below in conjunction with the drawings.

[0013] Figure 1 is a schematic flowchart of a training method for a large-scale model provided by one embodiment of the present invention.

[0014] The training method for the large-scale model of the embodiment of the present application can be performed by the training apparatus for the large-scale model of the embodiment of the present application, which may be configured as an electronic device.

[0015] An electronic device may be any device with computing capabilities, such as a personal computer, mobile terminal, or server. A mobile terminal may be a hardware device with various operating systems, touchscreens, and / or displays, such as an in-car device, mobile phone, tablet, personal digital assistant, or wearable device.

[0016] As shown in Figure 1, the training method for the large-scale model includes steps 101 to 103.

[0017] Step 101: Obtain a dialogue sample.

[0018] In this application, the dialogue sample may include, but is not limited to, images of multiple characters, a plot involving multiple characters, multiple rounds of dialogue between multiple characters, and the difficulty level of the dialogue sample.

[0019] Here, the difficulty level of the dialogue sample may be determined based on the difficulty levels of multiple rounds of dialogue. The higher the difficulty levels of the multiple rounds of dialogue, the higher the difficulty level of the dialogue sample. Here, the difficulty levels of the multiple rounds of dialogue may be used to represent the complexity of the language, the amount of information, the information level, etc. of the multiple rounds of dialogue. For example, the higher the complexity of the language of the multiple rounds of dialogue, the larger the amount of information, the higher the information level, etc., the higher the difficulty level of the multiple rounds of dialogue.

[0020] Exemplarily, the image of a character may include, but is not limited to, information such as the gender, age, personality, preferences, etc. of the character. Exemplarily, the attributes of the images of different characters participating in multiple rounds of dialogue may be the same or different. For example, the image of character A includes image attributes such as gender, age, personality, etc., and the image of character B includes image attributes such as gender, age, preferences, etc.

[0021] Exemplarily, the plot including multiple characters may be generated based on the images of multiple characters, may be cut from a movie drama, may be cut from a literary work, or may be obtained by other methods, and is not limited thereto.

[0022] Exemplarily, the obtained dialogue sample may be one or more, and is not limited thereto. For example, there are multiple dialogue samples. For example, dialogue sample 1 may include multiple rounds of dialogue between character A and character B, dialogue sample 2 may also include multiple rounds of dialogue between character A and character B, dialogue sample 3 includes multiple rounds of dialogue between character A and character C, dialogue sample 3 includes multiple rounds of dialogue between character B and character C, dialogue sample 3 includes multiple rounds of dialogue between character B and character D, dialogue sample 4 includes multiple rounds of dialogue between character a and character b, etc.

[0023] Step 102: For one of the multiple characters, the initial large-scale model is populated with images of the multiple characters, plots, and historical dialogue corresponding to sample dialogue of one of the characters in multiple rounds of dialogue, in order to obtain predicted dialogue for that one character.

[0024] The historical dialogue corresponding to a sample dialogue of any one character in a multi-round dialogue may refer to the dialogue preceding the sample dialogue of any one character in the multi-round dialogue. Here, the sample dialogue of any one character may be any one of the sample dialogues of any one character in the multi-round dialogue.

[0025] For example, a dialogue sample with multiple rounds includes the first sample dialogue for character A, the first sample dialogue for character B, the second sample dialogue for character A, the second sample dialogue for character B, the third sample dialogue for character A, and the third sample dialogue for character B. Taking character A as an example, the history dialogue corresponding to character A's first sample dialogue is empty, the history dialogue corresponding to character A's second sample dialogue includes character A's first sample dialogue and character B's first sample dialogue, and the history dialogue corresponding to character A's third sample dialogue includes character A's first sample dialogue, character B's first sample dialogue, character A's second sample dialogue, and character B's second sample dialogue.

[0026] In this invention, for any one of several characters, the images of the multiple characters, the plot, and the historical dialogue corresponding to the sample dialogue of any one of the characters in multiple rounds of dialogue are input into an initial large-scale model to predict the dialogue of that character and obtain the predicted dialogue of that character.

[0027] The number of predicted dialogue sentences for any one character may be the same as the number of sample dialogue sentences for that character in dialogue across multiple rounds.

[0028] For example, by calling the first large-scale model, it is possible to predict the dialogue of any one of several characters based on their images, plots, and historical dialogue, and obtain the predicted dialogue for that character.

[0029] Step 103: Based on the differences between the predicted dialogue and the sample dialogue, the initial large-scale model is trained to obtain the target large-scale model.

[0030] In this invention, for each predicted dialogue, a loss value is determined based on the difference between the predicted dialogue and the sample dialogue, and the parameters of the initial large-scale model are adjusted based on the loss value, thereby making the dialogue of the character output by the large-scale model more accurate.

[0031] For example, a multi-round dialogue sample for a given dialogue sample includes the first sample dialogue for character A, the first sample dialogue for character B, the second sample dialogue for character A, the second sample dialogue for character B, the third sample dialogue for character A, and the third sample dialogue for character B.

[0032] Taking the example of a training large-scale model that outputs dialogue for character B, the initial large-scale model can be input with images of character A, images of character B, a plot containing both characters A and B, and the first sample dialogue for character A. The first predicted dialogue for character B can then be obtained, and the initial large-scale model can be trained based on the difference between the first predicted dialogue for character B and the first sample dialogue for character B.

[0033] Subsequently, the image of character A, the image of character B, a plot containing both character A and character B, the first sample dialogue of character A, the first sample dialogue of character B, and the second sample dialogue of character A are input into a large-scale model after the parameters have been adjusted to obtain the second predicted dialogue of character B. Based on the difference between the second predicted dialogue of character B and the second sample dialogue of character B, the large-scale model can be further trained.

[0034] Subsequently, the image of character A, the image of character B, the plot containing both character A and character B, the first sample dialogue of character A, the first sample dialogue of character B, the second sample dialogue of character A, the second sample dialogue of character B, and the third sample dialogue of character A are input into a large-scale model after the parameters have been adjusted to obtain the third predicted dialogue of character B, and the model can continue to be trained based on the difference between the third predicted dialogue of character B and the third sample dialogue of character B.

[0035] Furthermore, the method for training a large-scale model to output dialogue for character A is the same as the method for training a large-scale model to output dialogue for character B, so a detailed explanation will be omitted here.

[0036] In this application, when training a large-scale model to output dialogue for a certain character, the large-scale model can be trained using dialogue samples that include an image of the character, an image of another character interacting with the character, a plot containing character B and the other character, and multiple rounds of dialogue between the character and the other character.

[0037] For example, by obtaining multiple dialogue samples, each containing many characters, and training a large-scale model to output dialogue sentences for these characters, a target large-scale model can be obtained. Here, multiple characters can be trained simultaneously, ultimately resulting in the acquisition of the target large-scale model.

[0038] After obtaining a target large-scale model, it is possible to obtain an image of a new character, perform the role of the character using the target large-scale model, and during the interaction between the user and the character, the target large-scale model can output dialogue for the character based on the character's image and the history of the user's interaction with the character.

[0039] In the embodiment of the present invention, for one of several characters, images of multiple characters and a plot containing multiple characters are input to an initial large-scale model to predict the dialogue of that character, obtain the predicted dialogue of that character, and train the initial large-scale model based on the difference between the predicted dialogue of that character and the corresponding sample dialogue to obtain a target large-scale model. This allows the large-scale model to be trained with the character dialogue output by the large-scale model for different characters, thereby improving the role-playing capability of the large-scale model. Furthermore, by controlling the degree of matching between the character and the predicted dialogue using a plot containing multiple characters, the accuracy of the predicted dialogue can be improved, trial-and-error costs can be reduced, and the model training speed can be improved.

[0040] Figure 2 is a schematic flowchart of a training method for a large-scale model provided by another embodiment of the present invention.

[0041] As shown in Figure 2, the training method for the large-scale model includes the following steps 201-206.

[0042] Step 201: Obtain images and plots of multiple characters.

[0043] One possible implementation is to first acquire images of multiple characters, and then call a second large-scale model to obtain a plot containing multiple characters based on those images. This allows for the acquisition of a plot based on images of multiple characters by using the second large-scale model, thereby improving the degree of matching between the plot and the characters.

[0044] For example, from images of multiple real characters, it is possible to determine the image of one or more of those characters.

[0045] For example, for one or more characters from a group of characters, the target image attribute can be determined from the candidate image attribute, the target attribute value of the target image attribute can be determined from the candidate attribute value of the target image attribute, and the character's image can be determined based on the target attribute value of the target image attribute. This allows the character's image to be obtained by enumerating combinations of attributes.

[0046] The target image attribute may be one or more, and one image attribute may have one or more candidate attribute values. For any one target image attribute, one candidate attribute value can be randomly selected from its candidate attribute values ​​to be used as the target attribute value.

[0047] For example, by acquiring a reference image and calling a third large-scale model, it is possible to obtain images of one or more characters from a group of characters based on the reference image. For example, by acquiring presentation information to indicate that the third large-scale model will generate a new image based on the reference image, and inputting this presentation information into the third large-scale model, it is possible to obtain images of characters. For example, this presentation information may include information such as the reference image and information specifying that images of several characters should be generated.

[0048] This ensures high quality and diversity of character images through a character image acquisition method based on multi-source mixing.

[0049] For example, presentation information can be obtained that indicates a second large-scale model will generate a plot based on images of multiple characters. This presentation information can then be input into the second large-scale model to create the plot and obtain a plot containing multiple characters. For example, this presentation information may include images of multiple characters and a character count requirement for the plot to be generated. For example, plots can be obtained by calling different second large-scale models, thereby ensuring variety in the plots.

[0050] Another possible implementation is to first generate a plot and then obtain character images based on that plot.

[0051] For example, by calling a second large-scale model, a plot can be obtained, and by calling a third large-scale model, images of multiple characters in the plot can be obtained based on the plot. This allows the second and third large-scale models to improve the degree of matching between the plot and the characters by obtaining images of the plot and multiple characters.

[0052] For example, presentation information indicating that a second large-scale model will perform a plot generation task can be obtained, and this presentation information can be input into the second large-scale model to create the plot. For example, by calling different third large-scale models for the same plot or different plots, multiple character images can be obtained, thereby increasing the diversity of character images.

[0053] For example, based on a plot, presentation information is obtained indicating that the third large-scale model will acquire images of characters in the plot based on the plot. This presentation information can then be input into the third large-scale model to acquire images of multiple characters in the plot.

[0054] For example, the system obtains the instruction "Generate a plot containing two characters," inputs this instruction into a second large-scale model, and retrieves the plot output by the second large-scale model. Then, it obtains the instruction "The plot is [xxx], and extract the images of the characters in the plot from the given plot," inputs this instruction into a third large-scale model, and retrieves the images of the two characters output by the third large-scale model.

[0055] For example, by obtaining an image of a target character from among multiple characters, calling a second large-scale model, a plot can be obtained based on the image of the target character, and then by calling a third large-scale model, images of the other characters among the multiple characters (excluding the target character) can be obtained based on the plot.

[0056] For example, presentation information can be obtained that indicates, based on an image of a target character, that a second large-scale model will generate a plot containing the target character and other characters based on the image of the target character. This presentation information can then be input into the second large-scale model to obtain a plot containing multiple characters.

[0057] For example, based on a target character and a plot generated based on the target character's image, a third large-scale model can obtain presentation information that suggests it will acquire images of other characters in the plot besides the target character, and this presentation information can be input into the third large-scale model to acquire images of the other characters.

[0058] For example, an image of character a is obtained, a second large model is called to obtain a plot based on the image of character a, the plot further includes character b, and a third large model is called to obtain an image of character b based on the plot.

[0059] This allows for the first plotting based on images of some of the multiple characters, and then retrieving images of the other characters in the plot based on the generated plot. This not only satisfies the user's personalized needs for character images and plots, but also enriches the methods for retrieving character images and plots.

[0060] Furthermore, the first, second, and third large-scale models may be the same or different, and are not limited to these.

[0061] Step 202: For any one of the multiple characters, generate a sample dialogue for that character during a dialogue between multiple characters, based on the images and plots of the multiple characters.

[0062] For example, based on the images, plots, and current history dialogues of multiple characters, a sample dialogue for any one of them can be obtained.

[0063] For example, during a conversation between character a and character b, the first sample dialogue for character a can be obtained based on the image of character a and the image of character b. Subsequently, the first sample dialogue for character b can be obtained based on the image of character a, the image of character b, and the first sample dialogue for character a. Then, the second sample dialogue for character a can be obtained based on the image of character a, the image of character b, the first sample dialogue for character a, and the first sample dialogue for character b. Finally, the second sample dialogue for character b can be obtained based on the image of character a, the image of character b, the first sample dialogue for character a, the first sample dialogue for character b, and the second sample dialogue for character a.

[0064] To increase the difficulty of the dialogue, a target round in which the difficulty of the dialogue should be increased is determined, and a target policy for increasing the difficulty of the dialogue corresponding to the target round is determined. During the dialogue of the target round, a candidate dialogue sentence for one character is obtained based on the images, plots, etc., of multiple characters. Furthermore, a sample dialogue sentence for that character can be generated using the target policy, based on the images, plots, candidate dialogue sentences, and historical dialogue sentences of the candidate dialogue sentences of multiple characters.

[0065] Here, the target round may be, for example, the first round or the last round, or any other round, and can be determined according to the actual needs.

[0066] For example, a target policy to increase the difficulty of a dialogue may be to increase the number of characters in the dialogue, to generate dialogue under a specific emotion, or to generate dialogue that uses rhetorical techniques such as metaphor.

[0067] Furthermore, target policies designed to increase the difficulty of the dialogue, corresponding to different target rounds, may vary.

[0068] For example, by calling the first large-scale model, sample dialogue for a character can be generated using a target policy, based on the images, plots, candidate dialogues, and historical dialogues of the candidate dialogues for multiple characters.

[0069] For example, in the second round of dialogue, the first large-scale model is called to obtain a dialogue from a certain character, but the number of characters in that dialogue is small, so the first large-scale model can be called again to generate a dialogue with a larger number of characters.

[0070] This allows us to use a target policy to increase the difficulty of the dialogue, and to re-obtain the dialogue of any one character obtained based on images and plots of multiple characters. This improves the difficulty of the character's dialogue and further improves the difficulty of the dialogue samples, which in turn allows us to train a large-scale model using the dialogue samples to improve the role-playing capabilities of the large-scale model.

[0071] To further improve the quality of the dialogue, as an example, the plot may first be validated, and if the plot passes validation, a sample dialogue for one of the characters may be obtained based on the images of multiple characters and the plot.

[0072] For example, verifying a plot can be understood as verifying its rationality, such as checking for loopholes or inconsistencies.

[0073] This allows for improving the quality of sample dialogue by generating character sample dialogue using the plot after it has passed validation, thereby further improving the quality of the dialogue samples.

[0074] Step 203: Based on sample dialogue texts of multiple characters in a multi-character dialogue, obtain multi-round dialogue between multiple characters.

[0075] In this invention, sample dialogue sentences of multiple characters are rearranged according to the order in which they appeared during the dialogue between multiple characters, thereby obtaining multiple rounds of dialogue between the multiple characters.

[0076] Step 204: Obtain a dialogue sample based on images of multiple characters, a plot, and multiple rounds of dialogue.

[0077] For example, the dialogue sample may include, but is not limited to, images of multiple characters, a plot, and multiple rounds of dialogue.

[0078] Step 205: For one of the multiple characters, the initial large-scale model is populated with images of the multiple characters, plots, and historical dialogue corresponding to sample dialogue of one of the characters in multiple rounds of dialogue, in order to obtain a predicted dialogue for that one character.

[0079] In this application, step 205 may be carried out using any one of the implementations in each embodiment of this application, so a detailed explanation is omitted here.

[0080] Step 206: Based on the differences between the predicted dialogue and the sample dialogue, the initial large-scale model is trained to obtain the target large-scale model.

[0081] In this application, step 206 may be carried out using any one of the embodiments of this application, and a detailed explanation is omitted here.

[0082] In the embodiments of the present invention, during a dialogue between multiple characters, sample dialogue sentences for multiple characters are generated based on acquired images of multiple characters and a plot containing multiple characters, thereby obtaining multiple rounds of dialogue between the multiple characters. This allows for controlling the matching between characters and multiple rounds of dialogue through the plot, improving the quality of the multiple rounds of dialogue, and further improving the quality of the dialogue samples. Therefore, by training a large-scale model based on high-quality dialogue samples, the quality of the dialogue sentences output by the large-scale model can be improved.

[0083] Figure 3 is a schematic flowchart of a method for training a large-scale model provided by another embodiment of the present invention.

[0084] As shown in Figure 3, the training method for the large-scale model includes the following steps 301 to 306.

[0085] Step 301: Obtain images and plots of multiple characters.

[0086] In this application, step 301 may be implemented using any one of the embodiments of this application, and a detailed explanation is omitted here.

[0087] Step 302: For any one of the multiple characters, during a multi-character dialogue, a first large model corresponding to that one character is invoked to obtain a sample dialogue for that one character based on the images and plots of the multiple characters.

[0088] Here, different characters correspond to different first large-scale models; that is, different characters may be portrayed by different first large-scale models.

[0089] For example, character a is portrayed by large-scale model m1, and character b is portrayed by large-scale model m2. Large-scale models m1 and m2 are two different large-scale models, and during a conversation between character a and character b, sample dialogue for character a can be generated by calling large-scale model m1, and sample dialogue for character b can be generated by calling large-scale model m2.

[0090] To enhance the anthropomorphism of character dialogue, as an example, by obtaining the language style of one character and calling a first large-scale model corresponding to that character, sample dialogue sentences for multiple characters can be obtained based on their images, plots, and language styles.

[0091] Here, language style may include the character's way of speaking and emotional information. For example, the way of speaking may include humor or seriousness, and emotional information may include joy, anger, rage, etc.

[0092] For example, presentation information can be obtained that indicates that a first large-scale model generates dialogue that satisfies the language style requirements of a character based on the images and plots of multiple characters, and this presentation information can be input into the first large-scale model to obtain a sample dialogue for that character. For example, this presentation information may include images and plots of multiple characters, the language style of each character, and may also include character count requirements for the sample dialogue.

[0093] This allows us to control the style and emotions of character dialogue through the character's language style, improve the personification of character dialogue, and enhance the quality of the dialogue.

[0094] Step 303: Based on sample dialogue texts of multiple characters in a multi-character dialogue, obtain multi-round dialogue between multiple characters.

[0095] In this application, step 303 may be implemented using any one of the embodiments of this application, and a detailed explanation is omitted here.

[0096] Step 304: Obtain a dialogue sample based on images of multiple characters, a plot, and multiple rounds of dialogue.

[0097] In this application, step 304 may be carried out using any one of the embodiments of this application, and a detailed explanation is omitted here.

[0098] Step 305: For one of the multiple characters, the initial large-scale model is populated with images of the multiple characters, plots, and historical dialogue corresponding to sample dialogue of one of the characters in multiple rounds of dialogue, in order to obtain a predicted dialogue for that one character.

[0099] In this application, step 305 may be carried out using any one of the embodiments of this application, and a detailed explanation is omitted here.

[0100] Step 306: Based on the differences between the predicted dialogue and the sample dialogue, the initial large-scale model is trained to obtain the target large-scale model.

[0101] In this application, step 306 may be carried out using any one of the embodiments of this application, and a detailed explanation is omitted here.

[0102] In the embodiments of this invention, different characters in multiple characters correspond to different first large models, and by calling the first large model corresponding to any one of the characters, a sample dialogue for any one of the characters is obtained. This allows different characters to be portrayed by different large models during a dialogue between multiple characters, and sample dialogue for the corresponding character is obtained, thus obtaining multiple rounds of dialogue through a hybrid chat method and improving the quality and diversity of the dialogue.

[0103] Figure 4 is a schematic flowchart of a method for training a large-scale model provided by another embodiment of the present invention.

[0104] As shown in Figure 4, the training method for the large-scale model includes the following steps 401 to 404.

[0105] Step 401: Obtain multiple dialogue samples.

[0106] In this application, step 401 may be implemented using any one of the embodiments of this application, and a detailed explanation is omitted here.

[0107] Step 402: Train the initial large-scale model using multiple dialogue samples in order of increasing difficulty to obtain the target large-scale model.

[0108] For example, the difficulty level of a dialogue sample can be determined based on the average number of characters in all sample dialogue sentences across multiple rounds of dialogue in the dialogue sample. For instance, a higher average character count indicates a more difficult dialogue sample.

[0109] For example, in the process of obtaining dialogues from multiple rounds, it may be determined whether the difficulty of the dialogues has increased. If the difficulty of the dialogues has increased, the difficulty of the dialogue samples may be determined based on the number of sample dialogue sentences with increased difficulty, or in combination with the priority of the target policy for increasing the difficulty of the dialogues to be adopted. Here, the higher the priority of the target policy, the higher the difficulty of the sample dialogue sentences obtained using that target policy.

[0110] Here, the more sample dialogue sentences there are that increase in the difficulty of the dialogue, the higher the difficulty of the dialogue samples, the higher the priority of the target policy to adopt, and the higher the difficulty of the dialogue samples.

[0111] For example, for sample dialogues with increased dialogue difficulty, the difficulty level of the dialogue sample can be obtained by weighting the priority of the target policy to be adopted.

[0112] The difficulty level of a dialogue sample may be determined after acquiring each dialogue sample, or it may be determined one by one after acquiring multiple dialogue samples; however, it is not limited to either method.

[0113] For example, an initial large-scale model can be trained using low-difficulty dialogue samples, and then the target large-scale model can be obtained by training it with high-difficulty dialogue samples.

[0114] For example, when training the dialogue of one of several characters output by a large-scale model, the predicted dialogue of one of the characters can be obtained for the current dialogue sample using the method of the above embodiment, and the initial large-scale model can be trained based on the difference between the predicted dialogue and the sample dialogue to obtain the first intermediate large-scale model. Subsequently, the first intermediate large-scale model can be trained using the next dialogue sample after the current dialogue sample to obtain the second intermediate large-scale model, where the difficulty of the current dialogue sample is smaller than the difficulty of the next dialogue sample. Subsequently, the second intermediate large-scale model is continued to be trained using the next dialogue sample after the next dialogue sample until the target large-scale model is obtained, where the difficulty of the next dialogue sample after the current dialogue sample is smaller than the difficulty of the next dialogue sample after the next dialogue sample.

[0115] By simultaneously training initial large-scale models on multiple characters using the above method, it is possible to ultimately obtain a single target large-scale model.

[0116] Step 403: Based on the dialogue sample, a new dialogue sample is obtained, and a sample dialogue statement for any one character in the new dialogue sample is obtained by calling the target large model.

[0117] For example, the sample dialogue for one character in a new dialogue sample is obtained by calling the target large-scale model, while the sample dialogue for the other characters among the multiple characters remains unchanged. In other words, the sample dialogue for that character in the dialogue sample can be replaced with the sample dialogue for that character obtained by calling the target large-scale model.

[0118] For example, images, plots, and current history dialogues of multiple characters can be input into a target large-scale model to obtain sample dialogues for those characters.

[0119] Step 404: Continue training the target large-scale model using new dialogue samples.

[0120] In this invention, the target large-scale model can be further trained using the newly obtained dialogue samples, and thus the role-playing ability of the large-scale model can be continuously improved through self-loop learning.

[0121] In the embodiment of the present invention, an initial large-scale model is trained using multiple dialogue samples in order of increasing difficulty to obtain a target large-scale model, and new dialogue samples are obtained using the target large-scale model, and the target large-scale model is further trained using the new dialogue samples. Thus, the model is trained by first learning easy dialogue samples and then learning difficult dialogue samples, and by combining this with self-loop learning. As a result, not only is the speed of model training improved, but the role-playing ability of the large-scale model can also be further improved.

[0122] To facilitate understanding of the large-scale model training method of this application, it will be described in conjunction with the following examples. The large-scale model training method of this application may include the following four parts.

[0123] 1. Character image generation section To ensure the diversity and quality of the generated character images, a character image generation method based on multi-source mixing may be used, which is a versatile and highly extensible method for generating character images.

[0124] For example, by obtaining character images based on real character images, creating fictional character images based on enumerated attribute combinations, or generating virtual character images based on reference images, the high quality and diversity of generated character images can be ensured through high-quality and diverse generation sources.

[0125] 2. Plot settings section The plot setting section exists to control the degree of matching between characters and their dialogue across multiple rounds. If the dialogue across multiple rounds is generated based solely on the character image section, a problem may arise where similar topics appear, resulting in low-quality dialogue.

[0126] The plotting section can utilize various large-scale models, creating plots based on input character images to ensure plot diversity. Simultaneously, methods to enhance the logical capabilities of large-scale model generation, such as RAG (Retrieval-augmented Generation) and ICL (In-context Learning), may be introduced to ensure the quality of the generated data. Furthermore, a discriminative model may be introduced to determine the logical consistency of the plots.

[0127] 3. Multi-round dialogue generation section Based on the output of the previous two parts, the generation of multiple rounds of dialogue can be completed. Using a mixed-model chat method, different large-scale models can play different characters, developing the dialogue content based on the plot, and controlling the dialogue style and emotion to minimize the influence of an "assistant feel" on the generated result. Furthermore, the difficulty of dialogue generation can also be controlled.

[0128] 4. Model training section The previous three parts allow us to obtain a high-quality role-playing dialogue dataset, which can then be used to perform supervised fine-tuning training on a large-scale model. For example, by categorizing the difficulty level of the dataset obtained in the previous step, we can start learning with relatively easy dialogue samples and gradually move to more difficult dialogue samples. After the model training is complete, we can replace the character dialogue sentences in the dialogue dataset with those of the trained model to perform reasoning and obtain new dialogue samples, thereby obtaining a new training set. We can then continue training the trained large-scale model using this new training set, performing self-loop learning.

[0129] To realize the above embodiment, the embodiment of the present application further provides a training device for large-scale models. Figure 5 is a schematic diagram of the structure of a training device for large-scale models provided by one embodiment of the present application.

[0130] As shown in Figure 5, the training device 500 for the large-scale model is A first acquisition module 510 for acquiring images of multiple characters, plots containing multiple characters, and dialogue samples including multiple rounds of dialogue between multiple characters, A second acquisition module 520 is used to obtain a predicted dialogue for one of several characters by inputting images, plots, and historical dialogue corresponding to sample dialogue for one of the characters in multiple rounds of dialogue into an initial large-scale model, for any one of several characters. This includes a training module 530 for training an initial large-scale model based on the difference between predicted dialogue and sample dialogue to obtain a target large-scale model.

[0131] Selectable, the first acquisition module 510 is, Obtain images and plots of multiple characters, For any one of several characters, during a dialogue between multiple characters, obtain a sample dialogue for that one character based on the images and plot of the multiple characters. Based on sample dialogue texts of multiple characters in a multi-character conversation, we obtain multi-round dialogue between multiple characters. Based on images of multiple characters, a plot, and multiple rounds of dialogue, we obtain dialogue samples.

[0132] Selectable, the first acquisition module 510 is, By calling a first large-scale model corresponding to any one of the characters, a sample dialogue for any one of the characters is obtained based on the images and plots of multiple characters, where different characters among the multiple characters correspond to different first large-scale models.

[0133] Selectable, the first acquisition module 510 is, Get the language style of one of the characters, By calling a first large-scale model corresponding to any one of the characters, sample dialogue for any one of the characters is obtained based on the images, plots, and language styles of multiple characters.

[0134] Selectable, the first acquisition module 510 is, Determine the target rounds in which the difficulty of the dialogue should be increased, and the target policies that correspond to those target rounds and are designed to increase the difficulty of the dialogue. During the target round dialogue, based on the images and plots of multiple characters, a candidate dialogue for one of the characters is retrieved. Based on images, plots, candidate dialogues, and historical dialogues of multiple characters, a target policy is used to retrieve a sample dialogue for one of the characters.

[0135] Selectable, the first acquisition module 510 is, Verify the plot, In response to the plot passing validation, a sample dialogue for one of the characters is retrieved based on the images and plot of multiple characters.

[0136] Selectable, the first acquisition module 510 is, Obtain images of multiple characters, By calling a second large-scale model, a plot is generated based on images of multiple characters.

[0137] Selectable, the first acquisition module 510 is, The character image is determined from images of multiple real characters, and / or, Determine the target image attributes from the candidate image attributes, determine the target attribute values ​​of the target image from the candidate attribute values ​​of the target image attributes, determine the character image based on the target attribute values ​​of the target image attributes, and / or By obtaining a reference image and calling a third large-scale model, an image of the character is obtained based on the reference image.

[0138] Selectable, the first acquisition module 510 is, Obtain the image of the target character from among multiple characters. By calling the second large-scale model, we obtain a plot based on the image of the target character. By calling the third large-scale model, images of characters other than the target character among multiple characters are obtained based on the plot.

[0139] Selectable, the first acquisition module 510 is, By calling the second large-scale model, we obtain the plot, By calling the third large-scale model, images of multiple characters in the plot are obtained based on the plot.

[0140] Selectable training module 530, For the current dialogue samples, an initial large-scale model is trained based on the difference between the predicted dialogue and the sample dialogue to obtain a first intermediate large-scale model. The first intermediate large-scale model is trained using the next dialogue sample following the current dialogue sample to obtain the second intermediate large-scale model, and the difficulty of the current dialogue sample is less than the difficulty of the next dialogue sample. The second intermediate large-scale model is continued to be trained using the next dialogue sample until the target large-scale model is obtained, and the difficulty of the next dialogue sample is less than the difficulty of the next dialogue sample.

[0141] Selectable, the device, A third acquisition module for obtaining a new dialogue sample based on a dialogue sample, wherein the sample dialogue of any one character in the new dialogue sample is obtained by calling the target large-scale model, It may further include a training module 530 for continuing to train the target large-scale model using new dialogue samples.

[0142] Furthermore, the description of the example of the training method for the large-scale model mentioned above is applicable to the training device for the large-scale model in that example, and therefore a detailed explanation is omitted here.

[0143] In the embodiments of this invention, the role-playing capabilities of the large-scale model can be enhanced by training different characters with character dialogues output by the large-scale model, and the degree of matching between characters and predicted dialogues can be controlled by plots containing multiple characters, thereby improving the accuracy of the predicted dialogues, reducing trial-and-error costs, and improving the model training speed.

[0144] According to embodiments of the present application, the present application further provides an electronic device, a readable storage medium, and a computer program.

[0145] Figure 6 shows a schematic block diagram of an exemplary electronic device 600 that can carry out embodiments of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, mobile phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the description herein and / or the implementation of the application as required.

[0146] As shown in Figure 6, device 600 includes a computing unit 601 that can perform various appropriate operations and processes based on computer programs stored in ROM (Read-Only Memory) 602 or computer programs loaded from storage unit 608 into RAM (Random Access Memory) 603. RAM 603 can contain various programs and data necessary for the operation of device 600. The computing unit 601, ROM 602, and RAM 603 are connected to each other via bus 604. An I / O (Input / Output) interface 605 is similarly connected to bus 604.

[0147] Multiple components within device 600, including input units 606 such as a keyboard and mouse, output units 607 such as monitors and speakers of various types, storage units 608 such as magnetic disks and optical disks, and communication units 609 such as a network card, modem, and wireless communication transmitter / receiver, are connected to the I / O interface 605. The communication unit 609 allows device 600 to exchange information / data with other devices via computer networks such as the Internet and / or various telecommunications networks.

[0148] The computing unit 601 may be a variety of general-purpose and / or dedicated processing components having processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Unit), various dedicated AI (Artificial Intelligence) computing chips, various computing units that execute machine learning model algorithms, a DSP (Digital Signal Processor), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs each of the methods and processes described above, for example, the method for training a large model. For example, in some embodiments, the method for training a large model can be implemented as a computer software program tangibly contained in a machine-readable medium such as a memory unit 608. In some embodiments, part or all of the computer program is loaded and / or installed into device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the method for training a large model described above can be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the training method for the large-scale model described above via any other suitable method (e.g., via firmware).

[0149] Various embodiments of the systems and technologies described herein can be implemented as digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System on Chip), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may be implemented as one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be an application-specific or general-purpose programmable processor, which can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, at least one input device, and at least one output device.

[0150] Program code for performing the method of this application can be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, a dedicated computer, or other programmable data processing device, so that when executed by the processor or controller, the functions / operations defined by the flowchart and / or block diagrams are performed. The program code may run entirely on a machine, partially on a machine, as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0151] In the context of this application, a machine-readable medium may be a tangible medium that contains or can store a program used by or in combination with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the above. More specific examples of machine-readable storage media include one or more line-based electrical connections, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only Memory), or flash memory, optical fibers, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the above.

[0152] To provide user interaction, the systems and technologies described herein can be implemented on a computer, which may have a display device for displaying information to the user (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor), and a keyboard and pointing device (e.g., a mouse or trackball), through which the user can provide input to the computer. Other types of devices may also provide user interaction; for example, the feedback provided to the user may be any form of sensing feedback (e.g., visual feedback, auditory feedback, or haptic feedback), and may receive input from the user in any form (including acoustic input and voice input or haptic input).

[0153] The systems and technologies described herein can be implemented in a computing system including backend components (e.g., as a data server), a computing system including middleware components (e.g., an application server), a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser, through which the user interacts with embodiments of the systems and technologies described herein), or in a computing system including any combination of such backend components, middleware components, and frontend components. The components of the system can be interconnected by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include LANs (Local Area Networks), WANs (Wide Area Networks), the Internet, and blockchain networks.

[0154] A computer system can include clients and servers. Clients and servers are generally geographically separated and typically interact via a communication network. The client-server relationship is established by computer programs running on corresponding computers that have a client-server relationship with each other. A server may be a cloud server, also called a cloud computing server or cloud host, a host product in a cloud computing service system that addresses the management difficulties and limited scalability inherent in traditional physical hosts and VPS (Virtual Private Server) services. A server may be a server in a distributed system, or a server combined with blockchain technology.

[0155] According to embodiments of the present application, the present application further provides a computer program that, when executed by a processor, performs a method for training a large-scale model provided in the above embodiments of the present application.

[0156] Furthermore, the steps can be rearranged, added, or deleted using the various forms of flows shown above. For example, each step described in this application may be performed in parallel, sequentially, or in a different order, as long as the desired results of the proposed technology disclosed herein can be achieved.

[0157] The specific embodiments described above do not limit the scope of protection of this disclosure. Those skilled in the art will understand that various modifications, combinations, partial combinations, and substitutions can be made depending on the design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for training a large-scale model, which is performed by a large-scale model training device, A step of obtaining a dialogue sample, wherein the dialogue sample includes images of multiple characters, a plot containing the multiple characters, and multiple rounds of dialogue between the multiple characters. The steps include: inputting images of the multiple characters, the plot, and historical dialogue corresponding to sample dialogue of the one character in the multiple rounds of dialogue into an initial large-scale model to obtain a predicted dialogue for the one character; The steps include: training the initial large-scale model based on the difference between the predicted dialogue and the sample dialogue to obtain a target large-scale model; The step of training the initial large-scale model based on the difference between the predicted dialogue and the sample dialogue to obtain the target large-scale model is: The steps include: training the initial large-scale model based on the difference between the predicted dialogue sentence and the sample dialogue sentence for the current dialogue sample, and obtaining a first intermediate large-scale model; A step of training the first intermediate large-scale model using the next dialogue sample following the current dialogue sample to obtain a second intermediate large-scale model, wherein the difficulty level of the current dialogue sample is less than the difficulty level of the next dialogue sample. A step of continuing to train the second intermediate large-scale model using the next dialogue sample after the previous dialogue sample until the target large-scale model is obtained, the step of the difficulty level of the next dialogue sample being smaller than the difficulty level of the next dialogue sample after the previous dialogue sample, Training methods for large-scale models.

2. The above dialogue sample is, The steps include obtaining images of the plurality of characters and the plot, The steps include obtaining a sample dialogue for any one of the aforementioned characters during a conversation between the aforementioned characters, based on the images of the aforementioned characters and the plot, The steps include obtaining multiple rounds of dialogue between the multiple characters based on sample dialogue texts of the multiple characters in the multiple character dialogues, The steps include obtaining the dialogue sample based on the images of the multiple characters, the plot, and the dialogue of the multiple rounds, and obtaining the following: A method for training a large-scale model as described in claim 1.

3. The step of obtaining a sample dialogue for any one of the characters based on the images of the multiple characters and the plot is as follows: A step of obtaining a sample dialogue for any one of the characters based on the images of the multiple characters and the plot, by calling a first large-scale model corresponding to any one of the characters, the step of different characters among the multiple characters corresponding to different first large-scale models, A method for training a large-scale model according to claim 2.

4. The step of obtaining a sample dialogue for any one of the characters based on the images of the multiple characters and the plot by calling a first large-scale model corresponding to any one of the characters is: The steps include obtaining the language style of one of the aforementioned characters, The process includes the step of calling a first large-scale model corresponding to any one of the aforementioned characters, thereby obtaining a sample dialogue for any one of the aforementioned characters based on the images, plots, and language styles of the multiple characters, A method for training a large-scale model according to claim 3.

5. The step of obtaining a sample dialogue for any one of the characters based on the images of the multiple characters and the plot is as follows: The steps include determining target rounds in which the difficulty of the dialogue should be increased, and target policies for increasing the difficulty of the dialogue corresponding to those target rounds, During the dialogue of the target round, the steps include obtaining a candidate dialogue for any one of the characters based on the images of the multiple characters and the plot, The process includes the step of obtaining a sample dialogue for any one of the characters using the target policy, based on the images of the multiple characters, the plot, the candidate dialogues, and the history dialogues of the candidate dialogues. A method for training a large-scale model according to claim 2.

6. The step of obtaining a sample dialogue for any one of the characters based on the images of the multiple characters and the plot is as follows: The steps include verifying the aforementioned plot and The process includes the step of obtaining a sample dialogue for any one of the characters based on the images of the multiple characters and the plot, in response to the plot passing verification. A method for training a large-scale model according to claim 2.

7. The step of obtaining images of the plurality of characters and the plot is, The steps include obtaining images of the aforementioned multiple characters, The steps include: calling a second large-scale model to generate the plot based on the images of the multiple characters, A method for training a large-scale model according to claim 2.

8. The step of obtaining images of the aforementioned multiple characters is: A step of determining the image of the character from multiple images of real characters, The steps include: determining target image attributes from candidate image attributes, determining target attribute values ​​of the target image from candidate attribute values ​​of the target image attributes, and determining the image of the character based on the target attribute values ​​of the target image attributes; The process includes at least one of the following steps: obtaining a reference image and calling a third large-scale model to obtain an image of the character based on the reference image, A method for training a large-scale model according to claim 7.

9. The step of obtaining images of the plurality of characters and the plot is, The steps include: obtaining an image of the target character from among the aforementioned multiple characters; The steps include: calling a second large-scale model to obtain the plot based on the image of the target character; The process includes the step of calling a third large-scale model to obtain images of characters other than the target character among the plurality of characters based on the plot, A method for training a large-scale model according to claim 2.

10. The step of obtaining images of the plurality of characters and the plot is, The steps include: calling the second large-scale model to obtain the aforementioned plot, The process includes the step of calling a third large-scale model to obtain images of multiple characters in the plot based on the plot, A method for training a large-scale model according to claim 2.

11. A step of obtaining a new dialogue sample based on the aforementioned dialogue sample, wherein the sample dialogue statement for any one of the characters in the new dialogue sample is obtained by calling the target large-scale model, The step further includes continuing to train the target large-scale model using the new dialogue samples, A method for training a large-scale model as described in claim 1.

12. A training device for large-scale models, A first acquisition module for acquiring a dialogue sample, wherein the dialogue sample includes images of multiple characters, a plot containing the multiple characters, and multiple rounds of dialogue between the multiple characters. A second acquisition module for obtaining a predicted dialogue for one of the aforementioned characters by inputting the images of the aforementioned characters, the plot, and the historical dialogue corresponding to the sample dialogue of the aforementioned character in the dialogue of the aforementioned character in the dialogue of the aforementioned rounds into an initial large-scale model, A training module for training the initial large-scale model based on the difference between the predicted dialogue and the sample dialogue to obtain a target large-scale model, is included. The aforementioned training module Based on the difference between the predicted dialogue and the sample dialogue, the initial large-scale model is trained on the current dialogue sample to obtain a first intermediate large-scale model. Using the next dialogue sample following the current dialogue sample, the first intermediate large-scale model is trained to obtain a second intermediate large-scale model, where the difficulty level of the current dialogue sample is less than the difficulty level of the next dialogue sample. The second intermediate large-scale model is continued to be trained using the dialogue sample following the previous dialogue sample until the target large-scale model is obtained, and the difficulty level of the previous dialogue sample is smaller than the difficulty level of the dialogue sample following the previous dialogue sample. A training device for large-scale models.

13. The first acquisition module, The images of the multiple characters and the plot are obtained, For any one of the aforementioned multiple characters, during the dialogue between the multiple characters, a sample dialogue text for any one of the aforementioned characters is obtained based on the images of the multiple characters and the plot. Based on the sample dialogue texts of the multiple characters in the aforementioned dialogue between the multiple characters, multiple rounds of dialogue between the multiple characters are obtained. Based on the images of the multiple characters, the plot, and the multiple rounds of dialogue, the dialogue sample is obtained. A training device for large-scale models according to claim 12.

14. The first acquisition module, By calling a first large-scale model corresponding to any one of the aforementioned characters, sample dialogue for any one of the aforementioned characters is obtained based on the images of the multiple characters and the plot, and different characters among the multiple characters correspond to different first large-scale models. A training device for large-scale models according to claim 13.

15. The first acquisition module, Obtain the language style of one of the aforementioned characters, By calling a first large-scale model corresponding to any one of the aforementioned characters, a sample dialogue for any one of the aforementioned characters is obtained based on the images of the multiple characters, the plot, and the language style. A training device for large-scale models according to claim 14.

16. The first acquisition module, Determine the target rounds in which the difficulty of the dialogue should be increased, and the target policies corresponding to those target rounds that aim to increase the difficulty of the dialogue. During the dialogue of the target round, a candidate dialogue sentence for any one of the characters is obtained based on the images of the multiple characters and the plot. Based on the images of the multiple characters, the plot, the candidate dialogues, and the history dialogues of the candidate dialogues, a sample dialogue for any one of the characters is obtained using the target policy. A training device for large-scale models according to claim 13.

17. The first acquisition module, The aforementioned plot was examined, In response to the plot passing verification, a sample dialogue for any one of the characters is obtained based on the images of the multiple characters and the plot. A training device for large-scale models according to claim 13.

18. The first acquisition module, Obtain images of the aforementioned multiple characters, By calling the second large-scale model, the plot is generated based on the images of the multiple characters. A training device for large-scale models according to claim 13.

19. The first acquisition module, The image of the character is determined from images of multiple real characters, and / or, Determine the target image attributes from the candidate image attributes, determine the target attribute value of the target image from the candidate attribute value of the target image attributes, determine the image of the character based on the target attribute value of the target image attributes, and / or A reference image is obtained, and a third large-scale model is called to obtain an image of the character based on the reference image. A training device for large-scale models according to claim 18.

20. The first acquisition module, Obtain an image of the target character from among the aforementioned multiple characters. By calling the second large-scale model, the plot is obtained based on the image of the target character, By calling the third large-scale model, based on the plot, images of characters other than the target character among the multiple characters are obtained. A training device for large-scale models according to claim 13.

21. The first acquisition module, By calling the second large-scale model, the aforementioned plot is obtained, By calling a third large-scale model, images of multiple characters in the plot are obtained based on the plot. A training device for large-scale models according to claim 13.

22. A third acquisition module for obtaining a new dialogue sample based on the aforementioned dialogue sample, wherein the sample dialogue statement of any one of the characters in the new dialogue sample further includes a third acquisition module obtained by calling the target large model, The training module further trains the target large-scale model using the new dialogue samples. A training device for large-scale models according to any one of claims 12 to 21.

23. It is an electronic device, At least one processor, The system comprises a memory that is communicatively connected to at least one processor, The memory stores instructions to be executed by the at least one processor, and when an instruction is executed by the at least one processor, the at least one processor is made to perform the method according to any one of claims 1 to 11. Electronic devices.

24. A non-temporary, computer-readable storage medium in which computer instructions are stored, The computer instruction causes the computer to perform the method according to any one of claims 1 to 11. A non-temporary, computer-readable storage medium.

25. It is a computer program, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are realized. Computer program.