Text generation method and device, electronic equipment and readable storage medium

By analyzing the semantics of the text using a large model, identifying the topics and character characteristics, and generating argumentative texts for virtual characters, the problem of insufficient matching between argumentative texts and virtual characters is solved, thus improving the user experience.

CN122242509APending Publication Date: 2026-06-19REALME MOBILE TELECOMM SHENZHEN CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
REALME MOBILE TELECOMM SHENZHEN CO LTD
Filing Date
2024-12-18
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

The existing technology generates poor matching between argumentative text and virtual characters, resulting in a strong sense of disconnect and a reduced user experience.

Method used

By performing semantic analysis on the text to be analyzed using a large model, alternative topics and character feature information are identified, and a virtual character's argumentative text on the target topic is generated. By combining the virtual character's identity information and language style, the matching accuracy is improved.

Benefits of technology

It reduces the disconnect between the argumentative text and the virtual characters, improves the matching degree, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122242509A_ABST
    Figure CN122242509A_ABST
Patent Text Reader

Abstract

This application discloses a text generation method, apparatus, electronic device, and readable storage medium, relating to the field of artificial intelligence technology. The method includes: performing semantic analysis on the text to be analyzed using a large model to obtain a first semantic content of the text; determining at least one candidate topic corresponding to the text based on the first semantic content; determining multiple role feature information based on the at least one candidate topic, wherein each role feature information corresponds to a virtual role, and each role feature information includes the identity information of the corresponding virtual role, the virtual role's argument regarding the candidate topic, and the virtual role's language style information; determining a target topic among the at least one candidate topic; and generating a first argument text for each virtual role regarding the target topic using a large model, based on the first semantic content and the multiple role feature information. Generating first text for different virtual roles improves the matching degree between the first text and the virtual roles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and more specifically, to a text generation method, apparatus, electronic device, and readable storage medium. Background Technology

[0002] Currently, with the development of electronic information technology, input text can be analyzed using electronic devices to generate argumentative texts using different virtual characters. However, the matching degree between the generated argumentative texts and the virtual characters is currently poor, which can easily create a sense of disconnect between the argumentative texts and the virtual characters for users, thus reducing the user experience. Summary of the Invention

[0003] This application proposes a text generation method, apparatus, electronic device, and readable storage medium.

[0004] In a first aspect, embodiments of this application provide a text generation method, which involves performing semantic analysis on a text to be analyzed using a large model to obtain a first semantic content of the text to be analyzed; determining at least one candidate topic corresponding to the text to be analyzed based on the first semantic content; determining multiple role feature information based on the at least one candidate topic, wherein each role feature information corresponds to a virtual role, and each role feature information includes the identity information of the corresponding virtual role, the argument of the virtual role regarding the candidate topic, and the language style information of the virtual role; determining a target topic among the at least one candidate topic; and generating a first argument text for each virtual role regarding the target topic using the large model, based on the first semantic content and the multiple role feature information.

[0005] Secondly, embodiments of this application also provide a text generation apparatus, including: a semantic acquisition unit, a candidate topic determination unit, a role feature information determination unit, a target topic determination unit, and a text generation unit. The semantic acquisition unit is used to perform semantic analysis on the text to be analyzed using a large model to obtain a first semantic content of the text to be analyzed; the candidate topic determination unit is used to determine at least one candidate topic corresponding to the text to be analyzed based on the first semantic content; the role feature information determination unit is used to determine multiple role feature information based on at least one candidate topic, wherein each role feature information corresponds to a virtual character, and each role feature information includes the identity information of the corresponding virtual character, the argument of the virtual character regarding the candidate topic, and the language style information of the virtual character; the target topic determination unit is used to determine a target topic from at least one candidate topic; and the text generation unit is used to generate a first argumentative text for each of the virtual characters regarding the target topic using the large model, based on the first semantic content and the multiple role feature information.

[0006] Thirdly, embodiments of this application also provide an electronic device, including: one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more application programs are configured to perform the method described in the first aspect.

[0007] Fourthly, embodiments of this application also provide a computer-readable storage medium storing program code that can be invoked by a processor to execute the method described in the first aspect above.

[0008] The text generation method, apparatus, electronic device, and readable storage medium provided in this application first perform semantic analysis on the text to be analyzed using a large model to obtain the first semantic content of the text to be analyzed. Then, based on the first semantic content, at least one candidate topic corresponding to the text to be analyzed is determined. Next, multiple role feature information is determined according to the at least one candidate topic, wherein each role feature information corresponds to a virtual character, and each role feature information includes the identity information of the corresponding virtual character, the arguments of the virtual character regarding the candidate topic, and the language style information of the virtual character. Then, a target topic is determined from the at least one candidate topic. Thus, through the large model, based on the first semantic content and the multiple role feature information, a first argumentative text for each virtual character regarding the target topic is generated. It can be seen that in this application's solution, the role feature information corresponding to each virtual character is determined by the candidate topics, and the candidate topics are determined by the first semantic content of the text to be analyzed. Therefore, the correlation between each virtual character and the text to be analyzed is high. Subsequent generation of the first argumentative text for each virtual character regarding the target topic reduces the sense of separation between the first argumentative text and the virtual character, allowing for a better matching degree between the first argumentative text and the virtual character.

[0009] Other features and advantages of the embodiments of this application will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the embodiments of this application. The objects and other advantages of the embodiments of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 A flowchart of the text generation method provided in an embodiment of this application is shown;

[0012] Figure 2 A flowchart of a text generation method provided in another embodiment of this application is shown;

[0013] Figure 3 A flowchart of a text generation method provided in another embodiment of this application is shown;

[0014] Figure 4 This illustration shows a diagram of the text generation method provided in this application applied to a podcast scenario;

[0015] Figure 5 A structural block diagram of the text generation apparatus provided in an embodiment of this application is shown;

[0016] Figure 6 A structural block diagram of the electronic device provided in an embodiment of this application is shown;

[0017] Figure 7 A structural block diagram of a computer-readable storage medium provided in an embodiment of this application is shown. Detailed Implementation

[0018] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, and not all of them. The components of the embodiments of the present application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without inventive effort are within the scope of protection of the present application.

[0019] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0020] Currently, with the development of electronic information technology, input text can be analyzed using electronic devices to generate argumentative texts using different virtual characters. However, the matching degree between the generated argumentative texts and the virtual characters is currently poor, easily creating a sense of disconnect between the argumentative text and the virtual characters for users, thus reducing the user experience. How to improve the matching degree between the generated argumentative texts and the virtual characters is an urgent problem to be solved.

[0021] Currently, electronic devices can generate corresponding argumentative text based on user input. This argumentative text can include argumentative texts corresponding to different virtual characters, thus enabling interactive discussion of the user's input text through each virtual character's argumentative text.

