CN113259742B - Video bullet screen display method and device, readable storage medium and computer equipment - Google Patents

Video bullet screen display method and device, readable storage medium and computer equipment Download PDF

Info

Publication number
CN113259742B
CN113259742B CN202010086947.4A CN202010086947A CN113259742B CN 113259742 B CN113259742 B CN 113259742B CN 202010086947 A CN202010086947 A CN 202010086947A CN 113259742 B CN113259742 B CN 113259742B
Authority
CN
China
Prior art keywords
coordinate
grid
video image
bullet screen
barrage
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
CN202010086947.4A
Other languages
Chinese (zh)
Other versions
CN113259742A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010086947.4A priority Critical patent/CN113259742B/en
Publication of CN113259742A publication Critical patent/CN113259742A/en
Application granted granted Critical
Publication of CN113259742B publication Critical patent/CN113259742B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • H04N21/4314Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations for fitting data in a restricted space on the screen, e.g. EPG data in a rectangular grid
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • H04N21/4316Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations for displaying supplemental content in a region of the screen, e.g. an advertisement in a separate window
    • 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/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Marketing (AREA)
  • General Engineering & Computer Science (AREA)
  • Controls And Circuits For Display Device (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application relates to a video bullet screen display method, a device, a computer readable storage medium and a computer apparatus, wherein the method comprises the following steps: receiving triggering operation on a video image, and determining the corresponding position of the triggering operation on the video image; acquiring bullet screen information generated according to the position, and determining the size of the bullet screen information; determining a grid area corresponding to the barrage information on the video image according to the position and the size of the barrage information; and when the grid area is in an idle state, displaying the barrage information in the grid area. The scheme provided by the application can avoid overlapping display of barrage information.

Description

Video bullet screen display method and device, readable storage medium and computer equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a video bullet screen display method, a video bullet screen display device, a computer readable storage medium, and a computer device.
Background
With the development of computer technology, people can share resources through a network and comment on various music, pictures and videos through a bullet screen. For example, while watching a video, a user may send a bullet screen for a video that he likes or dislikes, an object in a video, or a scene in a video to post his opinion.
However, in many cases, multiple bullet screens that occur simultaneously may overlap, resulting in the bullet screen content being blocked and not fully displayed.
Disclosure of Invention
Based on this, it is necessary to provide a video bullet screen display method, apparatus, computer-readable storage medium and computer device for the technical problem that the content cannot be completely displayed due to bullet screen superposition.
A video bullet screen display method, comprising:
receiving triggering operation on a video image, and determining the corresponding position of the triggering operation on the video image;
acquiring bullet screen information generated according to the position, and determining the size of the bullet screen information;
determining a grid area corresponding to the barrage information on the video image according to the position and the size of the barrage information;
and when the grid area is in an idle state, displaying the barrage information in the grid area.
A video bullet screen display device, the device comprising:
the receiving module is used for receiving triggering operation on the video image and determining the corresponding position of the triggering operation on the video image;
the acquisition module is used for acquiring the barrage information generated according to the position and determining the size of the barrage information;
The determining module is used for determining a grid area corresponding to the barrage information on the video image according to the position and the size of the barrage information;
and the first display module is used for displaying the barrage information in the grid area when the grid area is in an idle state.
A video bullet screen display method, comprising:
entering a barrage editing interface based on triggering operation of the video image, and inputting barrage information in the barrage editing interface;
moving the barrage information to the video image, and determining a target position of the barrage information on the video image after the moving operation is stopped;
and displaying the barrage information at the target position of the video image.
A video bullet screen display device, the device comprising:
the input module is used for entering a barrage editing interface based on triggering operation of the video image, and inputting barrage information in the barrage editing interface;
the moving module is used for moving the barrage information to the video image and determining the target position of the barrage information on the video image after the moving operation is stopped;
and the second display module is used for displaying the barrage information at the target position of the video image.
A computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
receiving triggering operation on a video image, and determining the corresponding position of the triggering operation on the video image;
acquiring bullet screen information generated according to the position, and determining the size of the bullet screen information;
determining a grid area corresponding to the barrage information on the video image according to the position and the size of the barrage information;
and when the grid area is in an idle state, displaying the barrage information in the grid area.
A computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
entering a barrage editing interface based on triggering operation of the video image, and inputting barrage information in the barrage editing interface;
moving the barrage information to the video image, and determining a target position of the barrage information on the video image after the moving operation is stopped;
and displaying the barrage information at the target position of the video image.
A computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of:
receiving triggering operation on a video image, and determining the corresponding position of the triggering operation on the video image;
acquiring bullet screen information generated according to the position, and determining the size of the bullet screen information;
determining a grid area corresponding to the barrage information on the video image according to the position and the size of the barrage information;
and when the grid area is in an idle state, displaying the barrage information in the grid area.
A computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of:
entering a barrage editing interface based on triggering operation of the video image, and inputting barrage information in the barrage editing interface;
moving the barrage information to the video image, and determining a target position of the barrage information on the video image after the moving operation is stopped;
And displaying the barrage information at the target position of the video image.
The video barrage display method, the video barrage display device, the computer readable storage medium and the computer equipment are used for determining the corresponding position of the triggering operation on the video image by receiving the triggering operation on the video image, acquiring barrage information generated according to the position, determining the size of barrage information, and determining the corresponding grid area of the barrage information on the video image according to the position and the size of the barrage information so as to determine whether the grid area occupied by the barrage information is available. When the grid area is in an idle state, bullet screen information is displayed in the grid area, overlapping among bullet screen information is avoided, and the content of each bullet screen can be completely presented in the video playing process.
Drawings
FIG. 1 is a diagram of an application environment for a video bullet screen display method in one embodiment;
FIG. 2 is a flow chart of a video barrage display method according to one embodiment;
FIG. 3 is a flowchart illustrating a step of determining a grid area corresponding to bullet screen information on a video image according to a position and a size of bullet screen information in one embodiment;
FIG. 4 is a schematic diagram of an interface for determining a grid area corresponding to bullet screen information in one embodiment;
FIG. 5 is an interface diagram of determining a grid area corresponding to bullet screen information according to another embodiment;
FIG. 6 is a flowchart illustrating a step of determining a grid area corresponding to the bullet screen information on the video image according to the first coordinates and the number of grids corresponding to the bullet screen information in one embodiment;
FIG. 7 is a flow diagram of determining the status of a grid region in one embodiment;
FIG. 8 is a schematic diagram of an interface where bullet screen information overlaps in one embodiment;
FIG. 9 is a flowchart of a video barrage display method according to another embodiment;
FIG. 10 is a block diagram of a video bullet screen display device in one embodiment;
FIG. 11 is a block diagram of a video bullet screen display device according to another embodiment;
FIG. 12 is a block diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
FIG. 1 is a diagram of an application environment of a video barrage display method in one embodiment. Referring to fig. 1, the video bullet screen display method is applied to a video bullet screen display system. The video bullet screen display system includes a terminal 110 and a server 120. The terminal 110 and the server 120 are connected through a network. The terminal 110 may be a desktop terminal or a mobile terminal, and the mobile terminal may be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The server 120 may be implemented as a stand-alone server or as a server cluster composed of a plurality of servers.
In this embodiment, the terminal 110 receives a video playing instruction of a user, and sends the video playing instruction to the server 120. The server 120 returns the video file corresponding to the video play instruction to the terminal 110. The terminal 110 receives the video file and starts playing the video. Next, when the terminal 110 receives a trigger operation of the user on the video image at the time of current playing, it determines a corresponding position of the trigger operation on the video image. The terminal 110 acquires the bullet screen information generated by the user at the position corresponding to the trigger operation, and determines the size of the bullet screen information. Then, the terminal 110 determines a grid area corresponding to the bullet screen information on the video image according to the position and the size of the bullet screen information. When the grid area is in the idle state, the terminal 110 displays the barrage information in the grid area. The terminal 110 may then establish a mapping relationship between the bullet screen information and the video image. Further, the terminal 110 may establish a mapping relationship between the position on the video image and the bullet screen information, and store the video image, the bullet screen information, and the mapping relationship between the position on the video image and the bullet screen information to the server 120.
In one embodiment, as shown in FIG. 2, a video bullet screen display method is provided. The present embodiment is mainly exemplified by the application of the method to the terminal 110 in fig. 1. Referring to fig. 2, the video bullet screen display method specifically includes the following steps:
Step 202, receiving a triggering operation on a video image, and determining a corresponding position of the triggering operation on the video image.
Specifically, the terminal receives a video playing instruction of a user, acquires a corresponding video file according to the video playing instruction of the user, and plays the video file. In the video playing process, when the terminal receives the triggering operation of the user on the currently played video image, the position of the triggering operation of the user on the video image can be determined. The triggering operation includes, but is not limited to, an operation triggered by a user clicking on a location in the video image.
And 204, acquiring bullet screen information generated according to the position, and determining the size of the bullet screen information.
The bullet screen refers to comment captions popped up when a video is watched on a network. The size of the bullet screen information refers to the size of the bullet screen information, and may be specifically represented by pixels of the bullet screen information. For example, the size of the barrage information is 498px x 220.4px, and px refers to Pixel. A pixel refers to the basic primary color element and its basic coding of gray scale, and is a minimum unit in an image represented by a digital sequence.
Specifically, during the video playing process, the user may post comment subtitles for the scene of interest to the user and display the comments subtitles on the video image. Further, the user can trigger any position in the currently played video image and comment on the position triggered by the user. For example, a user may be interested in eyes currently playing a dominant corner in a video image, may click on the eyes of the dominant corner, and make targeted comments at the locations of the eyes.
The user generates corresponding bullet screen information at a location of interest on the video image. And the terminal acquires the barrage information corresponding to the position and determines the size of the barrage information. Further, the terminal may determine a pixel size of the barrage information.
And 206, determining a grid area corresponding to the barrage information on the video image according to the position and the size of the barrage information.
Specifically, the terminal divides the video image into grids. And determining the size of the area occupied by the barrage information in the grid corresponding to the video image according to the position on the video image and the size of the barrage information corresponding to the position, and obtaining the grid area corresponding to the barrage information on the video image.
Step 208, when the grid area is in an idle state, displaying the bullet screen information in the grid area.
Wherein the idle state indicates that the grid area is not occupied by other barrage information.
Specifically, after determining the grid area corresponding to the video image, the terminal may determine the state of the grid area to determine whether the grid area is available. The states of the grid region may include an idle state and a non-idle state. And when the terminal detects that the grid area is in an idle state, indicating that the grid area is available, displaying the barrage information in the grid area by the terminal.
In this embodiment, by receiving a triggering operation on a video image, a corresponding position of the triggering operation on the video image is determined, so that a user may publish corresponding barrage information for a position of interest in the video image. And acquiring the barrage information generated according to the position, determining the size of the barrage information, and determining the grid area corresponding to the barrage information on the video image according to the position and the size of the barrage information so as to determine whether the grid area occupied by the barrage information is available. When the grid area is in an idle state, bullet screen information is displayed in the grid area, overlapping among bullet screen information is avoided, and the content of each bullet screen can be completely presented in the video playing process. And, the bullet screen information and the corresponding position are associated, so that the problem that bullet screen information and video playing progress are not consistent can be avoided.
In one embodiment, the method further comprises: acquiring pixels of a video image; the video image is divided into grids according to pixels of the video image.
The pixels of the video image refer to the size of the video image, for example, the size of the video image is 1080px×1920px, which means that the width of the video image is 1080px, and the height of the video image is 1920px.
Specifically, the terminal determines the pixel size of the currently played video image, establishes a rectangular coordinate system according to the edge of the video image, and takes the horizontal direction as the x-axis and the vertical direction as the y-axis. The terminal divides the video image into grids according to the pixel size of the video image and the horizontal direction and the vertical direction.
Further, the terminal may divide the video image according to a vertical direction, divide the video image into a first number of copies, divide the video image according to a horizontal direction on the divided video image, and divide the divided video image into a second number of copies, where the first number of copies and the second number of copies may be the same or different. For example, the terminal divides the video image into 25 parts in the vertical direction and 18 parts in the vertical direction.
In this embodiment, after the terminal divides the video image into grids, the number of grids after division may be determined, and the pixels of a single grid may be calculated according to the pixels of the video image and the number of grids after division.
For example, a video image having a height of 1920px and a width of 1080px is divided into 25 parts in the y-axis direction and 18 parts in the x-axis direction, and then the video image is divided into 450 grids. The pixels of the video image occupied by each grid are 60px by 76.8px.
In this embodiment, by acquiring pixels of a video image, the video image is divided into grids according to the pixels of the video image, and the pixel size represented by each grid can be determined. The video image is divided into grids, which grids are occupied and which grids are available can be accurately determined, and therefore the display of the barrage can be guaranteed not to overlap.
In one embodiment, as shown in fig. 3, the determining the grid area corresponding to the bullet screen information on the video image according to the position and the size of the bullet screen information includes:
step 302, obtaining a pixel corresponding to the position, and obtaining a pixel of a single grid.
Specifically, after determining a position on the video image where the user triggers an operation, the terminal determines a pixel on the video image at the position. The terminal acquires the grids divided by the video image and acquires pixels represented by the single grids.
Step 304, determining a first coordinate of the position in the grid according to the pixel corresponding to the position and the pixel of the single grid.
Specifically, the terminal can calculate what grid the position is in the grid corresponding to the video image by dividing the pixel corresponding to the position by the pixel of the single grid according to the pixel corresponding to the position and the pixel of the single grid.
Further, the first coordinate is an integer. When the value obtained by dividing the pixel corresponding to the position by the pixel of the single grid is an integer, the integer is the first coordinate of the position in the grid. When the number obtained by dividing the pixel corresponding to the position by the pixel of the single grid contains decimal, the number after the decimal point is omitted, and the integer part of the number is taken as the first coordinate of the position in the grid.
Further, the terminal may divide the abscissa in the pixels of the location by the abscissa in the pixels of the single grid to obtain the abscissa of the location in the grid. The terminal may divide the ordinate in the pixels of the location by the ordinate in the pixels of the single grid to obtain the ordinate of the location in the grid, thereby obtaining the first coordinate.
For example, the corresponding position of the trigger operation of the user in the video image is point a, and the pixel of point a is 372px×783.36px. The pixels of a single grid are 60px 76.8px. The y coordinate of a is 783.36px, and point a is 783.36/76.8=10.2 grids in the vertical direction, i.e., point a is in the 10 th grid of the y-axis. The x coordinate of a is 372px, then 372/60=6.2 grids in the horizontal direction, i.e., the a point is in the 6 th grid of the x axis, and the first coordinate of the a point is (6, 10).
Step 306, determining the number of grids corresponding to the barrage information according to the pixels of the single grid and the size of the barrage information.
Specifically, the terminal acquires the size of the bullet screen information, which can be represented by pixels. The terminal divides the pixels of the barrage information by the pixels of the single grid, and the grid number corresponding to the barrage information can be calculated.
Further, the terminal may divide the pixel width of the bullet screen information by the pixel width of the single grid to obtain the number of grids occupied by the bullet screen information in the horizontal direction of the grids. Dividing the pixel height of the barrage information by the pixel height of a single grid to obtain the number of grids occupied by the barrage information in the vertical direction in the grids. And when the calculated grid number in the horizontal direction or in the vertical direction is not an integer, rounding up. For example, if it is calculated that the bullet screen information occupies 8.3 grids in the horizontal direction, 9 is rounded up. And calculating that the barrage information occupies 2.67 grids in the vertical direction, and rounding upwards to obtain 3.
And then, multiplying the grid number occupied by the bullet screen information in the horizontal direction and the grid number occupied in the vertical direction of the grids by the terminal, wherein the calculated area is the grid number corresponding to the bullet screen information.
Step 308, determining a grid area corresponding to the bullet screen information on the video image according to the first coordinate and the grid number corresponding to the bullet screen information.
Specifically, the terminal takes the first coordinate as a starting point of the barrage information in the grids, and calculates the other three coordinates of the barrage information according to the number of grids corresponding to the barrage information so as to determine the grid area corresponding to the barrage information on the video image.
For example, continuing with the above example, as shown in fig. 4, the coordinates in the grid are calculated to be (6, 10) at the start point corresponding to the trigger position of the point a, the pixels of the single grid are 60px×76.8px, and the user generates a barrage size for the point a which is 498px×220.4px, so that the length of 498/60=8.3 grids is required in the horizontal direction. Since the grids are all integrally formed and cannot be divided, the grids need to be taken up by an integer, i.e. 9 grids long. Similarly, a length of 220.4/76.8=2.67 grids is required in the vertical direction, and the length of the grids is rounded up, namely 3 grids. The total number of grids needed is 9*3 =27.
Because the bullet screen information at point a requires 9*3 grids to be fully displayed, starting at (6, 10) grids, it is necessary to detect if the 6 th-15 grids on the abscissa and the 10 th-13 grids on the ordinate are available.
In this embodiment, as shown in fig. 5, when the 6 th to 15 th grids and the 10 th to 13 th grids on the abscissa are both available, the bullet screen information may be directly displayed in the grid area, and the grid area may be marked as a non-idle state.
In this embodiment, the first coordinate of the position in the grid is accurately calculated according to the pixel corresponding to the position and the pixel of the single grid by acquiring the pixel corresponding to the position and acquiring the pixel of the single grid, so that the starting point coordinate of the barrage information in the grid is accurately determined. According to the pixel of the single grid and the size of the barrage information, the number of the grids corresponding to the barrage information can be calculated, so that the occupied area of the barrage information in the grids is calculated. According to the first coordinates serving as the starting points and the grid quantity corresponding to the bullet screen information, the other three vertex coordinates of the bullet screen information in the grids can be accurately calculated, and therefore the grid area corresponding to the bullet screen information on the video image can be rapidly and accurately calculated.
In one embodiment, as shown in fig. 6, the determining, according to the first coordinate and the grid number corresponding to the bullet screen information, the grid area corresponding to the bullet screen information on the video image includes:
Step 602, determining a first grid number corresponding to the bullet screen information in the horizontal direction and a second grid number corresponding to the bullet screen information in the vertical direction.
Specifically, the terminal may divide the pixel width of the bullet screen information by the pixel width of the single grid to obtain the first grid number occupied by the bullet screen information in the horizontal direction of the grid. Dividing the pixel height of the barrage information by the pixel height of the single grid to obtain the second grid number occupied by the barrage information in the vertical direction in the grid.
Further, when the grid number occupied by the bullet screen information in the horizontal direction and the grid number occupied in the vertical direction of the grids are non-integer, rounding up is performed, and the first grid number and the second grid number are obtained.
Step 604, moving the first coordinate by a first grid number in the horizontal direction to obtain a second coordinate.
Specifically, the terminal may use the first coordinate as a starting point of the bullet screen information, and move the first coordinate by a first grid number in the horizontal direction to obtain the second coordinate. Further, the terminal may move the first grid number in a horizontal direction on the left of the first coordinate with the first coordinate as a starting point to obtain the second coordinate. Or the first grid is moved in the horizontal direction to the right of the first coordinate by the first grid amount to obtain the second coordinate.
Step 606, moving the first coordinate by the second grid number in the vertical direction to obtain a third coordinate.
Specifically, the terminal may use the first coordinate as a starting point of the bullet screen information, and move the first coordinate by the first grid number in the vertical direction to obtain the third coordinate. Further, the terminal may move the first grid number in a vertical direction above the first coordinate with the first coordinate as a starting point to obtain a third coordinate. Or, moving the first grid number in the vertical direction below the first coordinate to obtain a third coordinate.
In step 608, a fourth coordinate is determined according to the first coordinate, the second coordinate, and the third coordinate, where the area formed by the first coordinate, the second coordinate, the third coordinate, and the fourth coordinate is a grid area corresponding to the bullet screen information on the video image.
The first coordinate, the second coordinate, the third coordinate and the fourth coordinate are four vertexes of a grid area corresponding to the bullet screen information on the video image.
Specifically, after the terminal calculates the first coordinate, the second coordinate, and the third coordinate, the abscissa of the second coordinate may be taken as the abscissa of the fourth coordinate, and the ordinate of the third coordinate may be taken as the ordinate of the fourth coordinate, so as to obtain the fourth coordinate. And then, the terminal connects the first coordinate with the second coordinate, connects the first coordinate with the third coordinate, and connects the third coordinate with the fourth coordinate, and the second coordinate is connected with the fourth coordinate, wherein the area formed by connecting the first coordinate, the second coordinate, the third coordinate and the fourth coordinate is the grid area corresponding to the bullet screen information on the video image.
In this embodiment, by determining the first grid number corresponding to the bullet screen information in the horizontal direction and the second grid number corresponding to the vertical direction, moving the first coordinate in the horizontal direction by the first grid number to obtain the second coordinate, moving the first coordinate in the vertical direction by the second grid number to obtain the third coordinate, and determining the fourth coordinate according to the first coordinate, the second coordinate and the third coordinate, four vertex coordinates of the bullet screen information in the grids can be determined quickly, and the area occupied by the bullet screen information in the grids can be determined accurately according to the four vertex coordinates, so as to determine the display area of the bullet screen information.
In one embodiment, the determining the fourth coordinate from the first coordinate, the second coordinate, and the third coordinate includes: and connecting the first coordinate with the second coordinate, and connecting the first coordinate with the third coordinate to construct a parallelogram to obtain a fourth coordinate of the parallelogram.
Specifically, the terminal connects the first coordinate with the second coordinate, and connects the first coordinate with the third coordinate to construct a parallelogram. From the properties of the parallelogram, it can be seen that the offset distance of the fourth coordinate of the parallelogram from the third coordinate is equal to the offset distance of the second coordinate from the first coordinate. And, the offset distance of the fourth coordinate of the parallelogram with respect to the second coordinate is equal to the offset distance of the third coordinate with respect to the first coordinate. According to the property of the parallelogram and the three coordinates of the parallelogram, the fourth coordinate of the parallelogram can be directly calculated.
Further, the terminal moves the first coordinates in a horizontal direction and in a vertical direction to obtain second and third coordinates. And, the first coordinate is an integer, and the number of moving grids is also an integer, and then the area formed by the first coordinate, the second coordinate, the third coordinate and the fourth coordinate is a rectangle. According to the nature of the rectangle, the fourth coordinate of the rectangle can be directly calculated in case three coordinates are known.
In this embodiment, the first coordinate is connected to the second coordinate, and the first coordinate is connected to the third coordinate to construct a parallelogram, so as to obtain a fourth coordinate of the parallelogram, so that the last vertex of the grid area corresponding to the barrage information can be simply and accurately calculated, and the grid area corresponding to the barrage information can be determined.
In one embodiment, as shown in fig. 7, after the determining the grid area corresponding to the bullet screen information on the video image according to the position and the size of the bullet screen information, the method further includes:
step 702, obtaining a state corresponding to each grid in the grid area, where the state includes an idle state and a non-idle state.
In step 704, when the state corresponding to each grid is an idle state, the grid area is in an idle state.
Wherein the state of each grid includes an idle state and a non-idle state. The idle state indicates that the grid is not occupied by other barrage information and is not available for use. The non-idle state indicates that the grid is not occupied by other barrage information and is in a usable state.
Specifically, after determining a grid area corresponding to the barrage information, the terminal acquires a state corresponding to each grid in the grid area. And when the state corresponding to each grid in the grid area is an idle state, indicating that the grid area is in the idle state. I.e. it means that the grid area is not occupied by other barrage information and is in a usable state.
In step 706, when there is at least one grid corresponding to the non-idle state, the grid area is in the non-idle state.
Specifically, when the terminal detects that at least one grid corresponding state in the grid area is a non-idle state, the terminal determines that the grid area is the non-idle state. I.e., indicating that the grid area is occupied by other bullet screen information, a portion of the area is unusable or the entire area is unusable.
Further, when the terminal detects that the grid area is in the non-idle state, it can continuously determine which grids in the grid area are in the idle state and which grids are in the non-idle state, so as to determine whether the grid area belongs to a part of the area and is unavailable or all the areas are unavailable.
In this embodiment, the idle state may be represented in gray, and the non-idle state may be represented in green. The terminal may determine a color of each grid display of the grid region, indicating that the grid region is in an idle state when each grid in the grid region is displayed in a gray state. In the idle state, the terminal displays bullet screen information in the grid area and changes the color of the grid area into green. When at least one grid in the grid area is displayed in a green state, the grid area is indicated to be in a non-idle state.
In this embodiment, the state corresponding to each grid in the grid area is acquired, where the state includes an idle state and a non-idle state, when the state corresponding to each grid is the idle state, the grid area is the idle state, and when at least one state corresponding to the grid is the non-idle state, the grid area is the non-idle state, according to the state corresponding to each grid, whether the grid area is available can be quickly determined, and according to whether the grid area is available, corresponding processing is performed.
In one embodiment, the method further comprises: and when the grid area is in a non-idle state, moving the grid area according to a preset direction, and displaying the barrage information in the grid area obtained after the movement until the grid area obtained after the movement is in the idle state, wherein the preset direction is at least one of a horizontal direction and a vertical direction.
Specifically, when the grid area is in a non-idle state, the grid area is moved by a preset number of grids according to a preset direction, and the preset direction is at least one of a horizontal direction and a vertical direction. And obtaining a new grid area after the movement, and re-determining whether the new grid area is in an idle state or not. And repeatedly executing the steps of moving the preset number of grids according to the preset direction when the new grid area is in the non-idle state, and determining whether the new grid area is in the idle state. Stopping moving until the grid area obtained after moving is in an idle state, and displaying the bullet screen information in the grid area obtained after moving.
Optionally, the preset direction is a horizontal direction, and when the grid area is in a non-idle state, the terminal moves the grid area in the horizontal direction by a preset number of grids to obtain a new moved grid area. The terminal re-determines whether the new grid area is in an idle state, and repeatedly performs the steps of moving a preset number of grids in a horizontal direction and determining whether the new grid area is in an idle state when the new grid area is in a non-idle state. Stopping moving until the grid area obtained after moving is in an idle state, and displaying the bullet screen information in the grid area obtained after moving.
Further, the terminal may move a preset number of grids in a horizontal direction on the left or right of the current grid region, to obtain a new grid region after the movement.
Optionally, the preset direction is a vertical direction, and when the grid area is in a non-idle state, the terminal moves the grid area by a preset number of grids in the vertical direction to obtain a new moved grid area. The terminal re-determines whether the new grid area is in an idle state, and repeatedly performs the steps of moving a preset number of grids in a vertical direction and determining whether the new grid area is in an idle state when the new grid area is in a non-idle state. Stopping moving until the grid area obtained after moving is in an idle state, and displaying the bullet screen information in the grid area obtained after moving.
Further, the terminal may move a preset number of grids in a vertical direction above or below the current grid region, to obtain a new grid region after the movement.
In this embodiment, the preset direction is a horizontal direction and a vertical direction. When the grid area is in a non-idle state, the terminal can move the first number of grids in the horizontal direction and move the second number of grids in the vertical direction to obtain a new grid area. Then, the terminal re-determines whether the new grid area is in an idle state, and repeatedly performs the steps of moving the preset number of grids in the horizontal direction and the vertical direction, respectively, and determining whether the new grid area is in an idle state when the new grid area is in a non-idle state. Stopping moving until the grid area obtained after moving is in an idle state, and displaying the bullet screen information in the grid area obtained after moving.
Further, the terminal may move a first preset number of grids in a horizontal direction on the left side of the current grid area, and move a second preset number of grids in a vertical direction above the current grid area, to obtain a new grid area after movement.
The terminal can move the first preset number of grids in the horizontal direction on the right side of the current grid area, and move the second preset number of grids in the vertical direction above the current grid area, so that a new grid area after movement is obtained.
The terminal can move the first preset number of grids in the horizontal direction on the left side of the current grid area, and move the second preset number of grids in the vertical direction below the current grid area, so that a new grid area after movement is obtained.
The terminal can move the first preset number of grids in the horizontal direction on the right side of the current grid area, and move the second preset number of grids in the vertical direction below the current grid area, so that a new grid area after movement is obtained.
In this embodiment, when the grid area is in a non-idle state, the grid area is moved according to a preset direction until the grid area obtained after the movement is in an idle state, the bullet screen information is displayed in the grid area obtained after the movement, and the preset direction is at least one of a horizontal direction and a vertical direction, so that the currently occupied grid area can be moved by moving a preset number of grids in the preset direction, so as to obtain the grid area in the idle state, and thus the display area of the bullet screen information is quickly obtained.
As shown in fig. 8, the pixels of the single grid are 60px×76.8px. The pixel of the position B of the trigger operation corresponding to the barrage information 2 in the video image is (768 px,552.96 px), the barrage information 2 is 348px 176.64px, and the starting point B of the position B in the grid is calculated to be (7.2, 12.8), and the downward rounding is performed, namely (7, 12). The barrage information 2 requires a length of 5.8 grids in the horizontal direction, and the length of 6 grids is rounded upwards. The length of 2.3 grids is needed in the vertical direction, and the length of 3 grids is obtained by rounding upwards. The four vertex coordinates of the barrage information 2 are (7, 12), (13, 12), (7, 15) and (13, 15), respectively, and the grid area formed by (7, 12), (13, 12), (7, 15) and (13, 15) is the area corresponding to the barrage information 2. However, as can be seen from fig. 8 (a), there is an intersection between the bullet screen information 1 and the bullet screen information 2, that is, an overlap phenomenon is generated between the bullet screen information 1 and the bullet screen information 2. The barrage information 2 cannot be put into the area corresponding to the barrage information 2 and a shift operation is required. The grid area corresponding to the bullet screen information 2 can be moved downward by one grid in the vertical direction to obtain (7, 13), (13, 13), (7, 16) and (13, 16), and whether the grid area formed by (7, 13), (13, 13), (7, 16) and (13, 16) is in an idle state is determined. When in the idle state, the bullet screen information 2 is displayed in the grid area, as shown in fig. 8 (b).
The conventional bullet screen information overlapping judgment method can store bullet screen comments on the same horizontal line in a list, and if n bullet screens exist in the list, when judging whether one comment overlaps with other comments, the required calculation is performed: s (times) =n-1. The same horizontal line is scrolled once, and the total times needed to be calculated are as follows: s (total times) =n×n-1. Therefore, the conventional bullet screen information overlap detection method requires a relatively large amount of calculation. In the video barrage display method of the embodiment, whether collision occurs between the grid areas of the two comment information in the horizontal direction and the vertical direction can be detected through the grids, and if the barrage information occupies n grids, only whether the n grids are occupied needs to be detected, and the calculation times are S (times) =n. The calculation times of the video barrage display method in the embodiment are far smaller than those of the traditional method, so that the consumption of calculation resources can be reduced, and the display area available for barrage information can be rapidly detected.
In one embodiment, when the terminal receives a video playing instruction from a user, the terminal acquires the video file for playing and acquires bullet screen information corresponding to a currently played video image. And acquiring the association relation between the barrage information and the position in the video image, and displaying the corresponding barrage information at the corresponding position of the video image. The position is a position appointed by a user, and the barrage information is information for the user to comment on the appointed position. By associating the bullet screen information with the location of the video image, the bullet screen information can be fixed at a corresponding location in the video image such that the bullet screen information is associated with the video progress, as well as a specified location in the video image.
In one embodiment, a video bullet screen display method is provided, including:
the terminal acquires pixels of a video image; the video image is divided into grids according to its pixels.
Then, the terminal receives the triggering operation on the video image and determines the corresponding position of the triggering operation on the video image.
Then, the terminal acquires the barrage information generated according to the position and determines the size of the barrage information.
Further, the terminal acquires the pixel corresponding to the position and acquires the pixel of the single grid.
Then, the terminal determines a first coordinate of the position in the grid according to the pixel corresponding to the position and the pixel of the single grid.
Then, the terminal determines the number of grids corresponding to the barrage information according to the pixels of the single grid and the size of the barrage information.
Further, the terminal determines a first grid number corresponding to the bullet screen information in the horizontal direction and a second grid number corresponding to the bullet screen information in the vertical direction.
Then, the terminal moves the first coordinates in the horizontal direction by a first grid amount to obtain second coordinates.
Then, the terminal moves the first coordinate in the vertical direction by a second grid amount to obtain a third coordinate.
Further, the terminal connects the first coordinate with the second coordinate, and connects the first coordinate with the third coordinate to construct a parallelogram, so as to obtain a fourth coordinate of the parallelogram; the region formed by the first coordinate, the second coordinate, the third coordinate and the fourth coordinate is a grid region corresponding to the barrage information on the video image.
Then, the terminal obtains the state corresponding to each grid in the grid area, wherein the state comprises an idle state and a non-idle state.
Optionally, when the state corresponding to each grid is an idle state, the grid area is in the idle state.
Optionally, when at least one grid is in a non-idle state, the grid area is in a non-idle state.
Optionally, when the grid area is in an idle state, the terminal displays the barrage information in the grid area.
Optionally, when the grid area is in a non-idle state, the terminal moves the grid area according to a preset direction, and when the grid area obtained after the movement is in the idle state, the bullet screen information is displayed in the grid area obtained after the movement, and the preset direction is at least one of a horizontal direction and a vertical direction.
In the present embodiment, pixels of a single grid are determined by dividing a video image into grids. When the triggering operation on the video image is received, the corresponding position of the triggering operation on the video image is determined, the barrage information generated according to the position is obtained, the size of the barrage information is determined, and the grid area corresponding to the barrage information can be rapidly and accurately calculated according to the pixels of the position and the size of the barrage information. Then, whether the grid area is available or not is determined according to the state of each grid in the grid area, and bullet screen information is directly displayed if the grid area is available, so that overlapping among bullet screen information is avoided, and the content of each bullet screen can be completely presented in the video playing process. And, the bullet screen information and the corresponding position are associated, so that the problem that bullet screen information and video playing progress are not consistent can be avoided.
When the grid area is unavailable, the grid area is moved to find the available grid area, whether the grid area is available is determined according to the state of the grid area, the calculation times are far smaller than those of the traditional mode, the consumption of calculation resources can be reduced, and accordingly the display area with available bullet screen information can be detected rapidly.
As shown in fig. 9, in one embodiment, a video bullet screen display method is provided. The present embodiment is mainly exemplified by the application of the method to the terminal 110 in fig. 1. Referring to fig. 9, the video bullet screen display method specifically includes the following steps:
step 902, entering a barrage editing interface based on triggering operation of the video image, and inputting barrage information in the barrage editing interface.
Specifically, the terminal receives a video playing instruction of a user, acquires a corresponding video file according to the video playing instruction of the user, and plays the video file. In the video playing process, when the terminal receives trigger operation of a user on any position of a currently played video image, entering a barrage editing interface. Further, the user triggers the identification of the published barrage on the currently played video image. And when the terminal receives triggering operation of the identification of the published barrage on the video image, entering a barrage editing interface. And then, receiving the barrage information input by the user in the barrage editing interface through the terminal, and obtaining the barrage information which is edited.
And step 904, moving the barrage information to the video image, and determining the target position of the barrage information on the video image after the moving operation is stopped.
Specifically, the barrage editing interface covers the upper side of the video image, and after the barrage editing interface finishes inputting barrage information, a user clicks to finish editing operation of the barrage information. And when the terminal receives the completion operation of the user, exiting the barrage editing interface, so that the barrage information is moved from the editing interface to the video image. It will be appreciated that the bullet screen information does not move on a plane, but rather, when the bullet screen editing interface disappears, the bullet screen information falls directly onto the video image.
For example, a bullet screen editing interface is transparently overlaid over a video image through which a user can see the underlying video image where there is a point a. The user can click the position of the point A in the video image on the barrage editing interface, and input barrage information at the position corresponding to the point A on the barrage editing interface. When the user triggers the operation of editing or publishing the barrage, the user exits from the barrage editing interface, the generated barrage information directly falls at the point A in the video image, and the point A is the target position of the barrage information on the video image after the moving operation is stopped.
In this embodiment, after the user generates the bullet screen information on the bullet screen editing interface, the bullet screen information may be dragged on the bullet screen editing interface to move to the position specified by the user. And after the barrage information is moved, exiting the barrage editing interface, so that the barrage information is moved from the barrage editing interface to the video image.
In this embodiment, after the user generates the bullet screen information on the bullet screen editing interface, clicking to complete the editing operation of the bullet screen information, so as to exit the bullet screen editing interface, and move the bullet screen information from the bullet screen editing interface to the video image. The user may then move the bullet screen information over the video image to a location specified by the user himself. When the moving operation is stopped, the user can trigger the operation of publishing the bullet screen. And the terminal receives a trigger instruction for publishing the barrage and can determine the final position of the barrage information on the video image. The final position is the target position of the barrage information on the video image.
It will be appreciated that the bullet screen editing interface may cover the video image entirely or may cover only a partial area of the video image. Further, the bullet screen editing interface covers the grid area in the idle state of the video image.
Step 906, displaying the barrage information at the target location of the video image.
Specifically, when receiving a trigger operation of a user to release a barrage, the terminal displays the barrage information at a target position of the video image. Further, the terminal stores the bullet screen information in association with the target position, and when the video is played again, the bullet screen information can be directly displayed at the target position of the video image.
In this embodiment, when the terminal receives a trigger operation of a user to release a bullet screen, the terminal may acquire the position of the bullet screen information on the video image, and determine the state of the grid area corresponding to the position. The states include an idle state and a non-idle state. When the state of the grid area corresponding to the position is the idle state, the position is the target position, and the barrage information is directly displayed at the target position. When the state of the grid area corresponding to the position is a non-idle state, the user can be prompted that the position is not available, so that the user can move the barrage information again, and the target position of the barrage information on the video image can be determined.
In this embodiment, when the state of the grid region corresponding to the position is a non-idle state, the terminal may move the grid region corresponding to the position according to the preset direction until the obtained grid region is in an idle state, so as to obtain an idle target position. The terminal may then display the barrage information at the target location.
In the implementation, the trigger operation of the video image is based on entering a barrage editing interface, barrage information is input into the barrage editing interface, the barrage information is moved to the video image, the target position of the barrage information on the video image after the movement operation is stopped is determined, the barrage information is displayed at the target position of the video image, the user can independently select the position where the barrage information is placed on the video image, and the overlapping problem among the barrage information is avoided.
In one embodiment, the terminal may start timing when the moving operation of the bullet screen information is stopped, and determine that the position of the bullet screen information on the video image is the target position when the moving operation is stopped when the operation that the bullet screen information is continuously moved is not detected for a preset period of time.
In this embodiment, when the operation that the bullet screen information is continuously moved is detected within the preset time period, it is determined that the movement operation of the bullet screen information is not stopped, and timing is restarted when the movement operation is stopped, so as to determine the target position of the bullet screen information on the video image after the movement operation is stopped. And detecting the time length after the moving operation is stopped to judge whether the bullet screen information is moved again, so that the final position of the bullet screen information on the video image can be accurately determined.
Fig. 2, 3, 6, 7 and 9 are schematic flow diagrams of a video barrage display method according to an embodiment. It should be understood that, although the steps in the flowcharts of fig. 2, 3, 6, 7, and 9 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps of fig. 2, 3, 6, 7, and 9 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the sub-steps or stages are performed necessarily occur in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 10, there is provided a video bullet screen display apparatus comprising: a receiving module 1002, an acquiring module 1004, a determining module 1006 and a first display module 1008. Wherein,
The receiving module 1002 is configured to receive a triggering operation on a video image, and determine a corresponding position of the triggering operation on the video image.
And an acquisition module 1004, configured to acquire the barrage information generated according to the location, and determine the size of the barrage information.
A determining module 1006, configured to determine a grid area corresponding to the bullet screen information on the video image according to the position and the size of the bullet screen information.
The first display module 1008 is configured to display the barrage information in the grid area when the grid area is in an idle state.
In this embodiment, by receiving a triggering operation on a video image, a corresponding position of the triggering operation on the video image is determined, so that a user may publish corresponding barrage information for a position of interest in the video image. And acquiring the barrage information generated according to the position, determining the size of the barrage information, and determining the grid area corresponding to the barrage information on the video image according to the position and the size of the barrage information so as to determine whether the grid area occupied by the barrage information is available. When the grid area is in an idle state, bullet screen information is displayed in the grid area, overlapping among bullet screen information is avoided, and the content of each bullet screen can be completely presented in the video playing process. And, the bullet screen information and the corresponding position are associated, so that the problem that bullet screen information and video playing progress are not consistent can be avoided.
In one embodiment, the apparatus further comprises: and (5) dividing the modules. The division module is used for: acquiring pixels of a video image; the video image is divided into grids according to pixels of the video image.
In this embodiment, by acquiring pixels of a video image, the video image is divided into grids according to the pixels of the video image, and the pixel size represented by each grid can be determined. The video image is divided into grids, which grids are occupied and which grids are available can be accurately determined, and therefore the display of the barrage can be guaranteed not to overlap.
In one embodiment, the determining module 1006 is further configured to: acquiring a pixel corresponding to the position, and acquiring a pixel of a single grid; determining a first coordinate of the position in the grid according to the pixel corresponding to the position and the pixel of the single grid; determining the number of grids corresponding to the barrage information according to the pixels of the single grid and the size of the barrage information; and determining a grid area corresponding to the barrage information on the video image according to the first coordinate and the grid number corresponding to the barrage information.
In this embodiment, the first coordinate of the position in the grid is accurately calculated according to the pixel corresponding to the position and the pixel of the single grid by acquiring the pixel corresponding to the position and acquiring the pixel of the single grid, so that the starting point coordinate of the barrage information in the grid is accurately determined. According to the pixel of the single grid and the size of the barrage information, the number of the grids corresponding to the barrage information can be calculated, so that the occupied area of the barrage information in the grids is calculated. According to the first coordinates serving as the starting points and the grid quantity corresponding to the bullet screen information, the other three vertex coordinates of the bullet screen information in the grids can be accurately calculated, and therefore the grid area corresponding to the bullet screen information on the video image can be rapidly and accurately calculated.
In one embodiment, the determining module 1006 is further configured to: determining the first grid number corresponding to the bullet screen information in the horizontal direction and the second grid number corresponding to the bullet screen information in the vertical direction; moving the first coordinate by the first grid number in the horizontal direction to obtain a second coordinate; moving the first coordinate by the second grid number in the vertical direction to obtain a third coordinate; and determining a fourth coordinate according to the first coordinate, the second coordinate and the third coordinate, wherein the region formed by the first coordinate, the second coordinate, the third coordinate and the fourth coordinate is a grid region corresponding to the barrage information on the video image.
In this embodiment, by determining the first grid number corresponding to the bullet screen information in the horizontal direction and the second grid number corresponding to the vertical direction, moving the first coordinate in the horizontal direction by the first grid number to obtain the second coordinate, moving the first coordinate in the vertical direction by the second grid number to obtain the third coordinate, and determining the fourth coordinate according to the first coordinate, the second coordinate and the third coordinate, four vertex coordinates of the bullet screen information in the grids can be determined quickly, and the area occupied by the bullet screen information in the grids can be determined accurately according to the four vertex coordinates, so as to determine the display area of the bullet screen information.
In one embodiment, the determining module 1006 is further configured to: and connecting the first coordinate with the second coordinate, and connecting the first coordinate with the third coordinate to construct a parallelogram to obtain a fourth coordinate of the parallelogram.
In this embodiment, the first coordinate is connected to the second coordinate, and the first coordinate is connected to the third coordinate to construct a parallelogram, so as to obtain a fourth coordinate of the parallelogram, so that the last vertex of the grid area corresponding to the barrage information can be simply and accurately calculated, and the grid area corresponding to the barrage information can be determined.
In one embodiment, after the determining the corresponding grid area of the bullet screen information on the video image according to the position and the size of the bullet screen information, further comprising: and a state acquisition module. The state acquisition module is used for: acquiring states corresponding to each grid in the grid area, wherein the states comprise an idle state and a non-idle state; when the state corresponding to each grid is an idle state, the grid area is in the idle state; when at least one grid corresponding state is a non-idle state, the grid area is the non-idle state.
In this embodiment, the state corresponding to each grid in the grid area is acquired, where the state includes an idle state and a non-idle state, when the state corresponding to each grid is the idle state, the grid area is the idle state, and when at least one state corresponding to the grid is the non-idle state, the grid area is the non-idle state, according to the state corresponding to each grid, whether the grid area is available can be quickly determined, and according to whether the grid area is available, corresponding processing is performed.
In one embodiment, the first display module 1008 is further configured to: and when the grid area is in a non-idle state, moving the grid area according to a preset direction, and displaying the barrage information in the grid area obtained after the movement until the grid area obtained after the movement is in the idle state, wherein the preset direction is at least one of a horizontal direction and a vertical direction.
In this embodiment, when the grid area is in a non-idle state, the grid area is moved according to a preset direction until the grid area obtained after the movement is in an idle state, the bullet screen information is displayed in the grid area obtained after the movement, and the preset direction is at least one of a horizontal direction and a vertical direction, so that the currently occupied grid area can be moved by moving a preset number of grids in the preset direction, so as to obtain the grid area in the idle state, and thus the display area of the bullet screen information is quickly obtained.
In one embodiment, as shown in fig. 11, there is provided a video bullet screen display apparatus comprising: an input module 1102, a movement module 1104, and a second display module 1106. Wherein,
and the input module 1102 is used for entering a barrage editing interface based on the triggering operation of the video image, and inputting barrage information in the barrage editing interface.
A moving module 1104 for moving the bullet screen information onto the video image and determining a target position of the bullet screen information on the video image after stopping the moving operation.
A second display module 1106 is configured to display the barrage information at a target location of the video image.
In the implementation, the trigger operation of the video image is based on entering a barrage editing interface, barrage information is input into the barrage editing interface, the barrage information is moved to the video image, the target position of the barrage information on the video image after the movement operation is stopped is determined, the barrage information is displayed at the target position of the video image, the user can independently select the position where the barrage information is placed on the video image, and the overlapping problem among the barrage information is avoided.
FIG. 12 illustrates an internal block diagram of a computer device in one embodiment. The computer device may be specifically the terminal 110 of fig. 1. As shown in fig. 12, the computer device includes a processor, a memory, a network interface, an input device, and a display screen connected by a system bus. The memory includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program that, when executed by a processor, causes the processor to implement a video barrage display method. The internal memory may also store a computer program that, when executed by the processor, causes the processor to perform a video bullet screen display method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 12 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, the video bullet screen display apparatus provided by the present application may be implemented in the form of a computer program that is executable on a computer device as shown in fig. 12. The memory of the computer device may store various program modules that make up the video bullet screen display apparatus, such as the receiving module 1002, the obtaining module 1004, the determining module 1006, and the first display module 1008 shown in fig. 10. The computer program constituted by the respective program modules causes the processor to execute the steps in the video bullet screen display method of the respective embodiments of the present application described in the present specification.
For example, the computer apparatus shown in fig. 12 may perform the step of receiving a trigger operation for a video image by the receiving module 1002 in the video bullet screen display device shown in fig. 10, and determining a corresponding position of the trigger operation on the video image. The computer device may perform the step of obtaining the bullet screen information generated from the location and determining the size of the bullet screen information via the obtaining module 1004. The computer device may perform the step of determining a corresponding grid area of the bullet screen information on the video image based on the location and the size of the bullet screen information via the determination module 1006. The computer device may perform the step of displaying the bullet screen information in the grid area when the grid area is in an idle state via the first display module 1008.
In one embodiment, a computer device is provided that includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the video bullet screen display method described above. The steps of the video barrage display method herein may be the steps of the video barrage display method of the above embodiments.
In one embodiment, a computer readable storage medium is provided, storing a computer program which, when executed by a processor, causes the processor to perform the steps of the video bullet screen display method described above. The steps of the video barrage display method herein may be the steps of the video barrage display method of the above embodiments.
Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a non-volatile computer readable storage medium, and where the program, when executed, may include processes in the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (14)

1. A video bullet screen display method, comprising:
entering a barrage editing interface based on triggering operation of the video image;
determining a position triggered on the barrage editing interface and corresponding to a target position in the video image, and inputting barrage information at the position of the barrage editing interface;
determining the size of the barrage information, and determining a grid area corresponding to the barrage information on the video image according to the target position and the size of the barrage information;
Based on triggering operation of publishing the barrage information, when the grid area is in an idle state, moving the barrage information from the barrage editing interface to the video image, and fixedly displaying the barrage information at the target position of the video image;
and when the grid area is in a non-idle state, moving the grid area according to a preset direction until the grid area obtained after movement is in an idle state, displaying the barrage information in the grid area obtained after movement, wherein the preset direction is at least one of a horizontal direction and a vertical direction.
2. The method according to claim 1, wherein the method further comprises:
acquiring pixels of a video image;
the video image is divided into grids according to pixels of the video image.
3. The method of claim 2, wherein determining a corresponding grid area of the bullet screen information on the video image based on the location and the size of the bullet screen information comprises:
acquiring pixels corresponding to the positions, and acquiring pixels of a single grid;
determining a first coordinate of the position in the grid according to the pixel corresponding to the position and the pixel of the single grid;
Determining the number of grids corresponding to the barrage information according to the pixels of the single grid and the size of the barrage information;
and determining a grid area corresponding to the barrage information on the video image according to the first coordinate and the grid quantity corresponding to the barrage information.
4. The method of claim 3, wherein the determining a grid area corresponding to the bullet screen information on the video image according to the first coordinate and the grid number corresponding to the bullet screen information comprises:
determining the first grid number corresponding to the bullet screen information in the horizontal direction and the second grid number corresponding to the bullet screen information in the vertical direction;
moving the first coordinate by the first grid quantity in the horizontal direction to obtain a second coordinate;
moving the first coordinate by the second grid number in the vertical direction to obtain a third coordinate;
and determining a fourth coordinate according to the first coordinate, the second coordinate and the third coordinate, wherein the area formed by the first coordinate, the second coordinate, the third coordinate and the fourth coordinate is a grid area corresponding to the bullet screen information on the video image.
5. The method of claim 4, wherein the determining a fourth coordinate from the first coordinate, the second coordinate, and the third coordinate comprises:
and connecting the first coordinate with the second coordinate, and connecting the first coordinate with the third coordinate to construct a parallelogram to obtain a fourth coordinate of the parallelogram.
6. The method of claim 1, further comprising, after said determining a corresponding grid area of said bullet screen information on said video image based on said location and a size of said bullet screen information:
acquiring states corresponding to each grid in the grid area, wherein the states comprise an idle state and a non-idle state;
when the states corresponding to each grid are idle states, the grid area is in an idle state;
and when the states corresponding to at least one grid are all non-idle states, the grid area is in the non-idle state.
7. A video bullet screen display apparatus, the apparatus comprising:
the input module is used for entering a barrage editing interface based on triggering operation of the video image; determining a position triggered on the barrage editing interface and corresponding to a target position in the video image, and inputting barrage information at the position of the barrage editing interface;
The acquisition module is used for determining the size of the barrage information;
the determining module is used for determining a grid area corresponding to the barrage information on the video image according to the target position and the size of the barrage information;
the moving module is used for moving the barrage information from the barrage editing interface to the video image when the grid area is in an idle state based on triggering operation for publishing the barrage information;
the first display module is used for fixedly displaying the barrage information at the target position of the video image; and when the grid area is in a non-idle state, moving the grid area according to a preset direction until the grid area obtained after movement is in an idle state, displaying the barrage information in the grid area obtained after movement, wherein the preset direction is at least one of a horizontal direction and a vertical direction.
8. The apparatus of claim 7, wherein the apparatus further comprises: dividing the module; the dividing module is used for acquiring pixels of the video image; the video image is divided into grids according to pixels of the video image.
9. The apparatus of claim 8, wherein the determining module is further configured to obtain a pixel corresponding to the location and obtain a pixel of a single grid; determining a first coordinate of the position in the grid according to the pixel corresponding to the position and the pixel of the single grid; determining the number of grids corresponding to the barrage information according to the pixels of the single grid and the size of the barrage information; and determining a grid area corresponding to the barrage information on the video image according to the first coordinate and the grid quantity corresponding to the barrage information.
10. The apparatus of claim 9, wherein the determining module is further configured to determine a first number of grids corresponding to the bullet screen information in a horizontal direction and a second number of grids corresponding to the bullet screen information in a vertical direction; moving the first coordinate by the first grid quantity in the horizontal direction to obtain a second coordinate; moving the first coordinate by the second grid number in the vertical direction to obtain a third coordinate; and determining a fourth coordinate according to the first coordinate, the second coordinate and the third coordinate, wherein the area formed by the first coordinate, the second coordinate, the third coordinate and the fourth coordinate is a grid area corresponding to the bullet screen information on the video image.
11. The apparatus of claim 10, wherein the determining module is further configured to link the first coordinate with the second coordinate, link the first coordinate with the third coordinate to construct a parallelogram, and obtain a fourth coordinate of the parallelogram.
12. The apparatus of claim 7, further comprising a state acquisition module; the state acquisition module is used for acquiring states corresponding to each grid in the grid area, wherein the states comprise an idle state and a non-idle state; when the states corresponding to each grid are idle states, the grid area is in an idle state; and when the states corresponding to at least one grid are all non-idle states, the grid area is in the non-idle state.
13. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
14. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202010086947.4A 2020-02-11 2020-02-11 Video bullet screen display method and device, readable storage medium and computer equipment Active CN113259742B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010086947.4A CN113259742B (en) 2020-02-11 2020-02-11 Video bullet screen display method and device, readable storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010086947.4A CN113259742B (en) 2020-02-11 2020-02-11 Video bullet screen display method and device, readable storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN113259742A CN113259742A (en) 2021-08-13
CN113259742B true CN113259742B (en) 2023-12-01

Family

ID=77219545

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010086947.4A Active CN113259742B (en) 2020-02-11 2020-02-11 Video bullet screen display method and device, readable storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN113259742B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114237465A (en) * 2021-12-14 2022-03-25 广州博冠信息科技有限公司 Bullet screen processing method and device, storage medium and electronic equipment
CN115243093B (en) * 2022-07-04 2023-08-22 网易(杭州)网络有限公司 Video bullet screen processing method and device, storage medium and electronic device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630296A (en) * 2016-01-07 2016-06-01 天脉聚源(北京)科技有限公司 Video bullet screen display method and device
CN107147941A (en) * 2017-05-27 2017-09-08 努比亚技术有限公司 Barrage display methods, device and the computer-readable recording medium of video playback
CN107613402A (en) * 2017-09-07 2018-01-19 咪咕音乐有限公司 A kind of barrage adjusting method, device and storage medium
CN109361960A (en) * 2018-11-30 2019-02-19 努比亚技术有限公司 Barrage display methods, device, mobile terminal and readable storage medium storing program for executing
CN109379639A (en) * 2018-09-29 2019-02-22 阿里巴巴集团控股有限公司 Method for pushing and device, the electronic equipment of video content object
CN109842820A (en) * 2017-11-29 2019-06-04 腾讯数码(天津)有限公司 Barrage data inputting method and device, mobile terminal and readable storage medium storing program for executing
CN109862414A (en) * 2019-03-22 2019-06-07 武汉斗鱼鱼乐网络科技有限公司 A kind of masking-out barrage display methods, device and server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011071309A2 (en) * 2009-12-09 2011-06-16 Samsung Electronics Co., Ltd. Method and apparatus for sharing comments regarding content

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630296A (en) * 2016-01-07 2016-06-01 天脉聚源(北京)科技有限公司 Video bullet screen display method and device
CN107147941A (en) * 2017-05-27 2017-09-08 努比亚技术有限公司 Barrage display methods, device and the computer-readable recording medium of video playback
CN107613402A (en) * 2017-09-07 2018-01-19 咪咕音乐有限公司 A kind of barrage adjusting method, device and storage medium
CN109842820A (en) * 2017-11-29 2019-06-04 腾讯数码(天津)有限公司 Barrage data inputting method and device, mobile terminal and readable storage medium storing program for executing
CN109379639A (en) * 2018-09-29 2019-02-22 阿里巴巴集团控股有限公司 Method for pushing and device, the electronic equipment of video content object
CN109361960A (en) * 2018-11-30 2019-02-19 努比亚技术有限公司 Barrage display methods, device, mobile terminal and readable storage medium storing program for executing
CN109862414A (en) * 2019-03-22 2019-06-07 武汉斗鱼鱼乐网络科技有限公司 A kind of masking-out barrage display methods, device and server

Also Published As

Publication number Publication date
CN113259742A (en) 2021-08-13

Similar Documents

Publication Publication Date Title
CN110377264B (en) Layer synthesis method, device, electronic equipment and storage medium
WO2022110819A1 (en) Video switching method and apparatus
CN107172346B (en) Virtualization method and mobile terminal
CN107765986B (en) Information processing method and device of game system
CN113259742B (en) Video bullet screen display method and device, readable storage medium and computer equipment
CN108780377B (en) Method and electronic device for object management and visualization and storage medium
CN109375972B (en) Method, apparatus, computer device and storage medium for multi-element layout
CN115237522A (en) Page self-adaptive display method and device
CN106940722B (en) Picture display method and device
CN114003160B (en) Data visual display method, device, computer equipment and storage medium
CN109710368B (en) Processing method, device and system
CN113014993B (en) Picture display method, device, equipment and storage medium
EP3151243B1 (en) Accessing a video segment
CN112579244B (en) Method and system for capturing regional picture in remote desktop at mobile terminal
CN109814784B (en) Picture rotation method and device, computer equipment and storage medium
CN113709389A (en) Video rendering method and device, electronic equipment and storage medium
US10270721B2 (en) Method and apparatus for uploading an attachment
CN116744065A (en) Video playing method and device
CN106126686B (en) Picture combination method and device and electronic equipment
CN114998102A (en) Image processing method and device and electronic equipment
CN113703653A (en) Image processing method, device, equipment and computer readable storage medium
CN113890990A (en) Prompting method and device in information acquisition process, electronic equipment and readable medium
CN113721818B (en) Image processing method, device, equipment and computer readable storage medium
CN113032855B (en) Seat arrangement method, system, computing device and storage medium
CN117952819A (en) Multi-layer reading method, direct memory access module, processor and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40051655

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant