CN107241635A - A kind of method and device of barrage position switching - Google Patents
A kind of method and device of barrage position switching Download PDFInfo
- Publication number
- CN107241635A CN107241635A CN201710267261.3A CN201710267261A CN107241635A CN 107241635 A CN107241635 A CN 107241635A CN 201710267261 A CN201710267261 A CN 201710267261A CN 107241635 A CN107241635 A CN 107241635A
- Authority
- CN
- China
- Prior art keywords
- random number
- barrage
- screen
- array
- position information
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 36
- 230000006870 function Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 230000004087 circulation Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 239000011800 void material Substances 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000004321 preservation Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
- H04N21/4312—Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
- H04N21/4314—Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations for fitting data in a restricted space on the screen, e.g. EPG data in a rectangular grid
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/44004—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video buffer management, e.g. video decoder buffer or video display buffer
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/488—Data services, e.g. news ticker
- H04N21/4884—Data services, e.g. news ticker for displaying subtitles
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the invention discloses a kind of method and device of barrage position switching.Present invention method includes:The first instruction of barrage switching is obtained, first instruction includes the first position information after barrage position adjustment;According to first position information, corresponding first random number of generation first position information, and the first random number is stored in default array;Obtain the barrage information currently inputted;The first random number is obtained from array, the barrage information currently inputted is shown according to the first random number.The position that user can be allowed to set barrage to show at any time in the embodiment of the present invention, can be while allowing user to obtain more video views and admires experience when experiencing the enjoyment that barrage is brought, simultaneously by way of array is enumerated save location information, equipment can be allowed to obtain barrage configuration information faster, and then shown by barrage setting.
Description
Technical field
The present invention relates to Internet technical field, more particularly to a kind of method and device of barrage position switching.
Background technology
When watching video, user can be made comments in the way of barrage, and barrage is exactly to make comment on screen from one
End floats towards the other end, and when a large amount of comments are sailed from screen, picture effect is similar in the barrage in flight shooting game, screen
Barrage be mainly the message of captions form, the word of message is directly overlayed on the screen of movie playback.
Due to carrying out may having a large amount of captions to be superimposed with video film during barrage, this mode influences to watch the effect of video
Really, for the problem of barrage mode influences video appreciation effect in the prior art, effective solution is not yet proposed at present.
The content of the invention
The embodiments of the invention provide a kind of method and device of barrage position switching, it is to avoid barrage block screen or
Barrage shows the situation that user views and admires custom that do not meet, and improves Consumer's Experience.
In a first aspect, this application provides a kind of method of barrage position switching, this method includes:
The first instruction of barrage switching is obtained, first instruction includes the letter of the first position after barrage position adjustment
Breath;
According to the first position information, corresponding first random number of the first position information is generated, and by described the
One random number is stored in default array;
Obtain the barrage information currently inputted;
First random number is obtained from the array, the first barrage after adjustment is determined according to first random number
Position, and the barrage information currently inputted is shown in the first barrage position.
Further, it is described first random number is stored in default array before, methods described also includes:
The array is created, is the array storage allocation;
The maximum capacity of storage random number is set for the array;
The maximum of storage random number quantity is set for the array.
Further, methods described also includes:
When random number is stored in the array, the random number number of times stored in the array is recorded, often described
A random number is stored in array, then the storage random number quantity is added 1, until reaching the storage random number quantity most
Untill big value, the storage random number quantity initial value is 0;
When random number is stored in the array, if the random number stored in the array reaches that the storage is random
During several maximum capacity, the random number preserved at first in the array is deleted.
Further, the first position information be bottom of screen, in the middle of screen, the top of screen or screen it is full frame, it is described
According to the first position information, corresponding first random number of the first position information is generated, including:
If the first position information is that screen is full frame, according to the first position information, the first position letter is generated
Cease corresponding first random number, the span of first random number is from 0 to screen full-height;
If the first position information is in the middle of screen, according to the first position information, the first position letter is generated
Corresponding first random number is ceased, the span of first random number arrives the 3/4 of screen height for the 1/4 of screen height;
If the first position information is the top of screen, according to the first position information, the first position letter is generated
Cease corresponding first random number, the span of first random number is from the 3/4 of screen height to screen full-height;
If the first position information is bottom of screen, according to the first position information, the first position letter is generated
Corresponding first random number is ceased, the span of first random number is from 0 to the 1/4 of screen height.
Further, methods described also includes:
The second instruction of barrage switching is obtained, second instruction includes the second confidence after barrage position adjustment
Breath, second place information is bottom of screen, in the middle of screen, the top of screen or screen it is full frame;
According to the second place information, corresponding second random number of the second place information is generated, and by described the
Two random numbers are stored in the array;
Obtain the barrage information currently inputted;
Second random number is obtained from the array, the second barrage after adjustment is determined according to second random number
Position, and the barrage information currently inputted is shown in the second barrage position.
Second aspect, the application provides a kind of device of barrage position switching, and the device includes:
First acquisition unit, the first instruction for obtaining barrage switching, first instruction includes barrage position tune
First position information after whole;
Generation unit, it is corresponding first random for according to the first position information, generating the first position information
Number, and first random number is stored in default array;
Second acquisition unit, the barrage information currently inputted for obtaining;
Barrage display unit, it is true according to first random number for obtaining first random number from the array
Set the tone it is whole after the first barrage position, and the barrage information currently inputted is shown in the first barrage position.
Further, described device also includes creating unit, and the creating unit is used for:
It is described first random number is stored in default array before, create the array, be the array
Storage allocation;
The maximum capacity of storage random number is set for the array;
The maximum of storage random number quantity is set for the array.
Further, described device also includes:
Recording unit, for when random number is stored in the array, recording the random number stored in the array
Number of times, often stores a random number in the array, then adds 1 by the storage random number quantity, until reaching the storage
Untill the maximum of random number quantity, the storage random number quantity initial value is 0;
Unit is deleted, for when random number is stored in the array, if the random number stored in the array reaches
To the storage random number maximum capacity when, delete the random number preserved at first in the array.
Further, the first position information be bottom of screen, in the middle of screen, the top of screen or screen it is full frame, it is described
Generation unit specifically for:
If the first position information is that screen is full frame, according to the first position information, the first position letter is generated
Cease corresponding first random number, the span of first random number is from 0 to screen full-height;
If the first position information is in the middle of screen, according to the first position information, the first position letter is generated
Corresponding first random number is ceased, the span of first random number arrives the 3/4 of screen height for the 1/4 of screen height;
If the first position information is the top of screen, according to the first position information, the first position letter is generated
Cease corresponding first random number, the span of first random number is from the 3/4 of screen height to screen full-height;
If the first position information is bottom of screen, according to the first position information, the first position letter is generated
Corresponding first random number is ceased, the span of first random number is from 0 to the 1/4 of screen height.
Further, the first acquisition unit is additionally operable to obtain the second instruction of barrage switching, in second instruction
Including the second place information after barrage position adjustment, the second place information is bottom of screen, in the middle of screen, the top of screen
Or screen is full frame;
The generation unit is additionally operable to, according to the second place information, generate the second place information corresponding second
Random number, and second random number is stored in the array;
The second acquisition unit is additionally operable to obtain the barrage information currently inputted;
The barrage display unit is additionally operable to obtain second random number from the array, random according to described second
Number determines the second barrage position after adjustment, and the barrage information currently inputted is shown in the second barrage position.
The embodiment of the present invention is by obtaining the first instruction that barrage switches, and first instruction is included after barrage position adjustment
First position information;According to first position information, corresponding first random number of first position information is generated, and it is random by first
Number is stored in default array;Obtain the barrage information currently inputted;The first random number is obtained from array, according to first with
Machine number is shown to the barrage information currently inputted.The position that user can be allowed to set barrage to show at any time in the embodiment of the present invention
Put, can be while allowing user to obtain more video views and admires experience, while passing through array piece when experiencing the enjoyment that barrage is brought
The mode save location information of act, can allow equipment to obtain barrage configuration information faster, and then shown by barrage setting.
Brief description of the drawings
Fig. 1 is one embodiment schematic diagram of the method for barrage position switching in the embodiment of the present invention;
Fig. 2 is another embodiment signal for the device that barrage position switches in the embodiment of the present invention on the basis of Fig. 1
Figure;
Fig. 3 is another embodiment signal for the device that barrage position switches in the embodiment of the present invention on the basis of Fig. 2
Figure;
Fig. 4 is one embodiment schematic diagram of the device of barrage position switching in the embodiment of the present invention;
Fig. 5 is one embodiment schematic diagram of the device of barrage position switching in the embodiment of the present invention;
Fig. 6 is one embodiment schematic diagram of the device of barrage position switching in the embodiment of the present invention.
Embodiment
In order that those skilled in the art more fully understand the present invention program, below in conjunction with the embodiment of the present invention
Accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, rather than whole embodiments.Based on the embodiment in the present invention, ordinary skill people
The every other embodiment that member is obtained under the premise of creative work is not made, should all belong to the model that the present invention is protected
Enclose.
The (if present)s such as term " first ", " second " in description and claims of this specification and above-mentioned accompanying drawing
It is for distinguishing similar object, without for describing specific order or precedence.It should be appreciated that the number so used
According to can exchange in the appropriate case, so as to the embodiments described herein can with except the content for illustrating or describing herein with
Outer order is implemented.In addition, term " comprising " and " having " and their any deformation, it is intended that the non-exclusive bag of covering
Contain, for example, the process, method, system, product or the equipment that contain series of steps or unit are not necessarily limited to what is clearly listed
Those steps or unit, but may include not listing clearly or intrinsic for these processes, method, product or equipment
Other steps or unit.
The method that barrage position switches in the embodiment of the present invention is applied to the device that barrage position switches, and the device, which is located at, to be moved
In dynamic terminal, the mobile terminal can be the intelligent mobile terminals such as mobile phone, tablet personal computer or the following mobile end occurred
End, such as virtual display device, enhancing display device, mixed reality device.
Referring to Fig. 1, method one embodiment that barrage position switches in the embodiment of the present invention includes:
S11, the first instruction for obtaining barrage switching;
In the present embodiment, first instruction includes the first position information after barrage position adjustment.
S12, according to first position information, corresponding first random number of generation first position information, and by the first random number
It is stored in default array;
The barrage information that S13, acquisition are currently inputted;
S14, the first random number is obtained from array, the first barrage position after adjustment is determined according to the first random number, and
The barrage information currently inputted is shown in the first barrage position.
The embodiment of the present invention is by obtaining the first instruction that barrage switches, and first instruction is included after barrage position adjustment
First position information;According to first position information, corresponding first random number of first position information is generated, and it is random by first
Number is stored in default array;Obtain the barrage information currently inputted;The first random number is obtained from array, according to first with
Machine number is shown to the barrage information currently inputted.The position that user can be allowed to set barrage to show at any time in the embodiment of the present invention
Put, can be while allowing user to obtain more video views and admires experience, while passing through array piece when experiencing the enjoyment that barrage is brought
The mode save location information of act, can allow equipment to obtain barrage configuration information faster, and then shown by barrage setting.
In the embodiment of the present invention, when user uses play video for the first time, using the barrage positional information of acquiescence, in screen
Curtain lower section can set the button or option that barrage switches, and clicking on ejection barrage position selection menu can select for user
Barrage display location is selected, now obtaining the first instruction of barrage switching can be:Obtain user click on or option finger
Order, ejection barrage position selection menu, the barrage selection location menu includes at least two barrage positional informations;Obtain and use
The first position information that family is selected at least two barrages positional information, the first instruction of generation barrage switching.
In addition, multiple buttons can be equally set below screen, one barrage positional information of each button correspondence, for
Barrage position is selected, for example, the first button indication barrage is shown in " bottom of screen ", the second button indication barrage and shown on screen
" screen is full frame ", the 4th button indication barrage, which are shown in, in " the top of screen ", the 3rd button indication barrage is shown in " screen a left side
Side ", the 5th button indication barrage are shown in " on the right side of screen " etc..Now obtaining the first instruction of barrage switching can be:If obtaining
The instruction that the target button on screen is clicked at family is taken, the first of generation barrage switching instructs, wherein, the corresponding bullet of the target button
Curtain positional information is above-mentioned first position information.
Further, as shown in Fig. 2 it is described first random number is stored in default array before, it is described
Method also includes:
S21, the array is created, for the array storage allocation;
S22, the maximum capacity for array setting storage random number;
S23, the maximum for array setting storage random number quantity.
Specifically, in the embodiment of the present invention, function [[NSMutableArray alloc] can be used
initWithCapacity:KDYLayerMaxNum] array is created, wherein kDYLayerMaxNum is the storage of this array
The maximum of random number quantity, [NSMutableArray alloc] is to create array, is the process of array storage allocation,
InitWithCapacity is meant that the array for establishment sets storage random number maximum capacity.
The mode that above-mentioned preservation first is counted in array at random can be the definition using array enumerated value, for example:
LOCATION_TOP=0 represents the top of screen, and LOCATION_BOTTOM represents bottom of screen, and LOCATION_FULL represents screen
Full frame, the initial value of barrage information default can be that screen is full frame, if given tacit consent to when that is, user does not change barrage position
Exactly it is displayed in full screen barrage.
User can oneself manual modification barrage display location, user can select barrage by the button of above-mentioned setting
Display position, call function-(void) changePositon when user selects some button:
(DMLocation) positionType, this function return value is void, i.e., no return value, and the title of this function is
changePositon:, the parameter of this function is positionType, and positionType parameter type is
DMLocation, DMLocation are an enumeration types, that is, foregoing description enumerated value.
In some embodiments of the invention, as shown in figure 3, methods described can also include:
S31, when random number is stored in the array, the random number number of times stored in the array is recorded, often at this
A random number is stored in array, then storage random number quantity is added 1, until the maximum for reaching storage random number quantity is
Only;
Wherein, the storage random number quantity initial value is 0;
S32, when random number is stored in the array, if the random number stored in the array reaches that the storage is random
During several maximum capacity, the random number preserved at first in the array is deleted.
Specifically, when random number is stored in the array, recording the random number number of times stored in the array, often
A random number is stored in the array, then the storage random number quantity is added 1, until reaching the storage random number number
Untill the maximum of amount, the storage random number quantity initial value can be for 0:Use function for (int i=0;i<
kDYLayerMaxNum;I++ a for circulation) is created, wherein i is the initial value of this for circulations, kDYLayerMaxNum
It is also now the number of times that this for circulates most circulations, i++ is often to hold for the maximum of the storage random number quantity of array
Value can increase by 1 after for that gone is circulated.
In the embodiment of the present invention, barrage positional information can be bottom of screen, in the middle of screen, the top of screen or screen it is complete
On the left of screen or screen, on the right side of screen etc..Now first position information can also be bottom of screen, in the middle of screen, screen
Top or screen are full frame, or on the left of screen, on the right side of screen etc..Wherein the top of screen, bottom of screen, in the middle of screen by screen
It is divided into three parts in vertical direction, it is screen that such as the top of screen arrives screen full-height, or the top of screen for the 3/4 of screen height
Screen full-height is arrived in the 2/3 of curtain height, or screen full-height etc. is arrived in curtain top for the 4/5 of screen height, likewise, screen bottom
Portion can also be that 0 (using vertical direction screen height lowest part as height 0) arrives the 1/5 of screen height, or bottom of screen arrives for 0
The 1/3 of screen height, or it is except bottom of screen and the top of screen in the middle of 0 to 1/5 etc. of screen height, screen that curtain bottom, which is,
Other regions.Can be that 0 (using at the horizontal direction screen leftmost side as width 0) arrives the 1/4,1/ of screen width on the left of other screen
3 or 1/5 etc., can be on the right side of screen, 3/4,2/3 or 4/5 etc. of screen width.
When first position information be bottom of screen, in the middle of screen, the top of screen or during full frame screen, it is described according to described the
One positional information, generates corresponding first random number of the first position information, including:
If the first position information is that screen is full frame, according to the first position information, the first position letter is generated
Cease corresponding first random number, the span of first random number is from 0 to screen full-height;
If the first position information is in the middle of screen, according to the first position information, the first position letter is generated
Corresponding first random number is ceased, the span of first random number arrives the 3/4 of screen height for the 1/4 of screen height;
If the first position information is the top of screen, according to the first position information, the first position letter is generated
Cease corresponding first random number, the span of first random number is from the 3/4 of screen height to screen full-height;
If the first position information is bottom of screen, according to the first position information, the first position letter is generated
Corresponding first random number is ceased, the span of first random number is from 0 to the 1/4 of screen height.
In embodiments of the present invention, method in barrage positional information, the i.e. embodiment of the present invention can also be subsequently adjusted at any time
It can also include:
The second instruction of barrage switching is obtained, second instruction includes the second confidence after barrage position adjustment
Breath, second place information is bottom of screen, in the middle of screen, the top of screen or screen it is full frame;
According to the second place information, corresponding second random number of the second place information is generated, and by described the
Two random numbers are stored in the array;
Obtain the barrage information currently inputted;
Second random number is obtained from the array, the second barrage after adjustment is determined according to second random number
Position, and the barrage information currently inputted is shown in the second barrage position.
In addition, can be all used as the barrage that user sends by server in relay centre, therefore the embodiment of the present invention
The long communication mode connected can be used barrage information active push into mobile terminal of the embodiment of the present invention.
In the embodiment of the present invention, carrying out display to the barrage information currently inputted in the first barrage position can be:
The barrage information currently inputted is converted into preset model;
A figure layer is created, the preset model of barrage information is added in the figure layer;
The preset model of barrage information is shown in the first barrage position.
Specifically, being parsed for the barrage information that push comes and being converted into model, it can be included in these models
Some information, the display content of barrage, the color of barrage, unique beacon information of barrage, the download for the picture that barrage is included
Location information etc.
A figure layer is created, the height of this figure layer is according to the content change of barrage, and barrage content can be fixed value less,
The generally equivalent to height of a line word, width is calculated according to barrage content, and the position level of barrage is from 0 slow increase
To the width of screen, the coordinate value of the vertical direction of barrage takes the first random number from above-mentioned array, often takes out a random number,
This value taken out is removed in above-mentioned array.
First position information is added for the figure layer of establishment, then this figure layer is added on screen, wherein the water of barrage
Flat position is the width from 0 to screen, and the instruction that the Y value of barrage switches according to barrage generates the Vertical Square of a positional information
To random number (the first random number), and the first random number is saved in a number class mean to obtain, is so achieved that
The effect of one barrage position switching.
The embodiment of the device that barrage position switches in the embodiment of the present invention is described below.
Referring to Fig. 4, one embodiment schematic diagram of the device switched for barrage position in the embodiment of the present invention, the device
Including:
First acquisition unit 401, the first instruction for obtaining barrage switching, first instruction includes barrage position
First position information after adjustment;
Generation unit 402, for according to the first position information, generate the first position information corresponding first with
Machine number, and first random number is stored in default array;
Second acquisition unit 403, the barrage information currently inputted for obtaining;
Barrage display unit 404, for obtaining first random number from the array, according to first random number
It is determined that the first barrage position after adjustment, and the barrage information currently inputted is shown in the first barrage position.
Further, as shown in figure 5, described device also includes creating unit 405, the creating unit is used for:
It is described first random number is stored in default array before, create the array, be the array
Storage allocation;
The maximum capacity of storage random number is set for the array;
The maximum of storage random number quantity is set for the array.
Further, as shown in fig. 6, described device also includes:
Recording unit 406, what is stored for when random number is stored in the array, recording in the array is random
Count for several times, a random number is often stored in the array, then the storage random number quantity is added 1, until reaching described deposit
Untill the maximum for storing up random number quantity, the storage random number quantity initial value is 0;
Unit 407 is deleted, for when random number is stored in the array, if the random number stored in the array
When reaching the maximum capacity of the storage random number, the random number preserved at first in the array is deleted.
Further, the first position information be bottom of screen, in the middle of screen, the top of screen or screen it is full frame;
The generation unit 402 specifically for:
If the first position information is that screen is full frame, according to the first position information, the first position letter is generated
Cease corresponding first random number, the span of first random number is from 0 to screen full-height;
If the first position information is in the middle of screen, according to the first position information, the first position letter is generated
Corresponding first random number is ceased, the span of first random number arrives the 3/4 of screen height for the 1/4 of screen height;
If the first position information is the top of screen, according to the first position information, the first position letter is generated
Cease corresponding first random number, the span of first random number is from the 3/4 of screen height to screen full-height;
If the first position information is bottom of screen, according to the first position information, the first position letter is generated
Corresponding first random number is ceased, the span of first random number is from 0 to the 1/4 of screen height.
Further, the first acquisition unit 401 is additionally operable to obtain the second instruction of barrage switching, second instruction
Include the second place information after barrage position adjustment, the second place information is bottom of screen, in the middle of screen, screen top
Portion or screen are full frame;
The generation unit 402 is additionally operable to, according to the second place information, generate the second place information corresponding
Second random number, and second random number is stored in the array;
The second acquisition unit 403 is additionally operable to obtain the barrage information currently inputted;
The barrage display unit 404 is additionally operable to obtain second random number from the array, according to described second
Random number determines the second barrage position after adjustment, and the barrage information currently inputted is shown in the second barrage position
Show.
It is apparent to those skilled in the art that, for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, may be referred to the corresponding process in preceding method embodiment, will not be repeated here.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method can be with
Realize by another way.For example, device embodiment described above is only schematical, for example, the unit
Divide, only a kind of division of logic function there can be other dividing mode when actually realizing, such as multiple units or component
Another system can be combined or be desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or
The coupling each other discussed or direct-coupling or communication connection can be the indirect couplings of device or unit by some interfaces
Close or communicate to connect, can be electrical, machinery or other forms.
The unit illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit
The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs
's.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing unit, can also
That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list
Member can both be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
If the integrated unit is realized using in the form of SFU software functional unit and as independent production marketing or used
When, it can be stored in a computer read/write memory medium.Understood based on such, technical scheme is substantially
The part contributed in other words to prior art or all or part of the technical scheme can be in the form of software products
Embody, the computer software product is stored in a storage medium, including some instructions are to cause a computer
Equipment (can be personal computer, server, or network equipment etc.) performs the complete of each embodiment methods described of the invention
Portion or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey
The medium of sequence code.
Described above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to before
Embodiment is stated the present invention is described in detail, it will be understood by those within the art that:It still can be to preceding
State the technical scheme described in each embodiment to modify, or equivalent substitution is carried out to which part technical characteristic;And these
Modification is replaced, and the essence of appropriate technical solution is departed from the spirit and scope of various embodiments of the present invention technical scheme.
Claims (10)
1. a kind of method of barrage position switching, it is characterised in that methods described includes:
The first instruction of barrage switching is obtained, first instruction includes the first position information after barrage position adjustment;
According to the first position information, generate corresponding first random number of the first position information, and by described first with
Machine number is stored in default array;
Obtain the barrage information currently inputted;
First random number is obtained from the array, the first barrage position after adjustment is determined according to first random number
Put, and the barrage information currently inputted is shown in the first barrage position.
2. according to the method described in claim 1, it is characterised in that first random number is stored in into default number described
Before in group, methods described also includes:
The array is created, is the array storage allocation;
The maximum capacity of storage random number is set for the array;
The maximum of storage random number quantity is set for the array.
3. method according to claim 2, it is characterised in that methods described also includes:
When random number is stored in the array, the random number number of times stored in the array is recorded, often in the array
Random number of middle storage, then add 1 by the storage random number quantity, until reaching the maximum of the storage random number quantity
Untill, the storage random number quantity initial value is 0;
When random number is stored in the array, if the random number stored in the array reaches the storage random number
During maximum capacity, the random number preserved at first in the array is deleted.
4. according to the method described in claim 1, it is characterised in that the first position information is bottom of screen, in the middle of screen,
The top of screen or screen are full frame;
It is described that corresponding first random number of the first position information is generated according to the first position information, including:
If the first position information is that screen is full frame, according to the first position information, the first position information pair is generated
The first random number answered, the span of first random number is from 0 to screen full-height;
If the first position information is in the middle of screen, according to the first position information, the first position information pair is generated
The first random number answered, the span of first random number arrives the 3/4 of screen height for the 1/4 of screen height;
If the first position information is the top of screen, according to the first position information, the first position information pair is generated
The first random number answered, the span of first random number is from the 3/4 of screen height to screen full-height;
If the first position information is bottom of screen, according to the first position information, the first position information pair is generated
The first random number answered, the span of first random number is from 0 to the 1/4 of screen height.
5. according to the method described in claim 1, it is characterised in that methods described also includes:
The second instruction of barrage switching is obtained, second instruction includes the second place information after barrage position adjustment, institute
State second place information for bottom of screen, in the middle of screen, the top of screen or screen it is full frame;
According to the second place information, generate corresponding second random number of the second place information, and by described second with
Machine number is stored in the array;
Obtain the barrage information currently inputted;
Second random number is obtained from the array, the second barrage position after adjustment is determined according to second random number
Put, and the barrage information currently inputted is shown in the second barrage position.
6. a kind of device of barrage position switching, it is characterised in that described device includes:
First acquisition unit, the first instruction for obtaining barrage switching, first instruction is included after barrage position adjustment
First position information;
Generation unit, for according to the first position information, generating corresponding first random number of the first position information, and
First random number is stored in default array;
Second acquisition unit, the barrage information currently inputted for obtaining;
Barrage display unit, for obtaining first random number from the array, determines to adjust according to first random number
The first barrage position after whole, and the barrage information currently inputted is shown in the first barrage position.
7. device according to claim 6, it is characterised in that described device also includes creating unit, the creating unit
For:
It is described first random number is stored in default array before, create the array, be the array distribution
Internal memory;
The maximum capacity of storage random number is set for the array;
The maximum of storage random number quantity is set for the array.
8. device according to claim 7, it is characterised in that described device also includes:
Recording unit, for when random number is stored in the array, recording the random number number of times stored in the array,
A random number is often stored in the array, then the storage random number quantity is added 1, until reaching the storage random number
Untill the maximum of quantity, the storage random number quantity initial value is 0;
Unit is deleted, for when random number is stored in the array, if the random number stored in the array reaches institute
When stating the maximum capacity of storage random number, the random number preserved at first in the array is deleted.
9. device according to claim 6, it is characterised in that the first position information is bottom of screen, in the middle of screen,
The top of screen or screen are full frame;
The generation unit specifically for:
If the first position information is that screen is full frame, according to the first position information, the first position information pair is generated
The first random number answered, the span of first random number is from 0 to screen full-height;
If the first position information is in the middle of screen, according to the first position information, the first position information pair is generated
The first random number answered, the span of first random number arrives the 3/4 of screen height for the 1/4 of screen height;
If the first position information is the top of screen, according to the first position information, the first position information pair is generated
The first random number answered, the span of first random number is from the 3/4 of screen height to screen full-height;
If the first position information is bottom of screen, according to the first position information, the first position information pair is generated
The first random number answered, the span of first random number is from 0 to the 1/4 of screen height.
10. device according to claim 6, it is characterised in that
The first acquisition unit is additionally operable to obtain the second instruction of barrage switching, and second instruction includes barrage position tune
Second place information after whole, the second place information is bottom of screen, in the middle of screen, the top of screen or screen it is full frame;
The generation unit is additionally operable to according to the second place information, generates the second place information corresponding second random
Number, and second random number is stored in the array;
The second acquisition unit is additionally operable to obtain the barrage information currently inputted;
The barrage display unit is additionally operable to obtain second random number from the array, true according to second random number
Set the tone it is whole after the second barrage position, and the barrage information currently inputted is shown in the second barrage position.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710267261.3A CN107241635B (en) | 2017-04-21 | 2017-04-21 | Bullet screen position switching method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710267261.3A CN107241635B (en) | 2017-04-21 | 2017-04-21 | Bullet screen position switching method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107241635A true CN107241635A (en) | 2017-10-10 |
CN107241635B CN107241635B (en) | 2020-09-08 |
Family
ID=59984134
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710267261.3A Active CN107241635B (en) | 2017-04-21 | 2017-04-21 | Bullet screen position switching method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107241635B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109640154A (en) * | 2018-12-14 | 2019-04-16 | 苏州好玩友网络科技有限公司 | Webpage barrage display methods, device, equipment and storage medium |
CN110876086A (en) * | 2018-09-04 | 2020-03-10 | 广州虎牙信息科技有限公司 | Bullet screen generation adjusting method, device, equipment and storage medium |
CN110881138A (en) * | 2018-09-05 | 2020-03-13 | 武汉斗鱼网络科技有限公司 | Bullet screen display method and device and electronic equipment |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102693076A (en) * | 2011-02-15 | 2012-09-26 | 兄弟工业株式会社 | Display device, and method for the same |
CN104281439A (en) * | 2013-07-02 | 2015-01-14 | 腾讯科技(深圳)有限公司 | Method and device for displaying identifications of terminal |
CN104407838A (en) * | 2014-12-25 | 2015-03-11 | 乐得科技有限公司 | Methods and equipment for generating random number and random number set |
CN104703044A (en) * | 2015-02-12 | 2015-06-10 | 北京橘子文化传媒有限公司 | Picture barrage publishing method |
CN105592331A (en) * | 2015-12-16 | 2016-05-18 | 广州华多网络科技有限公司 | Method for processing barrage messages, related equipment, and system |
CN105760101A (en) * | 2016-02-02 | 2016-07-13 | 广东欧珀移动通信有限公司 | Video playing control method and electronic device |
CN105812885A (en) * | 2016-03-11 | 2016-07-27 | 武汉斗鱼网络科技有限公司 | Bullet screen display method and system in live video |
CN105916001A (en) * | 2016-05-12 | 2016-08-31 | 乐视控股(北京)有限公司 | Video barrage display method and device |
CN106412711A (en) * | 2016-09-22 | 2017-02-15 | 广州华多网络科技有限公司 | Barrage control method and device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104703018B (en) * | 2015-02-12 | 2018-02-23 | 北京橘子文化传媒有限公司 | A kind of display methods of picture barrage |
CN106454434B (en) * | 2016-11-15 | 2020-04-03 | 广州华多网络科技有限公司 | Bullet screen playing method and device |
-
2017
- 2017-04-21 CN CN201710267261.3A patent/CN107241635B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102693076A (en) * | 2011-02-15 | 2012-09-26 | 兄弟工业株式会社 | Display device, and method for the same |
CN104281439A (en) * | 2013-07-02 | 2015-01-14 | 腾讯科技(深圳)有限公司 | Method and device for displaying identifications of terminal |
CN104407838A (en) * | 2014-12-25 | 2015-03-11 | 乐得科技有限公司 | Methods and equipment for generating random number and random number set |
CN104703044A (en) * | 2015-02-12 | 2015-06-10 | 北京橘子文化传媒有限公司 | Picture barrage publishing method |
CN105592331A (en) * | 2015-12-16 | 2016-05-18 | 广州华多网络科技有限公司 | Method for processing barrage messages, related equipment, and system |
CN105760101A (en) * | 2016-02-02 | 2016-07-13 | 广东欧珀移动通信有限公司 | Video playing control method and electronic device |
CN105812885A (en) * | 2016-03-11 | 2016-07-27 | 武汉斗鱼网络科技有限公司 | Bullet screen display method and system in live video |
CN105916001A (en) * | 2016-05-12 | 2016-08-31 | 乐视控股(北京)有限公司 | Video barrage display method and device |
CN106412711A (en) * | 2016-09-22 | 2017-02-15 | 广州华多网络科技有限公司 | Barrage control method and device |
Non-Patent Citations (3)
Title |
---|
VICLEE108: "实例解析如何在Android应用中实现弹幕动画效果", 《HTTPS://WWW.JB51.NET/ARTICLE/83251.HTM》 * |
杨小强: "《虚拟仪器***开发与程序设计》", 6 April 2017, 冶金工业出版社 * |
陈飞: "《LabVIEW编程与项目开发实用教程》", 31 August 2016, 西安电子科技大学出版社 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110876086A (en) * | 2018-09-04 | 2020-03-10 | 广州虎牙信息科技有限公司 | Bullet screen generation adjusting method, device, equipment and storage medium |
CN110876086B (en) * | 2018-09-04 | 2023-01-06 | 广州虎牙信息科技有限公司 | Bullet screen generation adjusting method, device, equipment and storage medium |
CN110881138A (en) * | 2018-09-05 | 2020-03-13 | 武汉斗鱼网络科技有限公司 | Bullet screen display method and device and electronic equipment |
CN110881138B (en) * | 2018-09-05 | 2021-07-23 | 武汉斗鱼网络科技有限公司 | Bullet screen display method and device and electronic equipment |
CN109640154A (en) * | 2018-12-14 | 2019-04-16 | 苏州好玩友网络科技有限公司 | Webpage barrage display methods, device, equipment and storage medium |
CN109640154B (en) * | 2018-12-14 | 2019-09-10 | 苏州好玩友网络科技有限公司 | Webpage barrage display methods, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107241635B (en) | 2020-09-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102418756B1 (en) | User-centric audience channel for live gameplay in multi-player games | |
CN106331877B (en) | Barrage playback method and device | |
CN109862414A (en) | A kind of masking-out barrage display methods, device and server | |
RU2387013C1 (en) | System and method of generating interactive video images | |
CN106028161A (en) | Bullet screen generation method and apparatus, bullet screen presentation method and apparatus, server and client | |
CN107241635A (en) | A kind of method and device of barrage position switching | |
CN104484401A (en) | Statistical method and device for interface access data | |
US20190098372A1 (en) | Method and apparatus for adjusting virtual reality scene, and storage medium | |
CN111601175B (en) | Bullet screen pushing control method, device, equipment and storage medium | |
CN106484422A (en) | Intelligent worn device multilevel menu page display method and Intelligent worn device | |
CN105261055A (en) | Game role rehandling method, device and terminal | |
CN105657567A (en) | Event information display method, device and system | |
CN108668147A (en) | A kind of method and mobile terminal of optimization live streaming application | |
CN109816757A (en) | Play method and device, computer equipment, the computer storage medium of frame animation | |
CN110505528A (en) | The matched method, apparatus of game, equipment and readable storage medium storing program for executing in live streaming | |
WO2023016165A1 (en) | Method and device for selecting virtual character, terminal and storage medium | |
CN106507213A (en) | Date storage method and data storage device | |
CN113391751A (en) | Interface display method and device, storage medium and electronic equipment | |
CN110928397B (en) | User interface refreshing method and device, storage medium and electronic device | |
CN102611902B (en) | Method and device for adaptively switching game display modes | |
CN115061617A (en) | Processing method and device of live broadcast picture, computer equipment and storage medium | |
CN107071138A (en) | The method and device of video calling | |
CN112947819A (en) | Message display method, device, storage medium and equipment for interactive narrative work | |
CN104954874A (en) | Multimedia data playing method and apparatus | |
CN106303697A (en) | A kind of P frame processing method and 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 |