[0022] Furthermore, after receiving the text corresponding to each virtual character, the electronic device can convert the text into speech, thus obtaining the corresponding voice for each virtual character. Then, by playing the voices of each virtual character, an interactive discussion effect can be achieved on the user's input text. For example, text-to-speech (TTS) technology can be used to convert text into speech.

[0023] Alternatively, users can input voice into electronic devices, which then acquire the user's voice, convert it into input text, and use it for subsequent processing. For example, speech can be converted into input text using Automatic Speech Recognition (ASR) technology.

[0024] However, the inventors found in their research that the current method of interacting with input text through various virtual characters results in a low degree of matching between each virtual character and the corresponding text. This leads to a strong sense of disconnect between the virtual character and the text being presented, causing the virtual characters to lack specific viewpoints and only speak in generalities. Consequently, the interaction and discussion of input text through various virtual characters lacks depth and provides a poor user experience.

[0025] Therefore, in order to solve or partially solve the above problems, this application provides a text generation method, apparatus, electronic device, and readable storage medium.

[0026] Please see Figure 1 , Figure 1 This application illustrates a text generation method provided by an embodiment of the present application. This text generation method can be applied to an electronic device, specifically, the processor of the electronic device can be used as the execution entity of the text generation method. The text generation method may include steps S110 to S150.

[0027] Step S110: Perform semantic analysis on the text to be analyzed using a large model to obtain the first semantic content of the text to be analyzed.

[0028] In some implementations, a user can input text to be analyzed via an electronic device, allowing the device to acquire the text. For example, the electronic device can run a designated application, allowing the user to input the text through the application's display interface, such as via an input component. Specifically, the input component could be a touchscreen, allowing the user to input text by tapping the screen; alternatively, it could be a microphone, allowing the user to speak, which the electronic device can then capture and convert into text to obtain the text to be analyzed. Furthermore, speech recognition technology can be used to convert the user's speech into input text, which is the text to be analyzed.

[0029] In addition, electronic devices can establish communication connections with other devices, allowing users to send text to be analyzed to the electronic device via other devices, so that the electronic device can obtain the text to be analyzed.

[0030] After acquiring the text to be analyzed, the electronic device can perform semantic analysis on the text using a large model to obtain the first semantic content of the text. This first semantic content is what represents the semantics of the text to be analyzed. It should be noted that this large model is a model based on artificial intelligence technology. For example, this large model can be a combination of a pre-trained neural network model and a large language model.

[0031] Optionally, the large model can be stored locally on the electronic device, allowing the device to directly call the local model to perform semantic analysis on the text after acquiring it, thus obtaining the first semantic content of the text. Alternatively, the large model can be stored on a server, such as a cloud server, allowing the electronic device to upload the text to the server after acquiring it, and then have the server call the large model to perform semantic analysis on the text, obtaining the first semantic content. Then, the device can obtain the first semantic content returned by the server.

[0032] Step S120: Based on the first semantic content, determine at least one alternative topic corresponding to the text to be analyzed.

[0033] After obtaining the first semantic content, in order to generate argumentative texts on the topic, the first semantic content can be analyzed to obtain at least one alternative topic, that is, to determine at least one alternative topic corresponding to the text to be analyzed.

[0034] Optionally, a large model can be used to determine at least one candidate topic corresponding to the text to be analyzed based on the first semantic content. For example, the large model may include a large language model, which can use the first semantic content and the instruction text as prompts for the large language model to obtain at least one candidate topic corresponding to the text to be analyzed determined by the large language model. The instruction text is used to instruct the large language model on the task of determining candidate topics based on the first semantic content.

[0035] Optionally, the large model can be pre-adjusted, configured, and trained so that the first semantic content can be directly used as the input of the large model, and at least one alternative topic can be obtained from the output of the large model.

[0036] Understandably, candidate topics are the themes that need to be discussed after analyzing the initial semantic content of the text to be analyzed. Depending on the text being analyzed, there may be one or more candidate topics.

[0037] Step S130: Determine multiple character feature information based on at least one alternative topic, wherein each character feature information corresponds to a virtual character, and each character feature information includes the identity information of the corresponding virtual character, the arguments of the virtual character regarding the alternative topic, and the language style information of the virtual character.

[0038] To improve the relevance of subsequent discussions on a topic by the virtual character and reduce any sense of disconnect, in some implementations, virtual characters can be constructed based on at least one alternative topic. For example, multiple character feature information can be determined based on at least one alternative topic, wherein each character feature information corresponds to a virtual character.

[0039] In the embodiments provided in this application, each character feature information includes the identity information of the corresponding virtual character, the argument of the virtual character regarding the alternative topic, and the language style information of the virtual character. That is, the identity information, the argument of the virtual character regarding the alternative topic, and the language style information of the virtual character can be determined based on at least one alternative topic, thereby constructing multiple virtual characters with different identity information, arguments, and language style information. For a detailed explanation of how to determine the identity information, arguments, and language style information, please refer to the following embodiments.

[0040] Therefore, corresponding argumentative texts can be generated for each virtual character, thereby achieving the effect of expressing the virtual character's arguments through the corresponding argumentative texts.

[0041] In some implementations, virtual characters can be represented by character cards. Each character card corresponds to one virtual character, and the character card also includes the virtual character's identity information, the virtual character's arguments on the alternative topics, and the virtual character's language style information.

[0042] Step S140: Determine the target issue from at least one of the alternative issues.

[0043] Furthermore, since multiple alternative topics may be available, a target topic can be selected from them. The target topic can be one of the alternative topics. Subsequently, virtual characters can discuss the target topic, for example, generating initial discussion texts for each virtual character on the target topic.

[0044] Optionally, when acquiring at least one candidate topic, each candidate topic has a corresponding acquisition order. Therefore, when determining the target topic, based on the acquisition order of each candidate topic, the first candidate topic not yet determined as the target topic can be selected as the target topic.

[0045] Optionally, the first candidate topic can be randomly selected from the candidate topics that have not yet been identified as the target topic and used as the target topic.

[0046] Step S150: Using the large model, based on the first semantic content and multiple character feature information, generate the first argumentative text of each virtual character regarding the target issue.

[0047] Furthermore, a large model can be used to generate a first argumentative text for each of the virtual characters regarding the target issue, based on the first semantic content and multiple character feature information.

[0048] It can be seen that the first argumentative text corresponding to the virtual character is a comprehensive argumentative text generated based on the virtual character's identity information, arguments, and semantic style information, targeting the specific issue. In other words, the resulting first argumentative text has a high degree of matching with the virtual character.

