CN107092643A - A kind of barrage rendering intent and device - Google Patents

A kind of barrage rendering intent and device Download PDF

Info

Publication number
CN107092643A
CN107092643A CN201710128398.0A CN201710128398A CN107092643A CN 107092643 A CN107092643 A CN 107092643A CN 201710128398 A CN201710128398 A CN 201710128398A CN 107092643 A CN107092643 A CN 107092643A
Authority
CN
China
Prior art keywords
barrage
initial data
canvas
rendering
trajectory
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
Application number
CN201710128398.0A
Other languages
Chinese (zh)
Other versions
CN107092643B (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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710128398.0A priority Critical patent/CN107092643B/en
Publication of CN107092643A publication Critical patent/CN107092643A/en
Priority to PCT/CN2017/120146 priority patent/WO2018161709A1/en
Application granted granted Critical
Publication of CN107092643B publication Critical patent/CN107092643B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • 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/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation 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
    • 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
    • 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/475End-user interface for inputting end-user data, e.g. personal identification number [PIN], preference data

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)

Abstract

The present invention provides a kind of barrage rendering intent and device, and described method includes:S1, obtains barrage initial data;S2, corresponding barrage object is generated by each barrage initial data according to corresponding default barrage pattern;S3, when rendering in painting canvas Canvas in the presence of idle trajectory, the barrage object is inserted into the idle trajectory, and all barrage objects in all trajectories are rendered.The present invention utilizes HTML5 Canvas functions so that barrage dependent on Flash, does not add the efficiency of barrage drafting, barrage animation is shown on a web browser more smooth, add user experience.

Description

A kind of barrage rendering intent and device
Technical field
Field is rendered the present invention relates to webpage, more particularly, to a kind of barrage rendering intent and device.
Background technology
Field is rendered in webpage, the barrage Rendering based on DOM is current most of barrage application all in the skill of use Art, its principle is that barrage word is encapsulated into a HTML DOM element, recycles JavaScript to load barrage word DOM element be put into HTML and rendered, then the DOM element for loading barrage word is constantly carried out position calculating and Change to form mobile animation.
Using DOM barrage Rendering, due to needing the position to all DOM elements to calculate and changing, It can make that system CPU operation frequency is too high in the case that barrage word amount is very big, EMS memory occupation is excessive, and the animation meeting of barrage There is Caton phenomenon, what is especially showed on mobile terminal becomes apparent.
The content of the invention
The present invention provide a kind of barrage rendering intent for overcoming above mentioned problem or solving the above problems at least in part and Device, solves the inefficiency rendered based on DOM, the problem of committed memory is excessive.
According to an aspect of the invention, there is provided a kind of barrage rendering intent, including:
S1, obtains barrage initial data;
S2, corresponding barrage object is generated by each barrage initial data according to corresponding default barrage pattern;
S3, when rendering in painting canvas Canvas in the presence of idle trajectory, the idle trajectory is inserted into by the barrage object In, and all barrage objects in all trajectories are rendered.
According to another aspect of the present invention, a kind of barrage rendering device is additionally provided, including:
Acquisition module, for obtaining barrage initial data;
Object generation module, for each barrage initial data is corresponding according to corresponding default barrage pattern generation Barrage object;
Rendering module, for when rendering in painting canvas Canvas in the presence of idle trajectory, barrage object to be inserted into the sky In not busy trajectory, and all barrage objects in all trajectories are rendered.
Beneficial effects of the present invention are:By the corresponding barrage object of barrage Raw Data Generation, and barrage object is inserted Into the trajectory for rendering painting canvas Canvas, all barrage objects in trajectory are rendered together, HTML5 Canvas is utilized Function, each barrage object is a width picture, therefore when forming barrage animation, it is only necessary to change barrage object picture correspondence Position, need constantly to enter line position to the barrage word in each DOM element compared to existing rendering based on DOM Put calculating and change, the efficiency of barrage drafting, the excessive internal memory without taking so that barrage animation is on a web browser can be increased Show more smooth, add user experience.
Brief description of the drawings
Fig. 1 is the barrage rendering intent flow chart of one embodiment of the invention;
Fig. 2 is barrage object generating process flow chart;
Fig. 3 is barrage object render process flow chart;
Fig. 4 is the whole workflow diagram of barrage rendering intent;
Fig. 5 connects block diagram for the barrage rendering device of another embodiment of the present invention;
Fig. 6 connects block diagram for the overall of barrage rendering device;
Fig. 7 is the test equipment structured flowchart of the barrage rendering device of another embodiment of the invention.
Embodiment
With reference to the accompanying drawings and examples, the embodiment to the present invention is described in further detail.Implement below Example is used to illustrate the present invention, but is not limited to the scope of the present invention.
Be the barrage rendering intent of one embodiment of the invention referring to Fig. 1, be mainly used in webpage render, cartoon making neck Domain, wherein, HTML5 is the kernel language of internet, HTML the 5th material alteration, the content shown for providing on webpage, Currently the majority modern browser all supports HTML5.For contrasting HTML4, there is HTML5 primary video and audio to support, primary dynamic The new features such as self-holding, local data base and socket web sockets are drawn, nowadays there are many websites all to arrive technique transfers HTML5.
Canvas represents a HTML5 canvas element, can support scripting browser end mapping operation.Canvas supports mutual It is dynamic, the operation of user, such as mouse click, keyboard etc. can be responded, additionally it is possible to make animation using Canvas, at present very Multiple web pages game is all based on Canvas making.Canvas can also draw 2D and 3D pictures, in terms of browser support, as long as It is that the browser for supporting HTML5 can all support Canvas, and game using Canvas fabrication techniques or animation need not pacify Fill any browser plug-in.
The barrage rendering intent that the present embodiment is provided mainly includes:S1, obtains barrage initial data;S2, by each bullet Curtain initial data generates corresponding barrage object according to corresponding default barrage pattern;S3, exists when rendering in painting canvas Canvas During idle trajectory, barrage object is inserted into the idle trajectory, and wash with watercolours is carried out to all barrage objects in all trajectories Dye.
Barrage object is inserted into and renders painting canvas by the present embodiment by the corresponding barrage object of barrage Raw Data Generation In Canvas trajectory, all barrage objects in trajectory are rendered together, it is each using HTML5 Canvas functions Individual barrage object is a width picture, therefore when forming barrage animation, it is only necessary to change the corresponding position of barrage object picture i.e. Can, compared to existing rendering based on DOM need constantly to carry out the barrage word in each DOM element position calculate with And change, the efficiency of barrage drafting, the excessive internal memory without taking so that barrage animation shows more on a web browser can be increased For smoothness, user experience is added.
In one embodiment of the invention, above-mentioned steps S1 obtain barrage initial data process be, in a browser A barrage data acquisition thread can be designed, generally, barrage data acquisition thread is encapsulated using WebSocket, is used WebSocket technologies interact to obtain the barrage initial data on barrage server with barrage server.Specifically, creating One WebSocket object, by message monitoring mechanism, obtains the barrage initial data transmitted from barrage server, and will obtain The barrage initial data taken is stored in barrage pond.Wherein, the barrage initial data in barrage server is that have sequential, bullet The barrage initial data of acquisition is put into barrage pond by curtain data acquisition thread according to original order.Wherein, barrage pond is used JavaScript arrays deposit barrage initial data, can increase barrage initial data into JavaScript arrays, can also Barrage initial data is extracted from JavaScript arrays, and the barrage initial data after extraction is wiped.
In another embodiment of the present invention, it is necessary to carry barrage characteristic in explanation, barrage initial data According to such as barrage sender grade, red-letter day feature, present feature (whether rocket, aircraft, sport car etc.) and sender specify Barrage font etc.., it is necessary to be generated according to a certain pattern when by barrage Raw Data Generation barrage object, therefore need to know The corresponding default barrage pattern of road barrage initial data.Therefore, barrage characteristic and default barrage are set up in the present embodiment Corresponding relation between pattern, such as, set up corresponding between sender's grade of barrage initial data and default barrage pattern Relation.
Each barrage initial data is generated into corresponding barrage according to corresponding default barrage pattern in above-mentioned steps S2 During object, the barrage initial data of predetermined quantity is obtained from barrage pond according to fixed frequency, i.e., regularly from barrage pond Middle extraction barrage initial data.For example, in the present embodiment, a thread can be opened and obtained with the frequency of 60 times per second from barrage pond Take barrage initial data.Avoid due to the excessive influence extraction efficiency of the barrage original data volume extracted every time, each is only from bullet The barrage initial data of predetermined quantity is extracted in curtain pond.
Referring to Fig. 2, it is extracted from barrage pond after a plurality of barrage initial data, obtains the bullet of each barrage initial data Curtain characteristic, and according to the corresponding relation between the barrage characteristic and default barrage pattern set up in advance, obtain each The corresponding default barrage pattern of bar barrage initial data.According to corresponding default barrage pattern first by each barrage initial data Corresponding barrage image is generated, then by barrage image and barrage related data, such as barrage picture traverse, barrage image are moved Dynamic speed etc., is packaged into barrage object, and the barrage object of generation is deposited in barrage queue.
Wherein, barrage object is the encapsulation of wall scroll barrage picture, and the attribute information of barrage object includes barrage content and bullet Curtain pattern, barrage pattern mainly includes barrage font, barrage color, barrage word space, barrage width, barrage background, barrage pair As being also presently in the attribute informations such as position comprising barrage translational speed and barrage.
In one embodiment of the invention, when rendering of barrage object is carried out in step S3, first, one is drawn and renders picture Cloth Canvas, obtains the height for rendering painting canvas Canvas, and according to the height of default trajectory, calculating is rendered in painting canvas Canvas Trajectory quantity, the whole all trajectories rendered in painting canvas Canvas are stored with an array, rower is entered to all trajectories Know, in the present embodiment, all trajectories can be numbered.
Then, configuration one renders thread, the trajectory in circulation in rendering thread renders painting canvas Canvas, obtains each The position of the barrage object of last in trajectory;When the position and barrage region most edge of the barrage object of last in trajectory When distance is more than pre-determined distance, there is idle trajectory it is determined that rendering in painting canvas Canvas, otherwise, in the absence of idle trajectory.
In the present embodiment, using canvas.width-danmaku.getX ()-danmaku.getWidth ()>100 Judge to find idle trajectory, pre-determined distance value 100 refers to the X-axis coordinate of the barrage object of last in trajectory from barrage region The distance of rightmost.Referring to Fig. 3, when satisfying the condition, show to render in painting canvas Canvas and there is idle trajectory, now, from Extract barrage object in barrage queue, in the idle trajectory of insertion, and the trajectory residing for the barrage object is given numbered, that is, give Barrage object sets current trajectory numbering.
All barrage objects in all trajectories are rendered into according to fixed frequency and rendered in painting canvas, i.e., in all trajectories All barrage objects rendered.When implementing, it can detect and whether there is in each trajectory according to fixed frequency Barrage object, if it is present being rendered to all barrage objects in trajectory.Canvas barrage drawing principles are: Canvas can be understood as a drawing board, and no matter what the content of this drawing board is, what it was produced will be a width figure Piece.Canvas can be interpreted as to a simple Photoshop, either a line or passage either one Picture, what is finally obtained is a width picture forever.
Animation is formed when multiple pictures are quickly stirred, is one continuous so realizing animation on Canvas Erasing and the process constantly redrawn.Content in Canvas drawing boards is wiped out, some changes then are made to the position of raw content, Repaint out again, this process of Rapid Circulation is that the content that can be formed in animation, animation per frame is exactly in Canvas The content redrawn.
The present embodiment first removes whole Canvas painting canvas during Canvas animations are formed, and recycles whole trajectory, Each barrage object in trajectory is obtained during circulation every time, barrage object the location of present frame, and draw each again is calculated Individual barrage object, constantly erasing-drafting is formed barrage animation in thread is rendered.
It is the whole flow process figure of the barrage rendering intent of an alternative embodiment of the invention referring to Fig. 4, first, is supporting Barrage data acquisition thread, barrage pattern computational threads, barrage object generation thread, wash with watercolours can be configured in HTML5 browser Contaminate thread and barrage scheduling thread etc..Barrage data acquisition thread gets barrage initial data from server is played, and by bullet Curtain initial data is stored in barrage pond.Barrage pattern computational threads extract barrage initial data from barrage pond, obtain every The barrage characteristic of one barrage initial data, according to the corresponding relation between barrage characteristic and default barrage pattern, Obtain each barrage initial data and preset barrage pattern accordingly.According to corresponding default barrage pattern, by each barrage The corresponding barrage object of Raw Data Generation, and the barrage object of generation is stored in barrage queue.Render thread detection wash with watercolours Contaminate with the presence or absence of idle trajectory in painting canvas Canvas, if there is idle trajectory, the insertion of barrage object is extracted from barrage queue empty In not busy trajectory, and all barrage objects in all trajectories are rendered into according to certain frequency rendered in painting canvas Canvas.Its Middle barrage scheduling thread is the pool of each thread ground scheduling thread, and United Dispatching coordinations are carried out to other each threads.
Barrage object is inserted into and renders painting canvas by the present embodiment by the corresponding barrage object of barrage Raw Data Generation In Canvas trajectory, all barrage objects in all trajectories are rendered together, using HTML5 Canvas functions, Each barrage object is a width picture, therefore when forming barrage animation, it is only necessary to change the corresponding position of barrage object picture Put, need constantly to carry out position meter to the barrage word in each DOM element compared to existing rendering based on DOM Calculate and change, the efficiency of barrage drafting, the excessive internal memory without taking so that barrage animation is shown on a web browser can be increased Obtain more smooth, add user experience.
It is the barrage rendering device of one embodiment of the invention referring to Fig. 5, including acquisition module 21, object generation module 22 and rendering module 23.
Acquisition module 21, for obtaining barrage initial data;
Object generation module 22, for each barrage initial data to be generated into correspondence according to corresponding default barrage pattern Barrage object;
Rendering module 23, for when rendering in painting canvas Canvas in the presence of idle trajectory, the barrage object to be inserted into In the idle trajectory, and all barrage objects in all trajectories are rendered.
Wherein, acquisition module 21 specifically for:
By message monitoring mechanism, the barrage initial data transmitted from barrage server is obtained, and the barrage of acquisition is former Beginning data are deposited in barrage pond, and wherein barrage initial data is deposited in barrage pond using JavaScript arrays.
Also include corresponding relation building module 24 referring to Fig. 6, in the barrage rendering device that the present embodiment is provided and judge mould Block 25.
Wherein, barrage characteristic, corresponding relation building module 24, for pre-establishing are carried in barrage initial data Corresponding relation between barrage characteristic and default barrage pattern;
The acquisition module 21 is additionally operable to:
When a plurality of barrage initial data is obtained from barrage pond, the barrage characteristic of every barrage initial data is obtained;
The object generation module 22 specifically for:
According to the barrage characteristic and barrage characteristic of every barrage initial data and pair of default barrage pattern It should be related to, obtain the corresponding default barrage pattern of every barrage initial data;According to default barrage pattern, by each barrage original Beginning data generate corresponding barrage object, and the barrage object of generation is deposited in barrage queue.
Judge module 25, for judging to render in painting canvas Canvas with the presence or absence of idle trajectory;Specifically include:
Configure and start one and render thread, trajectory is circulated in thread is rendered, obtain last barrage object in trajectory Position;
When the position of the barrage object of last in trajectory is more than pre-determined distance with the distance at barrage region most edge, really Surely render in painting canvas Canvas and there is idle trajectory, otherwise, in the absence of idle trajectory.
The barrage rendering device provided based on above-mentioned Fig. 5 or Fig. 6 correspondence embodiments, the invention provides a kind of barrage wash with watercolours Contaminate the test equipment of device.Referring to Fig. 7, the test equipment of the apparatus for management of information includes:Processor (processor) 701, deposit Reservoir (memory) 701, communication interface (Communications Interface) 703 and bus 704;
Wherein, processor 701, memory 702 and communication interface 703 complete mutual communication by bus 704 respectively;
The information transfer that communication interface 703 is used between the test equipment and the communication equipment of barrage rendering device;
Processor 701 is used to call the programmed instruction in memory 702, to perform above-mentioned Fig. 1-Fig. 4 correspondence embodiments institute The barrage rendering intent of offer, for example including:Obtain barrage initial data;By each barrage initial data according to corresponding pre- If barrage pattern generates corresponding barrage object;When rendering in painting canvas Canvas in the presence of idle trajectory, by the barrage object It is inserted into the idle trajectory, and all barrage objects in all trajectories is rendered.
The present invention discloses a kind of computer program product, and the computer program product can including being stored in non-transient computer The computer program on storage medium is read, the computer program includes programmed instruction, when programmed instruction is computer-executed, meter Calculation machine is able to carry out the barrage rendering intent that above-mentioned Fig. 1-Fig. 4 correspondence embodiment is provided, for example including:Obtain barrage original number According to;Each barrage initial data is generated into corresponding barrage object according to corresponding default barrage pattern;When rendering painting canvas When there is idle trajectory in Canvas, the barrage object is inserted into the idle trajectory, and to the institute in all trajectories There is barrage object to be rendered.
The present invention provides a kind of non-transient computer readable storage medium storing program for executing, non-transient computer readable storage medium storing program for executing storage Computer instruction, the computer instruction makes computer perform the barrage rendering intent that above-mentioned Fig. 1-Fig. 4 correspondences embodiment is provided, For example including:Obtain barrage initial data;Each barrage initial data is generated into correspondence according to corresponding default barrage pattern Barrage object;When rendering in painting canvas Canvas in the presence of idle trajectory, the barrage object is inserted into the idle trajectory In, and all barrage objects in all trajectories are rendered.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through Programmed instruction related hardware is completed, and foregoing program can be stored in a computer read/write memory medium, the program Upon execution, the step of including above method embodiment is performed;And foregoing storage medium includes:ROM, RAM, magnetic disc or light Disk etc. is various can be with the medium of store program codes.
The embodiments such as the test equipment of barrage rendering device described above are only schematical, wherein being used as separation The unit of part description can be or may not be it is physically separate, the part shown as unit can be or It can not be physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can be according to reality Some or all of module therein is selected to realize the purpose of this embodiment scheme the need for border.Those of ordinary skill in the art In the case where not paying performing creative labour, you can to understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can Realized by the mode of software plus required general hardware platform, naturally it is also possible to pass through hardware.Understood based on such, on The part that technical scheme substantially in other words contributes to prior art is stated to embody in the form of software product, should Computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disc, CD, including some fingers Order is to cause a computer equipment (can be personal computer, server, or network equipment etc.) to perform each implementation Some Part Methods of example or embodiment.
A kind of barrage rendering intent and device that the present invention is provided, by the corresponding barrage object of barrage Raw Data Generation, And be inserted into barrage object in the trajectory for rendering painting canvas Canvas, all barrage objects in trajectory are rendered together, Using HTML5 Canvas functions, each barrage object is a width picture, therefore when forming barrage animation, it is only necessary to change Become the corresponding position of barrage object picture, needed compared to existing rendering based on DOM to the bullet in each DOM element Curtain word constantly carries out position calculating and change, can increase the efficiency of barrage drafting, the excessive internal memory without taking so that Barrage animation shows more smooth on a web browser, adds user experience.
Finally, the present processes are only preferably embodiment, are not intended to limit the scope of the present invention.It is all Within the spirit and principles in the present invention, any modification, equivalent substitution and improvements made etc. should be included in the protection of the present invention Within the scope of.

Claims (10)

1. a kind of barrage rendering intent, it is characterised in that including:
S1, obtains barrage initial data;
S2, corresponding barrage object is generated by each barrage initial data according to corresponding default barrage pattern;
S3, when rendering in painting canvas Canvas in the presence of idle trajectory, the barrage object is inserted into the idle trajectory, and All barrage objects in all trajectories are rendered.
2. barrage rendering intent as claimed in claim 1, it is characterised in that the step S1 further comprises:
By message monitoring mechanism, the barrage initial data transmitted from barrage server is obtained, and by the barrage original number of acquisition According to depositing in barrage pond.
3. barrage rendering intent as claimed in claim 2, it is characterised in that deposited using JavaScript arrays in the barrage pond Put barrage initial data.
4. barrage rendering intent as claimed in claim 2, it is characterised in that carried in the barrage initial data corresponding Barrage characteristic, the corresponding relation set up in advance between barrage characteristic and default barrage pattern;
The step S2 further comprises:
S21, obtains a plurality of barrage initial data, and obtain the corresponding barrage characteristic of every barrage initial data from barrage pond According to;
S22, according to the barrage characteristic and barrage characteristic of every barrage initial data and pair of default barrage pattern It should be related to, obtain every barrage initial data and preset barrage pattern accordingly;
S23, according to corresponding default barrage pattern, by the corresponding barrage object of each barrage Raw Data Generation, and will be raw Into the barrage object deposit in barrage queue.
5. barrage rendering intent as claimed in claim 4, it is characterised in that the step S21 further comprises:
The barrage initial data of predetermined quantity is extracted from the barrage pond according to fixed frequency.
6. barrage rendering intent as claimed in claim 5, it is characterised in that judge wash with watercolours in the following way in the step S3 Contaminate in painting canvas Canvas with the presence or absence of idle trajectory:
Configure and start one and render thread, the trajectory in circulation in rendering thread renders painting canvas Canvas obtains each bullet The position of the barrage object of last in road;
When the position of the barrage object of last in trajectory is more than pre-determined distance with the distance at barrage region most edge, wash with watercolours is confirmed Contaminate in painting canvas Canvas and there is idle trajectory, otherwise, in the absence of idle trajectory.
7. barrage rendering intent as claimed in claim 6, it is characterised in that also include before the step S3:
The height and default ballistic ordinate for rendering painting canvas Canvas are obtained, the number for rendering trajectory in painting canvas Canvas is calculated Amount, and all trajectories are identified;
When barrage object is inserted into the idle trajectory in the step S3, the trajectory residing for the barrage object is given Mark.
8. a kind of barrage rendering device, it is characterised in that including:
Acquisition module, for obtaining barrage initial data;
Object generation module, for each barrage initial data to be generated into corresponding barrage according to corresponding default barrage pattern Object;
Rendering module, for when rendering in painting canvas Canvas in the presence of idle trajectory, barrage object to be inserted into the idle bullet In road, and all barrage objects in all trajectories are rendered.
9. barrage rendering device as claimed in claim 8, it is characterised in that barrage is carried in the barrage initial data special Data are levied, in addition to:
Corresponding relation building module, for setting up the corresponding relation between barrage characteristic and default barrage pattern;
The acquisition module is additionally operable to:
When a plurality of barrage initial data is obtained from barrage pond, the barrage characteristic of every barrage initial data is obtained;
The object generation module specifically for:
Closed according to the barrage characteristic and barrage characteristic and the corresponding of default barrage pattern of every barrage initial data System, obtains the corresponding default barrage pattern of every barrage initial data;And according to default barrage pattern, by each barrage original Beginning data generate corresponding barrage object, and the barrage object of generation is deposited in barrage queue.
10. barrage rendering device as claimed in claim 9, it is characterised in that also include:
Judge module, for judging to render in painting canvas Canvas with the presence or absence of idle trajectory.
CN201710128398.0A 2017-03-06 2017-03-06 Barrage rendering method and device Active CN107092643B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710128398.0A CN107092643B (en) 2017-03-06 2017-03-06 Barrage rendering method and device
PCT/CN2017/120146 WO2018161709A1 (en) 2017-03-06 2017-12-29 Method and device for rendering overlay comment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710128398.0A CN107092643B (en) 2017-03-06 2017-03-06 Barrage rendering method and device

