CN112565103A - Message flow control method, device, equipment and computer readable storage medium - Google Patents

Message flow control method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN112565103A
CN112565103A CN201910919546.XA CN201910919546A CN112565103A CN 112565103 A CN112565103 A CN 112565103A CN 201910919546 A CN201910919546 A CN 201910919546A CN 112565103 A CN112565103 A CN 112565103A
Authority
CN
China
Prior art keywords
message
sending
sliding window
window
sent
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.)
Withdrawn
Application number
CN201910919546.XA
Other languages
Chinese (zh)
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201910919546.XA priority Critical patent/CN112565103A/en
Publication of CN112565103A publication Critical patent/CN112565103A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/27Evaluation or update of window size, e.g. using information derived from acknowledged [ACK] packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]

Abstract

The invention discloses a message flow control method, a device, equipment and a computer readable storage medium. The message flow control method comprises the following steps: setting a sliding window, wherein the sliding window comprises at least one message window; a sliding window, under the position range limit of the current sliding window, sending a message based on the message window; wherein the sliding interval of the sliding window comprises at least one message window. By adopting the invention, the message amount sent to the terminal can be controlled through the sliding window, so that the message is sent out uniformly and stably, the conditions of message sending conflict and network blockage can be effectively avoided, and the practicability is better compared with the message sending method in the prior art.

Description

