A subtitle processing method, device and electronic equipment

By matching the identity information of the target object with the subtitle content of video frame groups during live event broadcasts, the relevance of subtitles is determined, solving the problem of existing technologies being unable to accurately extract subtitles related to specific objects, and achieving accurate subtitle extraction.

CN115633184BActive Publication Date: 2026-11-24MIGU CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211228350.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-09
Publication Date
2026-11-24
Estimated Expiration
2042-10-09

AI Technical Summary

Technical Problem

Existing technologies cannot accurately establish the correspondence between commentary subtitles and specific objects in live sports events, making it difficult to extract subtitles related to specific objects.

Method used

By acquiring the identity information of the target object and video frame groups in the live video, matching the identity information of the target object with the subtitle content of the video frame groups, determining the subtitle relevance, and extracting relevant subtitle content based on the relevance.

Benefits of technology

It enables the accurate extraction of subtitles related to specific objects during live sports broadcasts, improving the accuracy and relevance of subtitle extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115633184B_ABST
    Figure CN115633184B_ABST
Patent Text Reader

Abstract

This application discloses a subtitle processing method, apparatus, and electronic device, relating to the field of video processing technology, to solve the problem that existing solutions struggle to accurately extract subtitles related to a specific object. The method includes: acquiring the identity information of a target object and a first video frame group in a live video; acquiring a second video frame group in the live video, and matching the target object's identity information with the subtitle content of the second video frame group to obtain a first matching result; determining the subtitle relevance of the second video frame group based on the first matching result, where the subtitle relevance is the relevance between the subtitle content of the video frame group and the target object; and extracting the subtitle content of the second video frame group based on the subtitle relevance. Thus, by understanding the live video, the relevance between the target object and the subtitle content in the video is determined, thereby enabling accurate extraction of subtitles related to the target object based on this relevance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of video processing technology, and in particular to a subtitle processing method, apparatus and electronic device. Background Technology

[0002] In existing technologies, Optical Character Recognition (OCR) or speech recognition models are typically used to identify video frames and extract subtitles. However, in certain scenarios, especially live sports broadcasts, existing technologies cannot establish a correspondence between narration subtitles and specific objects in the video, such as athletes, making it difficult to accurately extract subtitles related to specific objects. Summary of the Invention

[0003] This application provides a subtitle processing method, apparatus, and electronic device to solve the problem that existing solutions have difficulty in accurately extracting subtitles related to a specific object.

[0004] In a first aspect, embodiments of this application provide a subtitle processing method, including:

[0005] Obtain the identity information and the first video frame group of the target object in the live video;

[0006] The second video frame group in the live video is obtained, and the identity information of the target object is matched with the subtitle content of the second video frame group to obtain a first matching result, wherein the second video frame group is the video frame group after the first video frame group;

[0007] Based on the first matching result, the subtitle relevance of the second video frame group is determined, wherein the subtitle relevance is the relevance between the subtitle content of the video frame group and the target object;

[0008] Based on the subtitle relevance of the second video frame group, the subtitle content of the second video frame group is extracted.

[0009] Optionally, determining the subtitle relevance of the second video frame group based on the first matching result includes:

[0010] When the subtitle content of the second video frame group matches the identity information of the target object, the subtitle relevance of the second video frame group is determined to be a first value, wherein the first value is greater than or equal to a preset value.

[0011] or,

[0012] If the subtitle content of the second video frame group does not match the identity information of the target object, the identity information of the target object is matched with the subtitle content of each video frame group in the first video frame group set, wherein the first video frame group set includes video frame groups in the live video that precede the second video frame group; based on the second matching result, a target video frame group set is determined, wherein the second matching result includes the matching result of the identity information of the target object with the subtitle content of each video frame group in the first video frame group set, and the target video frame group set includes at least the second video frame group; based on the importance of the target object in each video frame group in the target video frame group set, the subtitle relevance of the second video frame group is determined, wherein the importance of the target object in any video frame group is determined based on the pixel proportion information of the target object in that video frame group.

[0013] Optionally, the target information of each video frame group in the first video frame group set is stored in a cache queue in the order of video frame playback, wherein the target information includes subtitle content and subtitle relevance;

[0014] After obtaining the identity information of the target object and the first video frame group in the live video, and before matching the identity information of the target object with the subtitle content of the current second video frame group, the method further includes:

[0015] The subtitle content and subtitle relevance of the first video frame group are associated and stored in the first storage location in the cache queue, wherein the subtitle relevance of the first video frame group is set to a default value, which is greater than or equal to the preset value;

[0016] After determining the subtitle relevance of the second video frame group, the method further includes:

[0017] The subtitle content and subtitle relevance of the second video frame group are associated and stored in the target storage location of the cache queue. If there is an empty space in the cache queue, the target storage location is an empty space in the cache queue that is after and adjacent to the first storage location, and the first storage location is the last location in the cache queue that contains data. If there is no empty space in the cache queue, the existing data in the cache queue is shifted forward, and the target storage location is the last storage location in the cache queue.

[0018] Optionally, after obtaining the identity information of the target object in the live video and the first video frame group, and before storing the subtitle content and subtitle relevance of the first video frame group in the first storage location in the cache queue, the method further includes:

[0019] The importance of the target object in the first video frame group is determined based on the pixel percentage information of the target object in the first video frame group.

[0020] The step of associating and storing the subtitle content and subtitle relevance of the first video frame group in the first storage location of the cache queue includes:

[0021] The subtitle content, subtitle relevance, and importance of the target object in the first video frame group are associated and stored in the first storage location of the cache queue.

[0022] Optionally, matching the identity information of the target object with the subtitle content of each video frame group in the first video frame group set includes:

[0023] The identity information of the target object is matched with the subtitle content of each video frame group in the first video frame group set, and the identity information of the first object is matched with the subtitle content of each video frame group in the first video frame group set.

[0024] The first object includes other objects in the live video besides the target object, and the second matching result also includes the matching result of the identity information of the first object and the subtitle content of each video frame group in the first video frame group set.

[0025] Optionally, determining the target video frame set based on the second matching result includes at least one of the following:

[0026] If the subtitle content of the third video frame group in the first video frame group set matches the identity information of the target object, it is determined that the target video frame group set includes the video frame group between the third video frame group and the second video frame group in the live video.

[0027] If the subtitle content of the fourth video frame group in the first video frame group set matches the identity information of the first object, and the subtitle content of the fifth video frame group in the first video frame group set matches the identity information of the target object, then the target video frame group set is determined to include a first sub-target video frame group set and a second sub-target video frame group set, wherein the fifth video frame group is located before the fourth video frame group, the first sub-target video frame group set includes the video frame group between the fourth video frame group and the second video frame group in the live video, and the second sub-target video frame group set includes the video frame group between the fifth video frame group and the fourth video frame group in the live video;

[0028] If the subtitle content of the sixth video frame group in the first video frame group set matches the identity information of the first object, and the subtitle content of any video frame group in the first video frame group set does not match the identity information of the target object, then the target video frame group set is determined to include a third sub-target video frame group set and a fourth sub-target video frame group set. The third sub-target video frame group set includes video frame groups from the sixth video frame group to the second video frame group in the live video, and the fourth sub-target video frame group set includes video frame groups in the first video frame group set that are located before the sixth video frame group.

[0029] If the subtitle content of any video frame group in the first video frame set does not match the identity information of the target object and the first object, then the target video frame set is determined to include the first video frame set and the second video frame set.

[0030] Optionally, determining the subtitle relevance of the second video frame group based on the importance of the target object in each video frame group of the target video frame group set includes at least one of the following:

[0031] When the target video frame set includes video frame sets between the third video frame set and the second video frame set, the average importance and importance variance of the target object in the target video frame set are determined; if the distance between the importance of the target object in the second video frame set and the average importance is greater than or equal to the importance variance, the subtitle relevance of the second video frame set is determined to be a second value; otherwise, the subtitle relevance of the second video frame set is determined to be a third value, wherein the second value is greater than or equal to the preset value, and the third value is less than the preset value;

[0032] When the target video frame set includes the first sub-target video frame set and the second sub-target video frame set, or when the target video frame set includes the third sub-target video frame set and the fourth sub-target video frame set, the first average subtitle relevance of the fifth sub-target video frame set and the second average subtitle relevance of the sixth sub-target video frame set are determined, and the first average importance of the target object in the fifth sub-target video frame set and the second average importance of the target object in the sixth sub-target video frame set are determined, wherein the fifth sub-target video frame set is the first sub-target video frame set and the sixth sub-target video frame set is the second sub-target video frame set, or the fifth sub-target video frame set is the third sub-target video frame set, and the sixth sub-target video frame set is the second sub-target video frame set. The target video frame set is designated as the fourth sub-target video frame set. Based on the first average subtitle relevance, the first average importance, and the second average importance, a first influence value is determined on the importance of the target object for the subtitle relevance of the fifth sub-target video frame set. Based on the second average subtitle relevance, the first average importance, and the second average importance, a second influence value is determined on the importance of the target object for the subtitle relevance of the sixth sub-target video frame set. If the absolute value of the difference between the first influence value and the second influence value is greater than or equal to a first preset threshold, the subtitle relevance of the second video frame set is determined to be a fourth value; otherwise, the subtitle relevance of the second video frame set is determined to be a fifth value, wherein the fourth value is less than the preset value, and the fifth value is greater than or equal to the preset value.

[0033] When the target video frame set includes the first video frame set and the second video frame set, if the proportion of video frame sets in the first video frame set whose subtitle relevance is greater than or equal to the preset value reaches a preset ratio, and the difference between the importance of the target object in the second video frame set and the importance of the target object in each video frame set in the first video frame set is within a preset range, then the subtitle relevance of the second video frame set is determined to be a sixth value; otherwise, the subtitle relevance of the second video frame set is determined to be a seventh value, wherein the sixth value is greater than or equal to the preset value, and the seventh value is less than the preset value.

[0034] Optionally, obtaining the identity information of the target object and the first video frame group in the live video includes:

[0035] Based on the user's touch input in the playback screen of the live video, determine the target object targeted by the touch input;

[0036] The first video frame group is determined based on the touch time of the touch input;

[0037] Identify the identity information of the target object, wherein the identity information includes at least one of facial information and phone number information.

[0038] Optionally, after extracting the subtitle content of the second video frame group, the method further includes:

[0039] The extracted subtitles are displayed at a preset position in the playback screen of the live video.

[0040] Alternatively, the extracted subtitle content can be used to generate bullet comments, which can then be published.

[0041] Secondly, embodiments of this application also provide a subtitle processing apparatus, including:

[0042] The acquisition module is used to acquire the identity information of the target object and the first video frame group in the live video.

[0043] The matching module is used to obtain the second video frame group in the live video and match the identity information of the target object with the subtitle content of the second video frame group to obtain a first matching result, wherein the second video frame group is the video frame group after the first video frame group;

[0044] The first determining module is used to determine the subtitle relevance of the second video frame group based on the first matching result, wherein the subtitle relevance is the relevance between the subtitle content of the video frame group and the target object;

[0045] The extraction module is used to extract the subtitle content of the second video frame group based on the subtitle relevance of the second video frame group.

[0046] Optionally, the first determining module includes:

[0047] The first determining submodule is used to determine the subtitle relevance of the second video frame group as a first value when the subtitle content of the second video frame group matches the identity information of the target object, wherein the first value is greater than or equal to a preset value.

[0048] or,

[0049] The second determining submodule is configured to, when the subtitle content of the second video frame group does not match the identity information of the target object, match the identity information of the target object with the subtitle content of each video frame group in the first video frame group set, wherein the first video frame group set includes video frame groups in the live video that precede the second video frame group; determine a target video frame group set based on a second matching result, wherein the second matching result includes the matching result of the identity information of the target object with the subtitle content of each video frame group in the first video frame group set, and the target video frame group set includes at least the second video frame group; and determine the subtitle relevance of the second video frame group based on the importance of the target object in each video frame group in the target video frame group set, wherein the importance of the target object in any video frame group is determined based on the pixel proportion information of the target object in that video frame group.

[0050] Optionally, the target information of each video frame group in the first video frame group set is stored in a cache queue in the order of video frame playback, wherein the target information includes subtitle content and subtitle relevance;

[0051] The subtitle processing device includes:

[0052] The first storage module is used to associate and store the subtitle content and subtitle relevance of the first video frame group in the first storage location in the cache queue, wherein the subtitle relevance of the first video frame group is set to a default value, and the default value is greater than or equal to the preset value;

[0053] The second storage module is used to associate and store the subtitle content and subtitle relevance of the second video frame group to the target storage location of the cache queue. If there is an empty space in the cache queue, the target storage location is an empty space in the cache queue that is after and adjacent to the first storage location, where the first storage location is the last location in the cache queue containing data. If there is no empty space in the cache queue, the existing data in the cache queue is shifted forward, and the target storage location is the last storage location in the cache queue.

[0054] Optionally, the subtitle processing device further includes:

[0055] The second determining module is used to determine the importance of the target object in the first video frame group based on the pixel ratio information of the target object in the first video frame group.

[0056] The first storage module is used to associate and store the subtitle content, subtitle relevance, and importance of the target object in the first video frame group in the first storage location of the cache queue.

[0057] Optionally, the second determining submodule includes:

[0058] The matching unit is used to match the identity information of the target object with the subtitle content of each video frame group in the first video frame group set, and to match the identity information of the first object with the subtitle content of each video frame group in the first video frame group set.

[0059] The first object includes other objects in the live video besides the target object, and the second matching result also includes the matching result of the identity information of the first object and the subtitle content of each video frame group in the first video frame group set.

[0060] Optionally, the second determining submodule further includes at least one of the following:

[0061] The first determining unit is configured to determine that the target video frame set includes video frame sets between the third video frame set and the second video frame set in the live video, provided that the subtitle content of the third video frame set in the first video frame set matches the identity information of the target object.

[0062] The second determining unit is configured to determine that the target video frame set includes a first sub-target video frame set and a second sub-target video frame set when the subtitle content of the fourth video frame set in the first video frame set matches the identity information of the first object, and the subtitle content of the fifth video frame set in the first video frame set matches the identity information of the target object. The fifth video frame set is located before the fourth video frame set. The first sub-target video frame set includes video frame sets between the fourth and second video frame sets in the live video, and the second sub-target video frame set includes video frame sets between the fifth and fourth video frame sets in the live video.

[0063] The third determining unit is configured to determine that the target video frame set includes a third sub-target video frame set and a fourth sub-target video frame set when the subtitle content of the sixth video frame set in the first video frame set matches the identity information of the first object, and the subtitle content of any video frame set in the first video frame set does not match the identity information of the target object. The third sub-target video frame set includes video frame sets between the sixth video frame set and the second video frame set in the live video, and the fourth sub-target video frame set includes video frame sets in the first video frame set that are located before the sixth video frame set.

[0064] The fourth determining unit is used to determine that the target video frame set includes the first video frame set and the second video frame set when the subtitle content of any video frame set in the first video frame set does not match the identity information of the target object and the first object.

[0065] Optionally, the second determining submodule further includes at least one of the following:

[0066] The fifth determining unit is configured to, when the target video frame set includes video frame sets between the third video frame set and the second video frame set, determine the average importance and importance variance of the target object in the target video frame set; if the distance between the importance of the target object in the second video frame set and the average importance is greater than or equal to the importance variance, then the subtitle relevance of the second video frame set is determined to be a second value; otherwise, the subtitle relevance of the second video frame set is determined to be a third value, wherein the second value is greater than or equal to the preset value, and the third value is less than the preset value;

[0067] The sixth determining unit is configured to, when the target video frame set includes the first sub-target video frame set and the second sub-target video frame set, or the target video frame set includes the third sub-target video frame set and the fourth sub-target video frame set, determine the first average subtitle relevance of the fifth sub-target video frame set and the second average subtitle relevance of the sixth sub-target video frame set, and determine the first average importance of the target object in the fifth sub-target video frame set and the second average importance of the target object in the sixth sub-target video frame set, wherein the fifth sub-target video frame set is the first sub-target video frame set and the sixth sub-target video frame set is the second sub-target video frame set, or the fifth sub-target video frame set is the third sub-target video frame set. The sixth sub-target video frame set is the fourth sub-target video frame set; based on the first average subtitle relevance, the first average importance, and the second average importance, a first influence value is determined on the importance of the target object for the subtitle relevance of the fifth sub-target video frame set; based on the second average subtitle relevance, the first average importance, and the second average importance, a second influence value is determined on the importance of the target object for the subtitle relevance of the sixth sub-target video frame set; if the absolute value of the difference between the first influence value and the second influence value is greater than or equal to a first preset threshold, then the subtitle relevance of the second video frame set is determined to be a fourth value; otherwise, the subtitle relevance of the second video frame set is determined to be a fifth value, wherein the fourth value is less than the preset value, and the fifth value is greater than or equal to the preset value;

[0068] The seventh determining unit is configured to, when the target video frame set includes the first video frame set and the second video frame set, determine the subtitle relevance of the second video frame set as a sixth value if, in the case where the proportion of video frame sets in the first video frame set whose subtitle relevance is greater than or equal to the preset value reaches a preset ratio, and the difference between the importance of the target object in the second video frame set and the importance of the target object in each video frame set in the first video frame set is within a preset range, otherwise determine the subtitle relevance of the second video frame set as a seventh value, wherein the sixth value is greater than or equal to the preset value, and the seventh value is less than the preset value.

[0069] Optionally, the acquisition module includes:

[0070] The eighth determining unit is used to determine the target object targeted by the touch input based on the user's touch input in the playback screen of the live video;

[0071] The ninth determining unit is used to determine the first video frame group based on the touch time of the touch input;

[0072] The identification unit is used to identify the identity information of the target object, wherein the identity information includes at least one of facial information and number information.

[0073] Optionally, the subtitle processing device further includes:

[0074] The display module is used to display the extracted subtitle content at a preset position in the playback screen of the live video;

[0075] Alternatively, a processing module can be used to generate bullet comments from the extracted subtitle content and publish the bullet comments.

[0076] Thirdly, embodiments of this application also provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the subtitle processing method described above.

[0077] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the subtitle processing method described above.

[0078] In this embodiment, the identity information of a target object and a first video frame group in a live video are obtained; a second video frame group in the live video is obtained, and the identity information of the target object is matched with the subtitle content of the second video frame group to obtain a first matching result, wherein the second video frame group is the video frame group following the first video frame group; based on the first matching result, the subtitle relevance of the second video frame group is determined, wherein the subtitle relevance is the relevance between the subtitle content of the video frame group and the target object; based on the subtitle relevance of the second video frame group, the subtitle content of the second video frame group is extracted. Thus, by understanding the live video, the relevance between the target object and the subtitle content in the video is determined, thereby enabling accurate extraction of subtitles related to the target object based on this relevance. Attached Figure Description

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

[0080] Figure 1 This is one of the flowcharts of the subtitle processing method provided in the embodiments of this application;

[0081] Figure 2 This is a schematic diagram illustrating the determination of the distance of a target object relative to the border of a video frame, provided in an embodiment of this application.

[0082] Figure 3 This is an operational diagram illustrating the process of pressing a target object in a video frame to extract relevant subtitles, as provided in an embodiment of this application.

[0083] Figure 4 This is a schematic diagram of the cache queue provided in an embodiment of this application;

[0084] Figure 5a This is one of the schematic diagrams of the output target video frame group provided in the embodiments of this application;

[0085] Figure 5b This is a second schematic diagram of the output target video frame group provided in the embodiments of this application;

[0086] Figure 5c This is the third schematic diagram of the output target video frame group provided in the embodiments of this application;

[0087] Figure 6 This is a schematic diagram of the live video playback interface provided in the embodiments of this application;

[0088] Figure 7This is the second flowchart of the subtitle processing method provided in the embodiments of this application;

[0089] Figure 8 This is a structural diagram of the subtitle processing device provided in the embodiments of this application;

[0090] Figure 9 This is a structural diagram of the electronic device provided in the embodiments of this application. Detailed Implementation

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

[0092] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0093] See Figure 1 , Figure 1 This is a flowchart of the subtitle processing method provided in the embodiments of this application, such as... Figure 1 As shown, it includes the following steps:

[0094] Step 101: Obtain the identity information of the target object and the first video frame group in the live video.

[0095] The aforementioned live video can be any live video, especially event-related live videos, such as sports event live videos, game event live videos, etc.

[0096] The target object mentioned above can be an object that the user is interested in during the live video. This could be an object specified by the user, a pre-defined specific object, or an object that most users are interested in during the live video. For example, in a live sports event, the target object could be a highly popular athlete, or an athlete that the user is interested in based on user input.

[0097] In this embodiment of the application, in order to accurately extract subtitles related to the target object from the live video, the identity information of the target object can be obtained first, and the live video can be grouped by frame. The identity information of the target object can be matched with the subtitle content in each grouped video frame to determine the subtitles that are more related to the target object and then extract them.

[0098] The aforementioned method of obtaining the identity information of a target object in a live video can be achieved by identifying the image information of the target object to determine its identity, thereby obtaining the target object's identity information. For example, it can identify the name or sports number of an athlete. Alternatively, it can be achieved by obtaining the identity information of each target object in the pre-recorded live video.

[0099] The aforementioned first video frame group may be several video frames corresponding to a complete subtitle in the live video, or several video frames within a preset duration. Specifically, the extraction of the first video frame group can begin at the moment when the target object is determined. For example, when the user performs a specific input to determine the target object, video frames within a duration after that moment can be extracted as the first video frame group, or video frames within a duration before and after that moment can be extracted as the first video frame group.

[0100] Optionally, step 101 includes:

[0101] Based on the user's touch input in the playback screen of the live video, determine the target object targeted by the touch input;

[0102] The first video frame group is determined based on the touch time of the touch input;

[0103] Identify the identity information of the target object, wherein the identity information includes at least one of facial information and phone number information.

[0104] In one implementation, the target object can be determined based on the user's touch input to an object in the live video during the viewing process. That is, the target object is the touch object of the touch input, which can be determined based on the touch position. The touch input can be a press input, a click input, a selection input, etc.

[0105] Specifically, when watching a live video, users can use touch input on objects of interest in the scene, which will trigger the system to identify the object and obtain the first group of video frames.

[0106] For example, when watching a live sports event on a video app, if a user is interested in a particular athlete and wants to hear memorable quotes or commentary related to that athlete, they can press and hold their finger on the athlete's screen. The system will then capture the user's press location, the currently displayed video frames, and the positions of these frames on the playback timeline. In other words, the input can be pressing the athlete the user is interested in on the screen, and the output will include:

[0107] 1) The pressing position Loc contains 4 parameters, which correspond to the 4 distances of the video playback frame border: (X1, X2, Y1, Y2);

[0108] These four distances are relative distances, used to ensure compatibility with images of different resolutions during subsequent pixel calculations, thereby maintaining the accuracy of video understanding; their specific forms can be as follows: Figure 2 As shown. Of course, the Loc position of the press can also be directly represented by the horizontal and vertical coordinates of the press location.

[0109] 2) The current video frame group Cur_Frames, which contains all video frames that display the current subtitle. This group of video frames contains all video frames that display the current subtitle. If it does not contain the current subtitle, all video frames within 1 second can be taken (this takes into account that the user needs to press for at least 500ms to obtain relevant information). The result is a set of video frames, which can be stored in the video frame group cache designed in this application. The current subtitle can be understood as the subtitle in the video when the user presses the button.

[0110] 3) Start and end time positions of video frame groups (T) begin ,T end ), that is, the start time T of the first frame in the video frame group. begin and the end time T of the last frame end The end time T end Alternatively, it can be based on the start time T. begin The number of frames in the video frame group is determined.

[0111] In this embodiment, the identity information of the target object can also be identified. Specifically, the identity information of the target object, such as its name and number, can be determined by recognizing its image features, such as its face and number. For example, based on the obtained user pressing position and video frame group, a Single Shot MultiBoxDetector (SSD) model can be used to identify the athlete at the user pressing position.

[0112] Taking the target object as an athlete as an example, in order to ensure recognition accuracy, two SSD models can be used in parallel to identify them respectively:

[0113] The target athlete's facial information is used to output a facial feature vector V. face ;

[0114] Output the number N on the target athlete's body. um ;

[0115] The detailed identification and processing procedure can be summarized as follows:

[0116] 1) Extract the pressing object from the video frame based on the four relative coordinates in the Loc of the pressing position, and then query the pre-entered domain knowledge database, which includes a database of athletes' facial features, athletes' numbers, names, and other information.

[0117] 2) Calculate the facial feature vector V. face The set of matched athlete information (S1, S2, ..., S5) is used to select the top five athletes with the highest matching degree; at the same time, the matching identification number N is obtained. um Athlete information S;

[0118] 3) Determine whether the set (S1, S2, ..., S5) contains S. If it does, identify the target athlete as S and obtain information such as his / her name, number, and facial feature vector. Otherwise, output the message "Unable to identify the athlete you are interested in, please press again!" on the video playback interface. Then repeat the above steps of identifying the target object and recognizing the target object's identity information for a new identification.

[0119] For example, such as Figure 3 As shown, when a user sees an athlete of interest, "Wu**", in the video frame 30, they can press the athlete's finger 31 to trigger the system to recognize and extract the subtitles 32 related to the athlete in the current video frame group.

[0120] In this way, this implementation method can determine the target object that the user is interested in in the live video based on the user's touch input, and then obtain subtitles related to the object that the user is interested in.

[0121] Step 102: Obtain the second video frame group in the live video, and match the identity information of the target object with the subtitle content of the second video frame group to obtain a first matching result, wherein the second video frame group is the video frame group following the first video frame group.

[0122] In this embodiment of the application, after obtaining the identity information of the target object, the video stream following the first video frame group in the live video can continue to be obtained in video frame groups. For example, the video stream can continue to be received in fixed lengths and processed into video frame groups. The length of each video frame group can cover the complete time of the video frame in the group containing the subtitle display, which can generally be set to 3 seconds. If the video has no subtitles for more than 3 seconds, it can also be processed as a video frame group. The output result format can be: {video frame group, marker}, where a marker of 1 indicates that there are subtitles and a marker of 0 indicates that there are no subtitles.

[0123] Next, text transition words can be identified based on the received video frame group marked as 1 and the identified identity information of the target object.

[0124] For live sports broadcasts, since commentators often mention athletes' names, the athlete's name or number can be used as a transition word. For example, in the comment "Wu** is accelerating," the athlete's name "Wu**" is a transition word. Another example is "The athlete next to number 9 is catching up," where the athlete's number "9" is a transition word.

[0125] In this step, the identity information of the target object can be used as a transition word and matched with the subtitle content of the obtained second video frame group. Specifically, the identity information of the target object can be matched with the subtitle text of the second video frame group in text form to determine whether the subtitle of the second video frame group mentions the target object. Based on the matching result, it can be determined whether the subtitle content of the second video frame group is related to the target object, or how much related it is. Specifically, subtitle relevance can be used to represent this.

[0126] For example, if the caption of a video frame group is "Wu** is speeding up," and the target athlete "Wu**" is mentioned in the caption, then the video frame group matches the target object. Alternatively, if the caption of the second video frame group is "Athlete number 9 is catching up," and the caption mentions an athlete's number "9" but does not mention the target athlete's number "8," then the video frame group does not match the target object.

[0127] It should be noted that the second video frame group can refer to any video frame group in the live video that is located after the first video frame group. That is, the video stream in the live video can be processed into multiple video frame groups, and for each video frame group, the step of matching the identity information of the target object with the subtitle content of the video frame group is performed to obtain the correlation between the subtitle content of each video frame group and the target object, thereby obtaining the subtitle content related to the target object in each video frame group.

[0128] It should also be noted that after obtaining the first video frame group, the identity information of the target object can be matched with the subtitle content of the first video frame group to determine the relevance between the subtitle content of the first video frame group and the target object. This will determine whether there is subtitle content related to the target object in the first video frame group, and whether to extract the relevant subtitles in the first video frame group can be determined based on the determination result. The specific matching method and the method for determining the subtitle relevance are similar to those of the second video frame, and will not be elaborated here. Alternatively, the identity information of the target object can be not matched with the subtitle content of the first video frame group, but the subtitle relevance of the first video frame group can be directly determined as the default value. This is because users usually select the target object after seeing the narration "golden quote", so the subtitles displayed in the current first video frame group can be assumed to be the ones that the user wants to extract.

[0129] Step 103: Determine the subtitle relevance of the second video frame group based on the first matching result, wherein the subtitle relevance is the relevance between the subtitle content of the video frame group and the target object.

[0130] In this step, based on the matching result between the identity information of the target object and the subtitle content of the second video frame group, the relevance between the subtitle content of the second video frame group and the target object can be determined, i.e., subtitle relevance. Specifically, if the identity information of the target object successfully matches the subtitle content of the second video frame group, that is, if the subtitle content of the second video frame group mentions the target object, then it can be determined that the subtitle content of the second video frame group is related to the target object or has a strong relevance. To accurately and intuitively measure this relevance, specific numerical values ​​can be used to describe the subtitle relevance. For example, the subtitle relevance of the second video frame group can be determined to be a high value, such as 0.8, 0.9, etc. If the information in the second video frame group fails to match the subtitle content, meaning the target object is not mentioned in the subtitle content of the second video frame group, it can be determined that the subtitle content of the second video frame group is unrelated, not very relevant, or has a weak correlation with the target object. For example, the correlation of the subtitles in the second video frame group can be determined to be a low value, such as 0.3 or 0.2. Alternatively, to more accurately determine whether the subtitle content of the second video frame group is related to the target object, other information can be combined to determine the correlation of the subtitles in the second video frame group, such as the importance of the target object in the second video frame group, and the matching situation of the target object's identity information with the previous video frame groups.

[0131] Step 104: Extract the subtitle content of the second video frame group based on the subtitle correlation of the second video frame group.

[0132] In this step, the subtitle content of the second video frame group can be extracted based on the subtitle relevance of the second video frame group. Specifically, if the subtitle relevance of the second video frame group indicates that the subtitle content of the second video frame group is related to or has a strong relevance to the target object, such as if the subtitle relevance value is greater than or equal to a preset value, the subtitle content of the second video frame group can be extracted, or the subtitle content of the part of the second video frame group that is related to the target object can be extracted. The preset value can be a pre-set minimum relevance threshold, such as 0.7, 0.8, 0.9, etc.

[0133] It should be noted that if the subtitle correlation of the second video frame group indicates that the subtitle content of the second video frame group is unrelated or weakly related to the target object, and if the subtitle correlation value is less than a preset value, the subtitle content of the second video frame group may not be extracted.

[0134] Optionally, step 103 includes:

[0135] When the subtitle content of the second video frame group matches the identity information of the target object, the subtitle relevance of the second video frame group is determined to be a first value, wherein the first value is greater than or equal to a preset value.

[0136] or,

[0137] If the subtitle content of the second video frame group does not match the identity information of the target object, the identity information of the target object is matched with the subtitle content of each video frame group in the first video frame group set, wherein the first video frame group set includes video frame groups in the live video that precede the second video frame group; based on the second matching result, a target video frame group set is determined, wherein the second matching result includes the matching result of the identity information of the target object with the subtitle content of each video frame group in the first video frame group set, and the target video frame group set includes at least the second video frame group; based on the importance of the target object in each video frame group in the target video frame group set, the subtitle relevance of the second video frame group is determined, wherein the importance of the target object in any video frame group is determined based on the pixel proportion information of the target object in that video frame group.

[0138] In one embodiment, when determining the subtitle relevance of the second video frame group based on the matching result between the identity information of the target object and the subtitle content of the second video frame group, the subtitle relevance of the second video frame group can be determined in different ways based on different matching results, so as to ensure the accuracy of the determined subtitle relevance.

[0139] Specifically, if the subtitle content of the second video frame group matches the identity information of the target object, such as mentioning the name or number of the target object in the subtitle content of the second video frame group, then the subtitle content of the second video frame group can be considered relatively relevant to the target object, and the relevance of the subtitles of the second video frame group can be determined as a first value. The first value is greater than or equal to a preset value, which can be a preset minimum threshold indicating relevance. For example, the preset value is 0.8, and the first value is 0.8 or 0.9. Thus, when the relevance of the subtitles of the second video frame group is determined to be the first value, it indicates that the subtitle content of the second video frame group is relatively relevant to the target object and is the subtitle the user wants to obtain, thereby allowing the subtitle content of the second video frame group to be extracted.

[0140] If the subtitle content of the second video frame group does not match the identity information of the target object, such as if the subtitle content of the second video frame group does not mention the name or number of the target object, it can be considered that it is temporarily uncertain whether the subtitle content of the second video frame group is related to the target object. Further matching of the target object's identity information with the subtitle content of each video frame group in the first video frame group set is required. The first video frame group set includes video frame groups in the live video that precede the second video frame group, i.e., based on the start time T of the current second video frame group. begin Starting from the first video frame group, the previous video frame groups are matched in reverse, that is, the identity information of the target object is matched sequentially with the subtitle content of the previous video frame groups to obtain a second matching result. The second matching result includes the matching results of each video frame group in the first video frame group set with the identity information of the target object.

[0141] Based on the second matching result, a target video frame set can be determined. The output target video frame set will vary depending on the matching results between each video frame set in the first video frame set and the identity information of the target object. For example, the target video frame set may include the video frame set in the first video frame set that successfully matches the identity information of the target object, and the second video frame set; or, the target video frame set may include all video frame sets in the first video frame set from the first video frame set that first successfully matches the identity information of the target object to the second video frame set; or, the target video frame set may include all video frame sets in the first video frame set and the second video frame set, and so on.

[0142] Then, the importance of the target object in each video frame group of the target video frame group can be obtained, and the subtitle relevance of the second video frame group can be determined based on the importance. The importance of the target object in each video frame group can be predetermined or determined in real time. Specifically, it can be determined based on the pixel ratio information of the target object in each video frame group. Since the main objects shown in the shot are often more important for live broadcasts, the pixel ratio can be used to describe the importance of the object in the current screen seen by the user.

[0143] The step of determining the relevance of the subtitles in the second video frame group based on the importance of the target object in each video frame group of the target video frame group set can be achieved by comparing the variance of the importance of the target object in the second video frame group with the variance of the importance of the target object in each other video frame group. If the difference is small, the subtitles in the second video frame group are considered relevant to the target object; otherwise, they are considered irrelevant. Alternatively, it can be based on the average importance of the target object in each video frame group of the target video frame group set and the average subtitle relevance of each video frame group, analyzing the influence of the target object's importance on the current video frame group. If the influence is significant, the subtitles in the second video frame group are considered relevant. The subtitle content of the second video frame group is not related to the target object; otherwise, it is considered related. Alternatively, it can be determined based on the relevance of the subtitles in each video frame group of the target video frame group set, and the difference between the importance of the target object in the second video frame group and the importance of each video frame group in the target video frame group set. If the subtitle relevance of most video frame groups in the target video frame group set is high, and the difference between the importance of the target object in the second video frame group and the importance of each video frame group in the target video frame group set is generally not large, it indicates that the current video frame group and past video frame groups have similar focus on the target object, that is, they all highlight the target object. Therefore, it can be determined that the subtitle content of the second video frame group is related to the target object; otherwise, it is considered irrelevant.

[0144] Thus, through this implementation, the subtitle relevance of the second video frame group can be accurately determined based on the matching result between the identity information of the target object and the subtitle content of the second video frame group, and based on the matching result between the identity information of the target object and the subtitle content of each video frame group in the first video frame group set, thereby ensuring the accurate extraction of subtitles related to the target object in the subsequent process.

[0145] Optionally, the target information of each video frame group in the first video frame group set is stored in a cache queue in the order of video frame playback, wherein the target information includes subtitle content and subtitle relevance;

[0146] After obtaining the identity information of the target object and the first video frame group in the live video, and before matching the identity information of the target object with the subtitle content of the current second video frame group, the method further includes:

[0147] The subtitle content and subtitle relevance of the first video frame group are associated and stored in the first storage location in the cache queue, wherein the subtitle relevance of the first video frame group is set to a default value, which is greater than or equal to the preset value;

[0148] After determining the subtitle relevance of the second video frame group, the method further includes:

[0149] The subtitle content and subtitle relevance of the second video frame group are associated and stored in the target storage location of the cache queue. If there is an empty space in the cache queue, the target storage location is an empty space in the cache queue that is after and adjacent to the first storage location, and the first storage location is the last location in the cache queue that contains data. If there is no empty space in the cache queue, the existing data in the cache queue is shifted forward, and the target storage location is the last storage location in the cache queue.

[0150] In one implementation, a novel caching scheme can be used to cache the information of the object of interest to support subsequent subtitle extraction processing. Specifically, a cache queue can be designed to store the relevant information of each video frame group in the acquired live video. This allows for direct retrieval or matching of the relevant information of the corresponding video frame group from the cache queue when matching the identity information of the target object, thereby improving matching efficiency.

[0151] The cache queue can be a fixed-size circular cache queue, meaning the length of data that can be stored in the cache queue is limited, and older data at the head of the queue is removed as new data is added. The structure of the cache queue can be as follows: Figure 4 As shown, the key consists of the name and number of the object being followed, and the values ​​form a circular queue. This queue stores data in the playback order of the video frame group. Each storage location contains complete processing information for a video frame group, including subtitle content and subtitle relevance, and may also include the start and end time range (T) of the video frame group. begin ,T end (e.g., subtitles with markings, etc.)

[0152] The subtitle content refers to the text subtitles in the video frame group output by the speech recognition model. If there are no subtitles, the subtitle content is empty. The subtitle relevance is the relevance evaluation value between the subtitle content and the target object. The start and end time range describes the start and end time of the playback of the video frame group. The subtitle presence flag indicates whether the video frame group contains subtitles. If it contains subtitles, it is 1, and if it does not contain subtitles, it is 0.

[0153] The length of the cache queue can be M, and the value of M can be determined by the duration of the video frame group stored in each storage location. For example, if each video frame group can play for 3 seconds, then the length of the cache queue is 100, that is, the video duration that the cache queue can store is 5 minutes. This is because the duration of the narration subtitles exceeds 5 minutes, and the text content of the subtitles will basically be irrelevant, so there is no need to store them for subsequent processing.

[0154] Therefore, in this embodiment, after obtaining the identity information of the target object and the first video frame group in the live video, such as after the user completes the selection by pressing, the cache queue can be initialized. The subtitle content and start and end time range of the first video frame group can be filled in sequentially, and its subtitle relevance can be set to a specific value by default, such as 0.9. On the one hand, considering that users usually operate to select the target object after seeing the narration's "golden quote," it can be assumed that the subtitles displayed in the current video frame are what the user wants to extract during the default initialization. On the other hand, even if the current subtitle relevance is inaccurate, it can be corrected through subsequent processing steps. The subtitle content and subtitle relevance of the first video frame group can be associated and stored in the first storage location in the cache queue.

[0155] Furthermore, after determining the subtitle relevance of each video frame group, the relevant information of that video frame group can be stored in the cache queue. For example, after determining the subtitle relevance of the second video frame group, the subtitle content and subtitle relevance of the second video frame group can be associated and stored in the cache queue. Specifically, the information of each video frame group can be sequentially filled into the storage locations in the cache queue according to the playback order of the video frame groups.

[0156] Specifically, the subtitle content and subtitle relevance of the second video frame group can be associated and stored in the target storage location of the cache queue. If there is an empty space in the cache queue, the target storage location is the storage location after the storage location of the previous video frame group in the cache queue where the data of the second video frame group is stored. If there is no empty space in the cache queue, that is, when the cache queue is full of data, the original stored data in the cache queue is moved forward one storage location, thereby freeing up the last storage location as the target storage location for storing the subtitle content and subtitle relevance of the second video frame group. That is, at this time, the stored data in the first storage location in the cache queue will be removed.

[0157] In other words, the step of associating and storing the subtitle content and subtitle relevance of the second video frame group in the target storage location of the cache queue may include:

[0158] If there is an empty space in the cache queue, the subtitle content and subtitle relevance of the second video frame group are associated and stored in the empty space in the cache queue that is after the first storage position and adjacent to the first storage position. The first storage position is the last position in the cache queue that stores data.

[0159] If there are no empty slots in the cache queue, remove the stored data from the first storage location in the cache queue, move the stored data in the cache queue forward by one storage location, and associate the subtitle content and subtitle relevance of the second video frame group with the last storage location in the cache queue.

[0160] In this embodiment, by designing and using a cache queue to store the relevant information of each video frame group in the acquired live video, the relevant information of the corresponding video frame group can be quickly searched or matched from the cache queue when matching the identity information of the target object in the future, thereby improving the overall efficiency of subtitle processing. Furthermore, the data storage structure of the designed cache queue can ensure the accuracy of the relevant subtitles.

[0161] Furthermore, after obtaining the identity information of the target object in the live video and the first video frame group, and before storing the subtitle content and subtitle relevance of the first video frame group in the first storage location of the cache queue, the method further includes:

[0162] The importance of the target object in the first video frame group is determined based on the pixel percentage information of the target object in the first video frame group.

[0163] The step of associating and storing the subtitle content and subtitle relevance of the first video frame group in the first storage location of the cache queue includes:

[0164] The subtitle content, subtitle relevance, and importance of the target object in the first video frame group are associated and stored in the first storage location of the cache queue.

[0165] In one implementation, the importance of the target object in the first video frame group can be determined in advance, and information such as the subtitle content, subtitle relevance, and importance of the first video frame group can be associated and stored in the cache queue so that it can be directly retrieved and used from the cache queue later.

[0166] In this implementation, the importance of the target object in the first video frame group can be determined based on the pixel percentage information of the target object in the first video frame group. Specifically, after obtaining the information of the target object, the video frames can be processed. Let the size of the video frame group be n, and the number of pixels of the target object of interest to the user in each frame of the video frame group be Frames. i (If the frame does not contain the target object that the user is interested in, then the number of pixels for the target object is set to 0). The number of pixels in each frame is Frame. all Let b be the number of frames in a video frame group that do not contain pixels representing the user's target object. Then, the importance Sim of the target object in the video frame group can be calculated using the following formula:

[0167]

[0168] In this implementation, pixel percentage is used to describe the importance of the target object in the current view of the user because, for live streaming, the main objects shown in the shot are often more important, and the corresponding narration subtitles are more relevant to these objects. The pixel percentage of the target object in each frame is then calculated and averaged for normalization, while multiplying by a coefficient (nb). This takes into account the number of frames in the video frame group that do not contain the target object, making objects that do not frequently appear in the frame less important (and the relevance of the narration subtitles is also lower).

[0169] Therefore, in this embodiment, after determining the identity information of the target object and the first video frame group, and calculating the importance of the target object in the first video frame group, the following results can be output:

[0170] Target's personal information: name, phone number

[0171] Importance of the target object in the current frame group (Sim)

[0172] The start and end times of the current frame group (T) begin ,T end ).

[0173] Additionally, it should be noted that the video understanding and processing steps described above can be performed simultaneously with the speech recognition processing for intelligent subtitles. That is, while determining each video frame group and its importance, speech recognition can be performed on the corresponding video frame group to obtain the subtitle information. This avoids additional processing time overhead and offers good execution performance.

[0174] Furthermore, the subtitle content, subtitle relevance, and calculated importance of the target object in the first video frame group can be associated and stored in the first storage location of the cache queue. That is, each storage location in the cache queue stores the processing information of a video frame group. The specific structure is as follows:

[0175] {Sim, subtitle content, subtitle relevance, start and end time range (Tbegin,Tend), subtitle presence marker}.

[0176] In this way, by pre-determining the importance of the target object in the video frame group, the information such as the subtitle content, subtitle relevance, and importance of the video frame group is associated and stored in the cache queue, which makes it convenient to directly obtain the relevant information of the video frame group from the cache queue later.

[0177] Optionally, matching the identity information of the target object with the subtitle content of each video frame group in the first video frame group set includes:

[0178] The identity information of the target object is matched with the subtitle content of each video frame group in the first video frame group set, and the identity information of the first object is matched with the subtitle content of each video frame group in the first video frame group set.

[0179] The first object includes other objects in the live video besides the target object, and the second matching result also includes the matching result of the identity information of the first object and the subtitle content of each video frame group in the first video frame group set.

[0180] In one implementation, the identity information of the target object that the user is interested in, such as the athlete's name and number, can be used to match the subtitle text of the current video frame group. At the same time, past subtitles can be matched based on the information of other similar objects in the live video. That is, the identity information of other objects in the live video besides the target object can also be matched with the subtitle content of the video frame groups before the second video frame group. This yields the matching results of the target object's identity information with the subtitle content of each video frame group in the first video frame group, as well as the matching results of the other objects' identity information with the subtitle content of each video frame group in the first video frame group. Based on the more comprehensive second matching results, the relevance between the subtitle content of the second video frame group and the target object can be analyzed more accurately.

[0181] Furthermore, determining the target video frame set based on the second matching result includes at least one of the following:

[0182] If the subtitle content of the third video frame group in the first video frame group set matches the identity information of the target object, it is determined that the target video frame group set includes the video frame group between the third video frame group and the second video frame group in the live video.

[0183] If the subtitle content of the fourth video frame group in the first video frame group set matches the identity information of the first object, and the subtitle content of the fifth video frame group in the first video frame group set matches the identity information of the target object, then the target video frame group set is determined to include a first sub-target video frame group set and a second sub-target video frame group set, wherein the fifth video frame group is located before the fourth video frame group, the first sub-target video frame group set includes the video frame group between the fourth video frame group and the second video frame group in the live video, and the second sub-target video frame group set includes the video frame group between the fifth video frame group and the fourth video frame group in the live video;

[0184] If the subtitle content of the sixth video frame group in the first video frame group set matches the identity information of the first object, and the subtitle content of any video frame group in the first video frame group set does not match the identity information of the target object, then the target video frame group set is determined to include a third sub-target video frame group set and a fourth sub-target video frame group set. The third sub-target video frame group set includes video frame groups from the sixth video frame group to the second video frame group in the live video, and the fourth sub-target video frame group set includes video frame groups in the first video frame group set that are located before the sixth video frame group.

[0185] If the subtitle content of any video frame group in the first video frame set does not match the identity information of the target object and the first object, then the target video frame set is determined to include the first video frame set and the second video frame set.

[0186] In one implementation, when using the identity information of the target object that the user is interested in, such as the athlete's name and number, to match the subtitle text of the current video frame group (i.e., the second video frame group), and matching past subtitles based on other similar object information in the live video, there are multiple different matching results. Therefore, different target video frame group sets can be output based on different matching results.

[0187] Taking the target as the athlete and the identity information as the athlete's name and number as an example, specifically, it can include the following scenarios:

[0188] In the first scenario, if the name or number of the target athlete is directly matched in the subtitles of the current video frame group, it is confirmed that the subtitles of the current video frame group are what the user wants to extract. Therefore, the subtitles of the video frame group can be extracted, and new frame group information data can be inserted into the cache queue, namely, the subtitle content, subtitle relevance, start and end time range, etc. of the current video frame group. The subtitle relevance can be set to the first value, such as 0.9.

[0189] In the second scenario, if the name or number of the target athlete cannot be directly matched in the subtitles of the current video frame group, then the starting time point T of the current video frame group will be used. begin Starting from the beginning, the system searches backwards in the cache queue for stored data, sequentially matching the subtitle content to see if any matches the target athlete's information. If a match is found for the target athlete's name or number, and no other athlete's name or number is found, then all video frame groups between the current video frame group and the matched video frame groups in the cache queue are output, resulting in the following target video frame group set:

[0190] {video frame group 1, video frame group 2, ..., video frame group K}, where K is the number of video frame groups in the target video frame group set; in this case, the structure of the output target video frame group set can be as follows: Figure 5a As shown; otherwise, proceed to the third scenario.

[0191] In the third scenario, if the name or number of the target athlete is matched in reverse in the cache queue, but the name or number of another athlete is matched before the name or number of the target athlete being monitored is matched, then two sets of video frames can be output. That is, the output set of target video frames includes a first sub-target video frame set and a second sub-target video frame set.

[0192] First sub-target video frame set: From the current video frame set forward until the video frame set that matches another athlete;

[0193] Second sub-target video frame set: from the video frame set matched to other athletes all the way to the video frame set matched to the target athlete being watched;

[0194] In this case, the structure of the output target video frame set can be as follows: Figure 5b As shown, Q is the total number of video frame groups in the target video frame group set of the output.

[0195] In the fourth scenario, if the name or number of the target athlete cannot be found in the cache queue, but the name or number of another athlete is matched, then similar to the third scenario, two sets of video frames can be output. That is, the output set of target video frames includes a third sub-target video frame set and a fourth sub-target video frame set.

[0196] Third sub-target video frame set: from the current video frame set back to the video frame set of another athlete matched in the cache queue;

[0197] The fourth sub-target video frame set: all video frame sets from the cache queue that match other athletes' video frame sets to the end of the cache queue list;

[0198] In this case, the structure of the output target video frame set can be as follows: Figure 5c As shown, N is the total number of video frame groups in the target video frame group set of the output.

[0199] In the fifth scenario, if no athlete's name or number can be found in the cache queue, the current video frame group and all video frame groups in the cache queue are output. That is, the output target video frame group set includes all video frame groups in the cache queue and the current video frame group.

[0200] Thus, through this implementation method, the target video frame set can be clearly identified based on the specific matching situation. Furthermore, by analyzing each video frame set in the target video frame set, the correlation between the subtitle content of the current video frame set and the subtitle of the target object can be accurately determined.

[0201] Furthermore, determining the subtitle relevance of the second video frame group based on the importance of the target object in each video frame group of the target video frame group set includes at least one of the following:

[0202] When the target video frame set includes video frame sets between the third video frame set and the second video frame set, the average importance and importance variance of the target object in the target video frame set are determined; if the distance between the importance of the target object in the second video frame set and the average importance is greater than or equal to the importance variance, the subtitle relevance of the second video frame set is determined to be a second value; otherwise, the subtitle relevance of the second video frame set is determined to be a third value, wherein the second value is greater than or equal to the preset value, and the third value is less than the preset value;

[0203] When the target video frame set includes the first sub-target video frame set and the second sub-target video frame set, or when the target video frame set includes the third sub-target video frame set and the fourth sub-target video frame set, the first average subtitle relevance of the fifth sub-target video frame set and the second average subtitle relevance of the sixth sub-target video frame set are determined, and the first average importance of the target object in the fifth sub-target video frame set and the second average importance of the target object in the sixth sub-target video frame set are determined, wherein the fifth sub-target video frame set is the first sub-target video frame set and the sixth sub-target video frame set is the second sub-target video frame set, or the fifth sub-target video frame set is the third sub-target video frame set, and the sixth sub-target video frame set is the second sub-target video frame set. The target video frame set is designated as the fourth sub-target video frame set. Based on the first average subtitle relevance, the first average importance, and the second average importance, a first influence value is determined on the importance of the target object for the subtitle relevance of the fifth sub-target video frame set. Based on the second average subtitle relevance, the first average importance, and the second average importance, a second influence value is determined on the importance of the target object for the subtitle relevance of the sixth sub-target video frame set. If the absolute value of the difference between the first influence value and the second influence value is greater than or equal to a first preset threshold, the subtitle relevance of the second video frame set is determined to be a fourth value; otherwise, the subtitle relevance of the second video frame set is determined to be a fifth value, wherein the fourth value is less than the preset value, and the fifth value is greater than or equal to the preset value.

[0204] When the target video frame set includes the first video frame set and the second video frame set, if the proportion of video frame sets in the first video frame set whose subtitle relevance is greater than or equal to the preset value reaches a preset ratio, and the difference between the importance of the target object in the second video frame set and the importance of the target object in each video frame set in the first video frame set is within a preset range, then the subtitle relevance of the second video frame set is determined to be a sixth value; otherwise, the subtitle relevance of the second video frame set is determined to be a seventh value, wherein the sixth value is greater than or equal to the preset value, and the seventh value is less than the preset value.

[0205] In one implementation, after identifying the aforementioned textual transition words, the video continuity correlation method can be used to determine the correlation between the subtitles and the target object for the second to fifth scenarios respectively.

[0206] Taking the target object as the target athlete and the identity information as the athlete's name and number as an example, this implementation method illustrates how to determine the subtitle relevance of the current video frame group:

[0207] Regarding the second scenario described above, where the target video frame set includes the start time point T of the current video frame set... begin For video frame group data matching the video frame groups in the cache queue, the variance V_Sim of the target athlete's importance Sim in each video frame group of the target video frame group set can be calculated first. Then, the average P_Sim of the target athlete's importance Sim in all video frame groups of the target video frame group set can be calculated. Next, the Euclidean distance D between the importance C_Sim of the target athlete in the current video frame group and the average P_Sim of the target athlete's importance can be calculated. When the value of D is greater than or equal to the variance V_Sim, the subtitles of the current video frame group are considered to be related to the target athlete in the video frame; otherwise, they are considered to be unrelated. Specifically, if the subtitles are determined to be related to the target athlete, the subtitle relevance of the current video frame group can be assigned a value of 0.9; otherwise, it can be assigned a value of 0.3.

[0208] Since no other athlete's name or number was matched in the second scenario, the subtitles of the current video frame group are highly likely to be related to the target athlete. Therefore, the variance of the target athlete's importance can be used to represent the correlation between the target athlete and the subtitles in the video frame. When the importance of the target athlete in the current video frame group is not much different from the variance of the target athlete's importance, it can be considered that the current video frame group, like the previous video frames, focuses on the target athlete being watched, and therefore its subtitles are also related to the target athlete.

[0209] For the third scenario described above, where the target video frame set includes a first sub-target video frame set and a second sub-target video frame set, the average value P_R1 of the subtitle relevance in the first sub-target video frame set and the average value P_R2 of the subtitle relevance in the second sub-target video frame set can be calculated first. Then, the average value P_Sim1 of the importance of the target athlete in the first sub-target video frame set and the average value P_Sim2 of the importance of the target athlete in the second sub-target video frame set can be calculated. Finally, the influence values ​​I1 and I2 of the subtitle relevance in the first sub-target video frame set due to the importance of the target athlete can be calculated using the following two formulas:

[0210]

[0211]

[0212] After calculating I1 and I2 using the formulas above, calculate using the following formula:

[0213] |I1-I2|≥b

[0214] Where 'b' is a pre-set threshold, used to determine the change in the correlation between subtitles before and after the transition word and the dependence on the importance of the target athlete. In this case, if the absolute value of I1 minus I2 is greater than or equal to the threshold 'b', it indicates that after the transition word, the dependence of subtitle correlation on the importance of the target athlete has changed significantly. That is, before the transition word, the subtitles and the target athlete are still related, but after the transition word, the correlation between the subtitles and the target athlete weakens. This is used to determine that the subtitles of the current video frame group are not very related to the target athlete being watched, and vice versa. If the subtitles are determined to be highly related to the target athlete, the subtitle correlation of the current video frame group can be assigned a value of 0.9, and vice versa.

