WO2022252610A1 - Bullet screen comment issuing method and bullet screen comment receiving method - Google Patents

Bullet screen comment issuing method and bullet screen comment receiving method Download PDF

Info

Publication number
WO2022252610A1
WO2022252610A1 PCT/CN2021/143887 CN2021143887W WO2022252610A1 WO 2022252610 A1 WO2022252610 A1 WO 2022252610A1 CN 2021143887 W CN2021143887 W CN 2021143887W WO 2022252610 A1 WO2022252610 A1 WO 2022252610A1
Authority
WO
WIPO (PCT)
Prior art keywords
bullet
chatting
barrage
chat
query time
Prior art date
Application number
PCT/CN2021/143887
Other languages
French (fr)
Chinese (zh)
Inventor
陈昊
Original Assignee
北京达佳互联信息技术有限公司
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 北京达佳互联信息技术有限公司 filed Critical 北京达佳互联信息技术有限公司
Publication of WO2022252610A1 publication Critical patent/WO2022252610A1/en

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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/232Content retrieval operation locally within server, e.g. reading video streams from disk arrays
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/38Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/235Processing of additional data, e.g. scrambling of additional data or processing content descriptors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments

Definitions

  • the present disclosure relates to the field of computer technology, and in particular, to a bullet-screen delivery method, receiving method, device, electronic equipment, storage medium, and program product.
  • Video barrage also known as video marquee
  • video marquee is a special feature of some video sharing websites.
  • the client requests the server to pull the barrage, and the server sends the barrage to the client, resulting in a waste of network bandwidth.
  • the present disclosure provides a barrage delivery method, a receiving method, a device, an electronic device, a storage medium, and a program product.
  • a bullet chatting method including:
  • the first delivery request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs, and the query time period is based on the The playback duration of the video file is divided to obtain;
  • search in the bullet chat database to obtain the bullet chat collection corresponding to the video identification and the query time period, and the bullet chat database includes video identification, query time period And the corresponding relationship of barrage;
  • the obtaining the target bullet chat from the bullet chat collection, and returning the target bullet chat to the client includes:
  • the bullet chat collection In the case that the number of bullet chats in the bullet chat collection is greater than the preset bullet chat return upper limit, from the bullet chat collection, obtain the target bullet chat with a quantity equal to the bullet chat return upper limit, and turn the page field
  • the first result value is assigned as the first result value, and the first result value is used to inform the client that the bullet chatting set still includes bullet chatting to be delivered;
  • each barrage in the barrage to be delivered has an identification; the method further includes:
  • the second sending request is received, and the second sending request carries the query time period, the video identification And the first result value, the first result value is used to characterize the identification of the target barrage that has been returned to the client;
  • the obtaining the target bullet chat from the bullet chat collection, and returning the target bullet chat to the client includes:
  • the number of bullet chats in the bullet chatting set is not greater than the preset bullet chatting return upper limit, obtain all bullet chatting from the bullet chatting collection as the target bullet chatting, and assign a value to the page turning field is the second result value;
  • the second result value is used to inform the client that all the bullet chatting in the bullet chatting collection has been returned to the client .
  • the second result value in response to the video playback progress when the barrage collection finishes playing still belongs to the query time period, is also used to instruct the client not to send the second delivery request .
  • the method also includes:
  • a third sending request sent by the client is received, and the third sending request carries a new query time period.
  • the query time period includes a query time start time and a query time end time, and the query time end time is equal to the sum of the query time start time and a preset query duration threshold.
  • a bullet chatting receiving method including:
  • the first delivery request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs, and the query time period is based on the video file is obtained by dividing the playing time;
  • the target barrage is several barrages obtained by the server from the barrage collection
  • the barrage set is the server according to the video ID and the barrage
  • the bullet chat database includes video identifiers, query time periods, and bullet chat information Correspondence.
  • the receiving the target barrage returned by the server includes:
  • the bullet chatting set also includes bullet chatting to be delivered;
  • each bullet chat in the bullet chat to be sent has an identification
  • the first result value is also used to represent the identification of the target bullet chat that has been returned to the client; the method further includes :
  • the second delivery request is sent to the server according to the first result value, and the second delivery request carry the query time period, the video identifier and the first result value;
  • the new target barrage is that the server still searches in the barrage database according to the video identification and the query time period, and obtains the The bullet chatting set, which is screened from the bullet chatting set according to the first result value to obtain the bullet chatting to be issued, and the preset bullet chatting obtained from the bullet chatting to be issued in sequence according to the identification of each bullet chatting
  • the receiving the target barrage returned by the server includes:
  • the target barrage is the server
  • the second result value is the assignment of the server to the page turning field, and the second result value is used to represent all the bullet chatting in the bullet chatting collection The barrage has been returned to the client.
  • the method also includes:
  • the method also includes:
  • a third sending request is sent to the server, and the third sending request carries a new query time period.
  • the query time period includes a query time start time and a query time end time, and the query time end time is equal to the sum of the query time start time and a preset query duration threshold.
  • a barrage delivery device including:
  • the first receiving module is configured to receive the first sending request sent by the client, the first sending request carries the video identifier of the video file being played by the client and the query time period to which the current playing progress belongs, The query time period is obtained based on dividing the playing duration of the video file;
  • the first search module is configured to search in the bullet chatting database according to the video identification and the query time period, and obtain a bullet chatting set corresponding to the video identification and the query time period, and the bullet chatting
  • the database includes the corresponding relationship between video identification, query time period and barrage;
  • the first barrage returning module is configured to obtain target barrage from the barrage set, and return the target barrage to the client, the target barrage is a number of barrage that needs to be returned to the client Barrage.
  • the first bullet chatting return module is further configured to, when the number of bullet chatting in the bullet chatting collection is greater than the preset bullet chatting return upper , obtain the target bullet chat whose number is equal to the upper limit of the bullet chat, and assign the page turning field to the first result value, and the first result value is used to inform the client that the bullet chat collection still contains pending Sending a barrage; returning the target barrage and the first result value to the client, where the first result value is also used to instruct the client to send a second request.
  • each bullet chat in the bullet chat to be delivered has an identification; in response to the video playback progress when the target bullet chat is finished playing still belongs to the query time period, the device further includes:
  • the second receiving module is configured to receive the second delivery request, the second delivery request carries the query time period, the video identifier and the first result value, the first result value An identifier used to characterize the target barrage that has been returned to the client;
  • the second search module is configured to still search in the bullet chat database according to the video identifier and the query time period to obtain the bullet chat collection;
  • the barrage set screening module is configured to filter from the barrage set according to the first result value to obtain the barrage to be issued;
  • the second bullet chatting returning module is configured to sequentially obtain new target bullet chatting from the bullet chatting to be sent according to the identification of each bullet chatting, and return the new target bullet chatting to the client.
  • the first bullet chatting return module is further configured to return the Obtain all bullet chatting as the target bullet chatting, and assign the page turning field as the second result value; return the bullet chatting set and the second result value to the client, and the second The result value is used to inform the client that all bullet chats in the bullet chat collection have been returned to the client.
  • the second result value in response to the video playback progress when the barrage collection finishes playing still belongs to the query time period, is also used to instruct the client not to send the second delivery request .
  • the device also includes:
  • the third receiving module is configured to receive the third sending request sent by the client in response to the video playing progress when the target barrage finishes playing no longer belongs to the query time period, and the third sending request The request carries the new query period.
  • the query time period includes a query time start time and a query time end time, and the query time end time is equal to the sum of the query time start time and a preset query duration threshold.
  • a barrage receiving device including:
  • the first sending module is configured to send a first sending request to the server, the first sending request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs, and the query The time period is obtained based on dividing the playing duration of the video file;
  • the first receiving module is configured to receive the target barrage returned by the server, the target barrage is several barrages obtained by the server from the barrage collection, the barrage set is the service According to the video identification and the query time period, the terminal searches in the bullet chatting database to obtain a collection of bullet chatting corresponding to the video identification and the query time period, and the bullet chatting database includes the video identification , Query the corresponding relationship between the time period and the barrage.
  • the first receiving module is further configured to receive the target barrage and the first result value returned by the server; the number of barrage in the barrage set is greater than the preset barrage
  • the target bullet chat is that the server obtains a number of bullet chats from the bullet chat collection equal to the upper limit of the bullet chat
  • the first result value is the server end Assign a value to the page turning field, and the first result value is used to indicate that the bullet chatting set still contains bullet chatting to be delivered, and the first result value is also used to instruct the client to send a second delivery request .
  • each barrage in the barrage to be sent has an identifier
  • the first result value is also used to characterize the identifier of the target barrage that has been returned to the client; the barrage receives
  • the device also includes:
  • the second sending module is configured to send the second sending request to the server in response to the video playing progress when the target barrage finishes playing still belongs to the query time period, and the second sending request is sent to the server.
  • the request carries the query time period, the video identifier and the first result value;
  • the second receiving module is configured to receive a new target barrage returned by the server, and the new target barrage is that the server is still in the barrage according to the video identification and the query time period Search in the database to obtain the set of bullet chats, filter from the set of bullet chats according to the first result value, obtain the bullet chats to be issued, and sequentially select the bullet chats to be issued according to the identification of each bullet chat The bullet chat with the preset number of bullet chats obtained in the bullet chat.
  • the first receiving module is further configured to receive the target barrage and the second result value returned by the server; the number of barrage in the barrage set is not greater than the preset
  • the target bullet chatting is all the bullet chatting obtained by the server from the bullet chatting collection
  • the second result value is the assignment of the server to the page turning field
  • the second result value is used to indicate that all bullet chats in the bullet chat collection have been returned to the client.
  • the bullet chat receiving device further includes a third sending module, configured to respond to the video playback progress when the bullet chat collection finishes playing still belongs to the query time period, according to the second The result value does not send a second delivery request to the server.
  • the device for receiving bullet chatting further includes a fourth sending module, configured to send a message to the service in response to the video playback progress when the target bullet chatting is finished playing no longer belongs to the query time period.
  • the terminal sends a third delivery request, where the third delivery request carries a new query time period.
  • the query time period includes a query time start time and a query time end time, and the query time end time is equal to the sum of the query time start time and a preset query duration threshold.
  • an electronic device including:
  • the processor is configured to execute the instructions, so as to realize the above-mentioned bullet chatting sending method or the above-mentioned bullet chatting receiving method.
  • a non-volatile computer-readable storage medium When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute Such as the above-mentioned bullet chatting sending method or the above-mentioned bullet chatting receiving method.
  • a computer program product including a computer program.
  • the computer program When the computer program is executed by a processor, the above-mentioned method for sending a bullet chat or the above-mentioned method for receiving a bullet chat is implemented.
  • the query time period is obtained based on the division of the playing time of the video file; and searching in the barrage database according to the video ID and the query time period to obtain the corresponding Barrage collection; thus obtaining the target barrage from the barrage collection and returning the target barrage to the client, which not only reduces the number of barrages sent each time, but also reduces the memory usage of the barrage to be played on the client. Reduce the occupation of server-side network bandwidth and improve the real-time performance of barrage playback.
  • Fig. 1 is an application environment diagram of a method for delivering bullet chatting according to an exemplary embodiment.
  • Fig. 2 is a flow chart of a method for delivering bullet chatting according to an exemplary embodiment.
  • Fig. 3 is a flow chart of step S230 according to an exemplary embodiment.
  • Fig. 4 is a flow chart of a method for delivering bullet chatting according to an exemplary embodiment.
  • Fig. 5 is a flow chart of a method for delivering bullet chatting according to an exemplary embodiment.
  • Fig. 6 is a flow chart of a method for delivering bullet chatting according to an exemplary embodiment.
  • Fig. 7 is a flow chart of a method for receiving bullet chatting according to an exemplary embodiment.
  • Fig. 8 is a flow chart of a method for receiving bullet chatting according to an exemplary embodiment.
  • Fig. 9 is a sequence diagram of a method for receiving bullet chatting according to an exemplary embodiment.
  • Fig. 10 is a block diagram of a barrage delivery device according to an exemplary embodiment.
  • Fig. 11 is a block diagram of a barrage receiving device according to an exemplary embodiment.
  • Fig. 12 is a block diagram of an electronic device according to an exemplary embodiment.
  • Fig. 13 is a block diagram of a server according to an exemplary embodiment.
  • the server sends barrage in a full-time manner.
  • the client requests bullet chatting, according to the current sorting result of the bullet chatting, the first N bullet chatting pieces are delivered, and after the client displays the Nth bullet chatting pieces, the client requests the next batch of bullet chatting.
  • the user watches a 5-minute video from the beginning, and at this time, the first N bullet chats are delivered according to the ranking results of the bullet chats.
  • the client After analysis, it is found that: after the client has displayed the first N barrages, and the playback progress corresponding to the N barrage is 5 minutes, at this time, the client requests the barrage again from the server, but the client is about to complete the video Play, then, if there are bullet chats posted by other users within the first 5 minutes, the client cannot display these bullet chats, that is, users of this client cannot view bullet chats posted by other users within the previous 5 minutes . Furthermore, because the bullet chatting is delivered in a full-time manner, the N bullet chatting delivered each time may include some bullet chatting with very late playback progress.
  • some barrages delivered to the client memory are not played, causing unnecessary performance overhead on the client side. For example, if a video is played for 10 minutes, there is no barrage in the first 5 minutes, and there are 200 barrages in the next 5 minutes. Assume that the number of barrages per request is limited to 200.
  • the client requests Barrage, the client receives 200 barrage.
  • the video is played to the 3rd minute, the user interrupts the playback. At this time, only some of the 200 barrages are played, and the rest of the barrages are not played, but are sent to the client’s memory through the network, thus wasting resources such as the memory of the client and the network bandwidth of the server.
  • the bullet chatting delivery method can be applied to the application environment shown in FIG. 1 .
  • the client 110 interacts with the server 120 through the network.
  • the server 120 may be an electronic device with strong data storage and computing capabilities.
  • the server 120 may be implemented by an independent server or a server cluster composed of multiple servers.
  • Clients 110 may be, but are not limited to, various personal computers, laptops, smart phones, tablets, and portable wearable devices.
  • the client 110 installs and runs an application with a video playing function, such as at least one of a browser, a social application, a live broadcast application, a shopping application or a payment application.
  • the video file is provided with a video identification, and the video file has a playing time, such as 1 minute, 3 minutes, or 5 minutes or even longer.
  • the playback duration of the video file is divided into durations to obtain several query time segments.
  • Each query time period includes the start time of the query time and the end point of the query time.
  • the end point of the query time is equal to the sum of the start point of the query time and the preset query duration threshold. For example, if a 2-minute video file is divided, the query duration threshold can be 30 seconds, and the obtained time period can include: 0 to 30 seconds, 31 seconds to 60 seconds, 61 seconds to 90 seconds , 91 seconds to 120 seconds.
  • the preset query duration threshold may be a query duration limited according to the actual situation, for example, between 30 seconds and 60 seconds, and may be 30 seconds, 45 seconds, or 60 seconds.
  • a bullet chatting database is deployed on the server 120, and the bullet chatting database includes video identifiers, query time periods, and corresponding relations of bullet chatting.
  • a first delivery request of the barrage is sent to the server 120.
  • the first delivery request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs.
  • the server 120 receives the first delivery request, and the server 120 searches the bullet chat database according to the video ID and the query time period, obtains the bullet chat set corresponding to the video ID and the query time period, and obtains the bullet chat from the bullet chat collection Target barrage, the target barrage is several barrages that need to be returned to the client.
  • the server 120 returns the target barrage to the client 110, and the client 110 plays the target barrage.
  • Fig. 2 is a flow chart of a bullet chatting method according to an exemplary embodiment.
  • the bullet chatting method is used in the server 120 in Fig. 1 and includes the following steps: S210, receiving the client The first delivery request sent by the terminal; S220, according to the video ID and the query time period, search in the bullet chat database to obtain the bullet chat set corresponding to the video ID and the query time period; S230, obtain the target from the bullet chat collection Barrage, and return the target barrage to the client.
  • step S210 a first sending request sent by the client is received.
  • the first sending request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs, and the query time period is obtained by dividing the playing duration of the video file.
  • the video file can have barrage, and the barrage can be distributed at any playback progress of the video file.
  • the current playback progress of the video file played by the client can be understood as a playback time point, which belongs to one of several query time periods of the video file. For example, if a 1-minute video file is divided, the query duration threshold can be 20 seconds, and several query time periods can be obtained, including: 0 to 20 seconds, 21 seconds to 40 seconds, 41 seconds to 40 seconds 60 seconds.
  • the client plays a video file.
  • the client sends the first delivery request of the bullet chat to the server. screen, the first sending request not only needs to carry the video ID of the video file being played, but also needs to carry the query time period to which the current playback progress belongs.
  • step S220 according to the video identifier and the query time period, a search is performed in the bullet chat database to obtain a bullet chat set corresponding to the video identifier and the query time period.
  • the bullet chat database can be deployed on the server, and the table structure of the bullet chat database can include video identification, bullet chat location, bullet chat identification, bullet chat content, etc.
  • the bullet chatting position can be understood as the position of the bullet chatting in the video playback progress, that is, the bullet chatting posted by the user when the video is played to the video playback progress.
  • the bullet chatting database stores the content of the bullet chatting posted by the user and the corresponding The playback progress of the video (that is, the barrage position).
  • the content of the barrage can be understood as the text, pictures, emojis and other information corresponding to the barrage, such as "Does Tyson and Douglas have a second fight?" and other text content.
  • the server searches the bullet chat database according to the video identifier and the query time period, and determines the bullet chat set within the query time period in the bullet chat corresponding to the video identifier. For example, if the current playback progress belongs to the query time period of 41 seconds to 60 seconds, the searched barrage set can be the barrage set within the query time period of 41 seconds to 60 seconds, which can be understood as any user watching the video A collection of bullet chats published when the video content is 41 seconds to 60 seconds long.
  • step S230 the target bullet chat is obtained from the bullet chat collection, and the target bullet chat is returned to the client.
  • the target barrage is several barrages that need to be returned to the client, and the client is used to play the target barrage.
  • the bullet chatting set corresponding to the query time period to which the current playback progress belongs has been found from the bullet chatting database.
  • Part of the bullet chat or all the bullet chats can be obtained from the bullet chat collection as the target bullet chat, and the target bullet chat is sent to the client, and the client plays the target bullet chat.
  • the current user watching the video on the client can see the query time period target barrage.
  • the duration of each query period is agreed to be 30 seconds.
  • a barrage of 0 to 30 seconds is received from the server.
  • the above-mentioned bullet chatting delivery method is obtained by receiving the first delivery request carrying a video identifier and a query time period, and the query time period is obtained based on dividing the playing duration of the video file; and according to the video identifier and the query time period in the bullet chat database Search to obtain the corresponding barrage set; thus obtain the target barrage from the barrage set, and return the target barrage to the client, which not only reduces the number of barrages sent each time, but also reduces the impact of the barrage to be played on the client It also reduces the occupation of server-side network bandwidth and improves the real-time performance of barrage playback.
  • obtaining the target bullet chat from the bullet chat collection and returning the target bullet chat to the client can be achieved through the following steps: S310, the number of bullet chat in the bullet chat collection is greater than In the case of the preset barrage return upper limit, obtain target barrages whose number is equal to the barrage return upper limit from the barrage collection, and assign the page turning field as the first result value; S320, combine the target barrage and the first result value The resulting value is returned to the client.
  • step S310 when the number of bullet chats in the bullet chat collection is greater than the preset bullet chat return upper limit, obtain the target bullet chat with a quantity equal to the bullet chat return upper limit from the bullet chat collection, and assign a value to the page turning field is the first result value.
  • the upper limit of bullet chatting return can be the maximum number of bullet chatting sent by the server to the client each time, and the upper limit of bullet chatting return can be set in combination with the performance parameters of the client and the performance parameters of the server.
  • the server can send up to 200 bullet chatting to the client each time.
  • the bullet chatting set corresponding to the query time period to which the current playing progress belongs is searched from the bullet chatting database. Compare the set barrage return upper limit.
  • the number of bullet chatter in the bullet chat collection can be greater than the preset bullet chat return limit, the bullet chat number in the bullet chat collection can be equal to the preset bullet chat return upper limit, and the bullet chat number in the bullet chat collection can be less than the preset bullet chat screen returns to the upper limit.
  • the page turning field is used to indicate whether there are remaining bullet chatting in the bullet chatting set besides the target bullet chatting returned to the client (these remaining bullet chatting are regarded as bullet chatting to be delivered).
  • the page turning field can be understood as a field provided by the server to the client interface and returned. Assign values to the page turning field according to the comparison result between the number of bullet chatter in the bullet chat collection and the preset bullet chat return upper limit.
  • the page turning field is assigned the first result value.
  • the first result value is used to represent that in the bullet chatting set, there are bullet chatting to be delivered besides the target bullet chatting returned to the client.
  • the target bullet chat can be obtained from the bullet chat collection corresponding to the query time period to which the current playback progress belongs according to the order of the bullet chat IDs.
  • the number of target barrage is equal to the upper limit of barrage return.
  • step S320 the target barrage and the first result value are returned to the client.
  • the first result value is also used to instruct the client to send the second sending request.
  • the server searches the bullet chatting database to obtain the bullet chatting collection, and obtains the target bullet chatting from the bullet chatting collection.
  • the server assigns the page turning field to the first result value.
  • the server returns the target bullet chatting and the first result value to the client, and the client receives and plays the target bullet chatting.
  • the first result value tells the client to remove the returned bullet chat from the bullet chatting collection.
  • there are still barrages to be delivered so the client can send a second delivery request to the server to pull the barrage to be delivered.
  • the page turning field by setting the page turning field and assigning a value to the page turning field according to the comparison result of the number of bullet chatting in the bullet chatting collection and the preset bullet chatting return upper limit, it is ensured that the client can pull to the server again Barrage, to realize page-by-page playback of barrage, play barrage as much as possible, and strengthen interaction with users. And by setting the upper limit of barrage return, reduce the impact on client performance.
  • each bullet chat in the bullet chat to be delivered has an identification.
  • the bullet chat delivery method in response to the video playback progress when the target bullet chatting is finished playing still belongs to the query time period, the bullet chat delivery method also includes: S410, receiving the second delivery request; S420, still according to the video identification and the query time period Search in the barrage database to obtain the barrage set; S430, filter from the barrage set according to the first result value to obtain the barrage to be sent; S440, sequentially select the barrage from the barrage to be issued according to the identification of each barrage Obtain a new target barrage, and return the new target barrage to the client.
  • step S410 a second delivery request is received.
  • step S420 the bullet chatting database is still searched according to the video ID and the query time period to obtain the bullet chatting set.
  • the second sending request carries a query time period, a video identifier and a first result value
  • the first result value is used to represent the identifier of the target barrage that has been returned to the client.
  • the page turning field is assigned the first result value.
  • the client receives and plays the target bullet chat.
  • the client can send the second bullet chat to the server because the first result value informs the client that there are bullet chats to be sent in addition to the target bullet chat returned to the client in the bullet chat collection.
  • the server receives the second sending request.
  • the second sending request carries the first result value, the query time period and the video ID.
  • the server still searches the bullet chat database according to the video ID and query time period, and obtains the bullet chat collection corresponding to the video ID and query time period.
  • step S430 screen the bullet chatting set according to the first result value to obtain the bullet chatting to be sent.
  • the remaining bullet chatting refers to other bullet chatting in the bullet chatting collection except the target bullet chatting returned to the client.
  • the first result value can inform the server which bullet chatting is the target bullet chatting returned to the client. Therefore, according to the first result value, it is screened from the bullet chatting collection, and the target bullet chatting that has been returned to the client is processed. Filter to get the bullet chatting collection recomposed from the remaining bullet chatting.
  • step S440 new target bullet chats are sequentially obtained from the bullet chats to be sent according to the identifiers of each bullet chat, and the new target bullet chats are returned to the client.
  • the number of bullet chats to be delivered can be greater than or less than the upper limit of bullet chat returns.
  • the bullet chatting in the bullet chat database can be stored in a preset order (such as the time when the bullet chatting is sent), and similarly, the bullet chatting in the bullet chatting to be sent can be stored in a preset order of.
  • Each barrage in the barrage to be delivered has an identifier, and a new target barrage is obtained from the barrage to be delivered according to the identifier of each barrage.
  • the server obtains a number of bullet chats equal to the upper limit of bullet chats to be sent as the new target bullet chat.
  • the server When the number of bullet chats to be sent is less than the upper limit of bullet chats returned, the server will use the bullet chats to be sent as the new target bullet chat.
  • the server returns the new target barrage to the client, and the client receives the new target barrage, and further, the client can also play the new target barrage.
  • the searched barrage collection is sent to the client in multiple pages, and on the premise of reducing the performance overhead of the client, it is also ensured that the client can play more barrage, and strengthen the relationship with the user. interactivity between them.
  • obtaining the target bullet chat from the bullet chat collection, and returning the target bullet chat to the client includes the following steps:
  • step S510 when the number of bullet chats in the bullet chat collection is not greater than the preset bullet chat return upper limit, obtain all bullet chat from the bullet chat collection as the target bullet chat, and assign the page turning field to the second result value.
  • step S520 the barrage set and the second result value are returned to the client.
  • the second result value is used to inform the client that all bullet chats in the bullet chat collection have been returned to the client.
  • the server compares the number of bullet chats in the bullet chat collection with the preset bullet chat return upper limit, and if the bullet chat number in the bullet chat collection is not greater than the bullet chat return upper limit, it means that the bullet chat can be returned Each bullet chat in the set is sent to the client, and all bullet chats are obtained from the bullet chat collection as the target bullet chat.
  • the page turning field is assigned the second result value, and the bullet chatting collection and the second result value are returned to the client .
  • Use the second result value to inform the client not to send the second delivery request to the server, so as to avoid the client sending a delivery request to the server when the server has already delivered all bullet chats within the query time period , thereby further reducing the bandwidth resource occupation of the server.
  • the second result value is further used to instruct the client not to send the second sending request in response to the video playing progress when the bullet chatting set finishes playing and still belongs to the query time period.
  • the server returns the bullet chat collection and the second result value to the client, and the client receives the bullet chat collection and plays the bullet chat collection.
  • the client receives the bullet chat collection and plays the bullet chat collection.
  • the client receives the bullet chat collection and plays the bullet chat collection.
  • the second result value may be a preset value, such as 0.
  • the second result value indicates that the client does not send the second delivery request, which not only reduces the bandwidth resource occupation of the server, but also And further reduce the performance overhead of the client to ensure the smooth operation of the client.
  • the bullet chat delivery method further includes: in response to the video playback progress when the target bullet chat is finished playing no longer belongs to the query time period, receiving a third delivery request sent by the client, the third delivery request carrying a new query time period.
  • the client receives the target bullet chat and plays it.
  • the target bullet chat judges whether the video playback progress when the target bullet chat is finished playing belongs to the query time period used in the previous query. It does not belong to the query time period used in the last query, indicating that the video playback progress belongs to the new query time period, and the client can pull the barrage corresponding to the new query time period from the server.
  • the client in response to the video playback progress when the target barrage finishes playing no longer belongs to the query time period, the client sends a third sending request to the server, and the server receives the third sending request, and the third The sending request carries the new query time period and video identifier to which the video playback progress belongs.
  • the server can search the bullet chat database according to the new query time period and video ID to obtain a new bullet chat collection.
  • the bullet chatting position of the new bullet chat collection is within the new query time period.
  • the target bullet chat in the new query time period can be obtained from the new bullet chat collection, and the client receives and plays the target bullet chat in the new query time period.
  • the third delivery request sent by the client is received to ensure that when the user watches the subsequent playback progress, real-time Pull the barrage posted by other users to improve the fit between the barrage playback status and video playback progress and the real-time performance of the barrage.
  • the unplayed bullet chatting in response to the video playback progress when the target bullet chatting is finished playing no longer belongs to the query time period, if there are still unplayed bullet chatters in the bullet chatting set corresponding to the query time period, the unplayed bullet chatting will not be issued.
  • the barrage is sent to the client, so that it can ensure that the barrage played corresponds to the progress of the video playback.
  • the query time period includes the start time of the query time and the end time of the query time, and the end time of the query time is equal to the sum of the start time of the query time and a preset query duration threshold.
  • the video file has a playback duration
  • the playback duration of the video file is divided to obtain several query time periods
  • the query time period corresponds to the playback progress of the video file.
  • the query duration threshold can be set according to the actual situation.
  • the query time period includes the start time of the query time and the end point of the query time
  • the start point of the query time may correspond to the playback progress at the first time point in the video file as the starting point of the query time period.
  • the end point of the query time may correspond to the playback progress at the second time point in the video file.
  • the first time point is earlier than the second time point.
  • the end point of the query time is equal to the sum of the start point of the query time and the preset query duration threshold.
  • several query time periods are obtained by dividing the playback duration of the video file, and the end point of the query time is equal to the sum of the start point of the query time and the preset query duration threshold, and the query time period and video playback progress are established.
  • the corresponding relationship to achieve accurate control of the bullet chatting from the server, and to ensure the real-time performance of the bullet chatting.
  • the number of bullet chatting in the query time period is small, which can reduce the memory occupation of the client terminal by bullet chatting.
  • Fig. 6 is a flow chart of a bullet chatting method according to an exemplary embodiment.
  • the bullet chatting method is used in the server 120 in Fig. 1, and includes the following steps: S602, receiving the client The first delivery request sent by the terminal; S604, according to the video identifier and the query time period, search in the bullet chat database to obtain the bullet chat set corresponding to the video identifier and the query time period; S606, compare the bullet chat in the bullet chat collection The number of bullet chatting and the preset return upper limit of bullet chatting; S608, when the number of bullet chatting in the bullet chat collection is greater than the upper limit of bullet chatting return, assign the page turning field to the first result value; S610, from the bullet chat collection , obtain the target barrage whose number is equal to the upper limit of the barrage return; S612, return the target barrage and the first result value to the client; S614, respond to the video playback progress when the target barrage is finished playing still belongs to the query time period, receive The second delivery request
  • step S602 a first delivery request sent by the client is received.
  • the first sending request carries the video identification of the video file being played by the client and the query time period to which the current playback progress belongs.
  • the query period is obtained based on dividing the playing duration of the video file.
  • the query time period includes the starting point of the query time and the end point of the query time, and the end point of the query time is equal to the sum of the starting point of the query time and the preset query duration threshold.
  • step S604 according to the video identifier and the query time period, the bullet chatting database is searched to obtain the bullet chatting set corresponding to the video identifier and the query time period.
  • step S606 the number of bullet chats in the bullet chat collection is compared with the preset bullet chat return upper limit.
  • step S608 if the number of bullet chatting in the bullet chatting set is greater than the upper limit of bullet chatting return, the page turning field is assigned the first result value.
  • the first result value is used to inform the client that the bullet chatting set still contains bullet chatting to be delivered.
  • step S610 from the bullet chat collection, the target bullet chat whose quantity is equal to the bullet chat return upper limit is obtained.
  • step S612 the target barrage and the first result value are returned to the client.
  • the client is used to send the second sending request when the target barrage is finished playing, and the second sending request carries the first result value.
  • step S614 in response to the fact that the video playback progress when the target barrage finishes playing still belongs to the query time period, the second delivery request sent by the client is received.
  • the second sending request carries a query time period, a video identifier and a first result value
  • the first result value is used to represent the identifier of the target barrage that has been returned to the client.
  • step S616 the bullet chatting database is still searched according to the video ID and the query time period to obtain the bullet chatting set.
  • step S618 screen the bullet chatting set according to the first result value to obtain the bullet chatting to be sent.
  • step S620 new target bullet chats are sequentially obtained from the bullet chats to be sent according to the identifiers of the bullet chats, and the new target bullet chats are returned to the client.
  • the client is also used to play new target barrage.
  • step S622 when the number of bullet chats in the bullet chat collection is not greater than the preset bullet chat return upper limit, obtain all bullet chat from the bullet chat collection as the target bullet chat, and assign the page turning field to the second result value.
  • the second result value is used to inform the client that all bullet chats in the bullet chat collection have been returned to the client.
  • step S624 the barrage set and the second result value are returned to the client.
  • the client in response to the video playback progress when the target bullet chatting is finished playing still belongs to the query time period, the client does not send the second sending request according to the second result value when the bullet chatting collection finishes playing.
  • step S626 in response to the video playing progress when the target barrage finishes playing no longer belongs to the query time period, a third delivery request sent by the client is received.
  • the video playback progress when the client finishes playing the target barrage belongs to the new query time period
  • the third request carries the new query time period and video ID.
  • several query time periods are obtained by dividing the playback duration of the video file, and the target bullet chat corresponding to the video ID and the query time period is obtained from the bullet chat collection, and the target bullet chat is returned to the client , Realize page-by-page delivery of bullet chatting in the bullet chat collection on the server side, reduce the number of bullet chatting sent each time, reduce the network bandwidth occupation of the server side, and realize page-by-page playback of bullet chatting on the client side, as many as possible Play bullet chatting in a timely manner, reduce the memory usage of the bullet chatting to be played on the client, and improve the real-time performance of bullet chatting.
  • Fig. 7 is a flow chart of a bullet chatting receiving method according to an exemplary embodiment. As shown in Fig. 7, the bullet chatting receiving method is used in the client 110 in Fig. 1 and includes the following steps:
  • step S710 a first delivery request is sent to the server.
  • step S720 the target barrage returned by the server is received.
  • the first sending request carries the video ID of the video file being played by the client and the query time period to which the current playback progress belongs.
  • the query time period is obtained by dividing the playing time of the video file.
  • the bullet chat collection is a collection of bullet chats corresponding to the video ID and the query time period obtained by searching the bullet chat database on the server side according to the video ID and the query time period.
  • the barrage database includes the corresponding relationship between video identification, query time period and barrage.
  • the client plays a video file, and if the video file has a bullet chat, the client sends a first delivery request of the bullet chat to the server.
  • the server searches the bullet chat database according to the video identifier and the query time period, and determines the bullet chat set within the query time period in the bullet chat corresponding to the video identifier.
  • the server obtains part or all of the bullet chats from the bullet chat collection as the target bullet chat.
  • the server returns the query result to the client, and the client receives the query result, which includes the target barrage in the query time period.
  • the client can play the target barrage, and the current user watching the video on the client side can see the target barrage in the query time period in real time.
  • the client can play the target barrage by sending the first delivery request to the server and receiving the target barrage returned by the server. It can not only reduce the memory usage of the bullet chat to be played on the client side, but also save the bandwidth resources occupied by the server when sending the bullet chat, and improve the real-time performance of the bullet chat.
  • receiving the target barrage returned by the server includes: receiving the target barrage and the first result value returned by the server.
  • the target bullet chat is a number of bullet chats that the server obtains from the bullet chat collection equal to the bullet chat return upper limit
  • the first result is The value is the assignment of the page turning field by the server, and the first result value is used to indicate that the bullet chatting set still contains bullet chatting to be delivered, and the first result value is also used to instruct the client to send the second delivery request.
  • the bullet chatting set has a certain number, and the number of bullet chatting in the bullet chatting set is compared with the preset bullet chatting return upper limit.
  • the number of bullet chatter in the bullet chat collection can be greater than the preset bullet chat return limit, the bullet chat number in the bullet chat collection can be equal to the preset bullet chat return upper limit, and the bullet chat number in the bullet chat collection can be less than the preset bullet chat screen returns to the upper limit.
  • the page turning field can be understood as a field provided by the server and returned by the client interface. If the number of bullet chatting in the bullet chatting collection is greater than the upper limit of bullet chatting returned, the server assigns the page turning field as the first result value.
  • the server returns the target bullet chat and the first result value to the client, and the client can receive and play the target bullet chat, because the first result value informs the client that in the bullet chat collection, there are also There are other bullet chats to be delivered, so the client can send a second delivery request to the server according to the first result value to pull the bullet chats to be delivered.
  • the value of the page turning field indicates whether the client Send the request to the server again to pull the barrage, realize the page-turning playback of the barrage in the barrage collection, play as many barrages as possible, and strengthen the interaction with users. And by setting the upper limit of barrage return, reduce the impact of barrage on client performance.
  • each bullet chat in the bullet chat to be sent has an identifier
  • the first result value is also used to represent the identifier of the target bullet chat that has been returned to the client.
  • the bullet chat delivery method further includes: in response to the video playback progress when the target bullet chat is finished playing still belongs to the query time period, sending a second delivery request to the server, and receiving a new target bullet chat returned by the server.
  • the second delivery request carries the query time period, video ID and the first result value.
  • the new target bullet chat is that the server still searches the bullet chat database according to the video ID and query time period to obtain the bullet chat collection.
  • the bullet chatting set is screened to obtain the bullet chatting to be delivered, and a preset number of bullet chatting is obtained from the bullet chatting to be delivered sequentially according to the identification of each bullet chatting.
  • the page turning field is assigned the first result value.
  • the server returns the target barrage and the first result value to the client, and the client receives and plays the target barrage.
  • the client can judge whether the video playback progress when the target bullet chat is finished playing belongs to the query time period when the target bullet chat is finished playing, and respond to the video playback progress when the client finishes playing the target bullet chat still belongs to the query time period , the client sends a second delivery request to the server.
  • the second sending request carries the first result value, the query time period and the video identifier.
  • the server still searches the bullet chat database according to the video identifier and the query time period, and determines the bullet chat set within the query time period in the bullet chat corresponding to the video identifier.
  • the first result value is used to represent the identity of the target bullet chat that has been returned to the client, that is, the first result value can tell the server which bullet chat is the target bullet chat returned to the client. Therefore, the server uses the first result value to Filter from the bullet chatting collection, filter the target bullet chatting that has been returned to the client, and get the bullet chatting to be sent recomposed from other bullet chatting.
  • Bullet chats to be delivered can be understood as other bullet chats in the bullet chat collection except the target bullet chat returned to the client.
  • the server obtains target bullet chats whose number is equal to the upper limit of bullet chats to be sent.
  • the server will use the bullet chats to be sent as the new target bullet chat. Then, the server returns the new target barrage to the client, and the client receives and plays the new target barrage.
  • receiving the target barrage returned by the server includes: receiving the target barrage and the second result value returned by the server.
  • the target bullet chat is all the bullet chats obtained by the server from the bullet chat collection
  • the second result value is the server-side flip The assignment of the page field, and the second result value is used to indicate that all the bullet chatting in the bullet chatting collection have been returned to the client.
  • the server compares the number of bullet chats in the bullet chat collection with the preset bullet chat return upper limit, and if the bullet chat number in the bullet chat collection is not greater than the bullet chat return upper limit, it means that the bullet chat can be returned
  • Each bullet chat in the set is sent to the client, and all bullet chats are obtained from the bullet chat collection as the target bullet chat.
  • the server when the number of bullet chatting in the bullet chatting collection is not greater than the bullet chatting return upper limit, the server assigns the page turning field to the second result value, and returns the second result value to the client. Use the second result value to inform the client not to send the second delivery request to the server, so as to avoid the client sending a delivery request to the server when the server has already delivered all bullet chats within the query time period , thereby further reducing the bandwidth resource occupation of the server.
  • no second delivery request is sent to the server according to the second result value.
  • the second result value is used to indicate that there is no bullet chatting to be delivered in the bullet chatting set except the target bullet chatting returned to the client, and the bullet chatting set is the target bullet chatting.
  • the number of bullet chats in the bullet chat collection is not greater than the upper limit of bullet chat return, it means that each bullet chat in the bullet chat collection can be sent to the client.
  • set the page turning field as the second result value.
  • the server uses the bullet chat collection as the target bullet chat, the server returns the bullet chat collection and the second result value to the client, and the client receives the bullet chat collection and the second result value.
  • the client judges whether the video playback progress when the bullet chat collection finishes playing belongs to the query time period. If the video playback progress belongs to the query time period, since the second result value indicates that there is no bullet chat to be sent within the query time, then After finishing playing the barrage set, the client no longer sends the second sending request to the server according to the second result value.
  • the client when the number of bullet chatting in the bullet chat collection is not greater than the bullet chat return upper limit, the client receives the bullet chat collection returned by the server, and responds that the video playback progress remains the same when the bullet chat collection completes playing. In the query period, the client will no longer send a second delivery request to the server, further reducing the bandwidth resource occupation of the server, reducing the performance overhead of the client, and ensuring the smooth operation of the client.
  • the bullet chat delivery method further includes: in response to the video playback progress when the target bullet chat is finished playing no longer belongs to the query time period, sending a third delivery request to the server, the third delivery request carrying a new Query time period.
  • the client receives and plays the target bullet chat, and when the target bullet chat is finished playing, it is judged whether the video playback progress when the target bullet chat is finished playing belongs to the query time period used in the last query, If the video playback progress does not belong to the query time period used in the previous query, it indicates that the video playback progress belongs to the new query time period, and the client can pull the barrage corresponding to the new query time period from the server.
  • the client sends a third delivery request to the server, and the server receives the third delivery request, where the third delivery request carries a new query time period and a video identifier to which the video playback progress belongs.
  • the server can search the bullet chat database according to the new query time period and video ID to obtain a new bullet chat collection. The bullet chatting position of the new bullet chat collection is within the new query time period.
  • the third delivery request in response to the video playback progress when the target barrage finishes playing no longer belongs to the query time period, is sent to the server to ensure that when the user watches the subsequent playback progress, Real-time pull to the barrage posted by other users.
  • the query time period includes the start time of the query time and the end time of the query time, and the end time of the query time is equal to the sum of the start time of the query time and a preset query duration threshold.
  • the video file has a playback duration
  • the playback duration of the video file is divided to obtain several query time periods
  • the query time period corresponds to the playback progress of the video file.
  • the query duration threshold can be set according to the actual situation.
  • the query time period includes the start time of the query time and the end point of the query time
  • the start point of the query time may correspond to the playback progress at the first time point in the video file as the starting point of the query time period.
  • the end point of the query time may correspond to the playback progress at the second time point in the video file.
  • the first time point is earlier than the second time point.
  • the end point of the query time is equal to the sum of the start point of the query time and the preset query duration threshold.
  • several query time periods are obtained by dividing the playback duration of the video file, and the end point of the query time is equal to the sum of the start point of the query time and the preset query duration threshold, and the query time period and video playback progress are established.
  • the corresponding relationship to achieve accurate control of the bullet chatting from the server, and to ensure the real-time performance of the bullet chatting.
  • the number of bullet chatting in the query time period is small, which can reduce the memory occupation of the client terminal by bullet chatting.
  • Fig. 8 is a flowchart of a bullet chatting receiving method according to an exemplary embodiment.
  • the bullet chatting receiving method is used in the client 110 in Fig. 1, and includes the following steps: S802, sending the first Send a request to the server at once; S804, receive the target barrage and the first result value returned by the server; S806, respond to the video playback progress when the target barrage is finished playing still belongs to the query time period, according to the first result Send a second delivery request to the server; S808, receive the new target barrage returned by the server; S810, receive the target barrage and the second result value returned by the server.
  • step S802 a first delivery request is sent to the server.
  • the first sending request carries the video ID of the video file being played by the client and the query time period to which the current playback progress belongs.
  • the query time period is obtained by dividing the playing time of the video file.
  • the video ID and the query time period are a collection of bullet chats corresponding to the video ID and the query time period obtained by searching in the bullet chat database.
  • the bullet chat database includes the corresponding relationship between the video ID, the query time period, and the bullet chat.
  • step S804 the target barrage and the first result value returned by the server are received.
  • the target bullet chat is a number of bullet chat messages that the server obtains from the bullet chat collection with a number equal to the bullet chat return upper limit.
  • the first result value is the assignment of the server to the page-turning field, and the first result value is used to indicate that the bullet chatting set still contains bullet chatting to be delivered; each bullet chatting in the bullet chatting to be delivered has an identifier, and the first The result value is also used to represent the identity of the target barrage that has been returned to the client.
  • step S806 in response to the video playing progress when the target barrage finishes playing still belongs to the query time period, a second sending request is sent to the server according to the first result value.
  • the second delivery request carries a query time period, a video ID, and a first result value.
  • step S808 a new target barrage returned by the server is received.
  • the new target barrage is that the server still searches in the barrage database according to the video identifier and the query time period to obtain the barrage set, and according to the first result value Screening from the set of bullet chats to obtain the bullet chats to be delivered, and sequentially acquiring a preset number of bullet chatters from the bullet chatters to be delivered according to the identifiers of the bullet chatters to be delivered.
  • step S810 the target barrage and the second result value returned by the server are received.
  • the target bullet chat is all the bullet chats obtained by the server from the bullet chat collection
  • the second result value is the server-side flip The assignment of the page field, and the second result value is used to indicate that all the bullet chatting in the bullet chatting collection have been returned to the client.
  • step S812 in response to the fact that the video playback progress when the barrage set is finished playing still belongs to the query time period, no second delivery request is sent to the server according to the second result value.
  • step S814 in response to the video playing progress when the target barrage finishes playing no longer belongs to the query time period, a third sending request is sent to the server, and the third sending request carries a new query time period.
  • several query time periods are obtained by dividing the playback duration of the video file, and the target bullet chat corresponding to the video ID and the query time period is obtained from the bullet chat collection, and the target bullet chat is returned to the client , Realize page-by-page delivery of bullet chatting in the bullet chat collection on the server side, reduce the number of bullet chatting sent each time, reduce the network bandwidth occupation of the server side, and realize page-by-page playback of bullet chatting on the client side, as many as possible Play bullet chatting in a timely manner, reduce the memory usage of the bullet chatting to be played on the client, and improve the real-time performance of bullet chatting.
  • FIG. 9 is a sequence diagram of a bullet chatting receiving method according to an exemplary embodiment. As shown in FIG. 9 , it includes the following steps: in S902, the client sends the first delivery request to the server; in S904, the server Search in the barrage database according to the video ID and the query time period, and obtain the barrage set corresponding to the video ID and the query time period; S906, the server obtains the target barrage from the barrage set; S908, the server returns to the client Query result; S910, the client plays the target barrage; S912, judges whether the video playback progress belongs to the query time period when the target barrage has been played; When the playback is finished, send a second delivery request to the server; S916, the server still searches the bullet chat database according to the video identifier and the query time period to obtain the bullet chat collection; S918, the server retrieves the bullet chat from the bullet chat according to the first result value Screening in the set to obtain the barrage to be delivered; S920, the server acquires a new target bar
  • step S902 the client sends a first delivery request to the server.
  • the first sending request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs, and the query time period is obtained by dividing the playing duration of the video file.
  • step S904 the server searches the bullet chat database according to the video identifier and the query time period, and obtains a bullet chat set corresponding to the video identifier and the query time period.
  • step S906 the server obtains the target bullet chat from the bullet chat collection.
  • the number of bullet chats in the bullet chat collection is compared with a preset bullet chat return upper limit. In the case that the number of bullet chatting in the bullet chat collection is greater than the upper limit of the bullet chatting returned, the page turning field is assigned the first result value. From the bullet chat collection, get the target bullet chat whose number is equal to the upper limit of the bullet chat.
  • step S908 the server returns the query result to the client.
  • the query result includes the target barrage and the first result value.
  • step S910 the client plays the target barrage.
  • step S912 it is judged whether the video playback progress when the target barrage finishes playing belongs to the query time period
  • step S914 in response to the fact that the video playback progress still belongs to the query time period, a second delivery request is sent to the server when the target barrage is finished playing.
  • the second sending request also carries a query time period and a video identifier.
  • step S916 the server still searches the bullet chat database according to the video ID and the query time period to obtain the bullet chat collection.
  • step S918 the server screens the bullet chatting set according to the first result value to obtain the bullet chatting to be delivered.
  • the barrage to be delivered refers to other barrages in the barrage collection except the target barrage returned to the client.
  • step S920 the server acquires a new target bullet chat from the bullet chat to be delivered.
  • new target bullet chats are sequentially obtained from the bullet chats to be sent according to the identifiers of each bullet chat, and the new target bullet chats are returned to the client.
  • the target bullet chats whose number is equal to the upper limit of the bullet chats to be sent are obtained from the bullet chats to be sent and used as the new target bullet chats.
  • the bullet chat to be sent will be used as the new target bullet chat.
  • step S922 the server returns the new target barrage to the client.
  • step S924 the client plays a new target barrage.
  • several query time periods are obtained by dividing the playback duration of the video file, and the target bullet chat corresponding to the video ID and the query time period is obtained from the bullet chat collection, and the target bullet chat is returned to the client , Realize page-by-page delivery of bullet chatting in the bullet chat collection on the server side, reduce the number of bullet chatting sent each time, reduce the network bandwidth occupation of the server side, and realize page-by-page playback of bullet chatting on the client side, as many as possible Play bullet chatting in a timely manner, reduce the memory usage of the bullet chatting to be played on the client, and improve the real-time performance of bullet chatting.
  • Fig. 10 is a block diagram of a barrage delivery device according to an exemplary embodiment.
  • the query device 1000 includes a first receiving module 1002 , a first searching module 1004 and a first barrage returning module 1006 .
  • the first receiving module 1002 is configured to receive the first sending request sent by the client, the first sending request carries the video identifier of the video file being played by the client and the query time period to which the current playing progress belongs , the query time period is obtained based on dividing the playback duration of the video file;
  • the first search module 1004 is configured to search in the bullet chat database according to the video identifier and the query time period, and obtain a bullet chat set corresponding to the video identifier and the query time period, and the bullet chat
  • the screen database includes the corresponding relationship between video identification, query time period and barrage;
  • the first barrage returning module 1006 is configured to obtain a target barrage from the barrage set, and return the target barrage to the client, and the target barrage is the one that needs to be returned to the client Several barrages.
  • the first bullet chatting return module is further configured to, when the number of bullet chatting in the bullet chatting collection is greater than the preset bullet chatting return upper limit, from the bullet chatting collection, Acquiring the target bullet chat whose number is equal to the upper limit of the bullet chatter, and assigning the page turning field as the first result value, the first result value is used to inform the client that the bullet chat collection still contains the Sending a barrage; returning the target barrage and the first result value to the client, where the first result value is also used to instruct the client to send a second sending request.
  • each bullet chat in the bullet chat to be sent has an identification; in response to the video playback progress when the target bullet chat is finished playing still belongs to the query time period, the device further includes:
  • the second receiving module is configured to receive the second delivery request, the second delivery request carries the query time period, the video identifier and the first result value, the first result value An identifier used to characterize the target barrage that has been returned to the client;
  • the second search module is configured to still search in the bullet chat database according to the video identifier and the query time period to obtain the bullet chat collection;
  • the barrage set screening module is configured to filter from the barrage set according to the first result value to obtain the barrage to be issued;
  • the second bullet chatting returning module is configured to sequentially obtain new target bullet chatting from the bullet chatting to be sent according to the identification of each bullet chatting, and return the new target bullet chatting to the client.
  • the first bullet chatting return module is further configured to, when the number of bullet chatting in the bullet chatting collection is not greater than the preset bullet chatting return upper limit, select Obtain all bullet chatting as the target bullet chatting, and assign the page turning field as a second result value; return the bullet chatting set and the second result value to the client, and the second result The value is used to inform the client that all bullet chats in the bullet chat collection have been returned to the client.
  • the second result value in response to the video playback progress when the bullet chatting set finishes playing still belongs to the query time period, is further used to instruct the client not to send the second sending request.
  • the device also includes:
  • the third receiving module is configured to receive the third sending request sent by the client in response to the video playing progress when the target barrage finishes playing no longer belongs to the query time period, and the third sending request The request carries the new query period.
  • the query time period includes a start point of a query time and an end point of a query time, and the end point of a query time is equal to a sum of the start point of a query time and a preset query duration threshold.
  • Fig. 11 is a block diagram of a barrage receiving device according to an exemplary embodiment.
  • the receiving device 1100 includes a first sending module 1102 and a first receiving module 1104 .
  • the first sending module 1102 is configured to send a first sending request to the server, the first sending request carries the video identifier of the video file being played by the client and the query time period to which the current playing progress belongs, the The query time period is obtained based on dividing the playing duration of the video file;
  • the first receiving module 1104 is configured to receive the target barrage returned by the server, the target barrage is several barrages acquired by the server from the barrage set, the barrage set is the According to the video ID and the query time period, the server searches the barrage database to obtain a collection of barrage corresponding to the video ID and the query time period.
  • the barrage database includes video The corresponding relationship between identification, query time period and barrage.
  • the first receiving module is further configured to receive the target barrage and the first result value returned by the server; the number of barrage in the barrage set is greater than the preset barrage In the case of returning the upper limit, the target barrage is a number of barrages obtained by the server from the barrage collection equal to the barrage return upper limit, and the first result value is the server pair The assignment of the page turning field, and the first result value is used to indicate that the bullet chatting set still includes bullet chatting to be delivered, and the first result value is also used to instruct the client to send a second delivery request.
  • each bullet chat in the bullet chat to be sent has an identification, and the first result value is also used to characterize the identification of the target bullet chat that has been returned to the client;
  • the bullet chat receiving device Also includes:
  • the second sending module is configured to send the second sending request to the server in response to the video playing progress when the target barrage finishes playing still belongs to the query time period, and the second sending request is sent to the server.
  • the request carries the query time period, the video identifier and the first result value;
  • the second receiving module is configured to receive a new target barrage returned by the server, and the new target barrage is that the server is still in the barrage according to the video identification and the query time period Search in the database to obtain the set of bullet chats, filter from the set of bullet chats according to the first result value, obtain the bullet chats to be issued, and sequentially select the bullet chats to be issued according to the identification of each bullet chat The bullet chat with the preset number of bullet chats obtained in the bullet chat.
  • the first receiving module is further configured to receive the target barrage and the second result value returned by the server; the number of barrage in the barrage set is not greater than the preset barrage
  • the target bullet chat is all bullet chats obtained by the server from the bullet chat collection
  • the second result value is the assignment of the page turning field by the server
  • the The second result value is used to represent that all bullet chats in the bullet chat collection have been returned to the client.
  • the bullet chat receiving device further includes a third sending module, configured to respond to the video playback progress when the bullet chat collection completes playing still belongs to the query time period, according to the second result The value does not send a second delivery request to the server.
  • the bullet chat receiving device further includes a fourth sending module, configured to send a message to the server in response to the video playback progress when the target bullet chat is finished playing no longer belongs to the query time period Sending a third delivery request, where the third delivery request carries a new query time period.
  • the query time period includes a start point of a query time and an end point of a query time, and the end point of a query time is equal to a sum of the start point of a query time and a preset query duration threshold.
  • Fig. 12 is a block diagram of a device 1200 for receiving bullet chatting according to an exemplary embodiment.
  • the device 1200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
  • device 1200 may include one or more of the following components: processing component 1202, memory 1204, power supply component 1206, multimedia component 1208, audio component 1210, input/output (I/O) interface 1212, sensor component 1214 and Communication component 1216.
  • the processing component 1202 generally controls the overall operations of the device 1200, such as those associated with display, telephone calls, data communications, camera operations, and recording operations.
  • the processing component 1202 may include one or more processors 1220 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 1202 may include one or more modules that facilitate interaction between processing component 1202 and other components. For example, processing component 1202 may include a multimedia module to facilitate interaction between multimedia component 1208 and processing component 1202 .
  • the memory 1204 is configured to store various types of data to support operations at the device 1200 . Examples of such data include instructions for any application or method operating on device 1200, contact data, phonebook data, messages, pictures, videos, and the like.
  • the memory 1204 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read-only memory
  • EPROM erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Magnetic or Optical Disk Magnetic Disk
  • the power supply component 1206 provides power to various components of the device 1200 .
  • Power components 1206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for device 1200 .
  • the multimedia component 1208 includes a screen that provides an output interface between the device 1200 and the user.
  • the screen may include a liquid crystal display (LCD) and a touch panel (TP).
  • the screen may be implemented as a touch screen to receive an input signal from a user.
  • the touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action.
  • the multimedia component 1208 includes a front camera and/or a rear camera. When the device 1200 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data.
  • Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.
  • the audio component 1210 is configured to output and/or input audio signals.
  • the audio component 1210 includes a microphone (MIC), which is configured to receive an external audio signal when the device 1200 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. Received audio signals may be further stored in memory 1204 or sent via communication component 1216 .
  • the audio component 1210 also includes a speaker for outputting audio signals.
  • the I/O interface 1212 provides an interface between the processing component 1202 and a peripheral interface module, which may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.
  • Sensor assembly 1214 includes one or more sensors for providing status assessments of various aspects of device 1200 .
  • the sensor component 1214 can detect the open/closed state of the device 1200, the relative positioning of components, such as the display and the keypad of the device 1200, and the sensor component 1214 can also detect a change in the position of the device 1200 or a component of the device 1200 , the presence or absence of user contact with the device 1200 , the device 1200 orientation or acceleration/deceleration and the temperature change of the device 1200 .
  • Sensor assembly 1214 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact.
  • Sensor assembly 1214 may also include optical sensors, such as CMOS or CCD image sensors, for use in imaging applications.
  • the sensor component 1214 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
  • Communication component 1216 is configured to facilitate wired or wireless communications between device 1200 and other devices.
  • the device 1200 can access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G or 5G), or a combination thereof.
  • the communication component 1216 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 1216 also includes a near field communication (NFC) module to facilitate short-range communication.
  • the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.
  • RFID Radio Frequency Identification
  • IrDA Infrared Data Association
  • UWB Ultra Wide Band
  • Bluetooth Bluetooth
  • device 1200 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gates Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic implementations for performing the methods described above.
  • ASICs Application Specific Integrated Circuits
  • DSPs Digital Signal Processors
  • DSPDs Digital Signal Processing Devices
  • PLDs Programmable Logic Devices
  • FPGAs Field Programmable Gates Arrays
  • controllers microcontrollers, microprocessors or other electronic implementations for performing the methods described above.
  • a non-volatile computer-readable storage medium including instructions, such as the memory 1204 including instructions, which can be executed by the processor 1220 of the device 1200 to complete the above method.
  • the computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, among others.
  • a computer program product including implementing the above method for receiving bullet chatting when the computer program is executed by a processor.
  • Fig. 13 is a block diagram of a device 1300 for delivering bullet chatting according to an exemplary embodiment.
  • device 1300 may be a server.
  • device 1300 includes processing component 1320 , which further includes one or more processors, and a memory resource represented by memory 1322 for storing instructions executable by processing component 1320 , such as application programs.
  • the application programs stored in memory 1322 may include one or more modules each corresponding to a set of instructions.
  • the processing component 1320 is configured to execute instructions to execute the above-mentioned method for delivering bullet chatting.
  • Device 1300 may also include a power component 1324 configured to perform power management of device 1300 , a wired or wireless network interface 1326 configured to connect device 1300 to a network, and an input-output (I/O) interface 1328 .
  • Device 1300 may operate based on an operating system stored in memory 1322, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD or the like.
  • a non-volatile computer-readable storage medium including instructions such as the memory 1322 including instructions, the instructions can be executed by the processor of the device 1300 to complete the above-mentioned bullet chatting delivery method.
  • the storage medium may be a computer readable storage medium such as ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, for example.
  • a computer program product including implementing the above-mentioned method for delivering bullet chatting when the computer program is executed by a processor.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Library & Information Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present disclosure relates to a bullet screen comment issuing method and apparatus, a bullet screen comment receiving method and apparatus, and an electronic device, a storage medium and a program product, and same relate to the technical field of computers. The bullet screen comment issuing method comprises: receiving a first issuing request sent by a client, wherein the first issuing request carries a video identifier of a video file that is currently played by the client, and a query time period, to which the current playing progress belongs, and the query time period is obtained on the basis of dividing a playing duration of the video file; searching a bullet screen comment database according to the video identifier and the query time period, so as to obtain a set of bullet screen comments corresponding to the video identifier and the query time period, wherein the bullet screen comment database comprises the correlation between a video identifier, a query time period and a bullet screen comment; and acquiring target bullet screen comments from the set of the bullet screen comments, and returning the target bullet screen comments to the client, wherein the target bullet screen comments are several bullet screen comments needing to be returned to the client.