Message flow control method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of communications, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for message flow control.
Background
In converged communication, both mass messaging and instant messaging for a single enterprise belong to messages sent to end users. In order to limit the number of messages issued by an enterprise, in the related art, the group message parameter and the parameter of the instant message are separately controlled during issuing by respectively configuring the number of group messages and the number of instant messages. However, this method is prone to network congestion and poor in availability.
Disclosure of Invention
Embodiments of the present invention provide a message flow control method, apparatus, device, and computer-readable storage medium, so as to solve the problems of network congestion and poor availability in the prior art.
The embodiment of the invention provides a message flow control method, which comprises the following steps:
setting a sliding window, wherein the sliding window comprises at least one message window;
sliding the sliding window, and sending a message based on the message window under the position range limit of the current sliding window;
wherein the sliding interval of the sliding window comprises at least one message window.
According to some embodiments of the invention, the sliding window, and sending the message based on the message window under the limitation of the position range of the current sliding window, comprises:
and judging whether the residual capacity of the current sliding window is larger than zero, if so, sending a message in the current sliding window, and otherwise, not sending the message in the current sliding window.
Further, the sliding window, and sending the message based on the message window under the limitation of the position range of the current sliding window, includes:
and judging whether the instant message is to be sent or not, if so, preferentially sending the instant message, and otherwise, sending a group sending message.
In some embodiments of the present invention, the determining whether there is an instant message to be sent includes:
judging whether the instant message to be sent is to be sent at the initial moment of each message window;
and judging whether the instant message is to be sent or not in the process of sending the mass message.
In some embodiments of the present invention, the sending the mass-send message includes:
the message window receives the application of the mass-sending message;
and the message window uniformly sends the mass-sending messages according to the time sequence.
In some embodiments of the present invention, the sliding window, and sending the message based on the message window under the limitation of the position range of the current sliding window, includes:
and judging whether the message quantity of the instant messages to be sent is smaller than the residual capacity of the current sliding window, if so, sending the instant messages in the current sliding window, otherwise, not sending the instant messages and feeding back error information in the current sliding window, or sending the instant messages with the number being the residual capacity of the current sliding window and discarding or queuing the instant messages exceeding the residual capacity of the current sliding window to a next sliding window.
Further, the sliding window, and sending the message based on the message window under the limitation of the position range of the current sliding window, includes:
and when the message quantity of the instant message to be sent is smaller than the residual capacity of the current sliding window, sending the group sending message after the instant message is sent.
Further, the sliding window, and sending the message based on the message window under the position range limit of the current sliding window, includes:
and when the message quantity of the instant messages to be sent is larger than the residual capacity of the current message window and smaller than the residual capacity of the current sliding window, sending all the instant messages in the current message window.
An embodiment of the present invention further provides a message flow control apparatus, including:
the device comprises a setting module, a display module and a display module, wherein the setting module is used for setting a sliding window, and the sliding window comprises at least one message window;
the control module is used for sliding the sliding window and sending a message based on the message window under the limitation of the position range of the current sliding window;
wherein the sliding time interval of the sliding window comprises at least one message window.
According to some embodiments of the invention, the control module is to:
and judging whether the residual capacity of the current sliding window is larger than zero, if so, sending a message in the current sliding window, and otherwise, not sending the message in the current sliding window.
Further, the control module is configured to:
and judging whether the instant message is to be sent or not, if so, preferentially sending the instant message, and otherwise, sending a group sending message.
In some embodiments of the invention, the control module is configured to:
judging whether the instant message to be sent is to be sent at the initial moment of each message window;
and judging whether the instant message is to be sent or not in the process of sending the mass message.
In some embodiments of the invention, the control module is configured to:
the message window receives the application of the mass-sending message;
and the message window uniformly sends the mass-sending messages according to the time sequence.
In some embodiments of the invention, the control module is configured to:
and judging whether the message quantity of the instant messages to be sent is smaller than the residual capacity of the current sliding window, if so, sending the instant messages in the current sliding window, otherwise, not sending the instant messages and feeding back error information in the current sliding window, or sending the instant messages with the number being the residual capacity of the current sliding window and the instant messages exceeding the residual capacity of the current sliding window to discard or queue to the next sliding window.
Further, the control module is configured to:
and when the message quantity of the instant message to be sent is smaller than the residual capacity of the current sliding window, sending the group sending message after the instant message is sent.
Further, the control module is configured to:
and when the message quantity of the instant messages to be sent is larger than the residual capacity of the current message window and smaller than the residual capacity of the current sliding window, sending all the instant messages in the current message window.
An embodiment of the present invention further provides a message flow control device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the method as described above.
An embodiment of the present invention further provides a computer-readable storage medium, where an implementation program for information transfer is stored, and when the program is executed by a processor, the method implements the steps of the method described above.
By adopting the embodiment of the invention, the message amount sent to the terminal can be controlled through the sliding window, so that the message is evenly and stably sent out, the conditions of message sending conflict and network blockage can be effectively avoided, and the practicability is better compared with the message sending method in the prior art.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a schematic flow chart of a message flow control method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of sliding window sliding in an embodiment of the present invention;
fig. 3 is a flowchart illustrating a message flow control method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a message flow control apparatus in an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a message flow control apparatus in an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As shown in fig. 1, an embodiment of the present invention provides a message flow control method, including:
s101, setting a sliding window, wherein the sliding window comprises at least one message window;
s102, sliding a sliding window, and sending a message based on a message window under the limit of the position range of the current sliding window;
wherein the sliding interval of the sliding window comprises at least one message window.
It is understood that the sliding window includes a positive integer number of message windows, for example, as shown in fig. 2, the duration of the sliding window is 3 seconds, the duration of the message window is 1 second, and the sliding window includes three message windows. The sliding interval of the sliding window comprises a positive integer number of message windows, and the "sliding interval of the sliding window" herein can be understood as: the sliding window slides from a first position a to a second position b adjacent to the first position a once, and a time interval between a starting time of the first position a and a starting time of the second position b is a sliding interval of the sliding window. The sliding window is used for controlling the flow of all messages (including mass messages and instant messages), and the message window can control the flow of mass messages.
By adopting the embodiment of the invention, the message amount sent to the terminal can be controlled through the sliding window, so that the message is evenly and stably sent out, the conditions of message sending conflict and network blockage can be effectively avoided, and the practicability is better compared with the message sending method in the prior art.
On the basis of the above-described embodiment, various modified embodiments are further proposed, and it is to be noted herein that, in order to make the description brief, only the differences from the above-described embodiment are described in the various modified embodiments.
As shown in fig. 2, according to some embodiments of the present invention, the sliding interval duration is less than the sliding window duration, i.e. the sliding window overlaps the adjacent first position a and second position b. Thus, even if there is a message failure at the end of the sliding window at the first position a (e.g., the last message window), the message within the message window can still be sent out when the sliding window slides to the second position b.
According to some embodiments of the invention, sliding a sliding window, sending a message based on a message window under a position range limit of a current sliding window, comprises:
and judging whether the residual capacity of the current sliding window is larger than zero, if so, sending the message in the current sliding window, and otherwise, not sending the message in the current sliding window.
For example, as shown in fig. 2, the duration of the sliding window is 3 seconds, the duration of the message window is 1 second, the sliding interval is 2 seconds, it is assumed that 10 messages are sent per second, the sliding window slides from the adjacent first position a to the second position b, when the sliding window is located at the first position a, the sliding window sequentially includes the first message window 1, the second message window 2, and the third message window 3, when the sliding window is located at the second position b, the sliding window sequentially includes the third message window 3, the fourth message window 4, and the fifth message window 5, when the sliding window is at the first position a, the messages are sent through the third message window 3, when the sliding window slides to the second position b, the remaining capacity of the sliding window is zero, when the sliding window is at the first position a, the message quantity sent through the third message window 3 is less than 30 messages, the remaining capacity of the sliding window is not zero when the sliding window slides to the second position b.
In some examples of the present invention, in the whole sliding window, if there is an instant message to be sent, sending is performed according to the total message amount of the sliding window minus the message amount that has already been sent, and the message amount that has already been sent is recorded in the corresponding message window, and if there is a message window remaining, then a group-sending message application and sending are performed. For example, the total amount of messages issued at the end of the last sliding window and the message amount of the sliding window are recorded to obtain the total amount of messages which can be issued at the end of the next sliding window, and when the next sliding window is in the next sliding window, the total amount of messages issued by the system cannot exceed the value, so that the total flow control issued by the system is ensured, and the system is ensured not to have network congestion.
Further, sliding the sliding window, and sending the message based on the message window under the limitation of the position range of the current sliding window, includes:
and judging whether the instant message is to be sent or not, if so, preferentially sending the instant message, and otherwise, sending the mass message.
It will be appreciated that instant messages are preferred over bulk messages, and that instant messages are sent preferentially whenever there are instant messages to be sent. Therefore, the method can meet the requirements of the terminal user and provide better service for the terminal user. An "instant message" may be a real-time chat message for an end user, and a "mass-sent message" may be an advertisement, notification, etc. message provided for the end user.
Based on the control of the sliding window, the instant message is issued immediately if the system needs to issue the instant message, and if the system does not have excessive flow, the instant message is issued immediately, and the mass-sending message can be issued sequentially according to the time segments in a uniform rotation training mode in a queue mode.
In some embodiments of the present invention, determining whether there is an instant message to be sent includes:
judging whether the instant message to be sent is to be sent at the initial moment of each message window;
and judging whether the instant message is to be sent or not in the process of sending the mass message.
At the initial moment of each message window, if the instant message to be sent is to be sent, the instant message is preferentially sent, otherwise, the group-sending message is sent; and in the process of sending the mass message, if the instant message to be sent is to be sent, stopping sending the mass message and sending the instant message. Therefore, the real-time performance of the instant message can be ensured.
In some embodiments of the invention, sending a mass-sent message comprises:
a message window receives a request for mass-sending a message;
the message window sends the mass-sending messages uniformly according to the time sequence.
It can be understood that the mass-sending messages are queued for sending according to the application mode, and the message windows send the mass-sending messages in sequence according to the sequence of the mass-sending message applications. Therefore, the mass-sending message can be sent evenly and smoothly.
For example, at the start time of each message window in the sliding window, if no instant message needs to be sent, a corresponding number of mass messages are put into the corresponding message queue in a manner of applying for the message window, and the mass messages are sent uniformly according to time sequence. When the message window issues the group sending message, if the system is detected that the instant message needs to be issued, the group sending message of the message window is suspended, the instant message is issued, if the new instant message is completely issued in the message window, the suspended group sending message is recovered, and the rest of group sending message is continuously sent.
In some embodiments of the present invention, sliding the sliding window, sending the message based on the message window under the position range limitation of the current sliding window, includes:
and judging whether the message quantity of the instant messages to be sent is smaller than the residual capacity of the current sliding window, if so, sending the instant messages in the current sliding window, otherwise, not sending the instant messages in the current sliding window and feeding back error information, or sending the instant messages with the number being the residual capacity of the current sliding window and discarding or queuing the instant messages exceeding the residual capacity of the current sliding window to the next sliding window.
For example, if the total amount of messages in the current sliding window still cannot satisfy the message amount required by the instant messages, the redundant instant messages are discarded or put into the queue to be buffered to be preferentially sent in the next sliding window according to the specific enterprise configuration.
Further, sliding the sliding window, and sending the message based on the message window under the limitation of the position range of the current sliding window, includes:
and when the message quantity of the instant message to be sent is smaller than the residual capacity of the current sliding window, sending the mass message after the instant message is sent.
It can be understood that if the current sliding window still has the remaining capacity after the instant message is sent, the group sending message is started to be sent.
Further, the sliding window, under the position range limitation of the current sliding window, sending the message based on the message window, includes:
and when the message quantity of the instant messages to be sent is larger than the residual capacity of the current message window and smaller than the residual capacity of the current sliding window, sending all the instant messages in the current message window.
It will be appreciated that if the instant message has exhausted the total amount of messages that can be sent for the current sliding window, then no further messages will be sent for other subsequent message window batch points of the same group within the current sliding window. Specifically, if the new instant message is not completely sent in the message window, that is, the number of the message windows cannot satisfy the message amount of the instant message, the number of the message windows in the same group in the whole sliding window is used for sending the message. The instant message needs strong instantaneity, so the sending time is not the time of the subsequent message window but the current time, but the quantity of the subsequent message window which can be sent is accumulated, when the time of the subsequent message window is up, whether the group sending message is sent or not depends on the difference value between the accumulated value of the message window and the value of the message window, if the difference value is zero, namely whether the residual capacity of the sliding window is zero, if so, the message is not sent in group.
For example, as shown in fig. 2, the duration of the sliding window is 3 seconds, the duration of the message window is 1 second, and it is assumed that 10 messages are sent per second, the sliding window sequentially includes a first message window 1, a second message window 2, and a third message window 3, when 30 instant messages to be sent are detected in the first message window 1 and the remaining capacity of the sliding window is 30 messages, 30 instant messages are sent in the first message window 1, and neither the second message window 2 nor the third message window 3 sends messages.
The message flow control method according to the embodiment of the present invention is described in detail with reference to fig. 3 as a specific embodiment. It is to be understood that the following description is illustrative only and is not intended to be in any way limiting. All similar structures and similar variations thereof adopted by the invention are intended to fall within the scope of the invention.
The embodiment of the invention provides a message flow control method which can be applied to converged communication and can carry out overall control on various messages (including instant messages and mass-sending messages) sent to terminal users by a single enterprise.
As shown in fig. 3, the message flow control method includes:
s201, setting the length and the sliding interval of the sliding window and the batch processing batch unit duration of the message window.
It should be noted that the sliding window needs to include a positive integer number of message windows, and the sliding interval of the sliding window needs to include a positive integer number of message windows. For example, the length of the sliding window may be 3 seconds, the sliding interval may be 2 seconds, and the length of the batch unit of the message window (i.e., the length of the message window) may be 1 second. If the rate of message transmission is 10 messages per second, the sliding window message capacity is 30 messages, and the total number of each message window is 10.
S202, acquiring the residual capacity of the current sliding window.
S203, determining whether the remaining capacity of the current sliding window is greater than zero, if so, jumping to S204, otherwise, jumping to S205.
S204, putting the residual capacity bar into the message window in the current sliding window in sequence to send messages in a group, and jumping to the step S206.
And S205, not sending the message in the current sliding window.
S206, judging whether an instant message is to be sent, if so, jumping to the step S207, otherwise, jumping to the step S208.
S207, the sending of the mass message is suspended, the instant message is ready to be sent, and the process goes to step S209.
S208, sending the mass-sending message and detecting whether the instant message exists in real time.
It should be noted that the group sending messages are queued and sent according to the application mode, and the message windows sequentially send the group sending messages according to the sequence of the group sending message applications. In other words, the mass-sending messages are uniformly sent in a queue mode and are sequentially sent according to the time segments in turn.
S209, judging whether the message quantity of the instant message to be sent is smaller than the residual capacity of the current sliding window, if so, jumping to the step S210, otherwise, jumping to the step S211.
S210, the instant message is sent in the current sliding window, and the step S202 is skipped after the instant message is sent.
S211, no instant message is sent and error information is fed back in the current sliding window, or instant messages with the number being the residual capacity of the current sliding window are sent and the instant messages exceeding the residual capacity of the current sliding window are discarded or queued to the next sliding window.
Since the total amount of messages in a sliding window is constant, i.e. the total amount of messages in a certain time period is constant, the total amount of instant messages and mass messages is controlled. By means of the message window, the sending amount of the mass-sent messages can be controlled within the message window, and if the instant messages are already sent within the message window, the mass-sent messages are suspended, thereby avoiding excessive messages on the network. The conflict between rcs instant message and mass-sending message can be solved, and the phenomenon of network congestion can be solved by combining the two window technologies.
By adopting the embodiment of the invention, the volume of the mass-sending messages can be controlled, the instant messages can not be suddenly increased, the message flow control of sending an enterprise message to a terminal user can be effectively realized, the problems of excessive burst message number and network congestion when the instant messages and the mass-sending messages of the same enterprise conflict are solved, the flow control of a certain enterprise is more accurate, and the message sending load of the enterprise is more balanced and stable. The messages belong to different queues according to different types, the priorities of the different queues are different, the total amount of the messages sent to the terminal is controlled according to the number of the sliding windows, and the instant messages are preferably inserted into the queue to send the messages in a group mode.
It should be noted that the above-mentioned embodiments are only preferred embodiments of the present invention, and are not intended to limit the present invention, and those skilled in the art can make various modifications and changes. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
As shown in fig. 4, an embodiment of the present invention further provides a message flow control apparatus 100, including:
a setting module 110, configured to set a sliding window, where the sliding window includes at least one message window;
a control module 120, configured to slide the sliding window, and send a message based on the message window under the position range of the current sliding window;
wherein the sliding time interval of the sliding window comprises at least one message window.
It is understood that the sliding window includes a positive integer number of message windows, for example, as shown in fig. 2, the duration of the sliding window is 3 seconds, the duration of the message window is 1 second, and the sliding window includes three message windows. The sliding interval of the sliding window comprises a positive integer number of message windows, and the "sliding interval of the sliding window" herein can be understood as: the sliding window slides from a first position a to a second position b adjacent to the first position a once, and a time interval between a starting time of the first position a and a starting time of the second position b is a sliding interval of the sliding window.
By adopting the embodiment of the invention, the message amount sent to the terminal can be controlled by setting the sliding window, so that the message can be sent out uniformly and stably, the conditions of message sending conflict and network blockage can be effectively avoided, and the practicability is better compared with the message sending method in the prior art.
On the basis of the above-described embodiment, various modified embodiments are further proposed, and it is to be noted herein that, in order to make the description brief, only the differences from the above-described embodiment are described in the various modified embodiments.
According to some embodiments of the invention, the control module 120 is configured to:
and judging whether the residual capacity of the current sliding window is larger than zero, if so, sending the message in the current sliding window, and otherwise, not sending the message in the current sliding window.
For example, as shown in fig. 2, the duration of the sliding window is 3 seconds, the duration of the message window is 1 second, the sliding interval is 2 seconds, it is assumed that 10 messages are sent per second, the sliding window slides from the adjacent first position a to the second position b, when the sliding window is located at the first position a, the sliding window sequentially includes the first message window 1, the second message window 2, and the third message window 3, when the sliding window is located at the second position b, the sliding window sequentially includes the third message window 3, the fourth message window 4, and the fifth message window 5, when the sliding window is at the first position a, the messages are sent through the third message window 3, when the sliding window slides to the second position b, the remaining capacity of the sliding window is zero, when the sliding window is at the first position a, the message quantity sent through the third message window 3 is less than 30 messages, the remaining capacity of the sliding window is not zero when the sliding window slides to the second position b.
Further, the control module 120 is configured to:
and judging whether the instant message is to be sent or not, if so, preferentially sending the instant message, and otherwise, sending the mass message.
It will be appreciated that instant messages are preferred over bulk messages, and that instant messages are sent preferentially whenever there are instant messages to be sent. Therefore, the method can meet the requirements of the terminal user and provide better service for the terminal user. An "instant message" may be a real-time chat message for an end user, and a "mass-sent message" may be an advertisement, notification, etc. message provided for the end user.
In some embodiments of the invention, the control module 120 is configured to:
judging whether the instant message to be sent is to be sent at the initial moment of each message window;
and judging whether the instant message is to be sent or not in the process of sending the mass message.
At the initial moment of each message window, if the instant message to be sent is to be sent, the instant message is preferentially sent, otherwise, the group-sending message is sent; and in the process of sending the mass message, if the instant message to be sent is to be sent, stopping sending the mass message and sending the instant message. Therefore, the real-time performance of the instant message can be ensured.
In some embodiments of the invention, the control module 120 is configured to:
a message window receives a request for mass-sending a message;
the message window sends the mass-sending messages uniformly according to the time sequence.
It can be understood that the mass-sending messages are queued for sending according to the application mode, and the message windows send the mass-sending messages in sequence according to the sequence of the mass-sending message applications. Therefore, the mass-sending message can be sent evenly and smoothly.
In some embodiments of the invention, the control module 120 is configured to:
and judging whether the message quantity of the instant messages to be sent is smaller than the residual capacity of the current sliding window, if so, sending the instant messages in the current sliding window, otherwise, not sending the instant messages in the current sliding window and feeding back error information, or sending the instant messages with the number being the residual capacity of the current sliding window and the instant messages exceeding the residual capacity of the current sliding window to discard or queue to the next sliding window.
Further, the control module 120 is configured to:
and when the message volume of the instant message to be sent is smaller than the residual capacity of the current sliding window, sending the group sending message after the instant message is sent.
It can be understood that if the current sliding window still has the remaining capacity after the instant message is sent, the group sending message is started to be sent.
Further, the control module 120 is configured to:
and when the message quantity of the instant messages to be sent is larger than the residual capacity of the current message window and smaller than the residual capacity of the current sliding window, sending all the instant messages in the current message window.
For example, as shown in fig. 2, the duration of the sliding window is 3 seconds, the duration of the message window is 1 second, and it is assumed that 10 messages are sent per second, the sliding window sequentially includes a first message window 1, a second message window 2, and a third message window 3, when 30 instant messages to be sent are detected in the first message window 1 and the remaining capacity of the sliding window is 30 messages, 30 instant messages are sent in the first message window 1, and neither the second message window 2 nor the third message window 3 sends messages.
An embodiment of the present invention further provides a message flow control apparatus 1000, as shown in fig. 5, including: a memory 1010, a processor 1020 and a computer program stored on the memory 1010 and executable on the processor 1020, the computer program realizing the following method steps when executed by the processor 1020:
s101, setting a sliding window, wherein the sliding window comprises at least one message window;
s102, sliding a sliding window, and sending a message based on a message window under the limit of the position range of the current sliding window;
wherein the sliding interval of the sliding window comprises at least one message window.
By adopting the embodiment of the invention, the message amount sent to the terminal can be controlled through the sliding window, so that the message is evenly and stably sent out, the conditions of message sending conflict and network blockage can be effectively avoided, and the practicability is better compared with the message sending method in the prior art.
According to some embodiments of the invention, sliding a sliding window, sending a message based on a message window under a position range limit of a current sliding window, comprises: and judging whether the residual capacity of the current sliding window is larger than zero, if so, sending the message in the current sliding window, and otherwise, not sending the message in the current sliding window.
Further, sliding the sliding window, and sending the message based on the message window under the limitation of the position range of the current sliding window, includes: and judging whether the instant message is to be sent or not, if so, preferentially sending the instant message, and otherwise, sending the mass message.
In some embodiments of the present invention, determining whether there is an instant message to be sent includes:
judging whether the instant message to be sent is to be sent at the initial moment of each message window;
and judging whether the instant message is to be sent or not in the process of sending the mass message.
In some embodiments of the invention, sending a mass-sent message comprises:
a message window receives a request for mass-sending a message;
the message window sends the mass-sending messages uniformly according to the time sequence.
In some embodiments of the present invention, sliding the sliding window, sending the message based on the message window under the position range limitation of the current sliding window, includes: and judging whether the message quantity of the instant messages to be sent is smaller than the residual capacity of the current sliding window, if so, sending the instant messages in the current sliding window, otherwise, not sending the instant messages in the current sliding window and feeding back error information, or sending the instant messages with the number being the residual capacity of the current sliding window and discarding or queuing the instant messages exceeding the residual capacity of the current sliding window to the next sliding window.
Further, sliding the sliding window, and sending the message based on the message window under the limitation of the position range of the current sliding window, includes: and when the message quantity of the instant message to be sent is smaller than the residual capacity of the current sliding window, sending the mass message after the instant message is sent.
Further, the sliding window, under the position range limitation of the current sliding window, sending the message based on the message window, includes: and when the message quantity of the instant messages to be sent is larger than the residual capacity of the current message window and smaller than the residual capacity of the current sliding window, sending all the instant messages in the current message window.
The embodiment of the present invention provides a computer-readable storage medium, where an implementation program for information transmission is stored, and when executed by a processor 1020, the implementation program implements the following method steps:
s101, setting a sliding window, wherein the sliding window comprises at least one message window;
s102, sliding a sliding window, and sending a message based on a message window under the limit of the position range of the current sliding window;
wherein the sliding interval of the sliding window comprises at least one message window.
By adopting the embodiment of the invention, the message amount sent to the terminal can be controlled through the sliding window, so that the message is evenly and stably sent out, the conditions of message sending conflict and network blockage can be effectively avoided, and the practicability is better compared with the message sending method in the prior art.
According to some embodiments of the invention, sliding a sliding window, sending a message based on a message window under a position range limit of a current sliding window, comprises:
and judging whether the residual capacity of the current sliding window is larger than zero, if so, sending the message in the current sliding window, and otherwise, not sending the message in the current sliding window.
Further, sliding the sliding window, and sending the message based on the message window under the limitation of the position range of the current sliding window, includes:
and judging whether the instant message is to be sent or not, if so, preferentially sending the instant message, and otherwise, sending the mass message.
In some embodiments of the present invention, determining whether there is an instant message to be sent includes:
judging whether the instant message to be sent is to be sent at the initial moment of each message window;
and judging whether the instant message is to be sent or not in the process of sending the mass message.
In some embodiments of the invention, sending a mass-sent message comprises:
a message window receives a request for mass-sending a message;
the message window sends the mass-sending messages uniformly according to the time sequence.
In some embodiments of the present invention, sliding the sliding window, sending the message based on the message window under the position range limitation of the current sliding window, includes:
and judging whether the message quantity of the instant messages to be sent is smaller than the residual capacity of the current sliding window, if so, sending the instant messages in the current sliding window, otherwise, not sending the instant messages in the current sliding window and feeding back error information, or sending the instant messages with the number being the residual capacity of the current sliding window and discarding or queuing the instant messages exceeding the residual capacity of the current sliding window to the next sliding window.
Further, sliding the sliding window, and sending the message based on the message window under the limitation of the position range of the current sliding window, includes:
and when the message quantity of the instant message to be sent is smaller than the residual capacity of the current sliding window, sending the mass message after the instant message is sent.
Further, the sliding window, under the position range limitation of the current sliding window, sending the message based on the message window, includes:
and when the message quantity of the instant messages to be sent is larger than the residual capacity of the current message window and smaller than the residual capacity of the current sliding window, sending all the instant messages in the current message window.
The computer-readable storage medium of this embodiment includes, but is not limited to: ROM, RAM, magnetic or optical disks, and the like.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
It should be noted that in the description of the present specification, reference to the description of the terms "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples" or the like means that a particular feature, method, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, methods, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims (18)

