CN107231350B - Message processing method and device - Google Patents

Message processing method and device Download PDF

Info

Publication number
CN107231350B
CN107231350B CN201710374188.XA CN201710374188A CN107231350B CN 107231350 B CN107231350 B CN 107231350B CN 201710374188 A CN201710374188 A CN 201710374188A CN 107231350 B CN107231350 B CN 107231350B
Authority
CN
China
Prior art keywords
live broadcast
message
messages
merging
backlog
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
CN201710374188.XA
Other languages
Chinese (zh)
Other versions
CN107231350A (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 longzhixin Technology Co.,Ltd.
Original Assignee
Beijing Panda Mutual Entertainment 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 Panda Mutual Entertainment Technology Co Ltd filed Critical Beijing Panda Mutual Entertainment Technology Co Ltd
Priority to CN201710374188.XA priority Critical patent/CN107231350B/en
Publication of CN107231350A publication Critical patent/CN107231350A/en
Application granted granted Critical
Publication of CN107231350B publication Critical patent/CN107231350B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets

Abstract

The embodiment of the invention provides a message processing method and device, and relates to the technical field of Internet live broadcast. Wherein the method comprises the following steps: acquiring message concurrency of a live broadcast room; if the message concurrency exceeds a first threshold value, the messages in the live broadcast room are merged; and pushing the combined and processed message to a client side accessed to the live broadcast room. The embodiment of the invention can reduce the gateway bandwidth occupied by pushing the user message to the client participating in the live broadcast room during the live broadcast peak period, thereby effectively avoiding the gateway from being in fault due to overload operation of the gateway.

Description

Message processing method and device
Technical Field
The invention relates to the technical field of internet live broadcast, in particular to a message processing method and device.
Background
The network live broadcast system is an internet system which broadcasts a live video stream of a main broadcast user to a plurality of audience users for watching. The webcast system is generally divided into live rooms or rooms, and generally includes, in a room or a live room: a single anchor user and a plurality of participating users.
The participating users perform real-time interaction with the anchor user by sending instant messages to the live broadcast room, and in order to realize the real-time interaction, a set of long links need to be maintained through a gateway in the background, namely, the participating users and the client of the anchor user need to be connected with the corresponding gateway to normally send and receive barrage messages. Typically, during live peak periods, the surge in message concurrency causes gateways to run overloaded, in which case it is easy to cause some gateways to fail. Once such a problem appears, can make a large amount of barrages normally propelling movement go out, influence user experience.
Disclosure of Invention
The invention provides a message processing method and a message processing device, and aims to reduce the gateway bandwidth occupied by pushing user messages to a client participating in a live broadcast room during the live broadcast peak period, so that the condition that a gateway fails due to overload operation of the gateway is effectively avoided.
In order to solve the above technical problem, the present invention provides a message processing method, including:
acquiring message concurrency of a live broadcast room;
if the message concurrency exceeds a first threshold value, the messages in the live broadcast room are merged;
and pushing the combined and processed message to a client side accessed to the live broadcast room.
Optionally, the merging the messages in the live broadcast room includes:
determining a backlog duration based on the message concurrency amount;
packing the messages in the backlog duration to generate a message packet;
wherein, the message packet is the merged message.
Optionally, determining a message backlog duration based on the message concurrency amount includes:
acquiring a plurality of threshold intervals and reference time lengths corresponding to the threshold intervals;
and determining the reference time length corresponding to the threshold interval where the message concurrency quantity is located as the backlog time length.
Optionally, the merging the messages in the live broadcast room includes:
merging the messages of the live broadcast rooms to delete part of the messages;
and the residual information after deletion is the information after the merging processing.
Optionally, merging the messages in the live broadcast room to delete part of the messages, including:
merging the messages with the same/similar message content; and/or
And combining a plurality of messages from the same message source.
Optionally, the method further comprises:
carrying out priority judgment on the messages of the live broadcast room;
and merging the messages in the live broadcast room, wherein the merging process comprises the following steps:
and merging the messages with the priority lower than the preset level.
Optionally, the method further comprises:
acquiring total message concurrency of a plurality of live broadcast rooms;
if the total message concurrency exceeds a second threshold value, finding out live broadcast rooms which are not subjected to combination processing from the plurality of live broadcast rooms;
and merging the messages of the live broadcast rooms which are not merged.
Optionally, the method further comprises:
determining standard backlog duration according to the total message concurrency quantity;
acquiring backlog duration adopted by current merging processing of each live broadcast room in the plurality of live broadcast rooms;
finding out the live broadcast rooms of which the backlog duration adopted by the current merging processing is smaller than the standard backlog duration from the plurality of live broadcast rooms;
and merging the messages of the live broadcast rooms of which the backlog duration adopted by the current merging processing is smaller than the standard backlog duration by adopting the standard backlog duration.
In order to solve the above technical problem, the present invention further provides a message processing apparatus, including:
the first acquisition module is used for acquiring the message concurrency amount of the live broadcast room;
the processing module is used for merging the messages in the live broadcast room if the message concurrency exceeds a first threshold;
and the pushing module is used for pushing the combined and processed message to a client side accessed to the live broadcast room.
In the embodiment of the invention, when the message concurrency sent to a certain live broadcast room exceeds the preset threshold, each message sent by a user participating in the live broadcast room is not pushed to each client accessing the live broadcast room one by one, but a plurality of messages sent to the live broadcast room are merged and then the merged messages are pushed to the client accessing the live broadcast room in a unified manner. In the live broadcast peak period, the frequency of pushing the message to the client by the gateway can be reduced to a great extent, and the gateway bandwidth occupied by the message of the pushing user is effectively reduced, so that the condition that the gateway breaks down due to overload operation of the gateway is effectively avoided.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of a message processing method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a message processing method according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of a message processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, and "a" and "an" generally include at least two, but do not exclude at least one, unless the context clearly dictates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used to describe XXX in embodiments of the present invention, these XXX should not be limited to these terms. These terms are only used to distinguish XXX from each other. For example, a first XXX may also be referred to as a second XXX, and similarly, a second XXX may also be referred to as a first XXX, without departing from the scope of embodiments of the present invention.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a monitoring", depending on the context. Similarly, the phrase "if it is determined" or "if it is monitored (a stated condition or event)" may be interpreted as "when determining" or "in response to determining" or "when monitoring (a stated condition or event)" or "in response to monitoring (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a commodity or system that includes the element.
Fig. 1 is a flowchart illustrating a message processing method according to an embodiment of the present invention. As shown in fig. 1, the method includes:
101. and acquiring the message concurrency amount of the live broadcast room.
102. And if the message concurrency exceeds a first threshold value, combining the messages in the live broadcast room.
103. And pushing the combined and processed message to a client side accessed to the live broadcast room.
In the live application scene, the messages sent to the live room by the users participating in the live room include text messages, picture messages, gift messages and the like. The message concurrency quantity refers to the total number of messages sent to the live broadcast room at the same time.
In step 102, the first threshold may be preset according to past experience. Of course, the first threshold value can also be updated at any time according to actual conditions. The specific updating mode is that whether the current live system has the operation of closing and/or opening the main broadcast is monitored; if yes, acquiring the number N of gateways in the current live broadcast system and the maximum message quantity M which can be processed by a single gateway at the same time; acquiring the number Q of live broadcast rooms in a current live broadcast system; taking NM/Q as the maximum message concurrency of a single live broadcast room; updating the first threshold as a function of a maximum amount of message concurrency for the single live broadcast. To prevent the gateway from operating at full load, the first threshold may be set to within ninety percent of the maximum message concurrency amount for a single live broadcast.
It should be noted that, in a normal situation, the number of gateways set for the live broadcast system is a fixed value, and the maximum message volume that can be processed by each gateway at the same time is also a fixed value, so that it is only necessary to monitor whether there is an operation of closing and/or opening the main broadcast, and it can be determined whether the number of live broadcast rooms currently being live broadcast in the current live broadcast system changes, and once the change amount of the number of live broadcast rooms is determined, the first threshold value can be updated. Of course, if the number of gateways set for the live broadcast system is changed or the performance of the gateway device in the live broadcast system is improved or replaced, the first threshold value may also be updated according to the actual situation.
For example, the number of gateways currently set for the live broadcast system is 2, the maximum message amount that a single gateway can handle at the same time is 1000, and the number of live broadcast rooms currently being live broadcast is 20, then the maximum message concurrency amount of a single live broadcast room is 100 through calculation, and in order to prevent the gateway from operating at full load, the first threshold value may be set within 90.
If the message concurrency exceeds a first threshold, merging the messages in the live broadcast room, wherein the merging can be realized by one or more of the following methods:
the method I includes the steps that a backlog duration is preset, and messages of the live broadcast room in the backlog duration are packaged to generate a message package. For example, the preset backlog duration is 1s, when the concurrency of the messages sent to the live broadcast room exceeds a first threshold at a certain moment, timing is carried out from the moment, and a plurality of messages sent to the live broadcast room within the timing 1s are packaged to generate a message package. And pushing the message packet to all clients accessed to the live broadcast room.
And secondly, randomly deleting the message sent to the live broadcast room. For example, if 100 messages are sent to the live broadcast room at a certain time, 20 messages are randomly deleted, and the remaining 80 messages are pushed to all clients accessing the live broadcast room one by one.
And thirdly, combining the messages with the same/similar message contents in the messages sent to the live broadcast room. For example, there are multiple messages that are the same/similar in the message sent to the live broadcast room at a certain time, so that the same/similar messages can be combined into one, that is, only one message of the same/similar messages is reserved for pushing.
And fourthly, combining a plurality of messages of the same message source in the messages sent to the live broadcast room. Wherein, the messages from the same message source can be understood as messages sent by the same participating user. For example, a participating user may send messages to the live broadcast room frequently, and some of the participating user's messages may be deleted so as not to affect the participating interaction of other participating users.
In the embodiment of the invention, when the message concurrency sent to a certain live broadcast room exceeds the preset threshold, each message sent by a user participating in the live broadcast room is not pushed to each client accessing the live broadcast room one by one, but a plurality of messages sent to the live broadcast room are merged and then the merged messages are pushed to the client accessing the live broadcast room in a unified manner. In the live broadcast peak period, the frequency of pushing the message to the client by the gateway can be reduced to a great extent, and the gateway resource occupied by pushing the user message is effectively reduced, so that the condition that the gateway breaks down due to overload operation of the gateway is effectively avoided.
Fig. 2 is a flowchart illustrating a message processing method according to another embodiment of the present invention. As shown in fig. 2, the method includes:
201. and acquiring the message concurrency amount of the live broadcast room.
202. And if the message concurrency exceeds a first threshold, determining the backlog duration based on the message concurrency.
203. And packing the messages in the backlog duration to generate a message packet, wherein the message packet is the messages after the merging processing.
204. And pushing the combined and processed message to a client side accessed to the live broadcast room.
A step of obtaining a message concurrency amount of a live broadcast room in step 201, specifically, obtaining at least one gateway maintaining long connection for the live broadcast room; respectively acquiring the single message concurrency of the live broadcast room received by the at least one gateway; and taking the sum of the single message concurrency amount on the at least one gateway as the message concurrency amount of the live broadcast room. In practical applications, there may be one or more gateways that maintain long connections for the live broadcast. When one gateway is provided, the single message concurrency amount aiming at the live broadcast room on the gateway is the message concurrency amount of the live broadcast room; and when a plurality of gateways exist, adding the single message concurrency amount on the plurality of gateways to obtain the sum, namely the message concurrency amount of the live broadcast room.
In the step 202, when it is monitored that the message concurrency of the live broadcast room exceeds the first threshold, the backlog duration is determined according to the message concurrency. Generally, the larger the message concurrency, the longer its backlog.
In an implementation, the determining the backlog duration according to the message concurrency amount may include: acquiring a plurality of threshold intervals and reference time lengths corresponding to the threshold intervals; and determining the reference time length corresponding to the threshold interval where the message concurrency quantity is located as the backlog time length.
For example, the maximum message concurrency amount of the live broadcast room is X, the first threshold is set to 70% X, 70% X to 90% X are set to the first threshold interval, 90% X and above are set to the second threshold interval, the first reference duration is set to a for the first threshold interval, and the second reference duration is set to b for the second threshold interval. If the obtained message concurrency amount Y of the live broadcast room is 80% X, the backlog duration can be determined to be a as Y is within the first threshold interval. Preferably, a may be set to 1s, and b may be set to 2 s.
As can be seen from the description of the above embodiment, the first threshold may be updated according to an actual situation, that is, the first threshold is updated according to the obtained maximum message concurrency amount of the new live broadcast. Optionally, when the first threshold is set, a specific occupation ratio (for example, 70%) is set in advance, and after the maximum message concurrency amount of the new live broadcast room is acquired, a product of the specific occupation ratio and the maximum message concurrency amount of the new live broadcast room is used as the first threshold. Similarly, when the upper limit and the lower limit of the threshold interval are set, a lower limit occupation ratio and an upper limit occupation ratio are also preset, after the maximum message concurrency amount of a new live broadcast room is obtained, the product of the lower limit occupation ratio and the maximum message concurrency amount of the live broadcast room is used as the lower limit value of the threshold interval, and the product of the upper limit occupation ratio and the maximum message concurrency amount of the live broadcast room is used as the upper limit value of the threshold interval.
In the above steps 203 and 204, when the message data is transmitted through a TCP (Transmission Control Protocol), some redundant information is added to the message data to ensure that the message data can be normally pushed to each client accessing to the live broadcast room. When a plurality of messages in the backlog duration are packed, most of redundant information of the same part in the messages can be collected, namely only one piece of redundant information of the same part is reserved in a message packet, so that the data volume is effectively compressed, and the plurality of messages in the backlog duration are compressed into one message packet and are pushed to a client side accessed to the live broadcast room once, so that the pushing frequency of a gateway is greatly reduced.
In an implementation scheme, the same or similar messages in the messages within the backlog duration may also be merged, that is, only one copy of the same or similar messages is reserved in the message packet; or multiple identical or similar messages from the same message source (for example, multiple messages sent by the same participating user can be regarded as from the same message source) are merged, that is, only one identical or similar message from the same source is reserved in the message packet.
In the embodiment of the invention, when the message concurrency sent to a certain live broadcast room exceeds the preset threshold, each message sent by a user participating in the live broadcast room is not pushed to each client accessing the live broadcast room one by one, but a plurality of messages sent to the live broadcast room are merged and then the merged messages are pushed to the client accessing the live broadcast room in a unified manner. In the live broadcast peak period, the frequency of pushing the message to the client by the gateway can be reduced to a great extent, and the gateway bandwidth occupied by the message of the pushing user is effectively reduced, so that the condition that the gateway breaks down due to overload operation of the gateway is effectively avoided.
In each of the above embodiments and each of the following embodiments, the method further includes: carrying out priority judgment on the messages of the live broadcast room; and merging the messages in the live broadcast room, wherein the merging process comprises the following steps: and merging the messages with the priority lower than the preset level. The priority of the message may be set according to the importance of the message, for example, the priority of the gift message is set to be the highest, the priority of the text message is set to be the third, the priority of the text message is set to be the second, and the priority of the picture message is the lowest, and the priority of the picture message is set to be the first. The preset level is three, so that when the message is combined, the second-level text message and the first-level picture message are combined, and the third-level gift message is pushed in real time without being combined.
While the first threshold is set for a single room, a second threshold may also be set for the total message concurrency in the entire live system. And when the total message concurrency exceeds a second threshold value, merging the messages of the live rooms which are not subjected to merging processing in the live broadcasting system. The specific implementation method comprises the following steps: acquiring total message concurrency of a plurality of live broadcast rooms; if the total message concurrency exceeds a second threshold value, finding out live broadcast rooms which are not subjected to combination processing from the plurality of live broadcast rooms; and merging the messages of the live broadcast rooms which are not merged. Wherein the plurality of live rooms refers to all live rooms in the whole live system.
Preferably, the step of merging the messages in one of the live broadcast rooms that are not merged may specifically include: determining a standard backlog duration based on the total message concurrency; and packing the messages in the standard backlog duration to generate a message packet.
The step of determining a standard backlog duration based on the total message concurrency amount may specifically include: acquiring a plurality of standard threshold intervals set for the total message concurrency and standard reference durations corresponding to the standard threshold intervals; and determining the standard reference time length corresponding to the standard threshold interval where the total message concurrency quantity is located as the standard backlog time length.
The number of the gateways in the live broadcast system and the message amount which can be processed by a single gateway at the same time are fixed, and the maximum message concurrence amount which can be processed by the live broadcast system is the product of the number of the gateways and the message amount which can be processed by the single gateway at the same time, namely, the maximum message concurrence amount which can be processed by the live broadcast system is a fixed value. Therefore, the second threshold may be specifically set to a specific value when setting the second threshold, as long as the specific value is within ninety percent of the maximum message concurrency that can be handled by the live system. When the standard threshold interval and the standard reference time length corresponding to each standard threshold interval are set for the total message concurrency, the upper and lower limits of the standard threshold interval can be set to be a specific numerical value. For example. The maximum message concurrency amount which can be processed by the live broadcast system is 2000, the first standard threshold interval is set to be 1400-1800, the standard reference time length is 1s, the second standard threshold interval is set to be 1800 or above, and the standard reference time length is 2 s.
Further, when the total message concurrency exceeds the second threshold, in addition to performing message merging processing on live broadcast rooms which are not subjected to merging processing, the backlog duration currently adopted by the live broadcast rooms which are subjected to merging processing can be reasonably adjusted. The specific implementation mode is as follows: determining standard backlog duration according to the total message concurrency quantity; acquiring backlog duration adopted by current merging processing of each live broadcast room in the plurality of live broadcast rooms; finding out the live broadcast rooms of which the backlog duration adopted by the current merging processing is smaller than the standard backlog duration from the plurality of live broadcast rooms; and merging the messages of the live broadcast rooms of which the backlog duration adopted by the current merging processing is smaller than the standard backlog duration by adopting the standard backlog duration. For example, if the currently used backlog duration of the live broadcast room a is 1s, and the determined standard backlog duration is 2s, the messages of the live broadcast room a are merged by using the backlog duration of 2 s.
In the embodiment of the invention, when the message concurrency sent to a certain live broadcast room exceeds the preset threshold, each message sent by a user participating in the live broadcast room is not pushed to each client accessing the live broadcast room one by one, but a plurality of messages sent to the live broadcast room are merged and then the merged messages are pushed to the client accessing the live broadcast room in a unified manner. In the live broadcast peak period, the frequency of pushing the message to the client by the gateway can be reduced to a great extent, and the gateway bandwidth occupied by the message of the pushing user is effectively reduced, so that the condition that the gateway breaks down due to overload operation of the gateway is effectively avoided.
Fig. 3 is a schematic structural diagram of a message processing apparatus according to an embodiment of the present invention. As shown in fig. 3, the apparatus includes: a first obtaining module 301, a processing module 302 and a pushing module 303.
A first obtaining module 301, configured to obtain a message concurrence amount in a live broadcast room.
A processing module 302, configured to perform merging processing on the messages in the live broadcast room if the message concurrency exceeds a first threshold.
And the pushing module 303 is configured to push the combined message to a client accessing the live broadcast room.
Optionally, the processing module 302 includes:
and the determining unit is used for determining the backlog duration based on the message concurrency amount.
And the merging unit is used for packing the messages in the backlog duration to generate a message packet.
Wherein, the message packet is the merged message.
Optionally, the determining unit includes:
and the obtaining subunit is used for obtaining the multiple threshold intervals and the reference duration corresponding to each threshold interval.
And the determining subunit is configured to determine, as the backlog duration, a reference duration corresponding to a threshold interval in which the message concurrency is located.
Optionally, the processing module 302 includes:
and the deleting unit is used for merging the messages in the live broadcast room so as to delete part of the messages.
And the residual information after deletion is the information after the merging processing.
Optionally, the deleting unit is further configured to:
merging the messages with the same/similar message content; and/or
And combining a plurality of messages from the same message source.
Optionally, the apparatus further comprises:
and the judging module is used for judging the priority of the messages in the live broadcast room.
And the processing module 302 is further configured to:
and merging the messages with the priority lower than the preset level.
Optionally, the apparatus further comprises:
and the second acquisition module is used for acquiring the total message concurrency of the plurality of live broadcasting rooms.
And the searching module is used for finding out the live broadcast rooms which are not subjected to the merging processing from the plurality of live broadcast rooms if the total message concurrency exceeds a second threshold value.
The processing module 302 is further configured to perform merging processing on the messages in the live broadcast rooms that are not subjected to merging processing.
Optionally, the apparatus further comprises:
and the determining module is used for determining the standard backlog duration according to the total message concurrency.
And the third acquisition module is used for acquiring the backlog duration adopted by the current merging processing of each live broadcast room in the plurality of live broadcast rooms.
The searching module is further configured to find out, from the plurality of live broadcast rooms, a live broadcast room in which the backlog duration adopted by the current merging processing is smaller than the standard backlog duration.
The processing module 302 is further configured to perform merging processing on the messages of the live broadcast room, where the backlog duration adopted by the current merging processing is smaller than the standard backlog duration, by using the standard backlog duration.
Here, it should be noted that: the message processing apparatus provided in this embodiment may implement the technical solutions provided in the foregoing message processing method embodiments, and the specific implementation principle may refer to corresponding contents in the foregoing embodiments, which is not described herein again.
In the embodiment of the invention, when the message concurrency sent to a certain live broadcast room exceeds the preset threshold, each message sent by a user participating in the live broadcast room is not pushed to each client accessing the live broadcast room one by one, but a plurality of messages sent to the live broadcast room are merged and then the merged messages are pushed to the client accessing the live broadcast room in a unified manner. In the live broadcast peak period, the frequency of pushing the message to the client by the gateway can be reduced to a great extent, and the gateway bandwidth occupied by the message of the pushing user is effectively reduced, so that the condition that the gateway breaks down due to overload operation of the gateway is effectively avoided.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (12)

1. A message processing method, comprising:
acquiring message concurrency of a live broadcast room;
if the message concurrency exceeds a first threshold value, the messages in the live broadcast room are merged;
pushing the combined messages to a client side accessed to the live broadcast room;
the method further comprises the following steps:
updating the first threshold value according to the maximum message concurrency amount of a single live broadcast room, wherein the maximum message concurrency amount of the single live broadcast room is NM/Q, N is the number of gateways in the current live broadcast system, M is the maximum message amount which can be processed by the single gateway at the same moment, and Q is the number of live broadcast rooms in the current live broadcast system; the method further comprises the following steps:
acquiring total message concurrency of a plurality of live broadcast rooms;
if the total message concurrency exceeds a second threshold value, finding out live broadcast rooms which are not subjected to combination processing from the plurality of live broadcast rooms, wherein the second threshold value is less than ninety percent of the maximum message concurrency which can be processed by the current live broadcast system;
merging the messages of the live broadcast rooms which are not merged;
the method further comprises the following steps:
determining standard backlog duration according to the total message concurrency quantity;
acquiring backlog duration adopted by current merging processing of each live broadcast room in the plurality of live broadcast rooms;
finding out the live broadcast rooms of which the backlog duration adopted by the current merging processing is smaller than the standard backlog duration from the plurality of live broadcast rooms;
and merging the messages of the live broadcast rooms of which the backlog duration adopted by the current merging processing is smaller than the standard backlog duration by adopting the standard backlog duration.
2. The method of claim 1, wherein merging the messages of the live broadcast room comprises:
determining a backlog duration based on the message concurrency amount;
packing the messages in the backlog duration to generate a message packet;
wherein, the message packet is the merged message.
3. The method of claim 2, wherein determining a message backlog duration based on the message concurrency amount comprises:
acquiring a plurality of threshold intervals and reference time lengths corresponding to the threshold intervals;
and determining the reference time length corresponding to the threshold interval where the message concurrency quantity is located as the backlog time length.
4. The method of claim 1, wherein merging the messages of the live broadcast room comprises:
merging the messages of the live broadcast rooms to delete part of the messages;
and the residual information after deletion is the information after the merging processing.
5. The method of claim 4, wherein merging the messages of the live broadcast room to delete a portion of the messages comprises:
merging the messages with the same/similar message content; and/or
And combining a plurality of messages from the same message source.
6. The method of any one of claims 1 to 5, further comprising:
carrying out priority judgment on the messages of the live broadcast room;
and merging the messages in the live broadcast room, wherein the merging process comprises the following steps:
and merging the messages with the priority lower than the preset level.
7. A message processing apparatus, characterized in that the apparatus comprises:
the first acquisition module is used for acquiring the message concurrency amount of the live broadcast room;
the processing module is used for merging the messages in the live broadcast room if the message concurrency exceeds a first threshold;
the pushing module is used for pushing the combined messages to a client side accessed to the live broadcast room;
the processing module is further configured to: updating the first threshold value according to the maximum message concurrency amount of a single live broadcast room, wherein the maximum message concurrency amount of the single live broadcast room is NM/Q, N is the number of gateways in the current live broadcast system, M is the maximum message amount which can be processed by the single gateway at the same moment, and Q is the number of live broadcast rooms in the current live broadcast system;
the device, still include:
the second acquisition module is used for acquiring the total message concurrency of the plurality of live broadcast rooms;
the searching module is used for finding out the live broadcast rooms which are not subjected to merging processing from the plurality of live broadcast rooms if the total message concurrency exceeds a second threshold value;
the processing module is further configured to perform merging processing on the messages of the live broadcast rooms which are not subjected to merging processing;
the device, still include:
the determining module is used for determining the standard backlog duration according to the total message concurrency quantity;
the third acquisition module is used for acquiring the backlog duration adopted by the current merging processing of each live broadcast room in the plurality of live broadcast rooms;
the searching module is further configured to find a live broadcast room from the plurality of live broadcast rooms, where backlog duration adopted by current merging processing is smaller than the standard backlog duration;
and the processing module is also used for combining the messages of the live broadcast rooms, of which the backlog duration adopted by the current combining processing is smaller than the standard backlog duration, by adopting the standard backlog duration.
8. The apparatus of claim 7, wherein the processing module comprises:
the determining unit is used for determining the backlog duration based on the message concurrency amount;
the merging unit is used for packing the messages in the backlog duration to generate a message packet;
wherein, the message packet is the merged message.
9. The apparatus of claim 8, wherein the determining unit comprises:
the acquisition subunit is used for acquiring a plurality of threshold intervals and reference durations corresponding to the threshold intervals;
and the determining subunit is configured to determine, as the backlog duration, a reference duration corresponding to a threshold interval in which the message concurrency is located.
10. The apparatus of claim 7, wherein the processing module comprises:
the deleting unit is used for merging the messages of the live broadcast room so as to delete part of the messages;
and the residual information after deletion is the information after the merging processing.
11. The apparatus of claim 10, wherein the deleting unit is further configured to:
merging the messages with the same/similar message content; and/or
And combining a plurality of messages from the same message source.
12. The apparatus of any one of claims 7 to 11, further comprising:
the judging module is used for judging the priority of the messages in the live broadcast room;
and the processing module is further configured to:
and merging the messages with the priority lower than the preset level.
CN201710374188.XA 2017-05-24 2017-05-24 Message processing method and device Active CN107231350B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710374188.XA CN107231350B (en) 2017-05-24 2017-05-24 Message processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710374188.XA CN107231350B (en) 2017-05-24 2017-05-24 Message processing method and device

Publications (2)

Publication Number Publication Date
CN107231350A CN107231350A (en) 2017-10-03
CN107231350B true CN107231350B (en) 2020-05-19

Family

ID=59933945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710374188.XA Active CN107231350B (en) 2017-05-24 2017-05-24 Message processing method and device

Country Status (1)

Country Link
CN (1) CN107231350B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110022335B (en) * 2018-01-09 2021-10-29 腾讯科技(深圳)有限公司 Data packet transmitting method, device, server and computer readable storage medium
CN108418743B (en) * 2018-01-16 2020-10-02 北京奇艺世纪科技有限公司 Chat room message distribution method and device and electronic equipment
CN110191348B (en) * 2018-02-23 2022-02-22 武汉斗鱼网络科技有限公司 Method and device for processing interactive messages in live video
CN108600089B (en) * 2018-04-20 2020-06-30 维沃移动通信有限公司 Expression image display method and terminal equipment
CN108600772A (en) * 2018-04-24 2018-09-28 北京奇艺世纪科技有限公司 A kind of filter method and device of direct broadcasting room message
CN111414516A (en) * 2020-03-17 2020-07-14 北京字节跳动网络技术有限公司 Live broadcast room message processing method and device, electronic equipment and storage medium
CN112073207B (en) * 2020-11-16 2021-02-09 广州易方信息科技股份有限公司 Method, device and computer equipment for reducing message bandwidth of chat room

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1995001697A1 (en) * 1993-06-29 1995-01-12 Pacific Communication Sciences, Inc. Method and apparatus for reducing power consumption in cellular telephones and like receiving devices
CN105450615A (en) * 2014-09-02 2016-03-30 中国移动通信集团广东有限公司 Multimedia live broadcasting method, system, server, first terminal and second terminal
CN105635180A (en) * 2016-03-04 2016-06-01 广州酷狗计算机科技有限公司 Message pushing method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102724677B (en) * 2012-07-02 2015-03-11 厦门大学 Overload indication threshold value dynamic adjusting system and adjusting method
CN106657197B (en) * 2015-11-02 2021-10-15 腾讯科技(深圳)有限公司 File uploading method and device
CN105262629B (en) * 2015-11-18 2018-04-06 上海斐讯数据通信技术有限公司 WebSocket pushes the method and system of warning information in a kind of network management system
CN105578209B (en) * 2015-12-16 2019-03-12 广州酷狗计算机科技有限公司 Barrage display methods and device
CN106101862A (en) * 2016-06-15 2016-11-09 武汉斗鱼网络科技有限公司 A kind of intelligent barrage guard method for video website and device
CN106559695A (en) * 2016-10-14 2017-04-05 北京金山安全软件有限公司 Barrage message processing method and device and electronic equipment
CN106612329B (en) * 2016-12-29 2020-03-20 北京奇艺世纪科技有限公司 Caching method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1995001697A1 (en) * 1993-06-29 1995-01-12 Pacific Communication Sciences, Inc. Method and apparatus for reducing power consumption in cellular telephones and like receiving devices
CN105450615A (en) * 2014-09-02 2016-03-30 中国移动通信集团广东有限公司 Multimedia live broadcasting method, system, server, first terminal and second terminal
CN105635180A (en) * 2016-03-04 2016-06-01 广州酷狗计算机科技有限公司 Message pushing method and device

Also Published As

Publication number Publication date
CN107231350A (en) 2017-10-03

Similar Documents

Publication Publication Date Title
CN107231350B (en) Message processing method and device
CN107105309B (en) Live broadcast scheduling method and device
CN107277160B (en) Content distribution network node switching method and device
US8046432B2 (en) Network caching for multiple contemporaneous requests
US9094663B1 (en) System and method for providing adaptive media optimization
EP3780523A1 (en) Network traffic identification method and related device
CN106878769B (en) Live video quality monitoring method and device
EP3322145A1 (en) Method, server side and system for computing bandwidth of network transmission of streaming media
CN106612284B (en) Streaming data transmission method and device
CN107249140B (en) List information acquisition method and apparatus
CN108174305A (en) The message treatment method and device of chatroom is broadcast live
CN110351569B (en) Live content processing method, device, equipment and medium
CN108696771B (en) Video playing method and device
US20160309233A1 (en) Video distribution and media resource system interaction method and system
WO2023061060A1 (en) Audio and video code stream scheduling method, system, medium and electronic apparatus
CN113747186B (en) Data processing method, device, terminal and storage medium
CN114501052B (en) Live broadcast data processing method, cloud platform, computer equipment and storage medium
CN109275156B (en) Wifi network alarm information control method and system
CN112383791A (en) Media data processing method and device, electronic equipment and storage medium
CN111314350A (en) Image storage system, storage method, calling system and calling method
CN110266987A (en) Passive type kinescope method and computer readable storage medium
CN110213206A (en) Stream data processing method, server and computer readable storage medium
CN113301398B (en) Information processing method and system, server device and client device
US20190052649A1 (en) Detecting malware on spdy connections
CN112004161A (en) Processing method and device of address resources, terminal equipment 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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210208

Address after: 101300 309, 3rd floor, 60 Fuqian 1st Street, Tianzhu District, Shunyi District, Beijing

Patentee after: Beijing longzhixin Technology Co.,Ltd.

Address before: 100041 room 120, 4th floor, building 17, yard 30, Shixing street, Shijingshan District, Beijing

Patentee before: BEIJING PANDA MUTUAL ENTERTAINMENT TECHNOLOGY Co.,Ltd.