Description

弹幕下发方法及接收方法Bullet screen sending method and receiving method
相关申请的交叉引用Cross References to Related Applications
本申请基于申请号为202110600924.5、申请日为2021年05月31日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is based on a Chinese patent application with application number 202110600924.5 and a filing date of May 31, 2021, and claims the priority of this Chinese patent application. The entire content of this Chinese patent application is hereby incorporated by reference into this application.
技术领域technical field
本公开涉及计算机技术领域,尤其涉及一种弹幕下发方法、接收方法、装置、电子设备、存储介质及程序产品。The present disclosure relates to the field of computer technology, and in particular, to a bullet-screen delivery method, receiving method, device, electronic equipment, storage medium, and program product.
背景技术Background technique
随着互联网视频技术的发展,视频播放器具有了弹幕功能。视频弹幕又称为影片跑马灯,是一些视频分享网站的特殊功能。利用弹幕功能,在视频文件播放到某个时间点的情况下,观看者可以发表自己的评论,则会在此该时间点的视频画面上显示该评论,比如以滑动而过字幕的形式显示出来。相关技术中,客户端向服务端请求弹幕的拉取,服务端向客户端下发弹幕时会导致网络带宽的浪费。With the development of Internet video technology, video players have the barrage function. Video barrage, also known as video marquee, is a special feature of some video sharing websites. Using the barrage function, when the video file is played to a certain point in time, viewers can post their own comments, and the comments will be displayed on the video screen at this point in time, for example, in the form of sliding over subtitles come out. In related technologies, the client requests the server to pull the barrage, and the server sends the barrage to the client, resulting in a waste of network bandwidth.
发明内容Contents of the invention
本公开提供一种弹幕下发方法、接收方法、装置、电子设备、存储介质及程序产品。根据本公开实施例的第一方面,提供一种弹幕下发方法,包括:The present disclosure provides a barrage delivery method, a receiving method, a device, an electronic device, a storage medium, and a program product. According to the first aspect of the embodiments of the present disclosure, there is provided a bullet chatting method, including:
接收客户端发送的第一下发请求,所述第一下发请求携带有所述客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段,所述查询时间段基于对所述视频文件的播放时长进行划分得到;Receive the first delivery request sent by the client, the first delivery request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs, and the query time period is based on the The playback duration of the video file is divided to obtain;
根据所述视频标识以及所述查询时间段,在弹幕数据库中进行查找,得到与所述视频标识以及所述查询时间段对应的弹幕集合,所述弹幕数据库包括视频标识、查询时间段以及弹幕的对应关系;According to the video identification and the query time period, search in the bullet chat database to obtain the bullet chat collection corresponding to the video identification and the query time period, and the bullet chat database includes video identification, query time period And the corresponding relationship of barrage;
从所述弹幕集合中获取目标弹幕,并将所述目标弹幕返回至所述客户端,所述目标弹幕为需要返回至所述客户端的若干条弹幕。Acquiring target bullet chatting from the bullet chatting set, and returning the target bullet chatting to the client, where the target bullet chatting is several bullet chatting pieces that need to be returned to the client terminal.
在其中一个实施例中,所述从所述弹幕集合中获取目标弹幕,并将所述目标弹幕返回至所述客户端,包括:In one of the embodiments, the obtaining the target bullet chat from the bullet chat collection, and returning the target bullet chat to the client includes:
在所述弹幕集合中的弹幕数量大于预设的弹幕返回上限的情况下,从所述弹幕集合中,获取数量等于所述弹幕返回上限的目标弹幕,并将翻页字段赋值为第一结果值,所述第一结果值用于告知所述客户端在所述弹幕集合中还包含有待下发弹幕;In the case that the number of bullet chats in the bullet chat collection is greater than the preset bullet chat return upper limit, from the bullet chat collection, obtain the target bullet chat with a quantity equal to the bullet chat return upper limit, and turn the page field The first result value is assigned as the first result value, and the first result value is used to inform the client that the bullet chatting set still includes bullet chatting to be delivered;
将所述目标弹幕和所述第一结果值返回至所述客户端,所述第一结果值还用于指示所述客户端发送第二下发请求。Returning the target barrage and the first result value to the client, where the first result value is also used to instruct the client to send a second sending request.
在其中一个实施例中,所述待下发弹幕中的各弹幕具有标识;所述方法还包括:In one of the embodiments, each barrage in the barrage to be delivered has an identification; the method further includes:
响应于所述目标弹幕完成播放时的视频播放进度依旧属于所述查询时间段,接收所述第二下发请求,所述第二下发请求携带有所述查询时间段、所述视频标识以及所述第一结果值,所述第一结果值用于表征已经返回至所述客户端的目标弹幕的标识;Responding to the fact that the video playback progress when the target barrage finishes playing still belongs to the query time period, the second sending request is received, and the second sending request carries the query time period, the video identification And the first result value, the first result value is used to characterize the identification of the target barrage that has been returned to the client;
依旧根据所述视频标识和所述查询时间段在所述弹幕数据库中进行查找,得到所述弹幕集合;Still searching in the bullet chat database according to the video identification and the query time period, to obtain the bullet chat collection;
根据所述第一结果值从所述弹幕集合中筛选,得到所述待下发弹幕;Screening from the bullet chatting set according to the first result value to obtain the bullet chatting to be delivered;
根据各弹幕的标识依次从所述待下发弹幕中获取新的目标弹幕,并将所述新的目标弹幕返回至所述客户端。Obtain new target bullet chatters from the bullet chatters to be delivered in sequence according to the identifiers of the bullet chatters, and return the new target bullet chatters to the client.
在其中一个实施例中,所述从所述弹幕集合中获取目标弹幕,并将所述目标弹幕返回至所述客户端,包括:In one of the embodiments, the obtaining the target bullet chat from the bullet chat collection, and returning the target bullet chat to the client includes:
在所述弹幕集合中的弹幕数量不大于预设的弹幕返回上限的情况下,从所述弹幕集合中获取所有弹幕作为所述目标弹幕,并将所述翻页字段赋值为第二结果值;In the case that the number of bullet chats in the bullet chatting set is not greater than the preset bullet chatting return upper limit, obtain all bullet chatting from the bullet chatting collection as the target bullet chatting, and assign a value to the page turning field is the second result value;
将所述弹幕集合和所述第二结果值返回至所述客户端,所述第二结果值用于告知所述客户端所述弹幕集合中所有弹幕均已经返回至所述客户端。Returning the bullet chatting set and the second result value to the client, the second result value is used to inform the client that all the bullet chatting in the bullet chatting collection has been returned to the client .
在其中一个实施例中,响应于所述弹幕集合完成播放时的视频播放进度依旧属于所述查询时间段,所述第二结果值还用于指示所述客户端不发送第二下发请求。In one of the embodiments, in response to the video playback progress when the barrage collection finishes playing still belongs to the query time period, the second result value is also used to instruct the client not to send the second delivery request .
在其中一个实施例中,所述方法还包括:In one embodiment, the method also includes:
响应于所述目标弹幕完成播放时的视频播放进度不再属于所述查询时间段,接收所述客户端发送的第三下发请求,所述第三下发请求携带新的查询时间段。In response to the video playing progress when the target barrage finishes playing no longer belongs to the query time period, a third sending request sent by the client is received, and the third sending request carries a new query time period.
在其中一个实施例中,所述查询时间段包括查询时间起点时刻和查询时间终点时刻,所述查询时间终点时刻等于所述查询时间起点时刻与预设的查询时长阈值之和。In one embodiment, the query time period includes a query time start time and a query time end time, and the query time end time is equal to the sum of the query time start time and a preset query duration threshold.
根据本公开实施例的第二方面,提供一种弹幕接收方法,包括:According to the second aspect of the embodiments of the present disclosure, there is provided a bullet chatting receiving method, including:
发送第一下发请求至服务端,所述第一下发请求携带有客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段,所述查询时间段基于对所述视频文件的播放时长进行划分得到;Send a first delivery request to the server, the first delivery request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs, and the query time period is based on the video file is obtained by dividing the playing time;
接收所述服务端返回的目标弹幕,所述目标弹幕为所述服务端从弹幕集合中获取的若干条弹幕,所述弹幕集合是所述服务端根据所述视频标识以及所述查询时间段,在弹幕数据库中进行查找得到的与所述视频标识以及所述查询时间段对应的弹幕所组成的集合,所述弹幕数据库包括视频标识、查询时间段以及弹幕的对应关系。Receiving the target barrage returned by the server, the target barrage is several barrages obtained by the server from the barrage collection, the barrage set is the server according to the video ID and the barrage The query time period, a collection of bullet chats corresponding to the video identifier and the query time period obtained by searching in the bullet chat database, the bullet chat database includes video identifiers, query time periods, and bullet chat information Correspondence.
在其中一个实施例中,所述接收所述服务端返回的目标弹幕,包括:In one of the embodiments, the receiving the target barrage returned by the server includes:
接收所述服务端返回的目标弹幕和第一结果值;在所述弹幕集合中的弹幕数量大于预设的弹幕返回上限的情况下,所述目标弹幕为所述服务端从所述弹幕集合中获取数量等于所述弹幕返回上限的若干条弹幕,所述第一结果值为所述服务端对翻页字段的赋值,且所述第一结果值用于表征在所述弹幕集合中还包含有待下发弹幕;Receive the target barrage and the first result value returned by the server; when the number of barrage in the barrage collection is greater than the preset barrage return upper limit, the target barrage is the A number of barrages whose number is equal to the upper limit of the barrage return is obtained from the barrage collection, the first result value is the assignment of the page turning field by the server, and the first result value is used to represent the The bullet chatting set also includes bullet chatting to be delivered;
根据所述第一结果值向所述服务端发送第二下发请求。Sending a second delivery request to the server according to the first result value.
在其中一个实施例中,所述待下发弹幕中的各弹幕具有标识,所述第一结果值还用于表征已经返回至所述客户端的目标弹幕的标识;所述方法还包括:In one of the embodiments, each bullet chat in the bullet chat to be sent has an identification, and the first result value is also used to represent the identification of the target bullet chat that has been returned to the client; the method further includes :
响应于所述目标弹幕完成播放时的视频播放进度依旧属于所述查询时间段,根据所述第一结果值向所述服务端发送所述第二下发请求,所述第二下发请求携带有所述查询时间段、所述视频标识以及所述第一结果值;Responding to the fact that the video playback progress when the target barrage finishes playing still belongs to the query time period, the second delivery request is sent to the server according to the first result value, and the second delivery request carry the query time period, the video identifier and the first result value;
接收所述服务端返回的新的目标弹幕,所述新的目标弹幕是所述服务端依旧根据所述视频标识和所述查询时间段在所述弹幕数据库中进行查找,得到所述弹幕集合,根据所述第一结果值从所述弹幕集合中筛选,得到所述待下发弹幕,根据各弹幕的标识依次从所述待下发弹幕中获取的预设弹幕数量的弹幕。在其中一个实施例中,所述接收所述服务端返回的目标弹幕,包括:Receiving the new target barrage returned by the server, the new target barrage is that the server still searches in the barrage database according to the video identification and the query time period, and obtains the The bullet chatting set, which is screened from the bullet chatting set according to the first result value to obtain the bullet chatting to be issued, and the preset bullet chatting obtained from the bullet chatting to be issued in sequence according to the identification of each bullet chatting The barrage of the number of screens. In one of the embodiments, the receiving the target barrage returned by the server includes:
接收所述服务端返回的目标弹幕和第二结果值;在所述弹幕集合中的弹幕数量不大于预设的弹幕返回上限的情况下,所述目标弹幕为所述服务端从所述弹幕集合中获取的所有弹幕,所述第二结果值为所述服务端对翻页字段的赋值,且所述第二结果值用于表征在所述弹幕集合中的所有弹幕均已经返回至客户端。Receive the target barrage and the second result value returned by the server; when the number of barrages in the barrage collection is not greater than the preset barrage return upper limit, the target barrage is the server For all bullet chatting obtained from the bullet chatting collection, the second result value is the assignment of the server to the page turning field, and the second result value is used to represent all the bullet chatting in the bullet chatting collection The barrage has been returned to the client.
在其中一个实施例中,所述方法还包括:In one embodiment, the method also includes:
响应于所述弹幕集合完成播放时的视频播放进度依旧属于所述查询时间段,根据所述第二结果值不向所述服务端发送第二下发请求。In response to the fact that the video playback progress when the barrage collection finishes playing still belongs to the query time period, no second delivery request is sent to the server according to the second result value.
在其中一个实施例中,所述方法还包括:In one embodiment, the method also includes:
响应于所述目标弹幕完成播放时的视频播放进度不再属于所述查询时间段,向所述服务端发送第三下发请求,所述第三下发请求携带新的查询时间段。In response to the video playing progress when the target barrage finishes playing no longer belongs to the query time period, a third sending request is sent to the server, and the third sending request carries a new query time period.
在其中一个实施例中,所述查询时间段包括查询时间起点时刻和查询时间终点时刻,所述查询时间终点时刻等于所述查询时间起点时刻与预设的查询时长阈值之和。In one embodiment, the query time period includes a query time start time and a query time end time, and the query time end time is equal to the sum of the query time start time and a preset query duration threshold.
根据本公开实施例的第三方面,提供一种弹幕下发装置,包括:According to a third aspect of the embodiments of the present disclosure, there is provided a barrage delivery device, including:
第一接收模块,被配置为接收客户端发送的第一下发请求,所述第一下发请求携带有所述客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段,所述查询时间段基于对所述视频文件的播放时长进行划分得到;The first receiving module is configured to receive the first sending request sent by the client, the first sending request carries the video identifier of the video file being played by the client and the query time period to which the current playing progress belongs, The query time period is obtained based on dividing the playing duration of the video file;
第一查找模块,被配置为根据所述视频标识以及所述查询时间段,在弹幕数据库中进行查找,得到与所述视频标识以及所述查询时间段对应的弹幕集合,所述弹幕数据库包括视频标识、查询时间段以及弹幕的对应关系;The first search module is configured to search in the bullet chatting database according to the video identification and the query time period, and obtain a bullet chatting set corresponding to the video identification and the query time period, and the bullet chatting The database includes the corresponding relationship between video identification, query time period and barrage;
第一弹幕返回模块,被配置为从所述弹幕集合中获取目标弹幕,并将所述目标弹幕返回至所述客户端,所述目标弹幕为需要返回至所述客户端的若干条弹幕。The first barrage returning module is configured to obtain target barrage from the barrage set, and return the target barrage to the client, the target barrage is a number of barrage that needs to be returned to the client Barrage.
在其中一个实施例中,所述第一弹幕返回模块,还被配置为在所述弹幕集合中的弹幕数量大于预设的弹幕返回上限的情况下,从所述弹幕集合中,获取数量等于所述弹幕返回上限的目标弹幕,并将翻页字段赋值为第一结果值,所述第一结果值用于告知所述客户端在所述弹幕集合中还包含有待下发弹幕;将所述目标弹幕和所述第一结果值返回至所述客户端,所述第一结果值还用 于指示所述客户端发送第二下发请求。In one of the embodiments, the first bullet chatting return module is further configured to, when the number of bullet chatting in the bullet chatting collection is greater than the preset bullet chatting return upper , obtain the target bullet chat whose number is equal to the upper limit of the bullet chat, and assign the page turning field to the first result value, and the first result value is used to inform the client that the bullet chat collection still contains pending Sending a barrage; returning the target barrage and the first result value to the client, where the first result value is also used to instruct the client to send a second request.
在其中一个实施例中,所述待下发弹幕中的各弹幕具有标识;响应于所述目标弹幕完成播放时的视频播放进度依旧属于所述查询时间段,所述装置还包括:In one of the embodiments, each bullet chat in the bullet chat to be delivered has an identification; in response to the video playback progress when the target bullet chat is finished playing still belongs to the query time period, the device further includes:
第二接收模块,被配置为接收所述第二下发请求,所述第二下发请求携带有所述查询时间段、所述视频标识以及所述第一结果值,所述第一结果值用于表征已经返回至所述客户端的目标弹幕的标识;The second receiving module is configured to receive the second delivery request, the second delivery request carries the query time period, the video identifier and the first result value, the first result value An identifier used to characterize the target barrage that has been returned to the client;
第二查找模块,被配置为依旧根据所述视频标识和所述查询时间段在所述弹幕数据库中进行查找,得到所述弹幕集合;The second search module is configured to still search in the bullet chat database according to the video identifier and the query time period to obtain the bullet chat collection;
弹幕集合筛选模块,被配置为根据所述第一结果值从所述弹幕集合中筛选,得到所述待下发弹幕;The barrage set screening module is configured to filter from the barrage set according to the first result value to obtain the barrage to be issued;
第二弹幕返回模块,被配置为根据各弹幕的标识依次从所述待下发弹幕中获取新的目标弹幕,并将所述新的目标弹幕返回至所述客户端。The second bullet chatting returning module is configured to sequentially obtain new target bullet chatting from the bullet chatting to be sent according to the identification of each bullet chatting, and return the new target bullet chatting to the client.
在其中一个实施例中,所述第一弹幕返回模块,还被配置为在所述弹幕集合中的弹幕数量不大于预设的弹幕返回上限的情况下,从所述弹幕集合中获取所有弹幕作为所述目标弹幕,并将所述翻页字段赋值为第二结果值;将所述弹幕集合和所述第二结果值返回至所述客户端,所述第二结果值用于告知所述客户端所述弹幕集合中所有弹幕均已经返回至所述客户端。In one of the embodiments, the first bullet chatting return module is further configured to return the Obtain all bullet chatting as the target bullet chatting, and assign the page turning field as the second result value; return the bullet chatting set and the second result value to the client, and the second The result value is used to inform the client that all bullet chats in the bullet chat collection have been returned to the client.
在其中一个实施例中,响应于所述弹幕集合完成播放时的视频播放进度依旧属于所述查询时间段,所述第二结果值还用于指示所述客户端不发送第二下发请求。In one of the embodiments, in response to the video playback progress when the barrage collection finishes playing still belongs to the query time period, the second result value is also used to instruct the client not to send the second delivery request .
在其中一个实施例中,所述装置还包括:In one of the embodiments, the device also includes:
第三接收模块,被配置为响应于所述目标弹幕完成播放时的视频播放进度不再属于所述查询时间段,接收所述客户端发送的第三下发请求,所述第三下发请求携带新的查询时间段。The third receiving module is configured to receive the third sending request sent by the client in response to the video playing progress when the target barrage finishes playing no longer belongs to the query time period, and the third sending request The request carries the new query period.
在其中一个实施例中,所述查询时间段包括查询时间起点时刻和查询时间终点时刻,所述查询时间终点时刻等于所述查询时间起点时刻与预设的查询时长阈值之和。In one embodiment, the query time period includes a query time start time and a query time end time, and the query time end time is equal to the sum of the query time start time and a preset query duration threshold.
根据本公开实施例的第四方面,提供一种弹幕接收装置,包括:According to a fourth aspect of the embodiments of the present disclosure, there is provided a barrage receiving device, including:
第一发送模块,被配置为发送第一下发请求至服务端,所述第一下发请求携带有客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段,所述查询时间段基于对所述视频文件的播放时长进行划分得到;The first sending module is configured to send a first sending request to the server, the first sending request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs, and the query The time period is obtained based on dividing the playing duration of the video file;
第一接收模块,被配置为接收所述服务端返回的目标弹幕,所述目标弹幕为所述服务端从弹幕集合中获取的若干条弹幕,所述弹幕集合是所述服务端根据所述视频标识以及所述查询时间段,在弹幕数据库中进行查找得到的与所述视频标识以及所述查询时间段对应的弹幕所组成的集合,所述弹幕数据库包括视频标识、查询时间段以及弹幕的对应关系。The first receiving module is configured to receive the target barrage returned by the server, the target barrage is several barrages obtained by the server from the barrage collection, the barrage set is the service According to the video identification and the query time period, the terminal searches in the bullet chatting database to obtain a collection of bullet chatting corresponding to the video identification and the query time period, and the bullet chatting database includes the video identification , Query the corresponding relationship between the time period and the barrage.
在其中一个实施例中,所述第一接收模块,还被配置为接收所述服务端返回的目标弹幕和第一结果值;在所述弹幕集合中的弹幕数量大于预设的弹幕返回上限的情况下,所述目标弹幕为所述服务端从所述弹幕集合中获取数量等于所述弹幕返回上限的若干条弹幕,所述第一结果值为所述服务端对翻页字段的赋值,且所述第一结果值用于表征在所述弹幕集合中还包含有待下发弹幕,第一结果值还用于指示所述客户端发送第二下发请求。In one of the embodiments, the first receiving module is further configured to receive the target barrage and the first result value returned by the server; the number of barrage in the barrage set is greater than the preset barrage In the case of returning the upper limit of the bullet chat, the target bullet chat is that the server obtains a number of bullet chats from the bullet chat collection equal to the upper limit of the bullet chat, and the first result value is the server end Assign a value to the page turning field, and the first result value is used to indicate that the bullet chatting set still contains bullet chatting to be delivered, and the first result value is also used to instruct the client to send a second delivery request .
在其中一个实施例中,所述待下发弹幕中的各弹幕具有标识,所述第一结果值还用于表征已经返回至所述客户端的目标弹幕的标识;所述弹幕接收装置还包括:In one of the embodiments, each barrage in the barrage to be sent has an identifier, and the first result value is also used to characterize the identifier of the target barrage that has been returned to the client; the barrage receives The device also includes:
第二发送模块,被配置为响应于所述目标弹幕完成播放时的视频播放进度依旧属于所述查询时间段,向所述服务端发送所述第二下发请求,所述第二下发请求携带有所述查询时间段、所述视频标识以及所述第一结果值;The second sending module is configured to send the second sending request to the server in response to the video playing progress when the target barrage finishes playing still belongs to the query time period, and the second sending request is sent to the server. The request carries the query time period, the video identifier and the first result value;
第二接收模块,被配置为接收所述服务端返回的新的目标弹幕,所述新的目标弹幕是所述服务端依旧根据所述视频标识和所述查询时间段在所述弹幕数据库中进行查找,得到所述弹幕集合,根据所述第一结果值从所述弹幕集合中筛选,得到所述待下发弹幕,根据各弹幕的标识依次从所述待下发弹幕中获取的预设弹幕数量的弹幕。The second receiving module is configured to receive a new target barrage returned by the server, and the new target barrage is that the server is still in the barrage according to the video identification and the query time period Search in the database to obtain the set of bullet chats, filter from the set of bullet chats according to the first result value, obtain the bullet chats to be issued, and sequentially select the bullet chats to be issued according to the identification of each bullet chat The bullet chat with the preset number of bullet chats obtained in the bullet chat.
在其中一个实施例中,所述第一接收模块,还被配置为接收所述服务端返回的目标弹幕和第二结果值;在所述弹幕集合中的弹幕数量不大于预设的弹幕返回上限的情况下,所述目标弹幕为所述服务端从所述弹幕集合中获取的所有弹幕,所述第二结果值为所述服务端对翻页字段的赋值,且所述第二结果值用于表征在所述弹幕集合中的所有弹幕均已经返回至客户端。In one of the embodiments, the first receiving module is further configured to receive the target barrage and the second result value returned by the server; the number of barrage in the barrage set is not greater than the preset In the case where the bullet chatting returns the upper limit, the target bullet chatting is all the bullet chatting obtained by the server from the bullet chatting collection, the second result value is the assignment of the server to the page turning field, and The second result value is used to indicate that all bullet chats in the bullet chat collection have been returned to the client.
在其中一个实施例中,所述弹幕接收装置还包括第三发送模块,被配置为响应于所述弹幕集合完成播放时的视频播放进度依旧属于所述查询时间段,根据所述第二结果值不向所述服务端发送第二下发请求。In one of the embodiments, the bullet chat receiving device further includes a third sending module, configured to respond to the video playback progress when the bullet chat collection finishes playing still belongs to the query time period, according to the second The result value does not send a second delivery request to the server.
在其中一个实施例中,所述弹幕接收装置还包括第四发送模块,被配置为响应于所述目标弹幕完成播放时的视频播放进度不再属于所述查询时间段,向所述服务端发送第三下发请求,所述第三下发请求携带新的查询时间段。In one of the embodiments, the device for receiving bullet chatting further includes a fourth sending module, configured to send a message to the service in response to the video playback progress when the target bullet chatting is finished playing no longer belongs to the query time period. The terminal sends a third delivery request, where the third delivery request carries a new query time period.
在其中一个实施例中,所述查询时间段包括查询时间起点时刻和查询时间终点时刻,所述查询时间终点时刻等于所述查询时间起点时刻与预设的查询时长阈值之和。In one embodiment, the query time period includes a query time start time and a query time end time, and the query time end time is equal to the sum of the query time start time and a preset query duration threshold.
根据本公开实施例的第五方面,提供一种电子设备,包括:According to a fifth aspect of the embodiments of the present disclosure, there is provided an electronic device, including:
处理器;processor;
用于存储所述处理器可执行指令的存储器;memory for storing said processor-executable instructions;
其中,所述处理器被配置为执行所述指令,以实现如上述的弹幕下发方法或者上述的弹幕接收方法。Wherein, the processor is configured to execute the instructions, so as to realize the above-mentioned bullet chatting sending method or the above-mentioned bullet chatting receiving method.
根据本公开实施例的第六方面,提供一种非易失性计算机可读存储介质,当所述计算机可读存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行如上述的弹幕下发方法或者上述的弹幕接收方法。According to a sixth aspect of the embodiments of the present disclosure, there is provided a non-volatile computer-readable storage medium. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute Such as the above-mentioned bullet chatting sending method or the above-mentioned bullet chatting receiving method.
根据本公开实施例的第七方面,提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现上述的弹幕下发方法或者上述的弹幕接收方法。According to a seventh aspect of the embodiments of the present disclosure, there is provided a computer program product, including a computer program. When the computer program is executed by a processor, the above-mentioned method for sending a bullet chat or the above-mentioned method for receiving a bullet chat is implemented.
通过接收携带有视频标识和查询时间段的第一下发请求,查询时间段基于对视频文件的播放时长进行划分得到;并根据视频标识以及查询时间段在弹幕数据库中进行查找,得到对应的弹幕集合;从而从弹幕集合中获取目标弹幕,并将目标弹幕返回至客户端,不仅减少每次下发弹幕的数量,而且减少待播放弹幕对客户端内存的占用,还减少对服务端网络带宽的占用,并提升弹幕播放的实时性。By receiving the first delivery request carrying the video ID and the query time period, the query time period is obtained based on the division of the playing time of the video file; and searching in the barrage database according to the video ID and the query time period to obtain the corresponding Barrage collection; thus obtaining the target barrage from the barrage collection and returning the target barrage to the client, which not only reduces the number of barrages sent each time, but also reduces the memory usage of the barrage to be played on the client. Reduce the occupation of server-side network bandwidth and improve the real-time performance of barrage playback.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理,并不构成对本公开的不当限定。The accompanying drawings here are incorporated into the specification and constitute a part of the specification, show embodiments consistent with the disclosure, and are used together with the description to explain the principle of the disclosure, and do not constitute an improper limitation of the disclosure.
图1是根据一示例性实施例示出的一种弹幕下发方法的应用环境图。Fig. 1 is an application environment diagram of a method for delivering bullet chatting according to an exemplary embodiment.
图2是根据一示例性实施例示出的一种弹幕下发方法的流程图。Fig. 2 is a flow chart of a method for delivering bullet chatting according to an exemplary embodiment.
图3是根据一示例性实施例示出的步骤S230的流程图。Fig. 3 is a flow chart of step S230 according to an exemplary embodiment.
图4是根据一示例性实施例示出的一种弹幕下发方法的流程图。Fig. 4 is a flow chart of a method for delivering bullet chatting according to an exemplary embodiment.
图5是根据一示例性实施例示出的一种弹幕下发方法的流程图。Fig. 5 is a flow chart of a method for delivering bullet chatting according to an exemplary embodiment.
图6是根据一示例性实施例示出的一种弹幕下发方法的流程图。Fig. 6 is a flow chart of a method for delivering bullet chatting according to an exemplary embodiment.
图7是根据一示例性实施例示出的一种弹幕接收方法的流程图。Fig. 7 is a flow chart of a method for receiving bullet chatting according to an exemplary embodiment.
图8是根据一示例性实施例示出的一种弹幕接收方法的流程图。Fig. 8 is a flow chart of a method for receiving bullet chatting according to an exemplary embodiment.
图9是根据一示例性实施例示出的一种弹幕接收方法的时序图。Fig. 9 is a sequence diagram of a method for receiving bullet chatting according to an exemplary embodiment.
图10是根据一示例性实施例示出的一种弹幕下发装置的框图。Fig. 10 is a block diagram of a barrage delivery device according to an exemplary embodiment.
图11是根据一示例性实施例示出的一种弹幕接收装置的框图。Fig. 11 is a block diagram of a barrage receiving device according to an exemplary embodiment.
图12是根据一示例性实施例示出的一种电子设备的框图。Fig. 12 is a block diagram of an electronic device according to an exemplary embodiment.
图13是根据一示例性实施例示出的一种服务器的框图。Fig. 13 is a block diagram of a server according to an exemplary embodiment.
具体实施方式Detailed ways
为了使本领域普通人员更好地理解本公开的技术方案,下面将结合附图,对本公开实施例中的技术方案进行清楚、完整地描述。In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本公开的实施例能够以除了在这里图示或描述的那些以外的顺序实施。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。It should be noted that the terms "first" and "second" in the specification and claims of the present disclosure and the above drawings are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein can be practiced in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present disclosure as recited in the appended claims.
在相关技术中,服务端采用全时段的方式下发弹幕。响应于客户端请求弹幕,根据当前弹幕的排序结果,下发前N条弹幕,客户端展示完第N条弹幕,客户端请求下一批弹幕。举例来说,用户从头开始观看一个5分钟时长的视频,此时根据弹幕排序结果下发前N条弹幕。经分析发现:客户端展示完前N条弹幕,在第N条弹幕对应的播放进度为5分钟的情况下,此时客户端再次向 服务端请求弹幕,而客户端却即将完成视频播放,那么,在前5分钟内有其他用户发布的弹幕的情况下,该客户端是无法进行展示这些弹幕的,即该客户端的用户无法查看前5分钟内有其他用户发布的弹幕。进一步地,因为采用全时段的方式下发弹幕,每次下发的N条弹幕可以包括一些播放进度非常靠后的弹幕,在用户在播放过程中由于某种原因中断播放的情况下,下发至客户端内存中的一些弹幕没有得到播放,造成客户端侧不必要的性能开销。举例来说,某个视频的播放时长为10分钟,前5分钟内没有弹幕,后5分钟有200条弹幕,假设每次请求的弹幕数量限制为200条,开始播放时客户端请求弹幕,客户端接收到200条弹幕。在视频播放至第3分钟的情况下,用户中断播放,此时仅仅播放200条弹幕中的部分弹幕,其余的弹幕并没有播放,但是通过网络下发至客户端的内存中,从而浪费了客户端的内存以及服务端的网络带宽等资源。In related technologies, the server sends barrage in a full-time manner. In response to the client requesting bullet chatting, according to the current sorting result of the bullet chatting, the first N bullet chatting pieces are delivered, and after the client displays the Nth bullet chatting pieces, the client requests the next batch of bullet chatting. For example, the user watches a 5-minute video from the beginning, and at this time, the first N bullet chats are delivered according to the ranking results of the bullet chats. After analysis, it is found that: after the client has displayed the first N barrages, and the playback progress corresponding to the N barrage is 5 minutes, at this time, the client requests the barrage again from the server, but the client is about to complete the video Play, then, if there are bullet chats posted by other users within the first 5 minutes, the client cannot display these bullet chats, that is, users of this client cannot view bullet chats posted by other users within the previous 5 minutes . Furthermore, because the bullet chatting is delivered in a full-time manner, the N bullet chatting delivered each time may include some bullet chatting with very late playback progress. In the case that the user interrupts the playback for some reason during the playback , some barrages delivered to the client memory are not played, causing unnecessary performance overhead on the client side. For example, if a video is played for 10 minutes, there is no barrage in the first 5 minutes, and there are 200 barrages in the next 5 minutes. Assume that the number of barrages per request is limited to 200. When the playback starts, the client requests Barrage, the client receives 200 barrage. When the video is played to the 3rd minute, the user interrupts the playback. At this time, only some of the 200 barrages are played, and the rest of the barrages are not played, but are sent to the client’s memory through the network, thus wasting resources such as the memory of the client and the network bandwidth of the server.
基于此,本公开所提供的弹幕下发方法,可以应用于如图1所示的应用环境中。其中,客户端110通过网络与服务端120进行交互。服务端120可以是具有较强的数据存储和计算能力的电子设备,例如服务端120可以用独立的服务器或者是多个服务器组成的服务器集群来实现。客户端110可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备。其中,客户端110安装和运行有具有视频播放功能的应用,比如浏览器、社交应用、直播应用、购物应用或者支付应用中至少一种。视频文件设有视频标识,视频文件具有播放时长,比如1分钟、3分钟或者5分钟甚至更长。对视频文件的播放时长进行时长划分,得到若干个查询时间段。各查询时间段包括查询时间起点时刻和查询时间终点时刻。查询时间终点时刻等于查询时间起点时刻与预设的查询时长阈值之和。比如一个2分钟的视频文件,对该2分钟的视频文件进行划分,查询时长阈值可以是30秒,则得到的时间段可以包括:0至30秒、31秒到60秒、61秒到90秒、91秒到120秒。需要说明的是,预设的查询时长阈值可以是结合实际情况而限制的查询时长,比如取30秒至60秒之间,可以是30秒,也可以是45秒,还可以是60秒。服务端120上部署有弹幕数据库,弹幕数据库包括视频标识、查询时间段以及弹幕的对应关系。Based on this, the bullet chatting delivery method provided in the present disclosure can be applied to the application environment shown in FIG. 1 . Wherein, the client 110 interacts with the server 120 through the network. The server 120 may be an electronic device with strong data storage and computing capabilities. For example, the server 120 may be implemented by an independent server or a server cluster composed of multiple servers. Clients 110 may be, but are not limited to, various personal computers, laptops, smart phones, tablets, and portable wearable devices. Wherein, the client 110 installs and runs an application with a video playing function, such as at least one of a browser, a social application, a live broadcast application, a shopping application or a payment application. The video file is provided with a video identification, and the video file has a playing time, such as 1 minute, 3 minutes, or 5 minutes or even longer. The playback duration of the video file is divided into durations to obtain several query time segments. Each query time period includes the start time of the query time and the end point of the query time. The end point of the query time is equal to the sum of the start point of the query time and the preset query duration threshold. For example, if a 2-minute video file is divided, the query duration threshold can be 30 seconds, and the obtained time period can include: 0 to 30 seconds, 31 seconds to 60 seconds, 61 seconds to 90 seconds , 91 seconds to 120 seconds. It should be noted that the preset query duration threshold may be a query duration limited according to the actual situation, for example, between 30 seconds and 60 seconds, and may be 30 seconds, 45 seconds, or 60 seconds. A bullet chatting database is deployed on the server 120, and the bullet chatting database includes video identifiers, query time periods, and corresponding relations of bullet chatting.
响应于客户端110播放视频文件,向服务端120发送弹幕的第一下发请求,第一下发请求携带有客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段。服务端120接收到第一下发请求,服务端120根据视频标识以及查询时间段在弹幕数据库中进行查找,得到与视频标识以及查询时间段对应的弹幕集合,并从弹幕集合中获取目标弹幕,目标弹幕为需要返回至客户端的若干条弹幕。服务端120将目标弹幕返回至客户端110,客户端110播放目标弹幕。In response to the client 110 playing the video file, a first delivery request of the barrage is sent to the server 120. The first delivery request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs. The server 120 receives the first delivery request, and the server 120 searches the bullet chat database according to the video ID and the query time period, obtains the bullet chat set corresponding to the video ID and the query time period, and obtains the bullet chat from the bullet chat collection Target barrage, the target barrage is several barrages that need to be returned to the client. The server 120 returns the target barrage to the client 110, and the client 110 plays the target barrage.
图2是根据一示例性实施例示出的一种弹幕下发方法的流程图,如图2所示,弹幕下发方法用于图1中的服务端120中,包括以下步骤:S210,接收客户端发送的第一下发请求;S220,根据视频标识以及查询时间段,在弹幕数据库中进行查找,得到与视频标识以及查询时间段对应的弹幕集合;S230,从弹幕集合中获取目标弹幕,并将目标弹幕返回至客户端。Fig. 2 is a flow chart of a bullet chatting method according to an exemplary embodiment. As shown in Fig. 2, the bullet chatting method is used in the server 120 in Fig. 1 and includes the following steps: S210, receiving the client The first delivery request sent by the terminal; S220, according to the video ID and the query time period, search in the bullet chat database to obtain the bullet chat set corresponding to the video ID and the query time period; S230, obtain the target from the bullet chat collection Barrage, and return the target barrage to the client.
在步骤S210中,接收客户端发送的第一下发请求。In step S210, a first sending request sent by the client is received.
其中,第一下发请求携带有客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段,查询时间段基于对视频文件的播放时长进行划分得到。视频文件可以具有弹幕,弹幕可以分布在视频文件的任意播放进度处。客户端播放视频文件的当前播放进度可以理解为一个播放时间点,该播放时间点属于视频文件的若干个查询时间段中一个。比如一个1分钟的视频文件,对该1分钟的视频文件进行划分,查询时长阈值可以是20秒,则得到若干个查询时间段,包括:0至20秒、21秒到40秒、41秒到60秒。在视频文件播放到45秒的情况下,则当前播放进度为45秒,且当前播放进度属于查询时间段41秒到60秒。在一些实施例中,客户端播放视频文件,在视频文件具有弹幕的情况下,客户端发送弹幕的第一下发请求至服务端,为了从服务端获取用户在当前播放进度发表的弹幕,第一下发请求不仅需要携带有正在播放的视频文件的视频标识,还需要携带有当前播放进度所属的查询时间段。Wherein, the first sending request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs, and the query time period is obtained by dividing the playing duration of the video file. The video file can have barrage, and the barrage can be distributed at any playback progress of the video file. The current playback progress of the video file played by the client can be understood as a playback time point, which belongs to one of several query time periods of the video file. For example, if a 1-minute video file is divided, the query duration threshold can be 20 seconds, and several query time periods can be obtained, including: 0 to 20 seconds, 21 seconds to 40 seconds, 41 seconds to 40 seconds 60 seconds. When the video file is played to 45 seconds, the current playback progress is 45 seconds, and the current playback progress belongs to the query time period of 41 seconds to 60 seconds. In some embodiments, the client plays a video file. In the case that the video file has a bullet chat, the client sends the first delivery request of the bullet chat to the server. screen, the first sending request not only needs to carry the video ID of the video file being played, but also needs to carry the query time period to which the current playback progress belongs.
在步骤S220中,根据视频标识以及查询时间段,在弹幕数据库中进行查找,得到与视频标识以及查询时间段对应的弹幕集合。In step S220, according to the video identifier and the query time period, a search is performed in the bullet chat database to obtain a bullet chat set corresponding to the video identifier and the query time period.
其中,弹幕数据库可以部署在服务端,弹幕数据库的表结构可以包括视频标识、弹幕位置、弹幕标识、弹幕内容等。弹幕位置可以理解为弹幕在视频播放进度上的位置,也就是在视频播放到该视频播放进度时用户所发表的弹幕,弹幕数据库存储有用户发表的弹幕内容以及该弹幕对应的视频播放进度(即弹幕位置)。弹幕内容可以理解为弹幕对应的文字、图片、表情包等信息,比如“泰森和道格拉斯有二番战吗”、“拉得克也的确是一条硬汉,这场比赛当时看的现场直播”等文字内容。在一些实施例中,服务端根据视频标识以及查询时间段在弹幕数据库中进行查找,在视频标识对应的弹幕中,确定查询时间段内的弹幕集合。比如,在当前播放进度属于查询时间段41秒到60秒的情况下,则查找得到的弹幕集合可以是查询时间段41秒到60秒内的弹幕集合, 可以理解为任一用户观看视频文件41秒到60秒的视频内容时所发表弹幕构成的集合。Among them, the bullet chat database can be deployed on the server, and the table structure of the bullet chat database can include video identification, bullet chat location, bullet chat identification, bullet chat content, etc. The bullet chatting position can be understood as the position of the bullet chatting in the video playback progress, that is, the bullet chatting posted by the user when the video is played to the video playback progress. The bullet chatting database stores the content of the bullet chatting posted by the user and the corresponding The playback progress of the video (that is, the barrage position). The content of the barrage can be understood as the text, pictures, emojis and other information corresponding to the barrage, such as "Does Tyson and Douglas have a second fight?" and other text content. In some embodiments, the server searches the bullet chat database according to the video identifier and the query time period, and determines the bullet chat set within the query time period in the bullet chat corresponding to the video identifier. For example, if the current playback progress belongs to the query time period of 41 seconds to 60 seconds, the searched barrage set can be the barrage set within the query time period of 41 seconds to 60 seconds, which can be understood as any user watching the video A collection of bullet chats published when the video content is 41 seconds to 60 seconds long.
在步骤S230中,从弹幕集合中获取目标弹幕,并将目标弹幕返回至客户端。In step S230, the target bullet chat is obtained from the bullet chat collection, and the target bullet chat is returned to the client.
其中,目标弹幕为需要返回至客户端的若干条弹幕,客户端用于播放目标弹幕。在一些实施例中,从弹幕数据库中已经查找到与当前播放进度所属的查询时间段对应的弹幕集合,为了保证弹幕显示的实时性(即实时看到其它用户发布的弹幕),可以从弹幕集合中获取部分弹幕或者全部弹幕作为目标弹幕,将目标弹幕下发至客户端,客户端播放目标弹幕,在客户端观看视频的当前用户可以看到该查询时间段的目标弹幕。示例性地,比如每个查询时间段的时长约定为30秒,在视频播放到第15秒的情况下,接收到服务端下发的0至30秒的弹幕,在该时刻其他用户观看视频的30秒以后的视频内容的情况下,并在该播放进度处发布了弹幕,等到该当前用户观看到30秒以后的播放进度时(比如45秒,属于查询时间段31秒至60秒),服务端实时地下发该播放进度所属的查询时间段内的其他用户所发布的弹幕。Among them, the target barrage is several barrages that need to be returned to the client, and the client is used to play the target barrage. In some embodiments, the bullet chatting set corresponding to the query time period to which the current playback progress belongs has been found from the bullet chatting database. Part of the bullet chat or all the bullet chats can be obtained from the bullet chat collection as the target bullet chat, and the target bullet chat is sent to the client, and the client plays the target bullet chat. The current user watching the video on the client can see the query time period target barrage. Exemplarily, for example, the duration of each query period is agreed to be 30 seconds. When the video is played to the 15th second, a barrage of 0 to 30 seconds is received from the server. At this time, other users watch the video In the case of the video content after 30 seconds, and publish the barrage at the playback progress, wait until the current user watches the playback progress after 30 seconds (for example, 45 seconds, which belongs to the query time period of 31 seconds to 60 seconds) , the server sends the barrage posted by other users in the query time period to which the playback progress belongs in real time.
上述弹幕下发方法,通过接收携带有视频标识和查询时间段的第一下发请求,查询时间段基于对视频文件的播放时长进行划分得到;并根据视频标识以及查询时间段在弹幕数据库中进行查找,得到对应的弹幕集合;从而从弹幕集合中获取目标弹幕,并将目标弹幕返回至客户端,不仅减少每次下发弹幕的数量,而且减少待播放弹幕对客户端内存的占用,还减少对服务端网络带宽的占用,并提升弹幕播放的实时性。The above-mentioned bullet chatting delivery method is obtained by receiving the first delivery request carrying a video identifier and a query time period, and the query time period is obtained based on dividing the playing duration of the video file; and according to the video identifier and the query time period in the bullet chat database Search to obtain the corresponding barrage set; thus obtain the target barrage from the barrage set, and return the target barrage to the client, which not only reduces the number of barrages sent each time, but also reduces the impact of the barrage to be played on the client It also reduces the occupation of server-side network bandwidth and improves the real-time performance of barrage playback.
在一些实施例中,如图3所示,从弹幕集合中获取目标弹幕,并将目标弹幕返回至客户端,可以通过以下步骤实现:S310,在弹幕集合中的弹幕数量大于预设的弹幕返回上限的情况下,从弹幕集合中,获取数量等于弹幕返回上限的目标弹幕,并将翻页字段赋值为第一结果值;S320,将目标弹幕和第一结果值返回至客户端。In some embodiments, as shown in Figure 3, obtaining the target bullet chat from the bullet chat collection and returning the target bullet chat to the client can be achieved through the following steps: S310, the number of bullet chat in the bullet chat collection is greater than In the case of the preset barrage return upper limit, obtain target barrages whose number is equal to the barrage return upper limit from the barrage collection, and assign the page turning field as the first result value; S320, combine the target barrage and the first result value The resulting value is returned to the client.
在步骤S310中,在弹幕集合中的弹幕数量大于预设的弹幕返回上限的情况下,从弹幕集合中,获取数量等于弹幕返回上限的目标弹幕,并将翻页字段赋值为第一结果值。In step S310, when the number of bullet chats in the bullet chat collection is greater than the preset bullet chat return upper limit, obtain the target bullet chat with a quantity equal to the bullet chat return upper limit from the bullet chat collection, and assign a value to the page turning field is the first result value.
其中,弹幕返回上限可以是服务端每次向客户端下发的弹幕的最大数量,可以结合客户端的性能参数、服务端的性能参数等实际情况设置弹幕返回上限。在弹幕返回上限为200的情况下,则服务端向客户端每次最多下发200条弹幕。在一些实施例中,从弹幕数据库中查找得到当前播放进度所属的查询时间段所对应的弹幕集合,弹幕集合的弹幕具有一定的数量,将弹幕集合中的弹幕数量与预设的弹幕返回上限进行比较。弹幕集合中的弹幕数量可以大于预设的弹幕返回上限,弹幕集合中的弹幕数量可以等于预设的弹幕返回上限,弹幕集合中的弹幕数量可以小于预设的弹幕返回上限。Among them, the upper limit of bullet chatting return can be the maximum number of bullet chatting sent by the server to the client each time, and the upper limit of bullet chatting return can be set in combination with the performance parameters of the client and the performance parameters of the server. In the case that the upper limit of bullet chatting is 200, the server can send up to 200 bullet chatting to the client each time. In some embodiments, the bullet chatting set corresponding to the query time period to which the current playing progress belongs is searched from the bullet chatting database. Compare the set barrage return upper limit. The number of bullet chatter in the bullet chat collection can be greater than the preset bullet chat return limit, the bullet chat number in the bullet chat collection can be equal to the preset bullet chat return upper limit, and the bullet chat number in the bullet chat collection can be less than the preset bullet chat screen returns to the upper limit.
在弹幕集合中的弹幕数量大于弹幕返回上限的情况下,说明弹幕集合中的弹幕并不能一次性全部的下发至客户端,因此需要设置翻页字段。利用翻页字段表征在弹幕集合中除返回至客户端的目标弹幕之外是否还有剩余弹幕(这些剩余弹幕作为待下发弹幕)。翻页字段可以理解为服务端提供给客户端接口所返回的一个字段。根据弹幕集合中的弹幕数量与预设的弹幕返回上限的比较结果对翻页字段进行赋值。在弹幕集合中的弹幕数量大于弹幕返回上限的情况下,则将翻页字段赋值为第一结果值。第一结果值用于表征在弹幕集合中除返回至客户端的目标弹幕之外还有待下发弹幕。If the number of bullet chats in the bullet chatting collection is greater than the upper limit of bullet chatting returns, it means that the bullet chatting in the bullet chatting collection cannot be sent to the client all at once, so the page turning field needs to be set. The page turning field is used to indicate whether there are remaining bullet chatting in the bullet chatting set besides the target bullet chatting returned to the client (these remaining bullet chatting are regarded as bullet chatting to be delivered). The page turning field can be understood as a field provided by the server to the client interface and returned. Assign values to the page turning field according to the comparison result between the number of bullet chatter in the bullet chat collection and the preset bullet chat return upper limit. In the case that the number of bullet chatting in the bullet chat collection is greater than the upper limit of the bullet chatting returned, the page turning field is assigned the first result value. The first result value is used to represent that in the bullet chatting set, there are bullet chatting to be delivered besides the target bullet chatting returned to the client.
为了减少对客户端内存的占用,限制了服务端向客户端下发弹幕的数量,因此可以按照弹幕标识的顺序,从当前播放进度所属的查询时间段所对应的弹幕集合获取目标弹幕,目标弹幕的数量等于弹幕返回上限。In order to reduce the memory usage of the client, the number of bullet chats sent by the server to the client is limited. Therefore, the target bullet chat can be obtained from the bullet chat collection corresponding to the query time period to which the current playback progress belongs according to the order of the bullet chat IDs. The number of target barrage is equal to the upper limit of barrage return.
在步骤S320中,将目标弹幕和第一结果值返回至客户端。In step S320, the target barrage and the first result value are returned to the client.
其中,第一结果值还用于指示客户端发送第二下发请求。在一些实施例中,服务端在弹幕数据库中查找得到弹幕集合,并从弹幕集合中获取目标弹幕。在弹幕集合中的弹幕数量大于弹幕返回上限的情况下,服务端将翻页字段赋值为第一结果值。服务端将目标弹幕和第一结果值返回至客户端,客户端接收并播放目标弹幕,在目标弹幕完成播放的情况下,由于第一结果值告知客户端在弹幕集合中除返回至客户端的目标弹幕之外还有待下发弹幕,因此客户端可以向服务端发送第二下发请求以拉取待下发弹幕。Wherein, the first result value is also used to instruct the client to send the second sending request. In some embodiments, the server searches the bullet chatting database to obtain the bullet chatting collection, and obtains the target bullet chatting from the bullet chatting collection. When the number of bullet chatting in the bullet chatting collection is greater than the upper limit of bullet chatting, the server assigns the page turning field to the first result value. The server returns the target bullet chatting and the first result value to the client, and the client receives and plays the target bullet chatting. When the target bullet chatting is finished playing, the first result value tells the client to remove the returned bullet chat from the bullet chatting collection. In addition to the target barrage to the client, there are still barrages to be delivered, so the client can send a second delivery request to the server to pull the barrage to be delivered.
在一些实施例中,通过设置翻页字段,并根据弹幕集合中的弹幕数量与预设的弹幕返回上限的比较结果对翻页字段进行赋值,确保客户端可以再次向服务端拉取弹幕,实现弹幕的分页播放,尽可能多地播放弹幕,加强与用户之间的互动性。且通过设置弹幕返回上限,减少对客户端性能产生的影响。In some embodiments, by setting the page turning field and assigning a value to the page turning field according to the comparison result of the number of bullet chatting in the bullet chatting collection and the preset bullet chatting return upper limit, it is ensured that the client can pull to the server again Barrage, to realize page-by-page playback of barrage, play barrage as much as possible, and strengthen interaction with users. And by setting the upper limit of barrage return, reduce the impact on client performance.
在一些实施例中,待下发弹幕中的各弹幕具有标识。如图4所示,响应于目标弹幕完成播放时的视频播放进度依旧属于查询时间段,弹幕下发方法还包括:S410,接收第二下发请求;S420, 依旧根据视频标识和查询时间段在弹幕数据库中进行查找,得到弹幕集合;S430,根据第一结果值从弹幕集合中筛选,得到待下发弹幕;S440,根据各弹幕的标识依次从待下发弹幕中获取新的目标弹幕,并将新的目标弹幕返回至客户端。In some embodiments, each bullet chat in the bullet chat to be delivered has an identification. As shown in Figure 4, in response to the video playback progress when the target bullet chatting is finished playing still belongs to the query time period, the bullet chat delivery method also includes: S410, receiving the second delivery request; S420, still according to the video identification and the query time period Search in the barrage database to obtain the barrage set; S430, filter from the barrage set according to the first result value to obtain the barrage to be sent; S440, sequentially select the barrage from the barrage to be issued according to the identification of each barrage Obtain a new target barrage, and return the new target barrage to the client.
在步骤S410中,接收第二下发请求。In step S410, a second delivery request is received.
在步骤S420中,依旧根据视频标识和查询时间段在弹幕数据库中进行查找,得到弹幕集合。In step S420, the bullet chatting database is still searched according to the video ID and the query time period to obtain the bullet chatting set.
其中,第二下发请求携带有查询时间段、视频标识以及第一结果值,第一结果值用于表征已经返回至客户端的目标弹幕的标识。在一些实施例中,在弹幕集合中的弹幕数量大于弹幕返回上限的情况下,则将翻页字段赋值为第一结果值。响应于服务端将目标弹幕和第一结果值返回至客户端,客户端接收并播放目标弹幕。在目标弹幕完成播放的情况下,由于第一结果值告知客户端在弹幕集合中除返回至客户端的目标弹幕之外还有待下发弹幕,因此客户端可以向服务端发送第二下发请求,服务端接收第二下发请求。第二下发请求携带有第一结果值、查询时间段和视频标识。服务端依旧根据视频标识和查询时间段在弹幕数据库中进行查找,得到与视频标识以及查询时间段对应的弹幕集合。Wherein, the second sending request carries a query time period, a video identifier and a first result value, and the first result value is used to represent the identifier of the target barrage that has been returned to the client. In some embodiments, when the number of bullet chatting in the bullet chat collection is greater than the upper limit of bullet chatting returns, the page turning field is assigned the first result value. In response to the server returning the target bullet chat and the first result value to the client, the client receives and plays the target bullet chat. When the target bullet chat is finished playing, the client can send the second bullet chat to the server because the first result value informs the client that there are bullet chats to be sent in addition to the target bullet chat returned to the client in the bullet chat collection. Sending the request, the server receives the second sending request. The second sending request carries the first result value, the query time period and the video ID. The server still searches the bullet chat database according to the video ID and query time period, and obtains the bullet chat collection corresponding to the video ID and query time period.
在步骤S430中,根据第一结果值从弹幕集合中筛选,得到待下发弹幕。In step S430, screen the bullet chatting set according to the first result value to obtain the bullet chatting to be sent.
其中,剩余弹幕为在弹幕集合中除返回至客户端的目标弹幕之外的其他弹幕。在一些实施例中,第一结果值可以告知服务端返回至客户端的目标弹幕是哪些弹幕,因此,根据第一结果值从弹幕集合中筛选,将已经返回至客户端的目标弹幕进行过滤,得到由剩余弹幕重新组成的弹幕集合。Wherein, the remaining bullet chatting refers to other bullet chatting in the bullet chatting collection except the target bullet chatting returned to the client. In some embodiments, the first result value can inform the server which bullet chatting is the target bullet chatting returned to the client. Therefore, according to the first result value, it is screened from the bullet chatting collection, and the target bullet chatting that has been returned to the client is processed. Filter to get the bullet chatting collection recomposed from the remaining bullet chatting.
在步骤S440中,根据各弹幕的标识依次从待下发弹幕中获取新的目标弹幕,并将新的目标弹幕返回至客户端。In step S440, new target bullet chats are sequentially obtained from the bullet chats to be sent according to the identifiers of each bullet chat, and the new target bullet chats are returned to the client.
其中,待下发弹幕中的弹幕数量可以大于弹幕返回上限,可以小于弹幕返回上限。在一些实施例中,弹幕数据库中的弹幕可以是按照预设顺序(比如弹幕发送时间)进行存储的,同样的,待下发弹幕中的弹幕可以是按照预设顺序进行存储的。待下发弹幕中的各弹幕具有标识,根据各弹幕的标识从待下发弹幕中获取新的目标弹幕。在待下发弹幕的弹幕数量大于弹幕返回上限的情况下,服务端从待下发弹幕中获取数量等于弹幕返回上限弹幕,作为新的目标弹幕。在待下发弹幕的弹幕数量小于弹幕返回上限的情况下,服务端将待下发弹幕作为新的目标弹幕。服务端将新的目标弹幕返回至客户端,客户端接收新的目标弹幕,进一步地,客户端还可以播放新的目标弹幕。Among them, the number of bullet chats to be delivered can be greater than or less than the upper limit of bullet chat returns. In some embodiments, the bullet chatting in the bullet chat database can be stored in a preset order (such as the time when the bullet chatting is sent), and similarly, the bullet chatting in the bullet chatting to be sent can be stored in a preset order of. Each barrage in the barrage to be delivered has an identifier, and a new target barrage is obtained from the barrage to be delivered according to the identifier of each barrage. When the number of bullet chats to be sent is greater than the upper limit of bullet chats to be sent, the server obtains a number of bullet chats equal to the upper limit of bullet chats to be sent as the new target bullet chat. When the number of bullet chats to be sent is less than the upper limit of bullet chats returned, the server will use the bullet chats to be sent as the new target bullet chat. The server returns the new target barrage to the client, and the client receives the new target barrage, and further, the client can also play the new target barrage.
在一些实施例中,在弹幕集合中的弹幕数量大于弹幕返回上限的情况下,响应于目标弹幕返回至客户端,又根据第一结果值从弹幕集合中筛选,得到待下发弹幕;根据各弹幕的标识依次从待下发弹幕中获取新的目标弹幕,并将新的目标弹幕返回至客户端。可见,在一些实施例中,实现将查找到的弹幕集合多次分页下发至客户端,在减少客户端性能开销的前提下,还确保客户端可以播放更多的弹幕,加强与用户之间的互动性。In some embodiments, when the number of bullet chatting in the bullet chatting collection is greater than the upper limit of bullet chatting return, in response to the target bullet chatting being returned to the client, it is filtered from the bullet chatting collection according to the first result value to obtain the next Send bullet chatting; obtain new target bullet chatting from the bullet chatting to be sent in turn according to the identification of each bullet chatting, and return the new target bullet chatting to the client. It can be seen that in some embodiments, the searched barrage collection is sent to the client in multiple pages, and on the premise of reducing the performance overhead of the client, it is also ensured that the client can play more barrage, and strengthen the relationship with the user. interactivity between them.
在一些实施例中,如图5所示,从弹幕集合中获取目标弹幕,并将目标弹幕返回至客户端,包括以下步骤:In some embodiments, as shown in Figure 5, obtaining the target bullet chat from the bullet chat collection, and returning the target bullet chat to the client, includes the following steps:
在步骤S510中,在弹幕集合中的弹幕数量不大于预设的弹幕返回上限的情况下,从弹幕集合中获取所有弹幕作为目标弹幕,并将翻页字段赋值为第二结果值。In step S510, when the number of bullet chats in the bullet chat collection is not greater than the preset bullet chat return upper limit, obtain all bullet chat from the bullet chat collection as the target bullet chat, and assign the page turning field to the second result value.
在步骤S520中,将弹幕集合和第二结果值返回至客户端。In step S520, the barrage set and the second result value are returned to the client.
其中,第二结果值用于告知客户端弹幕集合中所有弹幕均已经返回至客户端。在一些实施例中,服务端比较弹幕集合中的弹幕数量与预设的弹幕返回上限,在弹幕集合中的弹幕数量不大于弹幕返回上限的情况下,说明可以将弹幕集合中各弹幕下发至客户端,从弹幕集合中获取所有弹幕作为目标弹幕。设置翻页字段的值,表征在弹幕集合中除返回至客户端的目标弹幕之外没有其他弹幕,即将翻页字段赋值为第二结果值,以通过第二结果值告知客户端弹幕集合中所有弹幕均已经返回至客户端。Wherein, the second result value is used to inform the client that all bullet chats in the bullet chat collection have been returned to the client. In some embodiments, the server compares the number of bullet chats in the bullet chat collection with the preset bullet chat return upper limit, and if the bullet chat number in the bullet chat collection is not greater than the bullet chat return upper limit, it means that the bullet chat can be returned Each bullet chat in the set is sent to the client, and all bullet chats are obtained from the bullet chat collection as the target bullet chat. Set the value of the page turning field, indicating that there is no other bullet chatting in the bullet chatting collection except the target bullet chatting returned to the client, that is, assign the page turning field to the second result value, so as to inform the client of the bullet chatting through the second result value All bullet chats in the collection have been returned to the client.
在一些实施例中,在弹幕集合中的弹幕数量不大于弹幕返回上限的情况下,将翻页字段赋值为第二结果值,并将弹幕集合和第二结果值返回至客户端。通过第二结果值告知客户端不再向服务端发送第二下发请求,避免在服务端已经将查询时间段内的所有弹幕均下发的情况下客户端依旧向服务端发送下发请求,从而进一步地减少对服务器的带宽资源的占用。In some embodiments, when the number of bullet chatting in the bullet chatting collection is not greater than the bullet chatting return upper limit, the page turning field is assigned the second result value, and the bullet chatting collection and the second result value are returned to the client . Use the second result value to inform the client not to send the second delivery request to the server, so as to avoid the client sending a delivery request to the server when the server has already delivered all bullet chats within the query time period , thereby further reducing the bandwidth resource occupation of the server.
在一些实施例中,响应于弹幕集合完成播放时的视频播放进度依旧属于查询时间段,第二结果值还用于指示客户端不发送第二下发请求。In some embodiments, the second result value is further used to instruct the client not to send the second sending request in response to the video playing progress when the bullet chatting set finishes playing and still belongs to the query time period.
在一些实施例中,服务端将弹幕集合和第二结果值返回至客户端,客户端接收到弹幕集合并播放弹幕集合。响应于完成播放弹幕集合,判断客户端的视频播放进度是否属于查询时间段,在 客户端的视频播放进度属于查询时间段的情况下,由于第二结果值表明该查询时间内已经没有其他弹幕,则在弹幕集合完成播放时根据第二结果值客户端不再向服务端发送第二下发请求。示例性地,第二结果值可以是预设数值,比如可以为0。响应于客户端检测到翻页字段的赋值为0,则在弹幕集合完成播放的情况下,客户端不再向服务端发送第二下发请求。In some embodiments, the server returns the bullet chat collection and the second result value to the client, and the client receives the bullet chat collection and plays the bullet chat collection. In response to the completion of playing the barrage set, it is judged whether the video playback progress of the client belongs to the query time period. Then, when the barrage collection finishes playing, the client no longer sends the second delivery request to the server according to the second result value. Exemplarily, the second result value may be a preset value, such as 0. In response to the client detecting that the value assigned to the page turning field is 0, the client does not send a second delivery request to the server when the barrage set is played.
在一些实施例中,响应于弹幕集合完成播放时的视频播放进度依旧属于查询时间段,通过第二结果值指示客户端不发送第二下发请求,不仅减少对服务器的带宽资源的占用,而且进一步地减少客户端的性能开销,确保客户端运行的流畅性。In some embodiments, in response to the video playback progress when the barrage collection completes playing still belongs to the query time period, the second result value indicates that the client does not send the second delivery request, which not only reduces the bandwidth resource occupation of the server, but also And further reduce the performance overhead of the client to ensure the smooth operation of the client.
在一些实施例中,弹幕下发方法还包括:响应于目标弹幕完成播放时的视频播放进度不再属于查询时间段,接收客户端发送的第三下发请求,第三下发请求携带新的查询时间段。In some embodiments, the bullet chat delivery method further includes: in response to the video playback progress when the target bullet chat is finished playing no longer belongs to the query time period, receiving a third delivery request sent by the client, the third delivery request carrying a new query time period.
其中,客户端接收到目标弹幕并进行播放,在目标弹幕完成播放的情况下,判断目标弹幕完成播放时的视频播放进度是否属于上次查询所使用的查询时间段,在视频播放进度不属于上次查询所使用的查询时间段,表明该视频播放进度属于新的查询时间段,则客户端可以从服务器拉取与新的查询时间段对应的弹幕。在一些实施例中,响应于目标弹幕完成播放时的视频播放进度不再属于查询时间段,则客户端向服务端发送第三下发请求,服务端接收到第三下发请求,第三下发请求携带有视频播放进度所属的新的查询时间段和视频标识。服务端可以根据新的查询时间段和视频标识在弹幕数据库中进行查找,得到新的弹幕集合。新的弹幕集合的弹幕位置位于新的查询时间段内。可以从新的弹幕集合中获取位于新的查询时间段内的目标弹幕,客户端接收并播放位于新的查询时间段内的目标弹幕。Among them, the client receives the target bullet chat and plays it. When the target bullet chat is finished playing, it judges whether the video playback progress when the target bullet chat is finished playing belongs to the query time period used in the previous query. It does not belong to the query time period used in the last query, indicating that the video playback progress belongs to the new query time period, and the client can pull the barrage corresponding to the new query time period from the server. In some embodiments, in response to the video playback progress when the target barrage finishes playing no longer belongs to the query time period, the client sends a third sending request to the server, and the server receives the third sending request, and the third The sending request carries the new query time period and video identifier to which the video playback progress belongs. The server can search the bullet chat database according to the new query time period and video ID to obtain a new bullet chat collection. The bullet chatting position of the new bullet chat collection is within the new query time period. The target bullet chat in the new query time period can be obtained from the new bullet chat collection, and the client receives and plays the target bullet chat in the new query time period.
在一些实施例中,响应于目标弹幕完成播放时的视频播放进度不再属于查询时间段,则接收客户端发送的第三下发请求,确保待用户观看到后续播放进度的情况下,实时地拉取到其他用户发布的弹幕,提升弹幕播放状态与视频播放进度的贴合性以及弹幕的实时性。In some embodiments, in response to the video playback progress when the target barrage finishes playing no longer belongs to the query time period, the third delivery request sent by the client is received to ensure that when the user watches the subsequent playback progress, real-time Pull the barrage posted by other users to improve the fit between the barrage playback status and video playback progress and the real-time performance of the barrage.
在一些实施例中,响应于目标弹幕完成播放时的视频播放进度不再属于查询时间段,在与查询时间段对应的弹幕集合中依旧存在未播放弹幕的情况下,不下发未播放弹幕至客户端,这样,可以确保播放的弹幕与视频播放进度的对应。In some embodiments, in response to the video playback progress when the target bullet chatting is finished playing no longer belongs to the query time period, if there are still unplayed bullet chatters in the bullet chatting set corresponding to the query time period, the unplayed bullet chatting will not be issued. The barrage is sent to the client, so that it can ensure that the barrage played corresponds to the progress of the video playback.
在一些实施例中,查询时间段包括查询时间起点时刻和查询时间终点时刻,查询时间终点时刻等于查询时间起点时刻与预设的查询时长阈值之和。In some embodiments, the query time period includes the start time of the query time and the end time of the query time, and the end time of the query time is equal to the sum of the start time of the query time and a preset query duration threshold.
其中,视频文件具有播放时长,对视频文件的播放时长进行划分得到若干个查询时间段,查询时间段与视频文件的播放进度对应。如前文,查询时长阈值可以根据实际情况而设定。在一些实施例中,查询时间段包括查询时间起点时刻和查询时间终点时刻,查询时间起点时刻(positionFromInclude)可以与视频文件中第一时间点上的播放进度对应,作为查询时间段的起点。查询时间终点时刻(positionToInclude)可以与视频文件中第二时间点上的播放进度对应,作为查询时间段的终点,第一时间点早于第二时间点。查询时间终点时刻等于查询时间起点时刻与预设的查询时长阈值之和。Wherein, the video file has a playback duration, and the playback duration of the video file is divided to obtain several query time periods, and the query time period corresponds to the playback progress of the video file. As mentioned above, the query duration threshold can be set according to the actual situation. In some embodiments, the query time period includes the start time of the query time and the end point of the query time, and the start point of the query time (positionFromInclude) may correspond to the playback progress at the first time point in the video file as the starting point of the query time period. The end point of the query time (positionToInclude) may correspond to the playback progress at the second time point in the video file. As the end point of the query time period, the first time point is earlier than the second time point. The end point of the query time is equal to the sum of the start point of the query time and the preset query duration threshold.
在一些实施例中,通过对视频文件的播放时长进行划分得到若干个查询时间段,且查询时间终点时刻等于查询时间起点时刻与预设的查询时长阈值之和,建立查询时间段与视频播放进度的对应关系,实现从服务端拉取弹幕的准确控制,确保弹幕播放的实时性。进一步地,相对于相关技术中的全时段方式,查询时间段内的弹幕数量较少,可以减少弹幕对客户端内存的占用。In some embodiments, several query time periods are obtained by dividing the playback duration of the video file, and the end point of the query time is equal to the sum of the start point of the query time and the preset query duration threshold, and the query time period and video playback progress are established. The corresponding relationship, to achieve accurate control of the bullet chatting from the server, and to ensure the real-time performance of the bullet chatting. Furthermore, compared with the full-time method in the related art, the number of bullet chatting in the query time period is small, which can reduce the memory occupation of the client terminal by bullet chatting.
图6是根据一示例性实施例示出的一种弹幕下发方法的流程图,如图6所示,弹幕下发方法用于图1中的服务端120中,包括以下步骤:S602,接收客户端发送的第一下发请求;S604,根据视频标识以及查询时间段,在弹幕数据库中进行查找,得到与视频标识以及查询时间段对应的弹幕集合;S606,比较弹幕集合中的弹幕数量与预设的弹幕返回上限;S608,在弹幕集合中的弹幕数量大于弹幕返回上限的情况下,则将翻页字段赋值为第一结果值;S610,从弹幕集合中,获取数量等于弹幕返回上限的目标弹幕;S612,将目标弹幕和第一结果值返回至客户端;S614,响应于目标弹幕完成播放时的视频播放进度依旧属于查询时间段,接收客户端发送的第二下发请求;S616,依旧根据视频标识和查询时间段在弹幕数据库中进行查找,得到弹幕集合;S618,根据第一结果值从弹幕集合中筛选,得到待下发弹幕;S620,根据各弹幕的标识依次从待下发弹幕中获取新的目标弹幕,并将新的目标弹幕返回至客户端;S622中,在弹幕集合中的弹幕数量不大于预设的弹幕返回上限的情况下,从弹幕集合中获取所有弹幕作为目标弹幕,并将翻页字段赋值为第二结果值;S624,将弹幕集合和第二结果值返回至客户端;S626,响应于目标弹幕完成播放时的视频播放进度不再属于查询时间段,接收客户端发送的第三下发请求。Fig. 6 is a flow chart of a bullet chatting method according to an exemplary embodiment. As shown in Fig. 6, the bullet chatting method is used in the server 120 in Fig. 1, and includes the following steps: S602, receiving the client The first delivery request sent by the terminal; S604, according to the video identifier and the query time period, search in the bullet chat database to obtain the bullet chat set corresponding to the video identifier and the query time period; S606, compare the bullet chat in the bullet chat collection The number of bullet chatting and the preset return upper limit of bullet chatting; S608, when the number of bullet chatting in the bullet chat collection is greater than the upper limit of bullet chatting return, assign the page turning field to the first result value; S610, from the bullet chat collection , obtain the target barrage whose number is equal to the upper limit of the barrage return; S612, return the target barrage and the first result value to the client; S614, respond to the video playback progress when the target barrage is finished playing still belongs to the query time period, receive The second delivery request sent by the client; S616, search in the bullet chatting database according to the video ID and query time period, and obtain the bullet chatting set; S618, filter from the bullet chatting set according to the first result value, and obtain Send barrage; S620, according to the identification of each barrage, obtain new target barrage in turn from the barrage to be sent, and return the new target barrage to the client; in S622, the barrage in the barrage collection In the case that the number is not greater than the preset return upper limit of bullet chatting, obtain all bullet chatting from the bullet chatting collection as the target bullet chatting, and assign the page turning field as the second result value; S624, combine the bullet chatting collection and the second result The value is returned to the client; S626, in response to the video playback progress when the target barrage finishes playing no longer belongs to the query time period, receive the third sending request sent by the client.
在步骤S602中,接收客户端发送的第一下发请求。In step S602, a first delivery request sent by the client is received.
其中,第一下发请求携带有客户端正在播放的视频文件的视频标识以及当前播放进度所属的 查询时间段。查询时间段基于对视频文件的播放时长进行划分得到。查询时间段包括查询时间起点时刻和查询时间终点时刻,查询时间终点时刻等于查询时间起点时刻与预设的查询时长阈值之和。Wherein, the first sending request carries the video identification of the video file being played by the client and the query time period to which the current playback progress belongs. The query period is obtained based on dividing the playing duration of the video file. The query time period includes the starting point of the query time and the end point of the query time, and the end point of the query time is equal to the sum of the starting point of the query time and the preset query duration threshold.
在步骤S604中,根据视频标识以及查询时间段,在弹幕数据库中进行查找,得到与视频标识以及查询时间段对应的弹幕集合。In step S604, according to the video identifier and the query time period, the bullet chatting database is searched to obtain the bullet chatting set corresponding to the video identifier and the query time period.
在步骤S606中,比较弹幕集合中的弹幕数量与预设的弹幕返回上限。In step S606, the number of bullet chats in the bullet chat collection is compared with the preset bullet chat return upper limit.
在步骤S608中,在弹幕集合中的弹幕数量大于弹幕返回上限的情况下,则将翻页字段赋值为第一结果值。In step S608, if the number of bullet chatting in the bullet chatting set is greater than the upper limit of bullet chatting return, the page turning field is assigned the first result value.
其中,第一结果值用于告知客户端在弹幕集合中还包含有待下发弹幕。Wherein, the first result value is used to inform the client that the bullet chatting set still contains bullet chatting to be delivered.
在步骤S610中,从弹幕集合中,获取数量等于弹幕返回上限的目标弹幕。In step S610, from the bullet chat collection, the target bullet chat whose quantity is equal to the bullet chat return upper limit is obtained.
在步骤S612中,将目标弹幕和第一结果值返回至客户端。In step S612, the target barrage and the first result value are returned to the client.
其中,客户端用于在完成播放目标弹幕时发送第二下发请求,且第二下发请求携带有第一结果值。Wherein, the client is used to send the second sending request when the target barrage is finished playing, and the second sending request carries the first result value.
在步骤S614中,响应于目标弹幕完成播放时的视频播放进度依旧属于查询时间段,接收客户端发送的第二下发请求。In step S614, in response to the fact that the video playback progress when the target barrage finishes playing still belongs to the query time period, the second delivery request sent by the client is received.
其中,第二下发请求携带有查询时间段、视频标识以及第一结果值,第一结果值用于表征已经返回至客户端的目标弹幕的标识。Wherein, the second sending request carries a query time period, a video identifier and a first result value, and the first result value is used to represent the identifier of the target barrage that has been returned to the client.
在步骤S616中,依旧根据视频标识和查询时间段在弹幕数据库中进行查找,得到弹幕集合。In step S616, the bullet chatting database is still searched according to the video ID and the query time period to obtain the bullet chatting set.
在步骤S618中,根据第一结果值从弹幕集合中筛选,得到待下发弹幕。In step S618, screen the bullet chatting set according to the first result value to obtain the bullet chatting to be sent.
在步骤S620中,根据各弹幕的标识依次从待下发弹幕中获取新的目标弹幕,并将新的目标弹幕返回至客户端。In step S620, new target bullet chats are sequentially obtained from the bullet chats to be sent according to the identifiers of the bullet chats, and the new target bullet chats are returned to the client.
其中,客户端还用于播放新的目标弹幕。Among them, the client is also used to play new target barrage.
在步骤S622中,在弹幕集合中的弹幕数量不大于预设的弹幕返回上限的情况下,从弹幕集合中获取所有弹幕作为目标弹幕,并将翻页字段赋值为第二结果值。In step S622, when the number of bullet chats in the bullet chat collection is not greater than the preset bullet chat return upper limit, obtain all bullet chat from the bullet chat collection as the target bullet chat, and assign the page turning field to the second result value.
其中,第二结果值用于告知客户端弹幕集合中所有弹幕均已经返回至客户端。Wherein, the second result value is used to inform the client that all bullet chats in the bullet chat collection have been returned to the client.
在步骤S624中,将弹幕集合和第二结果值返回至客户端。In step S624, the barrage set and the second result value are returned to the client.
其中,响应于目标弹幕完成播放时的视频播放进度依旧属于查询时间段,在弹幕集合完成播放时根据第二结果值客户端不再发送第二下发请求。Wherein, in response to the video playback progress when the target bullet chatting is finished playing still belongs to the query time period, the client does not send the second sending request according to the second result value when the bullet chatting collection finishes playing.
在步骤S626中,响应于目标弹幕完成播放时的视频播放进度不再属于查询时间段,接收客户端发送的第三下发请求。In step S626, in response to the video playing progress when the target barrage finishes playing no longer belongs to the query time period, a third delivery request sent by the client is received.
其中,客户端完成播放目标弹幕时的视频播放进度属于新的查询时间段,第三下发请求携带新的查询时间段和视频标识。Among them, the video playback progress when the client finishes playing the target barrage belongs to the new query time period, and the third request carries the new query time period and video ID.
在一些实施例中,通过对视频文件的播放时长进行划分得到若干个查询时间段,并从弹幕集合中获取与视频标识以及查询时间段对应的目标弹幕,将目标弹幕返回至客户端,在服务端实现对弹幕集合中各弹幕的分页下发,减少每次下发弹幕的数量,减少对服务端网络带宽的占用,在客户端实现弹幕的分页播放,尽可能多地播放弹幕,减少待播放弹幕对客户端内存的占用,提升弹幕播放的实时性。In some embodiments, several query time periods are obtained by dividing the playback duration of the video file, and the target bullet chat corresponding to the video ID and the query time period is obtained from the bullet chat collection, and the target bullet chat is returned to the client , Realize page-by-page delivery of bullet chatting in the bullet chat collection on the server side, reduce the number of bullet chatting sent each time, reduce the network bandwidth occupation of the server side, and realize page-by-page playback of bullet chatting on the client side, as many as possible Play bullet chatting in a timely manner, reduce the memory usage of the bullet chatting to be played on the client, and improve the real-time performance of bullet chatting.
图7是根据一示例性实施例示出的一种弹幕接收方法的流程图,如图7所示,弹幕接收方法用于图1中的客户端110中,包括以下步骤:Fig. 7 is a flow chart of a bullet chatting receiving method according to an exemplary embodiment. As shown in Fig. 7, the bullet chatting receiving method is used in the client 110 in Fig. 1 and includes the following steps:
在步骤S710中,发送第一下发请求至服务端。In step S710, a first delivery request is sent to the server.
在步骤S720中,接收服务端返回的目标弹幕。In step S720, the target barrage returned by the server is received.
其中,第一下发请求携带有客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段,查询时间段基于对视频文件的播放时长进行划分得到,目标弹幕为服务端从弹幕集合中获取的若干条弹幕,弹幕集合是服务端根据视频标识以及查询时间段,在弹幕数据库中进行查找得到的与视频标识以及查询时间段对应的弹幕所组成的集合,弹幕数据库包括视频标识、查询时间段以及弹幕的对应关系。Among them, the first sending request carries the video ID of the video file being played by the client and the query time period to which the current playback progress belongs. The query time period is obtained by dividing the playing time of the video file. A number of bullet chats obtained from the bullet chat collection. The bullet chat collection is a collection of bullet chats corresponding to the video ID and the query time period obtained by searching the bullet chat database on the server side according to the video ID and the query time period. The barrage database includes the corresponding relationship between video identification, query time period and barrage.
在一些实施例中,客户端播放视频文件,在视频文件具有弹幕的情况下,客户端发送弹幕的第一下发请求至服务端。服务端根据视频标识以及查询时间段在弹幕数据库中进行查找,在视频标识对应的弹幕中,确定查询时间段内的弹幕集合。为了保证弹幕显示的实时性(即实时看到其它用户发布的弹幕),服务端从弹幕集合中获取部分弹幕或者全部弹幕作为目标弹幕。服务端将查询结果返回至客户端,客户端接收查询结果,查询结果包括该查询时间段的目标弹幕。进一步地,客户端可以播放该目标弹幕,则在客户端侧观看视频的当前用户可以实时地看到该查询时间 段的目标弹幕。In some embodiments, the client plays a video file, and if the video file has a bullet chat, the client sends a first delivery request of the bullet chat to the server. The server searches the bullet chat database according to the video identifier and the query time period, and determines the bullet chat set within the query time period in the bullet chat corresponding to the video identifier. In order to ensure the real-time display of bullet chats (that is, to see the bullet chats posted by other users in real time), the server obtains part or all of the bullet chats from the bullet chat collection as the target bullet chat. The server returns the query result to the client, and the client receives the query result, which includes the target barrage in the query time period. Furthermore, the client can play the target barrage, and the current user watching the video on the client side can see the target barrage in the query time period in real time.
上述弹幕接收方法中,通过发送第一下发请求至服务端,并接收服务端返回的目标弹幕,从而客户端可以播放目标弹幕。不仅可以减少待播放弹幕对客户端内存的占用,而且节约了服务端下发弹幕时所占用的带宽资源,还提升弹幕播放的实时性。In the method for receiving a barrage above, the client can play the target barrage by sending the first delivery request to the server and receiving the target barrage returned by the server. It can not only reduce the memory usage of the bullet chat to be played on the client side, but also save the bandwidth resources occupied by the server when sending the bullet chat, and improve the real-time performance of the bullet chat.
在一些实施例中,接收服务端返回的目标弹幕,包括:接收服务端返回的目标弹幕和第一结果值。In some embodiments, receiving the target barrage returned by the server includes: receiving the target barrage and the first result value returned by the server.
其中,在弹幕集合中的弹幕数量大于预设的弹幕返回上限的情况下,目标弹幕为服务端从弹幕集合中获取数量等于弹幕返回上限的若干条弹幕,第一结果值为服务端对翻页字段的赋值,且第一结果值用于表征在弹幕集合中还包含有待下发弹幕,第一结果值还用于指示客户端发送第二下发请求。Among them, when the number of bullet chats in the bullet chat collection is greater than the preset bullet chat return upper limit, the target bullet chat is a number of bullet chats that the server obtains from the bullet chat collection equal to the bullet chat return upper limit, and the first result is The value is the assignment of the page turning field by the server, and the first result value is used to indicate that the bullet chatting set still contains bullet chatting to be delivered, and the first result value is also used to instruct the client to send the second delivery request.
在一些实施例中,弹幕集合的弹幕具有一定的数量,将弹幕集合中的弹幕数量与预设的弹幕返回上限进行比较。弹幕集合中的弹幕数量可以大于预设的弹幕返回上限,弹幕集合中的弹幕数量可以等于预设的弹幕返回上限,弹幕集合中的弹幕数量可以小于预设的弹幕返回上限。在弹幕集合中的弹幕数量大于弹幕返回上限的情况下,说明弹幕集合中的弹幕并不能一次性全部的下发至客户端,需要多次下发弹幕集合中的弹幕,因此需要设置一个翻页字段。利用翻页字段表征在弹幕集合中除返回至客户端的目标弹幕之外是否还有其他弹幕。需要说明的是,翻页字段可以理解为服务端提供给客户端接口返回的一个字段。在弹幕集合中的弹幕数量大于弹幕返回上限的情况下,则服务端将翻页字段赋值为第一结果值。In some embodiments, the bullet chatting set has a certain number, and the number of bullet chatting in the bullet chatting set is compared with the preset bullet chatting return upper limit. The number of bullet chatter in the bullet chat collection can be greater than the preset bullet chat return limit, the bullet chat number in the bullet chat collection can be equal to the preset bullet chat return upper limit, and the bullet chat number in the bullet chat collection can be less than the preset bullet chat screen returns to the upper limit. If the number of bullet chats in the bullet chatting collection is greater than the upper limit of the bullet chatting return, it means that the bullet chatting in the bullet chatting collection cannot be sent to the client all at once, and the bullet chatting in the bullet chatting collection needs to be sent multiple times , so a page-turning field needs to be set. Use the page turning field to indicate whether there are other bullet chats in the bullet chat collection besides the target bullet chat returned to the client. It should be noted that the page turning field can be understood as a field provided by the server and returned by the client interface. If the number of bullet chatting in the bullet chatting collection is greater than the upper limit of bullet chatting returned, the server assigns the page turning field as the first result value.
服务端将目标弹幕和第一结果值返回至客户端,客户端可以接收并播放目标弹幕,由于第一结果值告知客户端在弹幕集合中除返回至客户端的目标弹幕之外还有其他的待下发弹幕,因此客户端根据第一结果值可以向服务端发送第二下发请求以拉取待下发弹幕。The server returns the target bullet chat and the first result value to the client, and the client can receive and play the target bullet chat, because the first result value informs the client that in the bullet chat collection, there are also There are other bullet chats to be delivered, so the client can send a second delivery request to the server according to the first result value to pull the bullet chats to be delivered.
在一些实施例中,通过设置翻页字段,并根据弹幕集合中的弹幕数量与预设的弹幕返回上限的比较结果对翻页字段进行赋值,通过翻页字段的值指示客户端是否向服务端再次发送请求以拉取弹幕,实现弹幕集合中弹幕的翻页播放,尽可能多地播放弹幕,加强与用户之间的互动性。且通过设置弹幕返回上限,减少弹幕对客户端性能产生的影响。In some embodiments, by setting the page turning field and assigning a value to the page turning field according to the comparison result of the number of bullet chatting in the bullet chatting collection and the preset bullet chatting return upper limit, the value of the page turning field indicates whether the client Send the request to the server again to pull the barrage, realize the page-turning playback of the barrage in the barrage collection, play as many barrages as possible, and strengthen the interaction with users. And by setting the upper limit of barrage return, reduce the impact of barrage on client performance.
在一些实施例中,待下发弹幕中的各弹幕具有标识,第一结果值还用于表征已经返回至客户端的目标弹幕的标识。弹幕下发方法还包括:响应于目标弹幕完成播放时的视频播放进度依旧属于查询时间段,向服务端发送第二下发请求,接收服务端返回的新的目标弹幕。In some embodiments, each bullet chat in the bullet chat to be sent has an identifier, and the first result value is also used to represent the identifier of the target bullet chat that has been returned to the client. The bullet chat delivery method further includes: in response to the video playback progress when the target bullet chat is finished playing still belongs to the query time period, sending a second delivery request to the server, and receiving a new target bullet chat returned by the server.
其中,第二下发请求携带有查询时间段、视频标识以及第一结果值,新的目标弹幕是服务端依旧根据视频标识和查询时间段在弹幕数据库中进行查找,得到弹幕集合,根据第一结果值从弹幕集合中筛选,得到待下发弹幕,根据各弹幕的标识依次从待下发弹幕中获取的预设弹幕数量的弹幕。Among them, the second delivery request carries the query time period, video ID and the first result value. The new target bullet chat is that the server still searches the bullet chat database according to the video ID and query time period to obtain the bullet chat collection. According to the first result value, the bullet chatting set is screened to obtain the bullet chatting to be delivered, and a preset number of bullet chatting is obtained from the bullet chatting to be delivered sequentially according to the identification of each bullet chatting.
在一些实施例中,在弹幕集合中的弹幕数量大于弹幕返回上限的情况下,则将翻页字段赋值为第一结果值。服务端将目标弹幕和第一结果值返回至客户端,客户端接收并播放目标弹幕。客户端可以在目标弹幕完成播放的情况下,判断在目标弹幕完成播放时的视频播放进度是否属于查询时间段,响应于客户端完成播放目标弹幕时的视频播放进度依旧属于查询时间段,客户端向服务端发送第二下发请求。第二下发请求携带有第一结果值、查询时间段和视频标识。因此,服务端依旧根据视频标识和查询时间段在弹幕数据库中进行查找,在视频标识对应的弹幕中,确定查询时间段内的弹幕集合。又,第一结果值用于表征已经返回至客户端的目标弹幕的标识,即第一结果值可以告知服务端返回至客户端的目标弹幕是哪些弹幕,因此,服务端根据第一结果值从弹幕集合中筛选,将已经返回至客户端的目标弹幕进行过滤,得到由其他弹幕重新组成的待下发弹幕。待下发弹幕可以理解为在弹幕集合中除返回至客户端的目标弹幕之外的其他弹幕。In some embodiments, when the number of bullet chatting in the bullet chat collection is greater than the upper limit of bullet chatting returns, the page turning field is assigned the first result value. The server returns the target barrage and the first result value to the client, and the client receives and plays the target barrage. The client can judge whether the video playback progress when the target bullet chat is finished playing belongs to the query time period when the target bullet chat is finished playing, and respond to the video playback progress when the client finishes playing the target bullet chat still belongs to the query time period , the client sends a second delivery request to the server. The second sending request carries the first result value, the query time period and the video identifier. Therefore, the server still searches the bullet chat database according to the video identifier and the query time period, and determines the bullet chat set within the query time period in the bullet chat corresponding to the video identifier. In addition, the first result value is used to represent the identity of the target bullet chat that has been returned to the client, that is, the first result value can tell the server which bullet chat is the target bullet chat returned to the client. Therefore, the server uses the first result value to Filter from the bullet chatting collection, filter the target bullet chatting that has been returned to the client, and get the bullet chatting to be sent recomposed from other bullet chatting. Bullet chats to be delivered can be understood as other bullet chats in the bullet chat collection except the target bullet chat returned to the client.
需要说明的是,在待下发弹幕的弹幕数量大于弹幕返回上限的情况下,服务端从待下发弹幕中获取数量等于弹幕返回上限的目标弹幕。在待下发弹幕的弹幕数量小于弹幕返回上限的情况下,服务端将待下发弹幕作为新的目标弹幕。接着,服务端将新的目标弹幕返回至客户端,客户端接收并播放新的目标弹幕。It should be noted that when the number of bullet chats to be sent is greater than the upper limit of bullet chats returned, the server obtains target bullet chats whose number is equal to the upper limit of bullet chats to be sent. When the number of bullet chats to be sent is less than the upper limit of bullet chats returned, the server will use the bullet chats to be sent as the new target bullet chat. Then, the server returns the new target barrage to the client, and the client receives and plays the new target barrage.
在一些实施例中,接收服务端返回的目标弹幕,包括:接收服务端返回的目标弹幕和第二结果值。In some embodiments, receiving the target barrage returned by the server includes: receiving the target barrage and the second result value returned by the server.
其中,在弹幕集合中的弹幕数量不大于预设的弹幕返回上限的情况下,目标弹幕为服务端从弹幕集合中获取的所有弹幕,第二结果值为服务端对翻页字段的赋值,且第二结果值用于表征在弹幕集合中的所有弹幕均已经返回至客户端。Among them, when the number of bullet chats in the bullet chat collection is not greater than the preset bullet chat return upper limit, the target bullet chat is all the bullet chats obtained by the server from the bullet chat collection, and the second result value is the server-side flip The assignment of the page field, and the second result value is used to indicate that all the bullet chatting in the bullet chatting collection have been returned to the client.
在一些实施例中,服务端比较弹幕集合中的弹幕数量与预设的弹幕返回上限,在弹幕集合中 的弹幕数量不大于弹幕返回上限的情况下,说明可以将弹幕集合中各弹幕下发至客户端,从弹幕集合中获取所有弹幕作为目标弹幕。设置翻页字段的值,表征在弹幕集合中除返回至客户端的目标弹幕之外没有其他弹幕,即将翻页字段赋值为第二结果值,以通过第二结果值告知客户端弹幕集合中所有弹幕均已经返回至客户端。因此,服务端向客户端返回目标弹幕和第二结果值,客户端接收到目标弹幕和第二结果值。In some embodiments, the server compares the number of bullet chats in the bullet chat collection with the preset bullet chat return upper limit, and if the bullet chat number in the bullet chat collection is not greater than the bullet chat return upper limit, it means that the bullet chat can be returned Each bullet chat in the set is sent to the client, and all bullet chats are obtained from the bullet chat collection as the target bullet chat. Set the value of the page turning field, indicating that there is no other bullet chatting in the bullet chatting collection except the target bullet chatting returned to the client, that is, assign the page turning field to the second result value, so as to inform the client of the bullet chatting through the second result value All bullet chats in the collection have been returned to the client. Therefore, the server returns the target barrage and the second result value to the client, and the client receives the target barrage and the second result value.
在一些实施例中,在弹幕集合中的弹幕数量不大于弹幕返回上限的情况下,服务端将翻页字段赋值为第二结果值,并将第二结果值返回至客户端。通过第二结果值告知客户端不再向服务端发送第二下发请求,避免在服务端已经将查询时间段内的所有弹幕均下发的情况下客户端依旧向服务端发送下发请求,从而进一步地减少对服务器的带宽资源的占用。In some embodiments, when the number of bullet chatting in the bullet chatting collection is not greater than the bullet chatting return upper limit, the server assigns the page turning field to the second result value, and returns the second result value to the client. Use the second result value to inform the client not to send the second delivery request to the server, so as to avoid the client sending a delivery request to the server when the server has already delivered all bullet chats within the query time period , thereby further reducing the bandwidth resource occupation of the server.
在一些实施例中,响应于弹幕集合完成播放时的视频播放进度依旧属于查询时间段,根据第二结果值不向服务端发送第二下发请求。In some embodiments, in response to the fact that the video playback progress when the bullet chatting collection finishes playing still belongs to the query time period, no second delivery request is sent to the server according to the second result value.
其中,第二结果值用于表征在弹幕集合中除返回至客户端的目标弹幕之外没有待下发弹幕,弹幕集合即为目标弹幕。在一些实施例中,在弹幕集合中的弹幕数量不大于弹幕返回上限的情况下,说明可以将弹幕集合中各弹幕均已经下发至客户端。又,设有翻页字段为第二结果值。服务端将弹幕集合作为目标弹幕,服务端将弹幕集合和第二结果值返回至客户端,客户端接收到弹幕集合和第二结果值。客户端判断弹幕集合完成播放时的视频播放进度是否属于查询时间段,在视频播放进度属于查询时间段的情况下,由于第二结果值表明该查询时间内已经没有待下发弹幕,则在完成播放弹幕集合时根据第二结果值客户端不再向服务端发送第二下发请求。Wherein, the second result value is used to indicate that there is no bullet chatting to be delivered in the bullet chatting set except the target bullet chatting returned to the client, and the bullet chatting set is the target bullet chatting. In some embodiments, in the case that the number of bullet chats in the bullet chat collection is not greater than the upper limit of bullet chat return, it means that each bullet chat in the bullet chat collection can be sent to the client. Also, set the page turning field as the second result value. The server uses the bullet chat collection as the target bullet chat, the server returns the bullet chat collection and the second result value to the client, and the client receives the bullet chat collection and the second result value. The client judges whether the video playback progress when the bullet chat collection finishes playing belongs to the query time period. If the video playback progress belongs to the query time period, since the second result value indicates that there is no bullet chat to be sent within the query time, then After finishing playing the barrage set, the client no longer sends the second sending request to the server according to the second result value.
在一些实施例中,在弹幕集合中的弹幕数量不大于弹幕返回上限的情况下,客户端接收到服务端返回的弹幕集合,响应于弹幕集合完成播放时的视频播放进度依旧属于查询时间段,客户端不再向服务端发送第二下发请求,进一步地减少对服务器的带宽资源的占用,并减少客户端的性能开销,确保客户端运行的流畅性。In some embodiments, when the number of bullet chatting in the bullet chat collection is not greater than the bullet chat return upper limit, the client receives the bullet chat collection returned by the server, and responds that the video playback progress remains the same when the bullet chat collection completes playing. In the query period, the client will no longer send a second delivery request to the server, further reducing the bandwidth resource occupation of the server, reducing the performance overhead of the client, and ensuring the smooth operation of the client.
在一些实施例中,弹幕下发方法还包括:响应于目标弹幕完成播放时的视频播放进度不再属于查询时间段,向服务端发送第三下发请求,第三下发请求携带新的查询时间段。In some embodiments, the bullet chat delivery method further includes: in response to the video playback progress when the target bullet chat is finished playing no longer belongs to the query time period, sending a third delivery request to the server, the third delivery request carrying a new Query time period.
在一些实施例中,客户端接收到目标弹幕并进行播放,在目标弹幕完成播放的情况下,判断目标弹幕完成播放时的视频播放进度是否属于上次查询所使用的查询时间段,在视频播放进度不属于上次查询所使用的查询时间段的情况下,表明该视频播放进度属于新的查询时间段,则客户端可以向服务器拉取与新的查询时间段对应的弹幕。客户端向服务端发送第三下发请求,服务端接收到第三下发请求,第三下发请求携带有视频播放进度所属的新的查询时间段和视频标识。服务端可以根据新的查询时间段和视频标识在弹幕数据库中进行查找,得到新的弹幕集合。新的弹幕集合的弹幕位置位于新的查询时间段内。In some embodiments, the client receives and plays the target bullet chat, and when the target bullet chat is finished playing, it is judged whether the video playback progress when the target bullet chat is finished playing belongs to the query time period used in the last query, If the video playback progress does not belong to the query time period used in the previous query, it indicates that the video playback progress belongs to the new query time period, and the client can pull the barrage corresponding to the new query time period from the server. The client sends a third delivery request to the server, and the server receives the third delivery request, where the third delivery request carries a new query time period and a video identifier to which the video playback progress belongs. The server can search the bullet chat database according to the new query time period and video ID to obtain a new bullet chat collection. The bullet chatting position of the new bullet chat collection is within the new query time period.
在一些实施例中,响应于目标弹幕完成播放时的视频播放进度不再属于查询时间段,则向服务端发送的第三下发请求,确保待用户观看到后续的播放进度的情况下,实时得拉取到其他用户所发布的弹幕。In some embodiments, in response to the video playback progress when the target barrage finishes playing no longer belongs to the query time period, the third delivery request is sent to the server to ensure that when the user watches the subsequent playback progress, Real-time pull to the barrage posted by other users.
在一些实施例中,查询时间段包括查询时间起点时刻和查询时间终点时刻,查询时间终点时刻等于查询时间起点时刻与预设的查询时长阈值之和。In some embodiments, the query time period includes the start time of the query time and the end time of the query time, and the end time of the query time is equal to the sum of the start time of the query time and a preset query duration threshold.
其中,视频文件具有播放时长,对视频文件的播放时长进行划分得到若干个查询时间段,查询时间段与视频文件的播放进度对应。如前文,查询时长阈值可以根据实际情况而设定。在一些实施例中,查询时间段包括查询时间起点时刻和查询时间终点时刻,查询时间起点时刻(positionFromInclude)可以与视频文件中第一时间点上的播放进度对应,作为查询时间段的起点。查询时间终点时刻(positionToInclude)可以与视频文件中第二时间点上的播放进度对应,作为查询时间段的终点,第一时间点早于第二时间点。查询时间终点时刻等于查询时间起点时刻与预设的查询时长阈值之和。Wherein, the video file has a playback duration, and the playback duration of the video file is divided to obtain several query time periods, and the query time period corresponds to the playback progress of the video file. As mentioned above, the query duration threshold can be set according to the actual situation. In some embodiments, the query time period includes the start time of the query time and the end point of the query time, and the start point of the query time (positionFromInclude) may correspond to the playback progress at the first time point in the video file as the starting point of the query time period. The end point of the query time (positionToInclude) may correspond to the playback progress at the second time point in the video file. As the end point of the query time period, the first time point is earlier than the second time point. The end point of the query time is equal to the sum of the start point of the query time and the preset query duration threshold.
在一些实施例中,通过对视频文件的播放时长进行划分得到若干个查询时间段,且查询时间终点时刻等于查询时间起点时刻与预设的查询时长阈值之和,建立查询时间段与视频播放进度的对应关系,实现从服务端拉取弹幕的准确控制,确保弹幕播放的实时性。进一步地,相对于相关技术中的全时段方式,查询时间段内的弹幕数量较少,可以减少弹幕对客户端内存的占用。In some embodiments, several query time periods are obtained by dividing the playback duration of the video file, and the end point of the query time is equal to the sum of the start point of the query time and the preset query duration threshold, and the query time period and video playback progress are established. The corresponding relationship, to achieve accurate control of the bullet chatting from the server, and to ensure the real-time performance of the bullet chatting. Furthermore, compared with the full-time method in the related art, the number of bullet chatting in the query time period is small, which can reduce the memory occupation of the client terminal by bullet chatting.
图8是根据一示例性实施例示出的一种弹幕接收方法的流程图,如图8所示,弹幕接收方法用于图1中的客户端110中,包括以下步骤:S802,发送第一下发请求至服务端;S804,接收服务端返回的目标弹幕和第一结果值;S806,响应于目标弹幕完成播放情况下时的视频播放进度依旧属于查询时间段,根据第一结果值向服务端发送第二下发请求;S808,接收服务端返回的新的目标弹幕;S810,接收服务端返回的目标弹幕和第二结果值。Fig. 8 is a flowchart of a bullet chatting receiving method according to an exemplary embodiment. As shown in Fig. 8, the bullet chatting receiving method is used in the client 110 in Fig. 1, and includes the following steps: S802, sending the first Send a request to the server at once; S804, receive the target barrage and the first result value returned by the server; S806, respond to the video playback progress when the target barrage is finished playing still belongs to the query time period, according to the first result Send a second delivery request to the server; S808, receive the new target barrage returned by the server; S810, receive the target barrage and the second result value returned by the server.
在步骤S802中,发送第一下发请求至服务端。In step S802, a first delivery request is sent to the server.
其中,第一下发请求携带有客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段,查询时间段基于对视频文件的播放时长进行划分得到,弹幕集合是服务端根据视频标识以及查询时间段,在弹幕数据库中进行查找得到的与视频标识以及查询时间段对应的弹幕所组成的集合,弹幕数据库包括视频标识、查询时间段以及弹幕的对应关系。Among them, the first sending request carries the video ID of the video file being played by the client and the query time period to which the current playback progress belongs. The query time period is obtained by dividing the playing time of the video file. The video ID and the query time period are a collection of bullet chats corresponding to the video ID and the query time period obtained by searching in the bullet chat database. The bullet chat database includes the corresponding relationship between the video ID, the query time period, and the bullet chat.
在步骤S804中,接收服务端返回的目标弹幕和第一结果值。In step S804, the target barrage and the first result value returned by the server are received.
其中,在弹幕集合中的弹幕数量大于预设的弹幕返回上限的情况下,目标弹幕为服务端从弹幕集合中获取数量等于弹幕返回上限的若干条弹幕。第一结果值为服务端对翻页字段的赋值,且第一结果值用于表征在弹幕集合中还包含有待下发弹幕;待下发弹幕中的各弹幕具有标识,第一结果值还用于表征已经返回至客户端的目标弹幕的标识。Among them, when the number of bullet chats in the bullet chat collection is greater than the preset bullet chat return upper limit, the target bullet chat is a number of bullet chat messages that the server obtains from the bullet chat collection with a number equal to the bullet chat return upper limit. The first result value is the assignment of the server to the page-turning field, and the first result value is used to indicate that the bullet chatting set still contains bullet chatting to be delivered; each bullet chatting in the bullet chatting to be delivered has an identifier, and the first The result value is also used to represent the identity of the target barrage that has been returned to the client.
在步骤S806中,响应于目标弹幕完成播放时的视频播放进度依旧属于查询时间段,根据第一结果值向服务端发送第二下发请求。In step S806, in response to the video playing progress when the target barrage finishes playing still belongs to the query time period, a second sending request is sent to the server according to the first result value.
其中,第二下发请求携带有查询时间段、视频标识以及第一结果值。Wherein, the second delivery request carries a query time period, a video ID, and a first result value.
在步骤S808中,接收服务端返回的新的目标弹幕。In step S808, a new target barrage returned by the server is received.
其中,所述新的目标弹幕是所述服务端依旧根据所述视频标识和所述查询时间段在所述弹幕数据库中进行查找,得到所述弹幕集合,根据所述第一结果值从所述弹幕集合中筛选,得到所述待下发弹幕,根据各弹幕的标识依次从所述待下发弹幕中获取的预设弹幕数量的弹幕。Wherein, the new target barrage is that the server still searches in the barrage database according to the video identifier and the query time period to obtain the barrage set, and according to the first result value Screening from the set of bullet chats to obtain the bullet chats to be delivered, and sequentially acquiring a preset number of bullet chatters from the bullet chatters to be delivered according to the identifiers of the bullet chatters to be delivered.
在步骤S810中,接收服务端返回的目标弹幕和第二结果值。In step S810, the target barrage and the second result value returned by the server are received.
其中,在弹幕集合中的弹幕数量不大于预设的弹幕返回上限的情况下,目标弹幕为服务端从弹幕集合中获取的所有弹幕,第二结果值为服务端对翻页字段的赋值,且第二结果值用于表征在弹幕集合中的所有弹幕均已经返回至客户端。Among them, when the number of bullet chats in the bullet chat collection is not greater than the preset bullet chat return upper limit, the target bullet chat is all the bullet chats obtained by the server from the bullet chat collection, and the second result value is the server-side flip The assignment of the page field, and the second result value is used to indicate that all the bullet chatting in the bullet chatting collection have been returned to the client.
在步骤S812中,响应于弹幕集合完成播放时的视频播放进度依旧属于查询时间段,根据第二结果值不向服务端发送第二下发请求。In step S812, in response to the fact that the video playback progress when the barrage set is finished playing still belongs to the query time period, no second delivery request is sent to the server according to the second result value.
在步骤S814中,响应于目标弹幕完成播放时的视频播放进度不再属于查询时间段,向服务端发送第三下发请求,第三下发请求携带新的查询时间段。In step S814, in response to the video playing progress when the target barrage finishes playing no longer belongs to the query time period, a third sending request is sent to the server, and the third sending request carries a new query time period.
在一些实施例中,通过对视频文件的播放时长进行划分得到若干个查询时间段,并从弹幕集合中获取与视频标识以及查询时间段对应的目标弹幕,将目标弹幕返回至客户端,在服务端实现对弹幕集合中各弹幕的分页下发,减少每次下发弹幕的数量,减少对服务端网络带宽的占用,在客户端实现弹幕的分页播放,尽可能多地播放弹幕,减少待播放弹幕对客户端内存的占用,提升弹幕播放的实时性。In some embodiments, several query time periods are obtained by dividing the playback duration of the video file, and the target bullet chat corresponding to the video ID and the query time period is obtained from the bullet chat collection, and the target bullet chat is returned to the client , Realize page-by-page delivery of bullet chatting in the bullet chat collection on the server side, reduce the number of bullet chatting sent each time, reduce the network bandwidth occupation of the server side, and realize page-by-page playback of bullet chatting on the client side, as many as possible Play bullet chatting in a timely manner, reduce the memory usage of the bullet chatting to be played on the client, and improve the real-time performance of bullet chatting.
图9是根据一示例性实施例示出的一种弹幕接收方法的时序图,如图9所示,包括以下步骤:S902中,客户端发送第一下发请求至服务端;S904,服务端根据视频标识以及查询时间段在弹幕数据库中进行查找,得到与视频标识以及查询时间段对应的弹幕集合;S906,服务端从弹幕集合中获取目标弹幕;S908,服务端返回客户端查询结果;S910,客户端播放目标弹幕;S912,判断在目标弹幕完成播放情况下的视频播放进度是否属于查询时间段;S914,响应于视频播放进度依旧属于查询时间段,在目标弹幕完成播放时向服务端发送第二下发请求;S916,服务端依旧根据视频标识和查询时间段在弹幕数据库中进行查找,得到弹幕集合;S918,服务端根据第一结果值从弹幕集合中筛选,得到待下发弹幕;S920,服务端从待下发弹幕中获取新的目标弹幕;S922,服务端将新的目标弹幕返回至客户端;S924,客户端播放新的目标弹幕。FIG. 9 is a sequence diagram of a bullet chatting receiving method according to an exemplary embodiment. As shown in FIG. 9 , it includes the following steps: in S902, the client sends the first delivery request to the server; in S904, the server Search in the barrage database according to the video ID and the query time period, and obtain the barrage set corresponding to the video ID and the query time period; S906, the server obtains the target barrage from the barrage set; S908, the server returns to the client Query result; S910, the client plays the target barrage; S912, judges whether the video playback progress belongs to the query time period when the target barrage has been played; When the playback is finished, send a second delivery request to the server; S916, the server still searches the bullet chat database according to the video identifier and the query time period to obtain the bullet chat collection; S918, the server retrieves the bullet chat from the bullet chat according to the first result value Screening in the set to obtain the barrage to be delivered; S920, the server acquires a new target barrage from the barrage to be delivered; S922, the server returns the new target barrage to the client; S924, the client plays the new barrage target barrage.
在步骤S902中,客户端发送第一下发请求至服务端。In step S902, the client sends a first delivery request to the server.
其中,第一下发请求携带有客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段,查询时间段基于对视频文件的播放时长进行划分得到。Wherein, the first sending request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs, and the query time period is obtained by dividing the playing duration of the video file.
在步骤S904中,服务端根据视频标识以及查询时间段在弹幕数据库中进行查找,得到与视频标识以及查询时间段对应的弹幕集合。In step S904, the server searches the bullet chat database according to the video identifier and the query time period, and obtains a bullet chat set corresponding to the video identifier and the query time period.
在步骤S906中,服务端从弹幕集合中获取目标弹幕。In step S906, the server obtains the target bullet chat from the bullet chat collection.
在一些实施例中,比较弹幕集合中的弹幕数量与预设的弹幕返回上限。在弹幕集合中的弹幕数量大于弹幕返回上限的情况下,则将翻页字段赋值为第一结果值。从弹幕集合中,获取数量等于弹幕返回上限的目标弹幕。In some embodiments, the number of bullet chats in the bullet chat collection is compared with a preset bullet chat return upper limit. In the case that the number of bullet chatting in the bullet chat collection is greater than the upper limit of the bullet chatting returned, the page turning field is assigned the first result value. From the bullet chat collection, get the target bullet chat whose number is equal to the upper limit of the bullet chat.
在步骤S908中,服务端返回客户端查询结果。In step S908, the server returns the query result to the client.
其中,查询结果包括目标弹幕和第一结果值。Wherein, the query result includes the target barrage and the first result value.
在步骤S910中,客户端播放目标弹幕。In step S910, the client plays the target barrage.
在步骤S912中,判断在目标弹幕完成播放时的视频播放进度是否属于查询时间段;In step S912, it is judged whether the video playback progress when the target barrage finishes playing belongs to the query time period;
在步骤S914中,响应于视频播放进度依旧属于查询时间段,在目标弹幕完成播放时向服务端发送第二下发请求。In step S914, in response to the fact that the video playback progress still belongs to the query time period, a second delivery request is sent to the server when the target barrage is finished playing.
其中,第二下发请求还携带有查询时间段和视频标识。Wherein, the second sending request also carries a query time period and a video identifier.
在步骤S916中,服务端依旧根据视频标识和查询时间段在弹幕数据库中进行查找,得到弹幕集合。In step S916, the server still searches the bullet chat database according to the video ID and the query time period to obtain the bullet chat collection.
在步骤S918中,服务端根据第一结果值从弹幕集合中筛选,得到待下发弹幕。In step S918, the server screens the bullet chatting set according to the first result value to obtain the bullet chatting to be delivered.
其中,待下发弹幕为在弹幕集合中除返回至客户端的目标弹幕之外的其他弹幕。Wherein, the barrage to be delivered refers to other barrages in the barrage collection except the target barrage returned to the client.
在步骤S920中,服务端从待下发弹幕中获取新的目标弹幕。In step S920, the server acquires a new target bullet chat from the bullet chat to be delivered.
在一些实施例中,根据各弹幕的标识依次从待下发弹幕中获取新的目标弹幕,并将新的目标弹幕返回至客户端。在待下发弹幕中的弹幕数量大于弹幕返回上限的情况下,从待下发弹幕中获取数量等于弹幕返回上限的目标弹幕,并作为新的目标弹幕。在待下发弹幕中的弹幕数量小于弹幕返回上限的情况下,将待下发弹幕作为新的目标弹幕。In some embodiments, new target bullet chats are sequentially obtained from the bullet chats to be sent according to the identifiers of each bullet chat, and the new target bullet chats are returned to the client. When the number of bullet chats in the bullet chats to be delivered is greater than the upper limit of the bullet chats returned, the target bullet chats whose number is equal to the upper limit of the bullet chats to be sent are obtained from the bullet chats to be sent and used as the new target bullet chats. When the number of bullet chats in the bullet chat to be sent is less than the upper limit of the bullet chat, the bullet chat to be sent will be used as the new target bullet chat.
在步骤S922中,服务端将新的目标弹幕返回至客户端。In step S922, the server returns the new target barrage to the client.
在步骤S924中,客户端播放新的目标弹幕。In step S924, the client plays a new target barrage.
在一些实施例中,通过对视频文件的播放时长进行划分得到若干个查询时间段,并从弹幕集合中获取与视频标识以及查询时间段对应的目标弹幕,将目标弹幕返回至客户端,在服务端实现对弹幕集合中各弹幕的分页下发,减少每次下发弹幕的数量,减少对服务端网络带宽的占用,在客户端实现弹幕的分页播放,尽可能多地播放弹幕,减少待播放弹幕对客户端内存的占用,提升弹幕播放的实时性。In some embodiments, several query time periods are obtained by dividing the playback duration of the video file, and the target bullet chat corresponding to the video ID and the query time period is obtained from the bullet chat collection, and the target bullet chat is returned to the client , Realize page-by-page delivery of bullet chatting in the bullet chat collection on the server side, reduce the number of bullet chatting sent each time, reduce the network bandwidth occupation of the server side, and realize page-by-page playback of bullet chatting on the client side, as many as possible Play bullet chatting in a timely manner, reduce the memory usage of the bullet chatting to be played on the client, and improve the real-time performance of bullet chatting.
应该理解的是,虽然上述流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,上述流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the above flow chart are displayed sequentially according to the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowchart above may include multiple steps or stages, these steps or stages are not necessarily executed at the same time, but may be executed at different times, the execution order of these steps or stages It does not necessarily have to be performed sequentially, but can be performed alternately or alternately with other steps or at least a part of steps or stages in other steps.
图10是根据一示例性实施例示出的一种弹幕下发装置框图。参照图10,该查询装置1000包括第一接收模块1002,第一查找模块1004和第一弹幕返回模块1006。Fig. 10 is a block diagram of a barrage delivery device according to an exemplary embodiment. Referring to FIG. 10 , the query device 1000 includes a first receiving module 1002 , a first searching module 1004 and a first barrage returning module 1006 .
第一接收模块1002,被配置为接收客户端发送的第一下发请求,所述第一下发请求携带有所述客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段,所述查询时间段基于对所述视频文件的播放时长进行划分得到;The first receiving module 1002 is configured to receive the first sending request sent by the client, the first sending request carries the video identifier of the video file being played by the client and the query time period to which the current playing progress belongs , the query time period is obtained based on dividing the playback duration of the video file;
第一查找模块1004,被配置为根据所述视频标识以及所述查询时间段,在弹幕数据库中进行查找,得到与所述视频标识以及所述查询时间段对应的弹幕集合,所述弹幕数据库包括视频标识、查询时间段以及弹幕的对应关系;The first search module 1004 is configured to search in the bullet chat database according to the video identifier and the query time period, and obtain a bullet chat set corresponding to the video identifier and the query time period, and the bullet chat The screen database includes the corresponding relationship between video identification, query time period and barrage;
第一弹幕返回模块1006,被配置为从所述弹幕集合中获取目标弹幕,并将所述目标弹幕返回至所述客户端,所述目标弹幕为需要返回至所述客户端的若干条弹幕。The first barrage returning module 1006 is configured to obtain a target barrage from the barrage set, and return the target barrage to the client, and the target barrage is the one that needs to be returned to the client Several barrages.
在一些实施例中,所述第一弹幕返回模块,还被配置为在所述弹幕集合中的弹幕数量大于预设的弹幕返回上限的情况下,从所述弹幕集合中,获取数量等于所述弹幕返回上限的目标弹幕,并将翻页字段赋值为第一结果值,所述第一结果值用于告知所述客户端在所述弹幕集合中还包含有待下发弹幕;将所述目标弹幕和所述第一结果值返回至所述客户端,所述第一结果值还用于指示所述客户端发送第二下发请求。In some embodiments, the first bullet chatting return module is further configured to, when the number of bullet chatting in the bullet chatting collection is greater than the preset bullet chatting return upper limit, from the bullet chatting collection, Acquiring the target bullet chat whose number is equal to the upper limit of the bullet chatter, and assigning the page turning field as the first result value, the first result value is used to inform the client that the bullet chat collection still contains the Sending a barrage; returning the target barrage and the first result value to the client, where the first result value is also used to instruct the client to send a second sending request.
在一些实施例中,所述待下发弹幕中的各弹幕具有标识;响应于所述目标弹幕完成播放时的视频播放进度依旧属于所述查询时间段,所述装置还包括:In some embodiments, each bullet chat in the bullet chat to be sent has an identification; in response to the video playback progress when the target bullet chat is finished playing still belongs to the query time period, the device further includes:
第二接收模块,被配置为接收所述第二下发请求,所述第二下发请求携带有所述查询时间段、所述视频标识以及所述第一结果值,所述第一结果值用于表征已经返回至所述客户端的目标弹幕的标识;The second receiving module is configured to receive the second delivery request, the second delivery request carries the query time period, the video identifier and the first result value, the first result value An identifier used to characterize the target barrage that has been returned to the client;
第二查找模块,被配置为依旧根据所述视频标识和所述查询时间段在所述弹幕数据库中进行查找,得到所述弹幕集合;The second search module is configured to still search in the bullet chat database according to the video identifier and the query time period to obtain the bullet chat collection;
弹幕集合筛选模块,被配置为根据所述第一结果值从所述弹幕集合中筛选,得到所述待下发弹幕;The barrage set screening module is configured to filter from the barrage set according to the first result value to obtain the barrage to be issued;
第二弹幕返回模块,被配置为根据各弹幕的标识依次从所述待下发弹幕中获取新的目标弹幕,并将所述新的目标弹幕返回至所述客户端。The second bullet chatting returning module is configured to sequentially obtain new target bullet chatting from the bullet chatting to be sent according to the identification of each bullet chatting, and return the new target bullet chatting to the client.
在一些实施例中,所述第一弹幕返回模块,还被配置为在所述弹幕集合中的弹幕数量不大于 预设的弹幕返回上限的情况下,从所述弹幕集合中获取所有弹幕作为所述目标弹幕,并将所述翻页字段赋值为第二结果值;将所述弹幕集合和所述第二结果值返回至所述客户端,所述第二结果值用于告知所述客户端所述弹幕集合中所有弹幕均已经返回至所述客户端。In some embodiments, the first bullet chatting return module is further configured to, when the number of bullet chatting in the bullet chatting collection is not greater than the preset bullet chatting return upper limit, select Obtain all bullet chatting as the target bullet chatting, and assign the page turning field as a second result value; return the bullet chatting set and the second result value to the client, and the second result The value is used to inform the client that all bullet chats in the bullet chat collection have been returned to the client.
在一些实施例中,响应于所述弹幕集合完成播放时的视频播放进度依旧属于所述查询时间段,所述第二结果值还用于指示所述客户端不发送第二下发请求。In some embodiments, in response to the video playback progress when the bullet chatting set finishes playing still belongs to the query time period, the second result value is further used to instruct the client not to send the second sending request.
在一些实施例中,所述装置还包括:In some embodiments, the device also includes:
第三接收模块,被配置为响应于所述目标弹幕完成播放时的视频播放进度不再属于所述查询时间段,接收所述客户端发送的第三下发请求,所述第三下发请求携带新的查询时间段。The third receiving module is configured to receive the third sending request sent by the client in response to the video playing progress when the target barrage finishes playing no longer belongs to the query time period, and the third sending request The request carries the new query period.
在一些实施例中,所述查询时间段包括查询时间起点时刻和查询时间终点时刻,所述查询时间终点时刻等于所述查询时间起点时刻与预设的查询时长阈值之和。In some embodiments, the query time period includes a start point of a query time and an end point of a query time, and the end point of a query time is equal to a sum of the start point of a query time and a preset query duration threshold.
图11是根据一示例性实施例示出的一种弹幕接收装置框图。参照图11,该接收装置1100包括第一发送模块1102和第一接收模块1104。Fig. 11 is a block diagram of a barrage receiving device according to an exemplary embodiment. Referring to FIG. 11 , the receiving device 1100 includes a first sending module 1102 and a first receiving module 1104 .
第一发送模块1102,被配置为发送第一下发请求至服务端,所述第一下发请求携带有客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段,所述查询时间段基于对所述视频文件的播放时长进行划分得到;The first sending module 1102 is configured to send a first sending request to the server, the first sending request carries the video identifier of the video file being played by the client and the query time period to which the current playing progress belongs, the The query time period is obtained based on dividing the playing duration of the video file;
第一接收模块1104,被配置为接收所述服务端返回的目标弹幕,所述目标弹幕为所述服务端从弹幕集合中获取的若干条弹幕,所述弹幕集合是所述服务端根据所述视频标识以及所述查询时间段,在弹幕数据库中进行查找得到的与所述视频标识以及所述查询时间段对应的弹幕所组成的集合,所述弹幕数据库包括视频标识、查询时间段以及弹幕的对应关系。The first receiving module 1104 is configured to receive the target barrage returned by the server, the target barrage is several barrages acquired by the server from the barrage set, the barrage set is the According to the video ID and the query time period, the server searches the barrage database to obtain a collection of barrage corresponding to the video ID and the query time period. The barrage database includes video The corresponding relationship between identification, query time period and barrage.
在一些实施例中,所述第一接收模块,还被配置为接收所述服务端返回的目标弹幕和第一结果值;在所述弹幕集合中的弹幕数量大于预设的弹幕返回上限的情况下,所述目标弹幕为所述服务端从所述弹幕集合中获取数量等于所述弹幕返回上限的若干条弹幕,所述第一结果值为所述服务端对翻页字段的赋值,且所述第一结果值用于表征在所述弹幕集合中还包含有待下发弹幕,第一结果值还用于指示所述客户端发送第二下发请求。In some embodiments, the first receiving module is further configured to receive the target barrage and the first result value returned by the server; the number of barrage in the barrage set is greater than the preset barrage In the case of returning the upper limit, the target barrage is a number of barrages obtained by the server from the barrage collection equal to the barrage return upper limit, and the first result value is the server pair The assignment of the page turning field, and the first result value is used to indicate that the bullet chatting set still includes bullet chatting to be delivered, and the first result value is also used to instruct the client to send a second delivery request.
在一些实施例中,所述待下发弹幕中的各弹幕具有标识,所述第一结果值还用于表征已经返回至所述客户端的目标弹幕的标识;所述弹幕接收装置还包括:In some embodiments, each bullet chat in the bullet chat to be sent has an identification, and the first result value is also used to characterize the identification of the target bullet chat that has been returned to the client; the bullet chat receiving device Also includes:
第二发送模块,被配置为响应于所述目标弹幕完成播放时的视频播放进度依旧属于所述查询时间段,向所述服务端发送所述第二下发请求,所述第二下发请求携带有所述查询时间段、所述视频标识以及所述第一结果值;The second sending module is configured to send the second sending request to the server in response to the video playing progress when the target barrage finishes playing still belongs to the query time period, and the second sending request is sent to the server. The request carries the query time period, the video identifier and the first result value;
第二接收模块,被配置为接收所述服务端返回的新的目标弹幕,所述新的目标弹幕是所述服务端依旧根据所述视频标识和所述查询时间段在所述弹幕数据库中进行查找,得到所述弹幕集合,根据所述第一结果值从所述弹幕集合中筛选,得到所述待下发弹幕,根据各弹幕的标识依次从所述待下发弹幕中获取的预设弹幕数量的弹幕。The second receiving module is configured to receive a new target barrage returned by the server, and the new target barrage is that the server is still in the barrage according to the video identification and the query time period Search in the database to obtain the set of bullet chats, filter from the set of bullet chats according to the first result value, obtain the bullet chats to be issued, and sequentially select the bullet chats to be issued according to the identification of each bullet chat The bullet chat with the preset number of bullet chats obtained in the bullet chat.
在一些实施例中,所述第一接收模块,还被配置为接收所述服务端返回的目标弹幕和第二结果值;在所述弹幕集合中的弹幕数量不大于预设的弹幕返回上限的情况下,所述目标弹幕为所述服务端从所述弹幕集合中获取的所有弹幕,所述第二结果值为所述服务端对翻页字段的赋值,且所述第二结果值用于表征在所述弹幕集合中的所有弹幕均已经返回至客户端。In some embodiments, the first receiving module is further configured to receive the target barrage and the second result value returned by the server; the number of barrage in the barrage set is not greater than the preset barrage In the case where the upper limit is returned for the bullet chat, the target bullet chat is all bullet chats obtained by the server from the bullet chat collection, the second result value is the assignment of the page turning field by the server, and the The second result value is used to represent that all bullet chats in the bullet chat collection have been returned to the client.
在一些实施例中,所述弹幕接收装置还包括第三发送模块,被配置为响应于所述弹幕集合完成播放时的视频播放进度依旧属于所述查询时间段,根据所述第二结果值不向所述服务端发送第二下发请求。In some embodiments, the bullet chat receiving device further includes a third sending module, configured to respond to the video playback progress when the bullet chat collection completes playing still belongs to the query time period, according to the second result The value does not send a second delivery request to the server.
在一些实施例中,所述弹幕接收装置还包括第四发送模块,被配置为响应于所述目标弹幕完成播放时的视频播放进度不再属于所述查询时间段,向所述服务端发送第三下发请求,所述第三下发请求携带新的查询时间段。In some embodiments, the bullet chat receiving device further includes a fourth sending module, configured to send a message to the server in response to the video playback progress when the target bullet chat is finished playing no longer belongs to the query time period Sending a third delivery request, where the third delivery request carries a new query time period.
在一些实施例中,所述查询时间段包括查询时间起点时刻和查询时间终点时刻,所述查询时间终点时刻等于所述查询时间起点时刻与预设的查询时长阈值之和。In some embodiments, the query time period includes a start point of a query time and an end point of a query time, and the end point of a query time is equal to a sum of the start point of a query time and a preset query duration threshold.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.
图12是根据一示例性实施例示出的一种用于弹幕接收的设备1200的框图。例如,设备1200可以是移动电话、计算机、数字广播终端、消息收发设备、游戏控制台、平板设备、医疗设备、健身设备、个人数字助理等。Fig. 12 is a block diagram of a device 1200 for receiving bullet chatting according to an exemplary embodiment. For example, the device 1200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
参照图12,设备1200可以包括以下一个或多个组件:处理组件1202、存储器1204、电源组件1206、多媒体组件1208、音频组件1210、输入/输出(I/O)的接口1212、传感器组件1214以 及通信组件1216。12, device 1200 may include one or more of the following components: processing component 1202, memory 1204, power supply component 1206, multimedia component 1208, audio component 1210, input/output (I/O) interface 1212, sensor component 1214 and Communication component 1216.
处理组件1202通常控制设备1200的整体操作,诸如与显示、电话呼叫、数据通信、相机操作和记录操作相关联的操作。处理组件1202可以包括一个或多个处理器1220来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件1202可以包括一个或多个模块,便于处理组件1202和其他组件之间的交互。例如,处理组件1202可以包括多媒体模块,以方便多媒体组件1208和处理组件1202之间的交互。The processing component 1202 generally controls the overall operations of the device 1200, such as those associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 1202 may include one or more processors 1220 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 1202 may include one or more modules that facilitate interaction between processing component 1202 and other components. For example, processing component 1202 may include a multimedia module to facilitate interaction between multimedia component 1208 and processing component 1202 .
存储器1204被配置为存储各种类型的数据以支持在设备1200的操作。这些数据的示例包括用于在设备1200上操作的任何应用程序或方法的指令、联系人数据、电话簿数据、消息、图片、视频等。存储器1204可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM)、电可擦除可编程只读存储器(EEPROM)、可擦除可编程只读存储器(EPROM)、可编程只读存储器(PROM)、只读存储器(ROM)、磁存储器、快闪存储器、磁盘或光盘。The memory 1204 is configured to store various types of data to support operations at the device 1200 . Examples of such data include instructions for any application or method operating on device 1200, contact data, phonebook data, messages, pictures, videos, and the like. The memory 1204 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
电源组件1206为设备1200的各种组件提供电力。电源组件1206可以包括电源管理系统,一个或多个电源,及其他与为设备1200生成、管理和分配电力相关联的组件。The power supply component 1206 provides power to various components of the device 1200 . Power components 1206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for device 1200 .
多媒体组件1208包括在所述设备1200和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。在屏幕包括触摸面板的情况下,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件1208包括一个前置摄像头和/或后置摄像头。在设备1200处于操作模式的情况下,如拍摄模式或视频模式,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 1208 includes a screen that provides an output interface between the device 1200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). In case the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 1208 includes a front camera and/or a rear camera. When the device 1200 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.
音频组件1210被配置为输出和/或输入音频信号。例如,音频组件1210包括一个麦克风(MIC),在设备1200处于操作模式的情况下,如呼叫模式、记录模式和语音识别模式,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器1204或经由通信组件1216发送。在一些实施例中,音频组件1210还包括一个扬声器,用于输出音频信号。The audio component 1210 is configured to output and/or input audio signals. For example, the audio component 1210 includes a microphone (MIC), which is configured to receive an external audio signal when the device 1200 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. Received audio signals may be further stored in memory 1204 or sent via communication component 1216 . In some embodiments, the audio component 1210 also includes a speaker for outputting audio signals.
I/O接口1212为处理组件1202和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 1212 provides an interface between the processing component 1202 and a peripheral interface module, which may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.
传感器组件1214包括一个或多个传感器,用于为设备1200提供各个方面的状态评估。例如,传感器组件1214可以检测到设备1200的打开/关闭状态,组件的相对定位,例如所述组件为设备1200的显示器和小键盘,传感器组件1214还可以检测设备1200或设备1200一个组件的位置改变,用户与设备1200接触的存在或不存在,设备1200方位或加速/减速和设备1200的温度变化。传感器组件1214可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件1214还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件1214还可以包括加速度传感器、陀螺仪传感器、磁传感器、压力传感器或温度传感器。 Sensor assembly 1214 includes one or more sensors for providing status assessments of various aspects of device 1200 . For example, the sensor component 1214 can detect the open/closed state of the device 1200, the relative positioning of components, such as the display and the keypad of the device 1200, and the sensor component 1214 can also detect a change in the position of the device 1200 or a component of the device 1200 , the presence or absence of user contact with the device 1200 , the device 1200 orientation or acceleration/deceleration and the temperature change of the device 1200 . Sensor assembly 1214 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 1214 may also include optical sensors, such as CMOS or CCD image sensors, for use in imaging applications. In some embodiments, the sensor component 1214 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
通信组件1216被配置为便于设备1200和其他设备之间有线或无线方式的通信。设备1200可以接入基于通信标准的无线网络,如WiFi,运营商网络(如2G、3G、4G或5G),或它们的组合。在一些实施例中,通信组件1216经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一些实施例中,所述通信组件1216还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。 Communication component 1216 is configured to facilitate wired or wireless communications between device 1200 and other devices. The device 1200 can access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G or 5G), or a combination thereof. In some embodiments, the communication component 1216 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In some embodiments, the communication component 1216 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.
在一些实施例中,设备1200可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In some embodiments, device 1200 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gates Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic implementations for performing the methods described above.
在一些实施例中,还提供了一种包括指令的非易失性计算机可读存储介质,例如包括指令的存储器1204,上述指令可由设备1200的处理器1220执行以完成上述方法。例如,计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In some embodiments, there is also provided a non-volatile computer-readable storage medium including instructions, such as the memory 1204 including instructions, which can be executed by the processor 1220 of the device 1200 to complete the above method. For example, the computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, among others.
在一些实施例中,还提供一种计算机程序产品,包括所述计算机程序被处理器执行时实现上述的弹幕接收方法。In some embodiments, a computer program product is also provided, including implementing the above method for receiving bullet chatting when the computer program is executed by a processor.
图13是根据一示例性实施例示出的一种用于弹幕下发的设备1300的框图。例如,设备1300可以为一服务器。参照图13,设备1300包括处理组件1320,其进一步包括一个或多个处理器, 以及由存储器1322所代表的存储器资源,用于存储可由处理组件1320的执行的指令,例如应用程序。存储器1322中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1320被配置为执行指令,以执行上述弹幕下发的方法。Fig. 13 is a block diagram of a device 1300 for delivering bullet chatting according to an exemplary embodiment. For example, device 1300 may be a server. Referring to FIG. 13 , device 1300 includes processing component 1320 , which further includes one or more processors, and a memory resource represented by memory 1322 for storing instructions executable by processing component 1320 , such as application programs. The application programs stored in memory 1322 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 1320 is configured to execute instructions to execute the above-mentioned method for delivering bullet chatting.
设备1300还可以包括一个电源组件1324被配置为执行设备1300的电源管理,一个有线或无线网络接口1326被配置为将设备1300连接到网络,和一个输入输出(I/O)接口1328。设备1300可以操作基于存储在存储器1322的操作系统,例如Windows Server,Mac OS X,Unix,Linux,FreeBSD或类似。 Device 1300 may also include a power component 1324 configured to perform power management of device 1300 , a wired or wireless network interface 1326 configured to connect device 1300 to a network, and an input-output (I/O) interface 1328 . Device 1300 may operate based on an operating system stored in memory 1322, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD or the like.
在一些实施例中,还提供了一种包括指令的非易失性计算机可读存储介质,例如包括指令的存储器1322,上述指令可由设备1300的处理器执行以完成上述弹幕下发方法。存储介质可以是计算机可读存储介质,例如,所述计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In some embodiments, there is also provided a non-volatile computer-readable storage medium including instructions, such as the memory 1322 including instructions, the instructions can be executed by the processor of the device 1300 to complete the above-mentioned bullet chatting delivery method. The storage medium may be a computer readable storage medium such as ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, for example.
在一些实施例中,还提供一种计算机程序产品,包括所述计算机程序被处理器执行时实现上述的弹幕下发方法。In some embodiments, a computer program product is also provided, including implementing the above-mentioned method for delivering bullet chatting when the computer program is executed by a processor.
本公开所有实施例均可以单独被执行,也可以与其他实施例相结合被执行,均视为本公开要求的保护范围。All the embodiments of the present disclosure can be implemented independently or in combination with other embodiments, which are all regarded as the scope of protection required by the present disclosure.

Claims (31)

  1. 一种弹幕下发方法,包括:A method for distributing barrage, comprising:
    接收客户端发送的第一下发请求,所述第一下发请求携带有所述客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段,所述查询时间段基于对所述视频文件的播放时长进行划分得到;Receive the first delivery request sent by the client, the first delivery request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs, and the query time period is based on the The playback duration of the video file is divided to obtain;
    根据所述视频标识以及所述查询时间段,在弹幕数据库中进行查找,得到与所述视频标识以及所述查询时间段对应的弹幕集合,所述弹幕数据库包括视频标识、查询时间段以及弹幕的对应关系;According to the video identification and the query time period, search in the bullet chat database to obtain the bullet chat collection corresponding to the video identification and the query time period, and the bullet chat database includes video identification, query time period And the corresponding relationship of barrage;
    从所述弹幕集合中获取目标弹幕,并将所述目标弹幕返回至所述客户端,所述目标弹幕为需要返回至所述客户端的若干条弹幕。Acquiring target bullet chatting from the bullet chatting set, and returning the target bullet chatting to the client, where the target bullet chatting is several bullet chatting pieces that need to be returned to the client terminal.
  2. 根据权利要求1所述的弹幕下发方法,其中,所述从所述弹幕集合中获取目标弹幕,并将所述目标弹幕返回至所述客户端,包括:The bullet chatting delivery method according to claim 1, wherein said acquiring the target bullet chat from the bullet chat collection and returning the target bullet chat to the client comprises:
    在所述弹幕集合中的弹幕数量大于预设的弹幕返回上限的情况下,从所述弹幕集合中,获取数量等于所述弹幕返回上限的目标弹幕,并将翻页字段赋值为第一结果值,所述第一结果值用于告知所述客户端在所述弹幕集合中还包含有待下发弹幕;In the case that the number of bullet chats in the bullet chat collection is greater than the preset bullet chat return upper limit, from the bullet chat collection, obtain the target bullet chat with a quantity equal to the bullet chat return upper limit, and turn the page field The first result value is assigned as the first result value, and the first result value is used to inform the client that the bullet chatting set still includes bullet chatting to be delivered;
    将所述目标弹幕和所述第一结果值返回至所述客户端,所述第一结果值还用于指示所述客户端发送第二下发请求。Returning the target barrage and the first result value to the client, where the first result value is also used to instruct the client to send a second delivery request.
  3. 根据权利要求2所述的弹幕下发方法,其中,所述待下发弹幕中的各弹幕具有标识;所述方法还包括:The method for issuing bullet chatting according to claim 2, wherein each bullet chatting in the bullet chatting to be issued has an identification; the method further comprises:
    响应于所述目标弹幕完成播放时的视频播放进度依旧属于所述查询时间段,接收所述第二下发请求,所述第二下发请求携带有所述查询时间段、所述视频标识以及所述第一结果值,所述第一结果值用于表征已经返回至所述客户端的目标弹幕的标识;Responding to the fact that the video playback progress when the target barrage finishes playing still belongs to the query time period, the second sending request is received, and the second sending request carries the query time period, the video identification And the first result value, the first result value is used to characterize the identification of the target barrage that has been returned to the client;
    依旧根据所述视频标识和所述查询时间段在所述弹幕数据库中进行查找,得到所述弹幕集合;Still searching in the bullet chat database according to the video identification and the query time period, to obtain the bullet chat collection;
    根据所述第一结果值从所述弹幕集合中筛选,得到所述待下发弹幕;Screening from the bullet chatting set according to the first result value to obtain the bullet chatting to be delivered;
    根据各弹幕的标识依次从所述待下发弹幕中获取新的目标弹幕,并将所述新的目标弹幕返回至所述客户端。Obtain new target bullet chatters from the bullet chatters to be delivered in sequence according to the identifiers of the bullet chatters, and return the new target bullet chatters to the client.
  4. 根据权利要求1所述的弹幕下发方法,其中,所述从所述弹幕集合中获取目标弹幕,并将所述目标弹幕返回至所述客户端,包括:The bullet chatting delivery method according to claim 1, wherein said acquiring the target bullet chat from the bullet chat collection and returning the target bullet chat to the client comprises:
    在所述弹幕集合中的弹幕数量不大于预设的弹幕返回上限的情况下,从所述弹幕集合中获取所有弹幕作为所述目标弹幕,并将所述翻页字段赋值为第二结果值;In the case that the number of bullet chats in the bullet chatting set is not greater than the preset bullet chatting return upper limit, obtain all bullet chatting from the bullet chatting collection as the target bullet chatting, and assign a value to the page turning field is the second result value;
    将所述弹幕集合和所述第二结果值返回至所述客户端,所述第二结果值用于告知所述客户端所述弹幕集合中所有弹幕均已经返回至所述客户端。Returning the bullet chatting set and the second result value to the client, the second result value is used to inform the client that all the bullet chatting in the bullet chatting collection has been returned to the client .
  5. 根据权利要求4所述的弹幕下发方法,其中,响应于所述弹幕集合完成播放时的视频播放进度依旧属于所述查询时间段,所述第二结果值还用于指示所述客户端不发送第二下发请求。The bullet chat delivery method according to claim 4, wherein, in response to the video playback progress when the bullet chat collection finishes playing still belongs to the query time period, the second result value is also used to indicate to the client The second delivery request is not sent.
  6. 根据权利要求1所述的弹幕下发方法,还包括:The barrage sending method according to claim 1, further comprising:
    响应于所述目标弹幕完成播放时的视频播放进度不再属于所述查询时间段,接收所述客户端发送的第三下发请求,所述第三下发请求携带新的查询时间段。In response to the video playing progress when the target barrage finishes playing no longer belongs to the query time period, a third sending request sent by the client is received, and the third sending request carries a new query time period.
  7. 根据权利要求1至6任一项所述的弹幕下发方法,其中,所述查询时间段包括查询时间起点时刻和查询时间终点时刻,所述查询时间终点时刻等于所述查询时间起点时刻与预设的查询时长阈值之和。The bullet chatting method according to any one of claims 1 to 6, wherein the query time period includes the start time of the query time and the end time of the query time, and the end point of the query time is equal to the start time of the query time and the predetermined time. The sum of the set query duration thresholds.
  8. 一种弹幕接收方法,包括:A barrage receiving method, comprising:
    发送第一下发请求至服务端,所述第一下发请求携带有客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段,所述查询时间段基于对所述视频文件的播放时长进行划分得到;Send a first delivery request to the server, the first delivery request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs, and the query time period is based on the video file is obtained by dividing the playing time;
    接收所述服务端返回的目标弹幕,所述目标弹幕为所述服务端从弹幕集合中获取的若干条弹幕,所述弹幕集合是所述服务端根据所述视频标识以及所述查询时间段,在弹幕数据库中进行查找得到的与所述视频标识以及所述查询时间段对应的弹幕所组成的集合,所述弹幕数据库包括视频标识、查询时间段以及弹幕的对应关系。Receiving the target barrage returned by the server, the target barrage is several barrages obtained by the server from the barrage collection, the barrage set is the server according to the video ID and the barrage The query time period, a collection of bullet chats corresponding to the video identifier and the query time period obtained by searching in the bullet chat database, the bullet chat database includes video identifiers, query time periods, and bullet chat information Correspondence.
  9. 根据权利要求8所述的弹幕接收方法,其中,所述接收所述服务端返回的目标弹幕,包括:The method for receiving bullet chatting according to claim 8, wherein said receiving the target bullet chatting returned by the server comprises:
    接收所述服务端返回的目标弹幕和第一结果值;在所述弹幕集合中的弹幕数量大于预设的弹幕返回上限的情况下,所述目标弹幕为所述服务端从所述弹幕集合中获取数量等于所述弹幕返回上限的若干条弹幕,所述第一结果值为所述服务端对翻页字段的赋值,且所述第一结果值用于表 征在所述弹幕集合中还包含有待下发弹幕,第一结果值还用于指示所述客户端发送第二下发请求。Receive the target barrage and the first result value returned by the server; when the number of barrage in the barrage collection is greater than the preset barrage return upper limit, the target barrage is the A number of barrages whose number is equal to the upper limit of the barrage return is obtained from the barrage collection, the first result value is the assignment of the page turning field by the server, and the first result value is used to represent the The bullet chatting set also includes bullet chatting to be delivered, and the first result value is also used to instruct the client to send a second delivery request.
  10. 根据权利要求9所述的弹幕接收方法,其中,所述待下发弹幕中的各弹幕具有标识,所述第一结果值还用于表征已经返回至所述客户端的目标弹幕的标识;所述方法还包括:The bullet chatting receiving method according to claim 9, wherein each bullet chatting in the bullet chatting to be issued has an identification, and the first result value is also used to characterize the target bullet chatting that has been returned to the client identification; the method also includes:
    响应于所述目标弹幕完成播放时的视频播放进度依旧属于所述查询时间段,根据所述第一结果值向所述服务端发送所述第二下发请求,所述第二下发请求携带有所述查询时间段、所述视频标识以及所述第一结果值;Responding to the fact that the video playback progress when the target barrage finishes playing still belongs to the query time period, the second delivery request is sent to the server according to the first result value, and the second delivery request carry the query time period, the video identifier and the first result value;
    接收所述服务端返回的新的目标弹幕,所述新的目标弹幕是所述服务端依旧根据所述视频标识和所述查询时间段在所述弹幕数据库中进行查找,得到所述弹幕集合,根据所述第一结果值从所述弹幕集合中筛选,得到所述待下发弹幕,根据各弹幕的标识依次从所述待下发弹幕中获取的预设弹幕数量的弹幕。Receiving the new target barrage returned by the server, the new target barrage is that the server still searches in the barrage database according to the video identification and the query time period, and obtains the The bullet chatting set, which is screened from the bullet chatting set according to the first result value to obtain the bullet chatting to be issued, and the preset bullet chatting obtained from the bullet chatting to be issued in sequence according to the identification of each bullet chatting The barrage of the number of screens.
  11. 根据权利要求8所述的弹幕接收方法,其中,所述接收所述服务端返回的目标弹幕,包括:The method for receiving bullet chatting according to claim 8, wherein said receiving the target bullet chatting returned by the server comprises:
    接收所述服务端返回的目标弹幕和第二结果值;在所述弹幕集合中的弹幕数量不大于预设的弹幕返回上限的情况下,所述目标弹幕为所述服务端从所述弹幕集合中获取的所有弹幕,所述第二结果值为所述服务端对翻页字段的赋值,且所述第二结果值用于表征在所述弹幕集合中的所有弹幕均已经返回至客户端。Receive the target barrage and the second result value returned by the server; when the number of barrages in the barrage collection is not greater than the preset barrage return upper limit, the target barrage is the server For all bullet chatting obtained from the bullet chatting collection, the second result value is the assignment of the server to the page turning field, and the second result value is used to represent all the bullet chatting in the bullet chatting collection The barrage has been returned to the client.
  12. 根据权利要求11所述的弹幕接收方法,还包括:The barrage receiving method according to claim 11, further comprising:
    响应于所述弹幕集合完成播放时的视频播放进度依旧属于所述查询时间段,根据所述第二结果值不向所述服务端发送第二下发请求。In response to the fact that the video playback progress when the barrage collection finishes playing still belongs to the query time period, no second delivery request is sent to the server according to the second result value.
  13. 根据权利要求8所述的弹幕接收方法,还包括:The barrage receiving method according to claim 8, further comprising:
    响应于所述目标弹幕完成播放时的视频播放进度不再属于所述查询时间段,向所述服务端发送第三下发请求,所述第三下发请求携带新的查询时间段。In response to the video playing progress when the target barrage finishes playing no longer belongs to the query time period, a third sending request is sent to the server, and the third sending request carries a new query time period.
  14. 根据权利要求8至13任一项所述的弹幕接收方法,其中,所述查询时间段包括查询时间起点时刻和查询时间终点时刻,所述查询时间终点时刻等于所述查询时间起点时刻与预设的查询时长阈值之和。The bullet chatting receiving method according to any one of claims 8 to 13, wherein the query time period includes a query time start time and a query time end time, and the query time end time is equal to the query time start time and a predetermined The sum of the set query duration thresholds.
  15. 一种弹幕下发装置,包括:A barrage delivery device, comprising:
    第一接收模块,被配置为接收客户端发送的第一下发请求,所述第一下发请求携带有所述客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段,所述查询时间段基于对所述视频文件的播放时长进行划分得到;The first receiving module is configured to receive the first sending request sent by the client, the first sending request carries the video identifier of the video file being played by the client and the query time period to which the current playing progress belongs, The query time period is obtained based on dividing the playing duration of the video file;
    第一查找模块,被配置为根据所述视频标识以及所述查询时间段,在弹幕数据库中进行查找,得到与所述视频标识以及所述查询时间段对应的弹幕集合,所述弹幕数据库包括视频标识、查询时间段以及弹幕的对应关系;The first search module is configured to search in the bullet chatting database according to the video identification and the query time period, and obtain a bullet chatting set corresponding to the video identification and the query time period, and the bullet chatting The database includes the corresponding relationship between video identification, query time period and barrage;
    第一弹幕返回模块,被配置为从所述弹幕集合中获取目标弹幕,并将所述目标弹幕返回至所述客户端,所述目标弹幕为需要返回至所述客户端的若干条弹幕。The first barrage returning module is configured to obtain target barrage from the barrage set, and return the target barrage to the client, the target barrage is a number of barrage that needs to be returned to the client Barrage.
  16. 根据权利要求15所述的弹幕下发装置,其中,所述第一弹幕返回模块,还被配置为在所述弹幕集合中的弹幕数量大于预设的弹幕返回上限的情况下,从所述弹幕集合中,获取数量等于所述弹幕返回上限的目标弹幕,并将翻页字段赋值为第一结果值,所述第一结果值用于告知所述客户端在所述弹幕集合中还包含有待下发弹幕;将所述目标弹幕和所述第一结果值返回至所述客户端,所述第一结果值还用于指示所述客户端发送第二下发请求。The device for issuing bullet chatting according to claim 15, wherein the first bullet chatting return module is further configured to: when the number of bullet chatting in the bullet chatting set is greater than the preset bullet chatting return upper limit, From the bullet chat collection, obtain the target bullet chat whose number is equal to the upper limit of the bullet chat, and assign the page turning field as the first result value, and the first result value is used to inform the client that in the The bullet chatting set also includes bullet chatting to be sent; the target bullet chatting and the first result value are returned to the client, and the first result value is also used to instruct the client to send a second download Send a request.
  17. 根据权利要求16所述的弹幕下发装置,其中,所述待下发弹幕中的各弹幕具有标识;响应于所述目标弹幕完成播放时的视频播放进度依旧属于所述查询时间段,所述装置还包括:The bullet chatting delivery device according to claim 16, wherein each bullet chatting in the bullet chatting to be delivered has an identification; in response to the completion of playback of the target bullet chatting, the video playback progress still belongs to the query time period , the device also includes:
    第二接收模块,被配置为接收所述第二下发请求,所述第二下发请求携带有所述查询时间段、所述视频标识以及所述第一结果值,所述第一结果值用于表征已经返回至所述客户端的目标弹幕的标识;The second receiving module is configured to receive the second delivery request, the second delivery request carries the query time period, the video identifier and the first result value, the first result value An identifier used to characterize the target barrage that has been returned to the client;
    第二查找模块,被配置为依旧根据所述视频标识和所述查询时间段在所述弹幕数据库中进行查找,得到所述弹幕集合;The second search module is configured to still search in the bullet chat database according to the video identifier and the query time period to obtain the bullet chat collection;
    弹幕集合筛选模块,被配置为根据所述第一结果值从所述弹幕集合中筛选,得到所述待下发弹幕;The barrage set screening module is configured to filter from the barrage set according to the first result value to obtain the barrage to be issued;
    第二弹幕返回模块,被配置为根据各弹幕的标识依次从所述待下发弹幕中获取新的目标弹幕,并将所述新的目标弹幕返回至所述客户端。The second bullet chatting returning module is configured to sequentially obtain new target bullet chatting from the bullet chatting to be sent according to the identification of each bullet chatting, and return the new target bullet chatting to the client.
  18. 根据权利要求15所述的弹幕下发装置,其中,所述第一弹幕返回模块,还被配置为在所述弹幕集合中的弹幕数量不大于预设的弹幕返回上限的情况下,从所述弹幕集合中获取所有弹幕作为所述目标弹幕,并将所述翻页字段赋值为第二结果值;将所述弹幕集合和所述第二结果值返 回至所述客户端,所述第二结果值用于告知所述客户端所述弹幕集合中所有弹幕均已经返回至所述客户端。The device for issuing bullet chatting according to claim 15, wherein, the first bullet chatting return module is further configured to, when the number of bullet chatting in the bullet chatting set is not greater than the preset bullet chatting return upper limit , obtain all bullet chatting from the bullet chat collection as the target bullet chat, and assign the page turning field as the second result value; return the bullet chat collection and the second result value to the For the client, the second result value is used to inform the client that all bullet chats in the bullet chat collection have been returned to the client.
  19. 根据权利要求18所述的弹幕下发装置,其中,响应于所述弹幕集合完成播放时的视频播放进度依旧属于所述查询时间段,所述第二结果值还用于指示所述客户端不发送第二下发请求。The device for sending bullet chatting according to claim 18, wherein, in response to the video playback progress when the bullet chat collection finishes playing still belongs to the query time period, the second result value is also used to indicate to the client The second delivery request is not sent.
  20. 根据权利要求15所述的弹幕下发装置,还包括:The barrage sending device according to claim 15, further comprising:
    第三接收模块,被配置为响应于所述目标弹幕完成播放时的视频播放进度不再属于所述查询时间段,接收所述客户端发送的第三下发请求,所述第三下发请求携带新的查询时间段。The third receiving module is configured to receive the third sending request sent by the client in response to the video playing progress when the target barrage finishes playing no longer belongs to the query time period, and the third sending request The request carries the new query period.
  21. 根据权利要求15至20任一项所述的弹幕下发装置,其中,所述查询时间段包括查询时间起点时刻和查询时间终点时刻,所述查询时间终点时刻等于所述查询时间起点时刻与预设的查询时长阈值之和。The barrage delivery device according to any one of claims 15 to 20, wherein the query time period includes the start time of the query time and the end time of the query time, and the end point of the query time is equal to the start time of the query time and the predetermined time. The sum of the set query duration thresholds.
  22. 一种弹幕接收装置,包括:A barrage receiving device, comprising:
    第一发送模块,被配置为发送第一下发请求至服务端,所述第一下发请求携带有客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段,所述查询时间段基于对所述视频文件的播放时长进行划分得到;The first sending module is configured to send a first sending request to the server, the first sending request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs, and the query The time period is obtained based on dividing the playing duration of the video file;
    第一接收模块,被配置为接收所述服务端返回的目标弹幕,所述目标弹幕为所述服务端从弹幕集合中获取的若干条弹幕,所述弹幕集合是所述服务端根据所述视频标识以及所述查询时间段,在弹幕数据库中进行查找得到的与所述视频标识以及所述查询时间段对应的弹幕所组成的集合,所述弹幕数据库包括视频标识、查询时间段以及弹幕的对应关系。The first receiving module is configured to receive the target barrage returned by the server, the target barrage is several barrages obtained by the server from the barrage collection, the barrage set is the service According to the video identification and the query time period, the terminal searches in the bullet chatting database to obtain a collection of bullet chatting corresponding to the video identification and the query time period, and the bullet chatting database includes the video identification , Query the corresponding relationship between the time period and the barrage.
  23. 根据权利要求22所述的弹幕接收装置,其中,所述第一接收模块,还被配置为接收所述服务端返回的目标弹幕和第一结果值;在所述弹幕集合中的弹幕数量大于预设的弹幕返回上限的情况下,所述目标弹幕为所述服务端从所述弹幕集合中获取数量等于所述弹幕返回上限的若干条弹幕,所述第一结果值为所述服务端对翻页字段的赋值,且所述第一结果值用于表征在所述弹幕集合中还包含有待下发弹幕,第一结果值还用于指示所述客户端发送第二下发请求。The bullet chatting receiving device according to claim 22, wherein the first receiving module is further configured to receive the target bullet chatting and the first result value returned by the server; the bullet chatting in the bullet chatting set When the number of bullet chatting is greater than the preset upper limit of bullet chatting, the target bullet chatting is a number of bullet chatting that the server obtains from the bullet chatting set equal to the upper limit of bullet chatting return, and the first The result value is the assignment of the server to the page-turning field, and the first result value is used to indicate that the bullet chatting set still contains bullet chatting to be delivered, and the first result value is also used to indicate to the client The end sends a second delivery request.
  24. 根据权利要求23所述的弹幕接收装置,其中,所述待下发弹幕中的各弹幕具有标识,所述第一结果值还用于表征已经返回至所述客户端的目标弹幕的标识;所述弹幕接收装置还包括:The bullet chatting receiving device according to claim 23, wherein each bullet chatting in the bullet chatting to be sent has an identification, and the first result value is also used to characterize the target bullet chatting that has been returned to the client Identification; the barrage receiving device also includes:
    第二发送模块,被配置为响应于所述目标弹幕完成播放时的视频播放进度依旧属于所述查询时间段,向所述服务端发送所述第二下发请求,所述第二下发请求携带有所述查询时间段、所述视频标识以及所述第一结果值;The second sending module is configured to send the second sending request to the server in response to the video playing progress when the target barrage finishes playing still belongs to the query time period, and the second sending request is sent to the server. The request carries the query time period, the video identifier and the first result value;
    第二接收模块,被配置为接收所述服务端返回的新的目标弹幕,所述新的目标弹幕是所述服务端依旧根据所述视频标识和所述查询时间段在所述弹幕数据库中进行查找,得到所述弹幕集合,根据所述第一结果值从所述弹幕集合中筛选,得到所述待下发弹幕,根据各弹幕的标识依次从所述待下发弹幕中获取的预设弹幕数量的弹幕。The second receiving module is configured to receive a new target barrage returned by the server, and the new target barrage is that the server is still in the barrage according to the video identification and the query time period Search in the database to obtain the set of bullet chats, filter from the set of bullet chats according to the first result value, obtain the bullet chats to be issued, and sequentially select the bullet chats to be issued according to the identification of each bullet chat The bullet chat with the preset number of bullet chats obtained in the bullet chat.
  25. 根据权利要求22所述的弹幕接收装置,其中,所述第一接收模块,还被配置为接收所述服务端返回的目标弹幕和第二结果值;在所述弹幕集合中的弹幕数量不大于预设的弹幕返回上限的情况下,所述目标弹幕为所述服务端从所述弹幕集合中获取的所有弹幕,所述第二结果值为所述服务端对翻页字段的赋值,且所述第二结果值用于表征在所述弹幕集合中的所有弹幕均已经返回至客户端。The bullet chatting receiving device according to claim 22, wherein the first receiving module is further configured to receive the target bullet chatting and the second result value returned by the server; the bullet chatting in the bullet chatting set When the number of bullet chatting is not greater than the preset bullet chatting return upper limit, the target bullet chatting is all bullet chatting obtained by the server from the bullet chatting collection, and the second result value is the pair of bullet chatting by the server The assignment of the page turning field, and the second result value is used to indicate that all the bullet chatting in the bullet chatting set have been returned to the client.
  26. 根据权利要求25所述的弹幕接收装置,其中,所述弹幕接收装置还包括第三发送模块,被配置为响应于所述弹幕集合完成播放时的视频播放进度依旧属于所述查询时间段,根据所述第二结果值不向所述服务端发送第二下发请求。The bullet chatting receiving device according to claim 25, wherein the bullet chatting receiving device further comprises a third sending module, configured to respond to the video playback progress when the bullet chatting collection finishes playing still belongs to the query time segment, not sending a second delivery request to the server according to the second result value.
  27. 根据权利要求23所述的弹幕接收装置,其中,所述弹幕接收装置还包括第四发送模块,被配置为响应于所述目标弹幕完成播放时的视频播放进度不再属于所述查询时间段,向所述服务端发送第三下发请求,所述第三下发请求携带新的查询时间段。The bullet chatting receiving device according to claim 23, wherein the bullet chatting receiving device further comprises a fourth sending module configured to respond to the video playback progress when the target bullet chatting is finished playing no longer belongs to the query time period, sending a third delivery request to the server, where the third delivery request carries a new query time period.
  28. 根据权利要求22至27任一项所述的弹幕接收装置,其中,所述查询时间段包括查询时间起点时刻和查询时间终点时刻,所述查询时间终点时刻等于所述查询时间起点时刻与预设的查询时长阈值之和。The bullet chatting receiving device according to any one of claims 22 to 27, wherein the query time period includes the start time of the query time and the end time of the query time, and the end point of the query time is equal to the start time of the query time and the predetermined time. The sum of the set query duration thresholds.
  29. 一种电子设备,包括:An electronic device comprising:
    处理器;processor;
    用于存储所述处理器可执行指令的存储器;memory for storing said processor-executable instructions;
    其中,所述处理器被配置为执行所述指令,以实现以下步骤:Wherein, the processor is configured to execute the instructions to achieve the following steps:
    接收客户端发送的第一下发请求,所述第一下发请求携带有所述客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段,所述查询时间段基于对所述视频文件的播放时 长进行划分得到;Receive the first delivery request sent by the client, the first delivery request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs, and the query time period is based on the The playback duration of the video file is divided to obtain;
    根据所述视频标识以及所述查询时间段,在弹幕数据库中进行查找,得到与所述视频标识以及所述查询时间段对应的弹幕集合,所述弹幕数据库包括视频标识、查询时间段以及弹幕的对应关系;According to the video identification and the query time period, search in the bullet chat database to obtain the bullet chat collection corresponding to the video identification and the query time period, and the bullet chat database includes video identification, query time period And the corresponding relationship of barrage;
    从所述弹幕集合中获取目标弹幕,并将所述目标弹幕返回至所述客户端,所述目标弹幕为需要返回至所述客户端的若干条弹幕;或者Obtain a target bullet chat from the bullet chat collection, and return the target bullet chat to the client, where the target bullet chat is several bullet chat that need to be returned to the client; or
    实现以下步骤:Implement the following steps:
    发送第一下发请求至服务端,所述第一下发请求携带有客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段,所述查询时间段基于对所述视频文件的播放时长进行划分得到;Send a first delivery request to the server, the first delivery request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs, and the query time period is based on the video file is obtained by dividing the playing time;
    接收所述服务端返回的目标弹幕,所述目标弹幕为所述服务端从弹幕集合中获取的若干条弹幕,所述弹幕集合是所述服务端根据所述视频标识以及所述查询时间段,在弹幕数据库中进行查找得到的与所述视频标识以及所述查询时间段对应的弹幕所组成的集合,所述弹幕数据库包括视频标识、查询时间段以及弹幕的对应关系。Receiving the target barrage returned by the server, the target barrage is several barrages obtained by the server from the barrage collection, the barrage set is the server according to the video ID and the barrage The query time period, a collection of bullet chats corresponding to the video identifier and the query time period obtained by searching in the bullet chat database, the bullet chat database includes video identifiers, query time periods, and bullet chat information Correspondence.
  30. 一种非易失性计算机可读存储介质,其中,当所述计算机可读存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行以下步骤:A non-volatile computer-readable storage medium, wherein, when the instructions in the computer-readable storage medium are executed by a processor of the electronic device, the electronic device is enabled to perform the following steps:
    接收客户端发送的第一下发请求,所述第一下发请求携带有所述客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段,所述查询时间段基于对所述视频文件的播放时长进行划分得到;Receive the first delivery request sent by the client, the first delivery request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs, and the query time period is based on the The playback duration of the video file is divided to obtain;
    根据所述视频标识以及所述查询时间段,在弹幕数据库中进行查找,得到与所述视频标识以及所述查询时间段对应的弹幕集合,所述弹幕数据库包括视频标识、查询时间段以及弹幕的对应关系;According to the video identification and the query time period, search in the bullet chat database to obtain the bullet chat collection corresponding to the video identification and the query time period, and the bullet chat database includes video identification, query time period And the corresponding relationship of barrage;
    从所述弹幕集合中获取目标弹幕,并将所述目标弹幕返回至所述客户端,所述目标弹幕为需要返回至所述客户端的若干条弹幕;或者Obtain a target bullet chat from the bullet chat collection, and return the target bullet chat to the client, where the target bullet chat is several bullet chat that need to be returned to the client; or
    执行以下步骤:Perform the following steps:
    发送第一下发请求至服务端,所述第一下发请求携带有客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段,所述查询时间段基于对所述视频文件的播放时长进行划分得到;Send a first delivery request to the server, the first delivery request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs, and the query time period is based on the video file is obtained by dividing the playing time;
    接收所述服务端返回的目标弹幕,所述目标弹幕为所述服务端从弹幕集合中获取的若干条弹幕,所述弹幕集合是所述服务端根据所述视频标识以及所述查询时间段,在弹幕数据库中进行查找得到的与所述视频标识以及所述查询时间段对应的弹幕所组成的集合,所述弹幕数据库包括视频标识、查询时间段以及弹幕的对应关系。Receiving the target barrage returned by the server, the target barrage is several barrages obtained by the server from the barrage collection, the barrage set is the server according to the video ID and the barrage The query time period, a collection of bullet chats corresponding to the video identifier and the query time period obtained by searching in the bullet chat database, the bullet chat database includes video identifiers, query time periods, and bullet chat information Correspondence.
  31. 一种计算机程序产品,包括计算机程序,其中,所述计算机程序被处理器执行时实现以下步骤:A computer program product, comprising a computer program, wherein the computer program implements the following steps when executed by a processor:
    接收客户端发送的第一下发请求,所述第一下发请求携带有所述客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段,所述查询时间段基于对所述视频文件的播放时长进行划分得到;Receive the first delivery request sent by the client, the first delivery request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs, and the query time period is based on the The playback duration of the video file is divided to obtain;
    根据所述视频标识以及所述查询时间段,在弹幕数据库中进行查找,得到与所述视频标识以及所述查询时间段对应的弹幕集合,所述弹幕数据库包括视频标识、查询时间段以及弹幕的对应关系;According to the video identification and the query time period, search in the bullet chat database to obtain the bullet chat collection corresponding to the video identification and the query time period, and the bullet chat database includes video identification, query time period And the corresponding relationship of barrage;
    从所述弹幕集合中获取目标弹幕,并将所述目标弹幕返回至所述客户端,所述目标弹幕为需要返回至所述客户端的若干条弹幕;或者Obtain a target bullet chat from the bullet chat collection, and return the target bullet chat to the client, where the target bullet chat is several bullet chat that need to be returned to the client; or
    实现以下步骤:Implement the following steps:
    发送第一下发请求至服务端,所述第一下发请求携带有客户端正在播放的视频文件的视频标识以及当前播放进度所属的查询时间段,所述查询时间段基于对所述视频文件的播放时长进行划分得到;Send a first delivery request to the server, the first delivery request carries the video identifier of the video file being played by the client and the query time period to which the current playback progress belongs, and the query time period is based on the video file is obtained by dividing the playing time;
    接收所述服务端返回的目标弹幕,所述目标弹幕为所述服务端从弹幕集合中获取的若干条弹幕,所述弹幕集合是所述服务端根据所述视频标识以及所述查询时间段,在弹幕数据库中进行查找得到的与所述视频标识以及所述查询时间段对应的弹幕所组成的集合,所述弹幕数据库包括视频标识、查询时间段以及弹幕的对应关系。Receiving the target barrage returned by the server, the target barrage is several barrages obtained by the server from the barrage collection, the barrage set is the server according to the video ID and the barrage The query time period, a collection of bullet chats corresponding to the video identifier and the query time period obtained by searching in the bullet chat database, the bullet chat database includes video identifiers, query time periods, and bullet chat information Correspondence.
PCT/CN2021/143887 2021-05-31 2021-12-31 Bullet screen comment issuing method and bullet screen comment receiving method WO2022252610A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110600924.5 2021-05-31
CN202110600924.5A CN113365099B (en) 2021-05-31 2021-05-31 Bullet screen issuing method, bullet screen receiving method, bullet screen issuing device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2022252610A1 true WO2022252610A1 (en) 2022-12-08

Family

ID=77530412

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/143887 WO2022252610A1 (en) 2021-05-31 2021-12-31 Bullet screen comment issuing method and bullet screen comment receiving method

Country Status (2)

Country Link
CN (1) CN113365099B (en)
WO (1) WO2022252610A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113365099B (en) * 2021-05-31 2022-12-27 北京达佳互联信息技术有限公司 Bullet screen issuing method, bullet screen receiving method, bullet screen issuing device, electronic equipment and storage medium
CN115174958B (en) * 2022-06-27 2023-09-08 杭州海康威视数字技术股份有限公司 Video query method, device, logistics monitoring system, equipment and program product

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004362452A (en) * 2003-06-06 2004-12-24 Nippon Telegr & Teleph Corp <Ntt> Content interlocked comment display method, comment display system, server device, comment display device and comment display program
CN105245960A (en) * 2014-07-07 2016-01-13 乐视网信息技术(北京)股份有限公司 Live comment display method and device for videos
CN105578209A (en) * 2015-12-16 2016-05-11 广州酷狗计算机科技有限公司 Pop-up screen display method and apparatus
CN105916057A (en) * 2016-04-18 2016-08-31 乐视控股(北京)有限公司 Video barrage display method and device
CN112188225A (en) * 2020-09-29 2021-01-05 上海哔哩哔哩科技有限公司 Bullet screen issuing method for live broadcast playback and live broadcast video bullet screen playback method
CN113365099A (en) * 2021-05-31 2021-09-07 北京达佳互联信息技术有限公司 Bullet screen issuing method, bullet screen receiving method, bullet screen issuing device, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10735486B2 (en) * 2012-12-28 2020-08-04 Qualcomm Incorporated Device timing adjustments and methods for supporting dash over broadcast
CN104967876B (en) * 2014-09-30 2019-01-08 腾讯科技(深圳)有限公司 Barrage information processing method and device, barrage information displaying method and device
CN108668158B (en) * 2017-03-31 2020-07-10 武汉斗鱼网络科技有限公司 Bullet screen synchronization method, client and bullet screen server
CN110121083A (en) * 2018-02-06 2019-08-13 上海全土豆文化传播有限公司 The generation method and device of barrage

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004362452A (en) * 2003-06-06 2004-12-24 Nippon Telegr & Teleph Corp <Ntt> Content interlocked comment display method, comment display system, server device, comment display device and comment display program
CN105245960A (en) * 2014-07-07 2016-01-13 乐视网信息技术(北京)股份有限公司 Live comment display method and device for videos
CN105578209A (en) * 2015-12-16 2016-05-11 广州酷狗计算机科技有限公司 Pop-up screen display method and apparatus
CN105916057A (en) * 2016-04-18 2016-08-31 乐视控股(北京)有限公司 Video barrage display method and device
CN112188225A (en) * 2020-09-29 2021-01-05 上海哔哩哔哩科技有限公司 Bullet screen issuing method for live broadcast playback and live broadcast video bullet screen playback method
CN113365099A (en) * 2021-05-31 2021-09-07 北京达佳互联信息技术有限公司 Bullet screen issuing method, bullet screen receiving method, bullet screen issuing device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113365099A (en) 2021-09-07
CN113365099B (en) 2022-12-27

Similar Documents

Publication Publication Date Title
CN108932253B (en) Multimedia search result display method and device
CN110266879B (en) Playing interface display method, device, terminal and storage medium
WO2018157631A1 (en) Method and device for processing multimedia resource
RU2640632C2 (en) Method and device for delivery of information
CN111783001A (en) Page display method and device, electronic equipment and storage medium
WO2022252610A1 (en) Bullet screen comment issuing method and bullet screen comment receiving method
CN106897937B (en) Method and device for displaying social sharing information
CN107888965B (en) Image gift display method and device, terminal, system and storage medium
CN107784045B (en) Quick reply method and device for quick reply
WO2018157630A1 (en) Method and device for recommending associated user
CN110737844B (en) Data recommendation method and device, terminal equipment and storage medium
CN113315986A (en) Live broadcast interaction method and device, product evaluation method and device, electronic equipment and storage medium
US20230007312A1 (en) Method and apparatus for information interaction in live broadcast room
CN110740373B (en) Method and related device for buffering audio/video file
CN112291631A (en) Information acquisition method, device, terminal and storage medium
CN112131466A (en) Group display method, device, system and storage medium
US11546663B2 (en) Video recommendation method and apparatus
CN107402767B (en) Method and device for displaying push message
WO2023035560A9 (en) Information processing method and apparatus
CN110636318A (en) Message display method, message display device, client device, server and storage medium
CN113988021A (en) Content interaction method and device, electronic equipment and storage medium
CN107247794B (en) Topic guiding method in live broadcast, live broadcast device and terminal equipment
CN110213062B (en) Method and device for processing message
CN109960444B (en) Method, device and equipment for presenting shortcut of application program
CN110769282A (en) Short video generation method, terminal and server

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21943962

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE