Subtitling method, apparatus, terminal device, storage medium, and program product

CN122802736APending Publication Date: 2026-09-22BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510344801.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

但是,在上述方法中,字幕修改的效率较低

Benefits of technology

[0018]本公开实施例提供一种字幕处理方法、装置、终端设备、存储介质及程序产品,响应于对第一字幕中的第二字幕的修改,确定修改后的第二字幕,其中,第一字幕为第一视频的字幕,第二字幕为第一字幕中被修改的部分,终端设备可以基于存储器中存储的字幕图像,确定修改后的第二字幕的字幕图像,其中,存储器可以基于第一策略对存储的字幕图像进行管理,终端设备可以基于修改后的第二字幕的字幕图像,对第一视频中的第二字幕的字幕图像进行处理,得到第二视频。在上述方法中,在对第一字幕中的第二字幕进行修改时,终端设备只需对被修改的第二字幕进行处理,无需对所有第一字幕进行处理,因此,可以降低字幕修改的复杂度,提高字幕修改的效率,并且,由于终端设备可以对存储器中存储的字幕图像进行管理,因此,可以避免字幕图像占比较多,导致卡顿的情况,这样,终端设备可以实时生成修改后的第二字幕的字幕图像,使得用户可以实时浏览修改后的第二字幕,进而提高用户的体验。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122802736A_ABST
    Figure CN122802736A_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a subtitle processing method and device, terminal equipment, storage medium and program product, relating to the technical field of multimedia, the subtitle processing method comprises: in response to modification of a second subtitle in a first subtitle, determining a modified second subtitle, the first subtitle is a subtitle of a first video, and the second subtitle is a modified part in the first subtitle; determining a subtitle image of the modified second subtitle based on a subtitle image stored in a storage, the storage manages the stored subtitle image based on a first strategy; and processing a subtitle image of the second subtitle in the first video based on the subtitle image of the modified second subtitle, to obtain a second video.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of multimedia technology, and in particular to a subtitle processing method, apparatus, terminal device, storage medium, and program product. Background Technology

[0002] In multimedia editing scenarios, users can add subtitles to videos, so that when the video is played, users can clearly determine the audio content by listening to the audio and reading the subtitles.

[0003] In related technologies, when a user modifies subtitles already added to a video, the terminal device can completely replace all subtitle images in the video. For example, if a video includes 100 subtitle images, and the user modifies at least one subtitle, the terminal device can regenerate 100 new subtitle images based on the modified subtitles and replace the previous 100 subtitle images, thus achieving subtitle modification. However, the efficiency of subtitle modification is relatively low in the above methods. Summary of the Invention

[0004] This disclosure provides a subtitle processing method, apparatus, terminal device, storage medium, and program product to solve technical problems in the prior art.

[0005] In a first aspect, embodiments of this disclosure provide a subtitle processing method, which includes:

[0006] In response to the modification of the second subtitle in the first subtitle, the modified second subtitle is determined, wherein the first subtitle is the subtitle of the first video, and the second subtitle is the modified part of the first subtitle;

[0007] Based on the subtitle images stored in the memory, the subtitle image of the modified second subtitle is determined, and the memory manages the stored subtitle images based on a first strategy;

[0008] Based on the modified subtitle image of the second subtitle, the subtitle image of the second subtitle in the first video is processed to obtain the second video.

[0009] Secondly, embodiments of this disclosure provide a subtitle processing apparatus, which includes a first determining module, a second determining module, and a processing module, wherein:

[0010] The first determining module is used to determine the modified second subtitle in response to the modification of the second subtitle in the first subtitle, wherein the first subtitle is the subtitle of the first video, and the second subtitle is the modified part of the first subtitle;

[0011] The second determining module is used to determine the subtitle image of the modified second subtitle based on the subtitle images stored in the memory, wherein the memory manages the stored subtitle images based on a first strategy;

[0012] The processing module is used to process the subtitle image of the second subtitle in the first video based on the modified subtitle image of the second subtitle, so as to obtain the second video.

[0013] Thirdly, this disclosure provides a terminal device, including: a processor and a memory;

[0014] The memory stores computer-executed instructions;

[0015] The processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the first aspect and various possible subtitle processing methods described above.

[0016] Fourthly, this disclosure provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the first aspect and various possible subtitle processing methods described above.

[0017] Fifthly, this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the first aspect above and various possible subtitle processing methods involved in the first aspect.

[0018] This disclosure provides a subtitle processing method, apparatus, terminal device, storage medium, and program product. In response to modification of a second subtitle in a first subtitle, a modified second subtitle is determined. The first subtitle is the subtitle of a first video, and the second subtitle is the modified portion of the first subtitle. The terminal device can determine the subtitle image of the modified second subtitle based on subtitle images stored in its memory. The memory can manage the stored subtitle images based on a first strategy. The terminal device can process the subtitle image of the second subtitle in the first video based on the modified second subtitle image to obtain the second video. In this method, when modifying the second subtitle in the first subtitle, the terminal device only needs to process the modified second subtitle, without processing all of the first subtitles. Therefore, the complexity of subtitle modification can be reduced, and the efficiency of subtitle modification can be improved. Furthermore, since the terminal device can manage the subtitle images stored in its memory, it can avoid situations where a large proportion of subtitle images leads to stuttering. Thus, the terminal device can generate the subtitle image of the modified second subtitle in real time, allowing users to view the modified second subtitle in real time, thereby improving the user experience. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present disclosure;

[0021] Figure 2 A flowchart illustrating a subtitle processing method provided in this embodiment of the present disclosure;

[0022] Figure 3 A schematic diagram of a first type provided for an embodiment of this disclosure;

[0023] Figure 4 A schematic diagram of a first type provided for an embodiment of this disclosure;

[0024] Figure 5 A schematic diagram of a first type provided for an embodiment of this disclosure;

[0025] Figure 6 A schematic diagram of a first type provided for an embodiment of this disclosure;

[0026] Figure 7 This is a schematic diagram illustrating the processing of a subtitle image for a second subtitle, provided as an embodiment of the present disclosure.

[0027] Figure 8 This is a schematic diagram illustrating the processing of a subtitle image for a second subtitle, provided as an embodiment of the present disclosure.

