Title generation method and apparatus, electronic device, and readable storage medium

By integrating the grammatical logic and extracting features from the dialogue in short videos through a pre-trained deep learning model, key characters and relationships are obtained, and more relevant video titles are generated, solving the problem of low relevance between titles and content in existing technologies.

CN115859958BActive Publication Date: 2025-12-05BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211572369.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-08
Publication Date
2025-12-05
Estimated Expiration
2042-12-08

AI Technical Summary

Technical Problem

Existing training models are unable to accurately understand short video content, resulting in low relevance between the generated video titles and the video content.

Method used

By integrating grammatical logic and extracting features through a pre-trained deep learning model, the key characters and relationships in the target video are obtained, and the target title is generated.

Benefits of technology

It improves the relevance between video titles and video content, making the generated titles more reflective of the video's key information and attracting viewers' attention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115859958B_ABST
    Figure CN115859958B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a title generation method and device, electronic equipment and a storage medium, wherein the method comprises: obtaining a first text of a target video, the first text being a set of lines in the target video; inputting the first text into a pre-trained first deep learning model for syntax logic integration to obtain a second text; inputting the second text into a pre-trained second deep learning model for feature extraction to obtain feature information, the feature information being used to represent key characters and character relationships in the target video; and generating a target title of the target video according to the feature information. The title generation method provided by the embodiments of the present application integrates the lines in the target video through syntax logic, extracts key characters and character relationships, and determines the target title through the key characters and character relationships, thereby improving the relevance between the video title and the video content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of video technology, and in particular to methods, apparatus, electronic devices, and readable storage media for generating titles. Background Technology

[0002] As short videos gain increasing popularity online, the number of short videos generated daily on various video platforms is also growing, leading to a significant increase in the workload of creating titles for these videos. Currently, besides manually annotating short video titles, it's possible to automatically generate titles using trained models. However, current training models generally cannot accurately understand the content of short videos, resulting in titles that are not closely related to the video content. In other words, the automatically generated video titles have low relevance to the video content. Summary of the Invention

[0003] The purpose of this invention is to provide a method, apparatus, electronic device, and readable storage medium for generating titles, so as to solve the problem of low correlation between video titles and video content in the prior art.

[0004] In a first aspect of this invention, a method for generating a title is provided, comprising:

[0005] Obtain the first text of the target video, wherein the first text is a set of lines in the target video;

[0006] The first text is input into a pre-trained first deep learning model for grammatical logic integration to obtain the second text. The grammatical logic integration is used to delete content in the first text that does not conform to grammatical logic.

[0007] The second text is input into a pre-trained second deep learning model for feature extraction to obtain feature information, which is used to represent the key characters and relationships in the target video.

[0008] Generate the target title of the target video based on the feature information.

[0009] Optionally, after generating the target title of the target video based on the feature information, the method further includes:

[0010] If the target title includes character names, obtain the relationships between all characters in the target video;

[0011] The title is determined based on the relationships between the characters, and the title is used as the target name.

[0012] Replace the character name in the target title with the target name to obtain the replaced target title.

[0013] Optionally, before inputting the second text into a pre-trained second deep learning model for feature extraction to obtain feature information, the method further includes:

[0014] Obtain all character information from the target video;

[0015] The character information is matched with all the lines in the line set to obtain the character lines corresponding to the character information. The character information includes the character name and the facial information corresponding to the character name.

[0016] The second text is updated based on the character's lines to obtain the updated second text. The updated second text contains a set of lines corresponding to the character's lines from all the lines. The second text is used to train the second deep learning model.

[0017] Optionally, before inputting the first text into a pre-trained first deep learning model for syntactic and logical integration to obtain the second text, the method further includes:

[0018] Obtain the created first language model;

[0019] The first language model is trained using the first training sample to obtain the first output value, and the first language model is updated based on the first output value. The first training sample is a grammatical logic sample.

[0020] The trained first language model is selected as the first deep learning model.

[0021] Optionally, before inputting the second text into a pre-trained second deep learning model for feature extraction to obtain feature information, the method further includes:

[0022] Obtain the created second language model;

[0023] The second language model is trained using the second training samples to obtain the second output value, and the second language model is updated based on the second output value. The second training samples are feature samples, which include character names and character relationships.

[0024] The trained second language model is selected as the second deep learning model.

[0025] Optionally, generating a target title for the target video based on the feature information includes:

[0026] Based on the feature information, key characters, key events, and character relationships in the dialogue set are determined, wherein the key events are matched with the key characters, and the character relationships are determined based on the key characters.

[0027] Generate the target title of the target video based on the key characters, the key events, and the relationships between the characters.

[0028] In a second aspect of the invention, a title generation apparatus is also provided, comprising:

[0029] The acquisition module is used to acquire the first text of the target video, wherein the first text is a set of lines in the target video;

[0030] The first input module is used to input the first text into a pre-trained first deep learning model for syntactic and logical integration to obtain the second text.

[0031] The second input module is used to input the second text into a pre-trained second deep learning model for feature extraction to obtain feature information, which is used to represent the key characters and relationships in the target video.

[0032] The generation module is used to generate a target title for the target video based on the feature information.

[0033] Optional, also includes:

[0034] The relationship acquisition module is used to acquire the relationships between all characters in the target video when the target title includes character names;

[0035] The relationship determination module is used to determine the target name based on the relationship between the characters, wherein the target name is;

[0036] The relationship replacement module is used to replace the character name in the target title with the target name.

[0037] In a third aspect of the present invention, an electronic device is also provided, including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the title generation method as described in any one of the first aspects.

[0038] In a fourth aspect of the present invention, a computer-readable storage medium is also provided, wherein a program or instructions are stored thereon, which, when executed by a processor, implement the steps of the title generation method as described in any one of the first aspects.

[0039] This invention provides a method, apparatus, electronic device, and storage medium for generating titles. The method includes: acquiring a first text of a target video, where the first text is a set of dialogue lines from the target video; inputting the first text into a pre-trained first deep learning model for grammatical and logical integration to obtain a second text, wherein the grammatical and logical integration is used to delete content in the first text that does not conform to grammatical logic; inputting the second text into a pre-trained second deep learning model for feature extraction to obtain feature information, wherein the feature information is used to represent key characters and relationships in the target video; and generating a target title for the target video based on the feature information. This invention provides a title generation method that, by integrating the dialogue lines in a target video using grammatical logic and extracting key characters and relationships, determines the target title based on these key characters and relationships, thereby improving the relevance between the video title and the video content. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0041] Figure 1 This is a flowchart illustrating the title generation method in an embodiment of the present invention;

[0042] Figure 2 This is a schematic diagram of the structure of the title generation device in an embodiment of the present invention;

[0043] Figure 3 This is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. Detailed Implementation

[0044] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0045] Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the steps as sequential processes, many of these steps can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the steps can be rearranged. A process can be terminated when its operation is complete, but it may also have additional steps not included in the figures. A process can correspond to a method, function, procedure, subroutine, subroutine, etc.

[0046] Furthermore, the terms "first," "second," etc., may be used herein to describe various directions, actions, steps, or elements, but these directions, actions, steps, or elements are not limited by these terms. These terms are only used to distinguish a first direction, action, step, or element from another direction, action, step, or element. For example, without departing from the scope of this application, a first speed difference may be referred to as a second speed difference, and similarly, a second speed difference may be referred to as a first speed difference. Both the first speed difference and the second speed difference are speed differences, but they are not the same speed difference. The terms "first," "second," etc., should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0047] This application provides a method for generating a title, such as... Figure 1 As shown, the steps of this method include:

[0048] Step 101: Obtain the first text of the target video, where the first text is a set of lines from the target video.

[0049] In this embodiment, the target video can be a long video, a short video, or an edited version, etc. This embodiment uses a short video as an example. The first text is a collection of lines from the target video, that is, a collection integrating the lines of all characters in the target video. It should be noted that in short videos, narration or annotations are also included in the line collection. It should also be noted that the line collection is generally obtained by acquiring the text of the lines and then organizing the text. For example, the line collection can be obtained by extracting the text of the lines from the video.

[0050] Step 102: Input the first text into the pre-trained first deep learning model for syntactic and logical integration to obtain the second text.

[0051] In this embodiment, the first deep learning model is a pre-trained deep learning model, such as a language model. Specifically, the first file is input into the first deep learning model for processing, and the output is second text. The second text is text integrated with the first text through grammatical logic. Compared with the first text, the second text obtained after filtering the first text through the first deep learning model has more fluent dialogue logic and eliminates possible grammatical and logical errors in the first text, resulting in higher accuracy of the dialogue. The grammatical logic integration refers to deleting content in the first text that does not conform to grammatical logic, ensuring that the obtained first text is grammatically correct and does not present any awkward comprehension for the user.

[0052] Step 103: Input the second text into the pre-trained second deep learning model for feature extraction to obtain feature information, which is used to represent the key characters and relationships in the target video.

[0053] In this embodiment, the second deep learning model is the same as the first deep learning model, both being pre-trained deep learning models. The second deep learning model can also be a language model, etc. It should be noted that the outputs of the first and second deep learning models are different. After the second deep learning model is input into the second text, it outputs the feature information in the second text. The feature information includes key characters and relationships in the target video. Key characters are protagonists or supporting characters, etc., and character relationships refer to relationships such as father and son, mother and son, friends, etc. By extracting feature information, the text generated by the second deep learning model is more relevant to the important information in the dialogue.

[0054] Step 104: Generate the target title of the target video based on the feature information.

[0055] In this embodiment, the target title of the target video is generated using the feature information obtained above. Preferably, the target title includes key characters and key events related to those characters, thus attracting viewers. For example, a title like "Fang Yinuo is taking care of Hehe in the ward, is she going to shave her head?" includes the character names "Fang Yinuo" and "Hehe" and the key event "taking care of her in the ward," making it more likely to attract viewers to click on the short video. Unlike existing technologies that typically determine video titles using large-scale corpora, this application trains the model using corpora (dialogue) from downstream tasks, enabling the model to better understand and extract key information.

[0056] This embodiment provides a title generation method, including: obtaining a first text of a target video, wherein the first text is a set of lines from the target video; inputting the first text into a pre-trained first deep learning model for grammatical and logical integration to obtain a second text, wherein the grammatical and logical integration is used to delete content in the first text that does not conform to grammatical logic; inputting the second text into a pre-trained second deep learning model for feature extraction to obtain feature information, wherein the feature information is used to represent key characters and relationships in the target video; and generating a target title for the target video based on the feature information. This embodiment of the invention provides a title generation method that, by integrating the lines of a target video using grammatical logic and extracting key characters and relationships, determines the target title based on these key characters and relationships, thereby improving the relevance between the video title and the video content.

[0057] Optionally, regarding step 104, after generating the target title of the target video based on the feature information, the method further includes:

[0058] If the target title includes character names, obtain the relationships between all characters in the target video;

[0059] The title is determined based on the relationships between the characters, and the title is used as the target name.

[0060] Replace the character name in the target title with the target name to obtain the replaced target title.

[0061] In this embodiment, when the target title includes character names, the character relationships between all characters in the dialogue set are first obtained. The target name is determined through these character relationships, where the target name represents the character relationship, such as mother, daughter, father, son, brother, etc. Specifically, when determining whether the target title contains character names, this is done by detecting whether the target title contains characters mentioned in the dialogue. For example, if the original title is "Fang Yinuo is taking care of Hehe in the ward, is she going to shave her head?", it includes the characters "Fang Yinuo" and "Hehe" who have dialogue, therefore the target title contains character names. Similarly, the character relationships can be determined by detecting the relationship between "Fang Yinuo" and "Hehe" in the dialogue.

[0062] For example, the original title was "Fang Yinuo is taking care of Hehe in the hospital room, is she going to shave her head?" Based on the dialogue, Fang Yinuo is Hehe's mother. Therefore, by replacing "mother" and "daughter," the original title becomes "Mother is taking care of her daughter in the hospital room, is she going to shave her head?" Since many users may not have watched the entire series or recognize the characters, replacing the character names in the title with their relationships helps viewers better understand the short video's content, thus increasing their interest in watching it.

[0063] It should be noted that this replacement can only be achieved if the character name appears in the target title. If the target title does not contain the character name, the character name cannot be replaced.

[0064] Optionally, regarding step 103, before inputting the second text into a pre-trained second deep learning model for feature extraction to obtain feature information, the method further includes:

[0065] Obtain all character information from the target video;

[0066] The character information is matched with all the lines in the line set to obtain the character lines corresponding to the character information;

[0067] The second text is updated based on the character's lines to obtain the updated second text, which contains a set of lines corresponding to the character's lines from all the lines.

[0068] In this embodiment, by performing image recognition on the characters appearing in the target video, the characters are associated with their names. Then, character information can be obtained from the dialogue set by character name. The character information in the target video includes the characters' facial information. By matching the facial information with the characters' dialogue, the dialogue for each character can be obtained, thus better refining the second text. Therefore, in the second text, each line of dialogue has a one-to-one correspondence with a character, which allows for better training of the second deep learning model and facilitates its extraction of feature information.

[0069] It should be noted that facial information can also be incorporated into this embodiment. Matching facial information with the dialogue can compensate for missing information in the dialogue. Facial information can better convey the character's current emotional state, such as happiness or anger. Incorporating facial information enriches the content of the dialogue and allows the second deep learning model to better learn specialized information related to the dialogue, improving its ability to capture key information (behavior, character relationships, etc.) and making the model-generated text more relevant to the important information in the dialogue.

[0070] Optionally, regarding step 102, before inputting the first text into a pre-trained first deep learning model for syntactic and logical integration to obtain the second text, the method further includes:

[0071] Obtain the created first language model;

[0072] The first language model is trained using the first training sample to obtain the first output value, and the first language model is updated based on the first output value. The first training sample is a grammar-logic sample, which contains a preset grammar and a preset logic.

[0073] The trained first language model is selected as the first deep learning model.

[0074] In this embodiment, the first deep learning model is a pre-trained language model. A language model is an abstract mathematical model of language based on objective linguistic facts, representing a correspondence. The first training samples consist of a large amount of text including grammatical logic, with the text storage level at the GB level. The first language model is trained using these first training samples to obtain a first output value, which can be a loss value. This loss value determines the recognition performance of the current model, enabling it to learn various grammatical logics and making the generated text more fluent. The first language model can be a deep learning model; the specific model type is not specifically limited in this embodiment, and any model that meets the language recognition function can be used. It should be noted that the preset grammar and preset logic are normal grammar and logic, conforming to the user's usual speaking habits.

[0075] For example, a first-language model can be used to correct text, removing grammatical errors and replacing them with correct grammar. Dialogue can also be predicted to enhance its completeness.

[0076] Optionally, regarding step 103, before inputting the second text into a pre-trained second deep learning model for feature extraction to obtain feature information, the method further includes:

[0077] Obtain the created second language model;

[0078] The second language model is trained using the second training samples to obtain the second output value, and the second language model is updated based on the second output value. The second training samples are feature samples, which include character names and character relationships.

[0079] The trained second language model is selected as the second deep learning model.

[0080] In this embodiment, the second language model is the same type as the first language model, both being language models. However, the training samples used for the second and first language models are different, resulting in different functionalities in the final trained models. The second training samples include a large amount of feature text, which consists of numerous character names and relationships between characters. The second language model is trained using these second training samples to obtain a second output value, which can also be a loss value. The loss value helps determine the recognition performance of the current model, allowing the second deep learning model to better extract the required feature information from the dialogue, thereby enhancing its ability to capture key information. In another embodiment, facial information can be additionally extracted and incorporated into the dialogue, partially compensating for missing information in the dialogue and allowing the model to better learn professional information in the dialogue domain, improving its ability to capture key information (behaviors, character relationships, etc.) in the dialogue, making the model-generated text more relevant to the important information in the dialogue. The second language model can also be a deep learning model; the specific model type is not specifically limited in this embodiment, and any model that meets the feature recognition function can be used.

[0081] Optionally, for step 104, generating a target title for the target video based on the feature information includes:

[0082] Based on the feature information, key characters, key events, and character relationships in the dialogue set are determined, wherein the key events are matched with the key characters, and the character relationships are determined based on the key characters.

[0083] Generate the target title of the target video based on the key characters, the key events, and the relationships between the characters.

[0084] In this embodiment, the feature information mainly includes key characters in the dialogue set, as well as key events and character relationships related to these key characters. By displaying the key characters, key events, and character relationships in the target title, it can be better associated with the video content. Specifically, the key characters included in the feature information can be identified based on the feature information. Then, key events and character relationships related to the key characters are filtered out from the dialogue using these key characters. Thus, a title is generated based on the key characters, key events, and character relationships. For example, the title "Xiaoming and Mom Go Grocery Shopping" includes the key character Xiaoming, the character relationship Mom, and the key event Grocery Shopping.

[0085] This embodiment provides a title generation method, including: obtaining a first text of a target video, wherein the first text is a set of lines from the target video; inputting the first text into a pre-trained first deep learning model for grammatical and logical integration to obtain a second text, wherein the grammatical and logical integration is used to delete content in the first text that does not conform to grammatical logic; inputting the second text into a pre-trained second deep learning model for feature extraction to obtain feature information, wherein the feature information is used to represent key characters and relationships in the target video; and generating a target title for the target video based on the feature information. This embodiment of the invention provides a title generation method that, by integrating the lines of a target video using grammatical logic and extracting key characters and relationships, determines the target title based on these key characters and relationships, thereby improving the relevance between the video title and the video content.

[0086] This invention also provides a title generation device 200, such as... Figure 2 As shown, the title generation device 200 includes:

[0087] The acquisition module 210 is used to acquire the first text of the target video, wherein the first text is a set of lines in the target video;

[0088] The first input module 220 is used to input the first text into a pre-trained first deep learning model for grammatical logic integration to obtain the second text. The grammatical logic integration is used to delete content in the first text that does not conform to grammatical logic.

[0089] The second input module 230 is used to input the second text into a pre-trained second deep learning model for feature extraction to obtain feature information, the feature information being used to represent key characters and relationships in the target video;

[0090] The generation module 240 is used to generate a target title for the target video based on the feature information.

[0091] Optional, also includes:

[0092] The relationship acquisition module is used to acquire the relationships between all characters in the target video when the target title includes character names;

[0093] A relationship determination module is used to determine a title based on the relationship between the characters and to use the title as the target name.

[0094] The relationship replacement module is used to replace the character name in the target title with the target name.

[0095] Optional, also includes:

[0096] The character acquisition module is used to acquire all character information in the target video;

[0097] The character matching module is used to match the character information with all the lines in the line set to obtain the character lines corresponding to the character information. The character information includes the character name and the facial information corresponding to the character name.

[0098] The dialogue update module is used to update the second text according to the character's dialogue to obtain the updated second text. The updated second text contains a set of dialogues corresponding to the character from all the dialogues. The second text is used to train the second deep learning model.

[0099] Optional, also includes:

[0100] The first model acquisition module is used to acquire the created first language model;

[0101] The first model training module is used to train the first language model with the first training sample to obtain the first output value, and update the first language model according to the first output value. The first training sample is a grammar-logic sample, which contains a preset grammar and a preset logic.

[0102] The first model determination module is used to determine the trained first language model as the first deep learning model.

[0103] Optional, also includes:

[0104] The second model acquisition module is used to acquire the created second language model;

[0105] The second model training module is used to train the second language model using the second training samples to obtain the second output value, and to update the second language model based on the second output value. The second training samples are feature samples, which include character names and character relationships.

[0106] The second model determination module is used to determine the trained second language model as the second deep learning model.

[0107] Optionally, the generation module may also include:

[0108] A determination submodule is used to determine key characters, key events, and character relationships in the dialogue set based on the feature information, wherein the key events are matched with the key characters, and the character relationships are determined based on the key characters;

[0109] A generation submodule is used to generate a target title for the target video based on the key roles, key events, and relationships between the characters.

[0110] This application improves the relevance between video titles and video content by integrating the dialogue in the target video through grammatical logic and extracting key characters and relationships.

[0111] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, such as... Figure 3 As shown, the electronic device 300 includes a memory 310 and a processor 320. The number of processors 320 in the electronic device 300 can be one or more. Figure 3 Taking a processor 320 as an example; the memory 310 and processor 320 in the server can be connected via a bus or other means. Figure 3 Taking the example of a connection between China and Israel via a bus.

[0112] The memory 310, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the title generation method in this embodiment of the invention. The processor 320 executes various functional applications and data processing of the server / terminal / server by running the software programs, instructions, and modules stored in the memory 310, thereby realizing the title generation method described above.

[0113] The processor 320 is used to run the computer program stored in the memory 310, and performs the following steps:

[0114] Obtain the first text of the target video, wherein the first text is a set of lines in the target video;

[0115] The first text is input into a pre-trained first deep learning model for grammatical logic integration to obtain the second text. The grammatical logic integration is used to delete content in the first text that does not conform to grammatical logic.

[0116] The second text is input into a pre-trained second deep learning model for feature extraction to obtain feature information, which is used to represent the key characters and relationships in the target video.

[0117] Generate the target title of the target video based on the feature information.

[0118] Optionally, after generating the target title of the target video based on the feature information, the method further includes:

[0119] If the target title includes character names, obtain the relationships between all characters in the target video;

[0120] The title is determined based on the relationships between the characters, and the title is used as the target name.

[0121] Replace the character name in the target title with the target name to obtain the replaced target title.

[0122] Optionally, before inputting the second text into a pre-trained second deep learning model for feature extraction to obtain feature information, the method further includes:

[0123] Obtain all character information from the target video;

[0124] The character information is matched with all the lines in the line set to obtain the character lines corresponding to the character information. The character information includes the character name and the facial information corresponding to the character name.

[0125] The second text is updated based on the character's lines to obtain the updated second text. The updated second text contains a set of lines corresponding to the character's lines from all the lines. The second text is used to train the second deep learning model.

[0126] Optionally, before inputting the first text into a pre-trained first deep learning model for syntactic and logical integration to obtain the second text, the method further includes:

[0127] Obtain the created first language model;

[0128] The first language model is trained using the first training sample to obtain the first output value, and the first language model is updated based on the first output value. The first training sample is a grammatical logic sample.

[0129] The trained first language model is selected as the first deep learning model.

[0130] Optionally, before inputting the second text into a pre-trained second deep learning model for feature extraction to obtain feature information, the method further includes:

[0131] Obtain the created second language model;

[0132] The second language model is trained using the second training samples to obtain the second output value, and the second language model is updated based on the second output value. The second training samples are feature samples, which include character names and character relationships.

[0133] The trained second language model is selected as the second deep learning model.

[0134] Optionally, generating a target title for the target video based on the feature information includes:

[0135] Based on the feature information, key characters, key events, and character relationships in the dialogue set are determined, wherein the key events are matched with the key characters, and the character relationships are determined based on the key characters.

[0136] Generate the target title of the target video based on the key characters, the key events, and the relationships between the characters.

[0137] In one embodiment, the electronic device provided by the present invention has a computer program that is not limited to the above-described method operation, and can also perform related operations in the title generation method provided by any embodiment of the present invention.

[0138] The memory 410 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, the memory 410 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory, or other non-volatile solid-state storage device. In some instances, the memory 410 may further include memory remotely located relative to the processor 420, which can be connected to a server / terminal / server via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0139] This application improves the relevance between video titles and video content by integrating the dialogue in the target video through grammatical logic and extracting key characters and relationships.

[0140] This invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a header generation method, the method comprising:

[0141] Obtain the first text of the target video, wherein the first text is a set of lines in the target video;

[0142] The first text is input into a pre-trained first deep learning model for grammatical logic integration to obtain the second text. The grammatical logic integration is used to delete content in the first text that does not conform to grammatical logic.

[0143] The second text is input into a pre-trained second deep learning model for feature extraction to obtain feature information, which is used to represent the key characters and relationships in the target video.

[0144] Generate the target title of the target video based on the feature information.

[0145] Optionally, after generating the target title of the target video based on the feature information, the method further includes:

[0146] If the target title includes character names, obtain the relationships between all characters in the target video;

[0147] The title is determined based on the relationships between the characters, and the title is used as the target name.

[0148] Replace the character name in the target title with the target name to obtain the replaced target title.

[0149] Optionally, before inputting the second text into a pre-trained second deep learning model for feature extraction to obtain feature information, the method further includes:

[0150] Obtain all character information from the target video;

[0151] The character information is matched with all the lines in the line set to obtain the character lines corresponding to the character information. The character information includes the character name and the facial information corresponding to the character name.

[0152] The second text is updated based on the character's lines to obtain the updated second text. The updated second text contains a set of lines corresponding to the character's lines from all the lines. The second text is used to train the second deep learning model.

[0153] Optionally, before inputting the first text into a pre-trained first deep learning model for syntactic and logical integration to obtain the second text, the method further includes:

[0154] Obtain the created first language model;

[0155] The first language model is trained using the first training sample to obtain the first output value, and the first language model is updated based on the first output value. The first training sample is a grammatical logic sample.

[0156] The trained first language model is selected as the first deep learning model.

[0157] Optionally, before inputting the second text into a pre-trained second deep learning model for feature extraction to obtain feature information, the method further includes:

[0158] Obtain the created second language model;

[0159] The second language model is trained using the second training samples to obtain the second output value, and the second language model is updated based on the second output value. The second training samples are feature samples, which include character names and character relationships.

[0160] The trained second language model is selected as the second deep learning model.

[0161] Optionally, generating a target title for the target video based on the feature information includes:

[0162] Based on the feature information, key characters, key events, and character relationships in the dialogue set are determined, wherein the key events are matched with the key characters, and the character relationships are determined based on the key characters.

[0163] Generate the target title of the target video based on the key characters, the key events, and the relationships between the characters.

[0164] Of course, the computer-executable instructions provided in the embodiments of the present invention are not limited to the method operations described above, but can also perform related operations in a title generation method provided in any embodiment of the present invention.

[0165] This application improves the relevance between video titles and video content by integrating the dialogue in the target video through grammatical logic and extracting key characters and relationships.

[0166] The computer-readable storage medium of this invention can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be—but is not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0167] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0168] The program code contained on the storage medium can be transmitted using any suitable medium, including—but not limited to—wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0169] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or terminal. In cases involving remote computers, the remote computer can 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 can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0170] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A method of generating a title, characterized by, include: Obtain the first text of the target video, wherein the first text is a set of lines in the target video; The method further includes: inputting the first text into a pre-trained first deep learning model for grammatical and logical integration to obtain a second text; the grammatical and logical integration is used to delete content in the first text that does not conform to grammatical logic; before inputting the first text into the pre-trained first deep learning model for grammatical and logical integration to obtain the second text, the method further includes: obtaining a created first language model; training the first language model with a first training sample to obtain a first output value, and updating the first language model according to the first output value; the first training sample is a grammatical and logical sample, which contains a preset grammar and preset logic; and determining the trained first language model as the first deep learning model. The second text is input into a pre-trained second deep learning model for feature extraction to obtain feature information, which is used to represent key characters and relationships in the target video. Before inputting the second text into the pre-trained second deep learning model for feature extraction to obtain feature information, the method further includes: obtaining a created second language model; training the second language model with second training samples to obtain a second output value, and updating the second language model according to the second output value, wherein the second training samples are feature samples, and the feature samples include character names and relationships; and determining the trained second language model as the second deep learning model. Generating a target title for the target video based on the feature information, wherein generating a target title for the target video based on the feature information includes: determining key characters, key events, and character relationships in the dialogue set based on the feature information, wherein the key events are matched with the key characters, and the character relationships are determined based on the key characters; and generating a target title for the target video based on the key characters, the key events, and the character relationships.

2. The method of claim 1, wherein, After generating the target title of the target video based on the feature information, the method further includes: If the target title includes character names, obtain the relationships between all characters in the target video; The title is determined based on the relationships between the characters, and the title is used as the target name. Replace the character name in the target title with the target name to obtain the replaced target title.

3. The method of claim 1, wherein, Before inputting the second text into a pre-trained second deep learning model for feature extraction to obtain feature information, the method further includes: Obtain all character information from the target video; The character information is matched with all the lines in the line set to obtain the character lines corresponding to the character information. The character information includes the character name and the facial information corresponding to the character name. The second text is updated based on the character's lines to obtain the updated second text. The updated second text contains a set of lines corresponding to the character's lines from all the lines. The second text is used to train the second deep learning model.

4. A title generation apparatus characterized by comprising: include: The acquisition module is used to acquire the first text of the target video, wherein the first text is a set of lines in the target video; The first model acquisition module is used to acquire the created first language model; The first model training module is used to train the first language model with the first training sample to obtain the first output value, and update the first language model according to the first output value. The first training sample is a grammar-logic sample, which contains a preset grammar and a preset logic. The first model determination module is used to determine the trained first language model as the first deep learning model. The first input module is used to input the first text into a pre-trained first deep learning model for grammatical logic integration to obtain the second text. The grammatical logic integration is used to delete content in the first text that does not conform to grammatical logic. The second model acquisition module is used to acquire the created second language model; The second model training module is used to train the second language model using the second training samples to obtain the second output value, and to update the second language model based on the second output value. The second training samples are feature samples, which include character names and character relationships. The second model determination module is used to determine the trained second language model as the second deep learning model. The second input module is used to input the second text into a pre-trained second deep learning model for feature extraction to obtain feature information, which is used to represent the key characters and relationships in the target video. A generation module is used to generate a target title for the target video based on the feature information. The generation module further includes a determination submodule, used to determine key characters, key events, and character relationships in the dialogue set based on the feature information. The key events are matched with the key characters, and the character relationships are determined based on the key characters. A generation submodule is used to generate a target title for the target video based on the key roles, key events, and relationships between the characters.

5. The generating apparatus according to claim 4, characterized in that, Also includes: The relationship acquisition module is used to acquire the relationships between all characters in the target video when the target title includes character names; A relationship determination module is used to determine a title based on the relationship between the characters and to use the title as the target name. The relationship replacement module is used to replace the character names in the target title with the target name to obtain the replaced target title.

6. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the title generation method as described in any one of claims 1 to 3.

7. A computer-readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the title generation method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Video title generation method and device, server and storage medium

    CN110263214A

  • Video title generation method and device, electronic equipment and storage medium

    CN112541095A