Interactive content generation method, device, electronic device and readable storage medium

By prompting the generator to identify the platform content and generate interactive prompt information, input it to the large language model, it solves the problem that the model cannot recognize the content of different platforms, resulting in large deviations, and realizes the accurate generation of interactive content.

CN117725893BActive Publication Date: 2025-07-25SHUXING TECH (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311264953.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-27
Publication Date
2025-07-25
Estimated Expiration
2043-09-27

AI Technical Summary

Technical Problem

In the prior art, the model cannot clearly identify platform content of different platform types and content types, resulting in too large deviations from the actual interaction content generated.

Method used

The platform content is identified through the preset prompt generator, the interaction prompt information is determined, and the interaction prompt information is input to the large language model to generate interactive content.

Benefits of technology

The interactive content generated by the large language model is optimized to make it more in line with the needs of the platform content and avoid the deviation between the interactive content and the actual situation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117725893B_ABST
    Figure CN117725893B_ABST
Patent Text Reader

Abstract

The present application discloses an interactive content generation method, apparatus, electronic device, and computer-readable storage medium. In the embodiments of the present application, platform content for which interactive content is to be generated is obtained; the above platform content is identified by a preset prompt generator, and based on the identification result of the above platform content, interactive prompt information corresponding to the above platform content is determined; the above interactive prompt information is input into a preset large language model, and the above large language model generates interactive content corresponding to the above platform content based on the above interactive prompt information. The embodiments of the present application can avoid a large deviation between the content interacting with the platform content and the actual situation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of content generation technology, and in particular to an interactive content generation method, device, electronic device and computer-readable storage medium. Background Art

[0002] In the wave of the Internet, people often share content containing graphic data such as notes and videos on some social platforms for sharing experiences, posting advertisements, or making certain requests for help. Sometimes, it is necessary to generate corresponding interactive content for the platform content published on the platform to interact with the platform content.

[0003] In the prior art, generally, a model can be used to automatically generate interactive content. However, due to the different types of platforms and the various types of content on the platforms, the model cannot clearly identify the corresponding platform content, resulting in a large deviation between the interactive content for interacting with the platform content and the actual situation. Summary of the Invention

[0004] Embodiments of this application provide an interactive content generation method, device, electronic device and computer-readable storage medium, which can avoid a large deviation between the interactive content for interacting with the platform content and the actual situation.

[0005] In a first aspect, embodiments of this application provide an interactive content generation method, and the method includes:

[0006] Obtain platform content for which interactive content is to be generated;

[0007] Identify the above platform content through a preset prompt generator, and determine interactive prompt information corresponding to the above platform content based on the identification result of the above platform content;

[0008] Input the above interactive prompt information into a preset large language model, and generate interactive content corresponding to the above platform content through the above large language model based on the above interactive prompt information.

[0009] In a second aspect, embodiments of this application further provide an interactive content generation device, and the device includes:

[0010] A content acquisition module, configured to obtain platform content for which interactive content is to be generated;

[0011] An identification module, configured to identify the above platform content through a preset prompt generator, and determine interactive prompt information corresponding to the above platform content based on the identification result of the above platform content;

[0012] A content generation module, configured to input the above-mentioned interaction prompt information into a preset large language model, and generate interaction content corresponding to the above-mentioned platform content based on the above-mentioned interaction prompt information by the above-mentioned large language model.

[0013] In a third aspect, an embodiment of the present application further provides an electronic device, including a memory storing multiple instructions; the processor loads the instructions from the memory to execute the steps in any one of the interaction content generation methods provided by the embodiments of the present application.

[0014] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores multiple instructions, and the instructions are suitable for being loaded by a processor to execute the steps in any one of the interaction content generation methods provided by the embodiments of the present application.

[0015] In the embodiments of the present application, by obtaining the platform content for which interaction content is to be generated, then identifying the above-mentioned platform content through a preset prompt generator, and determining the interaction prompt information corresponding to the above-mentioned platform content based on the recognition result of the above-mentioned platform content to optimize the platform content, and finally inputting the above-mentioned interaction prompt information into a preset large language model, and generating interaction content corresponding to the above-mentioned platform content based on the above-mentioned interaction prompt information by the above-mentioned large language model, so that by optimizing the platform content, the interaction content generated by the large language model is more in line with the requirements of the platform content, and the interaction content for interacting with the platform content is avoided from having too large an actual deviation. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0017] Figure 1 is a schematic flowchart of an embodiment of the interaction content generation method provided by an embodiment of the present application;

[0018] Figure 2 is a schematic diagram of a scenario of the interaction content generation method provided by an embodiment of the present application;

[0019] Figure 3 is another schematic diagram of a scenario of the interaction content generation method provided by an embodiment of the present application;

[0020] Figure 4 is a schematic structural diagram of the interaction content generation device provided by an embodiment of the present application;

[0021] Figure 5It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0022] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.

[0023] Before explaining the embodiments of the present application in detail, some terms related to the embodiments of the present application will be explained.

[0024] Among them, in the description of the embodiments of the present application, terms such as "first" and "second" may be used in this article to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. In addition, the terms "include" and "have" and any of their deformations are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those clearly listed steps or units, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products or devices.

[0025] The embodiments of the present application provide an interactive content generation method, device, electronic device and computer-readable storage medium. Specifically, the interactive content generation method of the embodiments of the present application can be executed by an electronic device, where the electronic device can be a terminal or a server and other devices. The terminal can be a smart phone, a tablet computer, a notebook computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA) and other terminal devices. The terminal can also include a client, and the client can be a game application client, a browser client with a game program or an instant messaging client, etc. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0026] For example, the electronic device is described by taking a terminal as an example. The terminal can obtain the platform content for which interactive content is to be generated; identify the above platform content through a preset prompt generator, and determine the interactive prompt information corresponding to the above platform content based on the recognition result of the above platform content; input the above interactive prompt information into a preset large language model, and the above large language model generates the interactive content corresponding to the above platform content based on the above interactive prompt information.

[0027] Based on the above problems, the embodiments of the present application provide an interactive content generation method, device, electronic device, and computer-readable storage medium, which can avoid the interactive content for interacting with the platform content from deviating too much from the actual situation.

[0028] The following will be described in detail with reference to the accompanying drawings respectively. It should be noted that the description order of the following embodiments does not limit the preferred order of the embodiments. Although the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order from that shown in the drawings.

[0029] In this embodiment, a terminal is taken as an example for description. This embodiment provides an interactive content generation method, as Figure 1 shown, the specific process of this interactive content generation method can be as follows:

[0030] 101. Obtain the platform content for which interactive content is to be generated.

[0031] Among them, the above platform is the carrier of the content. Depending on the different attributes of different platforms, the corresponding platform content is different. For example, a text platform, a graphic and text platform, a video platform, an audio platform, a website, a public account, a self-media, etc. Correspondingly, the above platform content can be a note, an article, a video, a picture, an audio, etc. Correspondingly, the interactive content for interacting with the platform content can be a comment on the platform content, content information related to the platform content, and a reply content for the platform content.

[0032] Exemplarily, when the platform content is a note about a beauty product, the interactive content can be the detailed information about the beauty product in the note, or the merchant information that can trade the beauty product, etc.; or, when the platform content is an article and a certain question is raised in the article, then the interactive content can be a reply to the question.

[0033] In this embodiment, the terminal processes the platform content by obtaining the platform content for which interactive content is to be generated, so as to generate the corresponding interactive content.

[0034] 102. Identify the above platform content through a preset prompt generator, and based on the recognition result of the above platform content, determine the interactive prompt information corresponding to the above platform content.

[0035] Among them, the above prompt generator is used to generate corresponding prompt information based on the platform content to indicate the meaning pointed to by the platform content, that is, to exclude the interference factors of the platform content, refine the platform content, and concisely explain the platform content. For example, if the platform content is a recommendation for a certain beauty product, and the platform content shows multiple advantages of the beauty product, post - use experience of the beauty product and other relevant information about the beauty product, then the interactive prompt information can be "Recommend beauty product".

[0036] In this embodiment, a targeted interactive prompt information is generated through the above - mentioned prompt generator. The interactive prompt information can be a prompt statement, and by automatically generating the interactive prompt information, the generation speed of the interactive content of the platform content is accelerated.

[0037] Specifically, the above prompt generator can be generated using technologies such as llama and bloomz.

[0038] In some embodiments, since different platforms have different attributes, corresponding to different platform contents, and the types of different platform contents on the same platform are also diverse, some are for recommending products, some are for sending out help requests, such as requests for whitening help, and the ways of generating interactive prompt information for different types of platform contents are also different.