[0028] Figure 9 This is a schematic diagram illustrating the processing of a subtitle image for a second subtitle, provided as an embodiment of the present disclosure.

[0029] Figure 10 This is a schematic flowchart of a method for obtaining a first subtitle provided in an embodiment of the present disclosure;

[0030] Figure 11 This is a schematic diagram illustrating a method for managing caption images provided in an embodiment of the present disclosure;

[0031] Figure 12 This is a schematic diagram of the structure of a subtitle processing device provided in an embodiment of the present disclosure;

[0032] Figure 13 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this disclosure. Detailed Implementation

[0033] 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.

[0034] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0035] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the terminal device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0036] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the terminal device.

[0037] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0038] For ease of understanding, the concepts involved in the embodiments of this disclosure will be explained below.

[0039] Terminal device: A device with wireless transceiver capabilities. Terminal devices can be deployed on land, including indoors or outdoors, handheld, wearable, or vehicle-mounted. These terminal devices can be mobile phones, tablet computers, computers with wireless transceiver capabilities, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, vehicle-mounted terminal devices, wireless terminals in self-driving vehicles, wireless terminal devices in remote medical care, wireless terminal devices in smart grids, wireless terminal devices in transportation safety, wireless terminal devices in smart cities, wireless terminal devices in smart homes, wearable terminal devices, etc. The terminal equipment involved in the embodiments of this disclosure may also be referred to as a terminal, user equipment (UE), access terminal equipment, vehicle-mounted terminal, industrial control terminal, UE unit, UE station, mobile station, mobile station, remote station, remote terminal equipment, mobile device, UE terminal equipment, wireless communication equipment, UE agent, or UE device, etc. The terminal equipment may also be fixed or mobile.

[0040] Below, in conjunction with Figure 1 The application scenarios of the embodiments of this disclosure will be described.

[0041] Figure 1 This is a schematic diagram illustrating an application scenario provided by an embodiment of this disclosure. Please refer to [link / reference]. Figure 1 This includes a terminal device. The interface displayed on the terminal device includes a video preview area and an editing area. The preview area includes the video and the subtitles "ABCDEF". The editing area includes the corresponding video clip and the subtitle clip "ABCDEF". When the user changes the subtitles to "ABCD", the subtitle clip in the editing area changes from "ABCDEF" to "ABCD", and the subtitles at the bottom of the video in the preview area also change from "ABCDEF" to "ABCD". This allows users to modify the subtitles in the video, increasing the flexibility of video editing.

[0042] In related technologies, subtitles in videos can be added in the form of images. For example, a terminal device can convert subtitles into images, with the content of the image being the subtitle content. The terminal device can then display the subtitle image during video playback, thus achieving the effect of displaying subtitles within the video. Since subtitle images occupy a large amount of content, the terminal device can generate all subtitle images at once. For example, after a user has edited all the subtitles in a video, the terminal device can convert all subtitles into multiple subtitle images at once and add these multiple subtitle images to the video. However, when the user modifies some subtitles, the terminal device still converts all subtitles back into multiple subtitle images after the user has modified all the subtitles, and then completely replaces the original multiple subtitle images in the video based on the newly converted multiple subtitle images, thus achieving the subtitle modification. For example, in... Figure 1 In the illustrated embodiment, if the video also includes the subtitle "12345", after the user changes the subtitle "ABCDEF" to "ABCD", the terminal device can regenerate the subtitle images for "ABCD" and "12345", and replace the original subtitle images in the video based on the regenerated subtitle images, thereby changing the subtitle "ABCDEF" in the video to "ABCD". In the above method, replacing all subtitle images would cause unnecessary waste and result in low efficiency in subtitle modification. Furthermore, users cannot preview the subtitle modification results in real time, leading to a poor user experience.

[0043] To address the technical problems in related technologies, this disclosure provides a subtitle processing method. In response to the modification of a second subtitle in a first subtitle, the method determines a modified second subtitle, determines a subtitle image of the modified second subtitle based on subtitle images stored in a memory, obtains a first type associated with the modified second subtitle, and processes the subtitle image of the second subtitle in a first video based on the first type and the subtitle image of the modified second subtitle to obtain a second video. In this method, since the first type can include subtitle replacement, subtitle deletion, subtitle addition, and subtitle supplementation, the flexibility of subtitle modification can be improved. Furthermore, since the terminal device can manage the subtitle images stored in the memory, the stuttering problem caused by a high proportion of subtitle images can be avoided. Moreover, since the terminal device can replace modified subtitles without requiring a full replacement of all subtitles, the time consumption for subtitle modification can be reduced, and the efficiency of subtitle modification can be improved. Thus, users can view the modified subtitles in real time, improving the user experience.

[0044] 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.

[0045] Figure 2 This is a flowchart illustrating a subtitle processing method provided in an embodiment of this disclosure. Please refer to [link / reference]. Figure 2 The method may include:

[0046] S201. In response to the modification of the second subtitle in the first subtitle, determine the modified second subtitle.

[0047] The execution entity of this disclosure can be a terminal device or a subtitle processing device installed in the terminal device. The subtitle processing device can be implemented in software, or it can be implemented using a combination of software and hardware; this disclosure does not limit this approach.

[0048] The first subtitle can be the subtitle of the first video. For example, the first video can be a video including subtitles, and the first subtitle can be all the subtitles of the first video or only some of the subtitles of the first video; this disclosure does not limit this. For example, during the process of a user editing a video, the user can add subtitles to the video, and the terminal device can identify the video as the first video. For example, the user can select video clip 1, video clip 2, and video clip 3 for editing, and the user can add subtitles to video clip 1. In this way, the terminal device can identify video clip 1 as the first video, and when video clip 1, video clip 2, and video clip 3 are merged, the terminal device can identify the merged video as the first video.

[0049] For example, the terminal device may display a first interface, which may include a main track and a sub-track for video or image editing. The user can add a video to the main track, and the terminal device can extract the audio of the video and obtain a first subtitle based on the audio of the video.

[0050] In some embodiments, the second subtitle can be a modified portion of the first subtitle. For example, the first subtitle may include 100 subtitle segments, and if a user modifies 10 of these subtitle segments, the terminal device can determine that these 10 subtitle segments are the second subtitle. For example, the first subtitle includes subtitle 1, subtitle 2, and subtitle 3, and if a user modifies subtitle 1, the terminal device can determine subtitle 1 as the second subtitle.

[0051] For example, if the first subtitle is "123456", and the user changes "123456" to "123756", the terminal device can determine the subtitle "4" in the first subtitle as the second subtitle.

[0052] For example, the first subtitle includes the subtitle "12345" and the subtitle "ABCDE". If the user changes the subtitle "12345" to the subtitle "12745", the terminal device can determine the subtitle "3" as the second subtitle. The terminal device can also determine the subtitle "12345" as the second subtitle. This embodiment of the disclosure does not limit this.

[0053] It should be noted that the terminal device can determine the second subtitle based on the user's modification of the first subtitle, or it can determine the second subtitle based on any feasible implementation method. This disclosure does not limit this.

[0054] In some embodiments, when the first subtitle in the first video has a large number of characters, the terminal device can divide the first subtitle into multiple subtitle segments, and these multiple subtitle segments can all be the first subtitle of the first video. For example, the first subtitle of the first video may include multiple texts, and the terminal device can divide the multiple texts into multiple subtitle segments based on the punctuation marks between them. For example, if the first subtitle includes 10 texts, and one of the 10 texts includes one punctuation mark, the terminal device can segment the 10 texts at the position of the punctuation mark to obtain two text segments, where each text segment can be the content of a subtitle segment of the first subtitle.

[0055] The modified second subtitle can be a subtitle obtained by modifying the second subtitle. For example, the first subtitle includes subtitle A and subtitle B. If the user modifies subtitle A to subtitle C, the terminal device can identify subtitle A as the second subtitle and subtitle C as the modified second subtitle. If the user modifies subtitle B to subtitle D, the terminal device can identify subtitle B as the second subtitle and subtitle D as the modified second subtitle.

[0056] In some embodiments, modifying subtitles may include replacing subtitles, deleting subtitles, adding subtitles, and adding subtitles. For example, replacing subtitles may involve the terminal device replacing the text in a subtitle with new text; deleting subtitles may involve the terminal device deleting the text in a subtitle; adding subtitles may involve the terminal device adding new text to an existing subtitle; and adding subtitles may involve the terminal device adding a new subtitle after a subtitle.

[0057] S202. Based on the subtitle image stored in the memory, determine the subtitle image of the modified second subtitle.

[0058] The memory can be used to store subtitle images. For example, after the terminal device generates the subtitle image for the first subtitle, the subtitle image can be stored in the memory. In this way, when the terminal device displays the video editing results, it can retrieve the subtitle image from the memory, improving the efficiency of displaying the video editing results.

[0059] In some embodiments, the terminal device may determine the modified second subtitle image based on the following feasible implementation: determining whether the subtitle images stored in the memory include the modified second subtitle image; if the subtitle images stored in the memory include the modified second subtitle image, the terminal device may obtain the modified second subtitle image based on the subtitle images stored in the memory; if the subtitle images stored in the memory do not include the modified second subtitle image, the terminal device may generate the modified second subtitle image based on the modified second subtitle. In this way, the terminal device can reuse subtitle images based on the memory, improving the smoothness of video preview.

[0060] In some embodiments, when a user modifies a subtitle, they may quickly and repeatedly modify multiple subtitles (e.g., a subtitle may contain 10 texts, and the user may continuously modify 8 texts; and during the subtitle modification process, the user may repeatedly delete or add text). Therefore, each time the terminal device determines a modified second subtitle, it can generate a subtitle image of the modified second subtitle and store the modified second subtitle image in memory. When the terminal device renders the subtitle image of the modified second subtitle, if the memory contains the subtitle image of the modified second subtitle, the terminal device can retrieve the subtitle image of the modified second subtitle from the memory; if the memory does not contain the subtitle image of the modified second subtitle, the terminal device can quickly generate the subtitle image of the modified second subtitle based on the modified second subtitle. This can improve the smoothness of subtitle display.

[0061] For example, a subtitle in the first video is "ABCDEFG". If the user changes CDEFG to 12345, the terminal device needs to generate subtitle images AB1, AB12, AB123, AB1234, and AB12345. If these subtitle images are not already in memory, the terminal device can store them there. If the user changes the subtitle to AB12345 and then deletes the '5', the modified second subtitle becomes AB1234. This allows the terminal device to quickly retrieve the subtitle image AB1234 from memory, improving subtitle image retrieval efficiency.

[0062] In some embodiments, the memory can manage the stored subtitle images based on a first strategy. This allows the terminal device to delete subtitle images stored in the memory when there are many images in the memory, thereby improving memory utilization efficiency.

[0063] In some embodiments, the first strategy can be a First In First Out (FIFO) strategy, meaning that the subtitle image stored in the memory first will also be deleted first. For example, if the memory includes subtitle image 1 and subtitle image 2, and subtitle image 1 is stored in the memory first, followed by subtitle image 2, then when there is little remaining space in the memory, the terminal device can prioritize deleting subtitle image 1 from the memory.

[0064] In some embodiments, the first strategy can be a Least Recently Used (LRU) strategy, that is, the terminal device will prioritize deleting the least recently used caption image from the memory. For example, the memory includes caption image 1 and caption image 2. If caption image 1 was recently used and caption image 2 was not recently used, then when there is little remaining space in the memory, the terminal device can prioritize deleting caption image 2 from the memory.

[0065] S203. Based on the modified subtitle image of the second subtitle, process the subtitle image of the second subtitle in the first video to obtain the second video.

[0066] In some embodiments, the second subtitle may be a modified version of the first subtitle.

[0067] For example, if a subtitle in the first video is 123456, and the user changes the subtitle 123456 to 12345, the terminal device can determine that the modified second subtitle is 12345 and the modified second subtitle is 123456.

[0068] For example, if a subtitle in the first video is 123456, and the user changes the subtitle 123456 to 1234567, the terminal device can determine that the modified second subtitle is 1234567 and the second subtitle is 123456.

[0069] For example, if a subtitle in the first video is 123456, and the user changes the subtitle 123456 to 12345A, the terminal device can determine that the modified second subtitle is 12345A and the second subtitle is 123456.

[0070] For example, if a subtitle in the first video is 123456, and the user adds a new subtitle ABCD after the subtitle 123456, the terminal device can determine that the modified second subtitle is ABCD and the second subtitle is 123456.

[0071] It should be noted that the terminal device can determine the second subtitle in the first video based on any feasible implementation method, and the embodiments disclosed herein do not limit this.

[0072] In some embodiments, the second video can be a video after modifying the second subtitle in the first video. For example, if the subtitle in the first video is 12345, and the user changes the subtitle from 12345 to ABCDE, the terminal device can obtain the second video, wherein the content of the second video is the same as the content of the first video, and the subtitle of the second video is ABCDE.

[0073] In some embodiments, the terminal device may process the subtitle image of the second subtitle in the first video based on the following feasible implementation: obtaining a first type associated with the modified second subtitle, and processing the subtitle image of the second subtitle based on the first type and the modified subtitle image. In this way, the terminal device can replace and add subtitle images of the second subtitle based on the type of subtitle modification, thereby improving the accuracy of subtitle processing.

[0074] The first type may include at least one of the following: subtitle replacement, subtitle deletion, subtitle addition, and subtitle addition.

[0075] In some embodiments, if the user modifies the subtitle by replacing the subtitle, the terminal device can determine that the first type associated with the modified second subtitle is subtitle replacement; if the user modifies the subtitle by deleting the subtitle, the terminal device can determine that the first type associated with the modified second subtitle is subtitle deletion; if the user modifies the subtitle by adding the subtitle, the terminal device can determine that the first type associated with the modified second subtitle is subtitle addition; if the user modifies the subtitle by adding a new subtitle, the terminal device can determine that the first type associated with the modified second subtitle is subtitle addition.

[0076] It should be noted that "adding a subtitle" means adding a new subtitle to the current subtitle segment, while "adding a subtitle to a new subtitle segment" means adding a new subtitle segment to the video. For example, if the first video contains 100 subtitle segments, and the user adds a new subtitle to one of the subtitle segments to create the second video, then the second video will also contain 100 subtitle segments. That is, the user's modification to the subtitles is "adding a subtitle." If the user adds a new subtitle after one of the subtitle segments to create the second video, then the second video will contain 101 subtitle segments. That is, the user's modification to the subtitles is "adding a subtitle to a new subtitle."

[0077] It should be noted that, when the first type is subtitle addition, the second subtitle corresponding to the added subtitle (modified second subtitle) may be a segment of subtitle before the added subtitle, or may be a segment of subtitle after the added subtitle, which is not limited in the embodiments of the present disclosure.

[0078] In the following, in conjunction with Figures 3 to 6 , the first type is described in detail.

[0079] Figure 3 is a schematic diagram of a first type provided by an embodiment of the present disclosure. In the Figure 3 illustrated embodiment, the first type is subtitle replacement, please refer to Figure 3 , which includes Video 1. Wherein, a segment of subtitle of Video 1 is "the weather is nice today", a user may replace "today" in this segment of subtitle with "tomorrow" to obtain Video 2, wherein the subtitle of Video 2 is "the weather is nice tomorrow", and thus the first type of this segment of subtitle may be subtitle replacement.

[0080] Figure 4 is a schematic diagram of a first type provided by an embodiment of the present disclosure. In the Figure 4 illustrated embodiment, the first type is subtitle deletion, please refer to Figure 4 , which includes Video 1. Wherein, a segment of subtitle of Video 1 is "is the weather nice today", a user may delete "is" in this segment of subtitle to obtain Video 2, wherein the subtitle of Video 2 is "the weather is nice today", and thus the first type of this segment of subtitle may be subtitle deletion.

[0081] Figure 5 is a schematic diagram of a first type provided by an embodiment of the present disclosure. In the Figure 5 illustrated embodiment, the first type is subtitle addition, please refer to Figure 5 , which includes Video 1. Wherein, a segment of subtitle of Video 1 is "today's weather", a user may add "is nice" after "weather" in this segment of subtitle to obtain Video 2, wherein the subtitle of Video 2 is "today's weather is nice", and thus the first type of this segment of subtitle may be subtitle addition.

[0082] Figure 6 is a schematic diagram of a first type provided by an embodiment of the present disclosure. In the Figure 6 illustrated embodiment, the first type is subtitle addition, please refer to Figure 6This includes: Video 1. One subtitle in Video 1 is "The weather is great today." Users can add a new subtitle, "Perfect for a picnic," after this subtitle, resulting in Video 2. Video 2's subtitles include "The weather is great today" and "Perfect for a picnic." This allows for the addition of subtitles of type 1, where "The weather is great today" is the modified part (second subtitle), and "Perfect for a picnic" is the modified second subtitle.

[0083] In some embodiments, the terminal device processes the subtitle image of the second subtitle based on the first type and the modified second subtitle image, and there are three cases:

[0084] Case 1: The first type is subtitle replacement or subtitle deletion.

[0085] When the first type is subtitle replacement or subtitle deletion, the terminal device can replace the subtitle image of the second subtitle with the modified subtitle image of the second subtitle.

[0086] For example, the second subtitle appears in the first video from the 1st to the 3rd second. If the user replaces or deletes the content in the second subtitle, the terminal device can add the subtitle image of the modified second subtitle (the subtitle obtained after replacing or deleting the content of the second subtitle) to the first video from the 1st to the 3rd second, and delete the subtitle image of the second subtitle to obtain the second video. In this way, when the second video plays from the 1st to the 3rd second, the terminal device can display the subtitle image of the modified second subtitle.

[0087] Below, in conjunction with Figure 7 The process of the terminal device processing the subtitle image of the second subtitle is explained in detail.

[0088] Figure 7 This is a schematic diagram illustrating the processing of a subtitle image for a second subtitle, provided as an embodiment of this disclosure. Please refer to... Figure 7 This includes: a timeline. The timeline includes video clips, subtitle images for subtitle A, and subtitle images for subtitle B. Subtitle image A is at the beginning of the video clip, and subtitle image B is at the end of the video clip. When the user deletes part of subtitle A and obtains subtitle C, the terminal device ( Figure 7 (Not shown) The subtitle image of subtitle A can be replaced with the subtitle image of subtitle C.

[0089] Scenario 2: The first type is the addition of subtitles.

[0090] When the first type is subtitle addition, the terminal device can add the modified subtitle image of the second subtitle to the first time segment of the first video.

[0091] In some embodiments, the first time period can be the time period during which the subtitle image of the second subtitle is displayed in the first video. For example, if the second subtitle is displayed from the 1st second to the 3rd second of the first video, the terminal device can determine that the first time period during which the second subtitle is displayed in the first video is from the 1st second to the 3rd second of the first video.

[0092] For example, the second subtitle is displayed in the first video from the 1st to the 5th second. If the user adds a new subtitle to the second subtitle to obtain the second video, the new subtitle can also be displayed in the second video from the 1st to the 5th second second.

[0093] Below, in conjunction with Figure 8 The process of the terminal device processing the subtitle image of the second subtitle is explained in detail.

[0094] Figure 8 This is a schematic diagram illustrating the processing of a subtitle image for a second subtitle, provided as an embodiment of this disclosure. Please refer to... Figure 8 This includes: a timeline. The timeline includes video clips and the subtitle image for subtitle A. The subtitle image for subtitle A appears in the video clip from the 1st to the 5th second. When the user adds subtitle B to subtitle A, the terminal device ( Figure 8 (Not shown) It can be determined that the effective period of the subtitle image of subtitle A is from the 1st to the 3rd second, and the effective period of the subtitle image of subtitle B is from the 3rd to the 5th second.

[0095] It should be noted that, in Figure 8 In the embodiments shown, the terminal device can determine the time period during which subtitle A and subtitle B are effective based on any feasible implementation method, and this disclosure does not limit this.

[0096] Case 3: The first type is adding subtitles.

[0097] When adding subtitles in the first type, the terminal device can determine the second time period for adding the modified second subtitle, and add the subtitle image of the modified second subtitle in the second time period.

[0098] In some embodiments, the second time period can be the period during which the modified second subtitle is displayed in the second video. For example, if the terminal device determines that the modified second subtitle will be displayed from the 1st second to the 3rd second of the second video, the terminal device can determine that the second time period is from the 1st second to the 3rd second of the second video.

[0099] Below, in conjunction with Figure 9 The process of the terminal device processing the subtitle image of the second subtitle is explained in detail.

[0100] Figure 9 This is a schematic diagram illustrating the processing of a subtitle image for a second subtitle, provided as an embodiment of this disclosure. Please refer to... Figure 9 This includes: a timeline. The timeline includes video clips and the subtitle image for subtitle A. The subtitle image for subtitle A is displayed in the first 1-2 seconds (first segment) of the video clip. When the user adds subtitle B after subtitle A, the terminal device ( Figure 9 (Not shown) It can be determined that the effective time period of the subtitle image of subtitle B is from the 2nd to the 3rd second (second period).

[0101] This disclosure provides a subtitle processing method. In response to a modification of a second subtitle in a first subtitle, a terminal device determines a modified second subtitle. The terminal device determines whether the subtitle images stored in its memory include the subtitle image of the modified second subtitle. If yes, the terminal device can obtain the subtitle image of the modified second subtitle based on the subtitle images stored in its memory. If no, the terminal device can generate a modified subtitle image based on the modified second subtitle. The terminal device can obtain a first type associated with the modified second subtitle. When the first type is subtitle replacement or subtitle deletion, the terminal device can replace the subtitle image of the second subtitle with the modified subtitle image. When the first type is subtitle addition, the terminal device can add the modified subtitle image of the second subtitle in a first time period. When the first type is subtitle addition, the terminal device can determine a second time period for adding the modified second subtitle and add the modified subtitle image of the second subtitle in the second time period, thus obtaining a second video. In the above method, the terminal device can generate the image after the subtitles are modified in real time, allowing users to view the modified subtitles in real time on the preview page, thus improving the user experience. Furthermore, since the terminal device only needs to process the modified second subtitle and does not need to process all subtitles in the first video, the complexity of subtitle modification can be reduced and the efficiency of subtitle modification can be improved.

[0102] exist Figure 2 Based on the illustrated embodiment, before the terminal device modifies the second subtitle in the first subtitle, the above subtitle processing method may further include a method for obtaining the first subtitle. Below, in conjunction with... Figure 10 The method for obtaining the first subtitle on the terminal device is explained in detail.

[0103] Figure 10 This is a schematic flowchart illustrating a method for obtaining a first subtitle according to an embodiment of this disclosure. Please refer to... Figure 10 The method process includes:

[0104] S1001, Obtain the first audio from the first video.

[0105] Optionally, the terminal device can acquire the first video based on any feasible implementation method.

[0106] The first audio may include at least one of the following: audio from a video segment in the first video, audio from effects used in the first video, or audio added to the first video.

[0107] In some embodiments, when a user edits a first video, if the video clip added by the user contains audio including speech, the audio may affect the first subtitle of the first video. Therefore, when determining the first subtitle of the first video, the terminal device can obtain the audio of the video clip in the first video.

[0108] In some embodiments, when a user edits a first video, if the special effects used by the user in the first video contain audio including speech, the audio may also affect the first subtitle of the first video. Therefore, when determining the first subtitle of the first video, the terminal device can obtain the audio of the special effects used in the first video.

[0109] In some embodiments, when editing a first video, a user may add an audio segment including speech to the first video. This audio segment may affect the first subtitle of the first video. Therefore, when determining the first subtitle of the first video, the terminal device may obtain the audio added by the user in the first video.

[0110] In some embodiments, the terminal device can merge video clips, special effects, and user-added audio (e.g., merge video tracks, audio tracks, and music tracks) to obtain a first video. The terminal device can then extract the audio from the first video to obtain a first audio file. This allows the terminal device to acquire all audio data, ensuring no audio information is lost and thus improving the accuracy of the subtitles.

[0111] S1002. Determine the first subtitle based on the first audio.

[0112] In some embodiments, the terminal device may determine the first subtitle based on the following feasible implementation: when the number of first audio tracks is 1, the terminal device may generate the first subtitle based on the first audio track; when the number of first audio tracks is greater than 1, the terminal device may determine the second audio track with the largest volume among the first audio tracks and generate the first subtitle based on the second audio track. In this way, the terminal device can accurately generate the first subtitle, improving the accuracy of the first subtitle.

[0113] For example, if the first video only includes audio from video segments, the terminal device can determine the text corresponding to the audio of the video segment and generate a first subtitle based on the text corresponding to the audio of the video segment. If the first video only includes audio from special effects used in the first video, the terminal device can determine the text corresponding to the audio of the special effects and generate a first subtitle based on the text corresponding to the audio of the special effects. If the first video only includes audio added by the user in the first video, the terminal device can determine the text corresponding to the added audio and generate a first subtitle based on the text corresponding to the added audio.

[0114] It should be noted that the terminal device can convert speech into text based on any feasible implementation method, and the embodiments disclosed herein are not limited in this respect.

[0115] It should be noted that after the terminal device determines the text of the first audio, it can segment the text to obtain the first subtitle based on any feasible implementation method. This embodiment of the present disclosure does not limit this.

[0116] In some embodiments, the second audio can be the audio with the highest volume. For example, the first video includes audio of a video segment, audio of special effects used in the first video, and audio added by the user in the first video. If the audio of the video segment has the highest volume, the terminal device can determine that the second audio is the audio of the video segment; if the audio of the special effects has the highest volume, the terminal device can determine that the second audio is the audio of the special effects; if the added audio has the highest volume, the terminal device can determine that the second audio is the added audio.

[0117] In some embodiments, when the number of first audio tracks is greater than one, the terminal device can determine the text corresponding to the second audio track and generate a first subtitle based on the text corresponding to the second audio track. This way, even when there are many audio tracks in the first video, the terminal device can accurately determine the first subtitle, improving the accuracy of the first subtitle.

[0118] This disclosure provides a method for obtaining subtitles from a first video. A terminal device can acquire a first audio track from the first video. When the number of first audio tracks is one, the terminal device can generate a first subtitle based on the first audio track. When the number of first audio tracks is greater than one, the terminal device can determine a second audio track with the highest volume from the first audio tracks and generate the first subtitle based on the second audio track. In this method, since the first audio track can include at least one of the following: audio from a video segment in the first video, audio from special effects used in the first video, or audio added by the user in the first video, the terminal device can ensure the integrity of the acquired audio. Furthermore, when the number of audio tracks is large, the terminal device can also generate the first subtitle based on the audio track with the highest volume, thus improving the accuracy of the first subtitle.

[0119] Based on any of the above embodiments, the above subtitle processing method further includes a method for managing subtitle images in a memory, wherein the first strategy for the terminal device to manage the memory is a first-in-first-out strategy. Below, in conjunction with... Figure 11 The method for managing caption images is explained in detail.

[0120] Figure 11 This is a schematic diagram illustrating a method for managing caption images provided in an embodiment of this disclosure. The first strategy is a first-in, first-out (FIFO) strategy; please refer to [link to relevant documentation]. Figure 11 The method process includes:

[0121] S1101. Determine the proportion of subtitle images stored in the memory.

[0122] In some embodiments, the percentage of subtitle images can be the ratio of subtitle images already stored in the memory to the storage space of the memory. For example, if the storage space is 100M and the memory has stored 50M of subtitle images, then the terminal device determines that the percentage of subtitle images in the memory is 50%.

[0123] In some embodiments, the percentage of subtitle images can also be the storage space occupied by subtitle images already stored in the memory. For example, if 50M of subtitle images are already stored in the memory, the terminal device can determine that the percentage of subtitle images in the memory is 50M.

[0124] It should be noted that the terminal device can determine the proportion of subtitle images in the memory based on any feasible implementation method, and the embodiments disclosed herein do not limit this.

[0125] S1102. When the proportion is greater than or equal to a preset threshold, obtain the order in which the subtitle images stored in the memory are stored in the memory.

[0126] In some embodiments, when the percentage is greater than or equal to a preset threshold, it indicates that the remaining storage space of the memory is low. Therefore, the terminal device can manage the subtitle images stored in the memory based on the first strategy.

[0127] In some embodiments, the terminal device may determine the order in which the subtitle images are stored in the memory based on the timestamp of the subtitle images being stored in the memory, or it may determine the order in which the subtitle images are stored in the memory based on any feasible implementation method. This disclosure does not limit this.

[0128] S1103. Based on the order and first-in-first-out strategy, delete the subtitle image stored in the memory.

[0129] In some embodiments, when the proportion of the subtitle image is the ratio of the subtitle images already stored in the memory to the storage space in the memory, the terminal device may determine a preset threshold as any one of 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, and 10%-90%, and this disclosure does not limit this.

[0130] In some embodiments, when the proportion of the subtitle image is the storage space occupied by the subtitle images already stored in the memory, the terminal device can determine any value such as 1M, 10M, and 100M as the preset threshold, and this disclosure does not limit this.

[0131] In some embodiments, when the proportion is greater than or equal to a preset threshold, it indicates that there is little remaining storage space in the memory, which may cause preview lag. Therefore, the terminal device can delete the subtitle images stored in the memory. The terminal device can delete the stored subtitle images based on a FIFO strategy until the proportion of subtitle images in the memory is less than the preset threshold, at which point the terminal device stops deleting subtitle images from the memory.

[0132] For example, when the proportion is greater than or equal to a preset threshold, the memory may include 100 subtitle images. The terminal device can obtain the order in which the 100 subtitle images are stored in the memory, and delete the first subtitle image stored in the memory in sequence until the proportion is less than the preset threshold.

[0133] For example, the memory includes subtitle image 1, subtitle image 2, subtitle image 3, and subtitle image 4, wherein the order in which subtitle image 1, subtitle image 2, subtitle image 3, and subtitle image 4 are stored in the memory is: subtitle image 1 - subtitle image 3 - subtitle image 2 - subtitle image 4. When the proportion of subtitle image 1 in the memory is greater than or equal to a preset threshold, the terminal device can delete subtitle image 1. If the proportion of subtitle image 2, subtitle image 3, and subtitle image 4 in the memory is also greater than the preset threshold, the terminal device can stop deleting subtitle images from the memory, which includes subtitle image 2 and subtitle image 4.

[0134] It should be noted that when the first strategy is LRU, the method by which the terminal device deletes the subtitle image in the memory can refer to the method by which the terminal device deletes the subtitle image in the memory when the first strategy is FIFO, and will not be described again in this embodiment.

[0135] This disclosure provides a method for managing subtitle images. A terminal device determines the proportion of subtitle images in its memory. When the proportion is greater than or equal to a preset threshold, the terminal device obtains the order in which the subtitle images were stored in the memory, and deletes subtitle images from the memory based on this order and a first-in-first-out (FIFO) strategy, until the proportion is less than the preset threshold. In this method, the terminal device can manage the memory to avoid subtitle images occupying a large proportion of the memory, which could cause lag. This allows the terminal device to generate modified subtitle images in real time, enabling users to preview the modified content on a preview page, thus improving the user experience.

[0136] Figure 12 This is a schematic diagram of a subtitle processing device provided in an embodiment of this disclosure. Please refer to [link / reference]. Figure 12 The subtitle processing device 1200 includes a first determining module 1201, a second determining module 1202, and a processing module 1203, wherein:

[0137] The first determining module 1201 is used to determine the modified second subtitle in response to the modification of the second subtitle in the first subtitle, wherein the first subtitle is the subtitle of the first video, and the second subtitle is the modified part of the first subtitle;

[0138] The second determining module 1202 is used to determine the subtitle image of the modified second subtitle based on the subtitle images stored in the memory, wherein the memory manages the stored subtitle images based on a first strategy;

[0139] The processing module 1203 is used to process the subtitle image of the second subtitle in the first video based on the modified subtitle image of the second subtitle to obtain the second video.

[0140] In this way, when modifying the second subtitle in the first subtitle, the subtitle processing device only needs to process the modified second subtitle, without having to process all the first subtitles. Therefore, the complexity of subtitle modification can be reduced and the efficiency of subtitle modification can be improved. Furthermore, since the subtitle processing device can manage the subtitle images stored in the memory, it can avoid the situation where the subtitle images occupy too much space, which would cause lag. Thus, the subtitle processing device can generate the subtitle image of the modified second subtitle in real time, allowing users to browse the modified second subtitle in real time, thereby improving the user experience.

[0141] According to one or more embodiments of this disclosure, the processing module 1203 is specifically used for:

[0142] Obtain a first type associated with the modified second subtitle, the first type including at least one of the following: subtitle replacement, subtitle deletion, subtitle addition, subtitle addition;

[0143] Based on the first type and the modified second subtitle image, the subtitle image of the second subtitle is processed.

[0144] In this way, the subtitle processing device can replace and add subtitle images to the second subtitle based on the type of subtitle modification, thereby improving the accuracy of subtitle processing.

[0145] According to one or more embodiments of this disclosure, the processing module 1203 is specifically used for:

[0146] When the first type is the subtitle replacement or the subtitle deletion, the subtitle image of the second subtitle is replaced with the modified subtitle image of the second subtitle;

[0147] When the first type of subtitle is added, the modified subtitle image of the second subtitle is added to the first time segment of the first video, where the first time segment is the period during which the subtitle image of the second subtitle is displayed in the first video;

[0148] When adding the subtitle to the first type, a second time period for adding the modified second subtitle is determined, and the subtitle image of the modified second subtitle is added in the second time period.

[0149] In this way, when the type of subtitle modification is different, the subtitle processing device can process the subtitle image of the second subtitle in different ways, thereby improving the flexibility of subtitle processing.

[0150] According to one or more embodiments of this disclosure, the second determining module 1202 is specifically used for:

[0151] Determine whether the subtitle image stored in the memory includes the subtitle image of the modified second subtitle;

[0152] When the subtitle image stored in the memory includes the subtitle image of the modified second subtitle, the subtitle image of the modified second subtitle is obtained based on the subtitle image stored in the memory;

[0153] When the subtitle image stored in the memory does not include the subtitle image of the modified second subtitle, the subtitle image of the modified second subtitle is generated based on the modified second subtitle.

[0154] In this way, the subtitle processing device can reuse subtitle images based on memory, improving the smoothness of video preview.

[0155] According to one or more embodiments of this disclosure, the processing module 1203 is further configured to:

[0156] Obtain the first audio from the first video, wherein the first audio includes at least one of the following: audio of a video segment in the first video, audio of special effects used in the first video, and audio added to the first video;

[0157] The first subtitle is determined based on the first audio.

[0158] In this way, the subtitle processing device can acquire all the audio, ensuring that no audio information is lost, thereby improving the accuracy of the subtitles.

[0159] According to one or more embodiments of this disclosure, the processing module 1203 is specifically used for:

[0160] When the number of the first audio clips is 1, the first subtitle is generated based on the first audio clip;

[0161] When the number of the first audio is greater than 1, the second audio with the largest volume is determined from the first audio, and the first subtitle is generated based on the second audio.

[0162] In this way, the subtitle processing device can accurately generate the first subtitle, improving the accuracy of the first subtitle.

[0163] According to one or more embodiments of this disclosure, the processing module 1203 is further configured to:

[0164] Determine the proportion of subtitle images stored in the memory;

[0165] When the proportion is greater than or equal to a preset threshold, the order in which the subtitle images stored in the memory are stored is obtained, and the subtitle images stored in the memory are deleted based on the order and the first-in-first-out strategy.

[0166] In this way, the subtitle processing device can manage the memory, avoiding the subtitle image taking up too much space in the memory and causing lag. This allows the terminal device to generate the modified subtitle image in real time, enabling users to preview the modified subtitle content on the preview page and improving the user experience.

[0167] Figure 13 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this disclosure. Please refer to [link / reference]. Figure 13The diagram illustrates a structural schematic suitable for implementing the terminal device 1300 of the embodiments of the present disclosure. The terminal device may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, personal digital assistants (PDAs), tablet computers, portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 13 The terminal device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0168] like Figure 13 As shown, the terminal device 1300 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 1301, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1302 or a program loaded from storage device 1308 into random access memory (RAM) 1303. The RAM 1303 also stores various programs and data required for the operation of the terminal device 1300. The processing unit 1301, ROM 1302, and RAM 1303 are interconnected via a bus 1304. An input / output (I / O) interface 1305 is also connected to the bus 1304.

[0169] Typically, the following devices can be connected to I / O interface 1305: input devices 1306 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 1307 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1308 including, for example, magnetic tape, hard disk, etc.; and communication devices 1309. Communication device 1309 allows terminal device 1300 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 13 A terminal device 1300 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0170] 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 product comprising 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 device 1309, or installed from storage device 1308, or installed from ROM 1302. When the computer program is executed by processing device 1301, it performs the functions defined in the methods of embodiments of this disclosure.

[0171] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: 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 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 be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit 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: wires, optical fibers, RF (radio frequency), or any suitable combination thereof.

[0172] The aforementioned computer-readable medium may be included in the aforementioned terminal device; or it may exist independently and not assembled into the terminal device.

[0173] The aforementioned computer-readable medium carries one or more programs, which, when executed by the terminal device, cause the terminal device to perform the method shown in the above embodiments.

[0174] This disclosure provides a computer-readable storage medium storing computer-executable instructions. When a processor executes the computer-executable instructions, it implements various methods that may be involved in the above embodiments.

[0175] This disclosure provides a computer program product, including a computer program that, when executed by a processor, implements various methods that may be involved in the above embodiments.

[0176] According to one or more embodiments of this disclosure, this disclosure provides a terminal device, a computer-readable storage medium, and a computer program product. When modifying a second subtitle in a first subtitle, the terminal device only needs to process the modified second subtitle, without needing to process all first subtitles. Therefore, the complexity of subtitle modification can be reduced, and the efficiency of subtitle modification can be improved. Furthermore, since the terminal device can manage the subtitle images stored in the memory, it can avoid the situation where a large proportion of subtitle images leads to lag. In this way, the terminal device can generate the subtitle image of the modified second subtitle in real time, allowing users to browse the modified second subtitle in real time, thereby improving the user experience.

[0177] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language 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 server. 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).

[0178] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than that indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0179] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".

[0180] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), etc.

[0181] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, 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 devices, magnetic storage devices, or any suitable combination of the foregoing.

[0182] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0183] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0184] It is understood that the data involved in this technical solution (including but not limited to the data itself, its acquisition, or its use) shall comply with the requirements of relevant laws, regulations, and provisions. Data may include information, parameters, and messages, such as flow control instructions.

[0185] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0186] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in sequential order. Multitasking and parallel processing may be advantageous in certain environments. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments. Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely exemplary forms of implementing the claims.

Claims

1. A subtitle processing method, characterized in that, include: In response to the modification of the second subtitle in the first subtitle, the modified second subtitle is determined, wherein the first subtitle is the subtitle of the first video, and the second subtitle is the modified part of the first subtitle; Based on the subtitle images stored in the memory, the subtitle image of the modified second subtitle is determined, and the memory manages the stored subtitle images based on a first strategy; Based on the modified subtitle image of the second subtitle, the subtitle image of the second subtitle in the first video is processed to obtain the second video.

2. The method according to claim 1, characterized in that, The process of processing the subtitle image of the second subtitle in the first video based on the modified second subtitle image includes: Obtain a first type associated with the modified second subtitle, the first type including at least one of the following: subtitle replacement, subtitle deletion, subtitle addition, subtitle addition; Based on the first type and the modified second subtitle image, the subtitle image of the second subtitle is processed.

3. The method according to claim 2, characterized in that, The subtitle image of the second subtitle, based on the first type and the modified second subtitle, is processed, including: When the first type is the subtitle replacement or the subtitle deletion, the subtitle image of the second subtitle is replaced with the modified subtitle image of the second subtitle; When the first type of subtitle is added, the modified subtitle image of the second subtitle is added to the first time segment of the first video, where the first time segment is the period during which the subtitle image of the second subtitle is displayed in the first video; When adding the subtitle to the first type, a second time period for adding the modified second subtitle is determined, and the subtitle image of the modified second subtitle is added in the second time period.

4. The method according to any one of claims 1-3, characterized in that, The process of determining the subtitle image of the modified second subtitle based on the subtitle image stored in the memory includes: Determine whether the subtitle image stored in the memory includes the subtitle image of the modified second subtitle; When the subtitle image stored in the memory includes the subtitle image of the modified second subtitle, the subtitle image of the modified second subtitle is obtained based on the subtitle image stored in the memory; When the subtitle image stored in the memory does not include the subtitle image of the modified second subtitle, the subtitle image of the modified second subtitle is generated based on the modified second subtitle.

5. The method according to any one of claims 1-3, characterized in that, In response to any modification to the second subtitle in the first subtitle, the method further includes: Obtain the first audio from the first video, wherein the first audio includes at least one of the following: audio of a video segment in the first video, audio of special effects used in the first video, and audio added to the first video; The first subtitle is determined based on the first audio.

6. The method according to claim 5, characterized in that, Determining the first subtitle based on the first audio includes: When the number of the first audio clips is 1, the first subtitle is generated based on the first audio clip; When the number of the first audio is greater than 1, the second audio with the largest volume is determined from the first audio, and the first subtitle is generated based on the second audio.

7. The method according to any one of claims 1-3, characterized in that, The first strategy is a first-in, first-out strategy, and the method further includes: Determine the proportion of subtitle images stored in the memory; When the proportion is greater than or equal to a preset threshold, the order in which the subtitle images stored in the memory are stored is obtained, and the subtitle images stored in the memory are deleted based on the order and the first-in-first-out strategy.

8. A subtitle processing device, characterized in that, It includes a first determining module, a second determining module, and a processing module, wherein: The first determining module is used to determine the modified second subtitle in response to the modification of the second subtitle in the first subtitle, wherein the first subtitle is the subtitle of the first video, and the second subtitle is the modified part of the first subtitle; The second determining module is used to determine the subtitle image of the modified second subtitle based on the subtitle images stored in the memory, wherein the memory manages the stored subtitle images based on a first strategy; The processing module is used to process the subtitle image of the second subtitle in the first video based on the modified subtitle image of the second subtitle, so as to obtain the second video.

9. A terminal device, characterized in that, include: Processor and memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the subtitle processing method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the subtitle processing method as described in any one of claims 1-7.

11. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the subtitle processing method as described in any one of claims 1-7.