1. A message flow control method, comprising:
setting a sliding window, wherein the sliding window comprises at least one message window;
sliding the sliding window, and sending a message based on the message window under the position range limit of the current sliding window;
wherein the sliding interval of the sliding window comprises at least one message window.
2. The method of claim 1, wherein said sliding window, sending a message based on said message window under a position range limit of a current sliding window, comprises:
and judging whether the residual capacity of the current sliding window is larger than zero, if so, sending a message in the current sliding window, and otherwise, not sending the message in the current sliding window.
3. The method of claim 2, wherein said sliding window, sending a message based on said message window under a position range limit of a current sliding window, comprises:
and judging whether the instant message is to be sent or not, if so, preferentially sending the instant message, and otherwise, sending a group sending message.
4. The method of claim 3, wherein said determining whether there is an instant message to be sent comprises:
judging whether the instant message to be sent is to be sent at the initial moment of each message window;
and judging whether the instant message is to be sent or not in the process of sending the mass message.
5. The method of claim 3, wherein the sending the mass-sent message comprises:
the message window receives the application of the mass-sending message;
and the message window uniformly sends the mass-sending messages according to the time sequence.
6. The method of claim 3, wherein said sliding window, sending a message based on said message window under a position range limit of a current sliding window, comprises:
and judging whether the message quantity of the instant messages to be sent is smaller than the residual capacity of the current sliding window, if so, sending the instant messages in the current sliding window, otherwise, not sending the instant messages and feeding back error information in the current sliding window, or sending the instant messages with the number being the residual capacity of the current sliding window and discarding or queuing the instant messages exceeding the residual capacity of the current sliding window to a next sliding window.
7. The method of claim 6, wherein said sliding window, sending a message based on said message window under a position range limit of a current sliding window, comprises:
and when the message quantity of the instant message to be sent is smaller than the residual capacity of the current sliding window, sending the group sending message after the instant message is sent.
8. The method of claim 7, wherein said sliding window, sending a message based on said message window under a position range limit of a current sliding window, comprises:
and when the message quantity of the instant messages to be sent is larger than the residual capacity of the current message window and smaller than the residual capacity of the current sliding window, sending all the instant messages in the current message window.
9. A message flow control apparatus, comprising:
the device comprises a setting module, a display module and a display module, wherein the setting module is used for setting a sliding window, and the sliding window comprises at least one message window;
the control module is used for sliding the sliding window and sending a message based on the message window under the limitation of the position range of the current sliding window;
wherein the sliding time interval of the sliding window comprises at least one message window.
10. The apparatus of claim 9, wherein the control module is to:
and judging whether the residual capacity of the current sliding window is larger than zero, if so, sending a message in the current sliding window, and otherwise, not sending the message in the current sliding window.
11. The apparatus of claim 10, wherein the control module is to:
and judging whether the instant message is to be sent or not, if so, preferentially sending the instant message, and otherwise, sending a group sending message.
12. The apparatus of claim 11, wherein the control module is to:
judging whether the instant message to be sent is to be sent at the initial moment of each message window;
and judging whether the instant message is to be sent or not in the process of sending the mass message.
13. The apparatus of claim 11, wherein the control module is to:
the message window receives the application of the mass-sending message;
and the message window uniformly sends the mass-sending messages according to the time sequence.
14. The apparatus of claim 11, wherein the control module is to:
and judging whether the message quantity of the instant messages to be sent is smaller than the residual capacity of the current sliding window, if so, sending the instant messages in the current sliding window, otherwise, not sending the instant messages and feeding back error information in the current sliding window, or sending the instant messages with the number being the residual capacity of the current sliding window and the instant messages exceeding the residual capacity of the current sliding window to discard or queue to the next sliding window.
15. The apparatus of claim 14, wherein the control module is to:
and when the message quantity of the instant message to be sent is smaller than the residual capacity of the current sliding window, sending the group sending message after the instant message is sent.
16. The apparatus of claim 15, wherein the control module is to:
and when the message quantity of the instant messages to be sent is larger than the residual capacity of the current message window and smaller than the residual capacity of the current sliding window, sending all the instant messages in the current message window.
17. A message flow control apparatus, comprising: memory, processor and computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the method according to any one of claims 1 to 8.
18. A computer-readable storage medium, characterized in that it has stored thereon a program for implementing the transfer of information, which program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 8.
CN201910919546.XA 2019-09-26 2019-09-26 Message flow control method, device, equipment and computer readable storage medium Withdrawn CN112565103A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910919546.XA CN112565103A (en) 2019-09-26 2019-09-26 Message flow control method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910919546.XA CN112565103A (en) 2019-09-26 2019-09-26 Message flow control method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN112565103A true CN112565103A (en) 2021-03-26

Family

ID=75030003

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910919546.XA Withdrawn CN112565103A (en) 2019-09-26 2019-09-26 Message flow control method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112565103A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1183870A (en) * 1995-05-09 1998-06-03 诺基亚电信公司 Sliding-window data flow control using adjustable window size
CN101009535A (en) * 2007-01-26 2007-08-01 北京航空航天大学 Sliding-window-based SOAP message transfer method
CN101494531A (en) * 2009-02-24 2009-07-29 华为技术有限公司 Method and apparatus for adjusting slide window
CN101827033A (en) * 2010-04-30 2010-09-08 北京搜狗科技发展有限公司 Method and device for controlling network traffic and local area network system
CN104113403A (en) * 2014-07-23 2014-10-22 深圳市邦彦信息技术有限公司 Sliding window-based half-duplex communication method and system
US20150372954A1 (en) * 2014-06-23 2015-12-24 Google Inc. Rule-Based Rate Limiting
WO2016177060A1 (en) * 2015-07-15 2016-11-10 中兴通讯股份有限公司 Method and apparatus for displaying unread message

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1183870A (en) * 1995-05-09 1998-06-03 诺基亚电信公司 Sliding-window data flow control using adjustable window size
CN101009535A (en) * 2007-01-26 2007-08-01 北京航空航天大学 Sliding-window-based SOAP message transfer method
CN101494531A (en) * 2009-02-24 2009-07-29 华为技术有限公司 Method and apparatus for adjusting slide window
CN101827033A (en) * 2010-04-30 2010-09-08 北京搜狗科技发展有限公司 Method and device for controlling network traffic and local area network system
US20150372954A1 (en) * 2014-06-23 2015-12-24 Google Inc. Rule-Based Rate Limiting
CN104113403A (en) * 2014-07-23 2014-10-22 深圳市邦彦信息技术有限公司 Sliding window-based half-duplex communication method and system
WO2016177060A1 (en) * 2015-07-15 2016-11-10 中兴通讯股份有限公司 Method and apparatus for displaying unread message

