CN110430448B - Bullet screen processing method and device and electronic equipment - Google Patents

Bullet screen processing method and device and electronic equipment Download PDF

Info

Publication number
CN110430448B
CN110430448B CN201910698945.8A CN201910698945A CN110430448B CN 110430448 B CN110430448 B CN 110430448B CN 201910698945 A CN201910698945 A CN 201910698945A CN 110430448 B CN110430448 B CN 110430448B
Authority
CN
China
Prior art keywords
bullet screen
sentence
caption
matching degree
subtitle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910698945.8A
Other languages
Chinese (zh)
Other versions
CN110430448A (en
Inventor
曹立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910698945.8A priority Critical patent/CN110430448B/en
Publication of CN110430448A publication Critical patent/CN110430448A/en
Application granted granted Critical
Publication of CN110430448B publication Critical patent/CN110430448B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/235Processing of additional data, e.g. scrambling of additional data or processing content descriptors
    • H04N21/2355Processing of additional data, e.g. scrambling of additional data or processing content descriptors involving reformatting operations of additional data, e.g. HTML pages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
    • H04N21/4355Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream involving reformatting operations of additional data, e.g. HTML pages on a television screen
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/488Data services, e.g. news ticker
    • H04N21/4884Data services, e.g. news ticker for displaying subtitles

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention aims to provide a bullet screen processing method and device and electronic equipment. The bullet screen processing method comprises the following steps: obtaining a bullet screen aiming at a video file; selecting a first caption sentence with the highest matching degree with the bullet screen content from a preset caption set of the video file; the preset subtitle set comprises a plurality of subtitle sentences; determining the display time corresponding to the first caption sentence as the display time of the bullet screen; the display time corresponding to the first caption sentence is as follows: a time at which the first caption statement is displayed in the video file. According to the scheme, the content described by the bullet screen can be well matched with the plot in the actual video picture, and the user experience is improved.

Description

Bullet screen processing method and device and electronic equipment
Technical Field
The present invention relates to the field of video playing, and in particular, to a bullet screen processing method and apparatus, and an electronic device.
Background
The bullet screen refers to a commenting caption popped up on a video playing interface when a video is watched. With the development of the bullet screen technology and the popularization of the smart television, the emerging bullet screen interaction mode not only enables users to express the experience of watching programs and increases the participation sense of the programs, but also enables the users to watch bullet screen comments of other users to the programs and increases the interactivity of program watching.
At present, when a user watches videos, most of the output bullet screens are output in real time according to the moment of launching the bullet screens. Since the barrage which is output in real time according to the transmitting time is probably a video scenario before or after the transmitting time described by the user, a problem that the content described by the barrage cannot be well matched with the scenario in the actual video picture may occur.
Disclosure of Invention
The embodiment of the invention provides a bullet screen processing method and device, electronic equipment and a storage medium, which can enable the content described by a bullet screen to be better matched with a plot in an actual video picture, and further can improve the watching experience of a user. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a bullet screen processing method, where the method includes:
obtaining a bullet screen aiming at a video file;
selecting a first caption sentence with the highest matching degree with the bullet screen content from a preset caption set of the video file; the preset subtitle set comprises a plurality of subtitle sentences;
determining the display time corresponding to the first caption sentence as the display time of the bullet screen; the display time corresponding to the first caption sentence is as follows: a time at which the first caption statement is displayed in the video file.
Optionally, selecting a first caption sentence with a highest matching degree with the bullet screen content from a preset caption set of the video file, including:
searching N subtitle sentences from a preset subtitle set of the video file by taking the bullet screen as search content;
and respectively calculating first matching degrees of the N subtitle sentences and the bullet screen, and selecting a first subtitle sentence with the highest first matching degree from the N subtitle sentences.
Optionally, the determining the display time corresponding to the first caption statement as the display time of the bullet screen includes:
and when the first matching degree of the first caption sentence is greater than a first preset screening threshold value, determining the display time corresponding to the first caption sentence as the display time of the bullet screen.
Optionally, before the step of determining, when the first matching degree of the first caption statement is greater than a first preset filtering threshold, the display time corresponding to the first caption statement as the display time of the bullet screen, the method further includes:
respectively calculating first matching degrees of a plurality of chatting sentences contained in a preset chatting set and the barrage, and selecting a target chatting sentence with the highest first matching degree from the plurality of chatting sentences;
when the first matching degree of the first caption sentence is greater than a first preset screening threshold, determining the display time corresponding to the first caption sentence as the display time of the bullet screen, including:
and when the first matching degree of the first caption sentence is greater than a first preset screening threshold and greater than the first matching degree of the target chatting sentence, executing the display moment corresponding to the first caption sentence, and determining the display moment as the display moment of the bullet screen.
Optionally, the calculating a first matching degree between the N subtitle sentences and the bullet screen, and selecting a first subtitle sentence with a highest first matching degree from the N subtitle sentences includes:
respectively calculating first matching degrees of the N subtitle sentences and the bullet screen by adopting a fuzzy matching algorithm, and selecting a first subtitle sentence with the highest first matching degree from the N subtitle sentences;
the calculating a first matching degree between a plurality of chatting sentences contained in a preset chatting set and the barrage respectively, and selecting a target chatting sentence with a highest first matching degree from the plurality of chatting sentences includes:
and respectively calculating first matching degrees of a plurality of chatting sentences contained in a preset chatting set and the barrage by adopting a fuzzy matching algorithm, and selecting a target chatting sentence with the highest first matching degree from the plurality of chatting sentences.
Optionally, the method further comprises:
when a preset condition is met, respectively calculating second matching degrees of the N subtitle sentences and the bullet screen by adopting a vector space model algorithm, and selecting a second subtitle sentence with the highest second matching degree from the N subtitle sentences;
respectively calculating third matching degrees of the N subtitle sentences and the bullet screen by adopting a BM25 probabilistic model algorithm, and selecting a third subtitle sentence with the highest third matching degree from the N subtitle sentences;
when the second matching degree of the second caption sentence is greater than the third matching degree of the third caption sentence, determining the display time corresponding to the second caption sentence as the display time of the bullet screen; otherwise, determining the display time corresponding to the third caption sentence as the display time of the bullet screen;
wherein the predetermined condition includes: the first matching degree of the first caption sentence is smaller than a first preset screening threshold, and the first matching degree of the target chat sentence is smaller than a second preset screening threshold;
or the first matching degree of the first caption sentence is smaller than a first preset screening threshold, and the first matching degree of the target chatting sentence is smaller than the first matching degree of the first caption sentence;
or when the first matching degree of the first caption statement is smaller than the first matching degree of the target chatting statement, and the first matching degree of the target chatting statement is smaller than a second preset screening threshold.
Optionally, the step of retrieving N subtitle sentences from a preset subtitle set of the video file with the bullet screen as the retrieval content includes:
and taking the bullet screen as retrieval content, and retrieving N caption sentences from a preset caption set of the video file by adopting a Lucene search engine.
In a second aspect, an embodiment of the present invention provides a bullet screen processing method, where the method includes:
when a preset video is played, detecting whether subtitles appear in a current video playing picture;
if a subtitle appears in a current video playing picture, acquiring a target bullet screen corresponding to the subtitle from the acquired bullet screen set of the preset video, wherein the subtitle and the target bullet screen have an association relation in content;
and displaying the target bullet screen in the current video playing picture.
Optionally, the obtaining a target barrage corresponding to the subtitle from the obtained barrage set of the preset video includes:
and taking the subtitles as retrieval contents, and acquiring a target barrage corresponding to the subtitles from the acquired barrage set of the preset video.
In a third aspect, an embodiment of the present invention further provides a bullet screen processing apparatus, where the apparatus includes:
the bullet screen obtaining module is used for obtaining a bullet screen aiming at the video file;
the caption sentence selection module is used for selecting a first caption sentence with the highest matching degree with the bullet screen content from a preset caption set of the video file; the preset subtitle set comprises a plurality of subtitle sentences;
the first bullet screen display module is used for determining the display time corresponding to the first caption sentence as the display time of the bullet screen; the display time corresponding to the first caption sentence is as follows: a time at which the first caption statement is displayed in the video file.
Optionally, the caption sentence selection module is specifically configured to retrieve N caption sentences from a preset caption set of the video file with the bullet screen as a retrieval content;
and respectively calculating first matching degrees of the N subtitle sentences and the bullet screen, and selecting a first subtitle sentence with the highest first matching degree from the N subtitle sentences.
Optionally, the first bullet screen display module is specifically configured to determine, when the first matching degree of the first caption sentence is greater than a first preset filtering threshold, a display time corresponding to the first caption sentence as the display time of the bullet screen.
Optionally, the apparatus further comprises:
a chat sentence selecting module, configured to, when the first matching degree of the first caption sentence is greater than a first preset screening threshold, determine a display time corresponding to the first caption sentence as a display time of the barrage, respectively calculate first matching degrees of a plurality of chat sentences included in a preset chat set and the barrage, and select a target chat sentence with a highest first matching degree from the plurality of chat sentences;
the first barrage display module is specifically configured to execute the display time corresponding to the first caption sentence and determine the display time as the display time of the barrage when the first matching degree of the first caption sentence is greater than a first preset screening threshold and is greater than the first matching degree of the target chatting sentence.
Optionally, the caption sentence selection module is specifically configured to calculate first matching degrees of the N caption sentences and the bullet screen respectively by using a fuzzy matching algorithm, and select a first caption sentence with a highest first matching degree from the N caption sentences;
the chatting sentence selecting module is specifically configured to calculate first matching degrees of a plurality of chatting sentences contained in a preset chatting set and the barrage by using a fuzzy matching algorithm, and select a target chatting sentence with a highest first matching degree from the plurality of chatting sentences.
Optionally, the apparatus further comprises:
the second bullet screen display module is used for adopting a vector space model algorithm to respectively calculate second matching degrees of the N character screen sentences and the bullet screen when preset conditions are met, and selecting second caption sentences with the highest second matching degree from the N character screen sentences;
respectively calculating third matching degrees of the N subtitle sentences and the bullet screen by adopting a BM25 probabilistic model algorithm, and selecting a third subtitle sentence with the highest third matching degree from the N subtitle sentences;
when the second matching degree of the second caption sentence is greater than the third matching degree of the third caption sentence, determining the display time corresponding to the second caption sentence as the display time of the bullet screen; otherwise, determining the display time corresponding to the third caption sentence as the display time of the bullet screen;
wherein the predetermined condition includes: the first matching degree of the first caption sentence is smaller than a first preset screening threshold, and the first matching degree of the target chat sentence is smaller than a second preset screening threshold;
or the first matching degree of the first caption sentence is smaller than a first preset screening threshold, and the first matching degree of the target chatting sentence is smaller than the first matching degree of the first caption sentence;
or when the first matching degree of the first caption statement is smaller than the first matching degree of the target chatting statement, and the first matching degree of the target chatting statement is smaller than a second preset screening threshold.
Optionally, the caption sentence selection module is specifically configured to retrieve N caption sentences from a preset caption set of the video file by using the bullet screen as retrieval content and using a Lucene search engine.
In a fourth aspect, an embodiment of the present invention further provides a bullet screen processing apparatus, including:
the subtitle detection module is used for detecting whether subtitles appear in a current video playing picture when a preset video is played;
the target bullet screen acquisition module is used for acquiring a target bullet screen corresponding to the caption from the acquired bullet screen set of the preset video if the caption appears in the current video playing picture, wherein the caption and the target bullet screen have an association relation in content;
and the target bullet screen display module is used for displaying the target bullet screen in the current video playing picture.
Optionally, the target barrage acquiring module is specifically configured to acquire, from the acquired barrage set of the preset video, a target barrage corresponding to the subtitle with the subtitle as the retrieval content.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
a processor configured to implement the method steps of the first aspect or the second aspect when executing the program stored in the memory.
In a sixth aspect, the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method steps of the first aspect or the second aspect are implemented.
In the bullet screen processing method provided by the first aspect of the embodiments of the present invention, a plurality of caption sentences in a preset caption set of a video file are matched with a bullet screen, a first caption sentence with the highest matching degree with the content of the bullet screen is selected, and the bullet screen is output at the display time of the matched first caption sentence, so that the content described by the bullet screen can be better matched with a scenario in an actual video picture, and user experience is improved. In addition, the embodiment of the invention can accurately grasp the output time of the bullet screen, so that the content described by the bullet screen is further accurately matched with the video scenario, the understanding of the scenario by the user is facilitated, and the interest of watching the video is enhanced.
In the bullet screen processing method provided in the second aspect of the embodiment of the present invention, the subtitles appearing in the played picture are associated with the target bullet screen in the preset video bullet screen set, and the target bullet screen is displayed in the current video played picture. Therefore, the target barrage related to the subtitles is output at the display moment of the subtitles, so that the content described by the barrage can be well matched with the scenario in the actual video picture, and the user experience is improved. In addition, the embodiment of the invention can accurately grasp the output time of the bullet screen, so that the content described by the bullet screen is further accurately matched with the video scenario, the understanding of the scenario by the user is facilitated, and the interest of watching the video is enhanced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flowchart of a bullet screen processing method according to an embodiment of the present invention;
fig. 2 is a flowchart of another bullet screen processing method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a bullet screen processing device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 5 is a flowchart of another bullet screen processing method according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of another bullet screen processing device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another electronic device according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
In order to enable the content described by the barrage to better coincide with the scenario in the actual video picture and improve the user experience, the embodiment of the invention provides a barrage processing method and device, electronic equipment and a storage medium.
First, a bullet screen processing method provided by an embodiment of the present invention is described below. The bullet screen processing method provided by the embodiment of the invention can be applied to electronic equipment. Specifically, the electronic device may be a server or a terminal device. In a specific application, the terminal device may be a desktop computer, an intelligent mobile terminal, a portable computer, or the like.
Specifically, the execution main body of the bullet screen processing method may be a bullet screen processing device running in the electronic device. In a specific application, if the bullet screen processing method is applied to a terminal device, the bullet screen processing device may be a plug-in a video playing client, and if the bullet screen processing method is applied to a server, the bullet screen processing device may be a software program for responding to the request data of the video playing client, which is reasonable.
In addition, the application scenes of the bullet screen display method provided by the embodiment of the invention can comprise a scene one and a scene two. The scene one is a real-time processing scene of a bullet screen input by a user in the video playing process; and the second scene is a processing scene of the existing barrage, and the existing barrage can be reordered by processing the existing barrage. It can be understood that, for the first scenario, the barrage display method may be applied to a terminal device or a server; and for the second scene, the barrage display method can be applied to a server.
In addition, it can be understood that the barrage in the embodiment of the present invention refers to the input commentary characters or symbols that fly through the video screens when the user watches videos.
As shown in fig. 1, a bullet screen processing method provided in an embodiment of the present invention may include the following steps:
s101, acquiring a bullet screen aiming at a video file;
when the barrage processing device is a plug-in the video playing client, the barrage input by the user and aiming at the video file can be directly obtained. When the bullet screen processing device is a software program in the server, the server obtains the bullet screen by receiving the bullet screen which is sent by the video playing client and is input by the user and aims at the video file.
S102, selecting a first caption sentence with the highest matching degree with the bullet screen content from a preset caption set of the video file; the preset caption set comprises a plurality of caption sentences;
in order to solve the problems of the prior art, a preset subtitle set of a video file may be previously constructed. In a specific application, the preset subtitle set may include all subtitles of the video file; of course, since there may be subtitles unrelated to the scenario in all the subtitles of the video file, at this time, the preset subtitle set may include a portion of the subtitles of the video file, where the portion of the subtitles is each of the subtitles remaining after the subtitles unrelated to the scenario are removed from all the subtitles of the video file.
It can be understood that, when the bullet screen processing method is applied to a terminal device, the terminal device requests to play the video file, and at the same time, the preset subtitles can be requested from a server and stored locally in the terminal device; and then when the bullet screen is obtained, the local preset subtitle set is directly utilized. Certainly, since not all users have a demand for sending a bullet screen when watching the video file, in order to avoid occupation of a storage space caused by storing a preset subtitle set, when the terminal device obtains the bullet screen, an operation of calling the preset subtitle set to a server is triggered, so as to obtain the preset subtitle set. In addition, the terminal device may not request the preset subtitle set from the server, but report the bullet screen to the server when obtaining the bullet screen, so that the server assists in completing the step of selecting the first subtitle sentence with the highest matching degree with the bullet screen content from the preset subtitle set of the video file.
It should be noted that there are various implementation manners for selecting the first caption statement with the highest matching degree with the bullet screen content from the preset caption set of the video file.
For example, in a possible implementation manner, the step of selecting, from a preset subtitle set of the video file, a first subtitle sentence that matches the bullet screen content to the highest extent may include:
and calculating the first matching degree of all caption sentences in the preset caption set and the bullet screen, and selecting the first caption sentence with the highest first matching degree from the preset caption set.
In another possible implementation manner, in order to increase the processing speed, the step of selecting the first caption sentence with the highest degree of matching with the bullet screen content from the preset caption set of the video file may include:
searching N subtitle sentences from a preset subtitle set of the video file by taking the bullet screen as search content; and respectively calculating the first matching degrees of the N subtitle sentences and the bullet screen, and selecting the first subtitle sentence with the highest first matching degree from the N subtitle sentences.
Illustratively, a Lucene search engine may be used to retrieve N subtitle sentences from the preset subtitle set of the video file, but is not limited thereto. The Lucene is a full-text search engine toolkit of an open source code provided by the apache software foundation, is a framework of a full-text search engine, and provides a complete query engine, an index engine and a partial text analysis engine. The Lucene aims to provide a simple and easy-to-use tool kit for software developers to conveniently realize the full-text retrieval function in a target system or establish a complete full-text retrieval engine on the basis of the full-text retrieval function.
In addition, the matching algorithm used for calculating the first matching degree between the caption sentence in the preset caption set and the bullet screen can be various, such as a fuzzy matching algorithm, a Vector Space Model (VSM) algorithm, a BM25 probability Model algorithm, and the like. For clarity of layout and clarity of the scheme, the principles of the fuzzy matching algorithm, the vector space model algorithm, and the BM25 probabilistic model algorithm are described subsequently.
S103, determining the display time corresponding to the first caption sentence as the display time of the bullet screen; the display time corresponding to the first caption sentence is as follows: a time at which the first caption statement is displayed in the video file.
It can be understood that, in order to ensure the validity of the matching between the first caption sentence and the bullet screen, a threshold may be set for the first matching degree according to actual needs, for example, a first preset screening threshold is set. And when the first matching degree of the first caption sentence is greater than a first preset screening threshold value, determining the display time corresponding to the first caption sentence as the display time of the bullet screen.
It should be noted that, after the first caption sentence is displayed, when the user inputs the bullet screen with the highest matching degree with the first caption sentence, the bullet screen will not be displayed in the current playing, and can only be displayed at the time when the first caption sentence is displayed in the next video file. The moment when the video file displays the first caption statement next time can be when the video file is played next time, or can be when the user drags the playing progress of the video file to return to the video file to display the first caption statement.
According to the embodiment of the invention, the plurality of caption sentences in the preset caption set of the video file are matched with the barrage, the first caption sentence with the highest matching degree with the content of the barrage is selected, and the barrage is output at the display moment of the matched first caption sentence, so that the content described by the barrage can be well matched with the plot in the actual video picture, and the user experience is improved. In addition, the embodiment of the invention can accurately grasp the output time of the bullet screen, so that the content described by the bullet screen is further accurately matched with the video scenario, the understanding of the scenario by the user is facilitated, and the interest of watching the video is enhanced.
When watching a video, the user inputs some chatty-like barrage unrelated to the scenario of the video. Sometimes, the bullet screen similar to chatty is matched in the caption set to obtain the first caption sentence with the highest first matching degree, so that the first caption sentence is output and displayed, and the experience of watching videos of the user is influenced. In order to improve user experience, in the embodiment of the invention, for the same bullet screen, a first caption sentence with the highest first matching degree is selected from a caption set, and a target chatting sentence with the highest first matching degree is selected from a chatting set, and the first matching degree of the first caption sentence and the target chatting sentence is compared. And when the first matching degree of the first caption sentence is greater than a first preset screening threshold and greater than the first matching degree of the target chatting sentence, the bullet screen is matched with the first caption sentence, and the display moment corresponding to the first caption sentence is determined as the display moment of the bullet screen. Otherwise, namely when the first matching degree of the first caption sentence is smaller than a first preset screening threshold value or smaller than the first matching degree of the target chatting sentence, the barrage is shielded, so that the barrage which is irrelevant to the scenario and is input by the user when the user watches the video can be filtered.
Based on the processing idea, as shown in fig. 2, another bullet screen processing method provided in the embodiment of the present invention may include the following steps:
s201, acquiring a bullet screen aiming at a video file;
s202, taking the bullet screen as retrieval content, and retrieving N caption sentences from a preset caption set of the video file; the preset caption set comprises a plurality of caption sentences;
optionally, the lucene search engine may be used to retrieve N subtitle sentences from the preset subtitle set of the video file, but is not limited thereto.
S203, respectively calculating first matching degrees of the N subtitle sentences and the bullet screen, and selecting a first subtitle sentence with the highest first matching degree from the N subtitle sentences;
s204, respectively calculating first matching degrees of a plurality of chatting sentences contained in a preset chatting set and the barrage, and selecting a target chatting sentence with the highest first matching degree from the plurality of chatting sentences;
it should be noted that, a fuzzy matching algorithm may be adopted to calculate the first matching degrees of the N caption sentences and the bullet screen and the first matching degrees of the multiple chatting sentences and the bullet screen, but the method is not limited to this, and for example, a vector model algorithm, a BM25 probability model algorithm, or the like may also be adopted.
And S205, when the first matching degree of the first caption sentence is greater than a first preset screening threshold and greater than the first matching degree of the target chat sentence, executing the display moment corresponding to the first caption sentence, and determining the display moment as the display moment of the bullet screen.
According to the embodiment of the invention, the first caption sentence with the highest first matching degree selected from the caption set is compared with the target chatting sentence with the highest first matching degree selected from the chatting set, so that whether the barrage input by a user is the barrage of the chatting can be judged, and if the barrage is judged to be the chatting barrage, the barrage is shielded, and the quality and the effect of the barrage are effectively improved.
For the scheme of calculating the first matching degree between the N caption sentences and the barrage by using the fuzzy matching algorithm and calculating the first matching degree between the multiple chatting sentences contained in the preset chatting set and the barrage, because the fuzzy matching algorithm has a high requirement on the matching degree between the barrage and the caption sentences, if the barrage is output only under the condition that the first matching degree of the first caption sentence is greater than the first preset screening threshold and greater than the first matching degree of the target chatting sentence, unnecessary screening is performed on some barrages which do not meet the condition and have a low matching degree (for example, the first matching degree of the first caption sentence is greater than the first matching degree of the target chatting sentence but less than the first preset screening threshold, and the first matching degree of the first caption sentence is less than the first preset screening threshold and the first matching degree of the target chatting sentence is also less than the second preset screening threshold), this will strike the user's motivation to interact through the barrage. Therefore, it is necessary to set strict conditions for the shield bullet screen.
Based on the processing idea, the bullet screen processing method can further comprise the following steps:
when a preset condition is met, respectively calculating second matching degrees of the N subtitle sentences and the bullet screen by adopting a vector space model algorithm, and selecting a second subtitle sentence with the highest second matching degree from the N subtitle sentences;
respectively calculating a third matching degree of the N subtitle sentences and the bullet screen by adopting a BM25 probability model algorithm, and selecting a third subtitle sentence with the highest third matching degree from the N subtitle sentences;
when the second matching degree of the second caption sentence is greater than the third matching degree of the third caption sentence, determining the display time corresponding to the second caption sentence as the display time of the bullet screen; otherwise, determining the display time corresponding to the third caption sentence as the display time of the bullet screen;
wherein the predetermined condition includes: the first matching degree of the first caption sentence is smaller than a first preset screening threshold value, and the first matching degree of the target chat sentence is smaller than a second preset screening threshold value;
or the first matching degree of the first caption sentence is smaller than a first preset screening threshold value, and the first matching degree of the target chatting sentence is smaller than the first matching degree of the first caption sentence;
or when the first matching degree of the first caption statement is smaller than the first matching degree of the target chatting statement, and the first matching degree of the target chatting statement is smaller than a second preset screening threshold.
It should be noted that, when the first matching degree of the target chat statement is greater than the second preset screening threshold and is greater than the first matching degree of the first caption statement, that is, the target chat statement matches with the barrage input by the user, at this time, the barrage can be accurately determined as the barrage of the chat, so that the input barrage is not output, and the barrage of the chat is shielded. And when the first matching degree of the target chat statement is smaller than a second preset threshold value or smaller than the first matching degree of the first caption statement, selecting the caption statement which is relatively matched with the bullet screen input by the user through a vector space model algorithm and a BM25 probability model algorithm, and outputting and displaying the bullet screen at the display moment of the caption statement, so that the mistaken shielding of some bullet screens which do not meet the requirements of the fuzzy matching algorithm but do not reach the shielding degree can be avoided.
According to the embodiment of the invention, when the matching condition of the fuzzy matching algorithm is not met, the strict limiting condition is set for the bullet screen, the bullet screen is shielded only when the strict condition is met, and the bullet screen is output under other conditions, so that the mistaken shielding of the bullet screen input by a user is avoided better, and the enthusiasm of the user for interaction through the bullet screen is ensured on the premise of improving the quality of the bullet screen.
For clarity of the scheme and clarity of layout, the principles of the fuzzy matching algorithm, the vector space model algorithm, and the BM25 probabilistic model algorithm are briefly described below:
the fuzzy matching algorithm is used for dividing words of a text, analyzing and converting character strings of the divided words into grammar elements, recursively calculating the similarity between the grammar elements, calculating the weighted overlap ratio of the two character strings, and finally obtaining the similarity between the texts.
The Vector Space Model algorithm (VSM) is a retrieval Model proposed by Salton et al in the end of the 60's of the 20 th century, and becomes an important branch of information retrieval research methods in recent years. The vector space model algorithm uses the feature items and the weights to express the information of the documents, the weights are calculated through TF-IDF, the TF-IDF is a common weighting technology used for information retrieval and data mining, the TF represents word frequency, and the IDF represents an inverse text frequency index. The algorithm flow is as follows: preprocessing → selecting text feature items → calculating weighting → abstracting into a vector space model → calculating the cosine. In the embodiment of the invention, a bullet screen is used as one text, a caption sentence is used as another text, in the similarity calculation process, the bullet screen and each caption sentence are expressed into a word, each word of the bullet screen and each word of the caption sentence are endowed with a real numerical value, the bullet screen and the caption sentence are vectorized, and the semantic similarity of the bullet screen and the caption sentence is expressed by calculating the distance between vectors to obtain the second matching degree of the caption sentence and the bullet screen.
The BM25 probabilistic model algorithm is an algorithm proposed based on a probabilistic search model, and is used to evaluate the relevance between a search term and a document. The main idea of the BM25 algorithm is: analyzing the search word to generate a plurality of morphemes qi; then for a search result D, calculating the relevance score of each morpheme qi and the search result D according to a preset relevance calculation algorithm, and finally carrying out weighted summation on the relevance score of each morpheme qi relative to D to obtain the relevance score of the search word and the document; wherein, for the search word being Chinese, the morpheme of the search word is a participle, and for the search word being English, the participle of the search word is a word. In the embodiment of the invention, the bullet screen can be used as a search word, and the caption sentence can be used as a document, so that the BM25 algorithm is used for calculating the relevance score, namely the third matching degree, of the bullet screen and the caption sentence.
Since the fuzzy matching algorithm, the vector space model algorithm VSM and the BM25 probabilistic model algorithm all belong to the prior art, the details thereof are not repeated in the embodiments of the present invention.
As shown in fig. 3, corresponding to the foregoing method embodiment, an embodiment of the present invention further provides a bullet screen processing apparatus, including:
a bullet screen obtaining module 301, configured to obtain a bullet screen for a video file;
a caption/sentence selecting module 302, configured to select a first caption/sentence with a highest matching degree with the bullet screen content from a preset caption set of the video file; the preset caption set comprises a plurality of caption sentences;
a first bullet screen display module 303, configured to determine a display time corresponding to the first caption sentence as a display time of the bullet screen; the display time corresponding to the first caption sentence is as follows: a time at which the first caption statement is displayed in the video file.
Optionally, the caption sentence selecting module 302 is specifically configured to retrieve N caption sentences from a preset caption set of the video file with the bullet caption as a retrieval content;
and respectively calculating first matching degrees of the N subtitle sentences and the bullet screen, and selecting the first subtitle sentence with the highest first matching degree from the N subtitle sentences.
Optionally, the first bullet screen display module 303 is specifically configured to determine, when the first matching degree of the first caption statement is greater than a first preset filtering threshold, the display time corresponding to the first caption statement as the display time of the bullet screen.
Optionally, the apparatus may further include:
a chat sentence selecting module, configured to, when a first matching degree of the first caption sentence is greater than a first preset screening threshold, determine a display time corresponding to the first caption sentence as a display time of the barrage, respectively calculate first matching degrees of a plurality of chat sentences included in a preset chat set and the barrage, and select a target chat sentence with a highest first matching degree from the plurality of chat sentences;
the first barrage display module 303 is specifically configured to execute the display time corresponding to the first caption sentence and determine the display time as the display time of the barrage when the first matching degree of the first caption sentence is greater than a first preset filtering threshold and is greater than the first matching degree of the target chatting sentence.
Optionally, the caption sentence selecting module 302 is specifically configured to calculate first matching degrees of the N caption sentences and the bullet screen respectively by using a fuzzy matching algorithm, and select a first caption sentence with a highest first matching degree from the N caption sentences;
the chatting sentence selecting module is specifically configured to calculate first matching degrees of a plurality of chatting sentences contained in a preset chatting set and the barrage by using a fuzzy matching algorithm, and select a target chatting sentence with a highest first matching degree from the plurality of chatting sentences.
Optionally, the apparatus may further include:
the second bullet screen display module is used for adopting a vector space model algorithm to respectively calculate the second matching degrees of the N character screen sentences and the bullet screen when preset conditions are met, and selecting a second caption sentence with the highest second matching degree from the N character screen sentences;
respectively calculating a third matching degree of the N subtitle sentences and the bullet screen by adopting a BM25 probability model algorithm, and selecting a third subtitle sentence with the highest third matching degree from the N subtitle sentences;
when the second matching degree of the second caption sentence is greater than the third matching degree of the third caption sentence, determining the display time corresponding to the second caption sentence as the display time of the bullet screen; otherwise, determining the display time corresponding to the third caption sentence as the display time of the bullet screen;
wherein the predetermined condition includes: the first matching degree of the first caption sentence is smaller than a first preset screening threshold value, and the first matching degree of the target chat sentence is smaller than a second preset screening threshold value;
or the first matching degree of the first caption sentence is smaller than a first preset screening threshold value, and the first matching degree of the target chatting sentence is smaller than the first matching degree of the first caption sentence;
or when the first matching degree of the first caption statement is smaller than the first matching degree of the target chatting statement, and the first matching degree of the target chatting statement is smaller than a second preset screening threshold.
Optionally, the caption/sentence selecting module 302 is specifically configured to retrieve N caption/sentences from a preset caption set of the video file by using the bullet screen as a retrieval content and using a Lucene search engine.
In another embodiment provided by the present invention, an electronic device is further provided, as shown in fig. 4, the electronic device includes a processor 401, a communication interface 402, a memory 403, and a communication bus 404, where the processor 401, the communication interface 402, and the memory 403 complete communication with each other through the communication bus 404;
a memory 403 for storing a computer program;
the processor 401 is configured to implement the bullet screen processing method provided in the embodiment of the present invention when executing the program stored in the memory.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In another embodiment provided by the present invention, a computer-readable storage medium is further provided, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the bullet screen processing method provided by the embodiment of the present invention is implemented.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the invention are generated in whole or in part when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The following describes another bullet screen processing method provided by the embodiment of the present invention. The bullet screen processing method provided by the embodiment of the invention can be applied to electronic equipment. Specifically, the electronic device may be a server or a terminal device. In a specific application, the terminal device may be a desktop computer, an intelligent mobile terminal, a portable computer, or the like.
Specifically, the execution main body of the bullet screen processing method may be a bullet screen processing device running in the electronic device. In a specific application, if the bullet screen processing method is applied to a terminal device, the bullet screen processing device may be a plug-in a video playing client, and if the bullet screen processing method is applied to a server, the bullet screen processing device may be a software program for responding to the request data of the video playing client, which is reasonable.
In addition, it can be understood that the barrage in the embodiment of the present invention refers to the input commentary characters or symbols that fly through the video screens when the user watches videos.
As shown in fig. 5, a bullet screen processing method provided in the embodiment of the present invention may include the following steps:
s501, when a preset video is played, whether subtitles appear in a current video playing picture is detected.
When a user plays a preset video through a terminal, whether subtitles appear in a current video playing picture or not can be detected in real time. And the preset video is a video carrying subtitles. It can be understood that whether subtitles appear in the current video playing picture can be directly detected through a video playing client on the terminal, and the playing progress of the preset video can be monitored through a video server, and whether subtitles appear in the current video playing picture can be detected.
If the caption appears in the current video playing picture, step S502 is executed.
Step S502, obtaining a target bullet screen corresponding to the subtitle from the obtained bullet screen set of the preset video.
Wherein, the caption and the target bullet screen in the preset video have the content association relationship.
In the embodiment of the invention, the associated relation between the subtitles in the preset video and the barrage in the barrage set can be established in advance, and the barrage set can be the barrage sent by the user aiming at the preset video. Specifically, by the manner provided by the above embodiment, the subtitles in the preset video are matched with the bullet screen in the bullet screen set, and then the content association relationship between the subtitles and the bullet screen is established, so that the target bullet screen associated with the subtitles is displayed in the current video playing picture, and the inconsistency between the subtitles and the target bullet screen is avoided.
In addition, for the bullet screen sent by the user in real time, the bullet screen may not enter the bullet screen set, so that the bullet screen sent by the user in real time and the subtitle are matched in content, if the bullet screen and the subtitle are matched, the current video playing picture displays the bullet screen, otherwise, the current video picture does not display the bullet screen.
It should be noted that, in other embodiments provided by the present invention, the bullet screen set of the preset video may include a set of historical bullet screens input by each user for the preset video, or may include both the set of historical bullet screens and a bullet screen currently input by the user for the preset video when the preset video displays subtitles. In other words, the bullet screen set may include all historical bullet screens of the preset video, and may further include the latest collected bullet screens, that is, the latest bullet screens may also be stored in the bullet screen set.
It should be noted that there are various ways to obtain the target bullet screen corresponding to the subtitle from the obtained bullet screen set of the preset video. In a possible implementation manner, when a subtitle appears in a current video playing picture, the subtitle may be used as a search content, and a target bullet screen corresponding to the subtitle is obtained from an obtained bullet screen set of the preset video.
Specifically, a preset algorithm may be adopted to calculate the matching degree between each bullet screen in the bullet screen set and the subtitle, and if the matching degree is greater than a preset threshold, the bullet screen is considered to be corresponding, that is, the bullet screen is the target bullet screen corresponding to the subtitle. The preset threshold may be set according to actual conditions, and is not limited herein. The preset algorithm can be a fuzzy matching algorithm, a vector space model algorithm or a BM25 probability model algorithm. Since the fuzzy matching algorithm, the VSM and BM25 probabilistic model algorithm all belong to the prior art and have been introduced above, the detailed description thereof is omitted in the embodiments of the present invention.
S503, displaying the target barrage in the current video playing picture.
After the content association relationship is established between the subtitle and the target bullet screen, the target bullet screen can be displayed in the current video playing picture, namely the subtitle display time. Therefore, the target barrage can be matched with the scenario of the video playing picture, and better watching experience is brought to the user.
In the bullet screen processing method provided by the embodiment of the invention, the subtitles appearing in the playing picture are associated with the target bullet screen in the preset video bullet screen set, and the target bullet screen is displayed in the current video playing picture. Therefore, the target barrage related to the subtitles is output at the display moment of the subtitles, so that the content described by the barrage can be well matched with the scenario in the actual video picture, and the user experience is improved. In addition, the embodiment of the invention can accurately grasp the output time of the bullet screen, so that the content described by the bullet screen is further accurately matched with the video scenario, the understanding of the scenario by the user is facilitated, and the interest of watching the video is enhanced.
As shown in fig. 6, corresponding to the foregoing method embodiment, an embodiment of the present invention further provides a bullet screen processing apparatus, including:
the subtitle detection module 601 is configured to detect whether a subtitle appears in a current video playing picture when a preset video is played;
a target bullet screen obtaining module 602, configured to, if a subtitle appears in a current video playing picture, obtain a target bullet screen corresponding to the subtitle from an obtained bullet screen set of the preset video, where the subtitle and the target bullet screen have a content association relationship;
a target barrage display module 603, configured to display the target barrage in the current video playing picture.
Optionally, the target bullet screen obtaining module 602 is specifically configured to obtain a target bullet screen corresponding to the subtitle from the obtained bullet screen set of the preset video by using the subtitle as the search content.
In the bullet screen processing method provided by the embodiment of the invention, the subtitles appearing in the playing picture are associated with the target bullet screen in the preset video bullet screen set, and the target bullet screen is displayed in the current video playing picture. Therefore, the target barrage related to the subtitles is output at the display moment of the subtitles, so that the content described by the barrage can be well matched with the scenario in the actual video picture, and the user experience is improved. In addition, the embodiment of the invention can accurately grasp the output time of the bullet screen, so that the content described by the bullet screen is further accurately matched with the video scenario, the understanding of the scenario by the user is facilitated, and the interest of watching the video is enhanced.
In another embodiment provided by the present invention, an electronic device is further provided, as shown in fig. 7, the electronic device includes a processor 701, a communication interface 702, a memory 703 and a communication bus 704, where the processor 701, the communication interface 702 and the memory 703 complete communication with each other through the communication bus 704;
a memory 703 for storing a computer program;
the processor 701 is configured to implement the bullet screen processing method provided in the embodiment of the present invention when executing the program stored in the memory.
In another embodiment provided by the present invention, a computer-readable storage medium is further provided, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the bullet screen processing method provided by the embodiment of the present invention is implemented.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (15)

1. A bullet screen processing method is characterized by comprising the following steps:
obtaining a bullet screen aiming at a video file;
selecting a first caption sentence with the highest matching degree with the bullet screen content from a preset caption set of the video file; the preset subtitle set comprises a plurality of subtitle sentences;
respectively calculating first matching degrees of a plurality of chatting sentences contained in a preset chatting set and the barrage, and selecting a target chatting sentence with the highest first matching degree from the plurality of chatting sentences;
when the first matching degree of the first caption sentence is greater than a first preset screening threshold and greater than the first matching degree of the target chatting sentence, determining the display moment corresponding to the first caption sentence as the display moment of the bullet screen; the first matching degree of the first caption sentence is the first matching degree of the first caption sentence and the bullet screen, and the display time corresponding to the first caption sentence is as follows: a time at which the first caption statement is displayed in the video file.
2. The method of claim 1, wherein selecting the first caption sentence with the highest degree of matching with the bullet screen content from the preset caption set of the video file comprises:
searching N subtitle sentences from a preset subtitle set of the video file by taking the bullet screen as search content;
and respectively calculating first matching degrees of the N subtitle sentences and the bullet screen, and selecting a first subtitle sentence with the highest first matching degree from the N subtitle sentences.
3. The method of claim 2,
the calculating the first matching degrees of the N subtitle sentences and the bullet screen respectively, and selecting the first subtitle sentence with the highest first matching degree from the N subtitle sentences includes:
respectively calculating first matching degrees of the N subtitle sentences and the bullet screen by adopting a fuzzy matching algorithm, and selecting a first subtitle sentence with the highest first matching degree from the N subtitle sentences;
the calculating a first matching degree between a plurality of chatting sentences contained in a preset chatting set and the barrage respectively, and selecting a target chatting sentence with a highest first matching degree from the plurality of chatting sentences includes:
and respectively calculating first matching degrees of a plurality of chatting sentences contained in a preset chatting set and the barrage by adopting a fuzzy matching algorithm, and selecting a target chatting sentence with the highest first matching degree from the plurality of chatting sentences.
4. The method of claim 3, further comprising:
when a preset condition is met, respectively calculating second matching degrees of the N subtitle sentences and the bullet screen by adopting a vector space model algorithm, and selecting a second subtitle sentence with the highest second matching degree from the N subtitle sentences;
respectively calculating third matching degrees of the N subtitle sentences and the bullet screen by adopting a BM25 probabilistic model algorithm, and selecting a third subtitle sentence with the highest third matching degree from the N subtitle sentences;
when the second matching degree of the second caption sentence is greater than the third matching degree of the third caption sentence, determining the display time corresponding to the second caption sentence as the display time of the bullet screen; otherwise, determining the display time corresponding to the third caption sentence as the display time of the bullet screen;
wherein the predetermined condition includes: the first matching degree of the first caption sentence is smaller than a first preset screening threshold, and the first matching degree of the target chat sentence is smaller than a second preset screening threshold;
or the first matching degree of the first caption sentence is smaller than a first preset screening threshold, and the first matching degree of the target chatting sentence is smaller than the first matching degree of the first caption sentence;
or when the first matching degree of the first caption statement is smaller than the first matching degree of the target chatting statement, and the first matching degree of the target chatting statement is smaller than a second preset screening threshold.
5. The method according to any one of claims 2 to 4, wherein the step of retrieving N subtitle sentences from the preset subtitle set of the video file with the bullet screen as the retrieval content comprises:
and taking the bullet screen as retrieval content, and retrieving N caption sentences from a preset caption set of the video file by adopting a Lucene search engine.
6. A bullet screen processing method is characterized by comprising the following steps:
when a preset video is played, detecting whether subtitles appear in a current video playing picture;
if a subtitle appears in a current video playing picture, acquiring a target bullet screen corresponding to the subtitle from the acquired bullet screen set of the preset video, wherein the subtitle and the target bullet screen have an association relation in content;
displaying the target bullet screen in the current video playing picture;
wherein the incidence relation is established in the following way: selecting a subtitle with the highest matching degree with the target bullet screen content from a preset subtitle set of the video file; the preset subtitle set comprises a plurality of subtitles; respectively calculating first matching degrees of a plurality of chatting sentences contained in a preset chatting set and the target barrage, and selecting a target chatting sentence with the highest first matching degree from the plurality of chatting sentences; when the first matching degree of the subtitle is greater than a first preset screening threshold and is greater than the first matching degree of the target chatting sentence, determining the display time corresponding to the subtitle as the display time of the target barrage; the first matching degree of the subtitles is the first matching degree of the subtitles and the target barrage, and the display time corresponding to the subtitles is as follows: the time at which the subtitles are displayed in the video file.
7. The method according to claim 6, wherein the obtaining a target bullet screen corresponding to the subtitle from the obtained bullet screen set of the preset video comprises:
and taking the subtitles as retrieval contents, and acquiring a target barrage corresponding to the subtitles from the acquired barrage set of the preset video.
8. A bullet screen processing apparatus, comprising:
the bullet screen obtaining module is used for obtaining a bullet screen aiming at the video file;
the caption sentence selection module is used for selecting a first caption sentence with the highest matching degree with the bullet screen content from a preset caption set of the video file; the preset subtitle set comprises a plurality of subtitle sentences;
the chatting sentence selecting module is used for respectively calculating first matching degrees of a plurality of chatting sentences contained in a preset chatting set and the barrage, and selecting a target chatting sentence with the highest first matching degree from the plurality of chatting sentences;
the first bullet screen display module is used for determining the display time corresponding to the first caption sentence as the display time of the bullet screen when the first matching degree of the first caption sentence is greater than a first preset screening threshold and is greater than the first matching degree of the target chatting sentence; the first matching degree of the first caption sentence is the first matching degree of the first caption sentence and the bullet screen, and the display time corresponding to the first caption sentence is as follows: a time at which the first caption statement is displayed in the video file.
9. The apparatus of claim 8,
the caption sentence selection module is specifically used for taking the bullet screen as retrieval content and retrieving N caption sentences from a preset caption set of the video file;
and respectively calculating first matching degrees of the N subtitle sentences and the bullet screen, and selecting a first subtitle sentence with the highest first matching degree from the N subtitle sentences.
10. The apparatus of claim 9,
the caption sentence selecting module is specifically configured to calculate first matching degrees of the N caption sentences and the bullet screen respectively by using a fuzzy matching algorithm, and select a first caption sentence with a highest first matching degree from the N caption sentences;
the chatting sentence selecting module is specifically configured to calculate first matching degrees of a plurality of chatting sentences contained in a preset chatting set and the barrage by using a fuzzy matching algorithm, and select a target chatting sentence with a highest first matching degree from the plurality of chatting sentences.
11. The apparatus of claim 10, further comprising:
the second bullet screen display module is used for adopting a vector space model algorithm to respectively calculate second matching degrees of the N character screen sentences and the bullet screen when preset conditions are met, and selecting second caption sentences with the highest second matching degree from the N character screen sentences;
respectively calculating third matching degrees of the N subtitle sentences and the bullet screen by adopting a BM25 probabilistic model algorithm, and selecting a third subtitle sentence with the highest third matching degree from the N subtitle sentences;
when the second matching degree of the second caption sentence is greater than the third matching degree of the third caption sentence, determining the display time corresponding to the second caption sentence as the display time of the bullet screen; otherwise, determining the display time corresponding to the third caption sentence as the display time of the bullet screen;
wherein the predetermined condition includes: the first matching degree of the first caption sentence is smaller than a first preset screening threshold, and the first matching degree of the target chat sentence is smaller than a second preset screening threshold;
or the first matching degree of the first caption sentence is smaller than a first preset screening threshold, and the first matching degree of the target chatting sentence is smaller than the first matching degree of the first caption sentence;
or when the first matching degree of the first caption statement is smaller than the first matching degree of the target chatting statement, and the first matching degree of the target chatting statement is smaller than a second preset screening threshold.
12. The apparatus according to any one of claims 9 to 11, wherein the caption sentence selection module is specifically configured to retrieve N caption sentences from a preset caption set of the video file by using a Lucene search engine with the bullet screens as retrieval content.
13. A bullet screen processing apparatus, comprising:
the subtitle detection module is used for detecting whether subtitles appear in a current video playing picture when a preset video is played;
the target bullet screen acquisition module is used for acquiring a target bullet screen corresponding to the caption from the acquired bullet screen set of the preset video if the caption appears in the current video playing picture, wherein the caption and the target bullet screen have an association relation in content;
the target bullet screen display module is used for displaying the target bullet screen in the current video playing picture;
wherein the incidence relation is established in the following way: selecting a subtitle with the highest matching degree with the target bullet screen content from a preset subtitle set of the video file; the preset subtitle set comprises a plurality of subtitles; respectively calculating first matching degrees of a plurality of chatting sentences contained in a preset chatting set and the target barrage, and selecting a target chatting sentence with the highest first matching degree from the plurality of chatting sentences; when the first matching degree of the subtitle is greater than a first preset screening threshold and is greater than the first matching degree of the target chatting sentence, determining the display time corresponding to the subtitle as the display time of the target barrage; the first matching degree of the subtitles is the first matching degree of the subtitles and the target barrage, and the display time corresponding to the subtitles is as follows: the time at which the subtitles are displayed in the video file.
14. The apparatus of claim 13, wherein:
the target bullet screen obtaining module is specifically configured to obtain a target bullet screen corresponding to the subtitle from the obtained bullet screen set of the preset video with the subtitle as a retrieval content.
15. An electronic device, characterized in that: the electronic equipment comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory finish mutual communication through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 7 when executing a program stored in the memory.
CN201910698945.8A 2019-07-31 2019-07-31 Bullet screen processing method and device and electronic equipment Active CN110430448B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910698945.8A CN110430448B (en) 2019-07-31 2019-07-31 Bullet screen processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910698945.8A CN110430448B (en) 2019-07-31 2019-07-31 Bullet screen processing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN110430448A CN110430448A (en) 2019-11-08
CN110430448B true CN110430448B (en) 2021-09-03

Family

ID=68411643

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910698945.8A Active CN110430448B (en) 2019-07-31 2019-07-31 Bullet screen processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN110430448B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542843B (en) * 2021-07-19 2022-09-30 北京奇艺世纪科技有限公司 Target bullet screen display method and device, electronic equipment and storage medium
CN113688283B (en) * 2021-08-27 2023-09-05 北京奇艺世纪科技有限公司 Method and device for determining video subtitle matching degree and electronic equipment
CN115103212B (en) * 2022-06-10 2023-09-05 咪咕文化科技有限公司 Bullet screen display method, bullet screen processing device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015195866A1 (en) * 2014-06-19 2015-12-23 Alibaba Group Holding Limited Managing interactive subtitle data
CN107480123A (en) * 2017-06-28 2017-12-15 武汉斗鱼网络科技有限公司 A kind of recognition methods, device and the computer equipment of rubbish barrage
CN108924658A (en) * 2018-06-05 2018-11-30 上海哔哩哔哩科技有限公司 Barrage association-feeding method, device and computer readable storage medium
CN109213988A (en) * 2017-06-29 2019-01-15 武汉斗鱼网络科技有限公司 Barrage subject distillation method, medium, equipment and system based on N-gram model
CN109729436A (en) * 2017-10-31 2019-05-07 腾讯科技(深圳)有限公司 Advertisement barrage treating method and apparatus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105898509A (en) * 2015-11-26 2016-08-24 乐视网信息技术(北京)股份有限公司 Video playing interaction method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015195866A1 (en) * 2014-06-19 2015-12-23 Alibaba Group Holding Limited Managing interactive subtitle data
CN107480123A (en) * 2017-06-28 2017-12-15 武汉斗鱼网络科技有限公司 A kind of recognition methods, device and the computer equipment of rubbish barrage
CN109213988A (en) * 2017-06-29 2019-01-15 武汉斗鱼网络科技有限公司 Barrage subject distillation method, medium, equipment and system based on N-gram model
CN109729436A (en) * 2017-10-31 2019-05-07 腾讯科技(深圳)有限公司 Advertisement barrage treating method and apparatus
CN108924658A (en) * 2018-06-05 2018-11-30 上海哔哩哔哩科技有限公司 Barrage association-feeding method, device and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
视频弹幕的特征和使用动机分析;张亚雪;《新闻世界》;20190419;全文 *

Also Published As

Publication number Publication date
CN110430448A (en) 2019-11-08

Similar Documents

Publication Publication Date Title
US9008489B2 (en) Keyword-tagging of scenes of interest within video content
CN106331778B (en) Video recommendation method and device
CN109819284B (en) Short video recommendation method and device, computer equipment and storage medium
CN109558513B (en) Content recommendation method, device, terminal and storage medium
CN107992585B (en) Universal label mining method, device, server and medium
KR102212355B1 (en) Identification and presentation of internet-accessible content associated with currently playing television programs
US11176453B2 (en) System and method for detangling of interleaved conversations in communication platforms
US8620906B2 (en) Detecting competitive product reviews
US10878044B2 (en) System and method for providing content recommendation service
CN110430448B (en) Bullet screen processing method and device and electronic equipment
CN111259271A (en) Comment information display method and device, electronic equipment and computer readable medium
CN107526846B (en) Method, device, server and medium for generating and sorting channel sorting model
CN108920649B (en) Information recommendation method, device, equipment and medium
CN111107416B (en) Bullet screen shielding method and device and electronic equipment
CN109271509B (en) Live broadcast room topic generation method and device, computer equipment and storage medium
JP5884740B2 (en) Time-series document summarization apparatus, time-series document summarization method, and time-series document summarization program
CN109815482B (en) News interaction method, device, equipment and computer storage medium
CN110674345A (en) Video searching method and device and server
CN110019948B (en) Method and apparatus for outputting information
CN110737824B (en) Content query method and device
CN107566906A (en) A kind of video comments processing method and processing device
CN112631437A (en) Information recommendation method and device and electronic equipment
US11294964B2 (en) Method and system for searching new media information
CN113407775B (en) Video searching method and device and electronic equipment
CN110263318B (en) Entity name processing method and device, computer readable medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant