Dialogue program generation method, dialogue program generation device, medium and electronic equipment
Through the dialogue generation model, the prompt information and role information are processed, the dialogue text is generated and the dialogue program is formed, which solves the problem of high generation cost of multi-person dialogue programs in the existing technology, and achieves efficient and high-quality program generation.
Patent Information
- Application Number
- CN202411698579.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-04
AI Technical Summary
The existing technology lacks an effective way to generate high-quality, in-depth multi-person dialogue programs without relying on manual production, resulting in high labor and time costs.
By obtaining the first prompt information for generating the target dialogue program and the role information of the dialogue character, and processing these information using the dialogue generation model, generating dialogue text information, and finally generating the target dialogue program based on the dialogue text information.
It eliminates the problem that dialogue programs must rely on anchor participation, reduces the manpower and time cost of program production, realizes efficient generation of multi-person dialogue programs, and ensures the quality, authenticity and simulation of the program.
Smart Images

Figure CN119558406A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of artificial intelligence technology. More specifically, the embodiments of the present disclosure relate to a dialogue program generation method, a dialogue program generation device, a computer-readable storage medium, and an electronic device. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the disclosure that are recited in the claims, and no description herein is admitted to be prior art by inclusion in this section.
[0003] At present, when the industry produces interpretation programs for a certain content, it usually invites a single anchor to express opinions or repeat the content for a given content. This method not only requires high manpower and material resources, but also takes into account the anchor's time. In addition, the performance form of a single anchor is single, and it is impossible to ensure the high quality of the content while ensuring the interest of users. Summary of the invention
[0004] However, currently, the existing technology lacks an effective way to generate high-quality, in-depth multi-person dialogue programs without relying on manual production.
[0005] Therefore, there is a great need for a dialogue program generation method that can effectively and conveniently generate high-quality dialogue programs.
[0006] In this context, embodiments of the present disclosure are intended to provide a dialogue program generation method, a dialogue program generation device, a computer-readable storage medium, and an electronic device.
[0007] According to a first aspect of the present disclosure, a method for generating a dialogue program is provided, comprising: obtaining first prompt information for generating a target dialogue program; obtaining role information of dialogue characters participating in the target dialogue program; processing the first prompt information and the role information through a dialogue generation model to generate dialogue text information; and generating the target dialogue program according to the dialogue text information.
[0008] According to a second aspect of the present disclosure, a dialogue program generation device is provided, including: a prompt information acquisition module, used to acquire first prompt information for generating a target dialogue program; a role information acquisition module, used to acquire role information of dialogue roles participating in the target dialogue program; a text information generation module, used to process the first prompt information and the role information through a dialogue generation model to generate dialogue text information; and a dialogue program generation module, used to generate the target dialogue program according to the dialogue text information.
[0009] According to a third aspect of the present disclosure, there is provided a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for generating a dialogue program according to the first aspect and possible implementation methods thereof are implemented.
[0010] According to a fourth aspect of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the dialogue program generation method of the above-mentioned first aspect and its possible implementation method by executing the executable instructions.
[0011] In the scheme disclosed in the present invention, on the one hand, this exemplary embodiment proposes a new method for generating a dialogue program, which can process the first prompt information and role information through a dialogue generation model to generate dialogue text information, and further generate a target dialogue program based on the dialogue text information, thereby eliminating the problem that the dialogue program must rely on the participation of the host, and the program production process requires less human operation, thereby reducing the manpower cost and time cost of generating the dialogue program; on the other hand, this exemplary embodiment can generate the corresponding dialogue text information through an intelligent process based on the given prompt information, and the dialogue program generation method is simple, convenient, and efficient, and can ensure the quality level of the generated dialogue program, with high richness and stability; on the other hand, this exemplary embodiment obtains the role information of the dialogue role participating in the target dialogue program, combines the first prompt information, and generates the target dialogue program, thereby realizing the efficient generation of multi-person dialogue programs without relying on human operation. Since the basis for the generation of the target dialogue program includes the role information of the dialogue role, the target dialogue program can be combined with certain role characteristics to ensure the authenticity and simulation of the multi-person dialogue program. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 A schematic diagram showing a system architecture in this exemplary embodiment.
[0013] Figure 2 A flowchart of a method for generating a dialogue program in this exemplary embodiment is shown.
[0014] Figure 3 A schematic diagram showing audio information corresponding to multiple paragraph texts in this exemplary embodiment.
[0015] Figure 4 A schematic diagram showing the architecture of a method for generating a dialogue program in this exemplary embodiment.
[0016] Figure 5 A schematic diagram of a display interface for obtaining character information in this exemplary embodiment is shown.
[0017] Figure 6A schematic diagram of the structure of a dialogue program generating device in this exemplary embodiment is shown.
[0018] Figure 7 A schematic structural diagram of an electronic device in this exemplary embodiment is shown.
[0019] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0020] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0021] The embodiments of the present disclosure may be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0022] The principle and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure. SUMMARY OF THE INVENTION
[0024] The inventors have found that, in the conversational programs currently produced in the industry, most of the content is performed by a single host, and there is a lack of talk shows. In addition, program production relies on manual production, which has high labor and time costs.
[0025] In view of the above, the present disclosure provides a method for generating a dialogue program, a device for generating a dialogue program, a computer-readable storage medium, and an electronic device. On the one hand, the exemplary embodiment proposes a new method for generating a dialogue program, which can process the first prompt information and the role information through a dialogue generation model to generate dialogue text information, and further generate a target dialogue program based on the dialogue text information, thereby eliminating the problem that the dialogue program must rely on the participation of the anchor, and the program production process requires less manual operation, thereby reducing the manpower cost and time cost of generating the dialogue program; on the other hand, the exemplary embodiment can generate the corresponding dialogue text information through an intelligent process according to the given prompt information, and the dialogue program generation method is simple, convenient, and efficient, and can ensure the quality level of the generated dialogue program, with high richness and stability; on the other hand, the exemplary embodiment obtains the role information of the dialogue role participating in the target dialogue program, combines the first prompt information, generates the target dialogue program, and realizes the efficient generation of multi-person dialogue programs without relying on manual operation. Since the basis for the generation of the target dialogue program includes the role information of the dialogue role, the target dialogue program can be combined with certain role characteristics to ensure the authenticity and simulation of the multi-person dialogue program.
[0026] After introducing the basic principles of the present disclosure, various non-limiting embodiments of the present disclosure are described in detail below.
[0027] Application Scenario Overview
[0028] It should be noted that the following application scenarios are only shown to facilitate understanding of the spirit and principle of the present disclosure, and the embodiments of the present disclosure are not limited in this respect. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.
[0029] The embodiments of the present disclosure can be applied to relevant scenarios of producing a podcast program of multi-person conversation. The application scenario is specifically described below in conjunction with the system architecture.
[0030] Figure 1 A schematic diagram of a system architecture of a method for generating a dialogue program is shown. The system architecture includes: a terminal device 110, a server 120, wherein the terminal device 110 may be a tablet computer or a personal computer used by a user, and the server 120 is used to receive first prompt information and role information uploaded by the terminal device 110, and process the first prompt information and role information using a dialogue generation model to generate dialogue text information, and generate a target dialogue program according to the dialogue text information, and return it to the terminal device 110.
[0031] It should be understood that Figure 1The data of each device shown in the figure is only exemplary. According to actual needs, any number of user terminals and servers can be set. The server can also be a server cluster composed of multiple servers.
[0032] Based on the above description, the method in this exemplary embodiment can be applied to Figure 1 On server 120 as shown.
[0033] Exemplary Methods
[0034] An exemplary embodiment of the present disclosure provides a method for generating a dialogue program. Figure 2 As shown, the method may include steps S210 to S240. Figure 2 Provide detailed instructions for each step.
[0035] refer to Figure 2 In step S210, first prompt information for generating a target dialogue program is obtained.
[0036] Among them, the target dialogue program refers to the dialogue program that needs to be generated. The dialogue program can be an interview program, a question-and-answer program or an exchange program with multiple characters as participants. The target dialogue program can be presented in the form of text, audio, and video. The first prompt information refers to the prompt word information used to generate the target dialogue program, which can be the basic content used to generate the target dialogue program, such as articles, books, papers, recordings, videos, etc. In this exemplary embodiment, the first prompt information can be the basic content itself, which can be directly obtained. For example, an interactive interface can be provided for the user. Through interactive operations such as clicking, the user can directly upload complete papers, books, etc., such as uploading papers, articles, and other files in PDF (Portable Document Format), TXT, DOC, DOCX, etc. formats to directly obtain the complete paper, book content, etc. The first prompt information can also be partial content or feature information determined based on the complete content, which can be extracted from the original information, such as the paper name, paper abstract, book name, book introduction, book outline, etc. In addition, the first prompt information can be text information, such as the content of the paper, and the first prompt information can also be audio information or video information, such as audio based on the paper, or video of a documentary, etc.
[0037] In step S220, role information of dialogue characters participating in the target dialogue program is obtained.
[0038] The target dialogue program refers to a dialogue performance between multiple participating roles, and therefore, it involves dialogue roles participating in the target dialogue program. In this exemplary embodiment, the dialogue roles can be two, three, etc. The specific number can be customized according to the properties, complexity, program requirements, etc. of the target dialogue program, and the present disclosure does not specifically limit this. In order to ensure the accuracy of generating the target dialogue program, this exemplary embodiment can also obtain role information of the dialogue role, and the role information refers to information related to the dialogue role, such as basic information such as the gender, age, and name of the dialogue role; or dialogue attribute information such as the viewpoint and cognitive setting of the dialogue role; or evaluation information related to the dialogue role, etc.
[0039] The role information can be obtained by providing a specific interface in the terminal device and based on the interaction between the user and the specific interface. For example, the user can enter the role information about the dialogue role in the interface, and the role information can also be pre-configured. In addition, the role information can be configured first and displayed in the specific interface and adjusted according to the actual needs of the user. For example, the opinion information of each dialogue role can be preset and displayed in the specific interface. According to the user's input operation, the opinion information can be changed or adjusted to obtain confirmed role information, etc.
[0040] In step S230, the first prompt information and the role information are processed by a dialogue generation model to generate dialogue text information.
[0041] Among them, the dialogue generation model refers to a model used to process the first prompt information and generate dialogue text information. In this exemplary embodiment, the dialogue generation model can be an LLM (Large Language Model) model. This exemplary embodiment can use the first prompt information and role information as input data of the dialogue generation model, and process the first prompt information and role information through the dialogue generation model to obtain dialogue text information. The dialogue text information can be text information of questions and answers, interviews, and exchanges generated by combining the first prompt information and the role information of the dialogue role, such as text information of dialogue role A and text information of dialogue role B, and the text information corresponding to each dialogue role in the dialogue text information is consistent with its role information, for example, the text information of dialogue role A is consistent with the viewpoint setting of dialogue role A, etc.
[0042] In order to improve the processing efficiency of the dialogue generation model, this exemplary embodiment can divide the first prompt information. For example, when the first prompt information is a paper, the paper can be divided into sentences or paragraphs to obtain first prompt information of multiple text sentences or paragraphs. Then, the dialogue generation model is used to process the divided first prompt information and the corresponding role information to generate dialogue text information corresponding to the first prompt information, so as to reduce the complexity of the input data and improve the efficiency and accuracy of the dialogue generation model in information processing.
[0043] In step S240, a target dialogue program is generated according to the dialogue text information.
[0044] After determining the dialogue text information, a target dialogue program can be generated based on the dialogue text information. When the target dialogue program is text, the dialogue text information can be directly used as the target dialogue program, or the dialogue text information can be processed, such as by tone enhancement, adding text expressions, etc., and then used as the target dialogue program; when the target dialogue program is audio, other machine learning models can be used to process the dialogue text information to convert the dialogue text information into audio data, and then generate a target dialogue program in audio format based on the audio data; when the target dialogue program is video, the dialogue text information can be converted into audio first, and the corresponding picture can be generated in combination with the role information of the dialogue characters, and the audio and the picture can be combined to obtain the target dialogue program in video format, and so on.
[0045] In an exemplary embodiment, the first prompt information may include first prompt text information. After acquiring the first prompt information for generating the target dialogue program, the dialogue program generating method may further include:
[0046] Divide the first prompt text information into one or more paragraph texts;
[0047] Furthermore, the above step S230, processing the first prompt information and the role information by the dialogue generation model to generate dialogue text information, may include:
[0048] The dialogue generation model is used to process each paragraph text and character information separately to generate dialogue text information corresponding to each paragraph text.
[0049] In this exemplary embodiment, the first prompt information can be the first prompt text information, such as specific text content in a paper or book. After obtaining the text content of the corresponding paper or book, this exemplary embodiment can divide it into one or more paragraph texts. The paragraph text refers to the sub-text content of the original text content divided based on characters or specific symbols. For example, the original text can be divided into one or more paragraph texts according to character symbols such as "space", "period", and "ellipsis".
[0050] Furthermore, the dialogue generation model can be used to process each paragraph text and role information respectively to generate dialogue text information corresponding to each paragraph text. For example, the original text can be divided into paragraph text a, paragraph text b and paragraph text c, and then paragraph text a and role information are used as input data of the dialogue generation model to obtain the dialogue text information of paragraph text a, paragraph text b and role information are used as input data of the dialogue generation model to obtain the dialogue text of paragraph text b, and paragraph text c and role information are used as input data of the dialogue generation model to obtain the dialogue text of paragraph text c. It should be noted that the processing process of different paragraph texts can be executed sequentially or simultaneously, and the present disclosure does not specifically limit this.
[0051] In an exemplary embodiment, the above-mentioned dividing the first prompt text information into one or more paragraphs of text may include:
[0052] Recognize preset characters in the first prompt text information, and divide the first prompt text information into a plurality of sentences according to the preset characters;
[0053] Traverse multiple sentences. If the sum of the number of characters of the current sentence and the current paragraph text to be divided does not exceed the preset character number threshold, the current sentence is divided into the current paragraph text to be divided; if the sum of the number of characters of the current sentence and the current paragraph text to be divided exceeds the preset character number threshold, the current paragraph text to be divided is determined as a divided paragraph text, and the current sentence is divided into the next paragraph text to be divided.
[0054] Among them, the preset characters can be specific characters used to divide information into sentences. The characters can be determined according to actual needs, such as determining "." as the preset character, or can be determined by the system based on experience, for example, multiple characters such as ".", "...", "space" and so on can be used as preset characters, etc. The first prompt text information can be divided into multiple sentences by the preset characters. In this exemplary embodiment, in order to ensure the consistency of the divided content, the preset character "space" can be first determined in the first prompt text information, and then the preset characters ".", "?", "!" and other characters indicating the end of the sentence can be searched, and the first prompt text information can be divided into multiple sentences according to these preset characters. Specifically, the recognition method of the preset characters can adopt a variety of methods, such as preset rules, regular expressions, or the use of character recognition models, etc., and the present disclosure does not make specific limitations on this.
[0055] Furthermore, multiple sentences in the first prompt text information can be traversed. If it is determined that the sum of the number of characters of the current sentence and the current paragraph text to be divided does not exceed the preset character number threshold, the current sentence is divided into the current paragraph text to be divided. For example, the current sentence plus the character "." has a total of 15 characters, and 30 characters have been divided in the current paragraph text to be divided. Then the sum of the number of characters of the current sentence and the current paragraph text to be divided is 45 characters, which is less than the preset character number threshold of 50. In this case, the current sentence can be divided into the current paragraph text to be divided. If it is determined that the sum of the number of characters of the current sentence and the current paragraph text to be divided exceeds the preset character number threshold, If the character quantity threshold is greater than 50, the current paragraph text to be divided is determined as the divided paragraph text, and the current sentence is divided into the next paragraph text to be divided. For example, the current sentence plus the character "." is 15 characters in total, and 40 characters have been divided in the current paragraph text to be divided. The sum of the number of characters of the current sentence and the current paragraph text to be divided is 55 characters, which exceeds the preset character quantity threshold of 50. Then, the 40 characters that have been divided in the current paragraph text can be determined as the divided paragraph text, and the current sentence can be divided into the next paragraph text to be divided. The next paragraph text to be divided can be the next paragraph text adjacent to the divided paragraph text. The preset character quantity threshold can be determined according to actual needs, for example, it can be set to 50, 100, etc., and the specific numerical value is not specifically limited in this disclosure.
[0056] Taking an article as the first prompt information as an example, this exemplary embodiment provides an example code for dividing the first prompt text information into paragraphs, which is as follows:
[0057]
[0058]
[0059] In an exemplary embodiment, the above-mentioned processing of each paragraph text and role information by the dialogue generation model to generate dialogue text information corresponding to each paragraph text may include:
[0060] Combining each paragraph text and the role information respectively to obtain the second prompt information corresponding to each paragraph text;
[0061] Each second prompt information is processed separately by the dialogue generation model to generate dialogue text information corresponding to each second prompt information.
[0062] After multiple paragraph texts are obtained through division, each paragraph text can be combined with the role information to obtain second prompt information corresponding to each paragraph text. The second prompt information can be fusion prompt information of the paragraph text and the role information, for example, the paragraph text and the role information are concatenated to obtain a vector or a matrix. Furthermore, each second prompt information can be processed by a dialogue generation model to generate dialogue text information corresponding to each second prompt information.
[0063] In this exemplary embodiment, the same role information can be mapped to different paragraph texts. For example, after obtaining the role information, the same role information is used for each paragraph text to be processed. Different role information can also be used for different paragraph texts. For example, some paragraph texts involve more complex content and obvious conflicts of opinion. In this case, higher-dimensional role information can be used to combine with the paragraph text to obtain second prompt information, and the second prompt information can be processed by the dialogue generation model. The content of some paragraph texts is relatively simple, and only the identity information of the dialogue role needs to be clarified. In this case, simple role information can be used to assist in combining with the paragraph text to obtain second prompt information, and the second prompt information can be processed by the dialogue generation model. According to factors such as the complexity of the paragraph text, the corresponding role information is adjusted and determined to obtain the second prompt information corresponding to each paragraph text. The second prompt information can be processed by the dialogue generation model to improve the pertinence and accuracy of processing different paragraph texts and to improve the model processing efficiency.
[0064] The following shows an example of calling a dialogue generation model to process the second prompt information and generate corresponding dialogue text information:
[0065] [{
[0066] "roleName":"tom",
[0067] "content":"Hey everyone! I'm Tom and welcome to our podcast. Today, we have a super interesting topic to talk about."
[0068] },
[0069] {
[0070] "roleName":"tom",
[0071] "content":"Before we start, I would like to introduce a special guest, xiaohu."
[0072] },
[0073] {
[0074] "roleName":"xiaohu",
[0075] "content":"Hi, I'm xiaohu. I'm very happy to talk to you today about "Thinking, Fast and Slow."
[0076] },
[0077] {
[0078] "roleName":"tom",
[0079] "content":"That's right. You know, I've been feeling really stressed lately, with work, family, and the never-ending to-do list."
[0080] } ]
[0082] In an exemplary embodiment, the above step S240, generating a target dialogue program according to the dialogue text information, may include:
[0083] Corresponding multimedia information is generated according to the dialogue text information, and a target dialogue program is generated based on the multimedia information.
[0084] Among them, multimedia information can be audio information or video information. For example, corresponding audio information can be generated based on dialogue text information, that is, the dialogue text information is presented in the form of dialogue characters speaking; or corresponding video information can be generated based on dialogue text information, such as combining the audio corresponding to the dialogue text information and the picture including the dialogue characters to generate a corresponding dialogue video, etc. Furthermore, a target dialogue program can be generated based on the multimedia information. For example, the multimedia information can be directly used as the target dialogue program, or the multimedia information can be processed to generate the target dialogue program. Among them, the processing of multimedia information can, for example, crop the audio, insert frames, add stickers, add subtitles, etc.
[0085] In an exemplary embodiment, the multimedia information may include audio information, and the generating of corresponding multimedia information according to the conversation text information may include:
[0086] The conversation text information is processed through the text-to-speech conversion model to generate corresponding audio information.
[0087] Among them, the text-to-speech model refers to a machine learning model that can convert text into speech. In this exemplary embodiment, the text-to-speech model can be a TTS (Text-to-Speech, text-to-speech conversion technology) model. This exemplary embodiment can use the dialogue text information as the input data of the text-to-speech model, and after processing, obtain the corresponding audio information. When the text information is text information corresponding to multiple paragraphs of text, the text information corresponding to the multiple paragraphs of text can be input into the text-to-speech conversion model sequentially or in parallel to generate the corresponding audio information. Then, the multiple audio information are merged in a certain order to obtain the complete audio information, or the target dialogue program. Figure 3 As shown, a schematic diagram of audio information corresponding to multiple paragraphs of text is shown, which may include a sliding node for audio. The user can slide the sliding node to move to a specified position to listen to the corresponding content. The audio information may also correspond to text information and role information, such as text content and role name. The text content can be set to display a cursor that moves with the audio playback, etc.
[0088] Figure 4 A schematic diagram of the process architecture of a method for generating a dialogue program in this exemplary embodiment is shown, which may specifically include the following steps:
[0089] Acquire original text information 402 used to generate the target dialogue program as first prompt information;
[0090] The original text information is preprocessed 404; the preprocessing may include: security check 406 and format check 408. The security check 406 may be used to perform security anti-spam check on the uploaded original text information 402 to ensure the security of the original text information and further improve the effectiveness of generating the target dialogue program. The format check 408 may be used to perform format check on the uploaded original text information 402. For example, if the uploaded file format is set to PDF, TXT, or DOC, the format of the uploaded original text information 402 needs to be format checked to determine whether it matches the specified file format.
[0091] The first prompt text information is segmented 410 to obtain multiple paragraph texts 412; the multiple paragraph texts 412 can be arranged in order according to the positions of the paragraphs in the original text information, namely, the head segment, the middle segment 1, the middle segment 2, the middle segment 3, and the tail segment;
[0092] Through a dialogue generation model 414, such as an LLM model, each of the paragraph texts 412 and the role information 416 is processed to generate dialogue text information corresponding to each paragraph text; the dialogue text information can be standardized in a specific format, that is, formatted dialogue text information 418 is output; wherein the role information 416 can be determined by user settings, can also be determined by system configuration, can also be determined by user input information combined with system configuration information, etc.;
[0093] The multiple dialogue text information 420 is processed by a text-to-speech conversion model 422, such as a TTS model, to generate corresponding audio information 424; wherein the multiple dialogue text information 420 may include dialogue text information 1, dialogue text information 2, dialogue text information 3, dialogue text information 4, and dialogue text information 5, which may correspond to the head segment, the middle segment 1, the middle segment 2, the middle segment 3, and the tail segment respectively, and the generated audio information 424 may correspond to the audio information 1, the audio information 2, the audio information 3, the audio information 4, and the audio information 5 respectively;
[0094] The plurality of audio information 424 is subjected to audio synthesis processing 426, and a target dialogue program is generated based on the synthesized audio.
[0095] It should be noted that Figure 4 This is only an exemplary illustration. In actual applications, the number of segments dividing paragraphs, dialogue text information, audio information, and dialogue roles participating in the dialogue may include multiple ones, and the present disclosure does not make specific limitations on this.
[0096] In an exemplary embodiment, the above-mentioned dialogue roles include multiple ones, and the above-mentioned step S220, obtaining the role information of the dialogue roles participating in the target dialogue program, may include:
[0097] In response to receiving a preset operation input by a user, obtaining role information corresponding to each dialogue role respectively;
[0098] The role information at least includes basic information of the dialogue role, identity information of the dialogue role participating in the target dialogue program, and viewpoint information of the dialogue role in the target dialogue program.
[0099] Among them, the preset operation can be an operation input by the user for determining the role information of the dialogue role, such as a text input operation, a role information selection operation, or a voice input operation. In this exemplary embodiment, a graphical user interface can be provided to the user, and the user can enter the role information of the dialogue role by performing preset operations in the graphical user interface, or select or adjust the provided role information. For example, the user can directly enter the opinion preference for the dialogue role, or the graphical user interface can provide the name option of the dialogue role a, and the user can select the name by clicking, etc.
[0100] Figure 5 A display interface provided for users in this exemplary embodiment is shown, which includes the related file of the uploaded first prompt information "Author A.pdf of "xxxx", which can display the upload progress, and also includes the name of the current target dialogue program "Lifelong Growth Talk", as well as the information of the dialogue characters participating in the dialogue, such as the name, gender, introduction and other information of character A and character B.
[0101] In this exemplary embodiment, the role information may include the basic information of the dialogue role, such as the name, gender, age group, timbre, speaking speed, etc. of the dialogue role; it may include the identity information of the dialogue role participating in the target dialogue program, such as the identity information may be the questioner, answerer, host, interviewer, interviewee, etc.; it may include the opinion information of the dialogue role in the target dialogue program. For example, when generating a target dialogue program for a certain paper, it can be preset that dialogue role a holds the opinion that agrees with the conclusion of the paper, and it can be preset that dialogue role b holds the opinion that has reservations about the conclusion of the paper, does not fully agree with it, etc. Based on this opinion information, information mining can be performed on the content of the paper to generate an interview program with different or opposing opinions.
[0102] In addition, in this exemplary embodiment, other prompt information can also be obtained and input into the dialogue generation model together with the first prompt information and role information to generate dialogue text information. For example, evaluation information about the first prompt information can be obtained through user input or platform search, such as obtaining review information about a novel, or the user's understanding and evaluation information of the novel, etc., so that the dialogue generation model can generate in-depth and valuable target dialogue programs from multiple dimensions.
[0103] Exemplary Devices
[0104] The exemplary embodiment of the present disclosure also provides a dialogue program generation device. Figure 6 As shown, the dialogue program generating device 600 may include the following program modules: a prompt information acquiring module 610, used to acquire first prompt information for generating a target dialogue program; a role information acquiring module 620, used to acquire role information of dialogue roles participating in the target dialogue program; a text information generating module 630, used to process the first prompt information and role information through a dialogue generating model to generate dialogue text information; and a dialogue program generating module 640, used to generate a target dialogue program according to the dialogue text information.
[0105] In one embodiment, the first prompt information includes first prompt text information. After obtaining the first prompt information for generating the target dialogue program, the dialogue program generation device also includes: a paragraph division module, used to divide the first prompt text information into one or more paragraph texts; a text information generation module 630, including: a dialogue text information generation unit, used to process each paragraph text and role information respectively through a dialogue generation model to generate dialogue text information corresponding to each paragraph text.
[0106] In one embodiment, the paragraph division module includes: a sentence division unit, which is used to identify preset characters in the first prompt text information and divide the first prompt text information into multiple sentences according to the preset characters; a sentence traversal unit, which is used to traverse multiple sentences, and if the sum of the number of characters of the current sentence and the current paragraph text to be divided does not exceed the preset character number threshold, the current sentence is divided into the current paragraph text to be divided; if the sum of the number of characters of the current sentence and the current paragraph text to be divided exceeds the preset character number threshold, the current paragraph text to be divided is determined as a divided paragraph text, and the current sentence is divided into the next paragraph text to be divided.
[0107] In one embodiment, the dialogue text information generation unit includes: an information combination subunit, which is used to combine each paragraph text and role information respectively to obtain second prompt information corresponding to each paragraph text; an information processing subunit, which is used to process each second prompt information respectively through a dialogue generation model to generate dialogue text information corresponding to each second prompt information.
[0108] In one implementation, the dialogue program generation module 640 includes: a target dialogue program generation unit, configured to generate corresponding multimedia information according to dialogue text information, and generate a target dialogue program based on the multimedia information.
[0109] In one embodiment, the target dialogue program generating unit includes: a text-to-speech conversion subunit, which is used to process dialogue text information through a text-to-speech conversion model to generate corresponding audio information.
[0110] In one embodiment, the dialogue roles include multiple, and the role information acquisition module 620 includes: a role information acquisition unit, which is used to obtain the role information corresponding to each dialogue role in response to receiving a preset operation input by the user; the role information includes at least the basic information of the dialogue role, the identity information of the dialogue role participating in the target dialogue program, and the opinion information of the dialogue role in the target dialogue program.
[0111] In addition, other specific details of the embodiments of the present disclosure have been described in detail in the embodiments of the above method and will not be repeated here.
[0112] Exemplary Storage Media
[0113] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned method of the present disclosure when the computer program is executed by a processor. The above-mentioned method can be implemented by a program product, such as a portable compact disk read-only memory (CD-ROM) and including program code, and can be run on a device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0114] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0115] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0116] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RE, etc., or any suitable combination of the foregoing.
[0117] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user computing device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0118] Exemplary Electronic Devices
[0119] The exemplary embodiment of the present disclosure also provides an electronic device. The electronic device includes a processor and a memory, and the memory is used to store executable instructions of the processor. The processor is configured to execute the above method of the present disclosure by executing the executable instructions.
[0120] refer to Figure 7 An electronic device according to an exemplary embodiment of the present disclosure is described. Figure 7 The electronic device 700 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0121] like Figure 7 As shown, the electronic device 700 is in the form of a general computing device. The components of the electronic device 700 may include but are not limited to: at least one processing unit 710, at least one storage unit 720, and a bus 730 connecting different system components (including the storage unit 720 and the processing unit 710).
[0122] The storage unit stores program codes, which can be executed by the processing unit 710, so that the processing unit 710 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 710 can perform the following steps: Figure 2 The method steps shown, etc.
[0123] The storage unit 720 may include a volatile storage unit, such as a random access storage unit (RAM) 721 and / or a cache storage unit 722 , and may further include a read-only storage unit (ROM) 723 .
[0124] The storage unit 720 may also include a program / utility 724 having a set (at least one) of program modules 725, such program modules 725 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0125] The bus 730 may include a data bus, an address bus, and a control bus.
[0126] The electronic device 700 may also communicate with one or more external devices 800 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), and such communication may be performed via an input / output (I / O) interface 740. The electronic device 700 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 750. As shown, the network adapter 750 communicates with other modules of the electronic device 700 via a bus 730. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0127] It should be noted that, although several modules or submodules of the device are mentioned in the above detailed description, such division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.
[0128] In addition, although the operations of the disclosed method are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0129] Although the spirit and principle of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present disclosure is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims.
Claims
1. A method for generating a dialogue program, characterized in that: include: Acquiring first prompt information for generating a target dialogue program; Acquire role information of dialogue roles participating in the target dialogue program; Processing the first prompt information and the role information through a dialogue generation model to generate dialogue text information; The target dialogue program is generated according to the dialogue text information.
2. The method according to claim 1, characterized in that The first prompt information includes first prompt text information. After acquiring the first prompt information for generating the target dialogue program, the method further includes: Divide the first prompt text information into one or more paragraph texts; The step of processing the first prompt information and the role information by using a dialogue generation model to generate dialogue text information includes: The paragraph texts and character information are processed separately through the dialogue generation model to generate dialogue text information corresponding to each paragraph text.
3. The method according to claim 2, characterized in that The step of dividing the first prompt text information into one or more paragraphs of text includes: identifying preset characters in the first prompt text information, and dividing the first prompt text information into a plurality of sentences according to the preset characters; Traverse the multiple sentences, and if the sum of the number of characters of the current sentence and the current paragraph text to be divided does not exceed the preset character number threshold, divide the current sentence into the current paragraph text to be divided; if the sum of the number of characters of the current sentence and the current paragraph text to be divided exceeds the preset character number threshold, determine the current paragraph text to be divided as a divided paragraph text, and divide the current sentence into the next paragraph text to be divided.
4. The method according to claim 2, characterized in that: The dialogue generation model is used to process each of the paragraph texts and the role information to generate dialogue text information corresponding to each paragraph text, including: Combining each paragraph text with the role information respectively to obtain second prompt information corresponding to each paragraph text; Each second prompt information is processed respectively by the dialogue generation model to generate dialogue text information corresponding to each second prompt information.
5. The method according to claim 1, characterized in that The step of generating the target dialogue program according to the dialogue text information includes: Corresponding multimedia information is generated according to the dialogue text information, and the target dialogue program is generated based on the multimedia information.
6. The method according to claim 5, characterized in that The multimedia information includes audio information; and the generating corresponding multimedia information according to the conversation text information includes: The dialogue text information is processed through a text-to-speech conversion model to generate corresponding audio information.
7. The method according to claim 1, characterized in that The dialogue roles include a plurality of roles; the step of obtaining role information of the dialogue roles participating in the target dialogue program includes: In response to receiving a preset operation input by a user, respectively obtaining role information corresponding to each dialogue role; The role information includes at least basic information of the dialogue role, identity information of the dialogue role participating in the target dialogue program, and viewpoint information of the dialogue role in the target dialogue program.
8. A dialogue program generating device, characterized in that: include: A prompt information acquisition module, used to acquire first prompt information for generating a target dialogue program; A role information acquisition module, used to acquire role information of dialogue roles participating in the target dialogue program; A text information generation module, used for processing the first prompt information and the role information through a dialogue generation model to generate dialogue text information; A dialogue program generating module is used to generate the target dialogue program according to the dialogue text information.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 7 by executing the executable instructions.