[0215] For the fourth scenario, where the target video frame set includes a third sub-target video frame set and a fourth sub-target video frame set, the processing method is similar to that of the third scenario, except that the input video frame set is different. In this scenario, the influence value I3 of the subtitle relevance in the third sub-target video frame set on the importance of the target athlete and the influence value I4 of the subtitle relevance in the fourth sub-target video frame set on the importance of the target athlete can be calculated according to the processing method in the third scenario. The same method is used to check the change in the dependence of the subtitle relevance before and after the transition word on the importance of the target athlete. If the absolute value of I3 minus I4 is greater than or equal to the threshold b, it means that the subtitles of the current video frame set are not highly relevant to the target athlete; otherwise, it is considered that the subtitles of the current video frame set are relevant to the target athlete. Similarly, if the subtitles are determined to be highly relevant to the target athlete, the subtitle relevance of the current video frame set can be assigned a value of 0.9; otherwise, it can be assigned a value of 0.3.

[0216] For the fifth scenario described above, where the target video frame set includes the first video frame set and the current second video frame set, the importance C_Sim of the target athlete in the current video frame set can be calculated first, i.e., the proportion of pixels occupied by the target athlete in the current video frame set. The subtitles in the current video frame set are considered relevant to the target athlete if and only if the following two conditions are met:

[0217] Condition 1: At least 70% of the video frame groups in the cache queue have a caption relevance value of 0.9; this is because if the captions of previous video frame groups are not highly correlated with the target athlete, the caption relevance of the current video frame group cannot be inferred.

[0218] Condition 2: For the target athlete's importance C_Sim in the current video frame group to be considered relevant to the captions of the current video frame group, the following inequality must be satisfied:

[0219]

[0220] Where j represents the index of the video frame group in the cache queue, and Sim j If the value is 0, it is not included in the calculation. n represents the number of video frame groups in the cache queue, and G is a pre-set threshold parameter used to evaluate the difference between the importance of the target athlete in the current video frame group and the importance of the target athlete in each video frame group in the cache queue.

[0221] As can be seen from the above formula, only when C_Sim and each Sim in the cache queue... j Only when the differences are minimal can we ensure that the current video frame group and previous video frame groups have a similar focus on the same athlete. First, establish the similarity of the video frame groups, and then, based on the subtitle relevance in condition one, confirm that the current video frame group, like previous video frame groups, highlights the same athlete. Its commentary subtitles are also highly likely to be related to the target athlete. Similarly, in this case, if the subtitles are determined to be related to the target athlete, the subtitle relevance of the current video frame group can be assigned a value of 0.9; otherwise, it can be assigned a value of 0.3.

[0222] After completing the above operations, the relevant information of the current video frame group can be filled into the buffer queue, and the next video frame group can be processed in the same way, thus continuously processing the live video stream.

[0223] In this way, the video continuity correlation discrimination method in this embodiment can accurately determine the correlation between the subtitles of each video frame group and the target object, thereby ensuring the accuracy of the extracted subtitles.

[0224] Optionally, after step 104, the method further includes:

[0225] The extracted subtitles are displayed at a preset position in the playback screen of the live video.

[0226] Alternatively, the extracted subtitle content can be used to generate bullet comments, which can then be published.

[0227] In one implementation, the extracted subtitle content can be recorded and displayed at a preset position on the playback screen of the live video. This allows users to conveniently view subtitles related to objects of interest in real time, such as viewing memorable quotes from commentary on a particular athlete in a live sports event video.

[0228] Alternatively, the extracted subtitles can be generated into bullet comments and sent out. This involves creating bullet comments from the extracted subtitles and publishing them in the live video, allowing viewers to interact with the live stream audience by automatically generating bullet comments from subtitles they are interested in.

[0229] In one implementation, such as Figure 6As shown, a smart subtitle extraction button 61 can also be displayed at the edge of the live video playback screen 60, which is used by the user to extract smart subtitles. That is, the user can touch the button 61 to trigger the system's automatic subtitle extraction function.

[0230] This application's embodiments are applicable to all video live streaming scenarios. Taking sports event live streaming as an example, when a user watches a short track speed skating competition on a video app, if they want to extract the part about a specific athlete from the commentary, they can use the video press recognition method designed in this application. The user selects and presses the athlete on the screen. After this operation, the text and video target tracking comparison method designed in this application is used in the background to filter out subtitles related to that athlete. Finally, the extracted subtitles are returned to the user, thus meeting the user's personalized needs. The main process of this application's embodiments can be as follows: Figure 7 As shown.

[0231] This application provides users with a personalized and automated intelligent subtitle extraction method. Compared to existing technologies, users can extract relevant subtitles simply by pressing on an athlete in the image, eliminating the overhead of self-filtering. This application integrates text matching and video understanding methods to establish a correlation between subtitles and video content, enabling the system to automatically extract the subtitles needed by the user, making it more efficient. Moreover, filtering the text processing results with video content makes the extracted subtitles more accurate. The video understanding model and intelligent subtitle generation model in this application are executed in parallel, without incurring additional time overhead. Furthermore, the text transition discrimination method and video continuity correlation discrimination method designed in this application only perform ordinary calculations and do not use deep learning models, resulting in very fast execution speed and high processing performance. This application does not use a deep learning model to determine the correlation between subtitles and video content, thus avoiding the iterative overhead of deep learning models in existing technologies and offering stronger scalability.

[0232] The subtitle processing method of this application embodiment obtains the identity information of a target object and a first video frame group in a live video; obtains a second video frame group in the live video, and matches the identity information of the target object with the subtitle content of the second video frame group to obtain a first matching result, wherein the second video frame group is the video frame group following the first video frame group; determines the subtitle relevance of the second video frame group based on the first matching result, wherein the subtitle relevance is the relevance between the subtitle content of the video frame group and the target object; and extracts the subtitle content of the second video frame group based on the subtitle relevance of the second video frame group. In this way, by understanding the live video, the relevance between the target object and the subtitle content in the video is determined, thereby enabling accurate extraction of subtitles related to the target object based on this relevance.

[0233] This application also provides a subtitle processing device. See also... Figure 8 , Figure 8 This is a structural diagram of the subtitle processing apparatus provided in the embodiments of this application. Since the principle of the subtitle processing apparatus in solving the problem is similar to the subtitle processing method in the embodiments of this application, the implementation of this subtitle processing apparatus can refer to the implementation of the method, and the repeated parts will not be described again.

[0234] like Figure 8 As shown, the subtitle processing device 800 includes:

[0235] The acquisition module 801 is used to acquire the identity information of the target object and the first video frame group in the live video.

[0236] The matching module 802 is used to obtain the second video frame group in the live video and match the identity information of the target object with the subtitle content of the second video frame group to obtain a first matching result, wherein the second video frame group is the video frame group after the first video frame group;

[0237] The first determining module 803 is used to determine the subtitle relevance of the second video frame group based on the first matching result, wherein the subtitle relevance is the relevance between the subtitle content of the video frame group and the target object;

[0238] Extraction module 804 is used to extract the subtitle content of the second video frame group based on the subtitle relevance of the second video frame group.

[0239] Optionally, the first determining module 803 includes:

[0240] The first determining submodule is used to determine the subtitle relevance of the second video frame group as a first value when the subtitle content of the second video frame group matches the identity information of the target object, wherein the first value is greater than or equal to a preset value.

[0241] or,

[0242] The second determining submodule is configured to, when the subtitle content of the second video frame group does not match the identity information of the target object, match the identity information of the target object with the subtitle content of each video frame group in the first video frame group set, wherein the first video frame group set includes video frame groups in the live video that precede the second video frame group; determine a target video frame group set based on a second matching result, wherein the second matching result includes the matching result of the identity information of the target object with the subtitle content of each video frame group in the first video frame group set, and the target video frame group set includes at least the second video frame group; and determine the subtitle relevance of the second video frame group based on the importance of the target object in each video frame group in the target video frame group set, wherein the importance of the target object in any video frame group is determined based on the pixel proportion information of the target object in that video frame group.

[0243] Optionally, the target information of each video frame group in the first video frame group set is stored in a cache queue in the order of video frame playback, wherein the target information includes subtitle content and subtitle relevance;

[0244] The subtitle processing device 800 includes:

[0245] The first storage module is used to associate and store the subtitle content and subtitle relevance of the first video frame group in the first storage location in the cache queue, wherein the subtitle relevance of the first video frame group is set to a default value, and the default value is greater than or equal to the preset value;

[0246] The second storage module is used to associate and store the subtitle content and subtitle relevance of the second video frame group to the target storage location of the cache queue. If there is an empty space in the cache queue, the target storage location is an empty space in the cache queue that is after and adjacent to the first storage location, where the first storage location is the last location in the cache queue containing data. If there is no empty space in the cache queue, the existing data in the cache queue is shifted forward, and the target storage location is the last storage location in the cache queue.

[0247] Optionally, the subtitle processing device 800 also includes:

[0248] The second determining module is used to determine the importance of the target object in the first video frame group based on the pixel ratio information of the target object in the first video frame group.

[0249] The first storage module is used to associate and store the subtitle content, subtitle relevance, and importance of the target object in the first video frame group in the first storage location of the cache queue.

[0250] Optionally, the second determining submodule includes:

[0251] The matching unit is used to match the identity information of the target object with the subtitle content of each video frame group in the first video frame group set, and to match the identity information of the first object with the subtitle content of each video frame group in the first video frame group set.

[0252] The first object includes other objects in the live video besides the target object, and the second matching result also includes the matching result of the identity information of the first object and the subtitle content of each video frame group in the first video frame group set.

[0253] Optionally, the second determining submodule further includes at least one of the following:

[0254] The first determining unit is configured to determine that the target video frame set includes video frame sets between the third video frame set and the second video frame set in the live video, provided that the subtitle content of the third video frame set in the first video frame set matches the identity information of the target object.

[0255] The second determining unit is configured to determine that the target video frame set includes a first sub-target video frame set and a second sub-target video frame set when the subtitle content of the fourth video frame set in the first video frame set matches the identity information of the first object, and the subtitle content of the fifth video frame set in the first video frame set matches the identity information of the target object. The fifth video frame set is located before the fourth video frame set. The first sub-target video frame set includes video frame sets between the fourth and second video frame sets in the live video, and the second sub-target video frame set includes video frame sets between the fifth and fourth video frame sets in the live video.

[0256] The third determining unit is configured to determine that the target video frame set includes a third sub-target video frame set and a fourth sub-target video frame set when the subtitle content of the sixth video frame set in the first video frame set matches the identity information of the first object, and the subtitle content of any video frame set in the first video frame set does not match the identity information of the target object. The third sub-target video frame set includes video frame sets between the sixth video frame set and the second video frame set in the live video, and the fourth sub-target video frame set includes video frame sets in the first video frame set that are located before the sixth video frame set.

[0257] The fourth determining unit is used to determine that the target video frame set includes the first video frame set and the second video frame set when the subtitle content of any video frame set in the first video frame set does not match the identity information of the target object and the first object.

[0258] Optionally, the second determining submodule further includes at least one of the following:

[0259] The fifth determining unit is configured to, when the target video frame set includes video frame sets between the third video frame set and the second video frame set, determine the average importance and importance variance of the target object in the target video frame set; if the distance between the importance of the target object in the second video frame set and the average importance is greater than or equal to the importance variance, then the subtitle relevance of the second video frame set is determined to be a second value; otherwise, the subtitle relevance of the second video frame set is determined to be a third value, wherein the second value is greater than or equal to the preset value, and the third value is less than the preset value;

[0260] The sixth determining unit is configured to, when the target video frame set includes the first sub-target video frame set and the second sub-target video frame set, or the target video frame set includes the third sub-target video frame set and the fourth sub-target video frame set, determine the first average subtitle relevance of the fifth sub-target video frame set and the second average subtitle relevance of the sixth sub-target video frame set, and determine the first average importance of the target object in the fifth sub-target video frame set and the second average importance of the target object in the sixth sub-target video frame set, wherein the fifth sub-target video frame set is the first sub-target video frame set and the sixth sub-target video frame set is the second sub-target video frame set, or the fifth sub-target video frame set is the third sub-target video frame set. The sixth sub-target video frame set is the fourth sub-target video frame set; based on the first average subtitle relevance, the first average importance, and the second average importance, a first influence value is determined on the importance of the target object for the subtitle relevance of the fifth sub-target video frame set; based on the second average subtitle relevance, the first average importance, and the second average importance, a second influence value is determined on the importance of the target object for the subtitle relevance of the sixth sub-target video frame set; if the absolute value of the difference between the first influence value and the second influence value is greater than or equal to a first preset threshold, then the subtitle relevance of the second video frame set is determined to be a fourth value; otherwise, the subtitle relevance of the second video frame set is determined to be a fifth value, wherein the fourth value is less than the preset value, and the fifth value is greater than or equal to the preset value;

[0261] The seventh determining unit is configured to, when the target video frame set includes the first video frame set and the second video frame set, determine the subtitle relevance of the second video frame set as a sixth value if, in the case where the proportion of video frame sets in the first video frame set whose subtitle relevance is greater than or equal to the preset value reaches a preset ratio, and the difference between the importance of the target object in the second video frame set and the importance of the target object in each video frame set in the first video frame set is within a preset range, otherwise determine the subtitle relevance of the second video frame set as a seventh value, wherein the sixth value is greater than or equal to the preset value, and the seventh value is less than the preset value.

[0262] Optionally, the acquisition module 801 includes:

[0263] The eighth determining unit is used to determine the target object targeted by the touch input based on the user's touch input in the playback screen of the live video;

[0264] The ninth determining unit is used to determine the first video frame group based on the touch time of the touch input;

[0265] The identification unit is used to identify the identity information of the target object, wherein the identity information includes at least one of facial information and number information.

[0266] Optionally, the subtitle processing device 800 also includes:

[0267] The display module is used to display the extracted subtitle content at a preset position in the playback screen of the live video;

[0268] Alternatively, a processing module can be used to generate bullet comments from the extracted subtitle content and publish the bullet comments.

[0269] The subtitle processing device 800 provided in this application embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.

[0270] The subtitle processing apparatus 800 of this application embodiment acquires the identity information of a target object and a first video frame group in a live video; acquires a second video frame group in the live video, and matches the identity information of the target object with the subtitle content of the second video frame group to obtain a first matching result, wherein the second video frame group is the video frame group following the first video frame group; determines the subtitle relevance of the second video frame group based on the first matching result, wherein the subtitle relevance is the relevance between the subtitle content of the video frame group and the target object; and extracts the subtitle content of the second video frame group based on the subtitle relevance of the second video frame group. In this way, by understanding the live video, the relevance between the target object and the subtitle content in the video is determined, thereby enabling accurate extraction of subtitles related to the target object based on this relevance.

[0271] This application also provides an electronic device. Since the principle by which the electronic device solves the problem is similar to the subtitle processing method in this application, the implementation of this electronic device can be found in the implementation of the method, and repeated details will not be described again. Figure 9 As shown, the electronic device according to an embodiment of this application includes:

[0272] Processor 900 is used to read the program from memory 920 and execute the following procedures:

[0273] Obtain the identity information and the first video frame group of the target object in the live video;

[0274] The second video frame group in the live video is obtained, and the identity information of the target object is matched with the subtitle content of the second video frame group to obtain a first matching result, wherein the second video frame group is the video frame group after the first video frame group;

[0275] Based on the first matching result, the subtitle relevance of the second video frame group is determined, wherein the subtitle relevance is the relevance between the subtitle content of the video frame group and the target object;

[0276] Based on the subtitle relevance of the second video frame group, the subtitle content of the second video frame group is extracted.

[0277] Among them, Figure 9In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors represented by processor 900 and memory represented by memory 920 together. The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. For different user devices, the user interface 930 can also be an interface capable of connecting external or internal devices, including but not limited to keypads, displays, speakers, microphones, joysticks, etc. Processor 900 is responsible for managing the bus architecture and general processing, and memory 920 can store data used by processor 900 during operation.

[0278] Optionally, the processor 900 is also used to read the program from the memory 920 and perform the following steps:

[0279] When the subtitle content of the second video frame group matches the identity information of the target object, the subtitle relevance of the second video frame group is determined to be a first value, wherein the first value is greater than or equal to a preset value.

[0280] or,

[0281] If the subtitle content of the second video frame group does not match the identity information of the target object, the identity information of the target object is matched with the subtitle content of each video frame group in the first video frame group set, wherein the first video frame group set includes video frame groups in the live video that precede the second video frame group; based on the second matching result, a target video frame group set is determined, wherein the second matching result includes the matching result of the identity information of the target object with the subtitle content of each video frame group in the first video frame group set, and the target video frame group set includes at least the second video frame group; based on the importance of the target object in each video frame group in the target video frame group set, the subtitle relevance of the second video frame group is determined, wherein the importance of the target object in any video frame group is determined based on the pixel proportion information of the target object in that video frame group.

[0282] Optionally, the target information of each video frame group in the first video frame group set is stored in a cache queue in the order of video frame playback, wherein the target information includes subtitle content and subtitle relevance;

[0283] Processor 900 is also used to read programs from memory 920 and perform the following steps:

[0284] The subtitle content and subtitle relevance of the first video frame group are associated and stored in the first storage location in the cache queue, wherein the subtitle relevance of the first video frame group is set to a default value, which is greater than or equal to the preset value;

[0285] The subtitle content and subtitle relevance of the second video frame group are associated and stored in the target storage location of the cache queue. If there is an empty space in the cache queue, the target storage location is an empty space in the cache queue that is after and adjacent to the first storage location, and the first storage location is the last location in the cache queue that contains data. If there is no empty space in the cache queue, the existing data in the cache queue is shifted forward, and the target storage location is the last storage location in the cache queue.

[0286] Optionally, the processor 900 is also used to read the program from the memory 920 and perform the following steps:

[0287] The importance of the target object in the first video frame group is determined based on the pixel percentage information of the target object in the first video frame group.

[0288] The subtitle content, subtitle relevance, and importance of the target object in the first video frame group are associated and stored in the first storage location of the cache queue.

[0289] Optionally, the processor 900 is also used to read the program from the memory 920 and perform the following steps:

[0290] The identity information of the target object is matched with the subtitle content of each video frame group in the first video frame group set, and the identity information of the first object is matched with the subtitle content of each video frame group in the first video frame group set.

[0291] The first object includes other objects in the live video besides the target object, and the second matching result also includes the matching result of the identity information of the first object and the subtitle content of each video frame group in the first video frame group set.

[0292] Optionally, the processor 900 is also configured to read a program from the memory 920 and execute at least one of the following:

[0293] If the subtitle content of the third video frame group in the first video frame group set matches the identity information of the target object, it is determined that the target video frame group set includes the video frame group between the third video frame group and the second video frame group in the live video.

[0294] If the subtitle content of the fourth video frame group in the first video frame group set matches the identity information of the first object, and the subtitle content of the fifth video frame group in the first video frame group set matches the identity information of the target object, then the target video frame group set is determined to include a first sub-target video frame group set and a second sub-target video frame group set, wherein the fifth video frame group is located before the fourth video frame group, the first sub-target video frame group set includes the video frame group between the fourth video frame group and the second video frame group in the live video, and the second sub-target video frame group set includes the video frame group between the fifth video frame group and the fourth video frame group in the live video;

[0295] If the subtitle content of the sixth video frame group in the first video frame group set matches the identity information of the first object, and the subtitle content of any video frame group in the first video frame group set does not match the identity information of the target object, then the target video frame group set is determined to include a third sub-target video frame group set and a fourth sub-target video frame group set. The third sub-target video frame group set includes video frame groups from the sixth video frame group to the second video frame group in the live video, and the fourth sub-target video frame group set includes video frame groups in the first video frame group set that are located before the sixth video frame group.

[0296] If the subtitle content of any video frame group in the first video frame set does not match the identity information of the target object and the first object, then the target video frame set is determined to include the first video frame set and the second video frame set.

[0297] Optionally, the processor 900 is also configured to read a program from the memory 920 and execute at least one of the following:

[0298] When the target video frame set includes video frame sets between the third video frame set and the second video frame set, the average importance and importance variance of the target object in the target video frame set are determined; if the distance between the importance of the target object in the second video frame set and the average importance is greater than or equal to the importance variance, the subtitle relevance of the second video frame set is determined to be a second value; otherwise, the subtitle relevance of the second video frame set is determined to be a third value, wherein the second value is greater than or equal to the preset value, and the third value is less than the preset value;

[0299] When the target video frame set includes the first sub-target video frame set and the second sub-target video frame set, or when the target video frame set includes the third sub-target video frame set and the fourth sub-target video frame set, the first average subtitle relevance of the fifth sub-target video frame set and the second average subtitle relevance of the sixth sub-target video frame set are determined, and the first average importance of the target object in the fifth sub-target video frame set and the second average importance of the target object in the sixth sub-target video frame set are determined, wherein the fifth sub-target video frame set is the first sub-target video frame set and the sixth sub-target video frame set is the second sub-target video frame set, or the fifth sub-target video frame set is the third sub-target video frame set, and the sixth sub-target video frame set is the second sub-target video frame set. The target video frame set is designated as the fourth sub-target video frame set. Based on the first average subtitle relevance, the first average importance, and the second average importance, a first influence value is determined on the importance of the target object for the subtitle relevance of the fifth sub-target video frame set. Based on the second average subtitle relevance, the first average importance, and the second average importance, a second influence value is determined on the importance of the target object for the subtitle relevance of the sixth sub-target video frame set. If the absolute value of the difference between the first influence value and the second influence value is greater than or equal to a first preset threshold, the subtitle relevance of the second video frame set is determined to be a fourth value; otherwise, the subtitle relevance of the second video frame set is determined to be a fifth value, wherein the fourth value is less than the preset value, and the fifth value is greater than or equal to the preset value.

[0300] When the target video frame set includes the first video frame set and the second video frame set, if the proportion of video frame sets in the first video frame set whose subtitle relevance is greater than or equal to the preset value reaches a preset ratio, and the difference between the importance of the target object in the second video frame set and the importance of the target object in each video frame set in the first video frame set is within a preset range, then the subtitle relevance of the second video frame set is determined to be a sixth value; otherwise, the subtitle relevance of the second video frame set is determined to be a seventh value, wherein the sixth value is greater than or equal to the preset value, and the seventh value is less than the preset value.

[0301] Optionally, the processor 900 is also used to read the program from the memory 920 and perform the following steps:

[0302] Based on the user's touch input in the playback screen of the live video, determine the target object targeted by the touch input;

[0303] The first video frame group is determined based on the touch time of the touch input;

[0304] Identify the identity information of the target object, wherein the identity information includes at least one of facial information and phone number information.

[0305] Optionally, the processor 900 is also used to read the program from the memory 920 and perform the following steps:

[0306] The extracted subtitles are displayed at a preset position in the playback screen of the live video.

[0307] Alternatively, the extracted subtitle content can be used to generate bullet comments, which can then be published.

[0308] The electronic device provided in this application embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.

[0309] Furthermore, the computer-readable storage medium of this application embodiment is used to store a computer program, which can be executed by a processor. Figure 1 Each step in the method embodiment shown.

[0310] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0311] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can be physically included separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0312] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute some steps of the transmission and reception methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0313] The above description is the preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principles described in this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A subtitle processing method, characterized in that, include: Obtain the identity information and the first video frame group of the target object in the live video; The second video frame group in the live video is obtained, and the identity information of the target object is matched with the subtitle content of the second video frame group to obtain a first matching result, wherein the second video frame group is the video frame group after the first video frame group; Based on the first matching result, the subtitle relevance of the second video frame group is determined, wherein the subtitle relevance is the relevance between the subtitle content of the video frame group and the target object; Based on the subtitle relevance of the second video frame group, the subtitle content of the second video frame group is extracted. Specifically, if the subtitle relevance of the second video frame group is greater than or equal to a preset value, the subtitle content of the second video frame group is extracted; or if the subtitle relevance of the second video frame group is less than the preset value, the subtitle content of the second video frame group is not extracted. The step of determining the subtitle relevance of the second video frame group based on the first matching result includes: When the subtitle content of the second video frame group matches the identity information of the target object, the subtitle relevance of the second video frame group is determined to be a first value, wherein the first value is greater than or equal to a preset value. or, If the subtitle content of the second video frame group does not match the identity information of the target object, the identity information of the target object is matched with the subtitle content of each video frame group in the first video frame group set, wherein the first video frame group set includes video frame groups in the live video that precede the second video frame group; based on the second matching result, a target video frame group set is determined, wherein the second matching result includes the matching result of the identity information of the target object with the subtitle content of each video frame group in the first video frame group set, and the target video frame group set includes at least the second video frame group; based on the importance of the target object in each video frame group in the target video frame group set, the subtitle relevance of the second video frame group is determined, wherein the importance of the target object in any video frame group is determined based on the pixel proportion information of the target object in that video frame group.

2. The method according to claim 1, characterized in that, The target information of each video frame group in the first video frame group set is stored in a cache queue in the order of video frame playback. The target information includes subtitle content and subtitle relevance. After obtaining the identity information of the target object and the first video frame group in the live video, and before matching the identity information of the target object with the subtitle content of the current second video frame group, the method further includes: The subtitle content and subtitle relevance of the first video frame group are associated and stored in the first storage location in the cache queue, wherein the subtitle relevance of the first video frame group is set to a default value, which is greater than or equal to the preset value; After determining the subtitle relevance of the second video frame group, the method further includes: The subtitle content and subtitle relevance of the second video frame group are associated and stored in the target storage location of the cache queue. If there is an empty space in the cache queue, the target storage location is an empty space in the cache queue that is after and adjacent to the first storage location, and the first storage location is the last location in the cache queue that contains data. If there is no empty space in the cache queue, the existing data in the cache queue is shifted forward, and the target storage location is the last storage location in the cache queue.

3. The method according to claim 2, characterized in that, After obtaining the identity information of the target object and the first video frame group in the live video, and before storing the subtitle content and subtitle relevance of the first video frame group in the first storage location in the cache queue, the method further includes: The importance of the target object in the first video frame group is determined based on the pixel percentage information of the target object in the first video frame group. The step of associating and storing the subtitle content and subtitle relevance of the first video frame group in the first storage location of the cache queue includes: The subtitle content, subtitle relevance, and importance of the target object in the first video frame group are associated and stored in the first storage location of the cache queue.

4. The method according to claim 1, characterized in that, The step of matching the identity information of the target object with the subtitle content of each video frame group in the first video frame group set includes: The identity information of the target object is matched with the subtitle content of each video frame group in the first video frame group set, and the identity information of the first object is matched with the subtitle content of each video frame group in the first video frame group set. The first object includes other objects in the live video besides the target object, and the second matching result also includes the matching result of the identity information of the first object and the subtitle content of each video frame group in the first video frame group set.

5. The method according to claim 4, characterized in that, The step of determining the target video frame set based on the second matching result includes at least one of the following: If the subtitle content of the third video frame group in the first video frame group set matches the identity information of the target object, it is determined that the target video frame group set includes the video frame group between the third video frame group and the second video frame group in the live video. If the subtitle content of the fourth video frame group in the first video frame group set matches the identity information of the first object, and the subtitle content of the fifth video frame group in the first video frame group set matches the identity information of the target object, then the target video frame group set is determined to include a first sub-target video frame group set and a second sub-target video frame group set, wherein the fifth video frame group is located before the fourth video frame group, the first sub-target video frame group set includes the video frame group between the fourth video frame group and the second video frame group in the live video, and the second sub-target video frame group set includes the video frame group between the fifth video frame group and the fourth video frame group in the live video; If the subtitle content of the sixth video frame group in the first video frame group set matches the identity information of the first object, and the subtitle content of any video frame group in the first video frame group set does not match the identity information of the target object, then the target video frame group set is determined to include a third sub-target video frame group set and a fourth sub-target video frame group set. The third sub-target video frame group set includes video frame groups from the sixth video frame group to the second video frame group in the live video, and the fourth sub-target video frame group set includes video frame groups in the first video frame group set that are located before the sixth video frame group. If the subtitle content of any video frame group in the first video frame set does not match the identity information of the target object and the first object, then the target video frame set is determined to include the first video frame set and the second video frame set.

6. The method according to claim 5, characterized in that, Determining the subtitle relevance of the second video frame group based on the importance of the target object in each video frame group of the target video frame group set includes at least one of the following: When the target video frame set includes video frame sets between the third video frame set and the second video frame set, determine the average importance and importance variance of the target object in the target video frame set; If the distance between the importance of the target object in the second video frame group and the average importance is greater than or equal to the importance variance, then the subtitle relevance of the second video frame group is determined to be a second value; otherwise, the subtitle relevance of the second video frame group is determined to be a third value, wherein the second value is greater than or equal to the preset value, and the third value is less than the preset value. When the target video frame set includes the first sub-target video frame set and the second sub-target video frame set, or when the target video frame set includes the third sub-target video frame set and the fourth sub-target video frame set, the first average subtitle relevance of the fifth sub-target video frame set and the second average subtitle relevance of the sixth sub-target video frame set are determined, and the first average importance of the target object in the fifth sub-target video frame set and the second average importance of the target object in the sixth sub-target video frame set are determined, wherein the fifth sub-target video frame set is the first sub-target video frame set and the sixth sub-target video frame set is the second sub-target video frame set, or the fifth sub-target video frame set is the third sub-target video frame set, and the sixth sub-target video frame set is the second sub-target video frame set. The target video frame set is designated as the fourth sub-target video frame set. Based on the first average subtitle relevance, the first average importance, and the second average importance, a first influence value is determined on the importance of the target object for the subtitle relevance of the fifth sub-target video frame set. Based on the second average subtitle relevance, the first average importance, and the second average importance, a second influence value is determined on the importance of the target object for the subtitle relevance of the sixth sub-target video frame set. If the absolute value of the difference between the first influence value and the second influence value is greater than or equal to a first preset threshold, the subtitle relevance of the second video frame set is determined to be a fourth value; otherwise, the subtitle relevance of the second video frame set is determined to be a fifth value, wherein the fourth value is less than the preset value, and the fifth value is greater than or equal to the preset value. When the target video frame set includes the first video frame set and the second video frame set, if the proportion of video frame sets in the first video frame set whose subtitle relevance is greater than or equal to the preset value reaches a preset ratio, and the difference between the importance of the target object in the second video frame set and the importance of the target object in each video frame set in the first video frame set is within a preset range, then the subtitle relevance of the second video frame set is determined to be a sixth value; otherwise, the subtitle relevance of the second video frame set is determined to be a seventh value, wherein the sixth value is greater than or equal to the preset value, and the seventh value is less than the preset value.

7. The method according to any one of claims 1 to 6, characterized in that, The step of obtaining the identity information of the target object and the first video frame group in the live video includes: Based on the user's touch input in the playback screen of the live video, determine the target object targeted by the touch input; The first video frame group is determined based on the touch time of the touch input; Identify the identity information of the target object, wherein the identity information includes at least one of facial information and phone number information.

8. The method according to any one of claims 1 to 6, characterized in that, After extracting the subtitle content of the second video frame group, the method further includes: The extracted subtitles are displayed at a preset position in the playback screen of the live video. Alternatively, the extracted subtitle content can be used to generate bullet comments, which can then be published.

9. A subtitle processing device, characterized in that, include: The acquisition module is used to acquire the identity information of the target object and the first video frame group in the live video. The matching module is used to obtain the second video frame group in the live video and match the identity information of the target object with the subtitle content of the second video frame group to obtain a first matching result, wherein the second video frame group is the video frame group after the first video frame group; The first determining module is used to determine the subtitle relevance of the second video frame group based on the first matching result, wherein the subtitle relevance is the relevance between the subtitle content of the video frame group and the target object; The extraction module is used to extract the subtitle content of the second video frame group based on the subtitle relevance of the second video frame group; wherein, if the subtitle relevance of the second video frame group is greater than or equal to a preset value, the subtitle content of the second video frame group is extracted, or if the subtitle relevance of the second video frame group is less than the preset value, the subtitle content of the second video frame group is not extracted. The first determining module includes: The first determining submodule is used to determine the subtitle relevance of the second video frame group as a first value when the subtitle content of the second video frame group matches the identity information of the target object, wherein the first value is greater than or equal to a preset value. or, The second determining submodule is configured to, when the subtitle content of the second video frame group does not match the identity information of the target object, match the identity information of the target object with the subtitle content of each video frame group in the first video frame group set, wherein the first video frame group set includes video frame groups in the live video that precede the second video frame group; determine a target video frame group set based on a second matching result, wherein the second matching result includes the matching result of the identity information of the target object with the subtitle content of each video frame group in the first video frame group set, and the target video frame group set includes at least the second video frame group; and determine the subtitle relevance of the second video frame group based on the importance of the target object in each video frame group in the target video frame group set, wherein the importance of the target object in any video frame group is determined based on the pixel proportion information of the target object in that video frame group.

10. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor; characterized in that the processor is configured to read the program from the memory to implement the steps of the subtitle processing method as described in any one of claims 1 to 8.

11. A computer-readable storage medium for storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps in the subtitle processing method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Video processing method and device and storage medium

    CN110856039A

  • Subtitle display method and device

    CN113660536A