Subtitle processing method, device, and storage medium
The method simplifies subtitle processing by splitting subtitles with end times into two types and performing background clearing for those without end times, achieving unified and efficient subtitle rendering.
Patent Information
- Application Number
- JP2024507962
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-08-09
- Publication Date
- 2025-10-27
- Estimated Expiration
- 2041-08-09
AI Technical Summary
Subtitles with and without end times are processed using separate logics, leading to a complex control logic in subtitle processing.
A method to split subtitles with end times into two types: one without end times, and perform a background content clearing operation for subtitles without end times, simplifying the control logic by generating a target subtitle sequence with only start times.
Simplifies subtitle control logic and prevents splash screens by processing all subtitles with a unified logic, ensuring efficient subtitle rendering.
Smart Images

Figure 0007760703000003 
Figure 0007760703000004 
Figure 0007760703000005
Abstract
Description
[Technical Field]
[0001] The present application relates to the field of subtitling technology, and in particular to a subtitling processing method, device, and storage medium. [Background technology]
[0002] In the past, audio / video codec technology and data transmission technology during multimedia playback have always been at the core of multimedia technology, which often leads people to unconsciously ignore the value of subtitles. However, with the development of software technology, just like the road of web page technology, from plain text to rich text, the content to be carried is becoming more and more abundant, and the content that can be conveyed through subtitles is also becoming more and more.
[0003] In the subtitle control logic, each subtitle does not actually need to have an end time, and may not even need a start time (called superimposed subtitles in some specifications). Normal subtitles, unlike superimposed subtitles, must have at least one start time. Therefore, depending on whether a subtitle has an end time, the traditional method implements two logics, interweaving subtitles with end times and subtitles without end times, and processing them in two processing logics respectively, which makes the control logic relatively complex. Summary of the Invention [Problem to be solved by the invention]
[0004] The embodiments of the present invention provide a subtitle processing method, device, and storage medium that effectively solve the problem that subtitles with end times and subtitles without end times are interwoven and processed by two processing logics, respectively, resulting in a relatively complex control logic. [Means for solving the problem]
[0005] According to one aspect of the present invention, there is provided a subtitle processing method, the subtitle processing method including: obtaining an original subtitle sequence, the original subtitle sequence including at least one first original subtitle, the first original subtitle being a subtitle with an end time; performing a splitting operation on the first original subtitle to obtain a first type subtitle and a second type subtitle, a start time of the first type subtitle being the start time of the first original subtitle, a start time of the second type subtitle being the end time of the first original subtitle, the first type subtitle and the second type subtitle being subtitles without end times, and subtitle However, No. 1 and instructing to render a subtitle content corresponding to the first original subtitle included in the second type subtitle into an image. The subtitles, and generating a target subtitle sequence corresponding to the original subtitle sequence based on the first type subtitle and the second type subtitle. Furthermore, the splitting operation further includes converting a first subtitle with an end time into a second subtitle with a start time, wherein the start time of the second subtitle is equal to the end time of the first subtitle.
[0006] Furthermore, before performing a division operation on the first original subtitle, the subtitle processing method includes determining whether the first original subtitle satisfies a division condition, and performing the division operation on the first original subtitle includes: When it is determined that the first original subtitle satisfies the division condition, , performing a splitting operation on the first original subtitle.
[0007] Further, the splitting conditions include that the time interval between the end time of the first original subtitle and the start time of the next subtitle is longer than a predetermined time, or that the first original subtitle is the last subtitle in the original subtitle sequence.
[0008] Furthermore, when the division condition includes that a time interval between an end time of the first original subtitle and a start time of the next subtitle is longer than a predetermined time, after determining whether the first original subtitle satisfies the division condition, the subtitle processing method further comprises: If it is determined that the first original subtitle does not satisfy the division condition, adjust the end time of the first original subtitle to obtain a first target subtitle, and ensure that the end time of the first target subtitle is the start time of the next subtitle, or Ta if not, adjusting the start time of the next subtitle to obtain a second target subtitle, where the start time of the second target subtitle is the end time of the first original subtitle.
[0009] Furthermore, after generating a target subtitle sequence corresponding to the original subtitle sequence based on the first type subtitles and the second type subtitles, the subtitle processing method further includes: determining a subtitle type of currently broadcast subtitles, where the currently broadcast subtitles are any one of the subtitles in the target subtitle sequence; and obtaining target background content by rendering the currently broadcast subtitles based on the subtitle type of the currently broadcast subtitles; if the subtitle type of the currently broadcast subtitles is the first type subtitles, the target background content is background content obtained by rendering the subtitle content of the currently broadcast subtitles; and if the subtitle type of the currently broadcast subtitles is the second type subtitles, the target background content is background content obtained by performing a background content clear operation.
[0010] Furthermore, after obtaining the target background content by rendering the currently broadcast subtitles according to the subtitle type of the currently broadcast subtitles, the subtitle processing method further includes: comparing whether the current playback progress time is longer than the start time of the currently broadcast subtitles; The current playback progress time is from the start time of the currently broadcast subtitles If so, displaying the target background content.
[0011] Furthermore, the original subtitle sequence further includes at least one second original subtitle; The second original subtitle is a subtitle without an end time.
[0012] According to another aspect of the present invention, there is provided a subtitle processing device, comprising: an acquisition module for acquiring an original subtitle sequence, the original subtitle sequence including at least one first original subtitle, the first original subtitle being a subtitle with an end time; and a division operation for performing a division operation on the first original subtitle acquired by the acquisition module to acquire a first type subtitle and a second type subtitle, the start time of the first type subtitle being the start time of the first original subtitle, the start time of the second type subtitle being the end time of the first original subtitle, the first type subtitle and the second type subtitle being subtitles without end times ... subtitle However, No. 1 and instructing to render a subtitle content corresponding to the first original subtitle included in the second type subtitle into an image. The subtitles, The apparatus includes a splitting module for instructing to perform a background content clearing operation, and a generating module for generating a target subtitle sequence corresponding to the original subtitle sequence based on the first type subtitle and the second type subtitle split by the splitting module.
[0013] The subtitle processing device further includes a determination module for determining whether the first original subtitle satisfies a division condition before the division module performs a division operation on the first original subtitle, and the division module: The determining module determines that the first original subtitle satisfies a dividing condition. If so, perform a splitting operation on the first original subtitle.
[0014] Further, the splitting conditions include that the time interval between the end time of the first original subtitle and the start time of the next subtitle is longer than a predetermined time, or that the first original subtitle is the last subtitle in the original subtitle sequence.
[0015] Furthermore, when the division condition includes that the time interval between the end time of the first original subtitle and the start time of the next subtitle is longer than a predetermined time, when the determination module determines that the first original subtitle does not satisfy the division condition, the subtitle processing device adjusts the end time of the first original subtitle to obtain a first target subtitle, and ensures that the end time of the first target subtitle is the start time of the next subtitle; or The method further includes an adjusting module for adjusting a start time of the next subtitle to obtain a second target subtitle, where the start time of the second target subtitle is the end time of the first original subtitle.
[0016] The determination module is further configured to determine the subtitle type of currently broadcast subtitles after the generation module generates a target subtitle sequence corresponding to the original subtitle sequence based on the first type subtitles and the second type subtitles, and the currently broadcast subtitles are any one of the subtitles in the target subtitle sequence. The subtitle processing device further includes a rendering module that obtains target background content by rendering the currently broadcast subtitles based on the subtitle type of the currently broadcast subtitles determined and identified by the determination module, and where, if the subtitle type of the currently broadcast subtitles is the first type subtitles, the target background content is background content obtained by rendering the subtitle content of the currently broadcast subtitles, and where, if the subtitle type of the currently broadcast subtitles is the second type subtitles, the target background content is background content obtained by performing a background content clear operation.
[0017] The subtitle processing device further includes a comparison module that compares whether a current playback progress time is longer than a start time of the currently broadcast subtitles after the rendering module obtains target background content by rendering the currently broadcast subtitles based on a subtitle type of the currently broadcast subtitles, and a display module that displays the target background content when the comparison module determines that the current playback progress time is longer than the start time of the currently broadcast subtitles.
[0018] According to another aspect of the present invention, there is provided an apparatus including a processor and a memory, wherein program instructions are stored in the memory, and the processor executes the program instructions stored in the memory to cause the apparatus to perform the subtitle processing method according to any one of the embodiments.
[0019] According to another aspect of the present invention, there is provided a computer-readable storage medium having at least one instruction stored therein, the at least one instruction being loaded and executed by a processor to implement the subtitle processing method according to any one of the embodiments. [Effects of the Invention]
[0020] By analyzing the first original subtitle with an end time from the original subtitle sequence, performing a splitting operation on the first original subtitle with an end time, splitting the first original subtitle into a first type subtitle and a second type subtitle, and generating a target subtitle sequence, a subtitle with only a start time in the target subtitle sequence is realized, which can be processed by only one processing logic. [Brief explanation of the drawings]
[0021] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, specific embodiments of the present application will be described in detail in conjunction with the accompanying drawings to make the technical solutions and other beneficial effects of the present application more apparent. [Figure 1]FIG. 2 is a flow chart of a subtitle processing method provided by a first embodiment of the present invention; [Figure 2] FIG. 2 is a flow chart of a subtitle processing method provided by embodiment 2 of the present invention; [Figure 3] FIG. 10 is a flow chart of a subtitle processing method provided by embodiment 3 of the present invention; [Figure 4] FIG. 4 is a structural schematic diagram of a subtitle processing device provided by a fourth embodiment of the present invention; [Figure 5] FIG. 5 is a structural schematic diagram for applying a storage medium to a device according to a fifth embodiment of the present invention; DETAILED DESCRIPTION OF THE INVENTION
[0022] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without any creative work fall within the scope of protection of the present application.
[0023] As shown in Figure 1, a flow chart of a subtitle processing method provided in a first embodiment of the present invention includes the following steps:
[0024] Step S101: A terminal obtains an original subtitle sequence, the original subtitle sequence including at least one first original subtitle, the first original subtitle being a subtitle with an end time.
[0025] In an embodiment of the present invention, an original subtitle sequence includes one or more original subtitles, each of which has a start time. Here, the one or more original subtitles include at least one first original subtitle. In an embodiment of the present invention, the first original subtitle refers to a subtitle with an end time. When an original subtitle sequence includes multiple subtitles, the multiple subtitles may include at least one first original subtitle and may also include at least one second original subtitle. In an embodiment of the present invention, the second original subtitle refers to a subtitle without an end time.
[0026] If an original subtitle sequence includes multiple original subtitles, the multiple original subtitles are arranged in order of their start times to form this original subtitle sequence, where the first original subtitle and the second original subtitle may be arranged in a staggered manner, although this is not a limitation of the embodiments of the present application.
[0027] Step S102: The terminal performs a splitting operation on the first original subtitle of the original subtitle sequence to obtain a first type subtitle and a second type subtitle.
[0028] In an embodiment of the present invention, after obtaining an original subtitle sequence, the terminal performs a division operation on a first original subtitle included in the original subtitle sequence. Note that in an embodiment of the present invention, if the original subtitle sequence includes multiple first original subtitles, the terminal may perform the division operation on each of all the first original subtitles included in the original subtitle sequence, or may perform the division operation on only some of the first original subtitles among all the first original subtitles, but the embodiment of the present invention is not limited thereto.
[0029] In an embodiment of the present invention, taking one of the first original subtitles as an example, when a terminal performs a splitting operation on the first original subtitle, a first type subtitle and a second type subtitle are obtained, where the first type subtitle and the second type subtitle are both subtitles without end time. The start time of the first type subtitle is the start time of the first original subtitle, and the subtitle type of the first type subtitle is the first type subtitle, which indicates that the first type subtitle contains the subtitle content of the first original subtitle. subtitle The first type subtitle is for rendering subtitle content into an image. The start time of the second type subtitle is the end time of the first original subtitle time. The subtitle type of the second type subtitle is a second type subtitle for indicating the rendering of the content without subtitles of the second type subtitle. subtitle and a background content clearing operation is performed.
[0030] For example, if the playback period of a first original subtitle is 5S to 10S and is named Sub[5,10], the start time of the first original subtitle Sub[5,10] is 5S and the end time is 10S. A splitting operation is performed on this first original subtitle to obtain a first type subtitle Sub1[5,*] and a second type subtitle Sub2[10,*], where * indicates no end time. The subtitle type of the first type subtitle Sub1[5,*] uses a content identifier and is a first type subtitle. The subtitle type of the second type subtitle Sub1[10,*] uses a cleanup identifier and is a second type subtitle. Table 1 shows a table of subtitle types provided in an embodiment of the present application. Note that this table shows only an outline of the first type subtitle and the second type subtitle. In actual applications, other types and quantities of subtitle types may be included, and this is not a limitation of the embodiment of the present application.
[0031] [Table 1]
[0032] Step S103: Generate a target subtitle sequence based on the first type subtitle and the second type subtitle.
[0033] In an embodiment of the present invention, the terminal performs a division operation on each of all or a part of the first original subtitles included in the original subtitle sequence, obtains first-type subtitles and second-type subtitles corresponding to each of the first original subtitles, and then generates a target subtitle sequence corresponding to the original subtitle sequence based on the first-type subtitles and second-type subtitles corresponding to each of all or a part of the first original subtitles.
[0034] Optionally, in an embodiment of the present invention, when the terminal performs the division operation on each of all first original subtitles included in the original subtitle sequence, the target subtitle sequence includes first type subtitles and second type subtitles corresponding to each of the first original subtitles of all the first original subtitles. If the original subtitle sequence further includes one or more second original subtitle sequences, the target subtitle sequence includes the one or more second original subtitle sequences, and the first type subtitles and second type subtitles corresponding to each of the first original subtitles of all the first original subtitles and the one or more second original subtitle sequences are arranged according to start time.
[0035] Optionally, in an embodiment of the present invention, when a terminal performs a division operation on each of a portion of first original subtitles included in an original subtitle sequence, a target subtitle sequence includes first-type subtitles and second-type subtitles corresponding to each of the first original subtitles of the first original subtitles. In this case, the target subtitle sequence also includes the remaining portion of first original subtitles for which the division operation has not been performed, and the first-type subtitles and second-type subtitles corresponding to each of the portion of first original subtitles for which the division operation has been performed in the target subtitle sequence and the first original subtitles for the remaining portion for which the division operation has not been performed are arranged in order of the start times of each subtitle. Optionally, when the original subtitle sequence further includes one or more second original subtitle sequences, the target subtitle sequence includes one or more second original subtitle sequences, and the first-type subtitles and second-type subtitles corresponding to each of the first original subtitles for which the division operation has been performed, the first original subtitles for the remaining portion for which the division operation has not been performed, and the one or more second original subtitle sequences are arranged in order of the start times of each subtitle.
[0036] In the first embodiment, a first original subtitle with an end time is analyzed from an original subtitle sequence, and a splitting operation is performed on the first original subtitle to obtain a first type subtitle and a second type subtitle without an end time, thereby finally generating a target subtitle sequence corresponding to the original subtitle sequence. Since all subtitles in the target subtitle sequence only have a start time, the control logic of the subtitles can be simplified.
[0037] 2 is a flow chart of a subtitle processing method provided in embodiment 2 of the present invention, which includes the following steps:
[0038] Step S201: A terminal obtains an original subtitle sequence, the original subtitle sequence including at least one first original subtitle, the first original subtitle being a subtitle with an end time.
[0039] In the embodiments of this specification, step S201 can be understood by referring to the content related to step S101 in embodiment 1, so it will not be described here.
[0040] Step S202 includes determining whether the first original subtitle satisfies a dividing condition.
[0041] In an embodiment of the present invention, after obtaining an original subtitle sequence, the terminal first checks each of one or more first original subtitles included in the original subtitle sequence to determine whether each first original subtitle meets the splitting condition.
[0042] Optionally, the division condition in this embodiment of the present invention may include the time interval between the end time of a first original subtitle and the start time of the next subtitle being greater than a predetermined time. That is, if the time interval between the end time of a first original subtitle and the start time of the next subtitle is greater than the predetermined time, the first original subtitle is determined to satisfy the division condition. For example, the predetermined time may be any value between 30 milliseconds and 50 milliseconds. If the predetermined time is set to 40 sm, the first original subtitle is determined to satisfy the division condition if the time interval between the end time of a first original subtitle and the start time of the next subtitle is greater than 40 sm.
[0043] Optionally, the splitting condition in the embodiment of the present application may include that the first original subtitle is the last subtitle in the original subtitle sequence, i.e., if a first original subtitle is the last subtitle in the original subtitle sequence, the first original subtitle satisfies the splitting condition.
[0044] Step S203: If the division condition is met, perform a division operation on the first original subtitle to obtain a first type subtitle and a second type subtitle.
[0045] In this embodiment of the present invention, the terminal performs a splitting operation on each first original subtitle that satisfies the splitting condition, and obtains a first type subtitle and a second type subtitle corresponding to each first original subtitle. Specifically, step S230 can be understood by referring to the relevant content of step S102 in embodiment 1, and therefore will not be described here.
[0046] Step S204: If it is determined that the splitting condition is not met, adjust the end time of the first original subtitle to obtain the first target subtitle, or adjust the start time of the next subtitle to obtain the second target subtitle, where the start time of the second target subtitle is the end time of the first original subtitle.
[0047] In this embodiment, if the first original subtitle does not satisfy the division condition, for example, if the time interval between the end time of the first original subtitle and the start time of the next subtitle shown in step S202 is less than a predetermined time, the first original subtitle is not divided but adjusted to obtain a first target subtitle, i.e., the end time of the first original subtitle that does not satisfy the division condition is adjusted to the start time of the next subtitle. Alternatively, if the first original subtitle does not satisfy the division condition, the first original subtitle is not divided but adjusted to obtain a second target subtitle, i.e., the start time of the next subtitle is adjusted to the end time of the first original subtitle.
[0048] In this embodiment, since the second type of subtitle is a background content clearing operation, if the time interval between the end time of the first original subtitle and the start time of the next subtitle is short, a splash screen is likely to occur when the background content clearing operation is performed. Therefore, for first original subtitles that do not satisfy this division condition, division is not performed, and the end time of the first original subtitle that has an end time is adjusted to be the same as the start time of the adjacent subtitle, that is, adjusted so that the adjacent subtitle starts when the first subtitle ends. Therefore, by connecting the first subtitle and the adjacent subtitle without any time difference on the time axis, a splash screen can be prevented.
[0049] A target subtitle sequence corresponding to the original subtitle sequence is generated based on the first type subtitle and the second type subtitle.
[0050] In the embodiments of this specification, step S205 can be understood by referring to the content related to step S103 in embodiment 1, so it will not be described here.
[0051] In the second embodiment, a first original subtitle with an end time is analyzed from an original subtitle sequence, and a splitting operation is performed on the first original subtitle to obtain a first type subtitle and a second type subtitle without an end time, thereby finally generating a target subtitle sequence corresponding to the original subtitle sequence, and all subtitles in the target subtitle sequence only have start times, which simplifies the subtitle control logic. Different from the first embodiment, the second embodiment also achieves the advantage of preventing splash screens.
[0052] 3 is a flow chart of a subtitle processing method provided in embodiment 3 of the present invention, the subtitle processing method includes the following steps:
[0053] Step S301: A terminal obtains an original subtitle sequence, the original subtitle sequence including at least one first original subtitle, the first original subtitle being a subtitle with an end time.
[0054] Step S302: Perform a dividing operation on the first original subtitle to obtain a first type subtitle and a second type subtitle.
[0055] Step S303: Generate a target subtitle sequence corresponding to the original subtitle sequence based on the first type subtitle and the second type subtitle.
[0056] In the embodiments of this specification, steps S301 to S303 can be understood by referring to the content related to steps S101 to S103 in the first embodiment, and therefore will not be described here.
[0057] Step S304: Determine the subtitle type of the currently broadcast subtitle, where the currently broadcast subtitle is any one of the subtitles in the target subtitle sequence.
[0058] Step S305: Obtain a target background content by rendering the currently broadcast subtitle according to the subtitle type of the currently broadcast subtitle.
[0059] In the embodiments of the present specification, when the subtitle type of the currently broadcast subtitles is the first type subtitles, the target background content is background content obtained by rendering the subtitle content of the currently broadcast subtitles, and when the subtitle type of the currently broadcast subtitles is the second type subtitles, the target background content is background content obtained by performing a background content clear operation.
[0060] Step S306: Compare whether the current playback progress time is longer than the start time of the currently broadcast subtitles.
[0061] Step S307: If the current playback progress time is longer than the start time of the currently broadcast subtitles, the target background content is displayed.
[0062] In the second embodiment, a first original subtitle with an end time is analyzed from an original subtitle sequence, and a splitting operation is performed on the first original subtitle to obtain a first type subtitle and a second type subtitle without an end time, thereby finally generating a target subtitle sequence corresponding to the original subtitle sequence, and all subtitles in the target subtitle sequence only have start times, which simplifies the subtitle control logic. Different from the first embodiment, the second embodiment also achieves the advantage of preventing splash screens.
[0063] 4 is a structural schematic diagram of a subtitle processing device provided in embodiment 4 of the present invention, which includes an acquisition module 10, a division module 20 and a generation module 30.
[0064] The acquisition module 10 acquires an original subtitle sequence, the original subtitle sequence includes at least one first original subtitle, and the first original subtitle is a subtitle with an end time.
[0065] In an embodiment of the present invention, an original subtitle sequence includes one or more original subtitles, each of which has a start time. Here, the one or more original subtitles include at least one first original subtitle. In an embodiment of the present invention, the first original subtitle refers to a subtitle with an end time. When an original subtitle sequence includes multiple subtitles, the multiple subtitles may include at least one first original subtitle and may also include at least one second original subtitle. In an embodiment of the present invention, the second original subtitle refers to a subtitle without an end time.
[0066] If an original subtitle sequence includes multiple original subtitles, the multiple original subtitles are arranged in order of their start times to form this original subtitle sequence, where the first original subtitle and the second original subtitle may be arranged in a staggered manner, although this is not a limitation of the embodiments of the present application.
[0067] The segmentation module 20 performs a segmentation operation on the first original subtitle acquired by the acquisition module to acquire a first type subtitle and a second type subtitle.
[0068] In an embodiment of the present invention, the subtitle processing device obtains an original subtitle sequence and then performs a division operation on a first original subtitle included in the original subtitle sequence. Note that in an embodiment of the present invention, if the original subtitle sequence includes multiple first original subtitles, the terminal may perform the division operation on each of all the first original subtitles included in the original subtitle sequence, or may perform the division operation on only some of the first original subtitles among all the first original subtitles, but the embodiment of the present invention is not limited thereto.
[0069] In an embodiment of the present invention, taking one of the first original subtitles as an example, when a terminal performs a splitting operation on the first original subtitle, a first type subtitle and a second type subtitle are obtained, where the first type subtitle and the second type subtitle are both subtitles without end time. The start time of the first type subtitle is the start time of the first original subtitle, and the subtitle type of the first type subtitle is the first type subtitle, which indicates that the first type subtitle contains the subtitle content of the first original subtitle. subtitle The first type subtitle is for rendering subtitle content into an image. The start time of the second type subtitle is the end time of the first original subtitle time. The subtitle type of the second type subtitle is a second type subtitle for indicating the rendering of the content without subtitles of the second type subtitle. subtitle and a background content clearing operation is performed.
[0070] For example, if the playback period of a first original subtitle is 5S to 10S and is named Sub[5,10], the start time of the first original subtitle Sub[5,10] is 5S and the end time is 10S. A splitting operation is performed on this first original subtitle to obtain a first type subtitle Sub1[5,*] and a second type subtitle Sub2[10,*], where * indicates no end time. The subtitle type of the first type subtitle Sub1[5,*] uses a content identifier and is a first type subtitle. The subtitle type of the second type subtitle Sub1[10,*] uses a cleanup identifier and is a second type subtitle. Table 1 shows a table of subtitle types provided in an embodiment of the present application. Note that this table shows only an outline of the first type subtitle and the second type subtitle. In actual applications, other types and quantities of subtitle types may be included, and this is not a limitation of the embodiment of the present application.
[0071] [Table 2]
[0072] The generation module 30 generates a target subtitle sequence corresponding to the original subtitle sequence based on the first type subtitle and the second type subtitle divided by the division module.
[0073] In an embodiment of the present invention, the terminal performs a division operation on each of all or a part of the first original subtitles included in the original subtitle sequence, obtains first-type subtitles and second-type subtitles corresponding to each of the first original subtitles, and then generates a target subtitle sequence corresponding to the original subtitle sequence based on the first-type subtitles and second-type subtitles corresponding to each of all or a part of the first original subtitles.
[0074] Optionally, in an embodiment of the present invention, when the terminal performs the division operation on each of all first original subtitles included in the original subtitle sequence, the target subtitle sequence includes first type subtitles and second type subtitles corresponding to each of the first original subtitles of all the first original subtitles. If the original subtitle sequence further includes one or more second original subtitle sequences, the target subtitle sequence includes the one or more second original subtitle sequences, and the first type subtitles and second type subtitles corresponding to each of the first original subtitles of all the first original subtitles and the one or more second original subtitle sequences are arranged according to start time.
[0075] Optionally, in an embodiment of the present invention, when a terminal performs a division operation on each of a portion of first original subtitles included in an original subtitle sequence, a target subtitle sequence includes first-type subtitles and second-type subtitles corresponding to each of the first original subtitles of the first original subtitles. In this case, the target subtitle sequence also includes the remaining portion of first original subtitles for which the division operation has not been performed, and the first-type subtitles and second-type subtitles corresponding to each of the portion of first original subtitles for which the division operation has been performed in the target subtitle sequence and the first original subtitles for the remaining portion for which the division operation has not been performed are arranged in order of the start times of each subtitle. Optionally, when the original subtitle sequence further includes one or more second original subtitle sequences, the target subtitle sequence includes one or more second original subtitle sequences, and the first-type subtitles and second-type subtitles corresponding to each of the first original subtitles for which the division operation has been performed, the first original subtitles for the remaining portion for which the division operation has not been performed, and the one or more second original subtitle sequences are arranged in order of the start times of each subtitle.
[0076] The subtitle processing device may further include a determining module, an adjusting module, a rendering module, a comparing module, and a display module. The roles of the above modules are all the same as the corresponding steps, so they will not be described here.
[0077] In a fifth embodiment of the present invention, a device 1000 is provided, the internal configuration of which is shown in FIG. 5. The device 1000 includes a processor, a storage medium, a network interface, a display screen, and an input device, all connected via a system bus. The processor of the device 1000 is used to provide calculation and control capabilities. The storage medium of the device 1000 includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external computer device via a network connection. The computer program is executed by the processor to realize a subtitle processing method. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device may be a touch layer covered on the display screen, a keypad, a trackball, or a touchpad installed on the housing of the computer device, or an external keyboard, touchpad, or mouse.
[0078] Those skilled in the art will understand that the configuration shown in FIG. 5 is merely a block diagram of a partial configuration related to an embodiment of the present application, and does not limit the computer device to which the embodiment of the present application is applied; a specific computer device may have more or fewer components than those shown in the figure, may combine some components, or may have a different arrangement of components.
[0079] In one embodiment, an apparatus 1000 is provided, the apparatus 1000 including a memory having a computer program stored therein, and a processor, the processor executing the computer program performing: Obtaining an original subtitle sequence, the original subtitle sequence including at least one first original subtitle, the first original subtitle being a subtitle with an end time; performing a splitting operation on the first original subtitle to obtain a first type subtitle and a second type subtitle, wherein a start time of the first type subtitle is a start time of the first original subtitle, a start time of the second type subtitle is an end time of the first original subtitle, and the first type subtitle and the second type subtitle are subtitles without end times, and subtitle However, No. 1 and instructing to render a subtitle content corresponding to the first original subtitle included in the second type subtitle into an image. The subtitles, for indicating that a background content clearing operation is to be performed; and generating a target subtitle sequence corresponding to the original subtitle sequence based on the first type subtitle and the second type subtitle.
[0080] In one embodiment, a storage medium is provided, the storage medium storing a computer program, and when a processor executes the computer program, Obtaining an original subtitle sequence, the original subtitle sequence including at least one first original subtitle, the first original subtitle being a subtitle with an end time; performing a splitting operation on the first original subtitle to obtain a first type subtitle and a second type subtitle, wherein a start time of the first type subtitle is a start time of the first original subtitle, a start time of the second type subtitle is an end time of the first original subtitle, and the first type subtitle and the second type subtitle are subtitles without end times, and subtitle However, No. 1 and instructing to render a subtitle content corresponding to the first original subtitle included in the second type subtitle into an image. The subtitles, for indicating that a background content clearing operation is to be performed; and generating a target subtitle sequence corresponding to the original subtitle sequence based on the first type subtitle and the second type subtitle.
[0081] Those skilled in the art will understand that all or part of the flow for implementing the method of the above-mentioned embodiments can be achieved by instructing associated hardware with a computer program, which may be stored in a non-volatile computer storage medium. When executed, the computer program may include the flow of each of the above-mentioned method embodiments. Any reference to a storage medium, memory, database, or other medium used in the embodiments provided herein may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of example, RAM is available in various forms such as, but not limited to, static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus (RambuS) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0082] The above-described embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, they may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer programs or instructions are loaded into a computer and executed, all or part of the flows or functions described in the embodiments of the present application are executed. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer programs or instructions may be stored in or transmitted via a computer-readable storage medium. The computer-readable storage medium may be any available medium accessible by a computer, or a data storage device such as a server that integrates one or more available media. The available medium may be, for example, a magnetic medium such as a floppy disk, a hard disk, or a magnetic tape; an optical medium such as a DVD; or a semiconductor medium such as a solid-state disk (SSD).
[0083] In each embodiment of this application, unless there is a special explanation or logical conflict, the terms or descriptions between different embodiments have consistency and can be mutually referenced, and the technical features in different embodiments can be combined based on their inherent logical relationships to form a new embodiment. In this application, "at least one" means one or more, and "multiple" means two or more.
[0084] It should be noted that the various numbers in the embodiments of the present application are merely used for the convenience of explanation and do not limit the scope of the embodiments of the present application. The magnitude of the sequence number of each process described above does not mean the order of execution, and the execution order of each process must be determined based on its function and inherent logic.
[0085] Although the subtitle processing method provided in the embodiments of the present application has been described in detail above, and the principles and embodiments of the present application have been described in this specification using specific examples, the description of the above examples is only used to help understand the method and its core idea of the present application. At the same time, those skilled in the art will recognize that there may be changes in the specific embodiments and application scope based on the concept of the present application, and as stated above, the contents of this specification should not be construed as limitations on the present application.
[0086] Although the present application has been described using specific examples to explain the principles and embodiments of the present application, the explanation of the above examples is only intended to help understand the method and core idea of the present application, and as stated above, those skilled in the art will recognize that there may be changes in the specific embodiments and application scope based on the concept of the present application, and therefore, the contents of this specification should not be construed as limitations on the present application.
Claims
1. A subtitle processing method, comprising: Obtaining an original subtitle sequence, the original subtitle sequence including at least one first original subtitle, the first original subtitle being a subtitle with an end time; performing a splitting operation on the first original subtitle to obtain a first type subtitle and a second type subtitle, a start time of the first type subtitle is the start time of the first original subtitle, a start time of the second type subtitle is the end time of the first original subtitle, both the first type subtitle and the second type subtitle are subtitles without end times, the first type subtitle is for instructing to render subtitle content corresponding to the first original subtitle included in the first type subtitle into an image, and the second type subtitle is for instructing to perform a clearing operation on background content; generating a target subtitle sequence corresponding to the original subtitle sequence based on the first type subtitle and the second type subtitle; Before performing a division operation on the first original subtitle, the subtitle processing method includes: determining whether the first original subtitle satisfies a splitting condition; performing a splitting operation on the first original subtitle, performing a division operation on the first original subtitle when it is determined that the first original subtitle satisfies a division condition; The splitting conditions are: The time interval between the end time of the first original subtitle and the start time of the next original subtitle is longer than a predetermined time, or the first original subtitle being the last subtitle in the original subtitle sequence; A subtitle processing method comprising:
2. When the division condition includes that a time interval between an end time of the first original subtitle and a start time of the next subtitle is longer than a predetermined time, after determining whether the first original subtitle satisfies the division condition, the subtitle processing method further comprises: If it is determined that the first original subtitle does not satisfy the splitting condition, adjust the end time of the first original subtitle to obtain a first target subtitle, so that the end time of the first target subtitle is the start time of the next subtitle; or If it is determined that the first original subtitle does not satisfy the splitting condition, adjusting the start time of the next subtitle to obtain a second target subtitle, and the start time of the second target subtitle is the end time of the first original subtitle.
2. The subtitle processing method according to claim 1.
3. After generating a target subtitle sequence corresponding to the original subtitle sequence based on the first type subtitle and the second type subtitle, the subtitle processing method includes: Determining a subtitle type of a currently broadcast subtitle, and determining that the currently broadcast subtitle is any one of the subtitles in the target subtitle sequence; The method further includes: obtaining a target background content by rendering the currently broadcast subtitles based on a subtitle type of the currently broadcast subtitles; when the subtitle type of the currently broadcast subtitles is the first type subtitles, the target background content is background content obtained by rendering the subtitle content of the currently broadcast subtitles; and when the subtitle type of the currently broadcast subtitles is the second type subtitles, the target background content is background content obtained by performing a background content clear operation.
2. The subtitle processing method according to claim 1.
4. After obtaining target background content by rendering the currently broadcast subtitles according to a subtitle type of the currently broadcast subtitles, the subtitle processing method includes: comparing whether the current playback progress time is longer than the start time of the currently broadcast subtitles; If the current playback progress time is longer than the start time of the currently broadcast subtitle, displaying the target background content.
4. The subtitle processing method according to claim 3.
5. the original subtitle sequence further includes at least one second original subtitle; the second original subtitle is a subtitle without an end time; 5. The subtitle processing method according to claim 1, wherein the subtitle processing method is a subtitle processing method for processing subtitles.
6. A subtitle processing device, an acquisition module for acquiring an original subtitle sequence, the original subtitle sequence including at least one first original subtitle, the first original subtitle being a subtitle with an end time; a splitting module for performing a splitting operation on the first original subtitle acquired by the acquisition module to acquire a first type subtitle and a second type subtitle, wherein a start time of the first type subtitle is the start time of the first original subtitle, a start time of the second type subtitle is the end time of the first original subtitle, both the first type subtitle and the second type subtitle are subtitles without end times, the first type subtitle is for instructing to render subtitle content corresponding to the first original subtitle included in the first type subtitle into an image, and the second type subtitle is for instructing to perform a background content clearing operation; a generation module that generates a target subtitle sequence corresponding to the original subtitle sequence based on the first type subtitle and the second type subtitle segmented by the segmentation module; The subtitle processing device includes: a determining module for determining whether the first original subtitle satisfies a dividing condition before the dividing module performs a dividing operation on the first original subtitle; the division module performs a division operation on the first original subtitle when the determination module determines that the first original subtitle satisfies a division condition; The splitting conditions are: The time interval between the end time of the first original subtitle and the start time of the next original subtitle is longer than a predetermined time, or the first original subtitle being the last subtitle in the original subtitle sequence; A subtitle processing device characterized by:
7. When the division condition includes that the time interval between the end time of the first original subtitle and the start time of the next subtitle is longer than a predetermined time, the subtitle processing device: an adjustment module; The adjustment module adjusts the end time of the first original subtitle to obtain a first target subtitle when the determination module determines that the first original subtitle does not satisfy the splitting condition, so that the end time of the first target subtitle is the start time of the next subtitle; or Adjusting the start time of the next subtitle to obtain a second target subtitle, where the start time of the second target subtitle is used as the end time of the first original subtitle; 7. The subtitle processing device according to claim 6,
8. The determination module: the generating module generates a target subtitle sequence corresponding to the original subtitle sequence based on the first type subtitle and the second type subtitle, and then determines a subtitle type of a currently broadcast subtitle, and the currently broadcast subtitle is any one of the subtitles in the target subtitle sequence; The subtitle processing device includes: a rendering module for obtaining a target background content by rendering the currently broadcast subtitles based on the subtitle type of the currently broadcast subtitles determined and identified by the determination module, and for determining, when the subtitle type of the currently broadcast subtitles is the first type subtitles, the target background content is background content obtained by rendering the subtitle content of the currently broadcast subtitles, and when the subtitle type of the currently broadcast subtitles is the second type subtitles, the target background content is background content obtained by performing a background content clear operation; 8. The subtitle processing device according to claim 6 or 7.
9. The subtitle processing device includes: a comparison module, which compares whether a current playback progress time is longer than a start time of the currently-broadcast subtitles after the rendering module obtains a target background content by rendering the currently-broadcast subtitles according to a subtitle type of the currently-broadcast subtitles; a display module for displaying the target background content when the comparison module determines that the current playback progress time is longer than the start time of the currently broadcast subtitles. The subtitle processing device according to claim 8 .
10. The original subtitle sequence further includes at least one second original subtitle, and the second original subtitle is a subtitle without an end time.
10. The subtitle processing device according to claim 6, wherein the subtitle processing device is a subtitle processing device for processing a subtitle.
11. A device, a processor and a memory, program instructions stored in said memory; The processor executes program instructions stored in the memory to cause the device to perform the subtitle processing method of any one of claims 1 to 5. The device characterized by:
12. 1. A computer-readable storage medium, comprising: At least one program instruction is stored on the computer-readable storage medium; a processor of the device executes the at least one program instruction stored on the computer-readable storage medium to cause the device to perform the subtitle processing method of any one of claims 1 to 5; A computer-readable storage medium comprising:
Citation Information
Patent Citations
Information processing device, information processing method, and program
EP3429217A1
Caption data generation device, content display device and program
JP2017204695A
Subtitle data processing system, processing method, and program for television programs simultaneously distributed via internet
JP2020080481A
Video reproducing device
JP2021034085A
Information processing device, information processing method, and program
WO2017154607A1