CN110012338A - A kind of method, apparatus, computer equipment and storage medium showing barrage data - Google Patents
A kind of method, apparatus, computer equipment and storage medium showing barrage data Download PDFInfo
- Publication number
- CN110012338A CN110012338A CN201910285574.0A CN201910285574A CN110012338A CN 110012338 A CN110012338 A CN 110012338A CN 201910285574 A CN201910285574 A CN 201910285574A CN 110012338 A CN110012338 A CN 110012338A
- Authority
- CN
- China
- Prior art keywords
- data
- type matrix
- barrage
- image data
- barrage data
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 239000011159 matrix material Substances 0.000 claims abstract description 171
- 230000015654 memory Effects 0.000 claims description 28
- 238000013507 mapping Methods 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 5
- 238000004364 calculation method Methods 0.000 claims 1
- 238000009877 rendering Methods 0.000 abstract description 10
- 238000010586 diagram Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 6
- 238000012545 processing Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 241001269238 Data Species 0.000 description 1
- 241000505673 Scintilla Species 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000010076 replication Effects 0.000 description 1
- 239000007787 solid Substances 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
-
- 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/435—Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
- H04N21/4355—Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream involving reformatting operations of additional data, e.g. HTML pages on a television screen
-
- 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/4402—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 reformatting operations of video signals for household redistribution, storage or real-time display
-
- 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)
- Processing Or Creating Images (AREA)
Abstract
The embodiment of the invention discloses a kind of method, apparatus, computer equipment and storage mediums for showing barrage data, this method comprises: playing multi-medium data;Character string is received, the character of the character string is used to indicate the element in barrage data;Determine type matrix, the type matrix is for recording the element;The type matrix is loaded in an image data;Using described image data as barrage data, display on the multi-medium data.Element in barrage data is loaded onto image data in the form of type matrix as a whole, to show as barrage data, it avoids and cutting is carried out to barrage data, integrally barrage data can be rendered, without repeatedly occupying the component for rendering, operand is few, reduces resource cost.
Description
Technical field
The present embodiments relate to the technology of multi-media processing more particularly to it is a kind of show barrage data method, apparatus,
Computer equipment and storage medium.
Background technique
With the fast development of network technology, when playing the multi-medium datas such as video, user is sent out in many websites
Some comments of table show that, to the atmosphere between any active ues, these comments are referred to as barrage (barrage) together.
It may include simultaneously text and expression in barrage, currently, generally requiring independent cutting text and expression, be segmented to text
Word and expression carry out rendering processing, to show together.
But repeatedly every section of text or expression are rendered, need repeatedly occupy for rendering component, operand compared with
Greatly, more resource is expended.
Summary of the invention
The embodiment of the present invention provides a kind of method, apparatus, computer equipment and storage medium for showing barrage data, with solution
It is certainly segmented and rendering operation amount is carried out larger, the problem of expending more resource to barrage.
In a first aspect, the embodiment of the invention provides a kind of methods for showing barrage data, comprising:
Play multi-medium data;
Character string is received, the character of the character string is used to indicate the element in barrage data;
Determine type matrix, the type matrix is for recording the element;
The type matrix is loaded in an image data;
Using described image data as barrage data, display on the multi-medium data.
Second aspect, the embodiment of the invention also provides a kind of methods for showing barrage data, comprising:
Show an interface, the interface is for showing multi-medium data;
Barrage data are shown on the multi-medium data;
Wherein, the barrage data are image data, and described image data are for loading type matrix, and the type matrix is for recording
Element in the barrage data.
The third aspect, the embodiment of the invention also provides a kind of devices for showing barrage data, comprising:
Multi-medium data playing module, for playing multi-medium data;
Character string receiving module, for receiving character string, the character of the character string is used to indicate the member in barrage data
Element;
Type matrix determining module, for determining type matrix, the type matrix is for recording the element;
Type matrix loading module, for loading the type matrix in an image data;
Image data display module is used for using described image data as barrage data, display in the multi-medium data
On.
Fourth aspect, the embodiment of the invention also provides a kind of devices for showing barrage data, comprising:
Interface display component, for showing an interface, the interface is for showing multi-medium data;
Barrage data display component, for showing barrage data on the multi-medium data;
Wherein, the barrage data are image data, and described image data are for loading type matrix, and the type matrix is for recording
Element in the barrage data.
5th aspect the embodiment of the invention also provides a kind of computer equipment, including memory, processor and is stored in
On memory and the computer program that can run on a processor, the processor realize such as first aspect when executing described program
Or the method that barrage data are shown described in second aspect.
6th aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer
Program realizes the method for the display barrage data as described in first aspect or second aspect when the program is executed by processor.
The embodiment of the present invention plays multi-medium data, receives character string, the character of the character string is for indicating barrage data
In element, determine the type matrix for recording the element, the type matrix loaded in an image data, using image data as barrage
Data are shown on multi-medium data, as a whole by the element in barrage data, figure are loaded onto the form of type matrix
As to show as barrage data, avoiding and carrying out cutting to barrage data in data, wash with watercolours integrally can be carried out to barrage data
Dye, without repeatedly occupying the component for rendering, operand is few, reduces resource cost.
Detailed description of the invention
Fig. 1 is a kind of flow chart of the method for display barrage data that the embodiment of the present invention one provides;
Fig. 2A and Fig. 2 B is a kind of exemplary diagram for type matrix that the embodiment of the present invention one provides;
Fig. 3 is the display example figure for the barrage data that the embodiment of the present invention one provides;
Fig. 4 is a kind of flow chart of method for showing barrage data provided by Embodiment 2 of the present invention;
Fig. 5 is a kind of flow chart of the method for display barrage data that the embodiment of the present invention three provides;
Fig. 6 is a kind of structural schematic diagram of the device for display barrage data that the embodiment of the present invention four provides;
Fig. 7 is a kind of structural schematic diagram of the device for display barrage data that the embodiment of the present invention five provides;
Fig. 8 is a kind of structural schematic diagram for computer equipment that the embodiment of the present invention six provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just
Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is a kind of flow chart of the method for display barrage data that the embodiment of the present invention one provides, and the present embodiment can fit
The case where for showing barrage data when playing multi-medium data, this method can be held by the device of display barrage data
Row, the device can be configurable in computer equipment by software and or hardware realization, as mobile phone, tablet computer, intelligence are worn
The mobile terminals such as equipment are worn, and, the immobile terminals such as PC, TV, this method specifically comprises the following steps:
S101, multi-medium data is played.
In the present embodiment, multi-medium data may include video data, audio data, image data, text, etc..
It should be noted that the meaning of multi-medium data is also different in different scenes, the present embodiment to this not
It limits.
For example, the video data can be live data in the scene of live streaming, and in the scene of program request, the video counts
According to can be film, TV play etc..
In another example the audio data can be sound novel, which can be novel in the scene of novel.
In another example the image data can be stock exchange index figure in the scene of finance and economics.
Under normal circumstances, multi-medium data stores in the server, user oriented, if what user provided in computer equipment
UI (User Interface, user interface) is operated, the multi-medium data in request server, and server then can will be more
Media data is sent to computer equipment, and computer equipment calls the player plays multi-medium data.
By taking the scene of live streaming as an example, mountable independent live streaming applies, has answering for live streaming component in computer equipment
With or the application such as browser, depending on the user's operation, such as click the thumbnail of some direct broadcasting room, input the link of some direct broadcasting room
Deng using the load request for sending direct broadcasting room to live streaming platform.
Live streaming platform receives the load request, and responds the load request, by the data of direct broadcasting room be sent to the application into
Row display, also, live data is sent to the application, to be played out in the direct broadcasting room.
S102, character string is received.
For the multi-medium data, other users can make comments, if these comments meet specification, can be exchanged into character
String, and it is stored in server.
In the present embodiment, server can be while sending multi-medium data to computer equipment, by the multimedia number
According to subsidiary character string, it is also sent to computer equipment together.
Wherein, which includes one or more character strings, the word of character string in character string for indicating barrage data
Symbol is for indicating the element in barrage data.
S103, type matrix is determined.
In the present embodiment, the element for generating barrage data, such as text, expression can be regarded as an X-Y scheme
Shape describes the binary code string of the dot matrix of an element, the referred to as type matrix of the element with one element of matrix representation.
For type matrix, the settable information for dot matrix typesetting, for example, baseline (origin), the size (gray scale of dot matrix
Figure size, width+3/4*height*bit), specify the point coordinate for surrounding the minimum matrix upper left corner of font architecture completely
(BeginX, BeginY), actual size (width, height), etc..
For example, " Chinese " as shown in Figure 2 A and the expression for being used to express indignation as shown in Figure 2 B, use 16 × 16 point
Gust, every bit is indicated using bit (Bit) in type matrix, if it is 1 (point of full-filling black), then illustrates have herein
Point, if 0 (point of non-full-filling black), then explanation does not have, in this way, the Chinese character of 16 × 16 dot matrix needs 16*16/8 in total
=32 byte representations.
In this example, the order of representation of type matrix are as follows: first from left to right, then from top to bottom, that is, first draw upper left 8
It is a, then be 8 points in upper right side, followed by 8, second row left side point, 8, the right point, and so on, it draws 16 × 16 full
Point.
Furthermore, can in the mapping relations established in computer equipment between element (with character representation) and type matrix,
The type matrix is for recording element expressed by the character.
For the mapping relations of the elements such as text and type matrix, the character library in operating system has preset mapping relations, can
The mapping relations are multiplexed, for the mapping relations of the elements such as expression and type matrix, a manager can be independently arranged and be managed.
Furthermore, example of the Chinese character as text, Chinese character are generally stored inside in the Chinese character base of operating system, commonly
Chinese character base has HZK16, HZK24, HZK32 etc., i.e. dot matrix is 16*16,24*24,32*32 etc..Dot matrix small scale, resolution ratio is poor,
Unsightly, the word and the complex form of Chinese characters of some strokes complexity are difficult to indicate font, but required memory capacity is small, it is easy to accomplish;Dot matrix rule
Mould is big, then high resolution, and font is beautiful, but required memory capacity is big.
For expression, expression can be converted to type matrix, it is identical in the dot matrix of type matrix and the dot matrix size of text, alternatively,
The size of the dot matrix of type matrix is the mean size of the dot matrix of the scintilla, and limits the color of each point in the dot matrix of type matrix, makes
It is managed with expression manager.
After computer equipment receives character string, each character that parsing character string includes is looked into the mapping relations
Look for the corresponding type matrix of the character.
For barrage data, type matrix is used to record the element in barrage data.
S104, the type matrix is loaded in an image data.
In the concrete realization, in the memory of computer equipment, a frame image data is generated, it is corresponding to calculate each character
Type matrix reads the lattice information of type matrix according to this address, typesetting is carried out in the image data in the storage address of memory.
Using the text in FreeType as the example of type matrix, after rendering type, the bitmap of generation is just exactly text
Size, so several parameters for typesetting are as follows needing to carry out typesetting to it later on bitmap copy to image data:
Metrics.height indicates the height of every a line, generates after corresponding text size is arranged, every a line
Text all do not exceed this range.
Metrics.ascender indicates the height on top, while can also calculate the height of baseline, for baseline
The alignment of character.
Metrics.horiAdvance indicates the width of each text.
Bitmap.pitch indicates the pixel quantity of the every row of bitmap generated.
Bitmap.rows indicates the line number of the bitmap generated.
Bitmap_left, the distance of expression bitmap to text left margin.
Bitmap_top, the distance of expression bitmap to text coboundary.
If if being replication orgin with the upper left corner (x, y), in order to align text, then copy-point should be:
Pos_x=x+bitmap_left
Pos_y=y+ascender-bitmap_top
S105, using described image data as barrage data, display on the multi-medium data.
In practical applications, when playing multi-medium data, it can be taken out from memory on suitable opportunity and be loaded with type matrix
Image data, be shown on multi-medium data.
By taking the scene of live streaming as an example, as shown in figure 3, computer equipment calls video player to play live data, connecing
The character string for receiving live streaming platform, that is, can be exchanged into barrage data, real-time display is on the picture of live data.
The embodiment of the present invention plays multi-medium data, receives character string, the character of the character string is for indicating barrage data
In element, determine the type matrix for recording the element, the type matrix loaded in an image data, using image data as barrage
Data are shown on multi-medium data, as a whole by the element in barrage data, figure are loaded onto the form of type matrix
As to show as barrage data, avoiding and carrying out cutting to barrage data in data, wash with watercolours integrally can be carried out to barrage data
Dye, without repeatedly occupying the component for rendering, operand is few, reduces resource cost.
Embodiment two
Fig. 4 is a kind of flow chart of method for showing barrage data provided by Embodiment 2 of the present invention, before the present embodiment
Based on stating embodiment, further increase determining type matrix, in image data load type matrix processing operation.This method is specifically wrapped
Include following steps:
S401, multi-medium data is played.
S402, character string is received.
Wherein, the character of character string is used to indicate the element in barrage data.
If S403, the character do not include placeholder, it is determined that the character expresses text, searches and records the text
Type matrix.
If S404, the character include placeholder, it is determined that the character expresses expression, searches the word for recording the expression
Mould.
In the present embodiment, the element in barrage data includes text and/or expression.
General coded representation, such as Unicode16 can be used in character string, for text, can be converted directly into corresponding volume
Code, can be according to the specification of coding, customized placeholder for expression.
For example, the expression of an expression " laughing at ", customized escape character is "/{ dx ", and placeholder is " 0xE000 ", it is assumed that one
A barrage data are " ' laughing at ' AA ", and being converted to character string is "/{ dxAA ", then the character string in memory is " 0x2f 0x7B 0x64
0x78 0x41 0x41 ", the character string in memory is " 0xE000 0x41 0x41 " after treatment.
Therefore, computer equipment parses the character in character string, judges whether character is to account for after receiving character string
Position symbol searches the corresponding type matrix of the placeholder (expression) if it is, determining the character representation expression from expression manager,
If it is not, then determining the character representation text, pass through FreeType/Window Api GetGlyphOutline/
The libraries such as IDWriteFontFace or interface search the corresponding type matrix of the character (text).
Furthermore, in order to be adapted to different texts, keep the consistency of barrage data can for the same expression
Design the type matrix of a plurality of different sizes (such as height, width).
When searching the type matrix for recording espressiove, it may be determined that the first size of the type matrix of text is (the such as first height, first wide
Degree etc.), so that it is determined that the second size (such as height, width) being adapted to first size.
For example, the average value (such as average height, mean breadth) of first size is calculated, with closest to the ruler of the average value
It is very little to be used as the second size.
In the multiple type matrixes for recording the expression, the type matrix for meeting second size is searched.
S405, creation can accommodate the image data of the type matrix.
In the memory of computer, a bitmap can be created, as image data, for accommodating all type matrixes.
In the concrete realization, the first width and the first height for determining all type matrixes, create image data to this, wherein
Image data has the second width and the second height, the second width the sum of more than or equal to first width, the second height be greater than or
Equal to the first all height.
In general, the size of the image data can be slightly larger than all type matrixes, to economize on resources.
Therefore, a deviant can be increased on the basis of the sum of first width, the second width is obtained, maximum first
Increase another deviant on the basis of height, obtains the second height.
S406, position of the type matrix in described image data is determined.
Each character has had sequence in character string, on the image data according to the sequence by the corresponding type matrix of each character
Typesetting, so that it is determined that coordinate of each type matrix in image data, as its position.
S407, the color for determining type matrix.
For expression, when designing its type matrix, the color of its defined dot matrix, is recorded in expression manager together with type matrix
In.
Therefore, if the element in barrage data is expression, the face of the type matrix can be directly inquired from expression manager
Color.
For text, color index table can be preset, grey level and transparency, color are recorded in the color index table
Between mapping relations.
In one example, for color by taking rgb space as an example, the partial information in color index table is as follows:
| Level | Index | Alpha | Red | Green | Blue |
| 5 | 3 | 153 | 60 | 38 | 120 |
| 65 | 10 | 39 | 39 | 9 | 31 |
| 255 | 200 | 200 | 78 | 50 | 156 |
Wherein, Level indicate grey level, Index indicate index value, dot matrix gray values (value range be 0~
Level-1), Alpha indicates transparency.
In this example, the color of some Index indicates:
ShowColor [Index]=((TxColor-BkColor)/Level) * Index
Wherein, TxColor indicates text color (including red value Red, green value Green, blue valve Blue),
BkColor indicates background color color (including red value Red, green value Green, blue valve Blue).
Therefore, if the element in barrage data is text, the grey level of text can be determined, in color index table
Determine the color of grey level mapping, the color as type matrix.
It, can be by issuing the user setting of the text for the color of text (type matrix), it can also be by browsing the text
User setting, etc., the present embodiment are without restriction to this.
S408, preset texture interface is called to carry out texture mapping to described image data, using as barrage data, display
On the multi-medium data.
One group of component, such as DirectX are configured in computer equipment, which the multimedia for being built in hardware can be used to add
Fast device function.
The component provides one or more texture interfaces, if TEXTURE1D is (for indicating the texture resource class of 1D data
Type), TEXTURE2D (for indicating the texture resource type of 2D data), TEXTURE3D (for indicate 3D data texture provide
Source Type), texture interface is commonly used in one certain types of image data of management.
Image data is written in the corresponding slot of texture interface, is rendered, is shown in the components such as incoming Sharder
On multi-medium data.
Embodiment three
Fig. 5 is a kind of flow chart of the method for display barrage data that the embodiment of the present invention one provides, and the present embodiment can fit
The case where for showing barrage data when playing multi-medium data, this method can be held by the device of display barrage data
Row, the device can be configurable in computer equipment by software and or hardware realization, as mobile phone, tablet computer, intelligence are worn
The mobile terminals such as equipment are worn, and, the immobile terminals such as PC, TV, this method specifically comprises the following steps:
S501, one interface of display.
Wherein, interface is for showing multi-medium data.
In the concrete realization, an interface is shown in computer equipment, as in Android (Android) system view (depending on
Figure), player plays multi-medium data is called in the interface.
S502, barrage data are shown on the multi-medium data.
Wherein, barrage data are image data, and image data is for loading type matrix, and type matrix is for recording in barrage data
Element.
In the concrete realization, another interface can be shown on the interface of display multi-medium data, such as Android (Android)
View (view) in system, the interface transparent and the interface for covering display multi-medium data.
In the interface, barrage data are shown, so that forming effect of the barrage data on multi-medium data.
The embodiment of the present invention shows an interface, which shows on multi-medium data for showing multi-medium data
Barrage data, the barrage data are image data, and the image data is for loading type matrix, and the type matrix is for recording the barrage number
Element in as a whole by the element in barrage data is loaded onto image data in the form of type matrix, to make
It is shown for barrage data, avoids and cutting is carried out to barrage data, integrally barrage data can be rendered, without repeatedly occupying
For the component of rendering, operand is few, reduces resource cost.
In one embodiment of the invention, S502 includes:
Character string is received, the character of the character string is used to indicate the element in barrage data;
Determine type matrix, the type matrix is for recording the element;
The type matrix is loaded in an image data;
Using described image data as barrage data, display on the multi-medium data.
Optionally, the element in the barrage data includes text and/or expression;
The determining type matrix, comprising:
If the character does not include placeholder, it is determined that the character expresses text, searches the type matrix for recording the text;
If the character includes placeholder, it is determined that the character expresses expression, searches the type matrix for recording the expression.
It is optionally, described to search the type matrix for recording the expression, comprising:
Determine the first size of the type matrix of the text;
Determine the second size being adapted to the first size;
In the multiple type matrixes for recording the expression, the type matrix for meeting second size is searched.
It is optionally, described that the type matrix is loaded in an image data, comprising:
Creation can accommodate the image data of the type matrix;
Determine position of the type matrix in described image data;
Determine the color of the type matrix.
Optionally, the creation can accommodate the image data of the type matrix, comprising:
Determine the first width and the first height of the type matrix;
Image data is created, described image data have the second width and the second height, and second width is greater than or waits
In the sum of described first width, second height is greater than or equal to first height.
Optionally, the color of the determination type matrix, comprising:
If the element is text, it is determined that the grey level of the text;
Determine the color of the grey level mapping, the color as the type matrix.
Optionally, it is described using described image data as barrage data, display on the multi-medium data, comprising:
Call preset texture interface to described image data carry out texture mapping, using as barrage data, be shown in institute
It states on multi-medium data.
In embodiments of the present invention, since S502 and the application of embodiment one, embodiment two are substantially similar, so description
Fairly simple, related place illustrates that the embodiment of the present invention is not subject in detail herein referring to the part of embodiment one, embodiment two
It states.
Example IV
Fig. 6 is a kind of structural schematic diagram of the device for display barrage data that the embodiment of the present invention four provides, device tool
Body may include following module:
Multi-medium data playing module 601, for playing multi-medium data;
Character string receiving module 602, for receiving character string, the character of the character string is for indicating in barrage data
Element;
Type matrix determining module 603, for determining type matrix, the type matrix is for recording the element;
Type matrix loading module 604, for loading the type matrix in an image data;
Image data display module 605 is used for using described image data as barrage data, display in the multimedia number
On.
In one embodiment of the invention, the element in the barrage data includes text and/or expression;
The type matrix determining module 603 includes:
Text search submodule, if not including placeholder for the character, it is determined that the character expresses text, searches
Record the type matrix of the text;
Expression searches submodule, if including placeholder for the character, it is determined that the character expresses expression, searches note
Carry the type matrix of the expression.
In one embodiment of the invention, the expression lookup submodule includes:
First size determination unit, the first size of the type matrix for determining the text;
Second size determination unit, for determining the second size being adapted to the first size;
Size searching unit, for searching the word for meeting second size in the multiple type matrixes for recording the expression
Mould.
In one embodiment of the invention, the type matrix loading module 604 includes:
Image data creates submodule, for creating the image data that can accommodate the type matrix;
Position determination submodule, for determining position of the type matrix in described image data;
Color determines submodule, for determining the color of the type matrix.
In one embodiment of the invention, described image data creation submodule includes:
The high determination unit of width, for determining the first width and the first height of the type matrix;
The high creating unit of width, for creating image data, described image data have the second width and the second height, described
Second width is greater than or equal to the sum of described first width, and second height is greater than or equal to first height.
In one embodiment of the invention, the color determines that submodule includes:
Grey level determination unit, if being text for the element, it is determined that the grey level of the text;
Sample color map unit, the color for determining the color of the grey level mapping, as the type matrix.
In one embodiment of the invention, described image data disaply moudle 605 includes:
Texture mapping submodule, for calling preset texture interface to carry out texture mapping to described image data, to make
For barrage data, it is shown on the multi-medium data.
Provided by the embodiment of the present invention it is a kind of show barrage data device can be performed any embodiment of that present invention mentioned
A kind of method of the display barrage data supplied, has the corresponding functional module of execution method and beneficial effect.
The embodiment of the present invention plays multi-medium data, receives character string, the character of the character string is for indicating barrage data
In element, determine the type matrix for recording the element, the type matrix loaded in an image data, using image data as barrage
Data are shown on multi-medium data, as a whole by the element in barrage data, figure are loaded onto the form of type matrix
As to show as barrage data, avoiding and carrying out cutting to barrage data in data, wash with watercolours integrally can be carried out to barrage data
Dye, without repeatedly occupying the component for rendering, operand is few, reduces resource cost.
Embodiment five
Fig. 7 is a kind of structural schematic diagram of the device for display barrage data that the embodiment of the present invention five provides, device tool
Body may include following module:
Interface display component 701, for showing an interface, the interface is for showing multi-medium data;
Barrage data display component 702, for showing barrage data on the multi-medium data;
Wherein, the barrage data are image data, and described image data are for loading type matrix, and the type matrix is for recording
Element in the barrage data.
In one embodiment of the invention, the barrage data display component 702 includes:
Character string receiving module, for receiving character string, the character of the character string is used to indicate the member in barrage data
Element;
Type matrix determining module, for determining type matrix, the type matrix is for recording the element;
Type matrix loading module, for loading the type matrix in an image data;
Image data display module be used for using described image data as barrage data, show the multi-medium data it
On.
In one embodiment of the invention, the element in the barrage data includes text and/or expression;
The type matrix determining module includes:
Text search submodule, if not including placeholder for the character, it is determined that the character expresses text, searches
Record the type matrix of the text;
Expression searches submodule, if including placeholder for the character, it is determined that the character expresses expression, searches note
Carry the type matrix of the expression.
In one embodiment of the invention, the expression lookup submodule includes:
First size determination unit, the first size of the type matrix for determining the text;
Second size determination unit, for determining the second size being adapted to the first size;
Size searching unit, for searching the word for meeting second size in the multiple type matrixes for recording the expression
Mould.
In one embodiment of the invention, the type matrix loading module includes:
Image data creates submodule, for creating the image data that can accommodate the type matrix;
Position determination submodule, for determining position of the type matrix in described image data;
Color determines submodule, for determining the color of the type matrix.
In one embodiment of the invention, described image data creation submodule includes:
The high determination unit of width, for determining the first width and the first height of the type matrix;
The high creating unit of width, for creating image data, described image data have the second width and the second height, described
Second width is greater than or equal to the sum of described first width, and second height is greater than or equal to first height.
In one embodiment of the invention, the color determines that submodule includes:
Grey level determination unit, if being text for the element, it is determined that the grey level of the text;
Sample color map unit, the color for determining the color of the grey level mapping, as the type matrix.
In one embodiment of the invention, described image data disaply moudle includes:
Texture mapping submodule, for calling preset texture interface to carry out texture mapping to described image data, to make
For barrage data, it is shown on the multi-medium data.
Provided by the embodiment of the present invention it is a kind of show barrage data device can be performed any embodiment of that present invention mentioned
A kind of method of the display barrage data supplied, has the corresponding functional module of execution method and beneficial effect.
The embodiment of the present invention shows an interface, which shows on multi-medium data for showing multi-medium data
Barrage data, the barrage data are image data, and the image data is for loading type matrix, and the type matrix is for recording the barrage number
Element in as a whole by the element in barrage data is loaded onto image data in the form of type matrix, to make
It is shown for barrage data, avoids and cutting is carried out to barrage data, integrally barrage data can be rendered, without repeatedly occupying
For the component of rendering, operand is few, reduces resource cost.
Embodiment six
Fig. 8 is a kind of structural schematic diagram for computer equipment that the embodiment of the present invention six provides.As shown in figure 8, the calculating
Machine equipment includes processor 800, memory 801, communication module 802, input unit 803 and output device 804;Computer equipment
The quantity of middle processor 800 can be one or more, in Fig. 8 by taking a processor 800 as an example;Processing in computer equipment
Device 800, memory 801, communication module 802, input unit 803 and output device 804 can be connected by bus or other modes
It connects, in Fig. 8 for being connected by bus.
Memory 801 is used as a kind of computer readable storage medium, can be used for storing software program, journey can be performed in computer
Sequence and module, if the corresponding module of one of the present embodiment connection method is (for example, a kind of display barrage as shown in FIG. 6
Multi-medium data playing module 601, character string receiving module 602, type matrix determining module 603, type matrix in the device of data add
Carry module 604 and image data display module 605;Alternatively, the interface in a kind of device of display barrage data as shown in Figure 7
Display component 701 and barrage data display component 702).The software journey that processor 800 is stored in memory 801 by operation
Sequence, instruction and module realize above-mentioned one kind thereby executing the various function application and data processing of computer equipment
Connection method.
Memory 801 can mainly include storing program area and storage data area, wherein storing program area can store operation system
Application program needed for system, at least one function;Storage data area, which can be stored, uses created number according to computer equipment
According to etc..In addition, memory 801 may include high-speed random access memory, it can also include nonvolatile memory, such as extremely
A few disk memory, flush memory device or other non-volatile solid state memory parts.In some instances, memory 801
It can further comprise the memory remotely located relative to processor 800, these remote memories can be by being connected to the network extremely
Computer equipment.The example of above-mentioned network include but is not limited to internet, intranet, local area network, mobile radio communication and its
Combination.
Communication module 802 for establishing connection with display screen, and realizes the data interaction with display screen.Input unit 803
It can be used for receiving the number or character information of input, and generate related with the user setting of computer equipment and function control
Key signals input.
The display barrage data that any embodiment of the present invention provides can be performed in a kind of computer equipment provided in this embodiment
Method, specific corresponding function and beneficial effect.
Embodiment eight
The embodiment of the present invention eight also provides a kind of computer readable storage medium, is stored thereon with computer program, the journey
A kind of method for showing barrage data is realized when sequence is executed by processor.
In one embodiment, this method comprises:
Play multi-medium data;
Character string is received, the character of the character string is used to indicate the element in barrage data;
Determine type matrix, the type matrix is for recording the element;
The type matrix is loaded in an image data;
Using described image data as barrage data, display on the multi-medium data.
In another embodiment, this method comprises:
Show an interface, the interface is for showing multi-medium data;
Barrage data are shown on the multi-medium data;
Wherein, the barrage data are image data, and described image data are for loading type matrix, and the type matrix is for recording
Element in the barrage data.
Certainly, computer readable storage medium provided by the embodiment of the present invention, computer program are not limited to institute as above
The related behaviour in the method for display barrage data provided by any embodiment of the invention can also be performed in the method operation stated
Make.
By the description above with respect to embodiment, it is apparent to those skilled in the art that, the present invention
It can be realized by software and required common hardware, naturally it is also possible to which by hardware realization, but in many cases, the former is more
Good embodiment.Based on this understanding, technical solution of the present invention substantially in other words contributes to the prior art
Part can be embodied in the form of software products, which can store in computer readable storage medium
In, floppy disk, read-only memory (Read-Only Memory, ROM), random access memory (Random such as computer
Access Memory, RAM), flash memory (FLASH), hard disk or CD etc., including some instructions are with so that a computer is set
Standby (can be personal computer, server or the network equipment etc.) executes method described in each embodiment of the present invention.
It is worth noting that, in the embodiment of the device of above-mentioned display barrage data, included each unit and module
It is only divided according to the functional logic, but is not limited to the above division, as long as corresponding functions can be realized;
In addition, the specific name of each functional unit is also only for convenience of distinguishing each other, the protection scope being not intended to restrict the invention.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that
The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention
It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also
It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.
Claims (12)
1. a kind of method for showing barrage data characterized by comprising
Play multi-medium data;
Character string is received, the character of the character string is used to indicate the element in barrage data;
Determine type matrix, the type matrix is for recording the element;
The type matrix is loaded in an image data;
Using described image data as barrage data, display on the multi-medium data.
2. the method according to claim 1, wherein the element in the barrage data includes text and/or table
Feelings;
The determining type matrix, comprising:
If the character does not include placeholder, it is determined that the character expresses text, searches the type matrix for recording the text;
If the character includes placeholder, it is determined that the character expresses expression, searches the type matrix for recording the expression.
3. according to the method described in claim 2, it is characterized in that, described search the type matrix for recording the expression, comprising:
Determine the first size of the type matrix of the text;
Determine the second size being adapted to the first size;
In the multiple type matrixes for recording the expression, the type matrix for meeting second size is searched.
4. the method according to claim 1, wherein described load the type matrix in an image data, comprising:
Creation can accommodate the image data of the type matrix;
Determine position of the type matrix in described image data;
Determine the color of the type matrix.
5. according to the method described in claim 4, it is characterized in that, the creation can accommodate the image data of the type matrix, packet
It includes:
Determine the first width and the first height of the type matrix;
Image data is created, described image data have the second width and the second height, and second width is greater than or equal to institute
The sum of first width is stated, second height is greater than or equal to first height.
6. according to the method described in claim 4, it is characterized in that, the color of the determination type matrix, comprising:
If the element is text, it is determined that the grey level of the text;
Determine the color of the grey level mapping, the color as the type matrix.
7. method according to claim 1-6, which is characterized in that described using described image data as barrage number
According to, be shown on the multi-medium data, comprising:
Call preset texture interface to described image data carry out texture mapping, using as barrage data, be shown in it is described more
On media data.
8. a kind of method for showing barrage data characterized by comprising
Show an interface, the interface is for showing multi-medium data;
Barrage data are shown on the multi-medium data;
Wherein, the barrage data are image data, and for described image data for loading type matrix, the type matrix is described for recording
Element in barrage data.
9. a kind of device for showing barrage data characterized by comprising
Multi-medium data playing module, for playing multi-medium data;
Character string receiving module, for receiving character string, the character of the character string is used to indicate the element in barrage data;
Type matrix determining module, for determining type matrix, the type matrix is for recording the element;
Type matrix loading module, for loading the type matrix in an image data;
Image data display module is used for using described image data as barrage data, display on the multi-medium data.
10. a kind of device for showing barrage data characterized by comprising
Interface display component, for showing an interface, the interface is for showing multi-medium data;
Barrage data display component, for showing barrage data on the multi-medium data;
Wherein, the barrage data are image data, and for described image data for loading type matrix, the type matrix is described for recording
Element in barrage data.
11. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor
Calculation machine program, which is characterized in that the processor realizes such as display described in any one of claims 1-8 when executing described program
The method of barrage data.
12. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor
The method such as display barrage data described in any one of claims 1-8 is realized when execution.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910285574.0A CN110012338A (en) | 2019-04-10 | 2019-04-10 | A kind of method, apparatus, computer equipment and storage medium showing barrage data |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910285574.0A CN110012338A (en) | 2019-04-10 | 2019-04-10 | A kind of method, apparatus, computer equipment and storage medium showing barrage data |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN110012338A true CN110012338A (en) | 2019-07-12 |
Family
ID=67170820
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910285574.0A Pending CN110012338A (en) | 2019-04-10 | 2019-04-10 | A kind of method, apparatus, computer equipment and storage medium showing barrage data |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110012338A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111586489A (en) * | 2020-06-22 | 2020-08-25 | 腾讯科技(深圳)有限公司 | Barrage rendering method and device, computer equipment and storage medium |
| CN112449230A (en) * | 2019-08-28 | 2021-03-05 | 腾讯数码(天津)有限公司 | Character string display processing method, device, terminal and storage medium |
| CN114531607A (en) * | 2021-12-14 | 2022-05-24 | 北京奇艺世纪科技有限公司 | Bullet screen display method, device, equipment and storage medium |
Citations (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101833542A (en) * | 2010-04-21 | 2010-09-15 | 中兴通讯股份有限公司 | Method and device for rendering fonts of user interface |
| CN102169423A (en) * | 2010-02-26 | 2011-08-31 | 腾讯科技(北京)有限公司 | Method and system for displaying characters |
| CN105597321A (en) * | 2015-12-18 | 2016-05-25 | 武汉斗鱼网络科技有限公司 | Barrage display method and system in full-screen game state |
| CN105872679A (en) * | 2015-12-31 | 2016-08-17 | 乐视网信息技术(北京)股份有限公司 | Barrage display method and device |
| CN105933783A (en) * | 2016-05-16 | 2016-09-07 | 北京三快在线科技有限公司 | Bullet screen play method and device and terminal equipment |
| CN106341723A (en) * | 2016-09-30 | 2017-01-18 | 广州华多网络科技有限公司 | Bullet screen display method and apparatus |
| CN107135427A (en) * | 2017-03-28 | 2017-09-05 | 武汉斗鱼网络科技有限公司 | A kind of method and system for showing barrage information |
| CN107172474A (en) * | 2017-03-31 | 2017-09-15 | 武汉斗鱼网络科技有限公司 | A kind of utilization painting canvas draws the method and device of barrage |
| EP3264783A1 (en) * | 2016-06-29 | 2018-01-03 | Nokia Technologies Oy | Rendering of user-defined messages having 3d motion information |
| CN108322807A (en) * | 2018-02-24 | 2018-07-24 | 武汉斗鱼网络科技有限公司 | A kind of barrage methods of exhibiting and device |
| CN108966036A (en) * | 2018-06-26 | 2018-12-07 | 掌阅科技股份有限公司 | Barrage display methods, electronic equipment and computer storage medium |
-
2019
- 2019-04-10 CN CN201910285574.0A patent/CN110012338A/en active Pending
Patent Citations (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102169423A (en) * | 2010-02-26 | 2011-08-31 | 腾讯科技(北京)有限公司 | Method and system for displaying characters |
| CN101833542A (en) * | 2010-04-21 | 2010-09-15 | 中兴通讯股份有限公司 | Method and device for rendering fonts of user interface |
| CN105597321A (en) * | 2015-12-18 | 2016-05-25 | 武汉斗鱼网络科技有限公司 | Barrage display method and system in full-screen game state |
| CN105872679A (en) * | 2015-12-31 | 2016-08-17 | 乐视网信息技术(北京)股份有限公司 | Barrage display method and device |
| CN105933783A (en) * | 2016-05-16 | 2016-09-07 | 北京三快在线科技有限公司 | Bullet screen play method and device and terminal equipment |
| EP3264783A1 (en) * | 2016-06-29 | 2018-01-03 | Nokia Technologies Oy | Rendering of user-defined messages having 3d motion information |
| CN106341723A (en) * | 2016-09-30 | 2017-01-18 | 广州华多网络科技有限公司 | Bullet screen display method and apparatus |
| CN107135427A (en) * | 2017-03-28 | 2017-09-05 | 武汉斗鱼网络科技有限公司 | A kind of method and system for showing barrage information |
| CN107172474A (en) * | 2017-03-31 | 2017-09-15 | 武汉斗鱼网络科技有限公司 | A kind of utilization painting canvas draws the method and device of barrage |
| CN108322807A (en) * | 2018-02-24 | 2018-07-24 | 武汉斗鱼网络科技有限公司 | A kind of barrage methods of exhibiting and device |
| CN108966036A (en) * | 2018-06-26 | 2018-12-07 | 掌阅科技股份有限公司 | Barrage display methods, electronic equipment and computer storage medium |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112449230A (en) * | 2019-08-28 | 2021-03-05 | 腾讯数码(天津)有限公司 | Character string display processing method, device, terminal and storage medium |
| EP3934262A4 (en) * | 2019-08-28 | 2022-06-15 | Tencent Technology (Shenzhen) Company Limited | METHOD AND DEVICE FOR PROCESSING STRING DISPLAYS, TERMINAL AND STORAGE MEDIUM |
| CN114885202A (en) * | 2019-08-28 | 2022-08-09 | 腾讯数码(天津)有限公司 | Character string display processing method, device, terminal and storage medium |
| CN114885202B (en) * | 2019-08-28 | 2024-12-10 | 腾讯数码(天津)有限公司 | String display processing method, device, terminal and storage medium |
| CN111586489A (en) * | 2020-06-22 | 2020-08-25 | 腾讯科技(深圳)有限公司 | Barrage rendering method and device, computer equipment and storage medium |
| CN114531607A (en) * | 2021-12-14 | 2022-05-24 | 北京奇艺世纪科技有限公司 | Bullet screen display method, device, equipment and storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106611435B (en) | Animation processing method and device | |
| CN109949391B (en) | Image-text drawing method, image-text drawing device, electronic equipment and storage medium | |
| US8669998B1 (en) | Selection of colors | |
| CN110012338A (en) | A kind of method, apparatus, computer equipment and storage medium showing barrage data | |
| CN110245469A (en) | Watermark generation method, watermark analytic method, device and the storage medium of webpage | |
| US20250384613A1 (en) | Building Group Rendering in Virtual Environments | |
| CN107066440A (en) | Input control method and system for vertical text | |
| WO2024098525A1 (en) | Video-text mutual retrieval method and apparatus, training method and apparatus for video-text mutual retrieval model, and device and medium | |
| US10311060B2 (en) | Glyph management in texture atlases | |
| CN117915088A (en) | Video processing method, video processing device, electronic equipment and computer readable storage medium | |
| CN106898351B (en) | Control method and device for large screen | |
| CN111190519A (en) | File and control processing method, device, equipment and storage medium thereof | |
| Benthin et al. | Real‐Time Ray Tracing of Micro‐Poly Geometry with Hierarchical Level of Detail | |
| CN114118045A (en) | Report form access method, device, storage medium and computer equipment | |
| CN117635741A (en) | Image generation method and device | |
| CN117376660A (en) | Subtitle element rendering method, device, equipment, medium and program product | |
| CN111258434A (en) | Method, device, equipment and storage medium for inserting pictures into chat interface | |
| CN112802134B (en) | Coding method, device and terminal of three-dimensional model | |
| CN107204024A (en) | Handle the method and device of sequence of pictures frame | |
| CN115019138A (en) | Video subtitle erasing, model training and interaction method, device and storage medium | |
| CN111739112A (en) | Image processing method, device, computer equipment and storage medium | |
| CN111399788A (en) | Media file playing method and media file playing device | |
| CN116011421A (en) | A table rendering method and device | |
| CN113779483B (en) | Page component generation method and device, storage medium and computer equipment | |
| CN111199138A (en) | Stroke method, system, server and storage medium for barrage containing Emoji expressions using QML |
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 | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190712 |
|
| RJ01 | Rejection of invention patent application after publication |