Publications (2)

Publication Number Publication Date
CN107092643A true CN107092643A (en) 2017-08-25
CN107092643B CN107092643B (en) 2020-10-16

Family

ID=59646173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710128398.0A Active CN107092643B (en) 2017-03-06 2017-03-06 Barrage rendering method and device

Country Status (2)

Country Link
CN (1) CN107092643B (en)
WO (1) WO2018161709A1 (en)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107484036A (en) * 2017-09-07 2017-12-15 深圳市迅雷网络技术有限公司 A kind of barrage display methods and device
WO2018161709A1 (en) * 2017-03-06 2018-09-13 武汉斗鱼网络科技有限公司 Method and device for rendering overlay comment
CN108600852A (en) * 2018-04-28 2018-09-28 北京酷我科技有限公司 A kind of implementation method of barrage effect
CN108848398A (en) * 2018-06-21 2018-11-20 武汉斗鱼网络科技有限公司 A kind of distribution method, device, terminal and the storage medium of local barrage message
CN109640154A (en) * 2018-12-14 2019-04-16 苏州好玩友网络科技有限公司 Webpage barrage display methods, device, equipment and storage medium
CN109714627A (en) * 2018-12-29 2019-05-03 广州华多网络科技有限公司 A kind of rendering method of comment information, device and equipment
CN110045958A (en) * 2019-04-17 2019-07-23 腾讯科技(深圳)有限公司 Data texturing generation method, device, storage medium and equipment
CN110392293A (en) * 2019-06-21 2019-10-29 平安普惠企业管理有限公司 Barrage control method, device, equipment and storage medium based on canvas
CN111031376A (en) * 2019-11-25 2020-04-17 上海哔哩哔哩科技有限公司 Bullet screen processing method and system based on WeChat applet
CN111031400A (en) * 2019-11-25 2020-04-17 上海哔哩哔哩科技有限公司 Barrage presenting method and system
CN111083551A (en) * 2019-12-17 2020-04-28 腾讯科技(深圳)有限公司 Barrage rendering method and device, computer readable storage medium and computer equipment
CN111131910A (en) * 2020-01-02 2020-05-08 广州虎牙科技有限公司 Bullet screen implementation method and device, electronic equipment and readable storage medium
CN111796825A (en) * 2020-06-30 2020-10-20 北京字节跳动网络技术有限公司 Bullet screen drawing method, device, equipment and storage medium
CN112752131A (en) * 2019-10-30 2021-05-04 腾讯科技(深圳)有限公司 Barrage information display method and device, storage medium and electronic device
CN112799578A (en) * 2021-01-26 2021-05-14 挂号网(杭州)科技有限公司 Keyboard drawing method and device, electronic equipment and storage medium
CN114938474A (en) * 2021-01-11 2022-08-23 花瓣云科技有限公司 Bullet screen processing method and electronic equipment
CN114942795A (en) * 2022-04-29 2022-08-26 湖南茶旅云科技有限公司 Loading method of live broadcast gift data in small program, electronic device and storage medium
CN115297355A (en) * 2022-08-02 2022-11-04 北京奇艺世纪科技有限公司 Bullet screen display method, bullet screen generation device, electronic equipment and storage medium
CN114938474B (en) * 2021-01-11 2024-05-28 花瓣云科技有限公司 Barrage processing method and electronic equipment

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109525885B (en) * 2018-12-13 2021-07-20 广州华多网络科技有限公司 Information processing method, information processing device, electronic equipment and computer readable storage medium
CN112118474B (en) * 2019-06-19 2022-09-09 上海哔哩哔哩科技有限公司 Video barrage display method and system, computer equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102937968A (en) * 2012-10-11 2013-02-20 上海交通大学 Double-eye 3D (three-dimensional) realizing method and system based on Canvas
CN105307030A (en) * 2015-09-30 2016-02-03 广州酷狗计算机科技有限公司 Barrage displaying method and device
CN106131643A (en) * 2016-07-13 2016-11-16 乐视控股(北京)有限公司 A kind of barrage processing method, processing means and electronic equipment thereof

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106469165B (en) * 2015-08-18 2021-01-08 腾讯科技(深圳)有限公司 Bullet screen display method and bullet screen display device
CN105597321B (en) * 2015-12-18 2020-07-10 武汉斗鱼网络科技有限公司 Bullet screen display method and system in full-screen game state
CN105939493B (en) * 2016-03-30 2019-02-22 广州华多网络科技有限公司 A kind of display methods and display device of video barrage
CN105898521A (en) * 2016-04-12 2016-08-24 王邈 Bullet screen adding device and bullet screen adding method
CN107092643B (en) * 2017-03-06 2020-10-16 武汉斗鱼网络科技有限公司 Barrage rendering method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102937968A (en) * 2012-10-11 2013-02-20 上海交通大学 Double-eye 3D (three-dimensional) realizing method and system based on Canvas
CN105307030A (en) * 2015-09-30 2016-02-03 广州酷狗计算机科技有限公司 Barrage displaying method and device
CN106131643A (en) * 2016-07-13 2016-11-16 乐视控股(北京)有限公司 A kind of barrage processing method, processing means and electronic equipment thereof

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018161709A1 (en) * 2017-03-06 2018-09-13 武汉斗鱼网络科技有限公司 Method and device for rendering overlay comment
CN107484036A (en) * 2017-09-07 2017-12-15 深圳市迅雷网络技术有限公司 A kind of barrage display methods and device
CN108600852A (en) * 2018-04-28 2018-09-28 北京酷我科技有限公司 A kind of implementation method of barrage effect
CN108600852B (en) * 2018-04-28 2020-12-15 北京酷我科技有限公司 Realization method of bullet screen effect
CN108848398A (en) * 2018-06-21 2018-11-20 武汉斗鱼网络科技有限公司 A kind of distribution method, device, terminal and the storage medium of local barrage message
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
CN109714627A (en) * 2018-12-29 2019-05-03 广州华多网络科技有限公司 A kind of rendering method of comment information, device and equipment
CN109714627B (en) * 2018-12-29 2021-06-18 广州方硅信息技术有限公司 Comment information rendering method, device and equipment
CN110045958A (en) * 2019-04-17 2019-07-23 腾讯科技(深圳)有限公司 Data texturing generation method, device, storage medium and equipment
CN110392293A (en) * 2019-06-21 2019-10-29 平安普惠企业管理有限公司 Barrage control method, device, equipment and storage medium based on canvas
CN112752131A (en) * 2019-10-30 2021-05-04 腾讯科技(深圳)有限公司 Barrage information display method and device, storage medium and electronic device
CN111031376B (en) * 2019-11-25 2020-09-25 上海哔哩哔哩科技有限公司 Bullet screen processing method and system based on WeChat applet
CN111031400A (en) * 2019-11-25 2020-04-17 上海哔哩哔哩科技有限公司 Barrage presenting method and system
CN111031376A (en) * 2019-11-25 2020-04-17 上海哔哩哔哩科技有限公司 Bullet screen processing method and system based on WeChat applet
CN111031400B (en) * 2019-11-25 2021-04-27 上海哔哩哔哩科技有限公司 Barrage presenting method and system
WO2021103366A1 (en) * 2019-11-25 2021-06-03 上海哔哩哔哩科技有限公司 Bullet screen processing method and system based on wechat mini-program
CN111083551A (en) * 2019-12-17 2020-04-28 腾讯科技(深圳)有限公司 Barrage rendering method and device, computer readable storage medium and computer equipment
CN111131910A (en) * 2020-01-02 2020-05-08 广州虎牙科技有限公司 Bullet screen implementation method and device, electronic equipment and readable storage medium
CN111796825A (en) * 2020-06-30 2020-10-20 北京字节跳动网络技术有限公司 Bullet screen drawing method, device, equipment and storage medium
CN111796825B (en) * 2020-06-30 2024-02-09 北京字节跳动网络技术有限公司 Bullet screen drawing method, bullet screen drawing device, bullet screen drawing equipment and storage medium
CN114938474A (en) * 2021-01-11 2022-08-23 花瓣云科技有限公司 Bullet screen processing method and electronic equipment
CN114938474B (en) * 2021-01-11 2024-05-28 花瓣云科技有限公司 Barrage processing method and electronic equipment
CN112799578A (en) * 2021-01-26 2021-05-14 挂号网(杭州)科技有限公司 Keyboard drawing method and device, electronic equipment and storage medium
CN112799578B (en) * 2021-01-26 2022-06-17 挂号网(杭州)科技有限公司 Keyboard drawing method and device, electronic equipment and storage medium
CN114942795A (en) * 2022-04-29 2022-08-26 湖南茶旅云科技有限公司 Loading method of live broadcast gift data in small program, electronic device and storage medium
CN115297355A (en) * 2022-08-02 2022-11-04 北京奇艺世纪科技有限公司 Bullet screen display method, bullet screen generation device, electronic equipment and storage medium
CN115297355B (en) * 2022-08-02 2024-01-23 北京奇艺世纪科技有限公司 Barrage display method, barrage generation method, barrage display device, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2018161709A1 (en) 2018-09-13
CN107092643B (en) 2020-10-16

Similar Documents

Publication Publication Date Title
CN107092643A (en) A kind of barrage rendering intent and device
EP3657327B1 (en) Method for rendering game, and method, apparatus and device for generating game resource file
CN109978972B (en) Method and device for editing characters in picture
CN103678631B (en) page rendering method and device
CN106021421B (en) method and device for accelerating webpage rendering
CN109803180A (en) Video preview drawing generating method, device, computer equipment and storage medium
CN109640154B (en) Webpage barrage display methods, device, equipment and storage medium
CN107066440A (en) The input control method and system of vertical setting of types text
CN106569805B (en) Canvas storage method, picture drawing method and equipment
CN105824874A (en) Mobile terminal as well as web page rendering method and device thereof
CN107707965B (en) Bullet screen generation method and device
CN109117237B (en) Bullet screen display method and device and electronic equipment
CN108205960A (en) Method and apparatus, electron map manufacturing system and the navigation system that a kind of word renders
CN109714627A (en) A kind of rendering method of comment information, device and equipment
CN112711729A (en) Rendering method and device based on page animation, electronic equipment and storage medium
CN109978968B (en) Video drawing method, device and equipment of moving object and storage medium
CN104516868B (en) The streaming restoring method and system in a kind of space of a whole page space
CN106488298B (en) Method and device for drawing image in UI (user interface) and television
CN114648603A (en) Method and system for realizing fly-line dynamic effect based on canvas and echarts
CN112449230B (en) Character string display processing method, device, terminal and storage medium
CN111931708A (en) Form generation method and device
CN115830212A (en) Three-dimensional model display method and related equipment
CN106548501B (en) Image drawing method and device
CN114786067A (en) Bullet screen based interaction method, device, equipment and storage medium
CN110969686A (en) Method for increasing number of three-dimensional characters

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