[0039] Specifically, the above process of identifying the above platform content through a preset prompt generator and determining the interactive prompt information corresponding to the above platform content based on the recognition result of the above platform content may include: identifying the above platform content through the above prompt generator to determine the content type of the above platform content; determining the prompt generation method of the above platform content based on the content type of the above platform content, and determining the interactive prompt information corresponding to the above platform content according to the above prompt generation method.

[0040] Among them, the above content type includes but is not limited to help - seeking type, recommendation type, complaint type, etc. Therefore, the prompt generation methods corresponding to different content types are different. For example, for platform content of the help - seeking type, the prompt generation method of the prompt generator can be to abbreviate the platform content to retain the help - seeking information; while for platform content of the recommendation type, the prompt generation method of the prompt generator can be to merge the content recommended by the platform content for prompting, so as to prompt the large - language model to generate interactive content based on the recommended content.

[0041] In some embodiments, the above platform content includes platform pictures and platform text information. The above preset prompt generator is used to identify the above platform content, and based on the recognition result of the above platform content, the corresponding interaction prompt information of the above platform content can be determined, which may include: The terminal can respectively extract features from the above platform pictures and the above platform text information through the above prompt generator to obtain picture features and text features. Then, through the above prompt generator, based on the above picture features and the above text features, the recognition result of the above platform content is determined. Finally, through the above prompt generator, based on the recognition result of the above platform content, the corresponding interaction prompt information of the above platform content is determined.

[0042] 103. Input the above interaction prompt information into a preset large language model, and through the above large language model, based on the above interaction prompt information, generate the interaction content corresponding to the above platform content.

[0043] In this embodiment, the terminal uses the interaction prompt information to prompt the large language model to generate interaction content that better meets the user's expectations, improving the effect of the large language model in specific tasks. In addition, it also avoids the cost of optimizing and customizing for downstream tasks applied by the large language model, so as to perform targeted optimization for downstream task alignment without fine-tuning the parameters of the large language model through the interaction prompt information.

[0044] Specifically, the above large language model can be generated using technologies such as ChatGPT and GPT-4.

[0045] Exemplarily, as Figure 2 shown, the terminal inputs the platform content into the prompt generator so that the prompt generator outputs interaction prompt information and inputs the interaction prompt information into the large language model, thereby prompting the large language model to generate the interaction content corresponding to the above platform content based on the interaction prompt information.

[0046] In some embodiments, in order to clarify the quality of the interaction content corresponding to the platform generated by the above large language model, in this embodiment, the terminal introduces a discriminator, which can be generated using BERT technology and is not limited here.

[0047] Specifically, after generating the interactive content corresponding to the above platform content, it may further include: inputting the above platform content and the interactive content corresponding to the above platform content into a preset discriminator, so that the discriminator generates a content score based on the above platform content and the interactive content corresponding to the above platform content. This content score is used to indicate the quality of the interactive content corresponding to the platform content, that is, to determine whether the interactive content can correspond to the above platform content. For example, if the platform content is a help request question, then the interactive content may be the answer to the question, and the discriminator can determine whether the answer to the question can answer the above help request question. Finally, the terminal updates the parameters of the above prompt generator based on the above content score. Among them, the terminal can generate rewards through a reinforcement learning algorithm to update the above prompt generator, as Figure 3 shown. Among them, the above reinforcement learning algorithm can be implemented by PPO technology, Deep Q-learning technology, etc., which is not limited here.

[0048] In some embodiments, before inputting the above platform content and the interactive content corresponding to the above platform content into a preset discriminator, it may further include: the terminal obtains a discriminant sample set. One discriminant sample in the above discriminant sample set includes the platform content and the interactive content corresponding to the above platform content, and the label of the above discriminant sample is the content score corresponding to the above platform content. Then, the terminal constructs the above discriminator through the above discriminant sample set, and trains the above discriminator through the discriminant samples in the above discriminant sample set until the above discriminator meets the preset convergence condition.

[0049] Exemplarily, it can be set that the above platform content is "Please create an argumentative essay based on the following topic, within 800 words and full of emotion". Then the interactive content corresponding to the above platform content is also multiple argumentative essays, and a score is set for each argumentative essay. Thus, based on the question, multiple argumentative essays, and the scores corresponding to multiple argumentative essays respectively, the discriminator is trained to enable the trained discriminator to score the argumentative essays.

[0050] In some embodiments, before the above platform content is recognized by a preset prompt generator, it may further include: the terminal obtains historical platform content, the interactive content corresponding to the above historical platform content, and the content score corresponding to the above historical platform content. Then, based on the above historical platform content, the interactive content corresponding to the above historical platform content, and the content score corresponding to the above historical platform content, a prompt sample set of the above prompt generator is constructed. Finally, the above prompt generator is constructed through the above prompt sample set, and the above prompt generator is trained through the prompt samples in the above prompt sample set until the above prompt generator meets the preset convergence condition.

[0051] Exemplarily, based on the above example, inputting "Please create an argumentative essay according to the following topic, with a requirement of within 800 words and full of emotion" into the prompt generator can obtain corresponding interactive prompt information. Inputting this interactive prompt information into the large language model can obtain a created composition. Using a discriminator to score the created composition, generating a reward based on this score to update the above prompt generator until the above prompt generator meets the preset convergence condition.

[0052] In some embodiments, after generating the content score, it may further include: if there are at least two pieces of interactive content corresponding to the above platform content, then based on the content scores corresponding to at least two pieces of the above interactive content, sort the interactive content corresponding to the above platform content from high to low, and display the sorted interactive content corresponding to the platform content, so that users can preferentially see the interactive content that is more in line with the platform content.

[0053] It can be seen from the above content that by obtaining the platform content of the interactive content to be generated, then identifying the above platform content through a preset prompt generator, and based on the recognition result of the above platform content, determining the interactive prompt information corresponding to the above platform content to optimize the platform content, and finally inputting the above interactive prompt information into a preset large language model. Through the above large language model, based on the above interactive prompt information, generate the interactive content corresponding to the above platform content. Thus, by optimizing the platform content, the interactive content generated by the large language model is more in line with the requirements of the platform content, avoiding a large deviation between the interactive content interacting with the platform content and the actual situation.

[0054] To better implement the above method, an embodiment of the present application further provides an interactive content generation device. This interactive content generation device can be specifically integrated in an electronic device, such as a computer device, and this computer device can be a device such as a terminal or a server.

[0055] Among them, the terminal can be a device such as a mobile phone, a tablet computer, a smart Bluetooth device, a laptop computer, or a personal computer; the server can be a single server or a server cluster composed of multiple servers.

[0056] For example, in this embodiment, taking the interactive content generation device being specifically integrated in the terminal as an example, the method of the embodiment of the present application will be described in detail. This embodiment provides an interactive content generation device, as Figure 4 shown, this interactive content generation device may include:

[0057] A content acquisition module 401, configured to acquire the platform content of the interactive content to be generated;

[0058] The recognition module 402 is configured to recognize the above platform content through a preset prompt generator, and determine the interaction prompt information corresponding to the above platform content based on the recognition result of the above platform content;

[0059] The content generation module 403 is configured to input the above interaction prompt information into a preset large language model, and generate the interaction content corresponding to the above platform content through the above large language model based on the above interaction prompt information.

[0060] In some embodiments, the above interaction content generation device further includes an update module, and the update module is specifically configured to:

[0061] Input the above platform content and the interaction content corresponding to the above platform content into a preset discriminator, so that the discriminator generates a content score based on the above platform content and the interaction content corresponding to the above platform content;

[0062] Update the parameters of the above prompt generator based on the above content score.

[0063] In some embodiments, the above interaction content generation device further includes a first training module, and the first training module is specifically configured to:

[0064] Obtain a discriminant sample set, where a discriminant sample in the discriminant sample set includes platform content and the interaction content corresponding to the above platform content, and the label of the discriminant sample is the content score corresponding to the above platform content;

[0065] Construct the above discriminator through the above discriminant sample set, and train the above discriminator through the discriminant samples in the above discriminant sample set until the above discriminator meets the preset convergence condition.

[0066] In some embodiments, the above interaction content generation device further includes a second training module, and the second training module is specifically configured to:

[0067] Obtain historical platform content, the interaction content corresponding to the above historical platform content, and the content score corresponding to the above historical platform content;

[0068] Construct a prompt sample set of the above prompt generator based on the above historical platform content, the interaction content corresponding to the above historical platform content, and the content score corresponding to the above historical platform content;

[0069] Construct the above prompt generator through the above prompt sample set, and train the above prompt generator through the prompt samples in the above prompt sample set until the above prompt generator meets the preset convergence condition.

[0070] In some embodiments, the above interaction content generation device further includes a display module, and the display module is specifically configured to:

[0071] If there are at least two pieces of interaction content corresponding to the above platform content, then based on the content scores corresponding to at least two pieces of the above interaction content, sort the interaction content corresponding to the above platform content from high to low, and display the sorted interaction content corresponding to the platform content.

[0072] In some embodiments, the above recognition module 402 is specifically configured to:

[0073] Identify the above platform content through the above prompt generator to determine the content type of the above platform content;

[0074] Determine the prompt generation method of the above platform content based on the content type of the above platform content, and determine the interaction prompt information corresponding to the above platform content according to the above prompt generation method.

[0075] In some embodiments, the above platform content includes platform pictures and platform text information, and the above recognition module 402 is specifically configured to:

[0076] Extract features from the above platform picture and the above platform text information respectively through the above prompt generator to obtain picture features and text features;

[0077] Through the above prompt generator, based on the above picture features and the above text features, determine the recognition result of the above platform content;

[0078] Through the above prompt generator, based on the recognition result of the above platform content, determine the interaction prompt information corresponding to the above platform content.

[0079] As can be seen from the above, by obtaining the platform content of the interaction content to be generated, then identifying the above platform content through a preset prompt generator, and based on the recognition result of the above platform content, determining the interaction prompt information corresponding to the above platform content to optimize the platform content, and finally inputting the above interaction prompt information into a preset large language model, and through the above large language model based on the above interaction prompt information, generating the interaction content corresponding to the above platform content, so that by optimizing the platform content, the interaction content generated by the large language model is more in line with the requirements of the platform content, avoiding too large a deviation between the interaction content interacting with the platform content and the actual situation.

[0080] Correspondingly, an embodiment of the present application further provides an electronic device, which can be a terminal, and the terminal can be a terminal device such as a smart phone, a tablet computer, a notebook computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA), etc. As Figure 5 shownFigure 5 The figure is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device 500 includes a processor 501 having one or more processing cores, a memory 502 having one or more computer-readable storage media, and a computer program stored on the memory 502 and executable on the processor. Among them, the processor 501 is electrically connected to the memory 502. Those skilled in the art can understand that the structural diagram of the electronic device shown in the figure does not constitute a limitation on the electronic device, and it may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0081] The processor 501 is the control center of the electronic device 500, connecting various parts of the entire electronic device 500 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 502, and calling data stored in the memory 502, it executes various functions of the electronic device 500 and processes data, thereby monitoring the entire electronic device 500.

[0082] In an embodiment of the present application, the processor 501 in the electronic device 500 will load instructions corresponding to the processes of one or more application programs into the memory 502 according to the following steps, and the processor 501 will run the application programs stored in the memory 502 to implement various functions:

[0083] Obtain the platform content for which interactive content is to be generated;

[0084] Identify the above platform content through a preset prompt generator, and determine the interactive prompt information corresponding to the above platform content based on the recognition result of the above platform content;

[0085] Input the above interactive prompt information into a preset large language model, and the above large language model generates the interactive content corresponding to the above platform content based on the above interactive prompt information.

[0086] In some embodiments, after generating the interactive content corresponding to the above platform content, it further includes:

[0087] Input the above platform content and the interactive content corresponding to the above platform content into a preset discriminator, so that the discriminator generates a content score based on the above platform content and the interactive content corresponding to the above platform content;

[0088] Update the parameters of the above prompt generator based on the above content score.

[0089] In some embodiments, before inputting the above platform content and the interactive content corresponding to the above platform content into a preset discriminator, it further includes:

[0090] Obtain a discriminant sample set, where a discriminant sample in the discriminant sample set includes platform content and interaction content corresponding to the platform content, and the label of the discriminant sample is the content score corresponding to the platform content;

[0091] Construct the discriminator through the discriminant sample set, and train the discriminator with the discriminant samples in the discriminant sample set until the discriminator meets the preset convergence condition.

[0092] In some embodiments, before identifying the platform content through a preset prompt generator, it further includes:

[0093] Obtain historical platform content, interaction content corresponding to the historical platform content, and content scores corresponding to the historical platform content;

[0094] Based on the historical platform content, interaction content corresponding to the historical platform content, and content scores corresponding to the historical platform content, construct a prompt sample set for the prompt generator;

[0095] Construct the prompt generator through the prompt sample set, and train the prompt generator with the prompt samples in the prompt sample set until the prompt generator meets the preset convergence condition.

[0096] In some embodiments, after generating the content score, it further includes:

[0097] If there are at least two pieces of interaction content corresponding to the platform content, then based on the content scores corresponding to at least two pieces of the interaction content, sort the interaction content corresponding to the platform content from high to low, and display the sorted interaction content corresponding to the platform content.

[0098] In some embodiments, identifying the platform content through a preset prompt generator and determining interaction prompt information corresponding to the platform content based on the recognition result of the platform content includes:

[0099] Identify the platform content through the prompt generator to determine the content type of the platform content;

[0100] Determine the prompt generation method for the platform content based on the content type of the platform content, and determine the interaction prompt information corresponding to the platform content according to the prompt generation method.

[0101] In some embodiments, the platform content includes platform pictures and platform text information. Identifying the platform content through a preset prompt generator and determining interaction prompt information corresponding to the platform content based on the recognition result of the platform content includes:

[0102] The above-mentioned prompt generator is used to extract features from the above-mentioned platform pictures and the above-mentioned platform text information respectively, obtaining picture features and text features;

[0103] Through the above-mentioned prompt generator, based on the above-mentioned picture features and the above-mentioned text features, determine the recognition result of the above-mentioned platform content;

[0104] Through the above-mentioned prompt generator, based on the recognition result of the above-mentioned platform content, determine the interactive prompt information corresponding to the above-mentioned platform content.

[0105] Thus, the electronic device 500 provided in this embodiment can bring the following technical effects: It can avoid the interaction content for interacting with the platform content from deviating too much from the actual situation.

[0106] For the specific implementation of each of the above operations, reference can be made to the previous embodiments, which will not be elaborated here.

[0107] Optionally, as Figure 5 shown, the electronic device 500 further includes: a touch display screen 503, a radio frequency circuit 504, an audio circuit 505, an input unit 506, and a power supply 507. Among them, the processor 501 is electrically connected to the touch display screen 503, the radio frequency circuit 504, the audio circuit 505, the input unit 506, and the power supply 507 respectively. Those skilled in the art can understand that Figure 5 the structure of the electronic device shown in

[0108] The touch display screen 503 can be used to display a graphical user interface and receive operation instructions generated by a user's interaction with the graphical user interface. The touch display screen 503 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, videos, and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. The touch panel can be used to collect touch operations of the user on or near it (such as operations of the user using any suitable object or accessory such as a finger or a stylus on or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute the corresponding program. Optionally, the touch panel can include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch position of the user and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 501, and can receive and execute commands sent by the processor 501. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 501 to determine the type of touch event. Subsequently, the processor 501 provides a corresponding visual output on the display panel according to the type of touch event. In the embodiments of the present application, the touch panel and the display panel can be integrated into the touch display screen 503 to implement input and output functions. However, in some embodiments, the touch panel and the touch panel can be implemented as two independent components to implement input and output functions. That is, the touch display screen 503 can also be used as part of the input unit 506 to implement the input function.

[0109] The radio frequency circuit 504 can be used to transmit and receive radio frequency signals to establish wireless communication with a network device or other electronic devices through wireless communication, and transmit and receive signals with the network device or other electronic devices.

[0110] The audio circuit 505 can be used to provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 505 can transmit the electrical signal converted from the received audio data to the speaker, and the speaker converts it into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 505 and then converted into audio data. After the audio data is output to the processor 501 for processing, it is transmitted through the radio frequency circuit 504 to, for example, another electronic device, or the audio data is output to the memory 502 for further processing. The audio circuit 505 may also include an earphone jack to provide communication between a peripheral earphone and the electronic device.

[0111] The input unit 506 can be used to receive input digital, character information or user characteristic information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0112] The power supply 507 is used to supply power to each component of the electronic device 500. Optionally, the power supply 507 can be logically connected to the processor 501 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 507 can also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.

[0113] Although Figure 5 not shown in the figure, the electronic device 500 may also include a camera, a sensor, a Wi-Fi module, a Bluetooth module, etc., which will not be elaborated here.

[0114] In the above embodiments, the descriptions of each embodiment have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0115] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling relevant hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0116] Therefore, an embodiment of the present application provides a computer-readable storage medium, in which multiple computer programs are stored. The computer programs can be loaded by a processor to execute the steps in any one of the interactive content generation methods provided by the embodiments of the present application. For example, the computer program can execute the following steps:

[0117] Obtain the platform content of the interactive content to be generated;

[0118] Identify the above platform content through a preset prompt generator, and determine the interactive prompt information corresponding to the above platform content based on the recognition result of the above platform content;

[0119] Input the above interactive prompt information into a preset large language model, and generate the interactive content corresponding to the above platform content through the above large language model based on the above interactive prompt information.

[0120] In some embodiments, after generating the interactive content corresponding to the above platform content, it further includes:

[0121] Input the above platform content and the interaction content corresponding to the above platform content into a preset discriminator, so that the discriminator generates a content score based on the above platform content and the interaction content corresponding to the above platform content;

[0122] Update the parameters of the above prompt generator based on the above content score.

[0123] In some embodiments, before inputting the above platform content and the interaction content corresponding to the above platform content into a preset discriminator, it further includes:

[0124] Obtain a discriminant sample set, where a discriminant sample in the above discriminant sample set includes platform content and the interaction content corresponding to the above platform content, and the label of the above discriminant sample is the content score corresponding to the above platform content;

[0125] Construct the above discriminator through the above discriminant sample set, and train the above discriminator through the discriminant samples in the above discriminant sample set until the above discriminator meets the preset convergence condition.

[0126] In some embodiments, before identifying the above platform content through a preset prompt generator, it further includes:

[0127] Obtain historical platform content, the interaction content corresponding to the above historical platform content, and the content score corresponding to the above historical platform content;

[0128] Construct a prompt sample set of the above prompt generator based on the above historical platform content, the interaction content corresponding to the above historical platform content, and the content score corresponding to the above historical platform content;

[0129] Construct the above prompt generator through the above prompt sample set, and train the above prompt generator through the prompt samples in the above prompt sample set until the above prompt generator meets the preset convergence condition.

[0130] In some embodiments, after generating the content score, it further includes:

[0131] If there are at least two pieces of interaction content corresponding to the above platform content, then sort the interaction content corresponding to the above platform content from high to low based on the content scores corresponding to at least two pieces of the above interaction content, and display the sorted interaction content corresponding to the above platform content.

[0132] In some embodiments, the above identifying the above platform content through a preset prompt generator and determining the interaction prompt information corresponding to the above platform content based on the recognition result of the above platform content includes:

[0133] Identify the content type of the above platform content through the above prompt generator.

[0134] Determine the prompt generation method of the above platform content based on the content type of the above platform content, and determine the corresponding interaction prompt information of the above platform content according to the above prompt generation method.

[0135] In some embodiments, the above platform content includes platform pictures and platform text information. The above preset prompt generator is used to identify the above platform content, and based on the recognition result of the above platform content, the corresponding interaction prompt information of the above platform content is determined, including:

[0136] Extract features from the above platform pictures and the above platform text information respectively through the above prompt generator to obtain picture features and text features.

[0137] Determine the recognition result of the above platform content through the above prompt generator based on the above picture features and the above text features.

[0138] Determine the corresponding interaction prompt information of the above platform content through the above prompt generator based on the recognition result of the above platform content.

[0139] It can be seen that the computer program can be loaded by the processor to execute the steps in any of the interaction content generation methods provided in the embodiments of the present application, thereby bringing the following technical effects: It can avoid the interaction content interacting with the platform content having too large an actual deviation.

[0140] For the specific implementation of each of the above operations, reference can be made to the previous embodiments, which will not be elaborated here.

[0141] Among them, the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.

[0142] Since the computer program stored in the computer-readable storage medium can execute the steps in any of the interaction content generation methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any of the interaction content generation methods provided in the embodiments of the present application can be realized. For details, reference can be made to the previous embodiments, which will not be elaborated here.

[0143] The above has introduced in detail an interactive content generation method, apparatus, electronic device, and computer-readable storage medium provided by the embodiments of the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.

Claims

1. An interactive content generation method, characterized in that, The method includes: Obtaining platform content for which interactive content is to be generated; Identifying the platform content through a preset prompt generator, and determining interactive prompt information corresponding to the platform content based on the identification result of the platform content; Inputting the interactive prompt information into a preset large language model, and generating, by the large language model based on the interactive prompt information, interactive content corresponding to the platform content, where the interactive content for interacting with the platform content includes comments on the platform content, content information related to the platform content, or reply content to the platform content; The identifying the platform content through a preset prompt generator, and determining interactive prompt information corresponding to the platform content based on the identification result of the platform content includes: Identifying the platform content through the prompt generator to determine the content type of the platform content, where different content types correspond to different prompt generation methods; Determining the prompt generation method of the platform content based on the content type of the platform content, and determining interactive prompt information corresponding to the platform content according to the prompt generation method; Before identifying the platform content through a preset prompt generator, it further includes: Obtaining historical platform content, interactive content corresponding to the historical platform content, and a content score corresponding to the historical platform content, where the interactive content corresponding to the historical platform content is generated by the large language model, and the content score is generated by a discriminator, and the content score is used to indicate whether the interactive content can correspond to the platform content; Constructing a prompt sample set of the prompt generator based on the historical platform content, the interactive content corresponding to the historical platform content, and the content score corresponding to the historical platform content; Constructing the prompt generator through the prompt sample set, and training the prompt generator with the prompt samples in the prompt sample set using a reinforcement learning algorithm until the prompt generator meets a preset convergence condition; where a reward is generated based on the content score through the reinforcement learning algorithm to update the prompt generator.

2. The interactive content generation method according to claim 1, characterized in that, After generating the interactive content corresponding to the platform content, it further includes: Inputting the platform content and the interactive content corresponding to the platform content into a preset discriminator, so that the discriminator generates a content score based on the platform content and the interactive content corresponding to the platform content; Updating the parameters of the prompt generator based on the content score.

3. The interactive content generation method according to claim 2, wherein Before inputting the platform content and the interactive content corresponding to the platform content into a preset discriminator, it further includes: Obtaining a discriminant sample set, where a discriminant sample in the discriminant sample set includes platform content and interactive content corresponding to the platform content, and the label of the discriminant sample is the content score corresponding to the platform content; Constructing the discriminator through the discriminant sample set, and training the discriminator with the discriminant samples in the discriminant sample set until the discriminator meets a preset convergence condition.

4. The interactive content generation method according to claim 2, wherein After generating the content score, it further includes: If there are at least two pieces of interactive content corresponding to the platform content, then based on the content scores corresponding to the at least two pieces of interactive content, sort the interactive content corresponding to the platform content from high to low, and display the sorted interactive content corresponding to the platform content.

5. The interactive content generation method according to any one of claims 1 to 4, characterized in that The platform content includes platform pictures and platform text information. The platform content is identified by a preset prompt generator, and based on the identification result of the platform content, the interactive prompt information corresponding to the platform content is determined, including: The prompt generator is used to extract features from the platform picture and the platform text information respectively to obtain picture features and text features; The prompt generator is used to determine the identification result of the platform content based on the picture features and the text features; The prompt generator is used to determine the interactive prompt information corresponding to the platform content based on the identification result of the platform content.

6. An interactive content generation device, characterized in that, The device includes: A content acquisition module for acquiring platform content for which interactive content is to be generated; An identification module for identifying the platform content by a preset prompt generator and determining the interactive prompt information corresponding to the platform content based on the identification result of the platform content; A content generation module for inputting the interactive prompt information into a preset large language model, and the large language model generates the interactive content corresponding to the platform content based on the interactive prompt information. The interactive content for interacting with the platform content includes comments on the platform content, content information related to the platform content, or reply content to the platform content; The identification module is further used to identify the platform content by the prompt generator to determine the content type of the platform content, where different content types correspond to different prompt generation methods; determine the prompt generation method of the platform content based on the content type of the platform content, and determine the interactive prompt information corresponding to the platform content according to the prompt generation method; A second training module for acquiring historical platform content, the interactive content corresponding to the historical platform content, and the content score corresponding to the historical platform content; constructing a prompt sample set of the prompt generator based on the historical platform content, the interactive content corresponding to the historical platform content, and the content score corresponding to the historical platform content; constructing the prompt generator through the prompt sample set, and training the prompt generator by using a reinforcement learning algorithm through the prompt samples in the prompt sample set until the prompt generator meets a preset convergence condition. The interactive content corresponding to the historical platform content is generated by the large language model, and the content score is generated by a discriminator. The content score is used to indicate whether the interactive content can correspond to the platform content; wherein a reward is generated based on the content score by the reinforcement learning algorithm to update the prompt generator.

7. An electronic device, characterized in that, It includes a processor and a memory, and the memory stores multiple instructions; the processor loads the instructions from the memory to execute the steps in the interactive content generation method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores multiple instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the interactive content generation method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Cboth generation method and device, equipment, storage medium and product

    CN116702737A

  • Prompt information generation system and prompt information generation model obtaining method

    CN116756276A