Similar Documents

Publication Publication Date Title
CN107391271B (en) Message queue system-based delayed task triggering method and device
KR101006114B1 (en) Content push service
WO2016011903A1 (en) Traffic control method and apparatus
EP2466824B1 (en) Service scheduling method and device
US7627618B2 (en) System for managing data collection processes
US20190386927A1 (en) Scheduled Transmission of Data
CN110166380B (en) Method for scheduling message, first network device and computer readable storage medium
US20160019486A1 (en) Resource Releasing Method, Apparatus, and System
EP2918060B1 (en) Pre-buffering of content data items to be rendered at a mobile terminal
US11128991B2 (en) Method, apparatus, and system for floor control on multiple MCPTT systems
US9436391B1 (en) Efficient scalable I/O scheduling
CN110086728B (en) Method for sending message, first network equipment and computer readable storage medium
CN110858844A (en) Service request processing method, control method, device, system and electronic equipment
CN112565103A (en) Message flow control method, device, equipment and computer readable storage medium
US20160112525A1 (en) Distribution control device and method for same, push distribution system, and storage medium
CN109688421B (en) Request message processing method, device and system, server and storage medium
CN108521382A (en) A kind of message method, apparatus and system
CN113259439B (en) Key value scheduling method based on receiving end drive
CN111131066A (en) Traffic shaping method and device
JP4371859B2 (en) Video information transmission method and apparatus
CN112335266B (en) System and method for managing notification requests in a communication network
US8699347B2 (en) Communication apparatus, communication system, communication method, and a computer-readable medium
WO2019232681A1 (en) Method for providing services and corresponding gateway, storage medium and computer program product
CN112579316A (en) Method, apparatus and computer program product for information processing
US9847919B2 (en) Data network device discovery optimization to reduce data transfer volume

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20210326