[0049] Therefore, the various virtual characters can then be used to express their arguments regarding the target's proposal, that is, their viewpoints or opinions.

[0050] In some implementations, the initial argument text for each virtual character can be displayed by showing text content. In other implementations, the initial argument text for each virtual character can be displayed by converting it into audio content and then playing the audio content.

[0051] For example, the first audio content corresponding to each first argumentative text can be obtained based on text-to-speech technology. Then, the first audio content of each virtual character is played sequentially to achieve the effect of displaying the first argumentative text corresponding to each virtual character.

[0052] Optionally, the first audio content corresponding to each virtual character can be played based on different timbres. For example, the character feature information in the aforementioned steps can also include timbre information, such as generating matching timbre information based on the virtual character's identity information and semantic style information. Thus, after obtaining the first audio content, it can be played using the timbre information corresponding to the virtual character. This not only allows different virtual characters to narrate their first audio content with different timbres, but also, since the timbre is generated based on the virtual character's identity information and semantic style information, it reduces the disconnect between the first audio content and the virtual character's timbre, improving the user experience.

[0053] In some implementations, the first argumentative text can be viewed as a podcast script, and the virtual characters can be viewed as participants in the podcast, such as podcast guests or podcast hosts, thereby providing AI-generated podcasts through this text generation method.

[0054] The text generation method provided in this application first performs semantic analysis on the text to be analyzed using a large model to obtain the first semantic content of the text to be analyzed; then, based on the first semantic content, at least one candidate topic corresponding to the text to be analyzed is determined; next, multiple role feature information is determined according to the at least one candidate topic, wherein each role feature information corresponds to a virtual character, and each role feature information includes the identity information of the corresponding virtual character, the argument of the virtual character regarding the candidate topic, and the language style information of the virtual character; then, a target topic is determined from the at least one candidate topic; thereby, through the large model, based on the first semantic content and the multiple role feature information, a first argumentative text of each virtual character regarding the target topic is generated. It can be seen that in this application's solution, the role feature information corresponding to each virtual character is determined by the candidate topics, and the candidate topics are determined by the first semantic content of the text to be analyzed. Therefore, the correlation between each virtual character and the text to be analyzed is high, and the subsequent generation of the first argumentative text of each virtual character regarding the target topic reduces the sense of separation between the first argumentative text and the virtual character, allowing for a better matching degree between the first argumentative text and the virtual character.

[0055] Please see Figure 2 , Figure 2This application illustrates a text generation method provided by an embodiment of the present application. This text generation method can be applied to an electronic device, specifically, the processor of the electronic device can be used as the execution entity of the text generation method. The text generation method may include steps S210 to S2160.

[0056] Step S210: Perform semantic analysis on the text to be analyzed using a large model to obtain the first semantic content of the text to be analyzed.

[0057] Step S210 has been described in detail in the foregoing embodiments and will not be repeated here.

[0058] Step S220: Obtain the total number of characters in the text to be analyzed.

[0059] Step S230: If the total number of characters is greater than the character count threshold, the text to be analyzed is divided into multiple text segments based on the first semantic content, wherein the number of characters in each text segment is less than or equal to the character count threshold.

[0060] Step S240: Determine the topic corresponding to each text segment based on the semantics of each text segment, as a candidate topic.

[0061] Understandably, if the text to be analyzed is too long, when using models such as large language models to analyze the text, it may be truncated, and only the part before truncation will be analyzed. This will result in lower accuracy of the first semantic content obtained later, which in turn will negatively affect the accuracy of each alternative topic and each first argument text.

[0062] Therefore, in this embodiment, after obtaining the text to be analyzed, the total number of characters in the text to be analyzed can be obtained first. Then, the relationship between the total number of characters and the character count threshold is determined. If the total number of characters is greater than the character count threshold, the text to be analyzed is divided into multiple text segments based on the first semantic content, wherein the number of characters in each text segment is less than or equal to the character count threshold.

[0063] The word count threshold can be defined as the maximum number of words supported by the large model for word recognition and analysis of text, which is also the upper limit of the word count.

[0064] Optionally, the word count threshold can also be preset by the user. It should be noted that the user-set word count threshold must be less than or equal to the above-mentioned word count limit.

[0065] In some implementations, after the text to be analyzed is input into a large model, the model can identify the semantic relationships between the paragraphs in the text, thereby determining whether the semantics of two paragraphs are continuous. The goal is to group semantically continuous paragraphs into the same text segment as much as possible, while dividing semantically discontinuous paragraphs into different text segments. It should be noted that "grouping semantically continuous paragraphs into the same text segment as much as possible" means grouping semantically continuous paragraphs into the same text segment while ensuring that the number of characters in each text segment is less than or equal to the stated character count threshold.

[0066] Then, the topic corresponding to each text segment can be determined based on the semantics of each text segment, as a candidate topic.

[0067] Step S250: Determine multiple role characteristic information based on at least one alternative topic.

[0068] Step S260: Detect whether multiple preset character information have been obtained.

[0069] Each of the preset character information includes the preset identity information of the corresponding preset virtual character and the preset language style information of the virtual character.

[0070] In some implementations, preset role information may also exist, wherein each preset role information includes preset identity information of the corresponding preset virtual character and preset language style information of the virtual character. For example, the identity information of the first virtual character may be preset as a guest, and the identity information of the second virtual character may be preset as a host; in addition, the language style information of the first virtual character may be preset as gentle, and the language style information of the second virtual character may be preset as sharp.

[0071] For example, the preset character information can be a pre-set character card, such as a character card that can be set by the user.

[0072] Therefore, multiple character feature information can be determined first based on at least one alternative topic. Then, it can be checked whether multiple preset character information has been obtained. If preset character information is detected, it can be updated using the character feature information, thereby preserving the identity information or language style information of the virtual character set in the preset character information.

[0073] Specifically, if preset role information is detected, the process can proceed to step S270; if preset role information is not detected, the process can proceed to step S2100.

[0074] For example, electronic devices can detect whether preset role information is stored.

[0075] Step S270: If the preset role information is obtained, determine the correspondence between each virtual role and the preset virtual role based on the identity information, the preset identity information, the language style information, and the preset language style information.

[0076] Step S280: Based on the correspondence, add the argument information of the virtual character on the candidate topic to the preset character information of the preset virtual character corresponding to the virtual character, so as to update the preset character information.

[0077] Step S290: Use the updated preset character information as the character feature information.

[0078] Given preset role information, the correspondence between each virtual role and the preset virtual role can be determined based on the identity information, the preset identity information, the language style information, and the preset language style information. In other words, a correspondence can be established between the virtual role corresponding to the preset role information and the virtual role corresponding to the role characteristic information determined based on the alternative topics.

[0079] In some implementations, a first correspondence between the virtual character corresponding to the preset role information and the virtual character corresponding to the role feature information can be determined by comparing identity information and preset identity information; then, a second correspondence between the virtual character corresponding to the preset role information and the virtual character corresponding to the role feature information can be determined by comparing language style information and preset language style information. Furthermore, the correspondence between each virtual character and the preset virtual character can be obtained by combining the first and second correspondences.

[0080] For example, different weight values ​​can be set for the first correspondence and the second correspondence, and then the correspondence between each virtual character and the preset virtual character can be obtained based on the weight values ​​and the first correspondence and the second correspondence.

[0081] For example, the virtual characters corresponding to the preset role information include virtual character A1, virtual character A2, and virtual character A3, while the virtual characters corresponding to the role feature information include pseudo-character B1, virtual character B2, and virtual character B3. If the first correspondence determines that virtual character A1 corresponds to virtual character B1, virtual character A2 corresponds to virtual character B3, and virtual character A3 corresponds to virtual character B2; and the second correspondence determines that virtual character A1 corresponds to virtual character B1, virtual character A2 corresponds to virtual character B2, and virtual character A3 corresponds to virtual character B3. Furthermore, the first weight value assigned to the first correspondence is greater than the second weight value of the second correspondence. Therefore, the correspondence between each virtual character and the preset virtual character can be obtained as follows: virtual character A1 corresponds to virtual character B1, virtual character A2 corresponds to virtual character B3, and virtual character A3 corresponds to virtual character B2.

[0082] Optionally, the large model can be pre-trained so that the identity information, the preset identity information, the language style information, and the preset language style information can be directly input into the large model, and then the correspondence between each virtual character output by the large model and the preset virtual character can be obtained.

[0083] Furthermore, based on the aforementioned correspondence, the argument information of the virtual character regarding the candidate topics can be added to the preset character information of the corresponding preset virtual character to update the preset character information. That is, the updated preset character information includes not only preset identity information and preset language style information, but also the argument of the corresponding virtual character determined based on the correspondence. Then, the updated preset character information is used as the character feature information. Proceed to step S2140.

[0084] Step S2100: Without obtaining preset role information, determine multiple alternative professions corresponding to at least one alternative topic and determine multiple alternative arguments corresponding to each of the alternative topics.

[0085] Step S2110: Assign a candidate profession to each virtual character as the identity information of the virtual character.

[0086] Step S2120: Determine the virtual character's argument and language style information based on the virtual character's identity information and alternative arguments.

[0087] Step S2130: Use the identity information, arguments, and language style information of the virtual character as the character feature information of the virtual character.

[0088] In the absence of pre-defined role information, in order to determine multiple role characteristic information, multiple alternative professions corresponding to at least one alternative topic and multiple alternative arguments corresponding to each alternative topic can be determined first.

[0089] For example, the alternative profession can be a specific profession in society, such as teacher, doctor, student, etc.; and the alternative arguments can include expressing opposition to the corresponding alternative issue, supporting the corresponding alternative issue, or taking a neutral attitude on issues involving the alternative issue.

[0090] Then, an alternative profession can be assigned to each virtual character as the identity information of that virtual character.

[0091] Optionally, taking the text generation method provided in the embodiments of this application as an example, which can be applied to the podcast scenario of artificial intelligence, the identity information of the virtual character can also include the virtual identity in the podcast. Specifically, the virtual identity can include the host, guest, affirmative opinion presenter, negative opinion presenter, etc.

[0092] Optionally, after obtaining multiple character characteristic information, each virtual character can be identified as a host or guest through a specified method. For example, the designation can be done randomly or by user specification.

[0093] Furthermore, the virtual character's argument and language style information can be determined based on the virtual character's identity information and alternative arguments. Specifically, step S2120 may also include steps S2121 and S2122.

[0094] Step S2121: Based on the identity information of the virtual character, predict the alternative arguments that match the virtual character in each of the alternative topics, and use them as the arguments of the virtual character in the alternative topic.

[0095] Step S2122: Based on the identity information of the virtual character and the arguments of the virtual character for each of the candidate topics, predict the language style information of the virtual character.

[0096] First, based on the identity information of the virtual character, alternative arguments matching that virtual character in each of the alternative topics can be predicted, and these arguments can be used as the virtual character's arguments for that alternative topic. It should be noted that multiple alternative arguments corresponding to the same alternative topic can be arguments with different stances, thus ensuring that the arguments of different virtual characters regarding the alternative topic have different stances.

[0097] In some implementations, the candidate arguments that best match the virtual character in each of the candidate topics can be predicted based on the virtual character's identity information, and used as the virtual character's arguments in that candidate topic.

[0098] For example, a large model can be used to analyze the degree of matching between the identity information of a virtual character and the candidate arguments in each alternative topic, and then the alternative topic with the highest degree of matching can be used as the argument of that virtual character. The degree of matching can characterize the likelihood that a character with that identity information supports the candidate arguments in the alternative topics.

[0099] Furthermore, the language style information of the virtual character can be predicted based on the character's identity information and its arguments regarding each of the candidate topics. Specifically, a large model combined with social impressions can be used to predict the virtual character's language style information based on its identity information and arguments regarding each candidate topic. The social impressions can include multiple different reference identity information and reference arguments, with each reference identity information combined with a reference argument, and each combination corresponding to a reference language style information.

[0100] In other words, the large model can learn what kind of reference language style information generally corresponds to certain reference identity information and reference arguments. Furthermore, the large model can then directly predict the language style information of the virtual character based on the input identity information of the virtual character and the virtual character's arguments for each of the candidate topics.

[0101] Therefore, the identity information, arguments, and language style information of a virtual character can be used as the character feature information of that virtual character.

[0102] Step S2140: Determine the target issue from at least one of the alternative issues.

[0103] Step S2140 has been described in detail in the foregoing embodiments and will not be repeated here.

[0104] Step S2150: Determine the target text segment corresponding to the target topic and the third semantic content of the target text segment.

[0105] Step S2160: Based on the third semantic content and multiple character feature information, the large model generates the first argumentative text of each virtual character regarding the target issue.

[0106] As described above, when the total number of characters in the text to be analyzed exceeds a character threshold, the text can be divided into multiple text segments. Therefore, after determining the target topic, the corresponding target text segment and its third semantic content can also be determined. The target text segment is the text segment that corresponds to the target topic among the multiple divided text segments.

[0107] Similar to the aforementioned method for obtaining the first semantic content, a large model can also be used to perform semantic analysis on the target text segments to obtain the third semantic content of the target text segments.

[0108] Therefore, after obtaining the third semantic content, it is not necessary to input the first semantic content into the large model to generate the first argumentative text. Instead, the large model can generate the first argumentative text for each of the virtual characters regarding the target topic based on the third semantic content and multiple character feature information. This improves the accuracy of the obtained first argumentative text.

[0109] In the text generation method provided in this application embodiment, when the total number of characters exceeds a character threshold, the text to be analyzed is divided into multiple text segments based on the first semantic content. Then, based on the semantics of each text segment, the topic corresponding to each text segment is determined as a candidate topic, thereby improving the accuracy of the obtained candidate topics. Additionally, a correspondence can be obtained, and based on this correspondence, the argument information of the virtual character regarding the candidate topics is added to the preset role information of the corresponding preset virtual character to update the preset role information. In other words, while retaining the identity information and language style information in the preset role information, the preset role information can be updated by combining multiple role feature information determined based on the candidate topics. This ensures that virtual characters matching the text to be analyzed are obtained while also preserving the preset role information to a certain extent.

[0110] Please see Figure 3 , Figure 3 This application illustrates a text generation method provided by an embodiment of the present application. This text generation method can be applied to an electronic device, specifically, the processor of the electronic device can be used as the execution entity of the text generation method. The text generation method may include steps S310 to S3110.

[0111] Step S310: Perform semantic analysis on the text to be analyzed using a large model to obtain the first semantic content of the text to be analyzed.

[0112] Step S320: Based on the first semantic content, determine at least one alternative topic corresponding to the text to be analyzed.

[0113] Step S330: Determine multiple character feature information based on at least one alternative topic, wherein each character feature information corresponds to a virtual character, and each character feature information includes the identity information of the corresponding virtual character, the arguments of the virtual character regarding the alternative topic, and the language style information of the virtual character.

[0114] Step S340: Determine the target issue from at least one of the candidate issues.

[0115] Step S350: Using the large model, based on the first semantic content and multiple character feature information, generate the first argumentative text of each virtual character regarding the target issue.

[0116] Steps S310 to S350 have been described in detail in the foregoing embodiments and will not be repeated here.

[0117] Step S360: Obtain the second argument text input by the user in response to the first argument text.

[0118] In some implementations, after the first argumentative text is generated, the user can view the first argumentative text or listen to the corresponding first audio content. Thus, the user can input a second argumentative text in response to the first argumentative text.

[0119] Similar to the input of text to be analyzed described in the previous embodiments, users can directly input text content as the second argumentative text; users can also input voice data, and then convert the user's voice data into text as the second argumentative text.

[0120] Specifically, step S360 may include steps S361 and S362.

[0121] Step S361: Obtain the user's voice data.

[0122] Step S362: Convert the voice data into text data, which will serve as the second argumentative text input by the user in response to the first argumentative text.

[0123] First, the user's voice data can be acquired. For example, the user's voice data can be collected through a microphone configured on an electronic device, and then the voice data can be converted into text data, which serves as the second argumentative text input by the user in response to the first argumentative text. For example, voice data can be converted into text data using speech recognition technology.

[0124] Step S370: Perform semantic analysis on the second argument text to obtain the second semantic content of the second argument text.

[0125] Step S371: Whether the second semantic content can represent the intention to continue discussing the target issue.

[0126] After obtaining the second argumentative text, semantic analysis can be performed on it. The method for obtaining the second argumentative text is similar to the method described above for obtaining the first argumentative text through semantic analysis of the text to be analyzed, and will not be repeated here.

[0127] After obtaining the second semantic content, it can be detected whether the second semantic content can represent the intention to continue discussing the target topic. Therefore, if the second semantic content can represent the intention to continue discussing the target topic, the process can proceed to step S380; if the second semantic content cannot represent the intention to continue discussing the target topic, that is, if the second semantic content can represent the intention to terminate the discussion of the target topic, the process can proceed to step S3110.

[0128] Step S380: If the second semantic content can represent the intention to continue discussing the target topic, the large model generates at least one third argumentative text for the virtual character regarding the second semantic content based on the first semantic content, the second semantic content, multiple first argumentative texts, and the character feature information.

[0129] If the second semantic content can represent the intention to continue discussing the target topic, then a third argumentative text can be generated based on the second semantic content. Specifically, a large model can generate at least one third argumentative text for the second semantic content from the virtual character based on the first semantic content, the second semantic content, multiple first argumentative texts, and the character feature information. In other words, one or more virtual characters can be used to provide targeted arguments based on the second argumentative text input by the user.

[0130] Similar to the aforementioned embodiments, after generating the third argument text, the third argument text can be displayed; alternatively, the third argument text can be converted into audio content and then played to display the third argument text corresponding to the virtual character.

[0131] For example, the second audio content corresponding to the third argumentative text can be obtained based on text-to-speech technology. Then, the second audio content corresponding to the virtual character is played sequentially to achieve the effect of displaying the third argumentative text corresponding to the virtual character.

[0132] In some implementations, the arguments of each virtual character may not match the user's arguments. In such cases, to avoid a decline in user experience, new virtual characters can be created to generate argument text. Specifically, step S380 may include steps S381 to S383.

[0133] Step S381: If the second semantic content can characterize the intention to continue discussing the target issue, determine the user's user argument based on the second semantic content.

[0134] Step S382: If the argument of each virtual character does not match the user's argument, construct a new virtual character corresponding to the character feature information based on the user's argument.

[0135] Step S383: Based on the first semantic content, the second semantic content, multiple first argumentative texts, and the character feature information, the large model generates a third argumentative text for the virtual character corresponding to the second semantic content, using the new character feature information.

[0136] First, if the second semantic content can represent the intention to continue discussing the target topic, the user's argument can be determined based on the second semantic content. Then, it is checked whether the argument of each virtual character matches the user's argument. If the argument of each virtual character does not match the user's argument, a new virtual character corresponding to the character feature information can be constructed based on the user's argument.

[0137] Therefore, based on the first semantic content, the second semantic content, multiple first argumentative texts, and the character feature information, the large model generates a third argumentative text for a virtual character corresponding to the new character feature information, addressing the second semantic content. This allows the third argumentative text to be expressed through a virtual character that matches the user's argument, thus improving the user experience.

[0138] Optionally, users can also set preferences for third-party argument texts. These preferences are then incorporated into the input of the larger model, resulting in third-party argument texts that better align with the user's defined preferences. For example, these preferences could include a desire to reach a consensus, a desire for a clash of viewpoints, or a desire for a comprehensive discussion.

[0139] Step S390: Detect whether the fourth argument text input by the user in response to the third argument text is obtained within a preset time.

[0140] After generating the third argumentative text, it can be checked whether a fourth argumentative text input by the user in response to the third argumentative text is obtained within a preset time. If the fourth argumentative text is obtained, the process can proceed to step S3100; otherwise, the process can proceed to step S3110.

[0141] Optionally, after generating the first argument text, it is also possible to check whether the second argument text has been obtained within a preset time. If the second argument text is not obtained within the preset time, the process can directly jump to step S3110.

[0142] Step S3100: If the fourth argument text is obtained, the fourth argument text is used as the new second argument text, and the semantic analysis of the new second argument text is performed to obtain the second semantic content of the new second argument text and subsequent steps, until no fourth argument text input by the user for the third argument text is obtained within a preset time.

[0143] In some implementations, after obtaining the fourth argument text, the fourth argument text can be used as the new second argument text, and the semantic analysis of the new second argument text can be performed to obtain the second semantic content of the new second argument text and subsequent steps, until no fourth argument text input by the user for the third argument text is obtained within a preset time.

[0144] Optionally, in some implementations, a threshold can be set for the number of times argumentative text is generated by the large model for each target topic, for example, setting the threshold to 5 times. Thus, if the number of argumentative texts generated by the large model exceeds this threshold, the process can directly jump to step S3110. The number of times the large model generates argumentative text includes the sum of the number of times the first argumentative text and the third argumentative text are generated.

[0145] Optionally, a threshold number of words can be set for the generated argumentative text for each target topic, such as setting the threshold to 500 or 1000 words. Therefore, if the sum of the word counts of the argumentative texts generated by the large model exceeds this threshold, the process can directly proceed to step S3110. The sum of the word counts of the argumentative texts generated by the large model includes the sum of the word counts of the first argumentative text and each of the third argumentative texts.

[0146] Then you can proceed to step S3110.

[0147] Step S3110: If no fourth argument text input by the user is obtained within a preset time after the third argument text is generated, or if the second semantic content can represent the intention to terminate the discussion of the target topic, a new target topic is confirmed from the candidate topics that have never been used as the target topic, and the process returns to the execution of generating a new first argument text for each virtual character on the new target topic based on the first semantic content and multiple character feature information through the large model, and subsequent steps, until each candidate topic is used as the target topic.

[0148] If no fourth argument text input by the user is obtained within a preset time after the third argument text is generated, or if the second semantic content can represent the intention to terminate the discussion of the target topic, a new target topic can be identified from the candidate topics that have not been used as the target topic. Then, the process returns to the execution of generating a new first argument text for each virtual character on the new target topic based on the first semantic content and multiple character feature information through the large model, and subsequent steps, until each candidate topic is used as the target topic, that is, returning to the execution of step S350 and subsequent steps.

[0149] It should be noted that if the second semantic meaning cannot represent the intention to continue discussing the target issue, it can be considered that the second semantic meaning can represent the intention to terminate the discussion of the target issue.

[0150] In the text generation method provided in this application embodiment, after generating the first argumentative text, a second argumentative text input by the user in response to the first argumentative text can be obtained. If the second semantic content can represent the intention to continue discussing the target topic, at least one third argumentative text for the virtual character in response to the second semantic content is generated by the large model based on the first semantic content, the second semantic content, multiple first argumentative texts, and the character feature information. It is then checked whether a fourth argumentative text input by the user in response to the third argumentative text is obtained within a preset time. If the fourth argumentative text is obtained, it is used as the new second argumentative text, and the process returns to perform semantic analysis on the new second argumentative text to obtain the second semantic content of the new second argumentative text and subsequent steps, until no fourth argumentative text input by the user in response to the third argumentative text is obtained within the preset time. Therefore, for a target topic, as long as the user's input of the second argumentative text represents the intention to continue discussing the target topic, the electronic device can generate a third argumentative text in response to the second argumentative text, thereby enabling discussion with the user and fully responding to the second argumentative text input by the user, thus improving the user's understanding of the target topic and facilitating the user's understanding of the target topic from multiple aspects and angles. Furthermore, if no fourth argumentative text input by the user is obtained within a preset time after the third argumentative text is generated, or if the second semantic content can represent the intention to terminate the discussion of the target topic, a new target topic is confirmed from the candidate topics that have never been considered as target topics. The process then returns to executing the large model, which generates new first argumentative texts for each virtual character regarding the new target topic based on the first semantic content and multiple character feature information, and subsequent steps, until each candidate topic is adopted as the target topic. In other words, even if multiple candidate topics are generated for a long text to be analyzed, each candidate topic can be discussed one by one, without omitting any candidate topic in the text to be analyzed, thus ensuring high completeness in discussing the text to be analyzed via electronic devices.

[0151] Please see Figure 4 , Figure 4 This illustration shows a diagram of the text generation method provided in this application applied to a podcast scenario. Figure 4 The document shows four stages, specifically including podcast text planning stage 410, machine dialogue stage 420, human-machine dialogue stage 430, and replanning stage 440.

[0152] In the podcast text planning stage 410, the large model 413 can obtain the first argument text 411 of each virtual character on the target topic based on the text to be analyzed 412. Detailed explanations can be found in the aforementioned embodiments, and will not be repeated here. Then, the process proceeds to the machine dialogue stage 420.

[0153] In the machine dialogue stage 420, the first argumentative text 411 can be converted into corresponding first audio content using text-to-speech technology 422, which can then be played by various virtual characters 421. Further, the process can proceed to the human-computer dialogue stage 430.

[0154] In the human-computer dialogue stage 430, the user 431 can input voice data, which is then converted into text data by speech recognition technology 433 and input into the large model 413. The text data input by the user is the second argument text. The large model 413 can also generate a dialogue record 432 based on the second argument text input by the user and the first argument text 411 of each virtual character. Then, it can jump to the replanning stage 440.

[0155] In the replanning phase 440, a new argument text 441 can be generated again using the large model 413 based on the dialogue record 432, the text to be analyzed 412, and the first argument text 411. This new argument text 441 can include a third argument text that re-argues the target issue, or a new first argument text that discusses a new target issue. Specifically, based on the second semantic content of the second argument text input by the user, if the second semantic content can represent the intention to continue discussing the target issue, a third argument text can be generated to re-argue the target issue; if the second semantic content cannot represent the intention to continue discussing the target issue, a new target issue can be determined, and a first argument text for the new target issue can be generated. Detailed explanations can be found in the foregoing embodiments, and will not be repeated here. Furthermore, the human-computer dialogue phase 430 and the replanning phase 440 can be executed cyclically. Detailed explanations can be found in the foregoing description of how to determine a new target issue and subsequent steps, and will not be repeated here.

[0156] Please see Figure 5 , Figure 5 The diagram shows a structural block diagram of a text generation device provided in an embodiment of this application. The device 500 includes a semantic acquisition unit 510, a candidate topic determination unit 520, a role feature information determination unit 530, a target topic determination unit 540, and a text generation unit 550.

[0157] The semantic acquisition unit 510 is used to perform semantic analysis on the text to be analyzed using a large model to obtain the first semantic content of the text to be analyzed.

[0158] The alternative topic determination unit 520 is used to determine at least one alternative topic corresponding to the text to be analyzed based on the first semantic content.

[0159] Optionally, the alternative topic determination unit 520 can also be used to obtain the total number of words in the text to be analyzed; if the total number of words is greater than the word count threshold, the text to be analyzed is divided into multiple text segments based on the first semantic content, wherein the number of words in each text segment is less than or equal to the word count threshold; and the topic corresponding to each text segment is determined based on the semantics of each text segment as an alternative topic.

[0160] The character feature information determination unit 530 is used to determine multiple character feature information based on at least one alternative topic, wherein each character feature information corresponds to a virtual character, and each character feature information includes the identity information of the corresponding virtual character, the arguments of the virtual character regarding the alternative topic, and the language style information of the virtual character.

[0161] Optionally, the role feature information determination unit 530 can also be used to determine multiple role feature information based on at least one candidate topic; detect whether multiple preset role information has been obtained, wherein each preset role information includes preset identity information of a corresponding preset virtual character and preset language style information of the virtual character; if the preset role information has been obtained, determine the correspondence between each virtual character and the preset virtual character based on the identity information, the preset identity information, the language style information, and the preset voice style information; based on the correspondence, add the argument information of the virtual character regarding the candidate topic to the preset role information of the preset virtual character corresponding to the virtual character to update the preset role information; and use the updated preset role information as the role feature information.

[0162] Optionally, the character feature information determination unit 530 can also be used to determine multiple alternative professions corresponding to at least one alternative topic and multiple alternative arguments corresponding to each alternative topic when the preset character information is not obtained; assign an alternative profession to each virtual character as the identity information of the virtual character; determine the argument and language style information of the virtual character based on the identity information and alternative arguments; and use the identity information, argument and language style information of the virtual character as the character feature information of the virtual character.

[0163] Optionally, the character feature information determination unit 530 can also be used to predict, based on the identity information of the virtual character, the alternative arguments that match the virtual character in each of the alternative topics, as the arguments of the virtual character in the alternative topics; and to predict the language style information of the virtual character based on the identity information of the virtual character and the arguments of the virtual character for each of the alternative topics.

[0164] Optionally, the character feature information determination unit 530 can also be used to predict, based on the identity information of the virtual character, the candidate argument that matches the virtual character the most in each of the candidate topics, and use it as the argument of the virtual character in the candidate topic.

[0165] The target issue determination unit 540 is used to determine a target issue from at least one of the alternative issues.

[0166] The text generation unit 550 is used to generate, through the large model, a first argumentative text for each of the virtual characters regarding the target issue, based on the first semantic content and multiple character feature information.

[0167] Optionally, the text generation unit 550 can also be used to obtain a second argumentative text input by the user in response to the first argumentative text; perform semantic analysis on the second argumentative text to obtain a second semantic content of the second argumentative text; if the second semantic content can represent the intention to continue discussing the target topic, generate at least one third argumentative text for the virtual character in response to the second semantic content through the large model based on the first semantic content, the second semantic content, multiple first argumentative texts and the character feature information.

[0168] Optionally, the text generation unit 550 can also be used to detect whether a fourth argumentative text input by the user for the third argumentative text is obtained within a preset time; if the fourth argumentative text is obtained, the fourth argumentative text is used as a new second argumentative text, and the semantic analysis of the new second argumentative text is performed to obtain the second semantic content of the new second argumentative text and subsequent steps, until no fourth argumentative text input by the user for the third argumentative text is obtained within the preset time.

[0169] Optionally, the text generation unit 550 can also be used to determine the user's argument based on the second semantic content if the second semantic content can characterize the intention to continue discussing the target topic; if the arguments of each virtual character do not match the user's argument, construct a new virtual character corresponding to the user's argument based on the user's argument; and generate a third argument text for the virtual character corresponding to the new role feature information regarding the second semantic content through the large model based on the first semantic content, the second semantic content, multiple first argument texts, and the role feature information.

[0170] Optionally, the text generation unit 550 can also be used to confirm a new target topic from the candidate topics that have never been used as the target topic if, after generating the third argumentative text, no fourth argumentative text input by the user for the third argumentative text is obtained within a preset time, or if the second semantic content can represent the intention to terminate the discussion of the target topic, and return to execute the process of generating a new first argumentative text for each virtual character for the new target topic based on the first semantic content and multiple character feature information through the large model, and subsequent steps, until each of the candidate topics is used as the target topic.

[0171] Optionally, the text generation unit 550 can also be used to acquire the user's voice data; convert the voice data into text data, and use it as the second argumentative text input by the user in response to the first argumentative text.

[0172] Optionally, the text generation unit 550 can also be used to determine the target text segment corresponding to the target topic and the third semantic content of the target text segment; and generate the first argument text of each virtual character on the target topic based on the third semantic content and multiple character feature information through the large model.

[0173] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0174] In the several embodiments provided in this application, the coupling between the units can be electrical, mechanical, or other forms of coupling. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0175] Please see Figure 6 , Figure 6 This diagram illustrates a structural block diagram of an electronic device according to an embodiment of this application. The electronic device 1110 can be a smartphone, desktop computer, in-vehicle computer, server, or tablet computer, etc. The electronic device 1110 in this application may include one or more of the following components: a processor 111, a memory 112, and one or more application programs, wherein the processor 111 is electrically connected to the memory 112, and the one or more programs are configured to execute the methods described in the foregoing embodiments.

[0176] Processor 111 may include one or more processing cores. Processor 111 connects to various parts within the electronic device 1110 using various interfaces and lines, and performs various functions and processes data of the electronic device 1110 by running or executing instructions, programs, code sets, or instruction sets stored in memory 112, and by calling data stored in memory 112. Optionally, processor 111 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 111 may integrate one or more of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and computer programs; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 111 and may be implemented separately using a communication chip. Specifically, the methods described in the foregoing embodiments can be executed by one or more processors 111.

[0177] In some implementations, memory 112 may include random access memory (RAM) or read-only memory (ROM). Memory 112 can be used to store instructions, programs, code, code sets, or instruction sets. Memory 112 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the various method embodiments described below, etc. The data storage area may also store data created by the electronic device 110 during use.

[0178] Please see Figure 7 This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable medium 700 stores program code that can be called by a processor to execute the methods described in the above method embodiments.

[0179] The computer-readable storage medium 700 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 700 includes a non-volatile computer-readable storage medium. The computer-readable storage medium 700 has storage space for program code 710 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 710 may, for example, be compressed in a suitable form.

[0180] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A text generation method, characterized in that, include: The first semantic content of the text to be analyzed is obtained by performing semantic analysis on the large model. Based on the first semantic content, at least one alternative topic corresponding to the text to be analyzed is determined; Multiple character feature information is determined based on at least one alternative topic, wherein each character feature information corresponds to a virtual character, and each character feature information includes the identity information of the corresponding virtual character, the arguments of the virtual character regarding the alternative topic, and the language style information of the virtual character. Determine the target issue from at least one of the candidate issues; Using the large model, based on the first semantic content and multiple character feature information, a first argumentative text for each of the virtual characters is generated regarding the target issue.

2. The method according to claim 1, characterized in that, The determination of multiple role characteristic information based on at least one alternative topic includes: Multiple role characteristic information are determined based on at least one alternative topic; Detect whether multiple preset role information has been obtained, wherein each preset role information includes the preset identity information of the corresponding preset virtual role and the preset language style information of the virtual role; Upon obtaining the preset role information, the correspondence between each virtual role and the preset virtual role is determined based on the identity information, the preset identity information, the language style information, and the preset language style information. Based on the correspondence, the argument information of the virtual character regarding the candidate topics is added to the preset character information of the preset virtual character corresponding to the virtual character, so as to update the preset character information; The updated preset character information is used as the character feature information.

3. The method according to claim 2, characterized in that, The method further includes: Without obtaining preset role information, determine multiple alternative professions corresponding to at least one alternative topic and multiple alternative arguments corresponding to each of the alternative topics; Each virtual character is assigned a candidate profession as its identity information. The virtual character's arguments and language style information are determined based on the virtual character's identity information and alternative arguments; The identity information, arguments, and language style information of a virtual character are used as the character feature information of that virtual character.

4. The method according to claim 3, characterized in that, The process of determining the virtual character's arguments and language style information based on the virtual character's identity information and candidate arguments includes: Based on the identity information of the virtual character, predict the alternative arguments that match the virtual character in each of the alternative topics, and use them as the arguments of the virtual character in the alternative topic; Based on the virtual character's identity information and the virtual character's arguments for each of the alternative topics, predict the virtual character's language style information.

5. The method according to claim 4, characterized in that, The step of predicting, based on the identity information of the virtual character, the candidate arguments matching the virtual character in each of the candidate topics, and using these as the virtual character's arguments in that candidate topic, includes: Based on the identity information of the virtual character, predict the candidate argument that best matches the virtual character in each of the candidate topics, and use it as the virtual character's argument in that candidate topic.

6. The method according to claim 1, characterized in that, After generating the first argumentative text for each virtual character regarding the target issue using the large model, based on the first semantic content and multiple character feature information, the method further includes: Obtain the second argument text input by the user in response to the first argument text; Semantic analysis is performed on the second argument text to obtain the second semantic content of the second argument text; If the second semantic content can represent the intention to continue discussing the target topic, the large model generates at least one third argumentative text for the virtual character regarding the second semantic content based on the first semantic content, the second semantic content, multiple first argumentative texts, and the character feature information.

7. The method according to claim 6, characterized in that, After generating at least one third argumentative text for the virtual character regarding the second semantic content, the method further includes: Detect whether a fourth argumentative text input by the user in response to the third argumentative text is obtained within a preset time period; If the fourth argument text is obtained, it is used as the new second argument text, and the semantic analysis of the new second argument text is performed to obtain the second semantic content of the new second argument text and subsequent steps, until no fourth argument text input by the user for the third argument text is obtained within a preset time.

8. The method according to claim 6, characterized in that, If the second semantic content can represent the intention to continue discussing the target topic, the large model generates at least one third argumentative text for the virtual character regarding the second semantic content based on the first semantic content, the second semantic content, multiple first argumentative texts, and the character feature information, including: If the second semantic content can characterize the intention to continue discussing the target issue, the user's argument is determined based on the second semantic content; If the arguments of each virtual character do not match the user's arguments, a new virtual character corresponding to the character's feature information is constructed based on the user's arguments. Based on the first semantic content, the second semantic content, multiple first argumentative texts, and the character feature information, the large model generates a third argumentative text for the virtual character corresponding to the second semantic content, using new character feature information.

9. The method according to claim 6, characterized in that, The method also includes: If no fourth argument text input by the user is obtained within a preset time after the third argument text is generated, or if the second semantic content can represent the intention to terminate the discussion of the target topic, a new target topic is confirmed from the candidate topics that have never been used as the target topic, and the process returns to executing the large model to generate a new first argument text for each virtual character on the new target topic based on the first semantic content and multiple character feature information, and subsequent steps, until each candidate topic is used as the target topic.

10. The method according to claim 6, characterized in that, The step of obtaining the second argumentative text input by the user in response to the first argumentative text includes: Obtain the user's voice data; The voice data is converted into text data, which serves as the second argumentative text input by the user in response to the first argumentative text.

11. The method according to claim 1, characterized in that, The step of determining at least one alternative topic corresponding to the text to be analyzed based on the first semantic content includes: Obtain the total number of characters in the text to be analyzed; If the total number of characters is greater than the character count threshold, the text to be analyzed is divided into multiple text segments based on the first semantic content, wherein the number of characters in each text segment is less than or equal to the character count threshold. Based on the semantics of each text segment, the corresponding topic for each text segment is determined as a candidate topic.

12. The method according to claim 11, characterized in that, The step of generating first argumentative texts for each of the virtual characters regarding the target issue using the large model, based on the first semantic content and multiple character feature information, includes: Determine the target text segment corresponding to the target issue and the third semantic content of the target text segment; Based on the third semantic content and multiple character feature information, the large model generates a first argumentative text for each virtual character regarding the target issue.

13. A text generation device, characterized in that, include: The semantic acquisition unit is used to perform semantic analysis on the text to be analyzed using a large model to obtain the first semantic content of the text to be analyzed. The alternative topic determination unit is used to determine at least one alternative topic corresponding to the text to be analyzed based on the first semantic content. A character feature information determination unit is used to determine multiple character feature information based on at least one alternative topic, wherein each character feature information corresponds to a virtual character, and each character feature information includes the identity information of the corresponding virtual character, the arguments of the virtual character regarding the alternative topic, and the language style information of the virtual character. A target issue determination unit is used to determine a target issue from at least one of the candidate issues; The text generation unit is used to generate, through the large model, a first argumentative text for each of the virtual characters regarding the target issue, based on the first semantic content and multiple character feature information.

14. An electronic device, characterized in that, include: One or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications being configured to perform the method as described in any one of claims 1-12.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code that can be invoked by a processor to execute the method as described in any one of claims 1-12.