CN108174276B - Bullet screen display method and display device - Google Patents

Bullet screen display method and display device Download PDF

Info

Publication number
CN108174276B
CN108174276B CN201810007120.2A CN201810007120A CN108174276B CN 108174276 B CN108174276 B CN 108174276B CN 201810007120 A CN201810007120 A CN 201810007120A CN 108174276 B CN108174276 B CN 108174276B
Authority
CN
China
Prior art keywords
bullet screen
character strings
cached
display
sliding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810007120.2A
Other languages
Chinese (zh)
Other versions
CN108174276A (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.)
Shanghai IQIYI New Media Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201810007120.2A priority Critical patent/CN108174276B/en
Publication of CN108174276A publication Critical patent/CN108174276A/en
Application granted granted Critical
Publication of CN108174276B publication Critical patent/CN108174276B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/488Data services, e.g. news ticker
    • H04N21/4884Data services, e.g. news ticker for displaying subtitles
    • 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
    • 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/485End-user interface for client configuration
    • H04N21/4854End-user interface for client configuration for modifying image parameters, e.g. image brightness, contrast
    • 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/485End-user interface for client configuration
    • H04N21/4858End-user interface for client configuration for modifying screen layout parameters, e.g. fonts, size of the windows

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Controls And Circuits For Display Device (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention provides a bullet screen display method and a bullet screen display device, wherein the method comprises the following steps: caching the received character strings containing the comment information, and determining the number of the cached character strings when caching the character strings aiming at each character string; extracting the cached character string and analyzing comment information in the character string; converting the obtained comment information into a bullet screen, determining the display length of the bullet screen, and caching the converted bullet screen; for each cached bullet screen, determining the sliding time of the bullet screen based on the determined number of the cached character strings and the display length of the bullet screen; and according to the determined sliding time of each bullet screen, sliding and displaying the cached bullet screens. Therefore, the sliding time of the bullet screen converted by each character string can be dynamically adjusted according to the number of the received character strings, the overstock of user evaluation information is avoided, and a user can see the published bullet screen in time.

Description

Bullet screen display method and display device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a bullet screen display method and a display device.
Background
A bullet screen refers to content displayed on a video, usually appearing on the video in a scrolling manner, and may be a comment made by a user for a video being viewed. In the prior art, in a process of playing a video at a client, a server receives real-time comment information uploaded by different users for the video, converts the comment information into a character string in a JSON (JavaScript Object Notation) data format, the server sends the character string to the client playing the video, the client receives and caches the character string, extracts the cached character string according to the caching time sequence of each character string, analyzes the comment information in the character string, converts the comment information into a bullet screen, and displays the bullet screen on the video in a sliding manner at a fixed speed.
However, the inventor finds that the prior art has at least the following problems in the process of implementing the invention:
in the existing bullet screen display method, each bullet screen is displayed in a sliding manner on a video at a fixed speed, and because the display speed of each bullet screen is fixed and unchanged in the prior art, the sliding time of each bullet screen can only be regularly changed along with the length of the bullet screen, and a client cannot dynamically adjust the sliding time of the bullet screen converted by each character string. When a client receives a large number of character strings containing comment information within a period of time, the character strings received subsequently are cached, the number of the cached character strings is increased, and if each bullet screen is still displayed at a fixed sliding speed, overstocking of user evaluation information is caused, so that the user-published bullet screen can be displayed after a long time of a plot.
Disclosure of Invention
The embodiment of the invention aims to provide a bullet screen display method, which can be used for dynamically adjusting the sliding time of each bullet screen. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a bullet screen display method, which is applied to a client, and the method includes:
caching the received character strings containing the comment information, and determining the number of the cached character strings when caching the character strings aiming at each character string;
extracting the cached character string and analyzing comment information in the character string;
converting the obtained comment information into a bullet screen, determining the display length of the bullet screen, and caching the converted bullet screen;
for each cached bullet screen, determining the sliding time of the bullet screen based on the determined number of the cached character strings and the display length of the bullet screen, wherein the sliding time of the bullet screen is reduced along with the increase of the determined number of the current cached character strings and is increased along with the increase of the display length of the bullet screen;
and according to the determined sliding time of each bullet screen, sliding and displaying the cached bullet screens.
Optionally, the extracting the cached character string and analyzing comment information in the character string includes:
extracting a plurality of cached character strings according to the time sequence of the cached character strings, and analyzing comment information in the extracted character strings;
or extracting a plurality of cached character strings according to the priority order of the character strings, and analyzing the comment information in the extracted character strings.
Optionally, the determining, for each cached bullet screen, the sliding time of the bullet screen based on the determined number of the cached character strings and the display length of the bullet screen, where the sliding time of the bullet screen decreases as the determined number of the currently cached character strings increases and increases as the display length of the bullet screen increases includes:
determining the sliding time of the bullet screen by the following formula:
Figure BDA0001538994840000021
in the formula, TiRepresents the sliding time of the bullet screen, W represents the length of the bullet screen display area, WiIndicating said bullet screen display length, TmaxIndicates the maximum number of character string buffers, BnIndicating the number of buffered character strings, lambdanDenotes a first coefficient, λwRepresenting the second coefficient.
Optionally, the sliding the cached bullet screens according to the determined sliding time of each bullet screen includes:
according to the determined sliding time of the first bullet screen, the cached first bullet screen is displayed in a sliding mode;
after the first bullet screen slides its self length and at least first distance, the second bullet screen of the buffer memory is displayed in a sliding mode, wherein the first bullet screen and the adjacent buffer memory of the second bullet screen are arranged, and the first distance is the non-overlapping minimum distance of the first bullet screen and the second bullet screen.
Optionally, after the first barrage slides its own length and at least a first distance, the second barrage that slides and displays the cache includes:
determining the first distance by the following equation:
Figure BDA0001538994840000031
in the formula, WgDenotes a first distance, W denotes a length of a bullet screen display area, WaIndicating the first bullet screen display length, TaRepresents the sliding time of the first bullet screen, WbIndicating the second bullet screen display length, TbIndicating the slide time of the second bullet screen.
Optionally, the caching the received multiple character strings containing the comment information, and before determining, for each character string, the number of cached character strings when caching the character string, the method further includes:
receiving a plurality of character strings containing comment information sent by a server, judging whether the number of the received character strings in unit time is smaller than a preset threshold value, if so, converting the character strings into a bullet screen, and displaying the bullet screen in a sliding mode according to a preset speed.
In a second aspect, an embodiment of the present invention provides a bullet screen display device, where the device includes:
the first caching module is used for caching the received character strings containing the comment information, and determining the number of the cached character strings when the character strings are cached aiming at each character string;
the analysis module is used for extracting the cached character strings and analyzing comment information in the character strings;
the second cache module is used for converting the obtained comment information into a bullet screen, determining the display length of the bullet screen and caching the converted bullet screen;
the determining module is used for determining the sliding time of each cached bullet screen based on the determined number of the cached character strings and the display length of the bullet screen, wherein the sliding time of the bullet screen is reduced along with the increase of the determined number of the current cached character strings and is increased along with the increase of the display length of the bullet screen;
and the first display module is used for sliding and displaying the cached bullet screens according to the determined sliding time of each bullet screen.
Optionally, the parsing module is specifically configured to:
extracting a plurality of cached character strings according to the time sequence of the cached character strings, and analyzing comment information in the extracted character strings;
or extracting a plurality of cached character strings according to the priority order of the character strings, and analyzing the comment information in the extracted character strings.
Optionally, the determining module is specifically configured to:
determining the sliding time of the bullet screen by the following formula:
Figure BDA0001538994840000041
in the formula, TiRepresents the sliding time of the bullet screen, W represents the length of the bullet screen display area, WiIndicating said bullet screen display length, TmaxIndicates the maximum number of character string buffers, BnIndicating the number of buffered character strings, lambdanDenotes a first coefficient, λwRepresenting the second coefficient.
Optionally, the second display module includes:
the first display submodule is used for sliding and displaying the cached first bullet screen according to the determined sliding time of the first bullet screen;
and the second display submodule is used for sliding and displaying a second bullet screen of the cache after the first bullet screen slides the length of the first bullet screen and at least a first distance, wherein the first bullet screen and the second bullet screen are adjacent in cache, and the first distance is the non-overlapping minimum distance between the first bullet screen and the second bullet screen.
Optionally, the second display sub-module is specifically configured to:
determining the first distance by the following equation:
Figure BDA0001538994840000042
in the formula, WgRepresenting a first distanceW represents the length of the bullet screen display area, WaIndicating the first bullet screen display length, TaRepresents the sliding time of the first bullet screen, WbIndicating the second bullet screen display length, TbIndicating the slide time of the second bullet screen.
Optionally, the apparatus further comprises:
and the second display module is used for receiving the character strings containing the comment information sent by the server, judging whether the number of the received character strings in unit time is smaller than a preset threshold value, converting the character strings into the bullet screen if the number of the received character strings in unit time is smaller than the preset threshold value, and displaying the bullet screen in a sliding mode according to a preset speed.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any one of the steps of the bullet screen display method when the program stored in the memory is executed.
In yet another aspect of the present invention, there is also provided a computer-readable storage medium having instructions stored therein, which when run on a computer, cause the computer to execute any one of the bullet screen display methods described above.
In another aspect of the present invention, the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute any one of the bullet screen display methods described above.
According to the bullet screen display method and device provided by the embodiment of the invention, when each received character string is cached, the number of the currently cached character strings is determined, when the character strings are converted into the bullet screen, the display length of the bullet screen is determined, the sliding time of the bullet screen is determined based on the determined number of the cached character strings and the display length of the bullet screen, and because the number of the currently cached character strings is a dynamically changing numerical value, the client can dynamically adjust the sliding time of each bullet screen, so that the overstock of user evaluation information is avoided, and a user can timely see the published bullet screen. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a schematic flow chart of a bullet screen display method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a bullet screen sliding distance in a bullet screen display method according to an embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating sliding display of a cached bullet screen in a bullet screen display method according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating the display of two adjacent bullet screens in the bullet screen display method according to the embodiment of the present invention;
fig. 5 is a schematic diagram illustrating a non-overlapping limit condition of adjacent bullet screens in a bullet screen display method according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a bullet screen display device according to an embodiment of the present invention;
fig. 7 is another schematic structural diagram of a bullet screen display device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a second display module in a bullet screen display device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a bullet screen display system according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
In order to dynamically adjust the sliding time of each bullet screen, the embodiment of the invention provides a bullet screen display method, a display device and electronic equipment.
In the existing bullet screen display method, when a client displays bullet screens in a video, each bullet screen is generally displayed at a fixed sliding speed. The bullet screen has a certain length, when the bullet screen is displayed in a sliding mode, the head of the bullet screen usually slides from one side boundary of the video to appear, then slides to the other side boundary of the video until the tail of the bullet screen slides out of the boundary, and the bullet screen sliding display is completed. Because the length of each bullet screen is different, the sliding speed of the bullet screen is fixed, in the existing bullet screen display method, the sliding time of the bullet screen only changes along with the length rule of the bullet screen, when the bullet screen is long, the sliding time is prolonged, when the bullet screen is short, the sliding time is shortened, and the sliding time of the bullet screen cannot be dynamically adjusted according to the number of user comments received by a client. When a user publishes a large number of comments in a short time, the evaluation information of the user is overstocked, the user can display the barrage content published by the user after the plot is passed for a long time, and the user experience is poor.
Generally, in a bullet screen display method provided by an embodiment of the present invention, first, when caching each received character string, determining the number of currently cached character strings, and when converting a character string into a bullet screen, determining a display length of the bullet screen; and then, determining the sliding time of the bullet screen based on the determined number of the cached character strings and the display length of the bullet screen. Because the number of the current cached character strings is a dynamically changing numerical value, when the sliding time of each bullet screen is determined, the sliding time of each bullet screen can be dynamically adjusted by the client, so that overstocked user evaluation information is avoided, a user can see the published bullet screen in time, and the use experience of the user is improved.
Method embodiment
As shown in fig. 1, an embodiment of the present invention provides a bullet screen display method, which may be applied to a client that plays a video, and may also be applied to other types of devices having a data processing and computing function, where the process may include the following steps:
s101, caching the received character strings containing the comment information, and determining the number of the cached character strings when caching the character strings aiming at each character string.
In the embodiment of the present invention, the character string received by the client and sent by the server may be a binary character string in a JSON (JSON Object Notation) data format, where the JSON data format is a lightweight data exchange format. The above character string may carry comment information itself issued by the user, and information such as the user name, the user rank, the priority of the character string, and the like. As can be seen from the above, the character string received by the client includes not only the comment information but also other information. For example, the degree of importance of the comment information can be determined by the user name and the user rank corresponding to the comment information in the character string. Specifically, when the user level is a high level, the importance degree of the corresponding comment information is high.
In general, a client receives a plurality of character strings transmitted one by a server, and then buffers the received character strings. Specifically, the client may cache the received character strings in the form of a linked list. The character strings cached in the linked list can be extracted for bullet screen display, so that the caching quantity is reduced, and the caching quantity is increased by newly caching the character strings, so that the cached character strings are dynamic values. When caching a plurality of received character strings, the client can cache one character string every time, and determine the number of the character strings which are cached currently when caching the character strings once. The process of determining the number of the cache character strings is simple arithmetic calculation, and has little influence on the processing performance of the client.
As an optional implementation manner of the method embodiment of the present invention, sometimes, because the number of the character strings received by the client is not large, the character strings may be directly converted without buffering and the bullet screen may be displayed. Specifically, a number threshold may be set, which may be the maximum number of character strings that the program developer can process in a unit time by the client, as determined by the client performance. If the number of the character strings received by the client in unit time is larger than or equal to a preset threshold value, caching the received character strings, processing the character strings according to the bullet screen display method provided by the embodiment of the invention, and displaying the bullet screen; and if the number of the received character strings in the unit time of the client is less than a preset threshold value, directly converting the received character strings into the bullet screen, and sliding and displaying the bullet screen according to a preset speed. Wherein the preset speed may be fixed.
And S102, extracting the cached character strings and analyzing comment information in the character strings.
In the embodiment of the invention, the cached character string can be extracted from the linked list, and the comment information in the character string can be analyzed.
As an optional implementation manner of the method embodiment of the present invention, the cached character strings may be extracted one by one according to the time sequence of caching the character strings. For example, if the cache time of the character string a is 1 point, the cache time of the character string B is 1 point 01 minutes, and the cache time of the character string C is 1 point 02 minutes, the character string a is extracted first, then the character string B is extracted, and then the character string C is extracted. The mode of extracting the character strings according to the cache time can ensure that the comment contents of all users are converted into the bullet screen and displayed.
As mentioned above, the string may carry priority information to indicate the priority level of the string. As another optional implementation manner of the embodiment of the present invention, if it is required to preferentially display the bullet screens of the important users, the plurality of cached character strings may be extracted according to the priority order of the character strings. For example, a character string with a higher priority is extracted first, and then a character string with a lower priority is extracted, so that the character string with the higher priority is converted into a bullet screen earlier than the character string with the lower priority, and the bullet screen is displayed earlier.
Optionally, the lowest priority string cached in the linked list may be purged at intervals to avoid backlogging of cached low priority strings.
S103, converting the obtained comment information into a bullet screen, determining the display length of the bullet screen, and caching the converted bullet screen.
In the embodiment of the present invention, the process of converting the comment information into the bullet screen can be implemented by the existing bullet screen generation method, and details are not repeated herein. It is easy to understand that after the comment information is converted into the bullet screen, the display pixel value (i.e., the display length) of the bullet screen can be determined naturally.
After the comment information is converted into the barrage, the converted barrage can be cached. Specifically, the client may also cache the barrage in a form of a linked list, and store information related to display of each barrage, such as display length and sliding time of each barrage, in the linked list.
S104, for each cached bullet screen, determining the sliding time of the bullet screen based on the determined number of the currently cached character strings and the display length of the bullet screen, wherein the sliding time of the bullet screen is reduced along with the increase of the determined number of the currently cached character strings and is increased along with the increase of the display length of the bullet screen.
In the embodiment of the present invention, it is easy to understand that if the number of the currently cached character strings is larger, it indicates that the bullet screen required to be displayed is larger, and if the display length of the bullet screen is longer, it indicates that the sliding distance required by the bullet screen is longer. Therefore, when the number of the character strings which are cached increases, in order to display the cached bullet screens as soon as possible, the sliding time of each bullet screen can be shortened.
Specifically, the slide time of the bullet screen can be determined by the following formula:
Figure BDA0001538994840000091
wherein, TiRepresenting the sliding time of the bullet screen; w represents the length of the display area of the bullet screen, and is usually set according to the display length of the video, and specifically may be represented by a pixel value, for example, if the resolution of one video is 640 × 480, which indicates that the display length of the video is 640 pixels, the length of the display area of the bullet screen may be determined to be 800 pixels; wiThe bullet screen display length is expressed, and specifically, the bullet screen display length can be expressed by pixel values; as shown in FIG. 2, W and WiThe sum is the sliding distance of the bullet screen; t ismaxRepresents the maximumThe number of character string caches is usually set according to the storage space of a client; b isnIndicating the number of the cached character strings; lambda [ alpha ]nA first coefficient, usually set to a constant value, may be determined according to the quotient of the historical average string buffer count and the maximum string buffer count; lambda [ alpha ]wThe second coefficient, which is usually set to a constant value, may be determined based on the quotient of the historical average bullet screen display length and the length of the bullet screen display area. Through the first coefficient and the second coefficient, the sliding time of the bullet screen can be adjusted.
And S105, sliding and displaying the cached bullet screens according to the determined sliding time of each bullet screen.
In the embodiment of the invention, after the cached sliding time of each bullet screen is determined, each bullet screen can be displayed in a sliding mode one by one according to the determined sliding time. For example, if the determined slide time is 3 seconds, the display length of the bullet screen a is 20 pixels, the length of the display area of the bullet screen is 640 pixels, and the slide distance of the bullet screen a is 660 pixels, it can be calculated that the slide display of the bullet screen a can be completed within 3 seconds when the bullet screen a slides at 220 pixels/second.
Based on the bullet screen display method shown in fig. 1, in an optional implementation manner of the method embodiment of the present invention, the step S105 slides and displays the cached bullet screen according to the determined sliding time of each bullet screen, as shown in fig. 3, specifically, the method may include:
s1051, according to the determined sliding time of the first bullet screen, the first bullet screen cached is displayed in a sliding mode.
S1052, after the first bullet screen slides its own length and a first distance, sliding the second bullet screen that shows the buffer memory, wherein the first distance is the non-overlapping minimum distance of the first bullet screen and the second bullet screen.
In the embodiment of the present invention, the first bullet screen and the second bullet screen are two bullet screens cached adjacently in the linked list, as shown in fig. 4, the caching time of the first bullet screen is earlier than that of the second bullet screen, so that the first bullet screen is displayed earlier than the second bullet screen. There is a possible case where two bullet screens are superimposed if a first bullet screen is displayed followed by a second bullet screen. To avoidThe first bullet screen can slide for at least the first distance WgAnd then, the cached second bullet screen is displayed in a sliding manner, so that a certain distance exists between the second bullet screen and the first bullet screen, and the condition that two bullet screens are overlapped can not occur.
As shown in fig. 5, the limit that the first bullet screen does not overlap with the second bullet screen is that when the first bullet screen is just displayed completely (i.e. the tail just slides out of the display area), the head of the second bullet screen is just next to the tail of the first bullet screen. If the first bullet screen and the second bullet screen are not overlapped, the following conditions need to be met:
Figure BDA0001538994840000111
wherein, WgRepresenting a first distance; w represents the length of the bullet screen display area, and is usually set according to the length of the video, and may be specifically represented by a pixel value; vaRepresenting the sliding speed of the first bullet screen; vbIndicating the sliding speed of the second bullet screen.
Further, the sliding speed of the first bullet screen is:
Figure BDA0001538994840000112
wherein, TaRepresenting the sliding display time of the first bullet screen; waIndicating the display length of the first bullet screen; w represents the length of the bullet screen display area;
the sliding speed of the second bullet screen is as follows:
Figure BDA0001538994840000113
wherein, TbRepresenting the sliding display time of the second bullet screen; wbIndicating the display length of the second bullet screen; w represents the length of the bullet screen display area;
then the first distance can be deduced as:
Figure BDA0001538994840000114
wherein, WgRepresenting a first distance; w represents the length of the bullet screen display area, and is usually set according to the length of the video, and may be specifically represented by a pixel value; waThe first bullet screen display length is expressed, and specifically, the first bullet screen display length can be expressed in pixel values; t isaRepresenting the sliding time of the first bullet screen; wbThe second bullet screen display length is expressed, and specifically, the second bullet screen display length can be expressed by pixel values; t isbIndicating the slide time of the second bullet screen.
When the first bullet screen starts to slide and display, the sliding distance is at least Wa+WgWhen the second bullet screen slides next to the back of the first bullet screen, the second bullet screen and the first bullet screen can be ensured not to be overlapped when the first bullet screen slides and disappears.
According to the bullet screen display method provided by the embodiment of the invention, when each received character string is cached, the number of the currently cached character strings is determined, when the character strings are converted into the bullet screen, the display length of the bullet screen is determined, and the sliding time of the bullet screen is determined based on the determined number of the cached character strings and the display length of the bullet screen.
Device embodiment
Corresponding to the above method embodiment, an embodiment of the present invention further provides a bullet screen display device, as shown in fig. 6, including:
the first caching module 201 is configured to cache the received character strings including the comment information, and determine, for each character string, the number of cached character strings when the character string is cached;
the analysis module 202 is used for extracting the cached character strings and analyzing the comment information in the character strings;
the second cache module 203 is configured to convert the obtained comment information into a bullet screen, determine the display length of the bullet screen, and cache the converted bullet screen;
a determining module 204, configured to determine, for each cached bullet screen, a sliding time of the bullet screen based on the determined number of the cached character strings and the display length of the bullet screen, where the sliding time of the bullet screen decreases as the determined number of the currently cached character strings increases and increases as the display length of the bullet screen increases;
and the first display module 205 is configured to slide and display the cached bullet screens according to the determined sliding time of each bullet screen.
Optionally, the parsing module 202 is specifically configured to:
extracting a plurality of cached character strings according to the time sequence of the cached character strings, and analyzing comment information in the extracted character strings;
or extracting a plurality of cached character strings according to the priority order of the character strings, and analyzing the comment information in the extracted character strings.
Optionally, the determining module 204 is specifically configured to:
determining the sliding time of the bullet screen by the following formula:
Figure BDA0001538994840000131
in the formula, TiRepresents the sliding time of the bullet screen, W represents the length of the bullet screen display area, WiIndicating said bullet screen display length, TmaxIndicates the maximum number of character string buffers, BnIndicating the number of buffered character strings, lambdanDenotes a first coefficient, λwRepresenting the second coefficient.
As shown in fig. 7, an embodiment of the present invention further provides a bullet screen display device, and on the basis of the above device embodiment, the device according to the embodiment of the present invention may further include:
the second display module 206 is configured to receive a plurality of character strings containing comment information sent by the server, determine whether the number of the received character strings in unit time is smaller than a preset threshold, convert the character strings into a bullet screen if the number of the received character strings is smaller than the preset threshold, and display the bullet screen in a sliding manner at a preset speed.
Optionally, as shown in fig. 8, the second display module 206 includes:
the first display submodule 2061 is configured to slide and display the cached first bullet screen according to the determined sliding time of the first bullet screen;
the second display submodule 2062 is configured to slide the second bullet screen for displaying the cache after the first bullet screen slides its own length and at least a first distance, where the first bullet screen and the second bullet screen are cached adjacently, and the first distance is a minimum distance at which the first bullet screen and the second bullet screen do not overlap.
Optionally, the second display submodule 2062 is specifically configured to:
determining the first distance by the following equation:
Figure BDA0001538994840000132
in the formula, WgDenotes a first distance, W denotes a length of a bullet screen display area, WaIndicating the first bullet screen display length, TaRepresents the sliding time of the first bullet screen, WbIndicating the second bullet screen display length, TbIndicating the slide time of the second bullet screen.
According to the bullet screen display device provided by the embodiment of the invention, when each received character string is cached, the number of the currently cached character strings is determined, when the character strings are converted into the bullet screen, the display length of the bullet screen is determined, the sliding time of the bullet screen is determined based on the determined number of the cached character strings and the display length of the bullet screen, and the client can dynamically adjust the sliding time of each bullet screen because the number of the currently cached character strings is a dynamically changing numerical value.
As shown in fig. 9, an embodiment of the present invention further provides a bullet screen display system, including: a bullet screen function module 401 and a message function module 402, where the bullet screen function module 401 may be located at a client, and is configured to receive a character string sent by the message function module 402 and process a task related to a bullet screen; the message function module 402 may be located in a server, and is configured to send a character string containing comment information of the user to the bullet screen function module 401.
The bullet screen function module 401 includes: the display control sub-module 4010, the buffer sub-module 4011, the character string buffer unit 4012, the barrage buffer unit 4013, and the barrage message processing sub-module 4014.
The treatment process comprises the following steps: after receiving the (JSON format) character string, the bullet screen message processing submodule 4014 caches the character string in the character string cache unit 4012; when the character string is processed, the cached character string is extracted and processed into the bullet screen, the bullet screen is cached in the bullet screen caching unit 4013, the display control submodule 4010 obtains the bullet screen cached in the bullet screen caching unit 4013, the display time of the bullet screen is calculated, and the bullet screen is displayed on the screen. After the barrage is displayed, the view (view) of the barrage can be recovered and cached in the barrage caching unit 4013, after a new barrage is received, the recovered view is initialized again, the display content is reset to the new barrage, a new view object which is not stopped is avoided, and resource waste is avoided.
According to the bullet screen display system provided by the embodiment of the invention, when each received character string is cached, the number of the currently cached character strings is determined, when the character strings are converted into the bullet screen, the display length of the bullet screen is determined, and the sliding time of the bullet screen is determined based on the determined number of the cached character strings and the display length of the bullet screen.
An embodiment of the present invention further provides an electronic device, as shown in fig. 10, which includes a processor 301, a communication interface 302, a memory 303, and a communication bus 304, where the processor 301, the communication interface 302, and the memory 303 complete mutual communication through the communication bus 304,
a memory 303 for storing a computer program;
the processor 301, when executing the program stored in the memory 303, implements the following steps:
caching the received character strings containing the comment information, and determining the number of the cached character strings when caching the character strings aiming at each character string;
extracting the cached character string and analyzing comment information in the character string;
converting the obtained comment information into a bullet screen, determining the display length of the bullet screen, and caching the converted bullet screen;
for each cached bullet screen, determining the sliding time of the bullet screen based on the determined number of the cached character strings and the display length of the bullet screen, wherein the sliding time of the bullet screen is reduced along with the increase of the determined number of the current cached character strings and is increased along with the increase of the display length of the bullet screen;
and according to the determined sliding time of each bullet screen, sliding and displaying the cached bullet screens.
According to the electronic device provided by the embodiment of the invention, when each received character string is cached, the number of the currently cached character strings is determined, when the character strings are converted into the bullet screen, the display length of the bullet screen is determined, and the sliding time of the bullet screen is determined based on the determined number of the cached character strings and the display length of the bullet screen.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment of the present invention, a computer-readable storage medium is further provided, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer is caused to execute the bullet screen display method in any one of the above embodiments.
In another embodiment of the present invention, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute the bullet screen display method according to any one of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (11)

1. A bullet screen display method is applied to a client side, and comprises the following steps:
caching the received character strings containing the comment information, and determining the number of the cached character strings when caching the character strings aiming at each character string;
extracting the cached character string and analyzing comment information in the character string;
converting the obtained comment information into a bullet screen, determining the display length of the bullet screen, and caching the converted bullet screen;
for each cached bullet screen, determining the sliding time of the bullet screen based on the determined number of the cached character strings and the display length of the bullet screen, wherein the sliding time of the bullet screen is reduced along with the increase of the determined number of the current cached character strings and is increased along with the increase of the display length of the bullet screen;
according to the determined sliding time of each bullet screen, the cached bullet screens are displayed in a sliding mode;
the bullet screen to each buffer memory, based on the number of the determined buffered character strings and the display length of the bullet screen, determines the sliding time of the bullet screen, wherein the sliding time of the bullet screen decreases as the number of the determined current buffered character strings increases and increases as the display length of the bullet screen increases, and the bullet screen comprises:
determining the sliding time of the bullet screen by the following formula:
Figure FDA0002616654720000011
in the formula, TiRepresents the sliding time of the bullet screen, W represents the length of the bullet screen display area, WiIndicating said bullet screen display length, TmaxIndicates the maximum number of character string buffers, BnIndicating a cached wordNumber of strings, λnDenotes a first coefficient, λwRepresenting the second coefficient.
2. The bullet screen display method according to claim 1, wherein said extracting the cached character string and analyzing comment information in the character string comprises:
extracting a plurality of cached character strings according to the time sequence of the cached character strings, and analyzing comment information in the extracted character strings;
or extracting a plurality of cached character strings according to the priority order of the character strings, and analyzing the comment information in the extracted character strings.
3. The bullet screen display method according to claim 1, wherein said sliding displaying the buffered bullet screens according to the determined sliding time of each bullet screen comprises:
according to the determined sliding time of the first bullet screen, the cached first bullet screen is displayed in a sliding mode;
after the first bullet screen slides its self length and at least first distance, the second bullet screen of the buffer memory is displayed in a sliding mode, wherein the first bullet screen and the adjacent buffer memory of the second bullet screen are arranged, and the first distance is the non-overlapping minimum distance of the first bullet screen and the second bullet screen.
4. The bullet screen display method according to claim 3, wherein said sliding the second bullet screen for displaying the buffer memory after the first bullet screen slides its own length and at least a first distance comprises:
determining the first distance by the following equation:
Figure FDA0002616654720000021
in the formula, WgDenotes a first distance, W denotes a length of a bullet screen display area, WaIndicating the first bullet screen display length, TaRepresents the sliding time of the first bullet screen, WbIndicating the second bulletLength of screen display, TbIndicating the slide time of the second bullet screen.
5. The bullet screen display method according to claim 1, wherein said caching the received plurality of character strings containing comment information, and before determining, for each character string, the number of cached character strings at the time of caching the character string, said method further comprises:
receiving a plurality of character strings containing comment information sent by a server, judging whether the number of the received character strings in unit time is smaller than a preset threshold value, if so, converting the character strings into a bullet screen, and displaying the bullet screen in a sliding mode according to a preset speed.
6. A bullet screen display device, characterized in that the device comprises:
the first caching module is used for caching the received character strings containing the comment information, and determining the number of the cached character strings when the character strings are cached aiming at each character string;
the analysis module is used for extracting the cached character strings and analyzing comment information in the character strings;
the second cache module is used for converting the obtained comment information into a bullet screen, determining the display length of the bullet screen and caching the converted bullet screen;
the determining module is used for determining the sliding time of each cached bullet screen based on the determined number of the cached character strings and the display length of the bullet screen, wherein the sliding time of the bullet screen is reduced along with the increase of the determined number of the current cached character strings and is increased along with the increase of the display length of the bullet screen;
the first display module is used for sliding and displaying the cached bullet screens according to the determined sliding time of each bullet screen;
the determining module is specifically configured to:
determining the sliding time of the bullet screen by the following formula:
Figure FDA0002616654720000031
in the formula, TiRepresents the sliding time of the bullet screen, W represents the length of the bullet screen display area, WiIndicating said bullet screen display length, TmaxIndicates the maximum number of character string buffers, BnIndicating the number of buffered character strings, lambdanDenotes a first coefficient, λwRepresenting the second coefficient.
7. The bullet screen display device of claim 6, wherein the parsing module is specifically configured to:
extracting a plurality of cached character strings according to the time sequence of the cached character strings, and analyzing comment information in the extracted character strings;
or extracting a plurality of cached character strings according to the priority order of the character strings, and analyzing the comment information in the extracted character strings.
8. The bullet screen display device of claim 6, wherein said first display module comprises:
the first display submodule is used for sliding and displaying the cached first bullet screen according to the determined sliding time of the first bullet screen;
and the second display submodule is used for sliding and displaying a second bullet screen of the cache after the first bullet screen slides the length of the first bullet screen and at least a first distance, wherein the first bullet screen and the second bullet screen are adjacent in cache, and the first distance is the non-overlapping minimum distance between the first bullet screen and the second bullet screen.
9. The bullet screen display device according to claim 8, wherein the second display submodule is specifically configured to:
determining the first distance by the following equation:
Figure FDA0002616654720000041
in the formula, WgDenotes a first distance, W denotes a length of a bullet screen display area, WaIndicating the first bullet screen display length, TaRepresents the sliding time of the first bullet screen, WbIndicating the second bullet screen display length, TbIndicating the slide time of the second bullet screen.
10. The bullet screen display device of claim 6 wherein said device further comprises:
and the second display module is used for receiving the character strings containing the comment information sent by the server, judging whether the number of the received character strings in unit time is smaller than a preset threshold value, converting the character strings into the bullet screen if the number of the received character strings in unit time is smaller than the preset threshold value, and displaying the bullet screen in a sliding mode according to a preset speed.
11. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
CN201810007120.2A 2018-01-04 2018-01-04 Bullet screen display method and display device Active CN108174276B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810007120.2A CN108174276B (en) 2018-01-04 2018-01-04 Bullet screen display method and display device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810007120.2A CN108174276B (en) 2018-01-04 2018-01-04 Bullet screen display method and display device

Publications (2)

Publication Number Publication Date
CN108174276A CN108174276A (en) 2018-06-15
CN108174276B true CN108174276B (en) 2020-10-20

Family

ID=62517294

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810007120.2A Active CN108174276B (en) 2018-01-04 2018-01-04 Bullet screen display method and display device

Country Status (1)

Country Link
CN (1) CN108174276B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108932128A (en) * 2018-07-03 2018-12-04 武汉斗鱼网络科技有限公司 A kind of conversion method of message format, device, storage medium and android terminal
CN108933968B (en) * 2018-07-03 2022-02-08 武汉斗鱼网络科技有限公司 Message format conversion method and device, storage medium and android terminal
CN109413504B (en) * 2018-09-30 2021-04-09 武汉斗鱼网络科技有限公司 Bullet screen checking method, device, terminal and storage medium based on character string replacement
CN109413484B (en) * 2018-12-29 2022-05-10 咪咕文化科技有限公司 Bullet screen display method and device and storage medium
CN110231867A (en) * 2019-05-31 2019-09-13 重庆爱奇艺智能科技有限公司 The method and apparatus of the display properties of barrage are adjusted in virtual reality device
CN110365848B (en) * 2019-07-26 2021-04-13 维沃移动通信有限公司 Message display method and device
CN111596834B (en) * 2019-09-06 2020-12-15 深圳新为云动教育科技有限公司 Video playing APP control system
CN110781343B (en) * 2019-10-25 2024-03-08 广州酷狗计算机科技有限公司 Method, device, equipment and storage medium for displaying comment information of music
CN113495664A (en) * 2020-04-02 2021-10-12 腾讯科技(深圳)有限公司 Information display method, device, equipment and storage medium based on media information stream

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104994425A (en) * 2015-06-30 2015-10-21 北京奇艺世纪科技有限公司 Video labeling method and device
CN105847940A (en) * 2016-05-24 2016-08-10 武汉斗鱼网络科技有限公司 Bullet screen display control method and apparatus
CN105898603A (en) * 2015-12-15 2016-08-24 乐视网信息技术(北京)股份有限公司 Voice danmaku generation method and device
CN105959818A (en) * 2016-07-01 2016-09-21 上海幻电信息科技有限公司 Bullet screen display method and display system
CN105979341A (en) * 2016-06-23 2016-09-28 武汉斗鱼网络科技有限公司 Bullet curtain moving speed acquisition method and bullet curtain moving speed acquisition device
CN106371834A (en) * 2016-08-30 2017-02-01 广州新博庭网络信息科技股份有限公司 Method and device for displaying bullet screen data
CN107295387A (en) * 2017-06-16 2017-10-24 北京潘达互娱科技有限公司 Barrage display methods and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104994425A (en) * 2015-06-30 2015-10-21 北京奇艺世纪科技有限公司 Video labeling method and device
CN105898603A (en) * 2015-12-15 2016-08-24 乐视网信息技术(北京)股份有限公司 Voice danmaku generation method and device
CN105847940A (en) * 2016-05-24 2016-08-10 武汉斗鱼网络科技有限公司 Bullet screen display control method and apparatus
CN105979341A (en) * 2016-06-23 2016-09-28 武汉斗鱼网络科技有限公司 Bullet curtain moving speed acquisition method and bullet curtain moving speed acquisition device
CN105959818A (en) * 2016-07-01 2016-09-21 上海幻电信息科技有限公司 Bullet screen display method and display system
CN106371834A (en) * 2016-08-30 2017-02-01 广州新博庭网络信息科技股份有限公司 Method and device for displaying bullet screen data
CN107295387A (en) * 2017-06-16 2017-10-24 北京潘达互娱科技有限公司 Barrage display methods and device

Also Published As

Publication number Publication date
CN108174276A (en) 2018-06-15

Similar Documents

Publication Publication Date Title
CN108174276B (en) Bullet screen display method and display device
US11709661B2 (en) Representing result data streams based on execution of data stream language programs
US10620816B2 (en) System for displaying elements of a scrollable list
CN111159436B (en) Method, device and computing equipment for recommending multimedia content
CN109040230B (en) File downloading method, device, equipment/terminal/server and storage medium
CN109388317B (en) Picture loading method, terminal device and storage medium
US10742763B2 (en) Data limit aware content rendering
US20110126113A1 (en) Displaying content on multiple web pages
US20240184975A1 (en) Adaptive content delivery
US20190114989A1 (en) Systems and methods for image optimization
CN111538557B (en) Barrage rendering method based on cascading style sheet and related equipment
US10650025B2 (en) Method and apparatus for checking and updating data on a client terminal
US8780120B2 (en) GPU self throttling
CN112131493A (en) Page first screen time determining method and device, electronic equipment and storage medium
JPWO2015107672A1 (en) Image processing program, image processing method, and image processing apparatus
US10796079B1 (en) Generating a page layout based upon analysis of session variables with respect to a client device
CN110177150A (en) Data acquisition method and device, electronic equipment and readable storage medium
CN114740975A (en) Target content acquisition method and related equipment
CN109429101A (en) The desktop loading method and device of Interactive Internet TV
CN108874938B (en) Data rolling method and device, front-end equipment, background server and medium
CN111163138B (en) Method, device and server for reducing network load during game
CN114428582B (en) Image generation method and electronic equipment
CN113129067B (en) Information screening method, apparatus, device, storage medium and computer program product
US11457287B2 (en) Method and system for processing video
CN114511535A (en) White screen detection method and device, electronic equipment, medium and product

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240207

Address after: 200335 room 205, floor 2, building 9, No. 365, Linhong Road, Changning District, Shanghai

Patentee after: Shanghai iqiyi New Media Technology Co.,Ltd.

Country or region after: China

Address before: 10 / F and 11 / F, Hongcheng development building, 2 Haidian North 1st Street, Haidian District, Beijing 100080

Patentee before: BEIJING QIYI CENTURY SCIENCE & TECHNOLOGY Co.,Ltd.

Country or region before: China