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

By extracting video features and generating target prompts, the problems of small quantity and poor quality of text information in the video platform are solved, and efficient and good quality text information generation is achieved.

CN119854566AActive Publication Date: 2025-04-18BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202311338990.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-16
Publication Date
2025-04-18
Estimated Expiration
2043-10-16

AI Technical Summary

Technical Problem

In the prior art, there are problems with small quantity and poor content quality in video platforms.

Method used

By obtaining the video characteristics of the target video, a target prompt is generated, and text information for the target video is generated based on the prompt.

Benefits of technology

It realizes the fast and efficient generation of text information, while ensuring that the content of the generated text information matches the video content of the target video, improving the efficiency of text information generation and content quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854566A_ABST
    Figure CN119854566A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a text information generation method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a target video, and extracting the video features of the target video, the video features being used for representing the content of the target video under at least one content dimension; according to the video features, generating a target prompt word, the target prompt word being used for representing a generation rule of text information for the target video; and generating text information for the target video based on the target prompt word. By extracting the video features of the target video, generating the target prompt, and generating the text information for the target video by combining the target prompt with the ability of the language model, the text information is quickly and efficiently generated, and meanwhile, the content of the generated text information is ensured to be matched with the video content of the target video; and the generation efficiency and the content quality of the text information corresponding to the target video are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of Internet technology, and in particular, to a method, device, electronic device, and storage medium for generating text information. Background Art

[0002] Currently, video resources published on various video platforms are usually accompanied by corresponding descriptive text information. Through this text information, users can better understand the content of the video and enable interaction between different users.

[0003] In the prior art, the above-mentioned text information is usually manually edited and uploaded to the video platform by the video publisher or the video commenter, which is inefficient and cannot guarantee the quality of its content, resulting in problems such as small amount of text information for videos on the video platform and poor content quality. Summary of the invention

[0004] The embodiments of the present disclosure provide a method, device, electronic device and storage medium for generating text information, so as to overcome the problem that the text information for a video is small in quantity and poor in content quality.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for generating text information, including:

[0006] A target video is obtained, and video features of the target video are extracted, wherein the video features are used to characterize the content of the target video under at least one content dimension; a target prompt is generated according to the video features, wherein the target prompt is used to characterize a generation rule for text information for the target video; and text information for the target video is generated based on the target prompt.

[0007] In a second aspect, an embodiment of the present disclosure provides a text information generating device, including:

[0008] An acquisition module, used to acquire a target video and extract video features of the target video, wherein the video features are used to characterize the content of the target video under at least one content dimension;

[0009] A first generating module, used to generate a target prompt according to the video feature, wherein the target prompt is used to represent a generation rule of text information for the target video;

[0010] The second generating module is used to generate text information for the target video based on the target prompt.

[0011] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;

[0012] The memory stores computer-executable instructions;

[0013] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the text information generating method as described in the first aspect and various possible designs of the first aspect.

[0014] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the text information generation method described in the first aspect and various possible designs of the first aspect is implemented.

[0015] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the text information generation method described in the first aspect and various possible designs of the first aspect.

[0016] The text information generation method, device, electronic device and storage medium provided in this embodiment obtain a target video and extract the video features of the target video, wherein the video features are used to characterize the content of the target video under at least one content dimension; based on the video features, a target prompt is generated, wherein the target prompt is used to characterize the generation rule of text information for the target video; and based on the target prompt, text information for the target video is generated. By extracting the video features of the target video, generating a target prompt, and using the target prompt in combination with the capabilities of the language model, text information for the target video is generated, thereby achieving rapid and efficient generation of text information, while ensuring that the content of the generated text information matches the video content of the target video, thereby improving the generation efficiency and content quality of the text information corresponding to the target video. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0018] Figure 1 An application scenario diagram of the text information generation method provided in an embodiment of the present disclosure;

[0019] Figure 2 A flowchart of a text information generation method provided in an embodiment of the present disclosure Figure 1 ;

[0020] Figure 3 for Figure 2A flowchart of a possible implementation of step S102 in the illustrated embodiment;

[0021] Figure 4 for Figure 2 A flowchart of another possible implementation of step S102 in the illustrated embodiment;

[0022] Figure 5 for Figure 2 A flowchart of another possible implementation of step S102 in the illustrated embodiment;

[0023] Figure 6 for Figure 5 A flowchart of a possible implementation of step S1028 in the illustrated embodiment;

[0024] Figure 7 A schematic diagram of a process for generating video features based on multiple content dimensions provided by an embodiment of the present disclosure;

[0025] Figure 8 A schematic diagram of a video playback page provided in an embodiment of the present disclosure;

[0026] Fig. 9 A flowchart of a text information generation method provided in an embodiment of the present disclosure Figure 2 ;

[0027] Fig.10 A schematic diagram of the structure of a prompt template provided in an embodiment of the present disclosure;

[0028] Fig.11 A structural block diagram of a text information generating device provided in an embodiment of the present disclosure;

[0029] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure;

[0030] Fig.13 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0032] It should be noted that the user information and data involved in this disclosure (including but not limited to data used for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0033] The application scenarios of the embodiments of the present disclosure are explained below:

[0034] Figure 1 This is an application scenario diagram of the text information generation method provided in the embodiment of the present disclosure. The text information generation method provided in the embodiment of the present disclosure can be applied to an application (Application, APP) with a video online playback function. More specifically, for example, it can be applied to the scenario of automatically generating descriptive text information for video media such as live videos and short videos. The execution subject of this embodiment can be a terminal device running the above-mentioned application with a video online playback function, or a server that deploys the service end corresponding to the above-mentioned application, or other electronic devices that perform similar functions. Reference Figure 1 As shown in , taking a terminal device as an example, the terminal device plays a short video by running a short video application. At the same time, the short video application also provides a description function for the short video, that is, in the playback page of the short video, a video playback area for playing the video and a description area for the short video are displayed. For example, the description area currently includes text #1 published by the video publishing user User_1 and text #2 published by the comment user User_2. Afterwards, in response to the trigger operation of the current user, for example, as shown in the figure, the user clicks the "generate description" control, and the terminal device automatically generates text information for the short video by executing the text information generation method provided by this embodiment, and displays it in the input box corresponding to the description area. The content of the text information is exemplified by "XXXXXX" in the figure. Afterwards, the current user can directly publish the text information in the input box to the description area by clicking the "publish" control, or, after further editing and improving the above text information, obtain a descriptive text that meets the personalized needs of the user, and publish the improved descriptive text to the description area, thereby realizing the process of quickly generating and publishing text information for the video. The content of the text information in the above-mentioned description area may be a content description of the current video, such as the video theme, author, etc., or may be user comments, barrage text, graphic symbols, etc. for the current video.

[0035] In another possible application scenario, the execution subject of this embodiment can also be a server corresponding to the video platform. The server directly generates corresponding text information for the target video using the text information generation method provided by the embodiment of the present disclosure, and loads it into the description area corresponding to the target video, thereby realizing automatic generation of text information. The specific application scenario can be determined based on needs, and will not be described one by one here.

[0036] In the prior art, the text information for the target video is usually edited and published by the user. In some related technologies, the video platform can provide users with pre-generated text information, and based on the user's selection operation or based on the video content of the target video, determine a corresponding target text information from the pre-generated text information, and publish it in the description area of ​​the target video. The above-mentioned scheme based on manual editing will lead to the problem of small amount and low efficiency of generating text information for the target video in the video platform, while the scheme based on pre-generated text information selection will lead to the content of the text information being identical and similar, and the degree of match with the actual content of the target video is low, thus leading to the problem of poor quality of the text content.

[0037] The embodiment of the present disclosure provides a text information generating method to solve the above-mentioned problem.

[0038] refer to Figure 2 , Figure 2 A flowchart of a text information generation method provided in an embodiment of the present disclosure Figure 1 The method of this embodiment can be applied in a terminal device. The text information generation method includes:

[0039] Step S101: Acquire the target video.

[0040] Step S102: extracting video features of the target video, where the video features are used to characterize the content of the target video in at least one content dimension.

[0041] For example, reference Figure 1 The application scenario diagram shown takes the case where the terminal device is the execution subject of the method of this embodiment as an example. The terminal device obtains the target video by running a target application with a text description function for the video. More specifically, the above-mentioned target application is a short video application. In this case, the terminal device obtains the target video from the video server through the target application in response to user operations, and plays it in subsequent steps to achieve the basic function of playing the video in the target application. Of course, in another possible implementation method, the target video can also be stored locally on the terminal device. The terminal device loads the target video locally and plays it by responding to user operations. The specific implementation method is not limited.

[0042] Further, exemplarily, after obtaining the target video, the terminal device extracts features of the target video while playing the target video (it can also be before or after playing the target video, which can be set according to specific needs) to obtain the video features of the target video. The video features are used to characterize the content of the target video under at least one content dimension. For example, the title, author, and tag of the target video are all content dimensions of the video features. For another example, the image content and content text in the target video can also be content dimensions of the video features. The video features obtained after extracting the target video are information that characterizes the content under the above content dimensions. More specifically, the video feature can be a feature identifier, or a set of multiple feature identifiers, and the feature identifiers are used to characterize the content under different content dimensions. For example, the video feature includes Tag[1]={author: user_1}, and the content it characterizes is: the author of the target video is "user_1". For another example, the video feature includes Tag[2]={title: Introduction to city_A}, and the content it characterizes is: the content theme or title of the target video is "Introduction to city_A". In another possible implementation, the video features may be represented in the form of a feature matrix, and the feature matrix is ​​used to represent more complex content of the target video in one or more content dimensions, which will not be described one by one here.

[0043] Furthermore, in a possible implementation, Figure 3 As shown, the specific implementation of step S102 includes:

[0044] Step S1021: Obtain reference information for the target video.

[0045] Step S1022: Obtain video features of the target video according to the reference information.

[0046] Exemplarily, in a possible implementation, the reference information includes at least one of the following: title information, author information, tag information, etc. The above reference information is video descriptive information for the target video. The terminal device can obtain the reference information corresponding to the target video from the video server in the process of obtaining the target video; or, the reference information can also be stored in the target video, and the terminal device obtains the corresponding reference information by parsing the target video. Afterwards, the terminal device obtains the corresponding video features based on the above reference information, for example, based on the title information of the target video, determines the theme content of the target video, and then generates a feature identifier that represents the theme content of the target video. In the subsequent steps, the corresponding target prompt is generated based on the theme identifier, and finally text information matching the theme content is generated.

[0047] In another possible implementation, the reference information includes reference text information, and the reference text information includes user comments posted by users on the target video. More specifically, the reference text information is, for example, hot comment information posted by users on the target video, and the hot comment information is comment information that obtains more "agreements, likes, and collections". In some implementations of arranging comment information based on the number of "agreements", the hot comment information can also be for several comment information posted by users with a high ranking. Afterwards, the terminal device performs feature extraction based on the reference text information, and obtains the features corresponding to the reference text information as the video features of the target video. For example, the reference text information includes a text segment, and the semantics corresponding to the text segment obtained after feature extraction of the text segment can be used as (one of) the video features of the target video. Among them, the video features obtained based on the reference text information can be represented in the form of semantic identifiers, feature arrays or matrices, which will not be repeated.

[0048] In another possible implementation, Figure 4 As shown, the specific implementation of step S102 includes:

[0049] Step S1023: Extract the audio data of the target video.

[0050] Step S1024: Process the audio data to obtain the content text of the target video, where the content text is used to represent the dialogue or narration of the characters in the target video.

[0051] Step S1025: Obtain video features based on the content text of the target video.

[0052] Exemplarily, after obtaining the target video, the terminal device can first extract the data on the sound track in the target video to obtain audio data. The specific implementation method is determined by the specific data format of the target video and will not be described in detail here. Afterwards, the extracted audio data is subjected to content recognition to obtain the content text of the target video. The content text is used to characterize the dialogue or narration of the characters in the target video. Specifically, the content text may include one or more paragraphs of text, and the text content of the content text is the dialogue or narration of the characters in the target video. The terminal device can use the speech recognition service to realize the process of converting audio into text. The specific implementation of the speech recognition service is a prior art and will not be described in detail here.

[0053] After obtaining the content text, the terminal device uses the task dialogue and narration content in the target video represented by the content text to perform inductive processing on the video content, and obtains the video features corresponding to the target video. Among them, in one possible implementation method, the video features obtained through the content text can be feature identifiers of the content category corresponding to the main content of the character dialogue and / or narration obtained after induction based on the content text, for example, feature identifier #1 represents the main content of the character dialogue and / or narration as "travel", for example, feature identifier #2 represents the main content of the character dialogue and / or narration as "introduction to technology products". Afterwards, the video features are generated based on the above feature identifiers, and the target prompts subsequently generated based on the video features are matched with the content category represented by the above feature identifiers. In addition, the text information finally generated is matched with the character dialogue and / or narration in the above target video, thereby improving the matching of the text information and the video content.

[0054] In another possible implementation, the video features obtained through the content text can be a summary text obtained after summarizing the content text and representing the main content of the character dialogue and / or narration, that is, the result of semantically summarizing the character dialogue and / or narration and summarizing the subject content. After that, the video features are generated based on the above-mentioned summary text, and the target prompts subsequently generated based on the video features are matched with the subject content represented by the above-mentioned summary text. In addition, the text information finally generated is matched with the character dialogue and / or narration in the above-mentioned target video, thereby improving the matching degree between the text information and the video content. The above-mentioned process of summarizing and inducing the content text to obtain the summary text can be implemented through a preset language model, and the details are not repeated here.

[0055] Furthermore, after extracting the audio data of the target video, it also includes: processing the audio data to obtain the music features of the background music in the target video. That is, when the audio data extracted from the target video includes background music in addition to character dialogues and surrounding content, the background music part can be further processed to extract the music features corresponding to the background music, and based on the emotional content expressed by the music features, the dimension of the video features can be further enriched. Among them, exemplarily, the music features include at least one of the following: music name identification, music type, and music melody. Similarly, based on different implementation methods of music features, music features can also be implemented in the form of feature identification, feature array or feature matrix, which will not be repeated.

[0056] Accordingly, the music feature is then merged with the content text to obtain a video feature including the music feature dimension. That is, the specific implementation of step S1025 includes: obtaining the video feature according to the content text of the target video and the music feature of the background music.

[0057] In the steps of this embodiment, the music features of the background music in the audio data are extracted, and based on the content text, the music features are further combined to obtain the video features, thereby enriching the amount of information and information dimension of the video features, further improving the accuracy of the video features in describing the content of the target video, making the subsequently generated target prompts more accurate, and thus obtaining higher quality text information.

[0058] In another possible implementation, Figure 5 As shown, the specific implementation of step S102 includes:

[0059] Step S1026: extract frames of the target video to obtain image data of the target video, where the image data includes at least one video frame of the target video.

[0060] Step S1027: performing image recognition on the image data to obtain frame content information representing the image content of the video frame.

[0061] Step S1028: Generate video features of the target video based on the frame content information.

[0062] Exemplarily, after obtaining the target video, the terminal device can extract frames of the target video to obtain image data of at least one video frame of the target video. The above-mentioned frame extraction process can be based on fixed time intervals, or can be performed for internal frames (I frames) in the target video. If the target video is an animation video, it can also be performed for key frames (K frames) of the target video. The specific implementation method can be set as needed. The specific video frame extraction method is a prior art and will not be described here one by one.

[0063] Afterwards, the extracted image data is subjected to content recognition to obtain frame content information representing the image content of the video frame. Specifically, the frame content information may include one or more description texts, the content of the description texts being the image content, or the frame content information may include a combination of multiple image element identifiers, each image element identifier representing an image element in the image, for example, image element identifier P1 represents "a car", image element identifier P2 represents "a mobile phone", and so on. The frame content information formed by the combination of image element identifiers represents the image content in the video frame.

[0064] Furthermore, after obtaining the frame content information, the terminal device uses the frame content information to generate video features, which can be feature identifiers obtained by summarizing the frame content information and representing the content category corresponding to the image content, or summarized text representing the image content. The specific implementation method is similar to the process of obtaining video features based on content text, and will not be repeated here.

[0065] Further, in a possible implementation, the target video is frame extracted to obtain image data of the target video including at least two video frames, that is, the specific implementation of step S1027 includes: performing image recognition on at least two target video frames in the image data to obtain corresponding frame content information. In this implementation, if Figure 6 As shown, the specific implementation of step S1028 includes:

[0066] Step S1028A: Based on the playback timing of at least two target video frames, a frame content sequence is generated, wherein the frame content sequence includes corresponding frame content information arranged based on the playback timing.

[0067] Step S1028B: Generate video features of the target video based on the frame content sequence.

[0068] Exemplarily, in the case where at least two video frames are included in the image data, the terminal device determines at least two target video frames therefrom, and based on the playback timing of each target video frame, extracts features of each target video frame in turn, generates frame content information corresponding to each target video frame, and then orderly combines the frame content information corresponding to each target video frame to obtain a frame content sequence. The frame content sequence includes the same number of frame content information as the above-mentioned target video frames, that is, the frame content information in the content sequence corresponds to the above-mentioned target video frames one by one, and the position of the frame content information in the content sequence in the content sequence corresponds to the position of the target video frame in the target video (playback timestamp). Therefore, the frame content sequence can not only express the frame content information corresponding to each target video frame, but also express the change characteristics between the image content represented by each frame content information. Afterwards, based on the frame content sequence, the video features of the target video are generated, and the video features can express the change characteristics between multiple target video frames in the target video, that is, the association characteristics between images. This makes the generation rules of the text information represented by the target prompt generated based on the video features more compatible with the video content of the target video, thereby improving the text content quality of the text information finally generated based on the target prompt.

[0069] Exemplarily, the several implementations of step S102 described above may be implemented separately to enable the terminal device to obtain the video features of the target video, or at least two of the implementations may be combined to generate the video features of the target video by combining contents of multiple content dimensions. Figure 7 A schematic diagram of a process for generating video features based on multiple content dimensions provided by an embodiment of the present disclosure, such as Figure 7As shown, after obtaining the target video, the terminal device extracts the hot comments for the target video and generates the first video feature P1 based on the hot comments; extracts the audio data for the target video and generates the second video feature P2 based on the audio data; extracts the image data containing multiple video frames for the target video and generates the third video feature P3 based on the image data. Afterwards, the first video feature P1, the second video feature P2 and the third video feature P3 are combined to generate the video feature P of the target video.

[0070] Step S103: Generate a target prompt according to the video features, where the target prompt is used to represent a rule for generating text information for the target video.

[0071] Exemplarily, after obtaining the video features, the terminal device performs prompt conversion based on the implementation form of the video features to generate a target prompt that is compatible with the large language model. Among them, the prompt can also be called a prompt word, which is a kind of instruction information for the model, and can include various text information such as description sentences, question sentences, or parameters. By inputting prompts to the model, the model can perform the corresponding tasks more accurately and reliably and generate results that meet user needs. The prompts can be carried by files in a specific format, such as Json files.

[0072] Furthermore, in a possible implementation, the video features and the fixed prompt text can be directly combined to generate the corresponding target prompt. For example, the fixed prompt text includes: "Please generate text that matches the following conditions:". After that, the target prompt can be generated by simply combining the prompt text with the video features obtained in the previous step. In another possible implementation, the corresponding prompt template can be obtained based on the video features; then, based on the prompt template, the target prompt is generated by combining part or all of the features in the video features.

[0073] Among them, exemplarily, the target prompt can be generated locally by the terminal device based on a preset processing rule, or the terminal can send the video features to the corresponding server, and the server generates the corresponding target prompt and returns it to the terminal device. The specific settings can be made as needed and will not be repeated here.

[0074] Step S104: Generate text information for the target video based on the target prompt.

[0075] Exemplarily, after obtaining the target prompt, the terminal device can transmit the target prompt to the model server that deploys the large language model by calling the interface or service corresponding to the large language model. Thereafter, the model server processes the target prompt using the large language model and generates corresponding text information. Thereafter, the model server sends the output result of the model, that is, the text information of the target video, back to the terminal device, so that the terminal device obtains the text information for the target video and completes the automatic generation process of the text information.

[0076] Optionally, after step S104, the method further includes:

[0077] Step S105: displaying at least two items of text information in the first area of ​​the video playback page corresponding to the target video.

[0078] Step S106: In response to a selection operation on target text information from the at least two text information, the target text information is displayed in a second area of ​​the video playback page, wherein the second area is used to display user comments on the target video.

[0079] Figure 8 A schematic diagram of a video playback page provided in an embodiment of the present disclosure, referring to Figure 8 As shown, in the video playback page of the target video, a first area and a second area are included, wherein the second area is an area for displaying user comments on the target video, that is, a comment area in the prior art. In another implementation, the second area can also be a bullet screen area in the video playback page, and no specific examples are given here. The specific implementation of the second area is a prior art and is not repeated here. On the other hand, the first area is an area for displaying the text information generated in the above steps. After the text information is generated through the above embodiment steps, at least two text messages generated are displayed in the second area (for example, text information #1, text information #2, and text information #3 shown in the figure) for the user to select. After that, the user applies a selection operation to the terminal device according to the needs, selects the target text information therein, that is, text information #2, and the terminal device directly publishes the text information #2 in the second area according to the user's selection operation, or sends the text information #2 to the editing area (input box), and the user performs secondary editing and then publishes it in the second area, thereby realizing the publishing process of the descriptive text information. The text information can be a description of the target video, or a reply or comment to the user's comment in the comment area.

[0080] In the steps of this embodiment, after generating text information, multiple text information are displayed to achieve the purpose of displaying alternatives to users. Combined with responding to user selection operations, the purpose of quickly publishing text information can be achieved, thereby improving the efficiency of text information publishing.

[0081] refer to Fig. 9 , Fig. 9 A flowchart of a text information generation method provided in an embodiment of the present disclosure Figure 2 In this embodiment Figure 2 On the basis of the illustrated embodiment, step S102 is further refined, and a step of optimizing the target video is added, which can be applied to the application scenario of video editing. Specifically, the text information generation method includes:

[0082] Step S201: Acquire the target video.

[0083] Step S202: extracting video features of the target video, where the video features are used to characterize the content of the target video in at least one content dimension.

[0084] Step S203: Obtain a corresponding prompt template according to the video features, wherein the prompt template is used to represent a preset rule for dynamically generating prompts by calling input features.

[0085] Step S204: Generate input features based on video features, call prompt template for processing, and generate target prompt.

[0086] Exemplarily, first, the prompt template has a corresponding relationship with the video feature, and the terminal device obtains the corresponding prompt template according to different video features. For example, the video feature includes feature P1 representing the video theme of the target video. When P1 represents "travel video", the terminal device obtains prompt template M1; when P1 represents "game strategy", the terminal device obtains prompt template M2.

[0087] Furthermore, the prompt template is a model or framework that specifies the generation rules of the prompt. In the process of generating the corresponding prompt, the prompt template needs to call the input features. Therefore, when the input features are different, the prompt generated by the prompt template is also different, thereby realizing the dynamic change of the prompt. Among them, the prompt template is composed of input features and at least one rule description information, that is, the prompt template includes at least one rule description information, and the rule description information is used to characterize the sub-rules that constitute the preset rule. The rule description information limits the content and / or form of the prompt by calling the corresponding input features, thereby accurately generating the prompt.

[0088] Fig.10 A schematic diagram of a prompt template provided in an embodiment of the present disclosure is shown in FIG. Fig.10As shown, the prompt template M1 obtained based on the video features has input features p1, input features p2 and input features p3 (shown as p1, p2 and p3 in the figure), wherein the input feature p1 represents the hot comments of the video, the input feature p2 represents the content text of the video, and the input feature p3 represents the image content of the video. Furthermore, the prompt template M1 also includes rule description information Info_1{p1}, rule description information Info_2{p2} and rule description information Info_3{p3} (shown as Info_1{p1}, Info_2{p2}, Info_3{p3} in the figure). Among them, the rule description information Info_1 is used to call the input feature p1 to limit a sub-rule of the preset rule to limit the content and / or form of the prompt. For example, the content of the rule description information Info_1{p1} is "Use {hot comments} to create an ancient poem." The rule description information Info_2 is used to call the input feature p2 and define a sub-rule of the preset rule to further define the content and / or form of the prompt. For example, the content of the rule description information Info_2{p2} is "Supplement some relevant content with respect to {content text} so that people can learn new things." Similarly, the rule description information Info_3{p3} is similar and will not be repeated here. Afterwards, based on part or all of the features in the video feature, the input features are generated, and the prompt template is inserted to generate the above-mentioned complete rule description information inserted with the video features, for example, "Use {#comment_001} to create an ancient poem." Among them, "#comment_001" can be the specific content of the hot comment, or the location where the hot comment is stored, and the specific implementation method is not limited. Afterwards, based on the above-mentioned set of multiple rule description information inserted with video features, the target prompt for the video feature can be obtained.

[0089] Further, the text information generated based on the above prompt template may include descriptive text and / or graphic identifiers. The descriptive text is a text or character string describing the video content or video comment content. The graphic identifier may include emoticons, stickers, etc., without limitation. The specific implementation method of generating descriptive text and / or graphic identifiers is provided by the capabilities of the pre-trained language model and is not specifically limited here.

[0090] Furthermore, the rule description information in the prompt template includes at least one of the following: first description information, used to characterize the text format of the text information generated based on the target input feature; second description information, used to characterize the text content of the text information generated based on the target input feature; third description information, used to characterize the text length of the text information generated based on the target input feature; fourth description information, used to characterize the grammatical style of the text information generated based on the target input feature; fifth description information, used to characterize the selection rule of the target input feature. Among them, the text format refers to the format of the descriptive text, including "ancient poetry, poetry", etc., and may also refer to the segmentation format of the descriptive text; the text content has been introduced in the above embodiment and will not be repeated here. The text length is the string length of the descriptive text; the grammatical style includes, for example, "humor, pleasure", etc.; the selection rule of the target input feature is the information used to set the input features of the prompt template, that is, which features are used as input features, for example, in combination with the above Fig.10 In the illustrated embodiment, specific contents of the input feature p1, the input feature p2, and the input feature p3 are determined by the fifth description information.

[0091] In this embodiment, through the above-mentioned rule description information set in the prompt template, it is possible to achieve refined matching of the selection rules for the text format, text content, text length, grammatical style and target input features of the descriptive text, so that the target prompt generated based on the prompt template can accurately match the video features, thereby improving the accuracy, rationality and diversity of the generated text information and improving the content quality of the text information.

[0092] Step S205: Based on the target prompt, generate text information for the target video using a large language model.

[0093] Step S206: Generate video supplementary data based on the text information, where the video supplementary data includes video content matching the text information.

[0094] Step S207: Add the video supplementary data to the target video to generate an optimized video.

[0095] Exemplarily, in the application scenario of video editing, after generating text information, the video editing user (i.e., the video author) can further optimize the current target video according to the text information generated in the above steps, such as adding content that matches the text information automatically generated in the above steps, thereby improving the video quality. Specifically, the terminal device generates video supplementary data based on the text information, such as background music, stickers, special effects templates, etc. In a more specific implementation, the terminal device can generate corresponding artistic text based on the obtained descriptive text, or obtain music related to the descriptive text from the server as background music, and add the above artistic text and background music to the target video to generate an optimized video, thereby further improving the quality of the video content with the help of the content of the text information. Further enrichment of the video content of the target video is achieved, and the quality of the video work generated by the terminal device in the video editing scenario is improved.

[0096] In this embodiment, the implementation of steps S201-S202 and step S205 is the same as that of the present disclosure. Figure 2 The implementation methods of steps S101 - S102 and S104 in the illustrated embodiment are the same and will not be described in detail here.

[0097] Corresponding to the text information generation method of the above embodiment, Fig.11 This is a structural block diagram of a text information generating device provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Fig.11 , the text information generating device 3 comprises:

[0098] An acquisition module 31 is used to acquire a target video and extract video features of the target video, where the video features are used to characterize the content of the target video under at least one content dimension;

[0099] A first generating module 32, used to generate a target prompt according to video features, where the target prompt is used to represent a generation rule of text information for a target video;

[0100] The second generating module 33 is used to generate text information for the target video based on the target prompt.

[0101] In one embodiment of the present disclosure, the second generation module 33 is also used to: display at least two items of text information in the first area of ​​the video playback page corresponding to the target video; in response to a selection operation on the target text information among the at least two items of text information, display the target text information in the second area of ​​the video playback page; wherein the second area is used to display user comments on the target video.

[0102] In one embodiment of the present disclosure, when extracting the video features of the target video, the acquisition module 31 is specifically used to: obtain reference text information for the target video, the reference text information includes text information for the target video posted by the user; and obtain the video features of the target video based on the reference text information.

[0103] In one embodiment of the present disclosure, when extracting video features of a target video, the acquisition module 31 is specifically used to: extract audio data of the target video; process the audio data to obtain content text of the target video, where the content text is used to characterize dialogues between characters in the target video; and obtain video features based on the content text of the target video.

[0104] In one embodiment of the present disclosure, the acquisition module 31 is also used to: process the audio data to obtain the music features of the background music in the target video; when the acquisition module 31 obtains the video features based on the content text of the target video, it is specifically used to: obtain the video features based on the content text of the target video and the music features of the background music; wherein the music features include at least one of the following: music name identification, music type, and music melody.

[0105] In one embodiment of the present disclosure, when extracting video features of a target video, the acquisition module 31 is specifically used to: extract frames of the target video to obtain image data of the target video, wherein the image data includes at least one video frame of the target video; perform image recognition on the image data to obtain frame content information representing the image content of the video frame; and generate video features of the target video based on the frame content information.

[0106] In one embodiment of the present disclosure, when the acquisition module 31 performs image recognition on image data to obtain frame content information representing the image content of the video frame, it is specifically used to: perform image recognition on at least two target video frames in the image data respectively to obtain corresponding frame content information; when the acquisition module 31 generates video features of the target video based on the frame content information, it is specifically used to: generate a frame content sequence based on the playback timing of at least two target video frames, the frame content sequence includes corresponding frame content information arranged based on the playback timing; generate video features of the target video based on the frame content sequence.

[0107] In one embodiment of the present disclosure, the first generation module 32 is specifically used to: obtain a corresponding prompt template based on video features, wherein the prompt template is used to represent a preset rule for dynamically generating prompts by calling input features; generate input features based on video features, and call the prompt template for processing to generate a target prompt.

[0108] In one embodiment of the present disclosure, at least one of the following is included: the text information includes descriptive text and / or graphic identification; the prompt template includes at least one rule description information, and each rule description information is used to characterize a sub-rule constituting a preset rule.

[0109] In one embodiment of the present disclosure, the rule description information includes at least one of the following: first description information, used to characterize the text format of the text information generated based on the target input feature; second description information, used to characterize the text content of the text information generated based on the target input feature; third description information, used to characterize the text length of the text information generated based on the target input feature; fourth description information, used to characterize the grammatical style of the text information generated based on the target input feature; fifth description information, used to characterize the selection rule of the target input feature.

[0110] In one embodiment of the present disclosure, the second generation module 33 is further used to: generate video supplementary data based on the text information, wherein the video supplementary data includes video content matching the text information; and add the video supplementary data to the target video to generate an optimized video.

[0111] The acquisition module 31, the first generation module 32 and the second generation module 33 are connected in sequence. The text information generation device 3 provided in this embodiment can implement the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated in this embodiment.

[0112] Fig.12 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure is shown in FIG. Fig.12 As shown, the electronic device 4 includes:

[0113] A processor 41, and a memory 42 communicatively connected to the processor 41;

[0114] The memory 42 stores computer executable instructions;

[0115] The processor 41 executes the computer execution instructions stored in the memory 42 to implement the following Figure 2-Figure 10 The text information generating method in the illustrated embodiment.

[0116] Optionally, the processor 41 and the memory 42 are connected via a bus 43 .

[0117] For related instructions, please refer to Figure 2-Figure 10 The relevant descriptions and effects corresponding to the steps in the corresponding embodiments can be understood, and no further elaboration is made here.

[0118] The present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, which are used to implement the present invention when executed by a processor. Figure 2-Figure 10 The text information generating method provided by any one of the corresponding embodiments.

[0119] In order to implement the above embodiment, the embodiment of the present disclosure also provides an electronic device.

[0120] refer to Fig.13 , which shows a schematic diagram of the structure of an electronic device 900 suitable for implementing the embodiment of the present disclosure, and the electronic device 900 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.13 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0121] like Fig.13 As shown, the electronic device 900 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 to a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 are also stored. The processing device 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0122] Typically, the following devices may be connected to the I / O interface 905: input devices 906 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 908 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 909. The communication device 909 may allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.13The electronic device 900 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0123] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by the processing device 901, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0124] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-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 computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer 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. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer 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. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0125] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0126] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0127] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0128] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0129] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0130] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0131] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer 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 foregoing.

[0132] In a first aspect, according to one or more embodiments of the present disclosure, a method for generating text information is provided, comprising:

[0133] A target video is obtained, and video features of the target video are extracted, wherein the video features are used to characterize the content of the target video under at least one content dimension; a target prompt is generated according to the video features, wherein the target prompt is used to characterize a generation rule for text information for the target video; and text information for the target video is generated based on the target prompt.

[0134] According to one or more embodiments of the present disclosure, the method further includes: displaying at least two items of the text information in a first area of ​​a video playback page corresponding to the target video; in response to a selection operation on a target text information among the at least two items of the text information, displaying the target text information in a second area of ​​the video playback page; wherein the second area is used to display user comments on the target video.

[0135] According to one or more embodiments of the present disclosure, extracting the video features of the target video includes: obtaining reference text information for the target video, the reference text information including text information for the target video posted by a user; and obtaining the video features of the target video based on the reference text information.

[0136] According to one or more embodiments of the present disclosure, extracting the video features of the target video includes: extracting audio data of the target video; processing the audio data to obtain content text of the target video, wherein the content text is used to characterize character dialogues in the target video; and obtaining the video features based on the content text of the target video.

[0137] According to one or more embodiments of the present disclosure, it also includes: processing the audio data to obtain the music features of the background music in the target video; obtaining the video features based on the content text of the target video includes: obtaining the video features based on the content text of the target video and the music features of the background music; wherein the music features include at least one of the following: music name identification, music type, and music melody.

[0138] According to one or more embodiments of the present disclosure, extracting the video features of the target video includes: extracting frames of the target video to obtain image data of the target video, wherein the image data includes at least one video frame of the target video; performing image recognition on the image data to obtain frame content information representing the image content of the video frame; and generating video features of the target video based on the frame content information.

[0139] According to one or more embodiments of the present disclosure, performing image recognition on the image data to obtain frame content information representing the image content of the video frame includes: performing image recognition on at least two target video frames in the image data respectively to obtain corresponding frame content information; generating video features of the target video based on the frame content information includes: generating a frame content sequence based on the playback timing of the at least two target video frames, the frame content sequence including corresponding frame content information arranged based on the playback timing; generating video features of the target video based on the frame content sequence.

[0140] According to one or more embodiments of the present disclosure, generating a target prompt based on the video features includes: obtaining a corresponding prompt template based on the video features, wherein the prompt template is used to represent a preset rule for dynamically generating prompts by calling input features; generating the input features based on the video features, and calling the prompt template for processing to generate the target prompt.

[0141] According to one or more embodiments of the present disclosure, at least one of the following is included: the text information includes descriptive text and / or graphic symbols; the prompt template includes at least one rule description information, and each rule description information is used to characterize the sub-rules constituting the preset rule.

[0142] According to one or more embodiments of the present disclosure, the rule description information includes at least one of the following: first description information, used to characterize the text format of the text information generated based on the target input feature; second description information, used to characterize the text content of the text information generated based on the target input feature; third description information, used to characterize the text length of the text information generated based on the target input feature; fourth description information, used to characterize the grammatical style of the text information generated based on the target input feature; fifth description information, used to characterize the selection rule of the target input feature.

[0143] According to one or more embodiments of the present disclosure, the method further includes: generating video supplementary data based on the text information, wherein the video supplementary data includes video content matching the text information; and adding the video supplementary data to the target video to generate an optimized video.

[0144] In a second aspect, according to one or more embodiments of the present disclosure, a text information generating device is provided, comprising:

[0145] An acquisition module, used to acquire a target video and extract video features of the target video, wherein the video features are used to characterize the content of the target video under at least one content dimension;

[0146] A first generating module, used to generate a target prompt according to the video feature, wherein the target prompt is used to represent a generation rule of text information for the target video;

[0147] The second generating module is used to generate text information for the target video based on the target prompt.

[0148] According to one or more embodiments of the present disclosure, the second generating module is further used to: display at least two items of the text information in the first area of ​​the video playback page corresponding to the target video; in response to a selection operation on the target text information among the at least two items of the text information, display the target text information in the second area of ​​the video playback page; wherein the second area is used to display user comments on the target video.

[0149] According to one or more embodiments of the present disclosure, when extracting the video features of the target video, the acquisition module is specifically used to: obtain reference text information for the target video, wherein the reference text information includes text information for the target video posted by a user; and obtain the video features of the target video based on the reference text information.

[0150] According to one or more embodiments of the present disclosure, when extracting the video features of the target video, the acquisition module is specifically used to: extract the audio data of the target video; process the audio data to obtain the content text of the target video, wherein the content text is used to characterize the dialogues of the characters in the target video; and obtain the video features based on the content text of the target video.

[0151] According to one or more embodiments of the present disclosure, the acquisition module is further used to: process the audio data to obtain the music features of the background music in the target video; when the acquisition module obtains the video features based on the content text of the target video, it is specifically used to: obtain the video features based on the content text of the target video and the music features of the background music; wherein the music features include at least one of the following: music name identification, music type, and music melody.

[0152] According to one or more embodiments of the present disclosure, when extracting the video features of the target video, the acquisition module is specifically used to: extract frames of the target video to obtain image data of the target video, wherein the image data includes at least one video frame of the target video; perform image recognition on the image data to obtain frame content information representing the image content of the video frame; and generate video features of the target video based on the frame content information.

[0153] According to one or more embodiments of the present disclosure, when the acquisition module performs image recognition on the image data to obtain frame content information representing the image content of the video frame, it is specifically used to: perform image recognition on at least two target video frames in the image data respectively to obtain corresponding frame content information; when the acquisition module generates video features of the target video according to the frame content information, it is specifically used to: generate a frame content sequence based on the playback timing of the at least two target video frames, the frame content sequence including the corresponding frame content information arranged based on the playback timing; generate video features of the target video according to the frame content sequence.

[0154] According to one or more embodiments of the present disclosure, the first generation module is specifically used to: obtain a corresponding prompt template based on the video features, wherein the prompt template is used to represent a preset rule for dynamically generating prompts by calling input features; generate the input features based on the video features, and call the prompt template for processing to generate the target prompt.

[0155] According to one or more embodiments of the present disclosure, at least one of the following is included: the text information includes descriptive text and / or graphic symbols; the prompt template includes at least one rule description information, and each rule description information is used to characterize the sub-rules constituting the preset rule.

[0156] According to one or more embodiments of the present disclosure, the rule description information includes at least one of the following: first description information, used to characterize the text format of the text information generated based on the target input feature; second description information, used to characterize the text content of the text information generated based on the target input feature; third description information, used to characterize the text length of the text information generated based on the target input feature; fourth description information, used to characterize the grammatical style of the text information generated based on the target input feature; fifth description information, used to characterize the selection rule of the target input feature.

[0157] According to one or more embodiments of the present disclosure, the second generating module is further used to: generate video supplementary data based on the text information, wherein the video supplementary data includes video content matching the text information; and add the video supplementary data to the target video to generate an optimized video.

[0158] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;

[0159] The memory stores computer-executable instructions;

[0160] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the text information generating method as described in the first aspect and various possible designs of the first aspect.

[0161] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the text information generation method described in the first aspect and various possible designs of the first aspect is implemented.

[0162] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program, which, when executed by a processor, implements the text information generation method described in the first aspect and various possible designs of the first aspect.

[0163] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0164] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0165] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A method for generating text information, characterized in that: include: Acquire a target video, and extract video features of the target video, where the video features are used to characterize content of the target video under at least one content dimension; Generate a target prompt according to the video feature, wherein the target prompt is used to represent a generation rule of text information for the target video; Based on the target prompt, text information for the target video is generated.

2. The method according to claim 1, characterized in that The method further comprises: Displaying at least two items of the text information in a first area of ​​a video playback page corresponding to the target video; In response to a selection operation on target text information from the at least two pieces of text information, displaying the target text information in a second area of ​​the video playback page; The second area is used to display user comments on the target video.

3. The method according to claim 1, characterized in that The extracting the video features of the target video includes: Acquire reference text information for the target video, where the reference text information includes user comments posted by users for the target video; The video features of the target video are obtained according to the reference text information.

4. The method according to claim 1, characterized in that The extracting the video features of the target video includes: Extracting audio data of the target video; Processing the audio data to obtain a content text of the target video, wherein the content text is used to represent character dialogues in the target video; The video feature is obtained according to the content text of the target video.

5. The method according to claim 4, characterized in that Also includes: Processing the audio data to obtain music features of background music in the target video; The step of obtaining the video feature according to the content text of the target video includes: Obtaining the video feature according to the content text of the target video and the music feature of the background music; The music feature includes at least one of the following: Music name identification, music type, music melody.

6. The method according to claim 1, characterized in that The extracting the video features of the target video includes: Extracting frames of the target video to obtain image data of the target video, wherein the image data includes at least one video frame of the target video; Performing image recognition on the image data to obtain frame content information representing the image content of the video frame; The video features of the target video are generated according to the frame content information.

7. The method according to claim 6, characterized in that The performing image recognition on the image data to obtain frame content information representing the image content of the video frame includes: Performing image recognition on at least two target video frames in the image data respectively to obtain corresponding frame content information; Generating the video features of the target video according to the frame content information includes: Based on the playback timing of the at least two target video frames, generating a frame content sequence, wherein the frame content sequence includes corresponding frame content information arranged based on the playback timing; The video features of the target video are generated according to the frame content sequence.

8. The method according to claim 1, characterized in that: Generating a target prompt according to the video feature includes: According to the video features, a corresponding prompt template is obtained, wherein the prompt template is used to represent a preset rule for dynamically generating prompts by calling input features; The input feature is generated based on the video feature, and the prompt template is called for processing to generate the target prompt.

9. The method according to claim 8, characterized in that Include at least one of the following: The text information includes descriptive text and / or graphic logo; The prompt template includes at least one item of rule description information, and each item of rule description information is used to represent a sub-rule constituting the preset rule.

10. The method according to claim 9, characterized in that The rule description information includes at least one of the following: First description information, used to characterize the text format of text information generated based on the target input feature; The second description information is used to characterize the text content of the text information generated based on the target input feature; The third description information is used to characterize the text length of the text information generated based on the target input feature; Fourth description information, used to characterize the grammatical style of text information generated based on the target input feature; The fifth description information is used to characterize the selection rules of the target input features.

11. The method according to claim 1, characterized in that: Also includes: Based on the text information, generating video supplementary data, wherein the video supplementary data includes video content matching the text information; The video supplementary data is added to the target video to generate an optimized video.

12. A text information generating device, characterized in that: include: An acquisition module, used to acquire a target video and extract video features of the target video, wherein the video features are used to characterize the content of the target video under at least one content dimension; A first generating module, used to generate a target prompt according to the video feature, wherein the target prompt is used to represent a generation rule of text information for the target video; The second generating module is used to generate text information for the target video based on the target prompt.

13. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the text information generating method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the text information generating method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Method for generating search prompt word service and device for generating search prompt word service

    CN104331434A

  • Bullet screen comment recommendation method for information extraction

    CN111683294A

  • Bullet screen material generation method and device, bullet screen material recommendation method and device, equipment, medium and product

    CN114422844A

  • Multimedia information playing control method and related equipment

    CN114697741A

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

    CN116702737A