A kind of have barrage sending method and the device deleting protection mechanism
Technical field
The invention belongs to field of computer technology, send more particularly, to a kind of barrage with deletion protection mechanism
Method and device.
Background technology
The at present transmission of barrage, is usually and sends according to the time of transmission order from morning to night, do not carry out barrage content
Select, it sometimes appear that the problem that " junk information " too much affects video perception.But directly delete barrage, it is likely to result in big
Amount barrage sends to be lost, the problem reducing sender's enjoyment.
Summary of the invention
For disadvantages described above or the Improvement requirement of prior art, the invention provides a kind of barrage deleting protection mechanism and send out
Delivery method, its object is to, in the case of barrage traffic volume is too much, selectively delete barrage, it is ensured that video perception and barrage
Sending enjoyment, thus solving existing barrage sending method affects perception or the technical problem of barrage transmission enjoyment.
For achieving the above object, according to one aspect of the present invention, it is provided that a kind of have the barrage deleting protection mechanism
Sending method, comprises the following steps:
(1) barrage screening: barrage to be sent is divided into high-quality barrage and common barrage;
(2) barrage protection mechanism is started: when video barrage quantity exceedes default barrage capacity threshold and video temperature is low
When default video heat degree threshold, start barrage protection mechanism;
(3) barrage protection is carried out: after starting barrage protection mechanism, delete described common barrage, until video barrage number
Amount is less than the barrage capacity threshold preset.
Preferably, described in have delete protection mechanism barrage sending method, length is specifically exceeded default by its step (1)
Buddhist read threshold value barrage as high-quality barrage, other barrages are as common barrage.
Preferably, there is the barrage sending method deleting protection mechanism, when its described barrage capacity threshold is unit described in
In the bar number of barrage to greatest extent that can accommodate of described video, according to video duration the longest barrage capacity threshold the biggest and
The rule that video code rate the highest barrage capacity threshold is the biggest determines.
Preferably, described in have delete protection mechanism barrage sending method, its step (2) described video temperature, refer to
The click volume of described video in unit interval.
Preferably, described in have delete protection mechanism barrage sending method, its step (3) according to barrage send the time from
Early order or barrage number of words order from less to more to evening delete common barrage.
A kind of barrage dispensing device with deletion protection mechanism is provided according to another aspect of the present invention, including:
Screening module, for being divided into high-quality barrage and common barrage by barrage to be sent;
Guard mode handover module, for exceeding default barrage capacity threshold and video temperature less than pre-when video barrage
If video heat degree threshold time so that described video is in barrage guard mode;
Barrage protection module, under described video is in barrage guard mode, according to the selection result of screening module,
Delete the common barrage of described video until barrage quantity is less than barrage capacity threshold.
Preferably, described in have delete protection mechanism barrage dispensing device, its described high-quality barrage be barrage length surpass
Cross the barrage of the length threshold preset.
Preferably, there is the barrage dispensing device deleting protection mechanism, when its described barrage capacity threshold is unit described in
In the bar number of barrage to greatest extent that can accommodate of described video, according to persistent period the longest barrage capacity threshold is the biggest and video
The rule that code check the highest barrage capacity threshold is the biggest determines.
Preferably, described in have delete protection mechanism barrage dispensing device, its described video temperature, refer to the unit interval
The click volume of interior described video.
Preferably, described in have delete protection mechanism barrage dispensing device, its described barrage protection module according to transmission
Time is from morning to night or barrage number of words principle from less to more deletes barrage.
In general, by the contemplated above technical scheme of the present invention compared with prior art, it is possible to show under acquirement
Benefit effect:
The method and device that the present invention provides, can maintain barrage quantity to exist according to attributes such as the persistent period of video, code checks
Zone of reasonableness, it is ensured that spectators' perception, is not affected Consumer's Experience by a large amount of rubbish barrages.Meanwhile, barrage is carried out selectively removing,
The transmission enjoyment of normal barrage is ensured while filtering spam barrage.
Accompanying drawing explanation
Fig. 1 is the flow chart that the present invention provides method;
Fig. 2 is the structural representation that the present invention provides device.
Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, right
The present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, and
It is not used in the restriction present invention.If additionally, technical characteristic involved in each embodiment of invention described below
The conflict of not constituting each other just can be mutually combined.
The barrage sending method with protection mechanism that the present invention provides, as it is shown in figure 1, comprise the following steps:
(1) barrage screening: barrage to be sent is divided into high-quality barrage and common barrage;Preferably length is exceeded default length
The barrage of degree threshold value is as high-quality barrage, and other barrages are as common barrage.
The present invention assert, longer barrage comprises relatively multi information, as high-quality barrage, it is ensured that send, it is to avoid be deleted.Example
As set, barrage length is high-quality barrage more than the barrage of 15 characters, is common less than or equal to the barrage of 15 characters
Barrage, not protection.
(2) barrage protection mechanism is started: when video barrage quantity exceedes default barrage capacity threshold and video temperature is low
When default video heat degree threshold, start barrage protection mechanism;
Described barrage capacity threshold, the bar number of barrage to greatest extent that in referring to the unit interval, described video can accommodate, root
Determine according to video duration, video code rate, according to video duration the longest barrage capacity threshold is the biggest and video code rate more
The rule that high barrage capacity threshold is the biggest determines barrage capacity threshold.
Described video temperature, the click volume of described video in referring to the unit interval.
(3) barrage protection is carried out: after starting barrage protection mechanism, delete described common barrage, until video barrage number
Amount is less than barrage capacity threshold.
Deletion order can send time order from morning to night according to barrage, it is possible to according to barrage number of words from less to more suitable
Sequence.
The barrage dispensing device with protection mechanism that the present invention provides, including:
Screening module, for being divided into high-quality barrage and common barrage by barrage to be sent according to length;Described high-quality barrage
The barrage of default length threshold is exceeded for barrage length.
Guard mode handover module, for exceeding default barrage capacity threshold and video temperature less than pre-when video barrage
If video heat degree threshold time so that described video is in barrage guard mode;
Described barrage capacity threshold, the bar number of barrage to greatest extent that in referring to the unit interval, described video can accommodate, root
Determine according to video duration, video code rate, according to persistent period the longest barrage capacity threshold is the biggest and video code rate is the most high-elastic
The rule that curtain capacity threshold is the biggest determines barrage capacity threshold.
Barrage protection module, under described video is in barrage guard mode, according to the selection result of screening module,
Delete the common barrage of described video until barrage quantity is less than barrage capacity threshold.
According to the time of transmission, from morning to night or barrage number of words principle from less to more deletes bullet to described barrage protection module
Curtain.
It is below embodiment:
Embodiment 1
(1) barrage to be sent is divided into high-quality barrage and common barrage according to length;
The present invention assert, longer barrage comprises relatively multi information, as high-quality barrage, it is ensured that send, it is to avoid be deleted.
Checking barrage length, barrage length is high-quality barrage more than the barrage of 15 characters, less than or equal to 15 characters
Barrage be common barrage, not protection.
(2) judge whether to start barrage protection mechanism: when video barrage quantity exceedes default barrage capacity threshold and regards
Frequently, when temperature is less than the video heat degree threshold preset, barrage protection mechanism is started;
The present embodiment, for the video that code check is 560,720, barrage capacity be respectively set to 1800/10 minutes and
/ 10 minute article 2000,.
Described default video heat degree threshold is 10,000 times/month.
(3) barrage protection is carried out: after starting barrage protection mechanism, delete described common barrage, until video barrage number
Amount is less than barrage capacity threshold.
Deletion order, sends time order from morning to night according to barrage.
The method object lesson provided according to the present embodiment is as follows: do not surpass for player length ten minutes, video barrage
Go out barrage capacity threshold, barrage opens barrage protection and single month number of clicks video less than 10,000 times, does not delete barrage;Play
Device length ten minutes, video barrage transfinite, barrage is opened unprotected and single month number of clicks of barrage and is less than 10,000 times, delete and send
Time common barrage the earliest, until barrage quantity is less than barrage capacity threshold.
Embodiment 2
Screening module, for being divided into high-quality barrage and common barrage by barrage to be sent according to length;Screening module is by bullet
Curtain length more than the barrage of 15 characters as high-quality barrage, less than or equal to the barrage of 15 characters as common barrage, no
Give protection.
Guard mode handover module, for exceeding default barrage capacity threshold and video temperature less than pre-when video barrage
If video heat degree threshold time so that described video is in barrage guard mode;
The present embodiment, for the video that code check is 560,720, barrage capacity be respectively set to 1800/10 minutes and
/ 10 minute article 2000,;Described default video heat degree threshold is 10,000 times/month.
Barrage protection module, under described video is in barrage guard mode, according to the selection result of screening module,
Delete the common barrage of described video until barrage quantity is less than barrage capacity threshold.
Described barrage protection module deletes barrage according to the time of transmission principle from morning to night.
As it will be easily appreciated by one skilled in the art that and the foregoing is only presently preferred embodiments of the present invention, not in order to
Limit the present invention, all any amendment, equivalent and improvement etc. made within the spirit and principles in the present invention, all should comprise
Within protection scope of the present invention.