A bullet screen information processing method and system
By scanning, building and storing barrage files in barrage servers to content distribution network servers, the crash and delay problems of video barrage system in high traffic situations are solved, the response speed and stability are improved, and bandwidth costs are reduced. Fast recovery is achieved.
Patent Information
- Application Number
- CN202310137166.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-20
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2043-02-20
AI Technical Summary
Existing video barrage systems can easily lead to service crashes or delayed data issuance under high traffic conditions, and the bandwidth cost is high when the client requests data, and the dependent database or queue middleware cannot quickly restore the barrage function when it is down.
Scan the data in the barrage server and build the barrage file that meets the conditions and store it on the content distribution network server. The client obtains barrage files for the specified video and time period through the content distribution network server, which improves the response speed and alleviates data pressure .
The content distribution network server stores and shares the pressure of barrage data, which improves system stability and response speed, reduces bandwidth costs, avoids the problem of slow data acquisition speed, and quickly restores barrage function in the event of downtime.
Smart Images

Figure CN116320649B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information processing, and in particular to a method and system for processing bullet screen information. Background Technology
[0002] Currently, the vast majority of short and long video platforms on the market offer video bullet comments (or danmaku) functionality. Bullet comments are typically sent by the client through an HTTP interface, polling for comments at regular intervals.
[0003] Using this method to obtain bullet comments can lead to a surge in traffic and requests to the server to retrieve bullet comments if a popular drama or video suddenly becomes available, causing the service to crash or experience delays in data delivery. Summary of the Invention
[0004] In view of this, this application provides a method and system for processing bullet screen information, the specific solution of which is as follows:
[0005] A method for processing bullet screen information, applied to a bullet screen server, includes:
[0006] Scan the bullet screen data;
[0007] The bullet screen data that meets the first condition is constructed to generate a bullet screen file that includes at least the bullet screen data and the video identifier and time period corresponding to the bullet screen data;
[0008] The bullet screen file is stored in a content delivery network server so that when a bullet screen request is received from a client, the first bullet screen file corresponding to the first video identifier and the first time period specified in the bullet screen request can be output to the client through the content delivery network server.
[0009] Furthermore, the step of constructing the bullet screen data that meets the first condition to generate a bullet screen file that includes at least the bullet screen data and the video identifier and time period corresponding to the bullet screen data includes:
[0010] Determine if there are any videos where the number of bullet comments in a single video reaches a first threshold;
[0011] If there is a video in which the number of bullet comments reaches a first threshold, the bullet comment data in the video in which the number of bullet comments reaches the first threshold is constructed to generate a bullet comment file that includes at least the bullet comment data and the video identifier and time period corresponding to the bullet comment data.
[0012] Furthermore, it also includes:
[0013] Incremental data is obtained and stored in the cache space of the bullet screen server, wherein the incremental data is unscanned bullet screen data.
[0014] Furthermore, it also includes:
[0015] Obtain incremental data and bullet screen data that do not meet the first condition, wherein the incremental data is bullet screen data that has not been scanned;
[0016] The incremental data and the bullet screen data that do not meet the first condition are stored in a specific message queue so that the client can obtain the incremental data and the bullet screen data that do not meet the first condition based on the specific message queue.
[0017] Furthermore, it also includes:
[0018] The version of the bullet screen file is recorded based on the time of the bullet screen data.
[0019] A method for processing bullet screen information, applied to a content delivery network server, includes:
[0020] Obtain and store the bullet screen file generated by the bullet screen server, wherein the bullet screen file includes at least bullet screen data and video identifier and time period corresponding to the bullet screen data;
[0021] Obtain the bullet screen request sent by the client;
[0022] Determine the first video identifier and the first time period specified in the bullet screen request;
[0023] The first bullet screen file is determined based on the first video identifier and the first time period, and the first bullet screen file is output to the client.
[0024] A method for processing bullet screen information, applied to a client, includes:
[0025] Output a request for bullet comments;
[0026] The content delivery network server obtains a first bullet screen file output by the content delivery network server based on the first video identifier and the first time period specified by the bullet screen request, and the content delivery network server is used to store the bullet screen file;
[0027] Parse the first bullet screen file;
[0028] Output the first bullet comment data from the first bullet comment file based on the current output progress of the video.
[0029] Furthermore, it also includes:
[0030] Obtain the second bullet screen file output by the bullet screen server based on the first video identifier and the first time period specified in the bullet screen request;
[0031] Compare the first bullet comment file and the second bullet comment file to obtain the merged third bullet comment file;
[0032] The third bullet comment data in the third bullet comment file is output based on the current output progress of the video.
[0033] A bullet screen information processing system, comprising:
[0034] A bullet screen server is used to scan bullet screen data, construct bullet screen data that meets the first condition, generate a bullet screen file that includes at least the bullet screen data and the video identifier and time period corresponding to the bullet screen data, and send the bullet screen file to the content delivery network server.
[0035] A content delivery network server is configured to store the obtained bullet screen file, obtain bullet screen requests sent by the client, determine the first video identifier and the first time period specified in the bullet screen request, determine the first bullet screen file based on the first video identifier and the first time period, and output the first bullet screen file to the client.
[0036] The client is used to send a request for bullet comments, obtain the first bullet comment file output by the content distribution network, parse the first bullet comment file, and output the first bullet comment data in the first bullet comment file based on the current output progress of the video.
[0037] Furthermore, the client is also used for:
[0038] Obtain the second bullet screen file output by the bullet screen server based on the first video identifier and the first time period specified by the bullet screen request; compare the first bullet screen file and the second bullet screen file to obtain the merged third bullet screen file; output the third bullet screen data in the third bullet screen file based on the current output progress of the video.
[0039] As can be seen from the above technical solutions, the bullet screen information processing method and system disclosed in this application are applied to a bullet screen server. The method scans bullet screen data, constructs bullet screen data that meets the first condition, and generates a bullet screen file that includes at least the bullet screen data and the corresponding video identifier and time period. The bullet screen file is stored in a content delivery network server so that when a bullet screen request is received from a client, the first bullet screen file corresponding to the first video identifier and first time period specified in the bullet screen request can be output to the client through the content delivery network server. In this solution, the bullet screen server scans the bullet screen data, generates a bullet screen file, and stores it in the content delivery network server. This allows the first bullet screen file corresponding to the bullet screen request to be directly output to the client from the content delivery network server when the client makes a bullet screen request. By storing the bullet screen file in the content delivery network server, the response speed to bullet screen requests is improved, and the problem of excessive bullet screen quantity is alleviated. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is a flowchart of a bullet screen information processing method disclosed in an embodiment of this application;
[0042] Figure 2 This is a flowchart of a bullet screen information processing method disclosed in an embodiment of this application;
[0043] Figure 3 This is a flowchart of a bullet screen information processing method disclosed in an embodiment of this application;
[0044] Figure 4 This is a flowchart of a bullet screen information processing method disclosed in an embodiment of this application;
[0045] Figure 5 This is a schematic diagram of the structure of a bullet screen information processing system disclosed in an embodiment of this application. Detailed Implementation
[0046] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0047] This application discloses a method for processing bullet screen information, the flowchart of which is as follows: Figure 1 As shown, it includes:
[0048] Step S11: Scan the bullet screen data;
[0049] Step S12: Construct the bullet screen data that meets the first condition to generate a bullet screen file that includes at least the bullet screen data and the video identifier and time period corresponding to the bullet screen data;
[0050] Step S13: Store the bullet screen file to the content delivery network server so that when a bullet screen request is received from the client, the first bullet screen file corresponding to the first video identifier and the first time period specified in the bullet screen request can be output to the client through the content delivery network server.
[0051] Currently, when a website or application enables the bullet comment function for a video, the bullet comments entered by the user are usually stored in the bullet comment server. To output the bullet comments, the relevant bullet comments are retrieved directly from the bullet comment server and associated with the content currently being played in the video.
[0052] However, when the video has a large number of views and a large number of requests enter the bullet screen server to retrieve bullet screens, it can easily cause the on-demand bullet screen service to crash or data delivery delay. In addition, the bandwidth cost caused by the client requesting the bullet screen server to retrieve data is high. If the middleware such as the database and queue that it depends on goes down, even if the bullet screen application recovers, the bullet screen function cannot be restored quickly.
[0053] Based on this, a content delivery network server is added to this solution. The content delivery network server stores the data related to bullet comments and reduces the data pressure on the bullet comment server, ensuring the timeliness of the data obtained by the client, improving the stability of the system, and keeping bandwidth costs low.
[0054] The bullet screen information processing method disclosed in this embodiment is applied to a bullet screen server.
[0055] When a user uploads bullet screen data through a client application or webpage, the bullet screen data is uploaded to the bullet screen server, which then scans the bullet screen data to determine whether there is any bullet screen data that meets the first condition.
[0056] The bullet screen server scans the bullet screen data. This can be done by performing a full scan of all the obtained bullet screen data at preset intervals to identify the bullet screen data that meets the first condition. This avoids the problem of untimely updates of the bullet screen data output during video playback due to prolonged periods without scanning.
[0057] If the bullet screen server determines that there is no bullet screen data that meets the first condition among all bullet screen data, it terminates the current process until the next time to perform a full scan. If the bullet screen server determines that there is bullet screen data that meets the first condition among all bullet screen data, it creates the bullet screen data that meets the first condition to generate a bullet screen file.
[0058] A bullet comment file must include at least: bullet comment data and the corresponding video identifier and time period. That is, each bullet comment file must include bullet comment data that meets the first condition, and the video identifier of each bullet comment must be determined. It is also necessary to further determine which time period of a video each bullet comment corresponds to. For example, if a bullet comment file includes bullet comment data 1, then the bullet comment file must also include the video identifier of video 1 that bullet comment data 1 corresponds to, and the time period of video 1 that it corresponds to. For example, if the time period is from 1 minute to 2 minutes in video 1, then the time segment is in minutes; or, the time segment can be in seconds, such as the time period from 1 minute 05 seconds to 1 minute 20 seconds in video 1.
[0059] In addition, the bullet comment file may also include: the version number corresponding to the bullet comment file. That is, the bullet comment server will perform a full scan of the bullet comment data at preset intervals. After a scan is completed, before the next scan, there will be new bullet comments or likes entered by users. Therefore, the bullet comment data of the next scan will be different from the bullet comment data of the previous scan. Each scan generates a bullet comment file with a unified version number. Therefore, bullet comment files generated by different scans will correspond to different version numbers to distinguish the versions of the bullet comment files, so as to facilitate data rollback.
[0060] Additionally, the bullet screen file can include the current date for easy recording or retrieval.
[0061] The bullet screen comment files can be displayed as a directory in the form of a JSON array, such as: / yyyy-mm-dd / videoid / version number / time period.json, where yyyy-mm-dd is the current date and videoid is the video identifier.
[0062] If the time period is from 1 minute to 2 minutes of video 1, then the bullet comment data corresponding to the bullet comment file includes all bullet comment data within the time period from 1 minute to 2 minutes of video 1. Therefore, the video file contains a JSON array consisting of all bullet comment data within the time period from 1 minute to 2 minutes of video 1.
[0063] After the bullet screen file is generated, it is uploaded to the content delivery network (CDN) server of the file system so that the bullet screen file can be stored in the CDN server. When the CDN server receives a bullet screen request from the client, it can directly send the corresponding bullet screen file it stores to the client and output it in association with the video.
[0064] After storing the bullet screen files in the content delivery network (CDN) server, the CDN origin address is then mapped to the CDN server in the file system so that the bullet screen files can be searched based on the CDN origin address.
[0065] After storing the bullet comment files, the content delivery network (CDN) server generates a CDN bullet comment update queue. This queue is used to send bullet comment files back to the client when the client sends a bullet comment request.
[0066] The file system is a service used to store and download files based on URL addresses, such as cloud services provided by vendors or FTP servers.
[0067] When a client sends a request for bullet comments, the content delivery network (CDN) server receives the request and determines which video and time segment within that video are being requested. It then identifies the first video identifier and the first time segment corresponding to the request. If the request requests all bullet comments within the first time segment of the video corresponding to the first video identifier, the CDN server searches the directory of all bullet comment files stored within the CDN server based on the first video identifier and the first time segment. Once the first bullet comment file is found in the directory, the CDN server sends it to the client. The client parses the file and associates the bullet comment data with the first time segment of the video corresponding to the first video identifier, outputting the association so that users can simultaneously view the relevant bullet comment data when watching the video corresponding to the first video identifier through the client.
[0068] The above method avoids the problem of slow data retrieval caused by directly obtaining data from the bullet screen server, thus improving the timeliness of responding to bullet screen requests; furthermore, obtaining bullet screen data from the content delivery network (CDN) server results in low bandwidth costs.
[0069] The bullet screen information processing method disclosed in this embodiment is applied to a bullet screen server. It scans bullet screen data, constructs bullet screen data that meets a first condition, and generates a bullet screen file that includes at least the bullet screen data and a video identifier and time period corresponding to the bullet screen data. The bullet screen file is stored in a content delivery network server so that when a bullet screen request is received from a client, the first bullet screen file corresponding to the first video identifier and first time period specified in the bullet screen request can be output to the client through the content delivery network server. In this solution, the bullet screen server scans the bullet screen data, generates a bullet screen file, and stores it in the content delivery network server. This allows the first bullet screen file corresponding to the bullet screen request to be directly output to the client from the content delivery network server when the client makes a bullet screen request. By storing the bullet screen file in the content delivery network server, the response speed to bullet screen requests is improved, and the problem of excessive bullet screen quantity is alleviated.
[0070] This embodiment discloses a method for processing bullet screen information, the flowchart of which is as follows: Figure 2 As shown, it includes:
[0071] Step S21: Scan the bullet screen data;
[0072] Step S22: Determine whether there is a single video where the number of bullet comments reaches the first threshold;
[0073] Step S23: If there is a video in which the number of bullet comments in a single video reaches the first threshold, construct the bullet comment data in the video in which the number of bullet comments reaches the first threshold, and generate a bullet comment file that includes at least the bullet comment data and the video identifier and time period corresponding to the bullet comment data.
[0074] Step S24: Store the bullet screen file to the content delivery network server so that when a bullet screen request is received from the client, the first bullet screen file corresponding to the first video identifier and the first time period specified in the bullet screen request can be output to the client through the content delivery network server.
[0075] Determining whether the bullet screen data meets the first condition can be done by: determining whether the number of bullet screen data in a single video reaches a first threshold.
[0076] That is, each video is judged separately, and a bullet comment file is generated only when the number of bullet comment data in a video reaches the first threshold.
[0077] For example, if the number of bullet comments in video 2 reaches 100, it can be determined that the number of bullet comments in video 2 has reached the first threshold. Then, all the bullet comment data in video 2 will be constructed to generate the bullet comment file corresponding to video 2.
[0078] Furthermore, it can be determined that the number of bullet screen data obtained by a single video within a specific time period reaches a first threshold.
[0079] Adding a time period limit can prevent the generation of bullet comments from occurring when the number of bullet comment data for a video reaches the first threshold and a bullet comment file has already been generated once. If no new bullet comment data is added or only a small amount is added during subsequent scans, bullet comments will still be generated, which would lead to the duplicate generation of bullet comment files.
[0080] For example, if the number of new bullet comments in video 2 reaches 100 within 1 hour, it can be determined that the number of bullet comments obtained by video 2 within a specific time period has reached the first threshold. The bullet comment data in video 2 can be remade to generate a bullet comment file corresponding to the bullet comment data in video 2. This file has a different version number than the bullet comment file corresponding to video 2 1 hour ago.
[0081] Furthermore, the bullet screen information processing method disclosed in this embodiment may also include:
[0082] The bullet comment files are versioned based on the time of the bullet comment data.
[0083] The danmaku server stores version records for each danmaku file. These records include not only the version information of each danmaku file, but also the date and video identifier, so that danmaku files can be searched based on version, date, and video identifier.
[0084] Additionally, it may include:
[0085] Obtain incremental data and store it in the cache space of the bullet screen server. The incremental data consists of bullet screen data that has not been scanned.
[0086] The bullet screen server maintains an incremental data update queue. For bullet screen data that has passed the review but has been changed to fail, as well as bullet screen data that meets certain conditions and can be transferred to the content delivery network (CDN) server, bullet screen files are constructed. The construction method is the same as the method of constructing bullet screen files after a full scan of bullet screen data, so that newly added bullet screen data can fall into the content delivery network (CDN) server.
[0087] The reason why some bullet screen data that has passed the review but is subsequently marked as failing is because the operations or security review departments conduct a second review of bullet screen data that has already passed the review. Therefore, it is necessary to re-review the bullet screen data that has already passed the review.
[0088] Incremental data refers to unscanned bullet screen data, that is, bullet screen data obtained during the period between the end of a scan and the start of the next scan. After the incremental data passes the review, if the bullet screen update queue in the content distribution network server has not yet been output, this incremental data is cached in the cache space of the bullet screen server and then distributed through the bullet screen interface of the bullet screen server.
[0089] Incremental data is distributed via the bullet screen server's interface, meaning it's sent to the client through this interface. The bullet screen files, on the other hand, are static file resources from the content delivery network (CDN) corresponding to the content delivery network server. The bullet screen files contain historical, accumulated data, while the incremental data is temporary cached supplementary data that hasn't yet been reconstructed. After the incremental data update queue is output, the incremental data cached on the bullet screen server is synchronized to the bullet screen files on the CDN server through file reconstruction.
[0090] Furthermore, the bullet screen information processing method disclosed in this embodiment may also include:
[0091] Obtain incremental data and bullet screen data that do not meet the first condition; store the incremental data and bullet screen data that do not meet the first condition in a specific message queue so that the client can obtain incremental data and bullet screen data that do not meet the first condition based on the specific message queue.
[0092] A specific message queue can be a Redis queue. By setting up a Redis queue in the bullet screen server, incremental data can be stored in the Redis queue. In addition, bullet screen data that does not meet the first condition has not been stored in the content delivery network server. This part of the bullet screen data can also be updated to the Redis queue so that subsequent clients can retrieve incremental data and / or bullet screen data that does not meet the first condition from the Redis queue, thereby achieving the purpose of timely storage of bullet screen data.
[0093] Once the bullet screen data in a specific message queue is output to the client, the bullet screen data in that specific message queue is deleted and cleaned up.
[0094] It should be noted that after the bullet screen data that meets the first condition is generated into a bullet screen file, it is stored in the content distribution network server. Bullet screen data that does not meet the first condition and incremental data are stored in a specific message queue in the bullet screen server. Whether it is bullet screen data that meets the first condition, bullet screen data that does not meet the first condition, or incremental data, it will be stored in the database for recording purposes.
[0095] The bullet screen information processing method disclosed in this embodiment is applied to a bullet screen server. It scans bullet screen data, constructs bullet screen data that meets a first condition, and generates a bullet screen file that includes at least the bullet screen data and a video identifier and time period corresponding to the bullet screen data. The bullet screen file is stored in a content delivery network server so that when a bullet screen request is received from a client, the first bullet screen file corresponding to the first video identifier and first time period specified in the bullet screen request can be output to the client through the content delivery network server. In this solution, the bullet screen server scans the bullet screen data, generates a bullet screen file, and stores it in the content delivery network server. This allows the first bullet screen file corresponding to the bullet screen request to be directly output to the client from the content delivery network server when the client makes a bullet screen request. By storing the bullet screen file in the content delivery network server, the response speed to bullet screen requests is improved, and the problem of excessive bullet screen quantity is alleviated.
[0096] This embodiment discloses a method for processing bullet screen information, the flowchart of which is as follows: Figure 3 As shown, it includes:
[0097] Step S31: Obtain and store the bullet screen file generated by the bullet screen server. The bullet screen file shall include at least the bullet screen data and the video identifier and time period corresponding to the bullet screen data.
[0098] Step S32: Obtain the bullet screen request sent by the client;
[0099] Step S33: Determine the first video identifier and the first time period specified in the bullet screen request;
[0100] Step S34: Determine the first bullet screen file based on the first video identifier and the first time period, and output the first bullet screen file to the client.
[0101] The bullet screen information processing method disclosed in this embodiment is applied to a content distribution network server.
[0102] The content delivery network server can obtain and store the bullet comment files generated by the bullet comment server. The bullet comment file includes at least the bullet comment data and the video identifier and time period corresponding to the bullet comment data.
[0103] When a request for bullet comments is received from a client, the request is analyzed to determine the first video identifier and the first time period specified in the request. Based on the first video identifier and the first time period, the first bullet comment file stored in the content delivery network server can be found, and the first bullet comment file is output to the client.
[0104] When a client sends a request for bullet comments, the content delivery network (CDN) server receives the request and determines which video and time segment within that video are being requested. It then identifies the first video identifier and the first time segment corresponding to the request. If the request requests all bullet comments within the first time segment of the video corresponding to the first video identifier, the CDN server searches the directory of all bullet comment files stored within the CDN server based on the first video identifier and the first time segment. Once the first bullet comment file is found in the directory, the CDN server sends it to the client. The client parses the file and associates the bullet comment data with the first time segment of the video corresponding to the first video identifier, outputting the association so that users can simultaneously view the relevant bullet comment data when watching the video corresponding to the first video identifier through the client.
[0105] The above method avoids the problem of slow data retrieval caused by directly obtaining data from the bullet screen server, thus improving the timeliness of responding to bullet screen requests; furthermore, obtaining bullet screen data from the content delivery network (CDN) server results in low bandwidth costs.
[0106] The process of generating bullet screen files by the bullet screen server is the same as in the above embodiment, and will not be repeated here.
[0107] The bullet screen information processing method disclosed in this embodiment obtains and stores bullet screen files generated by a bullet screen server. The bullet screen file includes at least bullet screen data and a video identifier and time period corresponding to the bullet screen data. It then obtains a bullet screen request sent by a client; determines a first video identifier and a first time period specified in the bullet screen request; determines a first bullet screen file based on the first video identifier and the first time period; and outputs the first bullet screen file to the client. In this solution, the bullet screen server stores the generated bullet screen files in a content delivery network server, so that when a client makes a bullet screen request, the first bullet screen file corresponding to the bullet screen request can be directly output from the content delivery network server to the client. By storing the bullet screen files in the content delivery network server, the response speed to bullet screen requests is improved, and the problem of excessive bullet screen quantity is alleviated.
[0108] This embodiment discloses a method for processing bullet screen information, the flowchart of which is as follows: Figure 4 As shown, it includes:
[0109] Step S41: Output a bullet screen request;
[0110] Step S42: Obtain the first video identifier and the first time period output by the content delivery network server based on the bullet screen request. The content delivery network server is used to store the bullet screen file.
[0111] Step S43: Parse the first bullet comment file;
[0112] Step S44: Output the first bullet screen data in the first bullet screen file based on the current output progress of the video.
[0113] The bullet screen information processing method disclosed in this embodiment is applied to the client.
[0114] When a client plays a video, if it wants to output bullet comments simultaneously with the video playback, it first needs to obtain the bullet comment switch from the bullet comment server. If the bullet comment server reports that the current bullet comment switch is off, the subsequent process is terminated. If the bullet comment server reports that the current bullet comment switch is on, the subsequent process continues.
[0115] When the client receives feedback from the bullet screen server that the current bullet screen switch is on, it can output a bullet screen request. This request is generated based on the video currently playing on the client and the time segment within the video. When the content delivery network server receives the bullet screen request, it analyzes the request, determines the first video identifier and the first bullet screen file to be output within the first time segment specified in the request, and then sends the first bullet screen file back to the client.
[0116] The client receives the first bullet comment file, parses it to obtain the first bullet comment data, and outputs the first bullet comment data according to the current playback progress of the video on the client. The video progress refers to the current time segment of the video playback, and the first bullet comment data is output according to that time segment.
[0117] Furthermore, the client can obtain correction data from the bullet screen server once every first preset time interval. The correction data includes at least the newly added or deleted bullet screen data. This data has not yet been stored in the content delivery network server. Therefore, the bullet screen data in the bullet screen file obtained from the content delivery network server can be corrected by obtaining the correction data from the bullet screen server. After rendering, it is associated with the currently playing video and output.
[0118] That is: obtain the first video identifier and the second bullet screen file output by the bullet screen server based on the bullet screen request and the first time period, compare the first bullet screen file and the second bullet screen file to obtain the merged third bullet screen file, and output the third bullet screen data in the third bullet screen file based on the current output progress of the video.
[0119] The corrected data can be a second bullet comment file or bullet comment data that is different from the first bullet comment file. Regardless of whether the corrected data is a second bullet comment file or bullet comment data that is different from the first bullet comment file, when the client outputs a bullet comment request, not only will the content delivery network server receive the bullet comment request, but the bullet comment server will also receive the bullet comment request. At this time, the bullet comment server can either provide the second bullet comment file or the bullet comment data that is different from the first bullet comment file when it receives the bullet comment request, or it can provide the second bullet comment file or the bullet comment data that is different from the first bullet comment file to the client after a first preset time interval, so as to merge it with the first bullet comment file in a timely manner to obtain the corrected third bullet comment file.
[0120] Alternatively, the bullet screen server may not receive bullet screen requests from the client, but instead only time the process. Only after a first preset interval will it send a second bullet screen file or bullet screen data different from the first bullet screen file back to the client, so that it can be merged with the first bullet screen file to obtain a corrected third bullet screen file.
[0121] In addition, the corrected data may also include: incremental data and bullet screen data that does not meet the first condition, that is, bullet screen data that has not been stored in the content delivery network server.
[0122] If the bullet screen data obtained by the client includes not only the first bullet screen file fed back by the content delivery network server, but also the incremental data fed back by the bullet screen server and the bullet screen data that does not meet the first condition, then when the client outputs the bullet screen data, the incremental data and the bullet screen data that does not meet the first condition will be merged and output based on the time period corresponding to the various bullet screen data.
[0123] The client obtains the bullet comment files from the content delivery network server and the bullet comment data from the bullet comment server. This ensures that the client receives all the bullet comment data. Obtaining the bullet comment files from the content delivery network server is done through a content delivery network CDN, which is cheaper and reduces the bandwidth requirements for the bullet comment service. It also supports multiple versions for backup and switching, and the response is faster and more stable. Obtaining the bullet comment data from both the content delivery network server and the bullet comment server ensures a more stable service.
[0124] The process of generating bullet screen files by the bullet screen server is the same as in the above embodiment, and will not be repeated here.
[0125] The bullet screen information processing method disclosed in this embodiment outputs a bullet screen request; obtains a first bullet screen file output by a content delivery network server based on a first video identifier and a first time period specified in the bullet screen request, and the content delivery network server is used to store the bullet screen file; parses the first bullet screen file; and outputs the first bullet screen data in the first bullet screen file based on the current output progress of the video. In this solution, the bullet screen server stores the generated bullet screen file in the content delivery network server so that when the client has a bullet screen request, the first bullet screen file corresponding to the bullet screen request can be directly output from the content delivery network server to the client. By storing the bullet screen file in the content delivery network server, the response speed to bullet screen requests is improved, and the problem of excessive number of bullet screens can be alleviated.
[0126] This embodiment discloses a bullet screen information processing system, the structural diagram of which is shown below. Figure 5 As shown, it includes:
[0127] 51. Bullet screen server, 52. Content distribution network server and 53.
[0128] The bullet screen server 51 is used to scan the bullet screen data, construct the bullet screen data that meets the first condition, generate a bullet screen file that includes at least the bullet screen data and the video identifier and time period corresponding to the bullet screen data, and send the bullet screen file to the content distribution network server.
[0129] The content delivery network server 52 is used to store the obtained bullet screen files, obtain bullet screen requests sent by the client, determine the first video identifier and the first time period specified in the bullet screen request, determine the first bullet screen file based on the first video identifier and the first time period, and output the first bullet screen file to the client.
[0130] Client 53 is used to output a bullet screen request, obtain the first bullet screen file output by the content delivery network, parse the first bullet screen file, and output the first bullet screen data in the first bullet screen file based on the current output progress of the video.
[0131] Furthermore, the bullet screen server in the bullet screen information processing system disclosed in this embodiment is used for:
[0132] Determine if there is a video where the number of bullet comments in a single video reaches a first threshold; if there is a video where the number of bullet comments in a single video reaches the first threshold, construct the bullet comment data in the video where the number of bullet comments reaches the first threshold, and generate a bullet comment file that includes at least the bullet comment data and the video identifier and time period corresponding to the bullet comment data.
[0133] Furthermore, the bullet screen server in the bullet screen information processing system disclosed in this embodiment is also used for:
[0134] Obtain incremental data and store it in the cache space of the bullet screen server. The incremental data consists of bullet screen data that has not been scanned.
[0135] Furthermore, the bullet screen server in the bullet screen information processing system disclosed in this embodiment is also used for:
[0136] Obtain incremental data and bullet screen data that do not meet the first condition, wherein the incremental data is bullet screen data that has not been scanned; store the incremental data and bullet screen data that do not meet the first condition in a specific message queue so that the client can obtain the incremental data and bullet screen data that do not meet the first condition based on the specific message queue.
[0137] Furthermore, the bullet screen server in the bullet screen information processing system disclosed in this embodiment is also used for:
[0138] The bullet comment files are versioned based on the time of the bullet comment data.
[0139] Furthermore, the client in the bullet screen information processing system disclosed in this embodiment is also used for:
[0140] Obtain the first video identifier and the second bullet screen file output by the bullet screen server based on the bullet screen request and the first time period; compare the first bullet screen file and the second bullet screen file to obtain the merged third bullet screen file; output the third bullet screen data in the third bullet screen file based on the current output progress of the video.
[0141] The bullet screen information processing system disclosed in this embodiment is implemented based on the bullet screen information processing method disclosed in the above embodiment, and will not be described again here.
[0142] The bullet screen information processing system disclosed in this embodiment includes a bullet screen server that scans bullet screen data, constructs bullet screen data that meets a first condition, generates a bullet screen file that includes at least the bullet screen data and a video identifier and time period corresponding to the bullet screen data, and sends the bullet screen file to a content delivery network server. The content delivery network server stores the obtained bullet screen file, receives a bullet screen request sent by a client, determines the first video identifier and first time period specified in the bullet screen request, determines a first bullet screen file based on the first video identifier and first time period, and outputs the first bullet screen file to the client. The client outputs a bullet screen request, obtains the first bullet screen file output by the content delivery network, parses the first bullet screen file, and outputs the first bullet screen data in the first bullet screen file based on the current output progress of the video. In this solution, the bullet screen server scans the bullet screen data, generates a bullet screen file, and stores it in the content delivery network server so that when the client has a bullet screen request, the first bullet screen file corresponding to the bullet screen request can be directly output from the content delivery network server to the client. By storing the bullet screen file in the content delivery network server, the response speed to bullet screen requests is improved, and the problem of excessive bullet screens can be alleviated.
[0143] In addition, this embodiment also discloses a bullet screen server, including:
[0144] The unit includes a scanning unit, a generating unit, and a sending unit.
[0145] The scanning unit is used to scan the bullet screen data;
[0146] The generation unit is used to construct the bullet screen data that meets the first condition and generate a bullet screen file that includes at least the bullet screen data and the video identifier and time period corresponding to the bullet screen data.
[0147] The sending unit is used to store the bullet screen file to the content delivery network server so that when a bullet screen request is received from the client, the first bullet screen file corresponding to the first video identifier and the first time period specified in the bullet screen request can be output to the client through the content delivery network server.
[0148] In addition, this embodiment also discloses a content delivery network server, including:
[0149] The storage unit, the first acquisition unit, the first determination unit, and the second determination unit.
[0150] The storage unit is used to obtain and store the bullet screen files generated by the bullet screen server. The bullet screen files include at least bullet screen data and video identifiers and time periods corresponding to the bullet screen data.
[0151] The first acquisition unit is used to acquire the bullet screen requests sent by the client;
[0152] The first determining unit is used to determine the first video identifier and the first time period specified in the bullet screen request;
[0153] The second determining unit is used to determine the first bullet screen file based on the first video identifier and the first time period, and output the first bullet screen file to the client.
[0154] In addition, this embodiment also discloses a client, including:
[0155] The system comprises a first output unit, a second acquisition unit, a parsing unit, and a second output unit.
[0156] The first output unit is used to output bullet screen requests;
[0157] The second obtaining unit is used to obtain the first video identifier and the first bullet screen file output by the content delivery network server based on the bullet screen request and the first time period. The content delivery network server is used to store the bullet screen file.
[0158] The parsing unit is used to parse the first bullet comment file;
[0159] The second output unit is used to output the first bullet screen data in the first bullet screen file based on the current output progress of the video.
[0160] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0161] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0162] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0163] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for processing bullet screen information, applied to a bullet screen server, characterized in that: include: Scan the barrage data; wherein, all the obtained barrage data are fully scanned once at a preset interval; Constructing the bullet screen data that meets the first condition, generating a bullet screen file that at least includes the bullet screen data and a video identifier and a time period corresponding to the bullet screen data; The barrage file is stored in a content distribution network server, so that when a barrage request sent by a client is obtained, the first barrage file corresponding to the first video identifier and the first time period can be output to the client through the content distribution network server based on the first video identifier and the first time period specified by the barrage request; The step of constructing the barrage data satisfying the first condition and generating a barrage file including at least the barrage data and a video identifier and a time period corresponding to the barrage data includes: Determine whether there is a video in which the amount of bullet comment data in a single video reaches a first threshold; If there is a video in which the amount of bullet-screen data in a single video reaches a first threshold, construct the bullet-screen data in the video in which the amount of bullet-screen data reaches the first threshold, and generate a bullet-screen file that at least includes the bullet-screen data and a video identifier and a time period corresponding to the bullet-screen data; The method further comprises: Incremental data is obtained, and the incremental data is stored in a cache space of the bullet screen server, wherein the incremental data is the bullet screen data that has not been scanned.
2. The method according to claim 1, characterized in that Also includes: Obtaining incremental data and barrage data that does not meet the first condition, wherein the incremental data is barrage data that has not been scanned; The incremental data and the bullet screen data that do not meet the first condition are stored in a specific message queue, so that the client can obtain the incremental data and the bullet screen data that do not meet the first condition based on the specific message queue.
3. The method according to claim 1, characterized in that Also includes: The version of the barrage file is recorded according to the time of the barrage data.
4. A bullet comment information processing method, applied to a content distribution network server, characterized in that: include: Obtain and store a barrage file generated by a barrage server, wherein the barrage file includes at least barrage data and a video identifier and a time period corresponding to the barrage data; wherein the barrage server performs a full scan of all the obtained barrage data at a preset interval, constructs the barrage data that meets the first condition, and generates a barrage file that includes at least the barrage data and the video identifier and time period corresponding to the barrage data; wherein, constructing the barrage data that meets the first condition to generate a barrage file that includes at least the barrage data and the video identifier and time period corresponding to the barrage data includes: determining whether there is a video in which the number of barrage data in a single video reaches a first threshold; if there is a video in which the number of barrage data in a single video reaches the first threshold, constructing the barrage data in the video in which the number of barrage data reaches the first threshold, and generating a barrage file that includes at least the barrage data and the video identifier and time period corresponding to the barrage data; obtaining incremental data, and storing the incremental data in the cache space of the barrage server, wherein the incremental data is barrage data that has not been scanned; Get the bullet comment request sent by the client; Determine a first video identifier and a first time period specified by the bullet screen request; A first bullet screen file is determined based on the first video identifier and the first time period, and the first bullet screen file is output to the client.
5. A method for processing bullet comment information, applied to a client, characterized in that: include: Output barrage request; Obtaining a first bullet screen file output by a content distribution network server based on a first video identifier and a first time period specified by the bullet screen request, wherein the content distribution network server is used to store the bullet screen file; The barrage file is a barrage file in which the barrage server performs a full scan of all the obtained barrage data at a preset interval, constructs the barrage data that meets the first condition, and generates a barrage file that at least includes the barrage data and the video identifier and time period corresponding to the barrage data; wherein, it is determined whether there is a video in which the number of barrage data in a single video reaches a first threshold; if there is a video in which the number of barrage data in a single video reaches the first threshold, the barrage data in the video in which the number of barrage data reaches the first threshold is constructed to generate a barrage file that at least includes the barrage data and the video identifier and time period corresponding to the barrage data; incremental data is obtained, and the incremental data is stored in the cache space of the barrage server, wherein the incremental data is the barrage data that has not been scanned; Parsing the first bullet comment file; The first bullet comment data in the first bullet comment file is output based on the current output progress of the video.
6. The method according to claim 5, characterized in that Also includes: Obtain a second bullet screen file output by the bullet screen server based on the first video identifier and the first time period specified by the bullet screen request; Comparing the first barrage file and the second barrage file to obtain a merged third barrage file; The third barrage data in the third barrage file is output based on the current output progress of the video.
7. A bullet comment information processing system, characterized in that: include: A barrage server is used to scan barrage data, construct barrage data that meets a first condition, generate a barrage file that at least includes the barrage data and a video identifier and a time period corresponding to the barrage data, and send the barrage file to a content distribution network server; wherein, a full scan is performed on all obtained barrage data at intervals of a preset time; wherein, constructing the barrage data that meets the first condition and generating a barrage file that at least includes the barrage data and a video identifier and a time period corresponding to the barrage data comprises: determining whether there is a video in which the number of barrage data in a single video reaches a first threshold; if there is a video in which the number of barrage data in a single video reaches the first threshold, constructing the barrage data in the video in which the number of barrage data reaches the first threshold, and generating a barrage file that at least includes the barrage data and a video identifier and a time period corresponding to the barrage data; The bullet-screen server is further used to obtain incremental data and store the incremental data in a cache space of the bullet-screen server, wherein the incremental data is the bullet-screen data that has not been scanned; A content distribution network server is used to store the obtained barrage file, obtain the barrage request sent by the client, determine the first video identifier and the first time period specified by the barrage request; determine the first barrage file based on the first video identifier and the first time period, and output the first barrage file to the client; The client is used to output a barrage request, obtain the first barrage file output by the content distribution network, parse the first barrage file, and output the first barrage data in the first barrage file based on the current output progress of the video.
8. The system according to claim 7, characterized in that The client is also used to: Obtain a second barrage file output by the barrage server based on the first video identifier and the first time period specified by the barrage request; compare the first barrage file with the second barrage file to obtain a merged third barrage file; The third barrage data in the third barrage file is output based on the current output progress of the video.
Citation Information
Patent Citations
Integral realization method and network structure of bullet screen service
CN106101851A