CN114520922B - Barrage message processing method and device and barrage system - Google Patents

Barrage message processing method and device and barrage system Download PDF

Info

Publication number
CN114520922B
CN114520922B CN202011311163.3A CN202011311163A CN114520922B CN 114520922 B CN114520922 B CN 114520922B CN 202011311163 A CN202011311163 A CN 202011311163A CN 114520922 B CN114520922 B CN 114520922B
Authority
CN
China
Prior art keywords
barrage
message
storage list
time
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011311163.3A
Other languages
Chinese (zh)
Other versions
CN114520922A (en
Inventor
杨凯飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Feinno Communication Technology Co Ltd
Original Assignee
Beijing Feinno Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Feinno Communication Technology Co Ltd filed Critical Beijing Feinno Communication Technology Co Ltd
Priority to CN202011311163.3A priority Critical patent/CN114520922B/en
Publication of CN114520922A publication Critical patent/CN114520922A/en
Application granted granted Critical
Publication of CN114520922B publication Critical patent/CN114520922B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • 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/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23106Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion involving caching operations
    • 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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/254Management at additional data server, e.g. shopping server, rights management server
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
    • 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

Abstract

The application discloses a barrage message processing method, a barrage message processing device and a barrage system. The method comprises the following steps: acquiring one or more barrage messages sent by one or more first clients in unit time, and storing the one or more barrage messages in a corresponding storage list according to the corresponding relation between the serial number of the unit time and the storage list; and acquiring a barrage pulling request sent by the second client, inquiring target barrage information from a corresponding storage list according to the inquiring time corresponding to the barrage pulling request, and returning the inquired target barrage information to the client. The technical scheme is suitable for millions of data concurrency scenes in a live broadcast environment, and can reduce server pressure and improve system stability in the scenes.

Description

Barrage message processing method and device and barrage system
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a barrage message processing method, device, and barrage system.
Background
With the rising of live entertainment, live broadcasting functions are more and more abundant, and the barrage function in a live broadcasting system is an important interaction function. At present, the barrage function is mainly realized by the following two schemes:
scheme one:
the messaging system and the live system are deployed separately. When a user sends a barrage message, the live broadcast system reads user information of a live broadcast room during service processing, traverses all user information, queries a physical address cache of a long link according to the user information, and then sends an HTTP request to each user to the message system, and the message system pushes the barrage message to the user through the long link.
In the million live broadcast scene, most of resource consumption is derived from communication between services, and especially under the condition of large request quantity of bullet screen transmission, other interfaces cannot be reached due to occupation of HTTP resources, so that the concurrence of million data cannot be borne.
Scheme II:
the message system, the live broadcast system and the barrage system are deployed separately. And when a user enters the live broadcasting room, the user divides the live broadcasting room into barrels according to the number of the live broadcasting room, and the live broadcasting room is taken as a unit. Assuming 500 people per bucket, a new bucket store user information is created when the bucket is 500 people full. When a user sends a message, the message service sends the message to the barrage system, the barrage system randomly selects a barrel in the live broadcast room sub-barrels, after selecting a barrel, the user information of the barrel is traversed, then the physical address cache of long links is queried according to the user information, and then the message is distributed to a physical machine of a corresponding message system through Dubbo, and the barrage system pushes the barrage message to the user.
The scheme can limit the current of the number of users who want to receive the barrage message when the barrage message is issued, so that one barrage message can be received by 500 persons at most, other spectators can not receive the barrage message, and certain spectators can not receive the barrage message all the time due to the random barrel selection strategy, and the scheme is not applicable to the concurrency scene of millions of data.
Disclosure of Invention
The embodiment of the application provides a barrage message processing method, device and barrage system, so that the server pressure is reduced and the system stability is improved under the condition of large barrage message concurrency.
The embodiment of the application adopts the following technical scheme:
in a first aspect, an embodiment of the present application provides a barrage message processing method, where the method includes:
acquiring one or more barrage messages sent by one or more first clients in unit time, and storing the one or more barrage messages in a corresponding storage list according to the corresponding relation between the serial number of the unit time and the storage list;
and acquiring a barrage pulling request sent by the second client, inquiring target barrage information from a corresponding storage list according to the inquiring time corresponding to the barrage pulling request, and returning the inquired target barrage information to the client.
In a second aspect, an embodiment of the present application further provides a barrage message processing apparatus, where the apparatus includes:
the storage unit is used for acquiring one or more barrage messages sent by one or more first clients in unit time, and storing the one or more barrage messages into the corresponding storage list according to the corresponding relation between the serial numbers of the unit time and the storage list;
and the processing unit is used for acquiring the barrage pulling request sent by the second client, inquiring the target barrage message from the corresponding storage list according to the inquiring time corresponding to the barrage pulling request, and returning the inquired target barrage message to the client.
In a third aspect, embodiments of the present application further provide a barrage system, including: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to perform a barrage message processing method.
In a fourth aspect, embodiments of the present application also provide a computer-readable storage medium storing one or more programs that, when executed by a barrage system including a plurality of application programs, cause the barrage system to perform a barrage message processing method.
The above-mentioned at least one technical scheme that this application embodiment adopted can reach following beneficial effect:
when receiving the barrage message sent by the client, the embodiment of the application does not directly send the barrage message to all users, but caches the barrage message so as to reduce the downlink pressure of the server; when the barrage message is acquired, the barrage message is stored according to time slicing, so that when the barrage message is required to be issued, the target barrage message can be quickly inquired from a storage list according to the inquiring time of the barrage pulling request, the inquired target barrage message is issued to a user of the barrage pulling request at one time, the server is prevented from using more resources to maintain user information, and the server pressure is further reduced, so that the method is particularly suitable for millions of data concurrency scenes in a live broadcast environment.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
FIG. 1 is a flowchart of a barrage message processing method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a storage structure of a barrage message according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating an upstream processing of a barrage message according to an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating downstream processing of a barrage message according to an embodiment of the present disclosure;
FIG. 5 is a block diagram of a bullet screen message sending device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a barrage system according to an embodiment of the present application.
Detailed Description
In order to facilitate understanding of the technical solutions of the embodiments of the present application, related terms related to the embodiments of the present application are described.
For the purposes, technical solutions and advantages of the present application, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The following describes in detail the technical solutions provided by the embodiments of the present application with reference to the accompanying drawings.
Fig. 1 is a flowchart of a barrage message processing method in an embodiment of the present application, where the method in fig. 1 is applied to a barrage system, as shown in fig. 1, the method in this embodiment includes the following steps:
s110, acquiring one or more barrage messages sent by one or more first clients in unit time, and storing the one or more barrage messages in a corresponding storage list according to the corresponding relation between the serial numbers of the unit time and the storage list.
The unit time can be set according to the concurrency supported by the server, if the concurrency supported by the server is large, the unit time can be set longer, and if the concurrency supported by the server is small, the unit time can be set shorter. For example, the unit time may be set to 5 seconds, 6 seconds, 10 seconds, or the like, which is not limited in this embodiment.
In this embodiment, a correspondence between the serial number of the unit time and the storage list is pre-built, the storage list uses the time block as the identifier, and the time block of the storage list corresponds to the serial number of the unit time. For example, referring to fig. 2, if the unit time is 5 seconds, the barrage messages acquired in the first unit time (0-5 seconds) are stored in the storage list with the time block being 0-5 seconds, the barrage messages acquired in the second unit time (5-10 seconds) are stored in the storage list with the time block being 5-10, the number of serial numbers in the unit time can be set according to the application requirement, the number is set to 12 in this embodiment, obviously, other numbers can be set, and this embodiment is not limited to this.
S120, acquiring a barrage pulling request sent by the second client, inquiring target barrage information from a corresponding storage list according to the inquiring time corresponding to the barrage pulling request, and returning the inquired target barrage information to the client.
The message pulling policy may be set for the client, so that the pulling barrage request sent by the second client may be obtained according to the preset message pulling policy. Message pull policies include, but are not limited to: and (5) pulling at fixed time, pulling after the current barrage is displayed, pulling according to a pulling instruction and the like.
It should be noted that, the user does not feel the request for pulling the barrage, that is, the user does not need to perform a special operation to trigger the client to send the request for pulling the barrage, the sending action of the request for pulling the barrage performed by the client is specified by the barrage system in the live platform, and the client only needs to reach the message pulling policy specified by the barrage system, that is, send the request for pulling the barrage to the barrage system.
As can be seen from fig. 1, in this embodiment, when receiving the barrage message sent by the client, the barrage message is not directly sent to all users, but is buffered, so as to reduce the downlink pressure of the server; when the barrage message is acquired, the barrage message is stored according to time slicing, so that when the barrage message is required to be issued, the target barrage message can be quickly inquired from a storage list according to the inquiring time of the barrage pulling request, the inquired target barrage message is issued to a user of the barrage pulling request at one time, the server is prevented from using more resources to maintain user information, and the server pressure is further reduced, so that the method is particularly suitable for millions of data concurrency scenes in a live broadcast environment.
In one embodiment, in the step S110, one or more barrage messages are parsed, and a live broadcasting room identifier of a first client that sends each barrage message and a time identifier of the barrage message are obtained; and acquiring a storage area corresponding to the live broadcasting room identifier, and sequentially storing one or more barrage messages into a storage list corresponding to the serial number of the unit time according to the message writing time indicated by the time identifier.
In this embodiment, a Redis (Remote Dictionary Server, remote dictionary service) database is configured to cache a barrage message, and when the barrage system is initialized, a correspondence between a live broadcasting room identifier and a storage area is established, for example, a room number of the live broadcasting room has uniqueness on a live broadcasting platform, the room number of the live broadcasting room can be used as a live broadcasting room identifier, the room number of the live broadcasting room is associated with the storage area, so that when one or more clients send N barrage messages in the live broadcasting room with a room number of XXX, the barrage system receives and parses the N barrage messages in 0-5 seconds, and sequentially writes the N barrage messages into a storage list with a time block of 0-5 seconds of storage area AA according to the sequence of message writing time, where the room number XXX corresponds to the storage area AA.
In one embodiment, before storing the barrage message, the type identification of one or more barrage messages is also parsed; if the type identification barrage message is a room message, sequentially storing one or more barrage messages into a storage list corresponding to the serial number of the unit time according to the message writing time indicated by the time identification; if the type identification barrage message is a full-platform broadcast message, the message is not stored and the barrage message is directly issued.
The live broadcast platform generally comprises a full-platform broadcast message and a room message, and because the concurrence of the full-platform broadcast message is generally less and the timeliness is strong in practical application, the live broadcast platform directly transmits the barrage message when judging that the barrage message is the full-platform broadcast message. The concurrency of room messages in the live broadcast platform is generally larger, the concurrency of barrage messages with large data volume in the embodiment also refers to room messages, and the timeliness of room messages is relatively less than that of full-platform broadcast messages, so when the barrage messages are judged to be room messages, the room messages are cached in the Redis database in the live broadcast platform.
Judging whether the barrage message is outdated according to the message writing time of the barrage message under the condition that the type identification barrage message is a room message, for example, comparing the message writing time with the current time, if the time difference is not larger than a preset value, the barrage message is not outdated, at the moment, acquiring the type of the room message corresponding to the barrage message, wherein the type of the room message has a corresponding relation with the type of a storage list, and storing the barrage message into the storage list of the type corresponding to the type of the room message according to the corresponding relation; if the time difference is larger than the preset value, the barrage message is out of date, and the barrage message is discarded.
In the live platform, the room messages generally include a general message and an important message, the important message may be a gift message, and other room messages except the important message are general messages, where the important message may be set. In order to facilitate separate processing of the common message and the important message in the live broadcast platform, for example, the expiration time of the common message is shorter than that of the important message, in this embodiment, a first type storage area and a second type storage area are set for each storage area corresponding to the identifier of the live broadcast room, and referring to fig. 2, the first type storage area is used for storing the common message, and the second type storage area is used for storing the important message. When the room message is judged to be the common message, the common message is stored in the storage list in the first type storage area, and when the room message is judged to be the important message, the important message is stored in the storage list in the second type storage area.
In one embodiment, each stored list is correspondingly provided with an expiration time, and when the time for writing a barrage message in the stored list into the stored list exceeds the expiration time, the barrage message is deleted.
Therefore, various bullet screen messages can be correspondingly processed through the steps, so that under the condition of acquiring a bullet screen pulling request, the bullet screen pulling request is analyzed, and a live broadcasting room identifier and a message pulling offset of a second client side for transmitting bullet screen messages are acquired; and inquiring a storage area corresponding to the live broadcasting room identifier of the second client, determining a storage list corresponding to the inquiring time from the storage area, and acquiring the full data in the storage list taking the message pulling offset as a starting point as a target barrage message.
Since the types of the storage areas in the present embodiment correspond to the types of the room messages, the room messages generally include two types of the normal messages and the important messages, and the storage areas correspondingly include the first type storage area and the second type storage area. When the corresponding storage area is identified in the live broadcasting room of the second client, all kinds of storage areas are queried, namely the first-class storage area and the second-class storage area are queried.
The acquiring of the live room identification of the second client sending the barrage message is understood here to mean acquiring the live room identification of the second client at the current moment. In practical application, because the user controls the client to frequently switch live rooms, and the condition that the live room of the barrage message string exists, the embodiment obtains the live room identification of the second client at the current moment, but not obtains the time of the second client when the barrage pulling request is sent, so when the user switches to the similar condition in the live room B after the barrage pulling request is sent by the second client in the live room A, the target barrage message is returned to the live room B because the live room identification of the live room B is obtained at the moment, and the condition that the barrage message string is in the live room does not exist.
Here, the message pulling offset indicates the starting point of the query in the storage list, referring to fig. 2, if the message pulling offset carried by the pulling barrage request is indicated as 3, and the pulling barrage request corresponds to the storage list with a time block of 5-10 seconds in the first storage area in fig. 2, the third data block in the storage list with a time block of 5-10 seconds starts to read the barrage message until the last data block in the storage list.
The target barrage message queried in this embodiment generally includes a plurality of barrages, and in order to save communication resources, the target barrage message is packaged into a message and sent to the second client. The processing procedure of the barrage message according to the present application is described in detail below with reference to fig. 3 and 4.
As shown in fig. 3, the client uses MQTT (Message Queuing Telemetry Transport, message queue telemetry transport protocol) to access the proxy service for long connection, and the client may be a client in a Web environment, or may be a client in an operating system such as PC (personal computer), android (Android), IOS (mobile operating system developed by apple corporation), or the like.
The MOVEIM barrage producer is started in the long connection access proxy service, the MOVEIM barrage consumer is started in the barrage system, communication between the long connection access proxy service and the barrage system is realized through the MOVEIM barrage consumer and the MOVEIM barrage producer, when the MOVEIM barrage producer receives a message based on the MQTT, the MOVEIM barrage producer can distinguish whether the message is a barrage message or not according to the TOPIC of the message, and if the message is the barrage message, the barrage system is called by using the RPC (Romote Procedure Call, remote procedure call) protocol.
When a MOVEIM barrage consumer of the barrage system receives a new barrage Message, the barrage Message is filtered through an uplink Up Chain, and when the content of the barrage Message is free of problems, the barrage Message is processed through a downlink Down Chain to expire, sort the Message types and the like, and then the barrage Message is stored in an MQ (Message Queue) service in a JSON format. Here fig. 3 illustrates the implementation of MQ services in Kafka.
Kafka was originally developed by Linkedin corporation as a distributed, partitioned, multi-copy, multi-subscriber, zookeeper-based distributed journaling system, which can also be regarded as an MQ system, commonly used for web/nginx journals, access journals, messaging services, and the like.
When MOVEIM barrage consumers of the barrage system consume the MQ message queues, if the barrage messages are full-platform broadcast messages, the barrage messages are directly sent to all long-connection access proxy services and traverse all online users to issue messages. If the barrage message is a room message, comparing the message writing time with the current time, if the comparison result shows that the barrage message is overtime, discarding the barrage message, and if the comparison result shows that the barrage message is not overtime, writing the barrage message into a Redis cache.
As shown in fig. 4, the client uses MQTT (Message Queuing Telemetry Transport, message queue telemetry transport protocol) to access the proxy service for long connection, and the client may be a client in a Web environment, or may be a client in an operating system such as PC (personal computer), android (Android), IOS (mobile operating system developed by apple corporation), or the like.
The MOVEIM bullet screen consumer is started in the long connection access proxy service, the MOVEIM bullet screen producer is started in the bullet screen system, the communication between the long connection access proxy service and the bullet screen system is realized through the MOVEIM bullet screen consumer and the MOVEIM bullet screen producer, when the MOVEIM bullet screen consumer receives the message based on the MQTT, the MOVEIM bullet screen consumer can distinguish whether the message is a bullet screen pulling request or not according to the TOPIC of the message, if the message is the bullet screen pulling request, the bullet screen pulling request is sent to the MOVEIM bullet screen producer of the bullet screen system, the MOVEIM bullet screen producer carries out data query from a Redis cache according to the query time of the bullet screen pulling request, a query result is obtained, the query result is packaged into a message which is sent to the MOVEIM bullet screen consumer of the long connection access proxy service, and the MOVEIM bullet screen consumer pushes the message to the client.
The barrage message processing method of the present embodiment is particularly suitable for use in a million concurrent barrage system, and has at least the following advantages as described in connection with fig. 4 and 5:
1. when a client sends a barrage message, the barrage message is not directly sent to all clients, but is stored in a cache for reducing the downstream pressure of the server.
2. The client actively pulls the barrage messages from the cache, distributes millions of barrage messages cached in the cache in batches, packages a plurality of target barrage messages into one message in each distribution process, and can further reduce the pressure of the server.
3. Because the client actively pulls the barrage message, the situation that the barrage message is in a live broadcasting room does not exist.
4. The barrage system filters the barrage messages received, filters barrage messages with unsatisfactory content, and ensures the health of barrage content in the live broadcast process.
5. When a new barrage message is received, the MQ service is used as a middleware to buffer millions of concurrent barrage messages, so that the impact of large data volume on the barrage system can be relieved, and the stability of the barrage system is ensured.
Fig. 5 is a block diagram of a barrage message processing apparatus according to an embodiment of the present application, where the apparatus of the present embodiment is applied to a barrage system, as shown in fig. 5, a barrage message processing apparatus 500 includes:
a storage unit 510, configured to obtain one or more barrage messages sent by one or more first clients in a unit time, and store the one or more barrage messages in a corresponding storage list according to a correspondence between a serial number of the unit time and the storage list;
and the processing unit 520 is configured to obtain a barrage pulling request sent by the second client, query the target barrage message from the corresponding storage list according to the query time corresponding to the barrage pulling request, and return the queried target barrage message to the client.
In one embodiment, the storage unit 510 is configured to parse the one or more barrage messages, and obtain a live room identifier of a first client that sends each barrage message and a time identifier of the barrage message; and acquiring a storage area corresponding to the live broadcasting room identifier, and sequentially storing the one or more barrage messages into a storage list corresponding to the serial number of the unit time according to the message writing time indicated by the time identifier.
In one embodiment, the storage unit 510 is further configured to parse a type identifier of the one or more barrage messages; if the type identification bullet screen information is room information, sequentially storing the bullet screen information or the bullet screen information into a storage list corresponding to the serial number of the unit time according to the information writing time indicated by the time identification; and if the type identifies that the barrage message is a full-platform broadcast message, the message is not stored and the barrage message is directly issued.
In one embodiment, the storage unit 510 is further configured to determine whether the barrage message is out of date according to the message writing time of the barrage message if the type identifies that the barrage message is a room message, and if not, acquire a type of the room message corresponding to the barrage message, where the type of the room message has a correspondence with a type of a storage list, and store the barrage message into the storage list corresponding to the type of the room message according to the correspondence; and discarding the barrage message if the barrage message is out of date.
In one embodiment, the processing unit 520 is configured to obtain the pull barrage request sent by the second client according to a preset message pull policy.
In one embodiment, the processing unit 520 is further configured to parse the barrage request to obtain a live room identifier and a message pulling offset of the second client that sends the barrage message; and inquiring a storage area corresponding to the live broadcasting room identifier of the second client, determining a storage list corresponding to the inquiring time from the storage area, and acquiring the full data in the storage list taking the message pulling offset as a starting point as a target barrage message.
In one embodiment, the processing unit 520 is further configured to package the target barrage message into a message and send the message to the second client.
It can be understood that the bullet screen message processing apparatus can implement the steps of the bullet screen message processing method performed by the bullet screen system provided in the foregoing embodiment, and the relevant explanation about the bullet screen message processing method is applicable to the bullet screen message processing apparatus, which is not described herein again.
Fig. 6 is a schematic structural view of a bullet screen system according to one embodiment of the present application. Referring to fig. 6, at the hardware level, the barrage system includes a processor, and optionally an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory (non-volatile Memory), such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, network interface, and memory may be interconnected by an internal bus, which may be an ISA (Industry Standard Architecture ) bus, a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or EISA (Extended Industry Standard Architecture ) bus, among others. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 6, but not only one bus or type of bus.
And the memory is used for storing programs. In particular, the program may include program code including computer-operating instructions. The memory may include memory and non-volatile storage and provide instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs, and forms the barrage message processing device on the logic level. The processor is used for executing the programs stored in the memory and is specifically used for executing the following operations:
acquiring one or more barrage messages sent by one or more first clients in unit time, and storing the one or more barrage messages in a corresponding storage list according to the corresponding relation between the serial number of the unit time and the storage list;
and acquiring a barrage pulling request sent by the second client, inquiring target barrage information from a corresponding storage list according to the inquiring time corresponding to the barrage pulling request, and returning the inquired target barrage information to the client.
The method performed by the barrage message processing apparatus disclosed in the embodiment of fig. 1 of the present application may be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
The barrage system may also execute the method executed by the barrage message processing apparatus in fig. 1, and implement the functions of the barrage message processing apparatus in the embodiment shown in fig. 1, which is not described herein again.
The embodiments of the present application also provide a computer readable storage medium storing one or more programs, where the one or more programs include instructions, which when executed by a barrage system including a plurality of application programs, enable the barrage system to perform a method performed by a barrage message processing apparatus in the embodiment shown in fig. 1, and specifically configured to perform:
acquiring one or more barrage messages sent by one or more first clients in unit time, and storing the one or more barrage messages in a corresponding storage list according to the corresponding relation between the serial number of the unit time and the storage list;
and acquiring a barrage pulling request sent by the second client, inquiring target barrage information from a corresponding storage list according to the inquiring time corresponding to the barrage pulling request, and returning the inquired target barrage information to the client.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (7)

1. A barrage message processing method, the method comprising:
acquiring one or more barrage messages sent by one or more first clients in unit time, and storing the one or more barrage messages in a corresponding storage list according to the corresponding relation between the serial number of the unit time and the storage list;
acquiring a barrage pulling request sent by a second client, inquiring a target barrage message from a corresponding storage list according to the inquiring time corresponding to the barrage pulling request, and returning the inquired target barrage message to the client; the time block of the storage list corresponds to the serial number of the unit time; the target barrage message is the total data in the corresponding storage list;
storing the one or more barrage messages into the corresponding storage list according to the corresponding relation between the serial number of the unit time and the storage list, wherein the method comprises the following steps:
analyzing the one or more barrage messages, and acquiring a live broadcasting room identifier of a first client side for transmitting each barrage message and a time identifier of the barrage message; acquiring a storage area corresponding to the live broadcasting room identifier, and sequentially storing the one or more barrage messages into a storage list corresponding to the serial number of the unit time according to the message writing time indicated by the time identifier;
inquiring the target barrage message from the corresponding storage list according to the inquiring time corresponding to the barrage pulling request, wherein the inquiring comprises the following steps:
analyzing the bullet screen pulling request to obtain a live broadcasting room identifier and a message pulling offset of a second client side for sending the bullet screen message; inquiring a storage area corresponding to a live broadcasting room identifier of the second client, determining a storage list corresponding to the inquiring time from the storage area, and acquiring full data in the storage list taking the message pulling offset as a starting point as a target barrage message;
wherein, according to the corresponding relation between the serial number of the unit time and the storage list, the one or more barrage messages are stored in the corresponding storage list, and the method further comprises the following steps:
analyzing the type identification of the one or more barrage messages; if the type identification bullet screen information is room information, sequentially storing the bullet screen information or the bullet screen information into a storage list corresponding to the serial number of the unit time according to the information writing time indicated by the time identification; and if the type marks that the barrage message is the full-platform broadcast message, not storing the barrage message and directly issuing the barrage message.
2. The method of claim 1, wherein if the type identifies the barrage message as a room message, the method further comprises:
judging whether the barrage message is out of date according to the message writing time of the barrage message, if not, acquiring the type of the room message corresponding to the barrage message, wherein the type of the room message has a corresponding relation with the type of a storage list, and storing the barrage message into the storage list of the type corresponding to the type of the room message according to the corresponding relation;
and discarding the barrage message if the barrage message is out of date.
3. The method of claim 1 or 2, wherein obtaining the pull barrage request sent by the second client comprises:
and acquiring a bullet screen pulling request sent by the second client according to a preset message pulling strategy.
4. The method of claim 1, wherein returning the queried target barrage message to the client comprises:
and packaging the target barrage message into a message and transmitting the message to the second client.
5. A message processing apparatus, the apparatus comprising:
the storage unit is used for acquiring one or more barrage messages sent by one or more first clients in unit time, and storing the one or more barrage messages into the corresponding storage list according to the corresponding relation between the serial numbers of the unit time and the storage list; the method is particularly used for analyzing the one or more barrage messages and acquiring a live broadcasting room identifier of a first client side for sending each barrage message and a time identifier of the barrage message; acquiring a storage area corresponding to the live broadcasting room identifier, and sequentially storing the one or more barrage messages into a storage list corresponding to the serial number of the unit time according to the message writing time indicated by the time identifier;
the processing unit is used for acquiring a barrage pulling request sent by the second client, inquiring target barrage information from a corresponding storage list according to the inquiring time corresponding to the barrage pulling request, and returning the inquired target barrage information to the client; the time block of the storage list corresponds to the serial number of the unit time; the target barrage message is the total data in the corresponding storage list; the method is particularly used for analyzing the barrage pulling request and acquiring a live broadcasting room identifier and a message pulling offset of a second client side for sending the barrage message; inquiring a storage area corresponding to a live broadcasting room identifier of the second client, determining a storage list corresponding to the inquiring time from the storage area, and acquiring full data in the storage list taking the message pulling offset as a starting point as a target barrage message;
the storage unit is further used for analyzing the type identification of the one or more barrage messages; if the type identification bullet screen information is room information, sequentially storing the bullet screen information or the bullet screen information into a storage list corresponding to the serial number of the unit time according to the information writing time indicated by the time identification; and if the type marks that the barrage message is the full-platform broadcast message, not storing the barrage message and directly issuing the barrage message.
6. A barrage system comprising:
a processor; and
a memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method of any of claims 1 to 4.
7. A computer readable storage medium storing one or more programs, which when executed by a barrage system comprising a plurality of application programs, cause the barrage system to perform the method of any of claims 1-4.
CN202011311163.3A 2020-11-20 2020-11-20 Barrage message processing method and device and barrage system Active CN114520922B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011311163.3A CN114520922B (en) 2020-11-20 2020-11-20 Barrage message processing method and device and barrage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011311163.3A CN114520922B (en) 2020-11-20 2020-11-20 Barrage message processing method and device and barrage system

Publications (2)

Publication Number Publication Date
CN114520922A CN114520922A (en) 2022-05-20
CN114520922B true CN114520922B (en) 2024-03-12

Family

ID=81594271

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011311163.3A Active CN114520922B (en) 2020-11-20 2020-11-20 Barrage message processing method and device and barrage system

Country Status (1)

Country Link
CN (1) CN114520922B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108668158A (en) * 2017-03-31 2018-10-16 武汉斗鱼网络科技有限公司 A kind of barrage synchronous method, client and barrage server
CN109275042A (en) * 2018-10-17 2019-01-25 武汉斗鱼网络科技有限公司 A kind of distribution method, device, terminal and the storage medium of barrage message
CN109729436A (en) * 2017-10-31 2019-05-07 腾讯科技(深圳)有限公司 Advertisement barrage treating method and apparatus
CN110971919A (en) * 2018-09-30 2020-04-07 武汉斗鱼网络科技有限公司 Degradation method of bullet screen message and related device
CN111586437A (en) * 2020-04-08 2020-08-25 天津车之家数据信息技术有限公司 Barrage message processing method, system, computing device and storage medium
CN111770350A (en) * 2020-06-23 2020-10-13 北京字节跳动网络技术有限公司 Method and device for pulling message in live broadcast room, computer equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101559769B1 (en) * 2008-03-19 2015-10-13 엘지전자 주식회사 Middleware method for providing a list of Records and recording media for the method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108668158A (en) * 2017-03-31 2018-10-16 武汉斗鱼网络科技有限公司 A kind of barrage synchronous method, client and barrage server
CN109729436A (en) * 2017-10-31 2019-05-07 腾讯科技(深圳)有限公司 Advertisement barrage treating method and apparatus
CN110971919A (en) * 2018-09-30 2020-04-07 武汉斗鱼网络科技有限公司 Degradation method of bullet screen message and related device
CN109275042A (en) * 2018-10-17 2019-01-25 武汉斗鱼网络科技有限公司 A kind of distribution method, device, terminal and the storage medium of barrage message
CN111586437A (en) * 2020-04-08 2020-08-25 天津车之家数据信息技术有限公司 Barrage message processing method, system, computing device and storage medium
CN111770350A (en) * 2020-06-23 2020-10-13 北京字节跳动网络技术有限公司 Method and device for pulling message in live broadcast room, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
从"场景"理论视角探究弹幕视频的发展;付嘉鑫;;科技传播;20160308(第05期);全文 *

Also Published As

Publication number Publication date
CN114520922A (en) 2022-05-20

Similar Documents

Publication Publication Date Title
CN106559677B (en) Terminal, cache server and method and device for acquiring video fragments
EP3002927B1 (en) Page redirection method, routing device, terminal device and system
US10110507B2 (en) Push-based transmission of resources and correlated network quality estimation
CN108063769B (en) Method and device for realizing content service and content distribution network node
EP2493191B1 (en) Method, device and system for realizing hierarchically requesting content in http streaming system
CN110933517B (en) Code rate switching method, client and computer readable storage medium
US11172044B2 (en) Content based byte-range caching using a dynamically adjusted chunk size
CN108810657B (en) Method and system for setting video cover
JP2019506696A (en) Resource acquisition method and related apparatus
CN103973662A (en) Streaming media request method and controller
CN107040615B (en) Downloading method of media fragment, terminal and computer readable storage medium
CN110427266B (en) Data redundancy architecture based on MQTT service
CN114520922B (en) Barrage message processing method and device and barrage system
CN107959667A (en) A kind of method for pushing of media slicing, server and client
CN108460042B (en) Page display method, related equipment and system
US9071954B2 (en) Wireless optimized content delivery network
CN114301848A (en) CDN-based communication method, system, device and storage medium
CN110247808B (en) Information transmission method, device, equipment and readable storage medium
CN112202914A (en) Message pushing method and device
CN114428686A (en) Message communication method, device, electronic equipment and readable storage medium
CN114615333A (en) Resource access request processing method, device, equipment and medium
CN112839070A (en) Data processing method and device and node equipment in CDN (content delivery network)
CN111417031A (en) File transmission method and device and electronic equipment
CN112751886B (en) Transcoding method, transcoding system, transmission equipment and storage medium
CN114598701B (en) CDN scheduling method, CDN scheduling system, computing device and storage medium

Legal Events

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