CN112771881B - Bullet screen processing method and device, electronic equipment and computer readable storage medium - Google Patents

Bullet screen processing method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN112771881B
CN112771881B CN201880098222.8A CN201880098222A CN112771881B CN 112771881 B CN112771881 B CN 112771881B CN 201880098222 A CN201880098222 A CN 201880098222A CN 112771881 B CN112771881 B CN 112771881B
Authority
CN
China
Prior art keywords
bullet screen
video file
screen data
offline video
server
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
CN201880098222.8A
Other languages
Chinese (zh)
Other versions
CN112771881A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd, Shenzhen Huantai Technology Co Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN112771881A publication Critical patent/CN112771881A/en
Application granted granted Critical
Publication of CN112771881B publication Critical patent/CN112771881B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content

Abstract

The embodiment of the application discloses a bullet screen processing method and device, electronic equipment and a computer readable storage medium, and relates to the technical field of video processing. The method comprises the following steps: acquiring a playing request of an offline video file, wherein the offline video file is stored in the electronic equipment in advance; acquiring bullet screen data to be displayed corresponding to the offline video file; and playing the offline video file in a video playing interface of the client and displaying the bullet screen data to be displayed in the video playing interface. According to the method and the device, when the offline video file is played, the bullet screen data corresponding to the offline video file can be displayed together, so that a user can see the bullet screen data of the offline video file when watching the offline video file, namely the offline video file.

Description

Bullet screen processing method and device, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the field of video processing technologies, and in particular, to a barrage processing method and apparatus, an electronic device, and a computer-readable storage medium.
Background
A phenomenon in which comments are displayed in the form of subtitles in a played video picture is called a bullet screen. The user can watch the video in the form of the barrage and communicate with other users in the manner of barrage discussion.
The existing video barrage is displayed in a time period corresponding to a video after the barrage is collected from each user side in the process of playing the video or live broadcasting on line in an online playing or live broadcasting mode. And the video that the user played locally does not have the barrage, leads to the video broadcast effect not good.
Disclosure of Invention
The application provides a bullet screen processing method, a bullet screen processing device, an electronic device and a computer readable storage medium, so as to overcome the defects.
In a first aspect, an embodiment of the present application provides a bullet screen processing method, which is applied to an electronic device, where the electronic device is installed with a client. The method comprises the following steps: acquiring a playing request of an offline video file, wherein the offline video file is stored in the electronic equipment in advance; acquiring bullet screen data to be displayed corresponding to the offline video file; and playing the offline video file in a video playing interface of the client and displaying the bullet screen data to be displayed in the video playing interface.
In a second aspect, an embodiment of the present application further provides a bullet screen processing apparatus, which is applied to an electronic device, where the electronic device is provided with a client. The device comprises: the device comprises an acquisition unit, a determination unit and a display unit. The device comprises an acquisition unit, a display unit and a processing unit, wherein the acquisition unit is used for acquiring a playing request of an offline video file, and the offline video file is stored in the electronic equipment in advance. And the determining unit is used for acquiring the bullet screen data to be displayed corresponding to the offline video file. And the display unit is used for playing the offline video file in a video playing interface of the client and displaying the bullet screen data to be displayed in the video playing interface.
In a third aspect, an embodiment of the present application further provides an electronic device, including: one or more processors; a memory; a client; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the above-described methods.
In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code can be called by a processor to execute the method.
According to the bullet screen processing method, the bullet screen processing device, the electronic equipment and the computer readable storage medium, when an offline video file stored in the electronic equipment in advance is to be played, the bullet screen data to be displayed corresponding to the offline video file is searched first, then the offline video file is played in the video playing interface of the client, and the bullet screen data to be displayed is displayed in the video playing interface. Therefore, when the offline video file is played, the bullet screen data corresponding to the offline video file can be displayed together, so that a user can see the bullet screen data of the offline video file when watching the offline video file, namely the offline video file.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram illustrating bullet screen data in a video playing interface according to an embodiment of the present application;
fig. 2 is a schematic diagram illustrating a video playing system provided by an embodiment of the present application;
FIG. 3 is a diagram illustrating a bullet screen input area in a video playback interface according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a method of bullet screen processing according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating a video list interface of a client according to an embodiment of the present application;
fig. 6 is a flowchart illustrating a method of bullet screen processing according to another embodiment of the present application;
fig. 7 is a schematic diagram of a video playback system according to another embodiment of the present application;
fig. 8 is a flowchart illustrating a method of bullet screen processing according to yet another embodiment of the present application;
FIG. 9 is a schematic diagram illustrating a reminder provided by an embodiment of the present application;
FIG. 10 is a schematic diagram illustrating a reminder message provided in accordance with another embodiment of the present application;
fig. 11 is a schematic diagram illustrating a local barrage data list provided in an embodiment of the present application;
fig. 12 is a flowchart illustrating a method of bullet screen processing according to yet another embodiment of the present application;
fig. 13 is a flowchart illustrating a method of bullet screen processing according to yet another embodiment of the present application;
fig. 14 shows a block diagram of a bullet screen processing device provided in an embodiment of the present application;
fig. 15 shows a block diagram of an electronic device provided in an embodiment of the present application;
fig. 16 shows a storage unit for storing or carrying program codes for implementing the bullet screen processing method according to the embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
Barrage (barrage), refers to a commentary subtitle that pops up when watching a video over a network. In the video playing interface shown in fig. 1, a video picture, bullet screen data and caption data are displayed on the interface, specifically, the more dense comment characters displayed on the top of the interface are bullet screen data, and if "too good", "nice and beautiful", "i see bullet screen" in fig. 1, etc., the caption data is displayed on the bottom of the interface, and if "such a magnificent building" in fig. 1, the huge value of the chinese nation is reflected.
As an embodiment, the video playing interface is an interface of a client, such as the video playing system shown in fig. 2, the client is installed in the electronic device 100, the electronic device 100 and the server 200 are located in a wireless network or a wired network, and the electronic device 100 and the server 200 perform data interaction.
Among them, the electronic device 100 may be a mobile phone or a smart phone (e.g., an iPhone (TM) based, android (TM) based phone), a portable game device (e.g., a Nintendo DS (TM), a PlayStation Portable (TM), a Game Advance (TM), an iPhone (TM)), a laptop, a PDA, a portable Internet device, a music player, and a data storage device.
In some embodiments, the client is installed within the electronic device 100, and may be, for example, an application installed on the electronic device 100. When a user logs in through an account at a client, all information corresponding to the account can be stored in the storage space of the server 200. The server 200 may be a single server, a server cluster, a local server, or a cloud server.
Specifically, the server 200 may store a video file that can be played on the client, and bullet screen data, subtitle data, and other information corresponding to the video file. The user can watch the video file on line, so that the server sends the video file to the client, the client plays the video file on a video playing interface, meanwhile, bullet screen data corresponding to the video file can be sent to the client, and the client also displays the bullet screen data on the video playing interface.
In addition, the client is also provided with a bullet screen input area 101, the bullet screen input area 101 is provided with a text input box, a user can pop up a virtual keyboard on the current interface by clicking the text input box, the user can input a bullet screen through the virtual keyboard, the bullet screen can be sent to the server by clicking sending, the server stores the bullet screen into the network bullet screen data corresponding to the video file, and the network bullet screen data is issued to all clients which play the video file and are connected with the server, so that the bullet screen is displayed on the video playing interface of the client.
The user can post the comment to this video file through the mode of inputing the barrage to upload to the storage of server, again by server below to each client, see this barrage by other users, can realize watching the video with other user's interaction.
However, the inventor finds that, in a research, because a video file and bullet screen data are separated from each other, if a certain video is watched online, bullet screen data corresponding to the video can be seen, but if the video is downloaded to an electronic device, when the video is watched offline, a bullet screen of the video file cannot be seen simultaneously when the video is watched, some bullet screens are interesting, some information related to the video file is obtained through the bullet screen, and if the bullet screen cannot be seen, the watching experience of a user is reduced.
Therefore, in order to solve the above-mentioned defect, an embodiment of the present application provides a bullet screen processing method, as shown in fig. 4, which is applied to a client of an electronic device, and specifically, the method includes: s401 to S403.
S401: and acquiring a playing request of an offline video file, wherein the offline video file is stored in the electronic equipment in advance.
Specifically, when a client of the electronic device plays a video, the electronic device may acquire a video file to be played and then decode the video file, specifically, soft decoding or hard decoding may be adopted to decode the video file, multi-frame image data to be rendered corresponding to the video file may be acquired after decoding, and then the multi-frame image data may be rendered before displaying the video file on a display screen.
As an embodiment, the client includes a video file list, and in particular, may include an online video file list and an offline video file list, where the offline video file list displays video files identified as offline video files already stored in the electronic device, and the online video file list displays video files accessible through a network.
Specifically, a video playing request may be obtained for the touch states of playing buttons corresponding to different video files on the interface of the client, specifically, as shown in fig. 5, display contents corresponding to multiple videos are displayed in the video list interface of the client, as shown in fig. 5, the display contents corresponding to the multiple videos include a thumbnail corresponding to each video, the thumbnail may be used as a touch key, and a user clicks the thumbnail, so that the client can detect the thumbnail clicked by the user, and can determine the video file to be played. The video list interface shown in fig. 5 may be an offline video file list, and each displayed thumbnail is a thumbnail corresponding to each offline video file, and specifically, may be a certain frame of image in the offline video file.
The client responds to the video selected by the user in the video list, enters a video playing interface, clicks a playing button of the playing interface, and can detect the video file currently clicked by the user through monitoring the touch operation of the user.
In some embodiments, when the user clicks the thumbnail of the video file shown in fig. 5, the video playing interface can be displayed and the video file can be automatically played without the user clicking the playing button of the video playing interface, and the above-mentioned playing request of the offline video file may be generated when the user clicks the thumbnail of the video file shown in fig. 5. Specifically, the client detects a click operation of the user in the interface shown in fig. 5, and determines to acquire a play request of an offline video file if a thumbnail of the offline video file is clicked.
In other embodiments, when the user clicks the thumbnail of the video file shown in fig. 5, the video playing interface can be displayed, but the video file cannot be automatically played, and the user needs to click the playing button in the playing interface to play the video file.
S402: and acquiring bullet screen data to be displayed corresponding to the offline video file.
The bullet screen data to be displayed corresponding to the offline video file can be stored in the electronic device, can also be stored in the server, and can also be stored in a storage medium, such as a mobile hard disk.
The manner of obtaining the bullet screen data to be displayed corresponding to the offline video file may be to traverse the devices capable of storing the bullet screen data and search the devices in sequence.
As an implementation manner, since the bullet screen data in the server is updated relatively quickly and can record the bullet screen data of the offline video file that is uploaded recently, the bullet screen data to be displayed corresponding to the offline video file can be searched in the server first, specifically, the client sends the identifier of the offline video file to the server, and the server searches the bullet screen data corresponding to the identifier and sends the bullet screen data to the client. If the bullet screen data of the offline video file cannot be found in the server, then local finding is performed on the electronic equipment, namely whether the electronic equipment stores the bullet screen data corresponding to the offline video file is found, and if the bullet screen data exists, the bullet screen data corresponding to the locally stored offline video file is used as bullet screen data to be displayed.
As another embodiment, obtaining the bullet screen data to be displayed in the server consumes current network resources, and needs a certain time to complete downloading of the bullet screen data, so that it may be first found whether the electronic device stores the bullet screen data corresponding to the offline video file, if yes, the bullet screen data corresponding to the locally stored offline video file is used as the bullet screen data to be displayed, and if not, the bullet screen data to be displayed is then downloaded from the server.
S403: and playing the offline video file in a video playing interface of the client and displaying the bullet screen data to be displayed in the video playing interface.
Specifically, the bullet screen data to be displayed and the offline video file may be displayed in a manner that two display interfaces are set in a video playing interface of the client, one of the two display interfaces is a video interface and the other is a bullet screen interface, the bullet screen interface covers the video interface, and is completely transparent, the bullet screen interface is used for displaying the bullet screen data to be displayed, and the video interface is used for displaying each frame of image of the offline video file. Therefore, when the bullet screen is not displayed on the bullet screen interface, the bullet screen interface is transparent, so that the bullet screen interface cannot influence a user to watch the offline video file displayed on the video interface, and when bullet screen data is displayed on the bullet screen interface, the phenomenon that the user watches is that the bullet screen is displayed on the image layer of the offline video file.
Therefore, after the bullet screen data to be displayed is acquired, the display time point of the bullet screen data to be displayed corresponds to the play time point of the offline video file, for example, when the play progress of the video file is a first progress, a first bullet screen is displayed, and the first bullet screen is bullet screen data which is input through the bullet screen input area when the video is watched by a user and when the video is played to the first progress. And displaying the bullet screen data in the video playing interface according to the playing progress of the offline video file and the playing time point of the video file corresponding to each bullet screen data.
Therefore, when the offline video file is played, the bullet screen data corresponding to the offline video file can be displayed together, so that a user can see the bullet screen data of the offline video file when watching the offline video file, namely the offline video file.
In addition, when the client plays the offline video file, the client may already be connected to the server, or may be disconnected from the server, and under two different connection conditions, the client obtains the bullet screen data to be displayed corresponding to the offline video file in different manners, which will be described separately in the following embodiments.
Referring to fig. 6, a bullet screen processing method provided in an embodiment of the present application is shown, where the method is applied to a client of an electronic device, and an implementation manner of acquiring bullet screen data to be displayed when the electronic device is disconnected from a server is described. Specifically, the method comprises the following steps: s601 to S605.
S601: and acquiring a playing request of an offline video file, wherein the offline video file is stored in the electronic equipment in advance.
S602: and judging whether the electronic equipment and the server are in a connection state.
In one embodiment, the electronic device sends a beacon to the server at a certain interval, and the server feeds back a specific message after acquiring the beacon sent by the electronic device, where the specific message is used to indicate that the server successfully acquires the beacon. It is possible to determine that the electronic device and the server are in a connected state after the electronic device acquires the specified message, and if the specified message is not received within a predetermined time or is not acquired after the beacon is transmitted a predetermined number of times, it is determined that the electronic device and the server are not in a connected state, that is, the electronic device and the server are disconnected.
As another embodiment, the electronic device acquires the beacon sent by the server at regular intervals, and if the beacon sent by the server is not received within a predetermined time, it is determined that the electronic device is not in a connection state with the server, that is, the electronic device is disconnected from the server.
As another embodiment, the electronic device may be disconnected from the server in a manner that the electronic device is currently in a state of being disconnected from the network, and the electronic device determines whether the electronic device is currently in the flight mode, and if so, determines to be disconnected from the server, and if not, determines whether the electronic device is in a state of being connected to the server through the above-mentioned beacon determination. In addition, the electronic device and the server are connected through a gateway, and the network system shown in fig. 2 may be that, as shown in fig. 7, the electronic device 100 is connected with the gateway 300, the gateway 300 is connected with the server 200, the electronic device 100 and the gateway 300 are located in a local area network, and the gateway 300 and the server 200 are located in a wide area network, and then the gateway 300 may be a base station, a wireless hotspot, or the like.
In some embodiments, it is determined whether the electronic device is in a connection state with the gateway, if not, it is determined that the electronic device is not connected with the server, and if the electronic device is connected with the gateway, it is determined that the electronic device is in a connection state with the server according to the beacon manner. The connection between the electronic device and the gateway can also be determined by means of a beacon.
S603: and judging whether local barrage data corresponding to the offline video file is stored in the electronic equipment.
And if the electronic equipment is not connected with the server, judging whether local barrage data corresponding to the offline video file is stored in the electronic equipment.
Specifically, a storage area is preset in the electronic device, and the storage area is used for storing local bullet screen data. The local barrage data may be barrage data downloaded by the electronic device or barrage data input by a user operating a client of the electronic device, and the barrage data is stored in correspondence with the video file corresponding to the barrage data. As shown in table 1:
TABLE 1
Identification of video files Barrage data Storage location
Video 1 Barrage 1 Position 1
Video 2 Barrage 2 Position 2
Video 3 Barrage 3 Position 3
As shown in table 1, the identifier of the video file may be a name of the video file, the bullet screen data corresponding to each video file is all the bullet screen data corresponding to the video file, and when new bullet screen data is downloaded or input, the new bullet screen data is stored in the bullet screen data, that is, the bullet screen data is updated, and new bullet screen data is added. The storage location corresponds to a storage address of a memory of the electronic device and may be a pointer to a storage space. And acquiring bullet screen data stored in the storage space designated by the storage position.
The embodiment of determining whether the local barrage data corresponding to the offline video file is stored in the electronic device may be that whether the local barrage data corresponding to the offline video file is included is searched in a storage area of the electronic device, taking table 1 as an example, an identifier of the offline video file is obtained, whether an identifier matching the identifier of the offline video file exists is searched in table 1, and if the identifier exists, it is determined that the local barrage data corresponding to the video file is locally stored.
S604: and acquiring local barrage data corresponding to the offline video file as barrage data to be displayed.
And taking the local barrage data corresponding to the searched offline video file as the barrage data to be displayed, so that the barrage data to be displayed corresponding to the offline video file can be acquired under the condition of not connecting a server or even the Internet.
In addition, although the electronic device and the server are in an unconnected state, if the connection with the local area network is not disconnected, for example, the electronic device is still in a connected state with the gateway, the barrage data of other clients located in the same local area network may be acquired, so that the users of the clients located in one local area network can still interact through the barrage, and a specific embodiment is described in the following embodiments.
S605: and playing the offline video file in a video playing interface of the client and displaying the bullet screen data to be displayed in the video playing interface.
It should be noted that, the above steps are detailed portions, and reference may be made to the foregoing embodiments, which are not repeated herein.
In addition, when the electronic device does not locally store the bullet screen data corresponding to the offline video file, if other electronic devices exist in the local area network where the electronic device is located, the bullet screen data corresponding to the offline video file can be acquired through the other electronic devices. Specifically, referring to fig. 8, the method is applied to the client of the electronic device, and describes a process of acquiring barrage data from the local area network when the electronic device is disconnected from the server. Specifically, the method comprises the following steps: s801 to S808.
S801: and acquiring a playing request of an offline video file, wherein the offline video file is stored in the electronic equipment in advance.
S802: and judging whether the electronic equipment and the server are in a connection state.
S803: and judging whether local barrage data corresponding to the offline video file is stored in the electronic equipment.
If the local barrage data corresponding to the offline video file is stored in the electronic device, S805 is executed, and if the local barrage data corresponding to the offline video file is not stored in the electronic device, S804 is executed.
S804: and local barrage data corresponding to the offline video file stored in other electronic equipment in the same local area network as the electronic equipment is obtained and used as barrage data to be displayed.
As shown in fig. 7, three electronic devices connected to the gateway 300 are located in the same lan, and if the gateway is disconnected from the server, the electronic device is disconnected from the server, but due to the normal connection of the electronic device to the gateway, the electronic device can interact with other electronic devices in the lan.
As an embodiment, when the client of the electronic device in the local area network plays the offline video file, and when it is determined that the connection with the server is disconnected but the connection with the gateway is maintained, an inquiry request for inquiring whether the electronic device receiving the inquiry request needs to acquire the barrage data of the offline video file is sent to all the electronic devices in the local area network, where the inquiry request includes the identifier of the offline video file.
When the electronic device plays the offline video file, if the connection with the server is disconnected but the connection with the gateway is maintained and it is determined that local barrage data corresponding to the offline video file is not stored locally, whether an inquiry request sent by other electronic devices in the local area network is acquired is monitored, if the inquiry request is acquired, a receiving indication message is replied to the electronic device sending the inquiry request, and after receiving the receiving indication message, the electronic device sending the inquiry request sends the stored local barrage data corresponding to the offline video file to the electronic device replying the receiving indication message. Therefore, the electronic device can obtain the local barrage data corresponding to the offline video file stored by other electronic devices in the local area network when judging that the local barrage data corresponding to the offline video file is not stored locally.
As another embodiment, a specific embodiment of acquiring, by an electronic device, local barrage data corresponding to the offline video file stored in other electronic devices in the same local area network as the electronic device is to send a barrage acquisition request to all the other electronic devices in the same local area network, where the barrage acquisition request includes an identifier of the offline video file; and local barrage data corresponding to the offline video file returned by the other electronic equipment based on the barrage acquisition request is acquired.
The bullet screen acquiring request comprises an identifier of the offline video file, and can be set according to data or a title of the offline video file.
As an embodiment, generating an identifier of the offline video file according to the video data of the offline video file; and generating a bullet screen acquisition request according to the identifier of the offline video file. The video data of the offline video file may be a video abstract of the offline video file, and specifically, the corresponding characteristic value may be obtained according to a text or a picture of the video abstract, for example, the characteristic value of the video abstract is obtained by using a hash algorithm, so as to obtain an identifier of the offline video file. In addition, the identifier of the corresponding video file can be generated according to the video stream or audio stream data of the offline video file.
Specifically, when the client acquires the offline video file, the client sends the video file to the playing module, and after the playing module acquires the offline video file, the playing module analyzes the offline video file to obtain a video stream and an audio stream. The video files are composed of two parts of video streams and audio streams, and the packaging formats of the audio and video files in different video formats are definitely different. The process of combining audio and video streams into a file is called muxer, whereas the process of separating audio and video streams from a media file is called demux.
As an embodiment, the playing module is a system playing module. The system playing module is a default playing module in an operating system of the electronic device, namely, when a client installed in the electronic device plays a video file, the default playing module is to call the system playing module to play the video file. In the android system, the system play module may be a media Framework module.
As another embodiment, the playing module may be a non-default playing module implanted in an operating system of the electronic device, and may be, for example, an FFmpeg module. The FFmpeg module is an open-source cross-platform video and audio streaming framework, belongs to free software, and adopts LGPL or GPL licenses (according to selected components). It provides a complete solution to recording, converting and streaming audio-video. It contains a very advanced audio/video codec library l i bavocodec. The FFmpeg module integrates encoders of audio and video in various formats, has an audio and video playing function, and also has a video file analyzing function.
After the video stream and the audio stream of the offline video file are obtained, the identifier of the offline video file may be obtained according to the video stream or the audio stream, and then since the data size of the audio stream is smaller, in order to reduce the amount of calculation and reduce the power consumption of the electronic device, the identifier of the video file may be obtained by obtaining a characteristic value for the data of the audio stream, specifically, obtaining a characteristic value of the audio stream data, where the characteristic value may be a characteristic value capable of identifying the uniqueness of one data, such as an MD5 value or an SHA1 value. And taking the characteristic value of the audio stream data as the identifier of the off-line video file, so that the characteristic value can be used as the identifier of the off-line video file due to the uniqueness of the characteristic value and is used for distinguishing the off-line video file from other video files. In addition, when the barrage data is stored in other electronic equipment and servers, the identification of the video file and the barrage data are correspondingly stored, and the identification of the video file also adopts the characteristic value.
As another embodiment, the identifier of the offline video file may also be generated according to the title of the video file. The title of the video file may be a name of the video file, for example, 123456.Mp4, or may be a name of a video file described in a video summary of the video file, for example, a name and a content summary of a video are included in the video summary, and the name of the video in the video summary is taken as the title of the video file.
After the identifier of the offline video file is obtained, a bullet screen obtaining request is generated according to the identifier of the offline video file, and specifically, the bullet screen obtaining request may be generated by packaging the identifier of the offline video file according to a communication protocol between electronic devices. And then, sending the bullet screen acquisition request to each electronic device in the local area network.
Supposing that the electronic device sending the barrage acquisition request in a local area network is named as a first electronic device, and the other electronic devices are named as second electronic devices, the first electronic device sends the barrage acquisition request to all the second electronic devices, and after the second electronic devices obtain the barrage acquisition request, the barrage acquisition request is analyzed to obtain the identification of the offline video file, and then the barrage data corresponding to the identification of the offline video file is searched and sent to the first electronic device. As an implementation manner, the first electronic device sends the first electronic device to all electronic devices in the local area network by using a broadcast message, for example, the first electronic device may send the first electronic device by using an Address Resolution Protocol (ARP) message. Specifically, the first electronic device packages the barrage acquisition request into an ARP message, and then broadcasts the ARP message to each second electronic device in the local area network, and the second electronic device can acquire the barrage acquisition request by analyzing the ARP message after acquiring the ARP message.
In some embodiments, after acquiring the bullet screen acquisition request, the electronic device can display a reminding message in a preset interface, where the preset interface may be an interface displayed by the current electronic device, the reminding message is used to remind a user of other electronic devices in the local area network of requesting to acquire local bullet screen data, and the user may select whether to send the local bullet screen data to the electronic device requesting to acquire bullet screen data based on the reminding message.
As an embodiment, the reminder may be a pop-up window. As shown in fig. 9, the reminding information is displayed in a pop-up window, and the reminding information and the determined or rejected button are displayed in the pop-up window, for example, if "the device 1 requests to acquire the pop-up screen data of the target video" is the reminding information, the reminding information indicates the identifier of the electronic device that sent the pop-up screen acquisition request, and specifically, the pop-up screen acquisition request includes the identifier of the electronic device that requests to acquire the local pop-up screen data of the offline video file in addition to the identifier of the offline video file.
After clicking an "allow" button in the popup window, a user inputs a determination sending instruction, specifically, taking the first electronic device and the second electronic device as examples, the second electronic device obtains a popup screen obtaining request sent by the first electronic device, and displays a reminding message on a current interface, specifically, as shown in fig. 9, the reminding message is displayed in the popup window, it is detected whether a user inputs a determination sending instruction based on the reminding message is obtained, and if the instruction is detected, local popup screen data corresponding to an offline video file stored locally is sent to the first electronic device.
As another implementation manner, the reminding information is displayed in a top status bar, as shown in fig. 10, after the second electronic device obtains the barrage obtaining request sent by the first electronic device, the reminding information is displayed in the top status bar of the current interface, and as shown in fig. 10, "device 1 requests to obtain barrage data of the target video," is the reminding information displayed in the top status bar.
The user can click the top status bar, the electronic device responds to the touch operation of the user on the top status bar, and displays a local bullet screen data list interface, as shown in fig. 11, a plurality of locally stored bullet screen data are displayed on the local bullet screen data list interface, each bullet screen data is displayed in a thumbnail mode, an identifier of a video file and a key frame image of the video file are displayed in the thumbnail, and the user can select a video file corresponding to a thumbnail by clicking the thumbnail of a certain video file, then click and send the thumbnail, and then can send the bullet screen data selected by the user to the first electronic device. For example, the bullet screen data displayed in the local bullet screen data list interface may be multiple versions of bullet screen data corresponding to the offline video file, and the user may select one or more bullet screen data to send to the first electronic device.
In addition, the reminding information can also remind the user of the second electronic equipment, and the first electronic equipment requests to acquire the data of the second electronic equipment, so that the privacy of the user of the second electronic equipment can be protected.
After the first electronic device acquires the local barrage data of all the second electronic devices in the local area network, all the acquired local barrage data are used as barrage data to be displayed. Therefore, when the electronic equipment cannot be connected to the Internet, the local barrage data can be acquired from the local area network through interaction with the electronic equipment in the local area network, and when the first electronic equipment cannot acquire the local barrage data locally, the local barrage data can be acquired from the local area network and serve as the barrage data of the off-line video file played by the first electronic equipment, and therefore the user experience degree of a user when the off-line video file is watched is improved.
S805: and acquiring local barrage data corresponding to the offline video file.
If the local barrage data corresponding to the offline video file is locally stored, the locally stored barrage data is displayed on the video playing interface as the barrage data to be displayed, and the local barrage data corresponding to the offline video files of other electronic devices in the local area network can be acquired, so that the barrage data published by the users of the other electronic devices in the local area network in real time can be displayed on the video playing interface.
S806: and obtaining local barrage data corresponding to the offline video files stored in other electronic equipment in the same local area network as the electronic equipment.
Specifically, the process of acquiring other local barrage data may refer to the foregoing embodiment of S804, and is not described herein again.
S807: and integrating all the acquired local bullet screen data into new local bullet screen data serving as bullet screen data to be displayed.
Taking the first electronic device and the second electronic device as an example, after the first electronic device obtains the local barrage data corresponding to the locally stored offline video file, the barrage obtaining request is sent to all the second electronic devices in the same local area network as the first electronic device, and the second electronic devices send the local barrage data corresponding to the locally stored offline video file to the first electronic device.
Supposing that the bullet screen data corresponding to the offline video file locally stored in the first electronic device is named as local bullet screen data 1, the bullet screen data corresponding to the offline video file sent by the second electronic device and acquired by the first electronic device is named as local bullet screen data 2, and the local bullet screen data 1 and the local bullet screen data 2 are integrated, specifically, bullet screen data different from the local bullet screen data 1 can be searched in the local bullet screen data 2, and then the different bullet screen data are integrated into the local bullet screen data 1, because each bullet screen information in the bullet screen data corresponds to one play time point of the video file, according to the play time point, the different bullet screen data are found out, and are inserted into the local bullet screen data 1 according to the play time point, so as to integrate and form new local bullet screen data as to-be-displayed bullet screen data.
Therefore, on the basis that the first electronic device stores the barrage data of the offline video file, the local barrage data of the offline video file locally stored by other electronic devices can be acquired from the local area network, so that the displayed barrage data can show the barrages of other users in the local area network, and the interactivity is increased.
S808: and playing the offline video file in a video playing interface of the client and displaying the bullet screen data to be displayed in the video playing interface.
It should be noted that, the above steps are detailed portions, and reference may be made to the foregoing embodiments, which are not repeated herein.
In addition, in consideration of the real-time performance of the barrage, the first electronic device may send a barrage acquisition request to the second electronic device at a certain time interval, so as to acquire barrage data of other electronic devices in the local area network in real time. Meanwhile, when the user inputs a new barrage at the first electronic device, the new barrage is synchronized to other electronic devices in the local area network, and under the condition that the internet is connected, barrage data are sent to the server to be stored.
In addition, if the electronic device is in a connected state with the server when the client in the electronic device plays the offline video file, the network barrage data corresponding to the offline video file can be acquired from the server. Specifically, please refer to fig. 12, which illustrates a bullet screen processing method applied to a client of an electronic device according to an embodiment of the present application, and describes a process of acquiring bullet screen data when the electronic device is connected to a server. Specifically, the method comprises the following steps: s1201 to S1206.
S1201: and acquiring a playing request of an offline video file, wherein the offline video file is stored in the electronic equipment in advance.
S1202: and judging whether the electronic equipment and the server are in a connection state.
S1203: and judging whether local barrage data corresponding to the offline video file is stored in the electronic equipment.
S1204: and acquiring local barrage data corresponding to the offline video file as barrage data to be displayed.
S1205: and playing the offline video file in a video playing interface of the client and displaying the bullet screen data to be displayed in the video playing interface.
For the above specific implementation of S1201 to S1205, reference may be made to the foregoing embodiments, which are not described herein again.
S1206: and sending a bullet screen acquisition request to the server, and taking the acquired network bullet screen data as bullet screen data to be displayed.
The electronic device and the server are connected through the internet, and the barrage acquisition request can be sent to the server through a predetermined communication protocol, for example, the electronic device sends the barrage acquisition request to the server through a TCP protocol.
The bullet screen acquisition request comprises an identification of the offline video file, and is used for indicating the server to search corresponding network bullet screen data according to the identification of the offline video file and sending the network bullet screen data to the client.
The server responds to the bullet screen acquisition request to send the network bullet screen data corresponding to the stored offline video file to the electronic equipment, so that the electronic equipment can acquire the bullet screen data of the video file from the server when playing the offline video file, a user can watch the bullet screen data when playing the pre-downloaded video file, the bullet screen data in the server stores the bullet screen data uploaded by the plurality of clients, and the users can communicate through the bullet screen data.
In addition, the specific implementation manner of the electronic device sending the barrage acquisition request to the server may be: generating an identifier of the offline video file according to the video data of the offline video file; generating a bullet screen acquisition request according to the identification of the offline video file; and sending a bullet screen acquisition request to the server. The implementation mode of generating the identifier of the offline video file according to the video data of the offline video file is to analyze the offline video file to obtain the audio stream data of the offline video file; acquiring a characteristic value of the audio stream data; and taking the characteristic value of the audio stream data as the identifier of the off-line video file.
In addition, an identifier of the offline video file can be generated according to the title of the video file, specifically, the identifier of the offline video file is generated according to the title of the offline video file; generating a bullet screen acquisition request according to the identifier of the offline video file; and sending a barrage acquisition request to the server.
For the specific implementation of generating the identifier of the offline video file and generating the bullet screen acquiring request according to the identifier, reference may be made to the foregoing embodiment, which is not described herein again.
In addition, since sending the bullet screen acquisition request to the server and downloading the bullet screen data corresponding to the offline video file from the server may occupy a certain network bandwidth, before sending the bullet screen acquisition request to the server, it is first determined whether the local bullet screen data corresponding to the offline video file is stored locally in the electronic device, specifically, the implementation manner of sending the bullet screen acquisition request to the server is as follows: judging whether local barrage data corresponding to the offline video file is stored in the electronic equipment; and if the bullet screen is not stored, sending a bullet screen acquisition request to the server, and if the bullet screen is stored, not sending the bullet screen acquisition request to the server.
Therefore, under the condition of locally storing local barrage data corresponding to the off-line video file, the network bandwidth can be saved without sending a barrage acquisition request to the server, and the network barrage data corresponding to the off-line video file can be selected not to be downloaded from the server.
In addition, considering that the bullet screen data corresponding to the locally stored offline video file is older, when the local bullet screen data corresponding to the locally stored offline video file is detected, the local bullet screen data corresponding to the offline video file is acquired; detecting whether the updating time of the local barrage data is earlier than a preset time point; and if the time is earlier than the preset time point, sending a bullet screen acquisition request to the server.
Specifically, when the electronic device stores the bullet screen data locally, the storage time is set for the bullet screen data, that is, the storage time is increased on the basis of the table 1, and then the table 1 is changed into the table 2.
TABLE 2
Identification of video files Barrage data Storage location Storage time
Video 1 Barrage 1 Position 1 Time 1
Video 2 Barrage 2 Position 2 Time 2
Video 3 Barrage 3 Position 3 Time 3
The storage time shown in table 2 is the latest updated time. For example, when the barrage data corresponding to the video 1 is updated, the barrage 1 corresponding to the video 1 is updated, and the time 1 corresponding to the video 1 is updated, so that the storage time of the barrage data of the video file recorded by the electronic device represents the latest update time of the barrage data.
Therefore, after the latest update time of the local barrage data corresponding to the offline video file is obtained, whether the update time is earlier than a preset time point is determined, where the preset time point is a time point set by a user according to a requirement, for example, the preset time point may be a day before the current time, and the mode of determining the preset time point is to determine a current date corresponding to the current time, and use a zero point of the day before the current date as the preset time point, or certainly, it is also possible to set a short interval between the preset time point and the current time, for example, use a time point 2 hours before the current time as the preset time point, for example, the current time is 10 points 50, and then the preset time point is 8 points 50.
In addition, different preset time points may be set when the electronic device is in different time periods, specifically, if an interval between the preset time period and the current time is defined as a preset interval, the preset time point is a time of the preset interval before the current time. As an embodiment, the time period in which the current time is located is determined, and if the time period is a first time period, the preset interval is set to be a first time length, and if the time period is a second time period, the preset interval is set to be a second time length, specifically, the first time period is 18 to 00 and 00 to 01. For example, if the current time is 20. For another example, if the current time is 15, then the current time is located in the second time period, and then the preset time point is 13.
Therefore, as more users watch videos in the first time period, the possibility of generating new barrage data is higher, and thus, the barrage data needs to be updated more frequently, that is, the set preset time point is closer to the current time, and therefore, the first time length needs to be shorter. If the locally stored barrage data is larger than the preset time point, the barrage data is considered to be old, and new barrage data needs to be downloaded from the server.
In addition, considering that a user may need to input bullet screen data when watching an offline video file, but should not be limited to the online video watching, the user can input bullet screen data, so the method provided in the embodiment of the present application can also input bullet screen data when watching an offline video, specifically, as shown in fig. 13, a bullet screen processing method provided in the embodiment of the present application is shown, and the method is applied to a client of an electronic device, and describes a process of acquiring bullet screen data input by the user and playing the bullet screen data in the case of playing an offline video file. Specifically, the method comprises the following steps: s1301 to S1306.
S1301: and acquiring a playing request of an offline video file, wherein the offline video file is stored in the electronic equipment in advance.
S1302: and acquiring bullet screen data to be displayed corresponding to the offline video file.
S1303: and playing the offline video file in a video playing interface of the client and displaying the bullet screen data to be displayed in the video playing interface.
S1304: and acquiring target bullet screen data input by a user through a bullet screen input area of a video playing interface of the client.
The barrage input area is an area where a user inputs text information in a video playing interface of the client, and specifically may be an area indicated by reference numeral 101 in fig. 3, which specifically refers to the foregoing embodiment and is not described herein again.
S1305: and determining the playing time point of the offline video file corresponding to the target bullet screen data.
As an implementation manner, when the user clicks and sends the bullet screen data after inputting the bullet screen data, the playing progress of the video file is used as the playing time point of the offline video file corresponding to the target bullet screen data. As another embodiment, when the user clicks the bullet screen input area, the currently played offline video file is paused, and the playing progress of the video file at this time is recorded as the playing time point corresponding to the target bullet screen data input by the user.
S1306: and displaying the target bullet screen data in the video playing interface according to the playing time point.
The specific playing process may refer to the foregoing description about playing the bullet screen data to be displayed, and in addition, when the user inputs the target bullet screen data through the bullet screen input area, the user may select the display information of the bullet screen data, where the display information includes a display position, a display font, a color, and the like, and the display modes corresponding to different display positions are also different, for example, when the top of the video playing interface is displayed, the display mode is to be drawn from the right side to the left side of the video playing interface, and when the bottom of the video playing interface is displayed, the middle position at the bottom is flickered and displayed.
Of course, the display mode may be set independently, and the display information may include a display mode in addition to the display position, the display font, and the color included in the display information.
And the barrage input area can also be called out through the operation gesture input by the user, namely, the barrage input area is in a hidden state when the video is played at ordinary times, when the user inputs a preset operation gesture, the barrage input area is displayed on the video playing interface, for example, the user clicks the bottom of the video playing interface, the barrage input area can be called out, namely, the barrage input area is displayed on the video playing interface.
Therefore, when watching the offline video file, the user can input the target bullet screen data and display the data on the video playing interface of the video file.
In addition, after the target barrage data is displayed in the video playing interface according to the playing time point, the electronic device may further detect whether the electronic device and the server are in a connected state, and if the electronic device and the server are not in the connected state, store the target barrage data into local barrage data, corresponding to the offline video file, in the electronic device, specifically, update the local barrage data, corresponding to the offline video file, stored in the electronic device by using the target barrage data, that is, add the target barrage data into the local barrage data corresponding to the offline video file, specifically, write the target barrage data into a position corresponding to the playing time point of the local barrage data according to the playing time point corresponding to the target barrage data.
And after detecting that the electronic equipment is connected with the server, sending a storage request to the server, wherein the storage request comprises the target bullet screen data, and the storage request is used for indicating the server to store the target bullet screen data into the network bullet screen data corresponding to the offline video file.
Therefore, when the user plays the offline video, a bullet screen input area is provided, the target bullet screen data input by the user through the area is obtained, and the target bullet screen data is displayed on the video playing interface. Even if the current electronic equipment is in a network-free state, namely the current electronic equipment is disconnected with the server and also disconnected with the Internet, the target barrage data input by the user can still be displayed on the video playing interface. If the server is not connected currently, the target barrage data is stored in local barrage data of the electronic equipment, and if the network connection is recovered, namely after the electronic equipment is detected to be connected with the server, the barrage data is sent to the server to be stored, so that a user can input the barrage data to the video file when the user plays the offline video file offline.
In addition, considering that a user may input the barrage data multiple times when watching a video, if the barrage data is frequently sent to the server, some network resources may be wasted, and therefore, after it is detected that the electronic device is connected to the server, a specific implementation manner of sending the storage request to the server is as follows: and when the connection between the electronic equipment and the server is detected, acquiring the playing condition of the offline video file, and if the playing condition meets a specified condition, sending a storage request to the server.
In this embodiment of the present application, the playing condition of the offline video file may be a playing progress, a playing frequency, or a system time point when the video file is played. The playing condition meeting the specified condition may be that the ratio of the playing progress to the overall playing progress of the offline video file is greater than a preset value, where the preset value may be between 50% and 100% of data, including 50% and 100%. That is, if the current play progress is greater than half of the overall play progress, the target bullet screen data may be transmitted to the server each time one piece of target bullet screen data is acquired and in a case where the electronic device is connected to the server. The preset value can be freely set according to the requirement of a user.
In this embodiment of the present application, if the playing condition satisfies a specified condition, the implementation manner of sending the storage request to the server is: judging whether the playing progress is the finished playing; if the playing is finished, acquiring bullet screen data input by all users in the process of playing the offline video file as target bullet screen data; and sending a storage request to the server.
The playing progress is the finished playing, and may be the ratio of the current playing progress to the overall playing progress of the offline video file is 100%, or may be greater than a preset ratio, where the preset ratio is the ratio of the playing progress at the end of the offline video file to the overall playing progress of the offline video file, for example, the overall playing time of the offline video file is 20 minutes, and the trailer song is at the position of 18 minutes, the preset ratio is the ratio of 18 to 20, that is, 90%.
And if the playing progress indicates that the off-line video file is played completely, acquiring bullet screen data input by all users in the process of playing the off-line video file. Specifically, in the process of playing the offline video file at the client of the electronic device, the user may input bullet screen data for multiple times, and possibly other users input bullet screen data, and then all the bullet screen data acquired in the playing process are temporarily stored in the local storage space of the electronic device, and after the playing is finished, the bullet screen data stored in the playing process of the offline video file are all sent to the server. Specifically, a storage request is sent to a server, where the storage request may be a data packet, the data packet stores target bullet screen data and an identifier of an offline video file, and after the server acquires the data packet, the server parses the data packet and then acquires the identifier of the video file, so as to search for network bullet screen data corresponding to the identifier of the offline video file, and store the acquired target bullet screen data into the network bullet screen data.
In addition, it may also be that, because the current network state is not good, or the network resources are relatively lacking, if sending the bullet screen data may occupy the network bandwidth, so that it may be selected to send the target bullet screen data again when the network state is relatively ideal, as another embodiment, after detecting that the electronic device establishes a connection with the server, the specific embodiment of sending the storage request to the server may also be: acquiring the communication quality of a communication link between the electronic equipment and the server; and if the communication quality meets a preset standard, sending the target bullet screen data and the identification of the video file to the server.
The communication quality can be signal strength between the electronic equipment and the server, and if the signal strength is greater than a preset strength value, the communication quality is judged to meet a preset standard, and the target bullet screen data and the identification of the video file are sent to the server.
Additionally, the communication quality may also be a channel quality between the electronic device and the server. The channel quality may be an error vector magnitude of a channel, a number of access points, a signal strength, and the like. An Error Vector Magnitude (EVM) is a Vector difference between an ideal Error-free reference signal and an actually transmitted signal at a given time, and is used for measuring an amplitude Error and a phase Error of a modulated signal, and the EVM specifically indicates a proximity degree of an IQ component generated when a receiving terminal demodulates the signal and an ideal signal component, and is an index for considering the quality of the modulated signal. The smaller the EVM, the better the channel quality of the channel. The number of the access points can also obtain the access points on each channel when the channels are scanned, so that the number of the access points on each channel can be determined, and the larger the number of the access points is, the worse the channel quality is, and vice versa, the better the channel quality is. Similarly, the signal strength can also be obtained during channel scanning, and the higher the signal strength is, the higher the channel quality is, and vice versa, the lower the channel quality is.
When entering a new network environment, the mobile terminal scans a plurality of supported channels according to a preset channel scanning sequence, and in the scanning process of each channel, a wireless access point on the channel can be obtained, so that the channel where each wireless access point is located can be determined. Therefore, the channel where the connected wireless audio playing equipment is located can be determined, and the error vector magnitude corresponding to the channel is further obtained.
And if the error vector amplitude between the electronic equipment and the server is smaller than a preset amplitude value, judging that the communication quality meets a preset standard, and sending the target bullet screen data and the identifier of the video file to the server.
It should be noted that, the above steps are parts of detailed description, and reference may be made to the foregoing embodiments, which are not repeated herein.
Referring to fig. 14, which shows a block diagram of a bullet screen processing apparatus according to an embodiment of the present application, the bullet screen processing apparatus 1400 may include: an acquisition unit 1401, a determination unit 1402, and a display unit 1403.
The obtaining unit 1401 is configured to obtain a play request of an offline video file, where the offline video file is stored in the electronic device in advance.
The determining unit 1402 is configured to obtain bullet screen data to be displayed corresponding to the offline video file.
Specifically, the determining unit 1402 is further configured to determine whether the electronic device and the server are in a connected state; if the electronic equipment is not in the connection state, judging whether local barrage data corresponding to the offline video file is stored in the electronic equipment; and if the offline video file is stored, acquiring local barrage data corresponding to the offline video file as barrage data to be displayed. And if the off-line video file is not stored, acquiring local barrage data corresponding to the off-line video file stored in other electronic equipment in the same local area network as the electronic equipment, and taking the local barrage data as the barrage data to be displayed.
If the offline video file is stored, local barrage data corresponding to the offline video file is obtained; acquiring local barrage data corresponding to the offline video files stored in other electronic equipment in the same local area network as the electronic equipment; and integrating all the acquired local barrage data into new local barrage data serving as the barrage data to be displayed.
Specifically, the manner for determining unit 1402 to obtain the local bullet screen data corresponding to the offline video file stored in the other electronic device in the same local area network as the electronic device is as follows: sending bullet screen acquisition requests to other electronic equipment in the same local area network, wherein the bullet screen acquisition requests comprise the identification of the offline video file; and local barrage data corresponding to the offline video file returned by the other electronic equipment based on the barrage acquisition request is acquired.
In addition, the determining unit 1402 is further configured to send a bullet screen obtaining request to the server, where the bullet screen obtaining request includes an identifier of the offline video file, and the bullet screen obtaining request is used to instruct the server to search for corresponding network bullet screen data according to the identifier of the offline video file, and send the network bullet screen data to the client; and taking the acquired network bullet screen data as bullet screen data to be displayed. Specifically, as an embodiment, the determining unit 1402 determines whether local barrage data corresponding to the offline video file is stored in the electronic device; and if the bullet screen is not stored, sending a bullet screen acquisition request to the server. As another embodiment, if the local barrage data is stored, the determining unit 1402 obtains the local barrage data corresponding to the offline video file; detecting whether the updating time of the local barrage data is earlier than a preset time point or not; and if the time is earlier than the preset time point, sending a bullet screen acquisition request to the server.
The display unit 1403 is configured to play the offline video file in the video playing interface of the client and display the bullet screen data to be displayed in the video playing interface.
Further, the device also comprises an input unit, a bullet screen display unit and a recording unit.
The input unit is used for acquiring target bullet screen data input by a user through a bullet screen input area of a video playing interface of the client; and determining the playing time point of the off-line video file corresponding to the target bullet screen data.
And the bullet screen display unit is used for displaying the target bullet screen data in the video playing interface according to the playing time point.
The recording unit is used for detecting whether the electronic equipment is in a connection state with the server; and if the target bullet screen data is not in the connection state, storing the target bullet screen data into local bullet screen data corresponding to the offline video file in the electronic equipment.
The recording unit is further configured to send a storage request to the server after it is detected that the electronic device is connected to the server, where the storage request includes the target bullet screen data, and the storage request is used to instruct the server to store the target bullet screen data into the network bullet screen data corresponding to the offline video file.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the above-described devices and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In several embodiments provided in the present application, the coupling of the modules to each other may be electrical, mechanical or other forms of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Referring to fig. 15, a block diagram of an electronic device according to an embodiment of the present application is shown. The electronic device 100 may be a smart phone, a tablet computer, an electronic book, or other electronic devices capable of running an application. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by the one or more processors 110, the one or more programs configured to perform a method as described in the aforementioned method embodiments.
Processor 110 may include one or more processing cores. The processor 110 connects various parts within the overall electronic device 100 using various interfaces and lines, and performs various functions of the electronic device 100 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120 and calling data stored in the memory 120. Alternatively, the processor 110 may be implemented in at least one hardware form of Digital Signal Processing (DSP), field Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 110 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 110, but may be implemented by a communication chip.
The Memory 120 may include a Random Access Memory (RAM) or a Read-only Memory (Read-only Memory). The memory 120 may be used to store instructions, programs, code sets, or instruction sets. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The data storage area may also store data created by the electronic device 100 during use (e.g., phone book, audio-video data, chat log data), and the like.
If each unit in the bullet screen processing device shown in fig. 14 is used as a function module such as a program package, each unit in the bullet screen processing device is stored in the memory 120, can be called by the processor, and executes the corresponding function.
On the other hand, if each unit in the bullet screen processing apparatus shown in fig. 14 is a specific circuit element of the electronic device, the acquiring unit and the determining unit are CPUs of the electronic device and the display unit may be a GPU of the electronic device.
Referring to fig. 16, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable storage medium 1600 has stored therein program code that can be called by a processor to execute the method described in the above method embodiments.
The computer-readable storage medium 1600 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium 1600 includes a non-volatile computer-readable medium. The computer readable storage medium 1600 has storage space for program code 1610 for performing any of the method steps described above. The program code can be read from and written to one or more computer program products. Program code 1610 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (18)

1. The bullet screen processing method is applied to electronic equipment, the electronic equipment can be connected with a server through a gateway, the gateway is connected with a plurality of electronic equipment, all the electronic equipment connected with the gateway are positioned in the same local area network, a client is installed on the electronic equipment, and the method comprises the following steps:
acquiring a playing request of an offline video file, wherein the offline video file is stored in the electronic equipment in advance;
judging whether the electronic equipment and the server are in a connection state;
if the electronic equipment is not in a connection state, judging whether local barrage data corresponding to the offline video file is stored in the electronic equipment or not, wherein the gateway is disconnected from the server in the disconnection state;
if the offline video file is stored, local barrage data corresponding to the offline video file is acquired and used as first barrage data;
local bullet screen data corresponding to the offline video file stored in other electronic equipment in the same local area network as the electronic equipment are obtained and serve as second bullet screen data;
searching bullet screen data which is different from the first bullet screen data in the second bullet screen data;
inserting the distinguished bullet screen data into the first bullet screen data based on the playing time points of the distinguished bullet screen data to obtain bullet screen data to be displayed;
and playing the offline video file in a video playing interface of the client and displaying the bullet screen data to be displayed in the video playing interface.
2. The method according to claim 1, wherein after determining whether the local barrage data corresponding to the offline video file is stored in the electronic device if the electronic device is not in the connected state, the method further comprises:
and if the local bullet screen data is not stored, acquiring local bullet screen data corresponding to the offline video file stored in other electronic equipment in the same local area network as the bullet screen data to be displayed.
3. The method according to claim 2, wherein the obtaining local barrage data corresponding to the offline video file stored in another electronic device in the same local area network as the electronic device comprises:
sending a bullet screen acquisition request to other electronic equipment in the same local area network, wherein the bullet screen acquisition request comprises an identifier of the offline video file;
and local barrage data corresponding to the offline video file returned by the other electronic equipment based on the barrage acquisition request is acquired.
4. The method of claim 1, further comprising:
if the client side is in a connection state, sending a bullet screen acquisition request to the server, wherein the bullet screen acquisition request comprises an identifier of the offline video file, and is used for indicating the server to search corresponding network bullet screen data according to the identifier of the offline video file and sending the network bullet screen data to the client side;
and taking the acquired network bullet screen data as bullet screen data to be displayed.
5. The method of claim 4, wherein sending a barrage acquisition request to the server if the barrage acquisition request is in the connected state comprises:
if the electronic equipment is in the connection state, judging whether local barrage data corresponding to the offline video file is stored in the electronic equipment;
and if the bullet screen is not stored, sending a bullet screen acquisition request to the server.
6. The method according to claim 5, wherein after determining whether the local barrage data corresponding to the offline video file is stored in the electronic device if the electronic device is in the connected state, the method further comprises:
if the offline video file is stored, local barrage data corresponding to the offline video file is obtained;
detecting whether the updating time of the local barrage data is earlier than a preset time point or not;
and if the time is earlier than the preset time point, sending a bullet screen acquisition request to the server.
7. The method according to any one of claims 4-6, wherein said sending a barrage acquisition request to said server comprises:
generating an identifier of the offline video file according to the video data of the offline video file;
generating a bullet screen acquisition request according to the identifier of the offline video file;
and sending a bullet screen acquisition request to the server.
8. The method of claim 7, wherein generating an identification of an offline video file from video data of the offline video file comprises:
analyzing the offline video file to obtain audio stream data of the offline video file;
acquiring a characteristic value of the audio stream data;
and taking the characteristic value of the audio stream data as the identifier of the off-line video file.
9. The method of claim 8, wherein the characteristic value is an MD5 value.
10. The method according to any one of claims 4-6, wherein said sending a barrage acquisition request to said server comprises:
generating an identifier of the offline video file according to the title of the offline video file;
generating a bullet screen acquisition request according to the identifier of the offline video file;
and sending a barrage acquisition request to the server.
11. The method according to claim 1, wherein after the playing the offline video file in the video playing interface of the client and displaying the bullet screen data to be displayed in the video playing interface, further comprising:
acquiring target bullet screen data input by a user through a bullet screen input area of a video playing interface of the client;
determining a playing time point of the offline video file corresponding to the target bullet screen data;
and displaying the target bullet screen data in the video playing interface according to the playing time point.
12. The method of claim 11, wherein after displaying the target barrage data within the video playback interface according to the playback time point, further comprising:
detecting whether the electronic equipment and a server are in a connection state;
and if the target bullet screen data is not in the connection state, storing the target bullet screen data into local bullet screen data corresponding to the offline video file in the electronic equipment.
13. The method of claim 12, wherein after detecting whether the electronic device and the server are in a connected state, the method further comprises:
and after detecting that the electronic equipment is connected with the server, sending a storage request to the server, wherein the storage request comprises the target bullet screen data, and the storage request is used for indicating the server to store the target bullet screen data into the network bullet screen data corresponding to the offline video file.
14. The method of claim 13, wherein sending a storage request to the server after detecting that the electronic device establishes a connection with the server comprises:
when the fact that the electronic equipment is connected with the server is detected, the playing condition of the offline video file is obtained;
and if the playing condition meets the specified condition, sending a storage request to the server.
15. The method of claim 14, wherein the playing status includes a playing progress, and the sending a storage request to the server if the playing status satisfies a specified condition comprises:
judging whether the playing progress is the finished playing;
if the playing is finished, acquiring bullet screen data input by all users in the process of playing the offline video file as target bullet screen data;
and sending a storage request to the server.
16. The utility model provides a bullet curtain processing apparatus which characterized in that is applied to electronic equipment, electronic equipment can be connected with the server through the gateway, the gateway is connected with a plurality of electronic equipment, and all electronic equipment with gateway connection are in same LAN, the electronic equipment installs the customer end, the device includes:
the device comprises an acquisition unit, a display unit and a processing unit, wherein the acquisition unit is used for acquiring a playing request of an offline video file, and the offline video file is stored in the electronic equipment in advance;
the determining unit is used for judging whether the electronic equipment and the server are in a connection state or not; if the electronic equipment is not in the connection state, judging whether local barrage data corresponding to the offline video file is stored in the electronic equipment or not, wherein the gateway is disconnected from the server in the disconnection state; if the offline video file is stored, local barrage data corresponding to the offline video file is obtained and used as first barrage data; local bullet screen data corresponding to the offline video file stored in other electronic equipment in the same local area network as the electronic equipment are obtained and serve as second bullet screen data; searching bullet screen data which is different from the first bullet screen data in the second bullet screen data; inserting the distinguished bullet screen data into the first bullet screen data based on the playing time points of the distinguished bullet screen data to obtain bullet screen data to be displayed;
and the display unit is used for playing the offline video file in a video playing interface of the client and displaying the bullet screen data to be displayed in the video playing interface.
17. An electronic device, comprising:
one or more processors;
a memory;
a client;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-15.
18. A computer-readable storage medium, characterized in that a program is stored in the computer-readable storage medium, which program can be called by a processor to execute the method according to any one of claims 1-15.
CN201880098222.8A 2018-11-13 2018-11-13 Bullet screen processing method and device, electronic equipment and computer readable storage medium Active CN112771881B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/115274 WO2020097803A1 (en) 2018-11-13 2018-11-13 Overlay comment processing method and apparatus, electronic device, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN112771881A CN112771881A (en) 2021-05-07
CN112771881B true CN112771881B (en) 2023-02-28

Family

ID=70730234

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880098222.8A Active CN112771881B (en) 2018-11-13 2018-11-13 Bullet screen processing method and device, electronic equipment and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN112771881B (en)
WO (1) WO2020097803A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115190340B (en) * 2021-04-01 2024-03-26 华为终端有限公司 Live broadcast data transmission method, live broadcast equipment and medium
CN115086742A (en) * 2022-06-13 2022-09-20 北京达佳互联信息技术有限公司 Audio and video generation method and device
CN115243093B (en) * 2022-07-04 2023-08-22 网易(杭州)网络有限公司 Video bullet screen processing method and device, storage medium and electronic device
CN115361577B (en) * 2022-08-26 2024-03-05 维沃移动通信有限公司 Barrage information display method and device and electronic equipment
CN116567341B (en) * 2023-07-11 2023-10-10 奥视(天津)科技有限公司 High concurrency signal processing platform based on golang

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101132518A (en) * 2006-08-26 2008-02-27 华为技术有限公司 Video-on-demand method and system and LAN gateway
CN105763950A (en) * 2014-12-19 2016-07-13 中兴通讯股份有限公司 Bullet screen display method and system
CN106210773A (en) * 2016-08-19 2016-12-07 暴风集团股份有限公司 The method and system of barrage are play in local video
CN106341408A (en) * 2016-09-20 2017-01-18 武汉斗鱼网络科技有限公司 Live broadcast sharing method and system in LAN of TV device
CN107690078A (en) * 2017-09-28 2018-02-13 腾讯科技(深圳)有限公司 Barrage method for information display, provide method and equipment
CN107872715A (en) * 2017-11-09 2018-04-03 北京奇艺世纪科技有限公司 A kind of method and device for showing displaying information
CN108495165A (en) * 2018-01-29 2018-09-04 上海哔哩哔哩科技有限公司 Barrage control method for playing back, mobile terminal and barrage broadcasting control system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140012910A1 (en) * 2012-07-09 2014-01-09 Mobitude, LLC, a Delaware LLC Video comment feed
US10284806B2 (en) * 2017-01-04 2019-05-07 International Business Machines Corporation Barrage message processing

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101132518A (en) * 2006-08-26 2008-02-27 华为技术有限公司 Video-on-demand method and system and LAN gateway
CN105763950A (en) * 2014-12-19 2016-07-13 中兴通讯股份有限公司 Bullet screen display method and system
CN106210773A (en) * 2016-08-19 2016-12-07 暴风集团股份有限公司 The method and system of barrage are play in local video
CN106341408A (en) * 2016-09-20 2017-01-18 武汉斗鱼网络科技有限公司 Live broadcast sharing method and system in LAN of TV device
CN107690078A (en) * 2017-09-28 2018-02-13 腾讯科技(深圳)有限公司 Barrage method for information display, provide method and equipment
CN107872715A (en) * 2017-11-09 2018-04-03 北京奇艺世纪科技有限公司 A kind of method and device for showing displaying information
CN108495165A (en) * 2018-01-29 2018-09-04 上海哔哩哔哩科技有限公司 Barrage control method for playing back, mobile terminal and barrage broadcasting control system

Also Published As

Publication number Publication date
WO2020097803A1 (en) 2020-05-22
CN112771881A (en) 2021-05-07

Similar Documents

Publication Publication Date Title
CN112771881B (en) Bullet screen processing method and device, electronic equipment and computer readable storage medium
US11417341B2 (en) Method and system for processing comment information
KR101460462B1 (en) Techniques for object based operations
CN109168078B (en) Video definition switching method and device
CN106658200B (en) Live video sharing and acquiring method and device and terminal equipment thereof
EP2940940B1 (en) Methods for sending and receiving video short message, apparatus and handheld electronic device thereof
US20130173765A1 (en) Systems and methods for assigning roles between user devices
US9979997B2 (en) Synchronization of live audio and video data streams
KR101846756B1 (en) Tv program identification method, apparatus, terminal, server and system
KR101650804B1 (en) Method for sharing media content, terminal device, and content sharing system
KR20120099034A (en) Automatic media asset update over an online social network
CN104881237A (en) Internet interaction method and client
CN108900855B (en) Live content recording method and device, computer readable storage medium and server
CN108174280B (en) Audio and video online playing method and system
US11778286B2 (en) Systems and methods for summarizing missed portions of storylines
CN105230035A (en) For the process of the social media of time shift content of multimedia selected
CN110166795B (en) Video screenshot method and device
CN103929669A (en) Interactive video generator, player, generating method and playing method
CN110996160B (en) Video processing method and device, electronic equipment and computer readable storage medium
CN104918061A (en) Television channel identification method and system
CN105472471A (en) Smart television and method for displaying online video detail page of smart television
CN107333163A (en) A kind of method for processing video frequency and device, a kind of terminal and storage medium
WO2016150273A1 (en) Video playing method, mobile terminal and system
CN106162357A (en) Obtain the method and device of video content
US11303938B2 (en) Systems and methods for optimizing a set-top box to retrieve missed content

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant