Video processing method and device, electronic equipment and storage medium
By extracting keyframes from the video and grouping them into text boxes, and combining the text content with timestamps to mark plot elements, the problem of incomplete plot content in existing technologies is solved, achieving a comprehensive restoration of plot content and a clear presentation of the timeline.
Patent Information
- Application Number
- CN202511536225.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-27
- Publication Date
- 2026-02-03
AI Technical Summary
Existing technologies that rely on video subtitles to reconstruct plot content cannot fully reflect the true development of the video's storyline, resulting in an incomplete plot.
Keyframes are extracted from the video to be processed, grouped into text boxes, and plot content is formed based on the text content and timestamps. The text direction and plot elements of the text boxes are marked to form a clear timeline.
By combining text boxes and timestamps from video keyframes, a comprehensive reconstruction of the plot was achieved, including clear plot elements and a clear timeline, thus enhancing the integrity of the plot.
Smart Images

Figure CN121462849A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more particularly to a video processing method, apparatus, electronic device, and storage medium. Background Technology
[0002] Currently, in scenarios involving video-based plot reconstruction, related technologies typically only perform Optical Character Recognition (OCR) on the video subtitles and directly generate a plot description based on the recognized subtitle text. However, this method, which relies solely on subtitle information for plot reconstruction, struggles to fully reflect the actual plot development of the video, resulting in an incomplete reconstruction of the plot content. Summary of the Invention
[0003] This disclosure provides a video processing method, apparatus, electronic device, and storage medium.
[0004] In a first aspect, this disclosure provides a video processing method, the method comprising: extracting multiple keyframes from a video to be processed; grouping all first text boxes contained in each keyframe into multiple text box groups, wherein the text direction of each first text box in each text box group is the same; forming a set of text content corresponding to the keyframe based on the text content of second text boxes in each text box group; marking the corresponding text content in the text content set according to the target plot elements corresponding to each text content in the text content set, thereby obtaining a marked set of text content; and forming the plot content of the video to be processed based on the marked set of text content corresponding to each keyframe and the corresponding target timestamp, wherein the target timestamp of the marked set of text content corresponding to the keyframe is the timestamp of the keyframe.
[0005] Secondly, this disclosure provides a video processing apparatus, the apparatus comprising: an extraction module for extracting multiple keyframes from a video to be processed; a grouping module for grouping all first text boxes contained in each keyframe to obtain multiple text box groups, wherein the text direction of each first text box in each text box group is the same; a first forming module for forming a set of text content corresponding to the keyframe based on the text content of second text boxes in each text box group; a marking module for marking corresponding text content in the text content set based on the target plot elements corresponding to each text content in the text content set, to obtain a marked set of text content; and a second forming module for forming the plot content of the video to be processed based on the marked set of text content corresponding to each keyframe and the corresponding target timestamp, wherein the target timestamp of the marked set of text content corresponding to the keyframe is the timestamp of the keyframe.
[0006] Thirdly, this disclosure provides an electronic device, including: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the video processing method disclosed in the embodiments of this disclosure.
[0007] Fourthly, this disclosure provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the video processing method disclosed in the embodiments of this disclosure.
[0008] Fifthly, this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the video processing method disclosed in the embodiments of this disclosure.
[0009] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects: Multiple keyframes are extracted from the video to be processed. For each keyframe, all first text boxes contained in the keyframe are grouped to obtain multiple text box groups, where the text direction of each first text box in a text box group is the same. Based on the text content of the second text boxes in each text box group, a set of text content corresponding to the keyframe is formed. Based on the target plot elements corresponding to each text content in the text content set, the corresponding text content in the text content set is marked to obtain a marked text content set. The timestamp of the keyframe is used as the target timestamp of the marked text content set. Based on the marked text content set corresponding to each keyframe and the corresponding target timestamp, the plot content of the video to be processed is formed. Thus, by combining all text boxes of the keyframes in the video, the video content is restored. In the process of restoration, the obtained text content is marked with plot elements, and the timestamp of the keyframe is used as the timestamp of the marked text content. Therefore, the restored plot content not only contains clear plot elements but also has a clear timeline, making the final presented plot content more comprehensive. Attached Figure Description
[0010] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0011] Figure 1 This is a flowchart illustrating a video processing method according to an exemplary embodiment; Figure 2 This is a flowchart illustrating a video processing method according to another exemplary embodiment; Figure 3 This is a flowchart illustrating a video processing method according to another exemplary embodiment; Figure 4 Here is an example image showing the recognition results for the two first text boxes; Figure 5 This is a flowchart illustrating a video processing method according to another exemplary embodiment; Figure 6 This is a flowchart illustrating a video processing method according to another exemplary embodiment; Figure 7 This is a schematic diagram illustrating the structure of a video processing apparatus according to an exemplary embodiment; Figure 8 This is a structural block diagram of an electronic device according to an exemplary embodiment.
[0012] The accompanying drawings have illustrated specific embodiments of this disclosure, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this disclosure to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0013] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0014] The technical solutions of this disclosure and how they solve the aforementioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this disclosure will now be described with reference to the accompanying drawings.
[0015] First, combine Figure 1 The present disclosure provides an exemplary description of the video processing method provided in the embodiments.
[0016] Figure 1 This is a flowchart illustrating a video processing method according to an exemplary embodiment.
[0017] It should be noted that the video processing method provided in this embodiment can be executed by a video processing device, which can be implemented by software and / or hardware. The video processing device can be an electronic device, or it can be configured in an electronic device to enable the electronic device to have video processing capabilities.
[0018] The electronic device can be any device with computing capabilities, such as a terminal device or a server. This embodiment does not specifically limit the electronic device.
[0019] like Figure 1 As shown, the video processing method includes the following steps: Step 101: Extract multiple keyframes from the video to be processed.
[0020] The video to be processed can be any video to be processed; for example, the video to be processed can be a short drama video to be processed.
[0021] In some embodiments, keyframes may be extracted from the video to be processed to obtain multiple keyframes.
[0022] In other embodiments, keyframes can be obtained by extracting N frames of images every preset number of seconds from the video to be processed.
[0023] The preset value is set in advance according to actual needs. For example, the preset value can be 1 or 2, etc. This embodiment does not specifically limit the value of the preset value.
[0024] Wherein, N is an integer greater than or equal to 1, and N is also preset according to actual needs. For example, N can be 5, 4, or 7, etc. This embodiment does not make specific limitations on the value of N.
[0025] For example, with a preset value of 1, N of 5, and a video duration of 2 minutes, keyframes can be extracted from the video by taking 5 frames per second, resulting in 2*60*5=600 keyframes.
[0026] Step 102: For each keyframe, group all the first text boxes contained in the keyframe to obtain multiple text box groups, wherein the text direction of each first text box in the text box group is the same.
[0027] In some embodiments, all first text boxes contained in the keyframe and their text box coordinates are determined, wherein the image coordinate system on which the text box coordinates are based has the top left corner of the keyframe as the origin, the top boundary line of the keyframe as the abscissa, and the left boundary line of the keyframe as the ordinate; for each first text box, the text direction of the first text box is determined according to its text box coordinates; the first text boxes are grouped according to their text direction to obtain multiple text box groups.
[0028] It should be noted that in this embodiment, the positive direction of the horizontal coordinate of the image coordinate system is to the right along the upper boundary line of the keyframe, and the positive direction of the vertical coordinate is downward along the left boundary line of the keyframe.
[0029] In some embodiments, text detection can be performed on keyframes to obtain text detection results, wherein the text detection results include: a first text box and the text box coordinates of the first text box.
[0030] In some embodiments, text detection can be performed on keyframes based on a preset OCR model to obtain all first text boxes contained in the keyframes and the text box coordinates of the first text boxes.
[0031] It is understood that in this embodiment, text detection is performed on the entire keyframe, including not only the subtitle area of the keyframe, but also the areas of the keyframe other than the subtitle area.
[0032] In some embodiments, the width and height of the first text box can be determined based on the text box coordinates of the first text box, and it can be determined whether the width is greater than the height. If so, the text direction of the first text box is determined to be horizontal. If the width is less than the height, the text direction of the first text box is determined to be vertical. If the width is equal to the height and the first text box contains a single character, the text direction of the first text box can be both vertical and horizontal.
[0033] For example, the coordinates of the first text box include the coordinates of its four corners. Assuming the coordinates of the first text box are [x1, y1], [x2, y2], [x3, y3], [x4, y4], we can obtain the width of the first text box as max(x1,x2, x3, x4) - min(x1, x2, x3, x4) and the height of the first text box as max(y1, y2, y3, y4) - min(y1,y2, y3, y4). We then determine whether the width is greater than the height. If it is, the text direction of the first text box is determined to be horizontal; otherwise, the text direction of the first text box is determined to be vertical.
[0034] It should be noted that the text direction of the first text box is vertical, meaning that the first text box contains a column of text arranged from top to bottom. Conversely, if the text direction of the first text box is horizontal, it means that the first text box contains a line of text arranged from left to right.
[0035] Step 103: Based on the text content of the second text box in each text box group, form a set of text content corresponding to the keyframe.
[0036] Step 104: Based on the target plot elements corresponding to each text content in the text content set, mark the corresponding text content in the text content set to obtain the marked text content set.
[0037] In some embodiments, for each text content in the text content set, plot element analysis can be performed on the text content to determine the target plot element corresponding to the text content, and the text content can be marked using the target plot element.
[0038] In this embodiment, the target plot element can be one of the following: dialogue, scene description, character introduction, location description, time description, etc.
[0039] As another example, for each text content in a text content set, prompt words are generated based on multiple plot elements and the text content itself. These prompt words indicate which of the multiple plot elements should be used to tag the text content. The prompt words are then input into a large language model, and the tagging result output by the large language model is obtained. This tagging result is obtained by tagging the text content using the target plot element, which is derived from the large language model's plot element analysis of the text content based on multiple plot elements. Therefore, by using prompt words with the large language model, the model can accurately determine the target plot element of the text content and quickly complete the tagging of the text content using that target plot element, thus improving the efficiency of obtaining the tagged text content.
[0040] In some embodiments, multiple plot elements can be obtained based on the text direction of the text box to which the text content belongs. As an example, when the text direction is vertical, the multiple plot elements obtained may include, but are not limited to: character introductions, location descriptions, and time descriptions; when the text direction is horizontal, the multiple plot elements obtained may include, but are not limited to: scene descriptions and dialogue.
[0041] It should be noted that the large language model in this embodiment can be any kind of large language model, and this embodiment does not make any specific limitation on it.
[0042] For example, if the text content is: Ye XX, President of XX Group, and the text box containing this text content is determined to be vertical, prompt words can be generated based on the text content and multiple preset plot elements. For example, the prompt words could be "Please label this text content with [Character Introduction], [Location Description], and [Time Description]". Correspondingly, the prompt words can be input into the large language model, and the large language model outputs the labeling result, where the labeling result is: label this text content as a character introduction.
[0043] In some embodiments, for target text content marked as dialogue, the target text box to which the target text content belongs can also be obtained, and the angle of the target text box can be determined according to the text box coordinates of the target text box. If the angle is not within the preset angle range, the marking of the target text content can be changed from dialogue to scene description.
[0044] The preset angle range is set in advance according to actual needs. For example, the preset angle range can be (-5°, 5°).
[0045] The angle of the target text box is the angle between the main direction of the target text box and the horizontal coordinate axis of the image coordinate system.
[0046] Step 105: Based on the set of marked text content corresponding to each keyframe and the corresponding target timestamp, form the plot content of the video to be processed, wherein the target timestamp of the set of marked text content corresponding to the keyframe is the timestamp of the keyframe.
[0047] In some embodiments, one possible way to form the plot content of the video to be processed based on the set of marked text content corresponding to each keyframe and the corresponding target timestamp is to sort the set of marked text content corresponding to each keyframe according to the timestamp, and use the sorting result as the plot content of the video to be processed.
[0048] In some embodiments, another possible implementation of forming the plot content of the video to be processed based on the set of labeled text content corresponding to each keyframe and the corresponding target timestamp can be as follows: The set of labeled text content corresponding to each keyframe is traversed in ascending order of target timestamps; for the current set of text content, the similarity between the first target text content in the current set and the second target text content in the next set of text content is determined, where the labels of the first and second target text content are the same; when the similarity is greater than or equal to... If the similarity threshold is equal to the target text content, the first target text content and the second target text content are merged to obtain the third target text content. The first target text content in the current text content set and the second target text content in the next text content set are deleted. The start timestamp of the third target text content is the target timestamp of the current text content set, and the end timestamp of the third target text content is the target timestamp of the next text content set. At the end of the traversal, the plot content of the video to be processed is formed based on the third target text content, the timestamp of the third target text content, the marked text content set corresponding to each keyframe, and the corresponding target timestamp.
[0049] The preset similarity threshold is set in advance according to actual needs. For example, the preset similarity threshold can be 95% or 90%, etc. This embodiment does not specifically limit the preset similarity threshold.
[0050] In some embodiments, the similarity between the first target text content and the second target text content can be determined according to a preset similarity algorithm.
[0051] The preset similarity algorithm is set in advance according to actual needs. For example, the preset similarity algorithm can be the edit distance algorithm or the Hamming distance algorithm, etc. This embodiment does not specifically limit the preset similarity algorithm.
[0052] For example, the target timestamp of the current text content set is "00:01:19.586", the first target text content in the current text content set is marked as a line of dialogue, and the target timestamp of the next text content set is "00:01:20.103", the second target text content in the next text content set is marked as a line of dialogue. Assuming the first target text content is "Hello, I am Song X", and the second target text content is "Hello, I am Song XX", the similarity between the first and second target text content can be determined. If the similarity exceeds a preset similarity threshold, the first and second target text content are merged. The resulting third target text content can be "Hello, I am Song XX", with a start timestamp of 00:01:19.586 and an end timestamp of 00:01:20.103.
[0053] The video processing method provided in this embodiment extracts multiple keyframes from the video to be processed; for each keyframe, all first text boxes contained in the keyframe are grouped to obtain multiple text box groups, wherein the text direction of each first text box in the text box group is the same; based on the text content of the second text boxes in each text box group, a set of text content corresponding to the keyframe is formed; based on the target plot elements corresponding to each text content in the text content set, the corresponding text content in the text content set is marked to obtain a marked text content set, and the timestamp of the keyframe is used as the target timestamp of the marked text content set; and based on the marked text content set corresponding to each keyframe and the corresponding target timestamp, the plot content of the video to be processed is formed. Thus, by combining all text boxes of the keyframes in the video to restore the video content, and during the restoration process, plot elements are marked on the obtained text content, and the timestamp of the keyframe is used as the timestamp of the marked text content, the restored plot content not only contains clear plot elements but also has a clear timeline, making the final presented plot content more comprehensive.
[0054] Figure 2 This is a flowchart illustrating a video processing method according to another exemplary embodiment.
[0055] like Figure 2 As shown, it may include: Step 201: Extract multiple keyframes from the video to be processed.
[0056] Step 202: For each keyframe, group all the first text boxes contained in the keyframe to obtain multiple text box groups, wherein the text direction of each first text box in the text box group is the same.
[0057] In some embodiments, a possible implementation of grouping all first text boxes contained in a keyframe to obtain multiple text box groups is as follows: determine all first text boxes contained in the keyframe and their text box coordinates, wherein the image coordinate system on which the text box coordinates are based has the top left corner of the keyframe as the origin, the top boundary line of the keyframe as the abscissa, and the left boundary line of the keyframe as the ordinate; for each first text box, determine the text direction of the first text box according to its text box coordinates; and group the first text boxes according to their text direction to obtain multiple text box groups.
[0058] In some embodiments, one possible implementation of determining the multiple first text boxes contained in the keyframe and their respective text box coordinates is to perform text detection on the keyframe and obtain text detection results, wherein the text detection results include: the first text boxes and the text box coordinates of the first text boxes.
[0059] Step 203: For each text box group, merge two first text boxes in the text box group whose interval is less than the first threshold.
[0060] In some embodiments, the interval between any two first text boxes in the text box group can be determined based on the text box coordinates of each first text box in the text box group, and based on the interval, two first text boxes with an interval less than a first threshold can be determined.
[0061] In some embodiments, when the text direction of each text box in the text box group is horizontal, any text box can be selected from the text box group, and a first threshold can be determined based on the width of the selected text box and the number of characters in the text box.
[0062] As an example, the width of the selected text box can be divided by the number of characters in the text box to obtain the width of a single character, and M times the width of the single character can be used as the first threshold.
[0063] Where M is an integer greater than 1, for example, M can be 2.
[0064] In other embodiments, when the text direction of each text box in the text box group is vertical, any text box can be selected from the text box group, and a first threshold can be determined based on the height of the selected text box and the number of characters in the text box.
[0065] As an example, the height of the selected text box can be divided by the number of characters in the text box to obtain the height of a single character, and M times the height of the single character can be used as the first threshold.
[0066] Where M is an integer greater than 1, for example, M can be 2.
[0067] It is understandable that if the interval between two first text boxes is greater than or equal to the first threshold, then there is no need to merge the two first text boxes.
[0068] Step 204: Based on the text content of the second text box in each text box group, form a set of text content corresponding to the keyframe.
[0069] Step 205: Based on the target plot elements corresponding to each text content in the text content set, mark the corresponding text content in the text content set to obtain the marked text content set.
[0070] Step 206: Based on the set of marked text content corresponding to each keyframe and the corresponding target timestamp, form the plot content of the video to be processed, wherein the target timestamp of the set of marked text content corresponding to the keyframe is the timestamp of the keyframe.
[0071] In this embodiment, after grouping the first text boxes of the keyframes to obtain multiple text box groups, the two first text boxes in the text box groups with an interval of less than a first threshold are merged. This allows the segmented, semantically coherent text fragments to be recombined into complete, readable, and usable text units, thereby further improving the quality of the plot content of the obtained video to be processed.
[0072] Figure 3 This is a flowchart illustrating a video processing method according to another exemplary embodiment.
[0073] like Figure 3 As shown, the method may include: Step 301: Extract multiple keyframes from the video to be processed.
[0074] Step 302: For each keyframe, determine all first text boxes contained in the keyframe and the coordinates of the first text boxes. The image coordinate system on which the text box coordinates are based has the top left corner of the keyframe as the origin, the top boundary line of the keyframe as the x-coordinate, and the left boundary line of the keyframe as the y-coordinate.
[0075] Step 303: For each first text box, determine the text direction of the first text box based on its text box coordinates.
[0076] Step 304: Group the first text box according to the text direction to obtain multiple text box groups.
[0077] Step 305: Identify two first text boxes in the text box group whose interval is less than the first threshold.
[0078] It should be noted that for a detailed description of steps 301 to 305, please refer to the relevant descriptions in other embodiments, which will not be repeated here.
[0079] Step 306: When the interval between the two first text boxes is within a first range, merge the two first text boxes according to the text direction of the two first text boxes and the number of characters included in the two first text boxes, wherein the upper limit of the first range is less than the first threshold.
[0080] In some embodiments, when the text direction of the two first text boxes is horizontal, a first range can be determined based on the width of a single character and K. The upper limit of the first range is the product of the width and K, and the lower limit of the first range is the negative of the product of the width and K.
[0081] Where K is an integer greater than 0 and less than 1. It can be understood that K is preset according to actual needs; for example, K can be 0.5. For example, if K is 0.5, H represents the width of a single character, and the first range can be represented as (-0.5H, 0.5H).
[0082] In other embodiments, when the text direction of the two first text boxes is vertical, the upper limit of the first range can be determined based on the height of a single character and P, wherein the upper limit of the first range is the product of the width and P, and the lower limit of the first range can be determined based on the height of a single character and B, wherein the lower limit of the first range can be the negative of the product of the height and B, wherein P and B are both integers greater than 0 and less than 1, and B is greater than P.
[0083] It is understandable that B and P are both preset according to actual needs; for example, P can be 0.5 and B can be 0.85.
[0084] For example, P can be 0.5, B can be 0.85, J represents the height of a single character, and the first range can be expressed as: (-0.85J, 0.5J).
[0085] It should be noted that this embodiment uses the example of text boxes in both the horizontal and vertical directions having the same text size for illustrative purposes.
[0086] In some embodiments, when the interval between the two first text boxes is within a first range, the number of characters contained in each of the two first text boxes is determined, wherein the upper limit of the first range is less than a first threshold; when the number of characters contained in each of the two first text boxes is multiple, and the text direction of the two first text boxes is vertical, the first coordinate value with the largest vertical coordinate value is determined from the text box coordinates of the two first text boxes; the two first text boxes are merged, wherein the text content in the text box obtained by the merging process is formed by concatenating the text content of the first target text box in the two first text boxes with preset characters, and then concatenating the text content of the second target text box, wherein the first target text box is a text box in the two first text boxes that does not have the first coordinate value, and the second target text box is a text box in the two first text boxes that has the first coordinate value.
[0087] Among them, the preset characters are characters that are set in advance according to actual needs. For example, the preset characters can be: ",".
[0088] In other embodiments, the third text box in the two first text boxes contains one character, while the fourth text box in the two first text boxes contains multiple characters. When the interval between the two first text boxes is within a first range, the two first text boxes are merged. The text content in the merged text box is the first character contained in the third text box inserted between the second and third characters in the fourth text box. The center point of the first character in the third text box is between the center points of the second and third characters in the fourth text box, and the center point of the second character in the fourth text box is above the center point of the third character in the fourth text box.
[0089] For example, the fourth text box contains L characters, which are arranged in a column, and the text direction of the fourth text box is vertical. It can be understood that for each character in the fourth text box, the coordinate value of its center point on the horizontal axis is the same. For the nth character in the fourth text box, the coordinate value of the center point of the nth character on the vertical axis is y = Ymin + 0.5 * the height of the nth character, and the coordinate value of the center point of the nth character on the horizontal axis is x = Xmin + 0.5 * the width of the fourth text box, where n can be from 1 to L. For example, if Ymin is 133 and the height of a single character is 28, then the coordinate y of the center point of the first character on the vertical axis is: 133 + 0.5 * 1 * 28, the coordinate y of the center point of the second character on the vertical axis is: 133 + 0.5 * 2 * 28, and so on. If the first character contained in the third text box is located between the center points of the second and third characters in the fourth text box, then when merging the third and fourth text boxes, the first character can be inserted between the second and third characters in the fourth text box.
[0090] In some embodiments, the third text box in the two first text boxes contains one character, while the fourth text box in the two first text boxes contains multiple characters. When the interval between the two first text boxes is not within a first range, the two first text boxes are merged. The text content in the merged text box is the first character contained in the third text box inserted between the second and third characters in the fourth text box. A preset character is inserted between the first and second characters. The center point of the first character in the third text box is between the center points of the second and third characters in the fourth text box, and the center point of the second character in the fourth text box is above the center point of the third character in the fourth text box.
[0091] Among them, the preset characters are characters that are set in advance according to actual needs. For example, the preset characters can be: ",".
[0092] In some embodiments, in order to further improve the quality of the obtained plot content, a target text box group containing a third text box can be obtained from multiple text box groups, wherein the target text box group is different from the text box group; and the third text box in the target text box group is deleted.
[0093] For example, there are two text box groups, namely the first text box group and the second text box group. The text direction of the text boxes in the first text box group is horizontal, and the text direction of the text boxes in the second text box group is vertical. Both the first and second text box groups include a third text box containing a single character. If the third text box in the first text box group is involved in the merging process, the third text box in the second text box group can be deleted.
[0094] In other embodiments, when each of the two first text boxes contains multiple characters and the text direction of the two first text boxes is horizontal, or when one of the two first text boxes contains one character and the other of the two first text boxes contains multiple characters and the text direction of the two first text boxes is horizontal, the second coordinate value with the largest vertical coordinate value is determined from the coordinates of the two first text boxes; the two first text boxes are merged, wherein the text content of the merged text box is formed by concatenating the text content of the fifth target text box after the text content of the sixth target text box, the fifth target text box being the text box with the second coordinate value in the two first text boxes, and the sixth target text box being the text box in the two first text boxes other than the fifth target text box.
[0095] For example, if the text in both first text boxes is horizontal, an example image containing the recognition results of these two first text boxes is shown below. Figure 4 As shown, if it is determined that the two text boxes need to be merged, the text content of the merged text box is formed by concatenating the fifth text box containing the single word "hand" after the sixth text box containing "Masters, come quickly and lend a hand". The text content of the merged text box can be: "Masters, come quickly and lend a hand".
[0096] Step 307: Based on the text content of the second text box in each text box group, form a set of text content corresponding to the keyframe.
[0097] Step 308: Based on the target plot elements corresponding to each text content in the text content set, mark the corresponding text content in the text content set to obtain the marked text content set.
[0098] Step 309: Based on the set of marked text content corresponding to each keyframe and the corresponding target timestamp, form the plot content of the video to be processed, wherein the target timestamp of the set of marked text content corresponding to the keyframe is the timestamp of the keyframe.
[0099] It should be noted that for a detailed description of steps 307 to 309, please refer to the relevant descriptions in other embodiments, which will not be repeated here.
[0100] Figure 5 This is a flowchart illustrating a video processing method according to another exemplary embodiment.
[0101] like Figure 5 As shown, in Figure 2 as well as Figure 3 Based on the illustrated embodiment, before forming the plot content of the video to be processed according to the set of marked text content corresponding to each keyframe and the corresponding target timestamp, the method may further include the following steps: Step 501: From the set of marked text content, determine multiple target text contents that are marked as lines.
[0102] Step 502: Determine the largest third coordinate value on the vertical axis from the text box coordinates of the target text boxes to which the multiple target text contents belong.
[0103] Step 503: Based on multiple third coordinate values, form a set of coordinate values and determine the range of the average value of the coordinate value set.
[0104] In some embodiments, before determining the average range of the coordinate value set, target coordinate values in the coordinate value set may be deleted, wherein the number of target coordinate values is equal to the number of keyframes; and the text content corresponding to the target coordinate values in the marked text content set may be deleted.
[0105] It is understandable that the number of target coordinate values is the same as the number of keyframes, indicating that the text content corresponding to the target coordinate value has always existed. Usually, the text content that has always existed is a watermark. Therefore, in order to further improve the accuracy of the subsequent plot content, the text content corresponding to the target coordinate value can be deleted from the marked text content set.
[0106] In some embodiments, the coordinate value set can be processed by a pre-defined percentile algorithm to obtain the data mean range of the coordinate value set.
[0107] As an example, an exemplary process for processing a set of coordinate values using a pre-defined percentile algorithm to obtain the range of the data mean of the coordinate value set can be as follows: Sort the coordinate values in the set of coordinate values in ascending order to obtain a sorting result. From the sorting result, obtain the first target coordinate value at position f, the second target coordinate value at position e, and the third target coordinate value at position g. Here, f is obtained by rounding up the product of 25% and D; e is obtained by rounding up the product of 50% and D; and g is obtained by rounding up the product of 75% and D. Here, D represents the total number of coordinate values in the set of coordinate values. Subtract the first target coordinate value from the third target coordinate value to obtain the interquartile range. Based on the second target coordinate value and the interquartile range, determine the range of the data mean of the coordinate value set. The upper limit of the data mean range is the sum of the second target coordinate value and the target value. The lower limit of the data mean range is the difference between the second target coordinate value and the target value. Here, the target value is obtained by multiplying 0.5 by the interquartile range.
[0108] Step 504: Obtain the fourth coordinate value that falls within the range of the data mean from the set of coordinate values.
[0109] Step 505: Modify the label of the text content corresponding to the fourth coordinate value in the labeled text content set to scene description.
[0110] In this embodiment, before forming the plot content of the video to be processed based on the set of marked text content corresponding to each keyframe and the corresponding target timestamp, the marking of the text content in the horizontal direction is also corrected, so that the marking of the text content is more accurate, thereby improving the accuracy of the plot content obtained subsequently.
[0111] To facilitate a clear understanding of this disclosure, the following will be combined with... Figure 6 The method of this embodiment is described by way of example.
[0112] Figure 6 This is a flowchart illustrating a video processing method according to another exemplary embodiment.
[0113] like Figure 6 As shown, the method may include: Step 601: Extract frames from the video to be processed to obtain multiple keyframes.
[0114] Step 602: For each keyframe, perform OCR recognition on the keyframe to obtain the OCR recognition result.
[0115] Step 603: Based on the OCR recognition results, the text boxes of the keyframes are grouped to obtain multiple text box groups, wherein the text direction of the text boxes in the text box group is the same.
[0116] Step 604: Merge two text boxes with a spacing of less than the first threshold in text boxes with different text directions.
[0117] Step 605: Based on the text content contained in the text boxes of each text box group, form a set of text content for the keyframe.
[0118] Step 606: Mark the text content in the text content set according to the plot elements to obtain the marked text content set.
[0119] Step 607: Use the timestamp of the keyframe as the target timestamp of the text content set following the mark.
[0120] It is understandable that the target timestamp of each text content in the set of text content after the mark is the timestamp of the keyframe.
[0121] Step 608: Traverse the text content set corresponding to each keyframe to perform similarity merging on text content with the same tag in the current text content set and the next text content set of the current text content set.
[0122] Step 609: Correct the markings of text content that is marked as dialogue in the text content set.
[0123] It should be noted that for a detailed description of each step, please refer to the relevant descriptions in other embodiments, which will not be repeated here.
[0124] In this embodiment, during the process of restoring the video content of the video to be processed, all text boxes of keyframes in the video to be processed are combined to restore the video content. Furthermore, during the restoration process, the text content is marked with plot elements, and the timestamps of the keyframes are also used as the timestamps of the marked text content. This ensures that the restored plot content not only contains clear plot elements but also has a clear timeline, making the final plot content more comprehensive.
[0125] Figure 7 This is a schematic diagram of the structure of a video processing apparatus according to an exemplary embodiment.
[0126] like Figure 7 As shown, the video processing device 700 includes: an extraction module 701, a grouping module 702, a first forming module 703, a marking module 704, and a second forming module 705, wherein: Extraction module 701 is used to extract multiple keyframes from the video to be processed.
[0127] Grouping module 702 is used to group all the first text boxes contained in each keyframe for each keyframe, resulting in multiple text box groups, wherein the text direction of each first text box in the text box group is the same.
[0128] The first forming module 703 is used to form a set of text content corresponding to the keyframe based on the text content of the second text box in each text box group.
[0129] The tagging module 704 is used to tag the corresponding text content in the text content set according to the target plot elements corresponding to each text content in the text content set, so as to obtain the tagged text content set.
[0130] The second forming module 705 is used to form the plot content of the video to be processed based on the set of marked text content corresponding to each key frame and the corresponding target timestamp, wherein the target timestamp of the set of marked text content corresponding to the key frame is the timestamp of the key frame.
[0131] In one embodiment of this disclosure, the device may further include: The merge processing module is used to merge two first text boxes in each text box group whose interval is less than a first threshold.
[0132] In one embodiment of this disclosure, the grouping module 702 is specifically used to: determine all first text boxes contained in the keyframe and the text box coordinates of the first text boxes, wherein the image coordinate system on which the text box coordinates are based has the top left corner of the keyframe as the origin, the top boundary line of the keyframe as the abscissa, and the left boundary line of the keyframe as the ordinate; for each first text box, determine the text direction of the first text box according to the text box coordinates of the first text box; and group the first text boxes according to the text direction to obtain multiple text box groups.
[0133] In one embodiment of this disclosure, the specific implementation of determining all first text boxes contained in the keyframe and the text box coordinates of the first text boxes can be: performing text detection on the keyframe to obtain text detection results, wherein the text detection results include: the first text boxes and the text box coordinates of the first text boxes.
[0134] In one embodiment of this disclosure, the tagging module 704 is specifically configured to: generate prompt words for each text content in the text content set based on multiple plot elements and the text content, wherein the prompt words are used to indicate that one of the multiple plot elements is used to tag the text content; input the prompt words into a large language model, and obtain the tagging result output by the large language model, wherein the tagging result is obtained by tagging the text content using a target plot element, the target plot element is obtained by the large language model through plot element analysis of the text content based on multiple plot elements, and the target plot element is one of the multiple plot elements.
[0135] In one embodiment of this disclosure, the merging processing module includes: A determining unit is used to determine two first text boxes in a group of text boxes whose interval is less than a first threshold. The merging processing unit is used to merge two first text boxes based on the text direction of the two first text boxes and the number of characters included in the two first text boxes when the interval between the two first text boxes is within a first range, wherein the upper limit of the first range is less than a first threshold.
[0136] In one embodiment of this disclosure, the merging processing unit is specifically used for: When the interval between two first text boxes is within a first range, determine the number of characters contained in each of the two first text boxes, wherein the upper limit of the first range is less than a first threshold. Given that each of the two first text boxes contains multiple characters and the text direction of the two first text boxes is vertical, determine the first coordinate value with the largest vertical coordinate value from the coordinates of the two first text boxes. The two first text boxes are merged. The text content of the merged text box is formed by concatenating the text content of the first target text box in the two first text boxes with preset characters, and then concatenating the text content of the second target text box. The first target text box is a text box in the two first text boxes that does not have the first coordinate value, and the second target text box is a text box in the two first text boxes that has the first coordinate value.
[0137] In one embodiment of this disclosure, the merging processing unit is further configured to: If the third text box in one of the two first text boxes contains one character, and the fourth text box in the other of the two first text boxes contains multiple characters, and the interval between the two first text boxes is within a first range, then the two first text boxes are merged. The text content in the merged text box is the first character contained in the third text box inserted between the second and third characters in the fourth text box. The center point of the first character in the third text box is between the center points of the second and third characters in the fourth text box, and the center point of the second character in the fourth text box is above the center point of the third character in the fourth text box.
[0138] In one embodiment of this disclosure, the merging processing unit is further configured to: The third text box in the two first text boxes contains one character, while the fourth text box in the two first text boxes contains multiple characters. If the interval between the two first text boxes is not within a first range, the two first text boxes are merged. The text content in the merged text box is the first character contained in the third text box inserted between the second and third characters in the fourth text box. A preset character is inserted between the first and second characters. The center point of the first character in the third text box is between the center points of the second and third characters in the fourth text box, and the center point of the second character in the fourth text box is above the center point of the third character in the fourth text box.
[0139] In one embodiment of this disclosure, the device further includes: The acquisition module is used to acquire a target text box group that contains a third text box from multiple text box groups, wherein the target text box group is different from the text box groups; The delete module is used to delete the third text box in the target text box group.
[0140] In one embodiment of this disclosure, the merging processing unit is further configured to: When both first text boxes contain multiple characters and the text direction of both first text boxes is horizontal, or when one text box contains one character and the other text box contains multiple characters and the text direction of both first text boxes is horizontal, determine the second coordinate value with the largest vertical coordinate value from the coordinates of the two first text boxes; merge the two first text boxes, wherein the text content of the merged text box is formed by concatenating the text content of the fifth target text box after the text content of the sixth target text box, the fifth target text box is the text box with the second coordinate value in the two first text boxes, and the sixth target text box is the text box in the two first text boxes other than the fifth target text box.
[0141] In one embodiment of this disclosure, the device may further include: The marking correction module is used to: identify multiple target text contents marked as dialogue from the marked text content set; determine the largest third coordinate value on the vertical axis from the text box coordinates of the target text boxes to which the multiple target text contents belong; form a coordinate value set based on the multiple third coordinate values and determine the data mean range of the coordinate value set; obtain the fourth coordinate value within the data mean range from the coordinate value set; and modify the marking of the text content corresponding to the fourth coordinate value in the marked text content set to scene description.
[0142] In one embodiment of this disclosure, the marker correction module is further configured to: delete target coordinate values from the coordinate value set, wherein the number of target coordinate values is equal to the number of keyframes; and delete the text content corresponding to the target coordinate values from the marked text content set.
[0143] In one embodiment of this disclosure, the second forming module 705 is specifically configured to: traverse the set of marked text content corresponding to each keyframe in ascending order of target timestamps; for the current set of text content being traversed, determine the similarity between the first target text content in the current set and the second target text content in the next set of text content, wherein the first and second target text contents have the same markings; if the similarity is greater than or equal to a preset similarity threshold, merge the first and second target text contents to obtain a third target text content, and delete the first target text content in the current set and the second target text content in the next set of text content, wherein the start timestamp of the third target text content is the target timestamp of the current set of text content, and the end timestamp of the third target text content is the target timestamp of the next set of text content; at the end of the traversal, form the plot content of the video to be processed based on the third target text content, the timestamp of the third target text content, the set of marked text content corresponding to each keyframe, and the corresponding target timestamp.
[0144] It should be noted that the foregoing description of the video processing method embodiments also applies to the video processing apparatus of this embodiment, and will not be repeated here.
[0145] It should be noted that the apparatus provided in this disclosure corresponds to the aforementioned method embodiments. Its technical effects are the same as those in the aforementioned method embodiments; please refer to the description in the method section for details.
[0146] According to embodiments of this disclosure, an electronic device is also provided, including: a processor; and a memory for storing processor-executable instructions, wherein the processor is configured to: implement the video processing method disclosed in embodiments of this disclosure.
[0147] To implement the above embodiments, this disclosure also proposes a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the video processing method disclosed in this disclosure.
[0148] To implement the above embodiments, this disclosure also provides a computer program product.
[0149] The computer program product includes a computer program that, when executed by a processor, implements the video processing method disclosed in the embodiments of this disclosure.
[0150] Figure 8 This is a structural block diagram of an electronic device according to an exemplary embodiment. Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0151] like Figure 8 As shown, the electronic device 1000 includes a processor 111, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 112 or a program loaded from memory 116 into random access memory (RAM) 113. The RAM 113 also stores various programs and data required for the operation of the electronic device 1000. The processor 111, ROM 112, and RAM 113 are interconnected via a bus 114. An input / output (I / O) interface 115 is also connected to the bus 114.
[0152] The following components are connected to I / O interface 115: memory 116 including hard disks, etc.; and communication section 117 including network interface cards such as local area network (LAN) cards, modems, etc., communication section 117 performs communication processing via a network such as the Internet; and driver 118 is also connected to I / O interface 115 as needed.
[0153] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 117. When the computer program is executed by processor 111, it performs the functions defined in the methods of this disclosure.
[0154] In an exemplary embodiment, a storage medium including instructions is also provided, such as a memory including instructions, which can be executed by the processor 111 of the electronic device 1000 to perform the above-described method. Optionally, the storage medium may be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.
[0155] In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wireline, optical fiber, RF, etc., or any suitable combination thereof.
[0156] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0157] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A video processing method, characterized in that, The method includes: Extract multiple keyframes from the video to be processed; For each keyframe, all first text boxes contained in the keyframe are grouped to obtain multiple text box groups, wherein the text direction of each first text box in the text box group is the same; Based on the text content of the second text box in each of the text box groups, a set of text content corresponding to the keyframe is formed; Based on the target plot elements corresponding to each text content in the text content set, the corresponding text content in the text content set is marked to obtain the marked text content set. The plot content of the video to be processed is formed based on the set of marked text content corresponding to each keyframe and the corresponding target timestamp, wherein the target timestamp of the set of marked text content corresponding to each keyframe is the timestamp of the keyframe.
2. The method as described in claim 1, characterized in that, Before forming the set of text content corresponding to the keyframe based on the text content of the second text box in each of the text box groups, the method further includes: For each group of text boxes, two first text boxes in the group with a spacing of less than a first threshold are merged.
3. The method as described in claim 2, characterized in that, The step of grouping all the first text boxes contained in the keyframe to obtain multiple text box groups includes: Determine all first text boxes contained in the keyframe and the text box coordinates of the first text boxes, wherein the image coordinate system on which the text box coordinates are based has the top left corner of the keyframe as the origin, the top boundary line of the keyframe as the abscissa, and the left boundary line of the keyframe as the ordinate. For each first text box, the text direction of the first text box is determined based on the text box coordinates. The first text box is grouped according to the text direction to obtain multiple text box groups.
4. The method as described in claim 3, characterized in that, Determining all first text boxes contained in the keyframe and the coordinates of the first text boxes includes: Text detection is performed on the keyframes to obtain text detection results, wherein the text detection results include: the first text box and the text box coordinates of the first text box.
5. The method as described in claim 1, characterized in that, The step of marking the corresponding text content in the text content set according to the target plot elements corresponding to each text content in the text content set includes: For each piece of text in the text content set, based on multiple plot elements and the text content, a prompt word is generated, wherein the prompt word is used to indicate that one of the multiple plot elements is used to mark the text content; The prompt words are input into a large language model to obtain the tagging results output by the large language model. The tagging results are obtained by tagging the text content using target plot elements. The target plot elements are obtained by the large language model through plot element analysis of the text content based on multiple plot elements. The target plot element is one of the multiple plot elements.
6. The method as described in claim 3, characterized in that, The step of merging two first text boxes in the text box group whose interval is less than a first threshold includes: Identify two first text boxes in the text box group whose interval is less than a first threshold; When the interval between the two first text boxes is within a first range, the two first text boxes are merged according to the text direction of the two first text boxes and the number of characters included in the two first text boxes, wherein the upper limit of the first range is less than the first threshold.
7. The method as described in claim 6, characterized in that, When the interval between the two first text boxes is within a first range, the two first text boxes are merged according to their text direction and the number of characters contained in each box, including: If the interval between the two first text boxes is within a first range, determine the number of characters contained in each of the two first text boxes; When each of the two first text boxes contains multiple characters and the text direction of the two first text boxes is vertical, the first coordinate value with the largest vertical coordinate value is determined from the text box coordinates of the two first text boxes. The two first text boxes are merged. The text content of the merged text box is formed by concatenating the text content of the first target text box in the two first text boxes with preset characters, and then concatenating the text content of the second target text box. The first target text box is the text box in the two first text boxes that does not have the first coordinate value, and the second target text box is the text box in the two first text boxes that has the first coordinate value.
8. The method as described in claim 7, characterized in that, When the interval between the two first text boxes is within a first range, merging the two first text boxes according to the text direction of the two first text boxes and the number of characters included in the two first text boxes further includes: When the third text box in one of the two first text boxes contains one character, and the fourth text box in the other of the two first text boxes contains multiple characters, and the interval between the two first text boxes is within a first range, the two first text boxes are merged. The text content in the merged text box is the first character contained in the third text box inserted between the second and third characters in the fourth text box. The center point of the first character in the third text box is located between the center points of the second and third characters in the fourth text box, and the center point of the second character in the fourth text box is located above the center point of the third character in the fourth text box.
9. The method as described in claim 8, characterized in that, When the interval between the two first text boxes is within a first range, the two first text boxes are merged based on their text direction and the number of characters contained within them, further including: If the third text box in one of the two first text boxes contains one character, and the fourth text box in the other of the two first text boxes contains multiple characters, and the interval between the two first text boxes is not within a first range, the two first text boxes are merged. The text content in the merged text box is the first character contained in the third text box inserted between the second and third characters in the fourth text box. A preset character is inserted between the first character and the second character. The center point of the first character in the third text box is between the center points of the second character and the third character in the fourth text box, and the center point of the second character in the fourth text box is above the center point of the third character in the fourth text box.
10. The method as described in claim 8 or 9, characterized in that, The method further includes: From the plurality of text box groups, obtain a target text box group that contains the third text box, wherein the target text box group is different from the text box groups; Delete the third text box in the target text box group.
11. The method as described in claim 7, characterized in that, When the interval between the two first text boxes is within a first range, the two first text boxes are merged based on their text direction and the number of characters contained within them, further including: When each of the two first text boxes contains multiple characters and the text direction of the two first text boxes is horizontal, or when one of the two first text boxes contains one character and the other of the two first text boxes contains multiple characters and the text direction of the two first text boxes is horizontal, the second coordinate value with the largest vertical coordinate value is determined from the coordinates of the two first text boxes. The two first text boxes are merged, wherein the text content in the merged text box is formed by concatenating the text content of the fifth target text box after the text content of the sixth target text box. The fifth target text box is the text box in the two first text boxes that has the second coordinate value, and the sixth target text box is the text box in the two first text boxes other than the fifth target text box.
12. The method as described in claim 3, characterized in that, Before forming the plot content of the video to be processed based on the set of marked text content corresponding to each keyframe and the corresponding target timestamp, the method further includes: From the set of marked text content, determine multiple target text contents that are marked as lines of dialogue; From the text box coordinates of the target text boxes to which the multiple target text contents belong, determine the largest third coordinate value on the vertical axis; Based on multiple third coordinate values, a set of coordinate values is formed, and the range of the average value of the set of coordinate values is determined; Obtain the fourth coordinate value that falls within the range of the data mean from the set of coordinate values; Modify the label of the text content corresponding to the fourth coordinate value in the marked text content set to a scene description.
13. The method as described in claim 12, characterized in that, Before determining the range of the average value of the coordinate value set, the method further includes: Delete the target coordinate values from the set of coordinate values, wherein the number of target coordinate values is equal to the number of keyframes; Delete the text content corresponding to the target coordinate value from the set of marked text content.
14. The method as described in claim 1, characterized in that, The step of forming the plot content of the video to be processed based on the set of marked text content corresponding to each keyframe and the corresponding target timestamp includes: Based on the target timestamps of the marked text content set corresponding to each keyframe in ascending order, the marked text content set corresponding to each keyframe is traversed and processed. For the current set of text content that has been traversed, determine the similarity between the first target text content in the current set of text content and the second target text content in the next set of text content of the current set of text content, wherein the first target text content and the second target text content have the same label; If the similarity is greater than or equal to a preset similarity threshold, the first target text content and the second target text content are merged to obtain the third target text content, and the first target text content in the current text content set and the second target text content in the next text content set are deleted. The start timestamp of the third target text content is the target timestamp of the current text content set, and the end timestamp of the third target text content is the target timestamp of the next text content set. At the end of the traversal, the plot content of the video to be processed is formed based on the third target text content, the timestamp of the third target text content, the set of marked text content corresponding to each keyframe, and the corresponding target timestamp.
15. A video processing apparatus, characterized in that, The device includes: The extraction module is used to extract multiple keyframes from the video to be processed; The grouping module is used to group all the first text boxes contained in each keyframe to obtain multiple text box groups, wherein the text direction of each first text box in each text box group is the same. The first forming module is used to form a set of text content corresponding to the keyframe based on the text content of the second text box in each of the text box groups. The tagging module is used to tag the corresponding text content in the text content set according to the target plot elements corresponding to each text content in the text content set, so as to obtain the tagged text content set. The second forming module is used to form the plot content of the video to be processed based on the set of marked text content corresponding to each key frame and the corresponding target timestamp, wherein the target timestamp of the set of marked text content corresponding to each key frame is the timestamp of the key frame.
16. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-14.
17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-14.
18. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1-14.
