Bullet screen processing method and device
By semantic matching and timestamp alignment of barrage and subtitles, and synchronously adjusting barrage positions when subtitles position changes, the problem of content occlusion in synchronous display of subtitles and barrage in the prior art is solved, and efficient and accurate alignment and user experience are improved.
Patent Information
- Application Number
- CN202411978413.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-03-18
AI Technical Summary
The prior art has a problem of content occlusion in the synchronous display of subtitles and barrages, especially in live or dynamically updated subtitle scenes, where efficient and accurate alignment cannot be achieved.
By semantic matching with subtitles in the video for each barrage, the semantic matching result is obtained, and the timestamp of the target barrage is aligned to the timestamp of the target subtitles. During the video playback process, each target subtitle is analyzed for position change. If the subtitle position changes, the position of the barrage will be adjusted simultaneously.
It realizes efficient and accurate alignment of subtitles and barrage in video playback, and synchronously adjusts the barrage position when the subtitles position changes, improving the user experience.
Smart Images

Figure CN119653170A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video processing technology, and in particular to a method and device for processing barrage. Background Art
[0002] At present, when it comes to the synchronization of subtitles and barrages, domestic platforms generally rely on fixed subtitle and barrage display methods, that is, subtitles and barrages are fixed in preset positions.
[0003] However, this method is prone to content occlusion in actual application scenarios, which greatly affects the user experience. Although some platforms have tried to develop timeline-based subtitle adjustment technology, this type of technology can only process static videos and cannot adapt to live broadcasts or dynamically updated subtitle scenarios, resulting in a poor viewing experience. Summary of the invention
[0004] In view of this, the present application provides a method and device for processing barrage, so as to achieve efficient and accurate alignment of subtitles and barrage in video playback, and synchronously adjust the position of barrage when the position of subtitles changes.
[0005] The first aspect of the present application provides a method for processing a barrage, including:
[0006] For each bullet comment, semantic matching is performed with each subtitle in the video to obtain the semantic matching result;
[0007] Align the timestamp of the target bullet comment to the timestamp of the target subtitle; wherein the target bullet comment and the target subtitle are bullet comments and subtitles with successful semantic matching;
[0008] During the video playback, position change analysis is performed on each target subtitle to obtain a position change analysis result;
[0009] If the position change analysis result of a target subtitle indicates that the position of the target subtitle has changed, the position of the target bullet screen is adjusted.
[0010] Optionally, performing semantic matching on each bullet comment with each subtitle in the video to obtain a semantic matching result includes:
[0011] Perform vectorization processing on each bullet comment respectively to obtain a bullet comment vector;
[0012] Vectorize each subtitle separately to obtain a subtitle vector;
[0013] For each bullet comment vector, calculate the similarity with each subtitle vector to obtain the similarity between the bullet comment and the subtitle;
[0014] If the similarity between the bullet comment and the subtitle is greater than the similarity threshold, it is determined that the semantic match is successful, and the bullet comment and the subtitle are used as the target bullet comment and the target subtitle.
[0015] Optionally, during the video playback process, performing position change analysis on each target subtitle to obtain a position change analysis result includes:
[0016] During the video playback process, for each target subtitle, the current screen size of the video and the current position information of the target subtitle are obtained;
[0017] Determine the initial position information of the target subtitle under the current picture size according to the current picture size;
[0018] According to the initial position information of the target subtitles under the current picture size and the current position information of the target subtitles, the position change analysis result of the target subtitles is obtained.
[0019] Optionally, if the target subtitle position change analysis result indicates that the position of the target subtitle has changed, adjusting the position of the target bullet screen includes:
[0020] If the position change analysis result of a target subtitle indicates that the position of the target subtitle has changed, the position of the target barrage is adjusted according to the current position information of the target subtitle and the initial position information of the target barrage.
[0021] Optionally, before performing semantic matching for each bullet comment and each subtitle in the video to obtain a semantic matching result, the method further includes:
[0022] When loading subtitles in a video, the language type of the subtitles of the current frame is identified to obtain the language type of the subtitles of the current frame;
[0023] For each bullet comment in the current frame, identifying the language type of the bullet comment to obtain the language type of the bullet comment;
[0024] If the language type of the subtitles of the current frame is inconsistent with the language type of the bullet comment, the content of the bullet comment is translated into the language type of the subtitles of the current frame.
[0025] Optionally, the method for processing barrage further includes:
[0026] For bullet comments in different language types, display areas are allocated to them according to the priority of the language type.
[0027] Optionally, the method for processing barrage further includes:
[0028] The density of bullet screens in different languages is obtained in real time, and the priority of the bullet screen language type is adjusted according to the density of the bullet screen.
[0029] Optionally, the method for processing barrage further includes:
[0030] If the timeline of the target subtitle changes, get the updated timeline of the target subtitle;
[0031] The time axis of the target barrage is updated according to the time axis of the updated target subtitle to obtain the time axis of the updated target barrage.
[0032] Optionally, the method for processing barrage further includes:
[0033] Receive feedback from users;
[0034] If the number of negative feedbacks in the user feedback information is greater than the negative feedback threshold, the similarity threshold is modified according to the learning rate and the number of negative feedbacks to obtain a modified similarity threshold.
[0035] A second aspect of the present application provides a barrage processing device, including:
[0036] The semantic matching unit is used to perform semantic matching on each bullet comment and each subtitle in the video to obtain a semantic matching result;
[0037] A timestamp alignment unit, used to align the timestamp of a target bullet comment to the timestamp of a target subtitle; wherein the target bullet comment and the target subtitle are bullet comments and subtitles with successful semantic matching;
[0038] A position change analysis unit is used to perform position change analysis on each target subtitle during video playback to obtain a position change analysis result;
[0039] The adjusting unit is used to adjust the position of the target bullet screen if the position change analysis result of the target subtitle shows that the position of the target subtitle has changed.
[0040] Optionally, the semantic matching unit includes:
[0041] A first vectorization unit, used to perform vectorization processing on each bullet comment respectively to obtain a bullet comment vector;
[0042] A second vectorization unit is used to perform vectorization processing on each subtitle to obtain a subtitle vector;
[0043] A similarity analysis unit is used to calculate the similarity between each bullet comment vector and each subtitle vector to obtain the similarity between the bullet comment and the subtitle;
[0044] The semantic matching subunit is used to determine that the semantic matching is successful if the similarity between the bullet screen and the subtitle is greater than a similarity threshold, and to use the bullet screen and the subtitle as the target bullet screen and the target subtitle.
[0045] Optionally, the position change analysis unit includes:
[0046] An acquisition unit, used to acquire the current screen size of the video and the current position information of the target subtitle for each target subtitle during the video playback process;
[0047] A determination unit, used to determine the initial position information of the target subtitle under the current picture size according to the current picture size;
[0048] The position analysis unit is used to obtain the position change analysis result of the target subtitle according to the initial position information of the target subtitle under the current picture size and the current position information of the target subtitle.
[0049] Optionally, the adjustment unit includes:
[0050] The adjusting subunit is used to adjust the position of the target bullet screen according to the current position information of the target subtitle and the initial position information of the target bullet screen if the position change analysis result of the target subtitle shows that the position of the target subtitle has changed.
[0051] Optionally, the barrage processing device further includes:
[0052] A language type identification unit, used to identify the language type of the subtitles of the current frame when loading the subtitles in the video, and obtain the language type of the subtitles of the current frame;
[0053] The language type identification unit is further used to identify the language type of each bullet comment in the current frame to obtain the language type of the bullet comment;
[0054] The translation unit is used to translate the content of the barrage into the language type of the subtitles of the current frame if the language type of the subtitles of the current frame is inconsistent with the language type of the barrage.
[0055] Optionally, the barrage processing device further includes:
[0056] The hierarchical display unit is used to allocate display areas for bullet comments in different language types according to the priority of the language type.
[0057] Optionally, the barrage processing device further includes:
[0058] The priority adjustment unit is used to obtain the density of bullet screens of different language types in real time, and adjust the priority of the bullet screen language type according to the density of the bullet screen.
[0059] Optionally, the barrage processing device further includes:
[0060] A timeline acquisition unit, used to acquire the updated timeline of the target subtitle if the timeline of the target subtitle changes;
[0061] The updating unit is used to update the time axis of the target barrage according to the time axis of the updated target subtitle to obtain the time axis of the updated target barrage.
[0062] Optionally, the barrage processing device further includes:
[0063] A receiving unit, used for receiving feedback information from users;
[0064] The correction unit is used to correct the similarity threshold according to the learning rate and the number of negative feedbacks to obtain a corrected similarity threshold if the number of negative feedbacks in the user feedback information is greater than the negative feedback threshold.
[0065] A third aspect of the present application provides an electronic device, including:
[0066] one or more processors;
[0067] a storage device having one or more programs stored thereon;
[0068] When the one or more programs are executed by the one or more processors, the one or more processors implement the barrage processing method as described in any one of the first aspects.
[0069] A fourth aspect of the present application provides a computer storage medium on which a computer program is stored, wherein when the computer program is executed by a processor, the method for processing barrage as described in any one of the first aspects is implemented.
[0070] It can be seen from the above scheme that the present application provides a method and device for processing barrage, by semantically matching each barrage with each subtitle in the video to obtain a semantic matching result; aligning the timestamp of the target barrage to the timestamp of the target subtitle; wherein the target barrage and the target subtitle are barrages and subtitles with successful semantic matching; during the playback of the video, position change analysis is performed on each target subtitle to obtain a position change analysis result; if the position change analysis result of a target subtitle indicates that the position of the target subtitle has changed, the position of the target barrage is adjusted. Thus, efficient and accurate alignment of subtitles and barrages in video playback is achieved, and the position of the barrage is synchronously adjusted when the position of the subtitle changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0072] Figure 1 A flowchart of a method for processing barrage provided in an embodiment of the present application;
[0073] Figure 2 A flowchart of a semantic matching method provided in another embodiment of the present application;
[0074] Figure 3 A flow chart of a position change analysis method provided in another embodiment of the present application;
[0075] Figure 4 A flowchart of a method for processing barrage provided in another embodiment of the present application;
[0076] Figure 5 A schematic diagram of a barrage processing device provided by another embodiment of the present application;
[0077] Figure 6 A schematic diagram of a barrage processing device provided by another embodiment of the present application;
[0078] Figure 7 A schematic diagram of an electronic device for implementing a method for processing barrage provided in another embodiment of the present application. DETAILED DESCRIPTION
[0079] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0080] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0081] It should be noted that the information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0082] It should be noted that the concepts such as "first" and "second" mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0083] It should be noted that the modifications of "one" and "plurality" mentioned in the present application are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0084] The present application embodiment provides a method for processing a bullet screen, such as Figure 1 As shown, the specific steps include:
[0085] S101. For each bullet comment, semantic matching is performed with each subtitle in the video to obtain a semantic matching result.
[0086] The semantic analysis results include multiple pairs of successfully matched subtitles and bullet comments, and the bullet comments and subtitles with successful semantic matching are used as target bullet comments and target subtitles.
[0087] Optionally, in another embodiment of the present application, an implementation of step S101 is as follows: Figure 2 As shown, including:
[0088] S201. Perform vectorization processing on each bullet comment respectively to obtain a bullet comment vector.
[0089] S202, performing vectorization processing on each subtitle respectively to obtain a subtitle vector.
[0090] In the specific implementation process of the present application, the method of vectorizing subtitles and barrages may be, but is not limited to, inputting barrages and subtitles into a sentence embedding model (such as Sentence-BERT) for vectorization to obtain barrage vectors and subtitle vectors, which is not limited here.
[0091] Among them, Sentence-BERT generates sentence embedding vectors through a dual-tower architecture (Siamese network) and is used for sentence comparison and semantic matching.
[0092] The training process of Sentence-BERT can be but is not limited to:
[0093] 1. Pre-training stage (BERT basic training):
[0094] The BERT model is first pre-trained on large-scale corpora (such as Wikipedia and BooksCorpus) through large-scale unsupervised learning. The pre-training tasks include masked language model and next sentence prediction. By learning the relationship between contexts, BERT can understand the semantic structure of words and sentences.
[0095] 2. Fine-Tuning:
[0096] Sentence-BERT fine-tunes the BERT model to generate sentence-level semantic vectors. The fine-tuning task is usually a sentence comparison task (for example, using a Siamese network). In this task, the model is trained to compare the similarities of two sentences and generate an embedding vector based on these similarities.
[0097] The fine-tuning training process uses a labeled sentence pair dataset, commonly used datasets such as SNLI or QuoraQuestion Pairs, which contain sentence pairs and their similarity labels (such as "similar" or "dissimilar").
[0098] The goal of training is to minimize the vector distance between two sentences generated by the model, so that sentences with similar semantics are closer in the vector space, and sentences with large semantic differences are farther apart in the vector space.
[0099] 3. Embedding vector generation:
[0100] The fine-tuned Sentence-BERT model can generate a semantic vector for any input sentence, that is, by inputting a sentence into the model, the model outputs a vector of fixed dimension that captures the semantic information of the sentence.
[0101] In actual applications, subtitles and barrage content will be vectorized through the Sentence-BERT model to obtain subtitle vectors and barrage vectors.
[0102] S203 . Calculate the similarity between each bullet comment vector and each subtitle vector to obtain the similarity between the bullet comment and the subtitle.
[0103] In the specific implementation process of the present application, the similarity between the bullet screen and the subtitles can be calculated by but not limited to the cosine similarity method, which is not limited here.
[0104] The cosine similarity between bullet comments and subtitles can be calculated using the following formula:
[0105]
[0106] in, For barrage j, Subtitles , is the vector of bullet comment j, Subtitles Vector.
[0107] S204: If the similarity between the bullet comment and the subtitle is greater than the similarity threshold, it is determined that the semantic match is successful, and the bullet comment and the subtitle are used as the target bullet comment and the target subtitle.
[0108] The similarity threshold is pre-set by technicians, experts, etc. and is not limited here.
[0109] Specifically, if the similarity between the bullet comment and the subtitle is not greater than the similarity threshold, not only processing but also trying to adjust the timeline and trying to re-evaluate through other methods are performed, which is not limited here.
[0110] S102: Align the timestamp of the target bullet comment to the timestamp of the target subtitle.
[0111] Among them, the target barrage and target subtitle are the barrage and subtitle with successful semantic matching.
[0112] It is understandable that since the display time of the barrage and subtitles is not necessarily the same, the system shifts or scales the display time of the barrage according to the time period of the subtitles to ensure that the display time of the barrage is consistent with the display time of the subtitles.
[0113] For example, if the display time of the bullet comment is shorter than the subtitle time, the system will adjust the display length of the bullet comment to ensure that its display time is sufficient to cover the display time of the subtitle. If the bullet comment time is longer, the system will shorten the display time of the bullet comment to synchronize it with the subtitle.
[0114] Specifically, first obtain the timestamp information of subtitles and comments. The timestamp information includes the start timestamp ( ) and the end timestamp ( Then, calculate the time span of the subtitles, that is, the display time of the subtitles, which is usually from the start time ( ) to the end time ( ). After that, the timestamp of the bullet comment (start timestamp ( ) and the end timestamp ( ) and the time span of the subtitles Align. Assume that the subtitle time period is , if the timestamp of the bullet comment is originally [ , ], the system will automatically adjust the time period of the barrage according to the length of the subtitle time period to align it with the subtitle time.
[0115] For example: Assume the subtitle time period is , and the time period of the barrage is [ =12, =13], the system will adjust the time of the barrage to [ =10, =15], so that the display of barrage and subtitles are completely synchronized.
[0116] Finally, the system stores the aligned bullet comment timestamps and transmits them to the player, ensuring that subtitles and bullet comments are displayed at the same time.
[0117] S103: During the video playback process, a position change analysis is performed on each target subtitle to obtain a position change analysis result.
[0118] First of all, it should be noted that different video screen sizes will have different subtitle default display areas (initial position information) and barrage default display areas (initial position information).
[0119] Therefore, before determining the default display area for subtitles and barrage, you first need to obtain the video screen size, that is, the width W and height H of the video. In the specific implementation of this application, the video screen size can be directly provided by the player, video processing module, automatic detection of metadata of video files, etc., which is not limited here.
[0120] Subtitles are usually displayed at the bottom of the video screen. In order to ensure that the subtitles do not block important content, the default display area of the subtitles will be set to an area near the bottom of the screen. Assuming the height of the video is H, the display area of the subtitles will be set to a height range of about 10% to 20% from the bottom of the screen. The specific settings can be as follows: The width of the display area (W_s) usually occupies 80% to 100% of the width of the video, that is, the width of the entire screen, to ensure that the subtitle content is not incomplete due to insufficient space. The height of the display area (H_s) is usually 10% to 20% of the height of the entire screen, so that the subtitles will not be too crowded and will not affect other important content in the screen (such as characters, background, etc.), which is not limited here.
[0121] For example: Assuming the size of the video screen is 1920px×1080px. The subtitle display area may be set to: width W_s=1920px (full screen width). Height H_s=10% to 20%, i.e. 108px to 216px, and the subtitles will be displayed at a height of about 100px to 200px at the bottom of the screen.
[0122] The default display area of the bullet screen is different from the default display area of the subtitles. In addition, the display position of the bullet screen is usually dynamic and can be moved freely on the screen. In order to prevent the bullet screen from overlapping with the subtitle content, the system will dynamically allocate the display area of the bullet screen according to the position and size of the subtitle area. The default display area of the bullet screen is usually set at the top of the screen or above the subtitles to ensure that the subtitles and bullet screen do not block each other.
[0123] For example: assuming that the subtitles already occupy 10% to 20% of the height range at the bottom, the default display area of the barrage can be set to 20% to 40% of the height range at the top of the screen, ensuring that the barrage content can be displayed clearly and separated from the subtitle area, thereby avoiding mutual obstruction between the subtitles and the barrage, effectively improving the user experience.
[0124] Specifically, in the case of video screen size A, the default subtitle display area (initial position information) is , and the default display area of the bullet screen (initial position information) is ,and to avoid blocking each other.
[0125] Optionally, in another embodiment of the present application, an implementation of step S103 is as follows: Figure 3 As shown, including:
[0126] S301. During the video playback process, for each target subtitle, obtain the current screen size of the video and the current position information of the target subtitle.
[0127] The current position information may be the boundary coordinates of the subtitles, that is, the starting position and the ending position of the subtitles, which are not limited here. For example, if the subtitles are displayed at the bottom of the screen, the starting coordinates of the subtitles are a certain height from the bottom of the screen.
[0128] In the specific implementation process of this application, the change of subtitles can be monitored by, but not limited to, frame detection technology, which is not limited here. For example, the boundary coordinates of the subtitles in each frame of the video are calculated, and the subtitles are determined to have changed position according to the current boundary coordinates of the subtitles (the current position information of the subtitles).
[0129] It should be noted that when the subtitle position shifts due to scene switching, picture adjustment or subtitle size change, the system will detect the new position of the subtitle in real time.
[0130] For example, during playback, the system may detect that the subtitles move up from the bottom of the screen, or that the width or height of the display area changes due to screen size adjustment. At this time, the system identifies the new display area of the subtitles through frame analysis and updates its position coordinates, that is, the current position information.
[0131] S302: Determine initial position information of a target subtitle in the current picture size according to the current picture size.
[0132] The initial position information of the target subtitles at the current screen size is pre-set by technicians, experts, etc. and is not limited here.
[0133] S303: Obtain a position change analysis result of the target subtitle according to the initial position information of the target subtitle in the current screen size and the current position information of the target subtitle.
[0134] Specifically, if the initial position information of the target subtitle at the current picture size and the current position information of the target subtitle are inconsistent, it is determined that the position of the target subtitle has changed; if the initial position information of the target subtitle at the current picture size and the current position information of the target subtitle are consistent, it is determined that the position of the target subtitle has not changed.
[0135] S104. If the position change analysis result of the target subtitle indicates that the position of the target subtitle has changed, adjust the position of the target bullet screen.
[0136] Specifically, if the position change analysis result of a target subtitle indicates that the position of the target subtitle has changed, the position of the target barrage is adjusted according to the current position information of the target subtitle and the initial position information of the target barrage.
[0137] Assume that the initial position of the bullet screen is , the current position information of the target subtitle is , then the position of the adjusted bullet screen is .
[0138] For example, if the video size is 1920px×1080px, the default display area of the subtitles is usually at the bottom. The starting position of the subtitles may be set to y=1000px (100px height from the bottom of the screen), and the end position is set to y=1080px (bottom of the screen). If the subtitles change position due to scene change or screen zoom, the system will obtain the new position of the subtitles through real-time frame monitoring and boundary coordinate detection.
[0139] For example, if the subtitles move up to the middle of the screen (y=500px) due to image adjustment, the system will detect this change through image recognition technology and update the position of the subtitles. According to the new y coordinate, the system will adjust the bullet screen display area to ensure that the subtitles and bullet screen do not overlap.
[0140] In the specific implementation process of the present application, when the position of the subtitles changes, it may affect other screen elements (such as characters, objects, etc.). Therefore, it is also necessary to ensure that the subtitles do not block important content.
[0141] For example, if the position of the subtitles changes due to scene switching, the system will check whether the display area of the subtitles affects the key area in the video and adjust the display position of the subtitles in time. The key area in the video can be pre-annotated in the video or analyzed by a pre-trained learning model, which is not limited here.
[0142] In the specific implementation process of this application, if the position change amplitude of the subtitles is greater than the change amplitude threshold, it is necessary to dynamically (re)schedule the barrage and use an intelligent arrangement algorithm to adjust the barrage display level or position to ensure that the subtitles and barrage do not overlap. The position change amplitude of the subtitles can be determined based on the boundary coordinates of the subtitles. The determination method can be, but is not limited to, taking the quotient of the current boundary coordinates of the subtitles and the initial boundary coordinates of the subtitles as the position change amplitude of the subtitles, which is not limited here. The change amplitude threshold is pre-set and changed by technicians, experts, etc., and is not limited here.
[0143] Optionally, in another embodiment of the present application, if the time axis of the target subtitle changes, an implementation of the method for processing the barrage further includes:
[0144] The time axis of the updated target subtitle is obtained; the time axis of the target barrage is updated according to the time axis of the updated target subtitle to obtain the time axis of the updated target barrage.
[0145] Among them, the timeline of the target subtitle is the start time to the end time of the target subtitle. When the timeline of the subtitle is detected to have changed, the timeline of the barrage corresponding to the subtitle (the barrage that successfully matches the semantics of the subtitle) needs to be updated synchronously so that the user's viewing experience is not affected.
[0146] Assumption: The subtitle timeline is updated to When the time axis of the bullet comment that matches the subtitle is The system adjusts the time axis of the matched bullet comments according to the time axis difference. .
[0147] In the specific implementation process of the present application, the timeline of the updated barrage is sent to the player so that the player refreshes the display time of the barrage.
[0148] Optionally, in another embodiment of the present application, a user feedback interface is further provided, which allows the user to provide feedback on the matching effect of subtitles and bullet comments. Therefore, an implementation of the method for processing bullet comments further includes:
[0149] The collected feedback information is stored in the system's feedback database, and the data is regularly analyzed to generate a matching accuracy score to quantify the subtitle and barrage matching effect.
[0150] Among them, the user's feedback information includes but is not limited to whether the subtitles match the barrage (such as "complete match", "partial match", "mismatch"), whether the time synchronization is smooth (such as "smooth", "delayed"), etc., which are not limited here.
[0151] Specifically, according to the user's feedback information, an accuracy score is assigned to each feedback item, for example: positive feedback (accurate match): if the user feedback subtitles and barrages match very accurately, a higher score is given (such as "complete match" has a higher score); neutral feedback (partial match): if the user thinks that there are some matching problems between subtitles and barrages, but they are generally acceptable, a medium score is given (such as "partial match"); negative feedback (mismatch): if the user thinks that subtitles and barrages do not match at all, a low score is given. These scores can be rated in the form of 1 to 5 points or 0 to 1 points. The specific scoring criteria are pre-set by technical personnel, experts, etc., and are not limited here.
[0152] By collecting feedback information from all users and calculating the matching accuracy score based on the feedback content, the score of each feedback will be aggregated and the average score of all feedback will be calculated as the accuracy score of the subtitle and bullet comment matching effect.
[0153] In addition, the system will also make adjustments based on the weight of user feedback. For example, for active users (users who provide multiple consistent feedback), the system will give higher weight, considering their feedback to be more valuable; while for inactive users' feedback, the system will give lower weight, which is not limited here.
[0154] In the specific implementation process of this application, the system can also optimize the semantic matching model based on user feedback and the calculated matching accuracy score. If the user feedback subtitles and barrage do not match, the system will automatically adjust the model to optimize the subsequent subtitle and barrage matching process. For example: If a large number of users feedback that the subtitles and barrage are out of sync, the system may adjust the time synchronization algorithm to ensure that the subtitles and barrage are more accurately synchronized in the next display.
[0155] Optionally, in another embodiment of the present application, an implementation of the method for processing barrage further includes:
[0156] Receive user feedback information; if the number of negative feedbacks in the user feedback information is greater than the negative feedback threshold, modify the similarity threshold according to the learning rate and the number of negative feedbacks to obtain a modified similarity threshold.
[0157] Specifically, based on the user's feedback score, the system will dynamically adjust the threshold α to ensure that the matching accuracy of subtitles and barrages is continuously optimized. The specific adjustment process is as follows: Positive feedback (accurate match): If the user feedback subtitles and barrages are completely matched, the system will increase the current α value, which means that the system has stricter requirements for matching. Neutral feedback (partial match): If the user believes that the subtitles and barrages are partially matched, the system maintains the current α value, indicating that the current matching standard is effective in most cases, but there is still room for improvement. Negative feedback (mismatch): If the user feedback subtitles and barrages do not match, the system will lower the current α value, indicating that the system will relax the requirements for matching and allow looser semantic matching to facilitate more matching attempts. No restrictions are made here.
[0158] In order to ensure the quality of feedback data, this application can also weight feedback data according to the user's activity and feedback consistency. The system will give higher weights to high-quality feedback (such as active users or users who have given consistent feedback multiple times), and these feedbacks will have a greater impact on the adjustment of α. The system will give lower weights to low-quality feedback (such as users who give first-time feedback or inconsistent feedback).
[0159] Specifically, based on the feedback collected, an average precision score is calculated based on positive feedback, neutral feedback, and negative feedback, and α is adjusted accordingly. For example, if positive feedback is in the majority, the system will increase the α value and improve the standard of semantic matching. If negative feedback is in the majority, the system will lower the α value and relax the matching standard to make the system more tolerant of small differences between bullet comments and subtitles. The updated α value will be used for the next round of subtitle and bullet comment matching to ensure that each match is optimized based on the latest user feedback.
[0160] Assumption: The initial α value is 0.8, which means that the semantic similarity between subtitles and bullet comments must reach 0.8 to be considered a match. If the system collects a lot of negative feedback (for example, users think that the subtitles and bullet comments do not match accurately), the system will reduce α to 0.7, thereby relaxing the matching requirements and allowing more bullet comments to match subtitles. Conversely, if users give positive feedback and think that the match is very accurate, the system may increase α to 0.85, making the system's matching requirements more stringent.
[0161] In the specific implementation process of this application, the following calculation formula can be used but not limited to Optimize and get the optimized : ;in, is the learning rate, is the total number of negative feedbacks, and f is an optimization function, which is pre-selected by technicians, experts, etc. and is not limited here. Through the above adjustments, the matching accuracy of this application is gradually improved.
[0162] From the above scheme, it can be seen that the present application provides a method for processing bullet screens, by semantically matching each bullet screen with each subtitle in the video to obtain a semantic matching result; aligning the timestamp of the target bullet screen to the timestamp of the target subtitle; wherein the target bullet screen and the target subtitle are the bullet screen and subtitle with successful semantic matching; during the video playback, position change analysis is performed on each target subtitle to obtain a position change analysis result; if the position change analysis result of a target subtitle indicates that the position of the target subtitle has changed, the position of the target bullet screen is adjusted. Thus, efficient and accurate alignment of subtitles and bullet screens in video playback is achieved, and when the position of the subtitle changes, the position of the bullet screen is synchronously adjusted.
[0163] With the rapid development of video live broadcast and on-demand platforms, many platforms have begun to support multi-language subtitles, but these subtitles are usually provided in the form of independent language files, which makes it difficult to achieve dynamic synchronization across languages. Therefore, another embodiment of the present application provides a method for processing bullet comments, such as Figure 4 As shown, including:
[0164] S401. When loading subtitles in a video, identify the language type of the subtitles in the current frame to obtain the language type of the subtitles in the current frame.
[0165] S402. For each bullet comment in the current frame, identify the language type of the bullet comment to obtain the language type of the bullet comment.
[0166] The language types include but are not limited to Chinese, English, Japanese, etc., and are not limited here.
[0167] In the specific implementation process of this application, you can use but not limited to language detection modules (such as FastText) to identify the language type of barrage and subtitles, which is not limited here.
[0168] FastText is a character-level model that can efficiently and accurately determine the language type of a text by decomposing it into different n-gram features.
[0169] Optionally, in another embodiment of the present application, the present application will also update the memory of the translation model based on user feedback information to optimize the accuracy of the translation model. In the subsequent subtitle and barrage translation processing, the updated translation memory is used first to more accurately handle common translation errors and improve the matching effect of multilingual content.
[0170] S403: If the language type of the subtitles of the current frame is inconsistent with the language type of the bullet comment, the content of the bullet comment is translated into the language type of the subtitles of the current frame.
[0171] It can be understood that if the language type of the subtitles of the current frame is consistent with the language type of the bullet comment, step S404 is directly executed.
[0172] In the specific implementation process of the present application, the language type of the barrage translated into subtitles can be used but not limited to calling a machine translation module, which is not limited here.
[0173] S404: For each bullet comment, semantic matching is performed with each subtitle in the video to obtain a semantic matching result.
[0174] Continuing with the above example, the barrage includes translated barrage. It can be understood that the translated barrage is only used for matching during semantic matching, but the barrage is still displayed in the original language type.
[0175] S405: Align the timestamp of the target bullet comment to the timestamp of the target subtitle.
[0176] Among them, the target barrage and target subtitle are the barrage and subtitle with successful semantic matching.
[0177] S406: During the video playback process, a position change analysis is performed on each target subtitle to obtain a position change analysis result.
[0178] S407: If the position change analysis result of the target subtitle indicates that the position of the target subtitle has changed, adjust the position of the target bullet screen.
[0179] It should be noted that the specific implementation of steps S404 to S407 can refer to the specific implementation corresponding to steps S101 to S104, which will not be repeated here.
[0180] In the specific implementation process of the present application, an implementation method of the barrage processing method also includes: for barrages of different language types, allocating display areas for the barrages according to the priority of the language type.
[0181] Among them, the priority of language type can be pre-set (for example, set according to the user's common language), or set according to the language type of the video (for example, if the language type of the video is English, set English barrage as the first priority and allocate the best display area to it), etc., which is not limited here.
[0182] Since the display position of the barrage is more flexible, and the barrage content will be dynamically arranged according to real-time input, in order to ensure that barrages in different languages do not block each other, barrages in different languages are displayed in different levels, that is, barrages of different levels will be displayed in different positions and sorted according to the hierarchical order. For example, Chinese barrages may be displayed on the upper layer of the screen, while English barrages may be displayed on the lower layer, which can effectively avoid the overlap of barrages in different languages. This hierarchical division ensures that even if barrages in multiple languages are displayed at the same time, users can clearly see the barrage content in each language and maintain a good visual effect.
[0183] In the specific implementation process of this application, a level number can also be assigned to the barrage in each language, and the display order and display position of the barrage can be determined according to the level number. For example: the first layer (main language barrage): assuming that the main language of the video is Chinese, the system will set the Chinese barrage to the first layer. These barrages will be displayed at the top of the screen and displayed first. The second layer (secondary language barrage): assuming that there are English and Japanese barrages, the system will set the English barrage to the second layer and display it below the Chinese barrage to ensure that the Chinese and English barrages do not overlap. The third layer and below (other language barrages): If the video also contains other languages (such as Spanish, French, etc.), the system will assign them to the third layer or lower levels, and display them further below the barrage area to ensure that each language barrage has an independent display area.
[0184] If there are a large number of Chinese bullet comments, they may occupy the upper half of the screen and display them one by one through automatic scrolling. If the English bullet comments display less content, they may be located in the lower half of the screen to ensure that they do not conflict with the Chinese bullet comments. Japanese bullet comments are located in a lower area, possibly below the English bullet comments, and the display area is dynamically adjusted according to the number of bullet comments and the scrolling speed. In this way, bullet comments in different languages are displayed separately in different layers, avoiding interference between languages, allowing bullet comments in each language to be clearly presented, and improving the user experience.
[0185] If the amount of bullet screen in a certain language in the video suddenly increases, the present application can also dynamically adjust the bullet screen level. Therefore, in the specific implementation process of the present application, an implementation method of the bullet screen processing method also includes:
[0186] The density of bullet screens in different languages is obtained in real time, and the priority of the bullet screen language type is adjusted according to the density of the bullet screen.
[0187] Among them, the density of barrage can be determined according to the number of barrages in the barrage display area at the same time, and there is no limitation here.
[0188] In the specific implementation process of this application, assuming that the barrage density of the English barrage in the second layer is greater than the barrage density threshold of the second layer, the priority of the English barrage is changed to the first priority, and the subsequent English barrage is displayed in the first layer, or a new display area is allocated, which is not limited here.
[0189] It can be seen from the above scheme that the present application provides a method for processing barrages, by identifying the language types of barrages and subtitles. If the language type of the subtitles of the current frame is inconsistent with the language type of the barrages, the content of the barrages is translated into the language type of the subtitles of the current frame, and then semantic matching is performed to obtain a semantic matching result; the timestamp of the target barrage is aligned to the timestamp of the target subtitle; wherein the target barrage and target subtitle are barrages and subtitles with successful semantic matching; during the playback of the video, a position change analysis is performed on each target subtitle to obtain a position change analysis result; if the position change analysis result of the target subtitle shows that the position of the target subtitle has changed, the position of the target barrage is adjusted. This achieves efficient and accurate alignment of subtitles and barrages of different language types in video playback, and synchronously adjusts the position of the barrage when the position of the subtitle changes.
[0190] The present application embodiment provides a device for processing bullet comments, such as Figure 5 As shown, specifically including:
[0191] The semantic matching unit 501 is used to perform semantic matching on each bullet comment with each subtitle in the video to obtain a semantic matching result.
[0192] Optionally, in another embodiment of the present application, an implementation of the semantic matching unit 501 includes:
[0193] The first vectorization unit is used to perform vectorization processing on each bullet comment respectively to obtain a bullet comment vector.
[0194] The second vectorization unit is used to perform vectorization processing on each subtitle to obtain a subtitle vector.
[0195] The similarity analysis unit is used to calculate the similarity between each bullet comment vector and each subtitle vector to obtain the similarity between the bullet comment and the subtitle.
[0196] The semantic matching subunit is used to determine that the semantic matching is successful if the similarity between the bullet screen and the subtitle is greater than a similarity threshold, and to use the bullet screen and the subtitle as the target bullet screen and the target subtitle.
[0197] For the specific working process of the units disclosed in the above embodiments of the present application, please refer to the corresponding method embodiments, such as Figure 2 As shown, no further description is given here.
[0198] The timestamp alignment unit 502 is used to align the timestamp of the target bullet comment to the timestamp of the target subtitle.
[0199] Among them, the target barrage and target subtitle are the barrage and subtitle with successful semantic matching.
[0200] The position change analysis unit 503 is used to perform position change analysis on each target subtitle during the video playback process to obtain a position change analysis result.
[0201] Optionally, in another embodiment of the present application, an implementation of the position change analysis unit 503 includes:
[0202] The acquisition unit is used to acquire the current screen size of the video and the current position information of the target subtitle for each target subtitle during the video playback process.
[0203] The determination unit is used to determine the initial position information of the target subtitle under the current picture size according to the current picture size.
[0204] The position analysis unit is used to obtain the position change analysis result of the target subtitle according to the initial position information of the target subtitle under the current picture size and the current position information of the target subtitle.
[0205] For the specific working process of the units disclosed in the above embodiments of the present application, please refer to the corresponding method embodiments, such as Figure 3 As shown, no further description is given here.
[0206] The adjusting unit 504 is configured to adjust the position of the target bullet screen if the position change analysis result of the target subtitle indicates that the position of the target subtitle has changed.
[0207] For the specific working process of the units disclosed in the above embodiments of the present application, please refer to the corresponding method embodiments, such as Figure 1 As shown, no further description is given here.
[0208] Optionally, in another embodiment of the present application, an implementation of the adjustment unit 504 includes:
[0209] The adjusting subunit is used to adjust the position of the target barrage according to the current position information of the target subtitle and the initial position information of the target barrage if the position change analysis result of the target subtitle shows that the position of the target subtitle has changed.
[0210] The specific working process of the units disclosed in the above embodiments of the present application can be found in the corresponding method embodiments, which will not be repeated here.
[0211] Optionally, in another embodiment of the present application, an implementation of a device for processing a bullet comment includes:
[0212] The timeline acquisition unit is used to acquire the updated timeline of the target subtitle if the timeline of the target subtitle changes.
[0213] The updating unit is used to update the time axis of the target barrage according to the time axis of the updated target subtitle to obtain the time axis of the updated target barrage.
[0214] The specific working process of the units disclosed in the above embodiments of the present application can be found in the corresponding method embodiments, which will not be repeated here.
[0215] Optionally, in another embodiment of the present application, an implementation of a device for processing a bullet comment includes:
[0216] The receiving unit is used to receive feedback information from users.
[0217] The correction unit is used to correct the similarity threshold according to the learning rate and the number of negative feedbacks to obtain a corrected similarity threshold if the number of negative feedbacks in the user feedback information is greater than the negative feedback threshold.
[0218] The specific working process of the units disclosed in the above embodiments of the present application can be found in the corresponding method embodiments, which will not be repeated here.
[0219] As can be seen from the above scheme, the present application provides a processing device for bullet screen, wherein the semantic matching unit 501 performs semantic matching with each subtitle in the video for each bullet screen to obtain a semantic matching result; the timestamp alignment unit 502 aligns the timestamp of the target bullet screen to the timestamp of the target subtitle; wherein the target bullet screen and the target subtitle are the bullet screen and subtitle with successful semantic matching; the position change analysis unit 503 performs position change analysis on each target subtitle during the video playback process to obtain a position change analysis result; if the position change analysis result of the target subtitle indicates that the position of the target subtitle has changed, the adjustment unit 504 adjusts the position of the target bullet screen. Thus, efficient and accurate alignment of subtitles and bullet screens in video playback is achieved, and the position of the bullet screen is synchronously adjusted when the position of the subtitle changes.
[0220] The present application embodiment provides a device for processing bullet comments, such as Figure 6 As shown, specifically including:
[0221] The language type identification unit 601 is used to identify the language type of the subtitles of the current frame when loading the subtitles in the video, so as to obtain the language type of the subtitles of the current frame.
[0222] The language type identification unit 601 is further used to identify the language type of each bullet comment in the current frame to obtain the language type of the bullet comment.
[0223] The translation unit 602 is used to translate the content of the barrage into the language type of the subtitles of the current frame if the language type of the subtitles of the current frame is inconsistent with the language type of the barrage.
[0224] The semantic matching unit 603 is used to perform semantic matching on each bullet comment with each subtitle in the video to obtain a semantic matching result.
[0225] The timestamp alignment unit 604 is used to align the timestamp of the target bullet comment to the timestamp of the target subtitle.
[0226] Among them, the target barrage and target subtitle are the barrage and subtitle with successful semantic matching.
[0227] The position change analysis unit 605 is used to perform position change analysis on each target subtitle during the video playback process to obtain a position change analysis result.
[0228] The adjusting unit 606 is configured to adjust the position of the target bullet screen if the position change analysis result of the target subtitle indicates that the position of the target subtitle has changed.
[0229] For the specific working process of the units disclosed in the above embodiments of the present application, please refer to the corresponding method embodiments, such as Figure 4 As shown, no further description is given here.
[0230] Optionally, in another embodiment of the present application, an implementation of the device for processing barrage further includes:
[0231] The timeline acquisition unit is used to acquire the updated timeline of the target subtitle if the timeline of the target subtitle changes.
[0232] The updating unit is used to update the time axis of the target barrage according to the time axis of the updated target subtitle to obtain the time axis of the updated target barrage.
[0233] The specific working process of the units disclosed in the above embodiments of the present application can be found in the corresponding method embodiments, which will not be repeated here.
[0234] Optionally, in another embodiment of the present application, an implementation of the device for processing barrage further includes:
[0235] The receiving unit is used to receive feedback information from users.
[0236] The correction unit is used to correct the similarity threshold according to the learning rate and the number of negative feedbacks to obtain a corrected similarity threshold if the number of negative feedbacks in the user feedback information is greater than the negative feedback threshold.
[0237] The specific working process of the units disclosed in the above embodiments of the present application can be found in the corresponding method embodiments, which will not be repeated here.
[0238] As can be seen from the above scheme, the present application provides a device for processing bullet screens, wherein the language type identification unit 601 identifies the language type of bullet screens and subtitles. If the language type of the subtitles of the current frame is inconsistent with the language type of the bullet screens, the translation unit 602 translates the content of the bullet screens into the language type of the subtitles of the current frame, and then the semantic matching unit 603 performs semantic matching to obtain a semantic matching result; the timestamp alignment unit 604 aligns the timestamp of the target bullet screen to the timestamp of the target subtitle; wherein the target bullet screen and the target subtitle are the bullet screens and subtitles with successful semantic matching; the position change analysis unit 605 performs position change analysis on each target subtitle during the video playback process to obtain a position change analysis result; if the position change analysis result of the target subtitle indicates that the position of the target subtitle has changed, the adjustment unit 606 adjusts the position of the target bullet screen. Thus, efficient and accurate alignment of subtitles and bullet screens of different language types in video playback is achieved, and the position of the bullet screen is synchronously adjusted when the position of the subtitle changes.
[0239] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that may be used include, without limitation, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0240] Another embodiment of the present application provides an electronic device, such as Figure 7 As shown, including:
[0241] One or more processors 701.
[0242] The storage device 702 stores one or more programs.
[0243] When the one or more programs are executed by the one or more processors 701, the one or more processors 701 implement the method for processing barrage as described in any one of the above embodiments.
[0244] Another embodiment of the present application provides a computer storage medium on which a computer program is stored, wherein when the computer program is executed by a processor, the method for processing barrage as described in any one of the above embodiments is implemented.
[0245] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0246] It should be noted that the computer-readable medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0247] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0248] Another embodiment of the present application provides a computer program product, which, when executed, is used to execute the above-mentioned barrage processing method.
[0249] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, the above-mentioned functions defined in the method of the embodiment of the present application are executed.
[0250] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in this application is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing this application.
[0251] Although several specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present application. Certain features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination.
[0252] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of application involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above application concept. For example, the above features are replaced with (but not limited to) technical features with similar functions applied in the present application.
Claims
1. A method for processing barrage, characterized in that: include: For each bullet comment, semantic matching is performed with each subtitle in the video to obtain the semantic matching result; Align the timestamp of the target bullet comment to the timestamp of the target subtitle; wherein the target bullet comment and the target subtitle are bullet comments and subtitles with successful semantic matching; During the video playback, position change analysis is performed on each target subtitle to obtain a position change analysis result; If the position change analysis result of a target subtitle indicates that the position of the target subtitle has changed, the position of the target bullet screen is adjusted.
2. The method for processing barrage according to claim 1, characterized in that: The semantic matching is performed for each bullet comment with each subtitle in the video to obtain a semantic matching result, including: Perform vectorization processing on each bullet comment respectively to obtain a bullet comment vector; Vectorize each subtitle separately to obtain a subtitle vector; For each bullet comment vector, calculate the similarity with each subtitle vector to obtain the similarity between the bullet comment and the subtitle; If the similarity between the bullet comment and the subtitle is greater than the similarity threshold, it is determined that the semantic match is successful, and the bullet comment and the subtitle are used as the target bullet comment and the target subtitle.
3. The method for processing barrage according to claim 1, characterized in that: During the video playback process, the position change analysis is performed on each target subtitle to obtain the position change analysis result, including: During the video playback process, for each target subtitle, the current screen size of the video and the current position information of the target subtitle are obtained; Determine the initial position information of the target subtitle under the current picture size according to the current picture size; According to the initial position information of the target subtitles under the current picture size and the current position information of the target subtitles, the position change analysis result of the target subtitles is obtained.
4. The method for processing barrage according to claim 3, characterized in that: If the position change analysis result of the target subtitle indicates that the position of the target subtitle has changed, adjusting the position of the target bullet screen includes: If the position change analysis result of a target subtitle indicates that the position of the target subtitle has changed, the position of the target barrage is adjusted according to the current position information of the target subtitle and the initial position information of the target barrage.
5. The method for processing barrage according to claim 1, characterized in that: Before performing semantic matching for each bullet comment and each subtitle in the video to obtain a semantic matching result, the method further includes: When loading subtitles in a video, the language type of the subtitles of the current frame is identified to obtain the language type of the subtitles of the current frame; For each bullet comment in the current frame, identifying the language type of the bullet comment to obtain the language type of the bullet comment; If the language type of the subtitles of the current frame is inconsistent with the language type of the bullet comment, the content of the bullet comment is translated into the language type of the subtitles of the current frame.
6. The method for processing barrage according to claim 5, characterized in that: Also includes: For bullet comments in different language types, display areas are allocated to them according to the priority of the language type.
7. The method for processing barrage according to claim 6, characterized in that: Also includes: The density of bullet screens in different languages is obtained in real time, and the priority of the bullet screen language type is adjusted according to the density of the bullet screen.
8. The method for processing barrage according to claim 1, characterized in that: Also includes: If the timeline of the target subtitle changes, get the updated timeline of the target subtitle; The time axis of the target barrage is updated according to the time axis of the updated target subtitle to obtain the time axis of the updated target barrage.
9. The method for processing barrage according to claim 2, characterized in that: Also includes: Receive user feedback; If the number of negative feedbacks in the user feedback information is greater than the negative feedback threshold, the similarity threshold is modified according to the learning rate and the number of negative feedbacks to obtain a modified similarity threshold.
10. A device for processing barrage, characterized in that: include: The semantic matching unit is used to perform semantic matching on each bullet comment and each subtitle in the video to obtain a semantic matching result; A timestamp alignment unit, used to align the timestamp of a target bullet comment to the timestamp of a target subtitle; wherein the target bullet comment and the target subtitle are bullet comments and subtitles with successful semantic matching; A position change analysis unit is used to perform position change analysis on each target subtitle during video playback to obtain a position change analysis result; The adjusting unit is used to adjust the position of the target bullet screen if the position change analysis result of the target subtitle shows that the position of the target subtitle has changed.