[go: up one dir, main page]

CN111352746B - Message flow limiting method and storage medium - Google Patents

Message flow limiting method and storage medium Download PDF

Info

Publication number
CN111352746B
CN111352746B CN202010083718.7A CN202010083718A CN111352746B CN 111352746 B CN111352746 B CN 111352746B CN 202010083718 A CN202010083718 A CN 202010083718A CN 111352746 B CN111352746 B CN 111352746B
Authority
CN
China
Prior art keywords
message
group
access
access application
application
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
CN202010083718.7A
Other languages
Chinese (zh)
Other versions
CN111352746A (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.)
Fujian Tianquan Educational Technology Ltd
Original Assignee
Fujian Tianquan Educational Technology 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 Fujian Tianquan Educational Technology Ltd filed Critical Fujian Tianquan Educational Technology Ltd
Priority to CN202010083718.7A priority Critical patent/CN111352746B/en
Publication of CN111352746A publication Critical patent/CN111352746A/en
Application granted granted Critical
Publication of CN111352746B publication Critical patent/CN111352746B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a message flow limiting method and a storage medium, wherein the method comprises the following steps: when the message detail is configured and generated, adding a corresponding type field, wherein the type field comprises a field corresponding to whether the message detail is generated by a group message or not and a field corresponding to a group ID; periodically counting the message pushing total amount of client application connected with each access application of the access cluster; if the statistical results of more than two continuous times exceed the preset threshold, acquiring N group IDs with more than N groups before the number of the generated group message details in the access application according to the type field of the message details, and limiting the current of the groups corresponding to the N group IDs, wherein N is more than or equal to 1. The invention not only can ensure the stability and availability of the message system; and simultaneously has the characteristics of high execution efficiency, less resource occupation, strong practicability and the like.

Description

Message flow limiting method and storage medium
Technical Field
The invention relates to the field of message pushing systems, in particular to a message flow limiting method and a storage medium.
Background
In many systems or APPs today, the function of IM chat is required, and the use of IM chat communication software generates two types of messages: one-person chat messages are point-to-point; a chat message that is a group chat. The specific principle is as follows: a peer-to-peer single chat message will generate 1 message detail and record it in the corresponding personnel's information record list, this side will pause a name, which is the personal inbox. If a group chat message is composed of 500 persons, a group chat message will generate 500 message details, and record them into the corresponding 500 persons' personal inbox.
Because the group chat messages generate more message details, huge pressure is brought to the push system. Many current systems provide various restrictions to relieve such stresses. Such as setting an upper limit on the number of groups, such as setting the number of members in a group, etc., in order to limit the generation of excessive message detail messages for group chat messages. However, as the traffic increases, more and more groups are generated, and there are some larger groups of group members. In normal times, the system can normally support the message sending of the group, but when the holiday or the special day or time is reached, the activity of the large group is greatly improved, the corresponding message quantity is greatly increased, and the sending frequency of the message is very likely to exceed the whole capacity of the system, so that the stability and the usability of the message system are affected.
In the existing system, the common practice is to limit the message frequency of the push modules in all the message push systems, or limit the number of messages sent in each group, i.e. set a certain threshold. At this time, if a lower threshold is set for each group, the system does not fully perform its functions, which would affect the user experience. If a higher threshold is set, the overall performance and stability of the system may be affected, and the whole message system is affected.
Therefore, there is a need to provide a more optimized message flow restriction method that can compromise the stability and usability of the message system.
Disclosure of Invention
The technical problems to be solved by the invention are as follows: the message flow limiting method and the storage medium can give consideration to the stability and usability of a message system.
In order to solve the technical problems, the invention adopts the following technical scheme:
a message flow limiting method, comprising:
when the message detail is configured and generated, adding a corresponding type field, wherein the type field comprises a field corresponding to whether the message detail is generated by a group message or not and a field corresponding to a group ID;
periodically counting the message pushing total amount of client application connected with each access application of the access cluster;
if the statistical results of more than two continuous times exceed the preset threshold, acquiring N group IDs with more than N groups before the number of the generated group message details in the access application according to the type field of the message details, and limiting the current of the groups corresponding to the N group IDs, wherein N is more than or equal to 1.
The other technical scheme provided by the invention is as follows:
a computer readable storage medium having stored thereon a computer program which, when executed by a processor, is capable of performing the steps comprised in a message flow restriction method as described above.
The invention has the beneficial effects that: the invention periodically monitors whether the load of each access application reaches the threshold value or not through the monitoring feedback mechanism, if so, the current limiting is carried out on the large-flow group of the access application, thereby protecting the stability and the usability of the whole message system and providing good experience for users.
Drawings
FIG. 1 is a flow chart of a message flow limiting method according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a message system architecture corresponding to FIG. 1;
fig. 3 is a flow chart of a message flow limiting method according to an embodiment of the invention.
Description of the reference numerals:
1-N1, client application; 2. accessing a cluster; 21-2N, accessing application; 3. a message processing cluster; 3-3N, message handling applications.
Detailed Description
In order to describe the technical contents, the achieved objects and effects of the present invention in detail, the following description will be made with reference to the embodiments in conjunction with the accompanying drawings.
The most critical concept of the invention is as follows: and periodically monitoring whether the load of each access application reaches a threshold value through a monitoring feedback mechanism, and if so, executing current limiting on the large-flow group.
Technical term explanation related to the invention:
Figure GDA0004228643000000031
referring to fig. 1, the present invention provides a message current limiting method, which includes:
when the message detail is configured and generated, adding a corresponding type field, wherein the type field comprises a field corresponding to whether the message detail is generated by a group message or not and a field corresponding to a group ID;
periodically counting the message pushing total amount of client application connected with each access application of the access cluster;
if the statistical results of more than two continuous times exceed the preset threshold, acquiring N group IDs with more than N groups before the number of the generated group message details in the access application according to the type field of the message details, and limiting the current of the groups corresponding to the N group IDs, wherein N is more than or equal to 1.
Further, each access application of the access cluster periodically counts the total message pushing amount of the client application connected with the access application, and before the message pushing amount, the method further comprises the following steps:
after the access application transmits the message to the client application, updating a message total number record table, and updating a group message record table according to the type field of the generated message detail, wherein the fields in the message total number record table comprise the client application ID, the current time point and the total message transmission amount, and the fields in the group message record table comprise the client application ID, the current time point, the group ID and the group message number.
Further, each access application of the access cluster periodically counts the message pushing total amount of the client application connected with the access application, and specifically includes:
and each access application of the access cluster periodically counts the message pushing total amount of the client application connected with the access application according to the message total number record table.
Further, each access application of the access cluster periodically counts the message pushing total amount of the client application connected with the access application, and specifically includes:
and each access application of the access cluster periodically counts the message pushing total amount of the client application connected with the access application according to the message total number record table.
According to the description, each access application maintains two tables of the total message number record table and the group message record table, so that the result can be obtained rapidly, efficiently and accurately during subsequent periodical statistics and statistics of the flow of each group, and the message current limiting efficiency is remarkably improved.
Further, each access application of the access cluster periodically counts the total message pushing amount of the client application connected with the access application, and then the method further comprises the following steps:
if the primary statistical result does not exceed the preset threshold value, all statistical results recorded before in the cache are cleared.
From the above description, it can be seen that resource occupation can be reduced by timely clearing useless record information.
Further, the current limiting is performed on the groups corresponding to the N group IDs, specifically:
after a message processing application of the message processing cluster receives a group message, judging whether a group ID corresponding to the group message is a current-limited group ID, if so, storing the group message into a delay queue, and processing the group message after a preset delay time is reached.
From the above description, the current-limited group will be controlled to delay processing the group message, so as to ensure that other more messages can be processed in time, and maintain the stability of the system.
Further, the method further comprises the following steps:
and if the statistical results of more than two continuous times do not exceed the preset threshold, removing the current limitation of the N group IDs.
As can be seen from the above description, when the load of the access application does not exceed the threshold, the current limitation is timely released, so as to improve the use experience of the group members.
Further, each access application executes the periodical statistics step and judges whether the statistics results of more than two continuous times exceed a preset threshold and the following steps through the independent asynchronous thread created by the access application;
the message processing cluster performs a current limit operation through the independent asynchronous threads it created.
The above description shows that the access application and the message processing cluster can execute message flow monitoring and current limiting on the premise of not affecting self service processing, and the system has good practicability and robustness.
Further, the N is determined according to a preset percentage.
From the above description, it can be seen that the determination of the current limiting object can be made more accurate and flexible.
The other technical scheme provided by the invention is as follows:
a computer readable storage medium having stored thereon a computer program which when executed by a processor is capable of performing the steps of a message flow restriction method comprising:
when the message detail is configured and generated, adding a corresponding type field, wherein the type field comprises a field corresponding to whether the message detail is generated by a group message or not and a field corresponding to a group ID;
periodically counting the message pushing total amount of client application connected with each access application of the access cluster;
if the statistical results of more than two continuous times exceed the preset threshold, acquiring N group IDs with more than N groups before the number of the generated group message details in the access application according to the type field of the message details, and limiting the current of the groups corresponding to the N group IDs, wherein N is more than or equal to 1.
Further, each access application of the access cluster periodically counts the total message pushing amount of the client application connected with the access application, and before the message pushing amount, the method further comprises the following steps:
after the access application transmits the message to the client application, updating a message total number record table, and updating a group message record table according to the type field of the generated message detail, wherein the fields in the message total number record table comprise the client application ID, the current time point and the total message transmission amount, and the fields in the group message record table comprise the client application ID, the current time point, the group ID and the group message number.
Further, each access application of the access cluster periodically counts the message pushing total amount of the client application connected with the access application, and specifically includes:
and each access application of the access cluster periodically counts the message pushing total amount of the client application connected with the access application according to the message total number record table.
Further, the obtaining the top N group IDs of the access application after ranking according to the number of the group message details generated by the message details according to the type field of the message details specifically includes:
and acquiring the top N group IDs of which the number is ranked from large to small according to the detail generation number of the group messages in the client application connected with the access application in the period according to the group message record table.
Further, each access application of the access cluster periodically counts the total message pushing amount of the client application connected with the access application, and then the method further comprises the following steps:
if the primary statistical result does not exceed the preset threshold value, all the statistical results recorded before are cleared.
Further, the current limiting is performed on the groups corresponding to the N group IDs, specifically:
after a message processing application of the message processing cluster receives a group message, judging whether a group ID corresponding to the group message is a current-limited group ID, if so, storing the group message into a delay queue, and processing the group message after a preset delay time is reached.
Further, the method further comprises the following steps:
and if the statistical results of more than two continuous times do not exceed the preset threshold, removing the current limitation of the N group IDs.
Further, each access application executes the periodical statistics step and judges whether the statistics results of more than two continuous times exceed a preset threshold and the following steps through the independent asynchronous thread created by the access application;
the message processing cluster performs a current limit operation through the independent asynchronous threads it created.
Further, the N is determined according to a preset percentage.
From the foregoing description, it will be appreciated by those skilled in the art that the foregoing embodiments may be implemented, in whole or in part, by hardware, by a computer program, where the program may be stored on a computer readable storage medium, where the program, when executed, may include the steps of the methods described above. After the program is executed by the processor, the beneficial effects corresponding to the methods can be realized.
The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like.
Example 1
Referring to fig. 2 and 3, the present embodiment provides a message flow limiting method, which includes:
s1: a message flow restriction system is deployed, as shown in fig. 2, comprising a plurality of client applications 1-N1, an access cluster 2 consisting of a plurality of access applications 21-2N, and a message processing cluster 3 consisting of a plurality of message processing applications 31-3N.
The whole flow of the message flow limiting system is approximately as follows: all clients establish long links with the access cluster, and message sending is carried out through the long links, wherein the message sending comprises point-to-point chat and group chat messages; after receiving the message, the access cluster sends the message to the message processing cluster, the cluster processes the message, after the message is processed, the access cluster sends a notification message to the corresponding access application in the access cluster, the application pushes the last message, and the chat message is sent to the corresponding client to complete one-time information interaction.
Assuming that each access application accesses 50000 long-chain clients at most, the maximum message sending concurrency of each access application is 1000/s, when the message sending concurrency is exceeded, pressure is brought to the access application, and message delay is caused.
On the basis of the above, the method further comprises:
s2: when the message detail is configured and generated, adding a corresponding type field, wherein the type field comprises a field corresponding to whether the message detail is generated by a group message or not and a field corresponding to a group ID;
that is, there is a need to make a modification to the legacy message format, there is no type distinction among the message details (each corresponding to a respective group member) that would have been generated by one group message, and an additional configuration type field "is_group" is now required to indicate whether the message details were generated by the group message, and "group_id" indicates which group the message details were generated by.
S3: periodically counting the message pushing total amount of client application connected with each access application of the access cluster;
specifically, each access application in the access cluster needs to have a separate asynchronous statistics thread after startup. The thread is used to count the total message pushing amount of the application every preset time (e.g. 5 seconds). In particular, the asynchronous statistics thread also records the data counted by the access application in the local memory into the database at regular time, thereby facilitating the subsequent query.
S4: if the statistical result exceeds the preset threshold, recording once, and if the statistical result of more than two continuous periods exceeds the total message pushing amount, automatically triggering alarm and automatic current limiting operation.
For example, if the message sending concurrency of the corresponding access application is 1000/second, the total message sending amount exceeds 5000 pieces within 5 seconds, which indicates that the upper limit of message sending is reached, and the message sending can be recorded once; when the total message sending amount is exceeded each time within 5 consecutive time intervals, the alarm and automatic current limiting operation is automatically triggered.
The automatic current limiting operation is to select N group IDs with the most generated group message details in the access application for current limiting. Specifically, the number of group message detail generation in the access application is ranked according to the type field of the message detail (or ranked from small to large), then the top N (N are selected after the corresponding ranking from small to large) group IDs are selected, and a current limiting notification message for limiting the current of the group corresponding to the N group IDs is sent to the data processing cluster, wherein N is more than or equal to 1.
Optionally, the N is determined according to a preset percentage. Such as selecting the group ID that generates the most 30% of the group message details for current limit notification and current limit.
In one embodiment, the message processing cluster sends out a current limit notification message in the format of: [ group ID, group ID ]; meanwhile, the notification message needs to be subjected to a persistent database, so that the subsequent query and use are convenient.
S5: and after the message processing cluster receives the current limit notification message, executing a current limit strategy through independent asynchronous thread processing.
When any group message is sent, the message processing cluster firstly judges whether the group ID corresponding to the group message is the group ID which is limited in current, if so, the group message is sent to a delay queue, and the group message is processed after reaching the preset delay time. For example, the delay time is 5 seconds, which can be specific to the actual situation of the service.
S6: and when the system pressure is reduced, if the statistical results of the access application are not exceeding the preset threshold value for more than two times, the current limitation on the N group IDs is released.
For example, if the statistics of 5 consecutive periods do not reach the threshold, the current limitation is triggered to be released. Then, the current limiting notification message sent by the access application in the database is queried, the group ID of the non-current limiting notification is obtained, and the current limiting notification message is sent; when the message processing clusters receive the de-restriction notification messages, the restriction judgment of the corresponding group ID is removed.
The embodiment can dynamically limit the message flow of the large group with frequent group message sending when the access application pressure is high, thereby protecting the stability and the availability of the whole message system.
Example two
The present embodiment is further defined on the basis of the first embodiment, so as to improve the efficiency of periodic statistics of the access application and the locking efficiency of the large-traffic group.
The embodiment further includes, based on the first embodiment, the following steps before step S3:
s301: after the access application sends the message to the client application, updating the total message record table, and updating the group message record table according to the type field of the produced message detail;
the fields in the total number of messages record table comprise a client application ID, a current time point and total message sending amount; the fields in the group message record table include a client application ID, a current point in time, a group ID, and a number of group messages.
That is, after the access application finally pushes the message to the corresponding client application, the total message record table total_num maintained by the access application is updated, and the optional data format is "key is a statistical time point, and value is the total message sending amount"; and after the message is sent, a corresponding message detail is generated, a type field (preferably, the data type is treemap, the key is a group_id, the value is a message detail generated by a corresponding group) is added in the message detail, and the group message record table group_num is updated according to the type field of the message detail.
Step S3 of the first embodiment is specifically performed as follows:
s3': and each access application of the access cluster periodically acquires the message pushing total amount of the client application connected with the access application according to the message total number record table.
Meanwhile, in step S4 corresponding to the first embodiment, the following is specifically performed:
s4': and acquiring the top N group IDs of which the number is ranked from large to small according to the detail generation number of the group messages in the client application connected with the access application in the period according to the group message record table.
The embodiment can rapidly and accurately acquire the result in the period statistics and the large-flow group ID statistics through the maintenance of the message total number record table and the group message record table.
Example III
The present embodiment corresponds to the first embodiment or the second embodiment, and provides a specific application scenario:
assume the condition: the client long link of each access application with the maximum access 50000 has the maximum message sending concurrency of 1000/second, and when the message sending concurrency is exceeded, the pressure is brought to the access application, and the message delay is caused. Assume there are a, b, and c 4 groups, each with events of group messaging.
1. The old message format needs to be modified, and the type field needs to be added: is_group indicates whether the message detail was generated by the group message, and group_id indicates which group the message detail was generated by. Meanwhile, each group a, b, c, d is identified by its own unique group ID.
2. Each access application in the access cluster needs to have an independent asynchronous statistical thread after being started. The thread is used to count the total message push for the application every 5 seconds. For example, if the concurrency of message transmission of the access application is 1000/second, the total message transmission amount exceeds 5000 pieces within 5 seconds, which indicates that the upper limit of message transmission is reached, the message can be recorded once, and when the total message transmission amount is exceeded each time within 5 continuous time intervals, the alarm and automatic current limiting operation can be automatically triggered. When the upper limit is not reached each time, the last recorded information is cleared, and the resource occupation is reduced. It should be noted that, the last record of the purge here refers to purging or overwriting the data in the cache, and the data collected and recorded in the database by the independent asynchronous thread is not purged.
The automatic current limiting operation is as follows in the whole flow of step 3-5.
3. When the access application sends a message, the corresponding transformation is needed.
The method comprises the following steps: the total message sending amount (total_num) [ data format: key is a statistical time point, value is the total message sending amount of the access application ] is required to be locally recorded, meanwhile, the message detail number (group_num) [ data format: a treemap recording format is adopted, wherein the key is group_id, and the value is the message detail generated by the corresponding group ] is required to be recorded according to the message of the is_group mark in each message detail.
The statistics here are used by the asynchronous threads in step 2. And (3) the asynchronous thread in the step (2) records the data counted by the access application in the local memory into the database every 5 seconds, so that the subsequent inquiry and use are convenient. (2 database tables, one is a total message record table total_num, the main fields are access application ID, statistical time point and total message sending amount, and one is a group message record table group_num, and the main fields are access application ID, statistical time point, group ID and total group message sending amount). When the database is recorded, the counted total_num and group_num in the local cache are emptied to be 0, and preparation is made for the next counting data (namely the next counting period).
Meanwhile, the asynchronous thread also carries the work of alarming and automatic current limiting.
The method comprises the following steps: the statistics of the database already recorded, i.e. the two tables mentioned above, are queried. When the access application exceeds the total message sending amount threshold value every time within 5 continuous time intervals, the alarm and automatic current limiting operation is automatically triggered. See specifically step 4 below.
4. When the alarm and auto-current limit operation has been triggered, the asynchronous thread will send a notification message to the message processing cluster in step 3. There is a policy handling of the current limit.
The method comprises the following steps: and selecting a plurality of group IDs with the most generated group message details in the application, and carrying out final message group message current limiting. The general strategy is to choose to generate notification of the current limit for a certain percentage (e.g., 30%) of the group IDs for which the group message details are the greatest. How to select the group ID of 30% with the most group message details is selected, specifically, the group_num table recorded in step 3 may be queried to count the group IDs of 30% with the most group message details within the last 5 statistics times of the access application.
The format of the notification message sent by the access cluster to the message processing cluster is as follows: [ group ID, group ID ]. Meanwhile, the notification message needs to be subjected to a persistent database, so that the subsequent query and use are convenient.
5. In a message processing cluster, there is one asynchronous thread that processes these notification messages. When these notification messages are received, a current limit operation may be triggered. When any group message is sent, the message processing cluster will judge in advance whether the group message needs to be limited, when the group message needs to be limited, the group message will be sent to a delay queue, the delay time is 5 seconds, and can be determined according to the actual service condition, and when the delay time is reached, the processing of the specific message is carried out again.
The source of the notification message refers to the group current limiting notification message sent in the step 4, after the cluster at the message site receives the group current limiting notification messages, a group ID list in the message is loaded into a local cache in advance, and when the message is processed to be a group message (the message is distinguished according to the is_group identifier in the step 1), the message details of any group message are marked with the identifier), whether the group ID is in the ID of current limiting again is judged in advance, if not, the old logic step is continuously executed; if so, the current is required to be limited, the group message is sent to a delay queue, the delay time is 5 seconds, the time can be determined according to the actual service condition, and after the delay time is reached, the group message is processed again according to the old logic. (in this case, the determination of the group restriction is not performed again because the message processing from the delay queue is already performed.)
6. When the system pressure decreases, similar to step 2, when the access application has sent a current limit notification, the current limit release message notification will be triggered after 5 consecutive time intervals have not reached the preset threshold. The entity will query the database for the current limit notification message that the application has sent, and cancel the sending if there are more current limit notification messages. And finally, sending the de-restriction notification message. When the message processing clusters receive the de-restriction notification messages, the restriction judgment of the group message is removed.
The current limit determination of the removed group message means that the current limit group ID list generated in the local memory in step 5 is removed based on the group ID list in the current limit removal notification message, and the removed message processing cluster does not perform current limit of the message for these groups again.
Example IV
The present embodiment corresponds to the first to third embodiments, and provides a computer readable storage medium having a computer program stored thereon, where the program, when executed by a processor, is capable of implementing the steps included in the message flow restriction method described in any one of the first to third embodiments. The specific step flow is not repeated here, and the details are described in embodiments one to three.
In summary, the message flow limiting method and the storage medium provided by the invention not only can ensure the stability and usability of a message system; and simultaneously has the characteristics of high execution efficiency, less resource occupation, strong practicability and the like.
The foregoing description is only illustrative of the present invention and is not intended to limit the scope of the invention, and all equivalent changes made by the specification and drawings of the present invention, or direct or indirect application in the relevant art, are included in the scope of the present invention.

Claims (8)

1. A method for message throttling, comprising:
when the message detail is configured and generated, adding a corresponding type field, wherein the type field comprises a field corresponding to whether the message detail is generated by a group message or not and a field corresponding to a group ID;
after the access application sends the message to the client application, updating the total message record table, and updating the group message record table according to the type field of the generated message detail; the fields in the message total number record table comprise a client application ID, a current time point and a message transmission total amount, and the fields in the group message record table comprise the client application ID, the current time point, the group ID and the group message number;
periodically counting the message pushing total amount of client application connected with each access application of the access cluster;
each access application of the access cluster periodically counts the message pushing total amount of the client application connected with the access application, and specifically comprises the following steps:
each access application of the access cluster periodically counts the message pushing total amount of the client application connected with the access application according to the message total number record table;
if the statistical results of more than two continuous times exceed the preset threshold, acquiring N group IDs with more than N groups before the number of the generated group message details in the access application according to the type field of the message details, and limiting the current of the groups corresponding to the N group IDs, wherein N is more than or equal to 1.
2. The method for message flow restriction according to claim 1, wherein the obtaining the group IDs with a number N greater than the number N of the group message detail generation in the access application specifically comprises:
and acquiring the top N group IDs of which the number is ranked from large to small according to the detail generation number of the group messages in the client application connected with the access application in the period according to the group message record table.
3. The method for message throttling as recited in claim 1, wherein each access application of said access cluster periodically counts a message push total amount of a client application connected to itself, and further comprising:
if the primary statistical result does not exceed the preset threshold value, all statistical results recorded before in the cache are cleared.
4. The method for message current limiting according to claim 1, wherein the current limiting is performed on the groups corresponding to the N group IDs, specifically:
after a message processing application of the message processing cluster receives a group message, judging whether a group ID corresponding to the group message is a current-limited group ID, if so, storing the group message into a delay queue, and processing the group message after a preset delay time is reached.
5. The message flow restriction method of claim 1, further comprising:
and if the statistical results of more than two continuous times do not exceed the preset threshold, removing the current limitation of the N group IDs.
6. The method of claim 1, wherein each access application performs the periodic statistics step and the step of determining whether the statistics result of two or more consecutive times exceeds a preset threshold and thereafter through an independent asynchronous thread created by the access application;
the message processing cluster performs a current limit operation through the independent asynchronous threads it created.
7. The message flow limiting method of claim 1, wherein N is determined according to a predetermined percentage, the predetermined percentage being a percentage of a total number of predetermined group IDs.
8. A computer readable storage medium having stored thereon a computer program, wherein the program, when executed by a processor, is capable of performing the steps comprised in a message flow restriction method according to any of the preceding claims 1-7.
CN202010083718.7A 2020-02-10 2020-02-10 Message flow limiting method and storage medium Active CN111352746B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010083718.7A CN111352746B (en) 2020-02-10 2020-02-10 Message flow limiting method and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010083718.7A CN111352746B (en) 2020-02-10 2020-02-10 Message flow limiting method and storage medium

Publications (2)

Publication Number Publication Date
CN111352746A CN111352746A (en) 2020-06-30
CN111352746B true CN111352746B (en) 2023-07-07

Family

ID=71195687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010083718.7A Active CN111352746B (en) 2020-02-10 2020-02-10 Message flow limiting method and storage medium

Country Status (1)

Country Link
CN (1) CN111352746B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113242245A (en) * 2021-05-12 2021-08-10 上海绚显科技有限公司 TCP message flow limiting method, device, server and storage medium
CN113923181B (en) * 2021-09-30 2023-08-22 北京字跳网络技术有限公司 Group message processing method, device, system and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018224865A1 (en) * 2017-06-08 2018-12-13 Telefonaktiebolaget Lm Ericsson (Publ) Methods and network nodes for providing coordinated flowcontrol for a group of sockets in a network
CN110198275A (en) * 2018-03-28 2019-09-03 腾讯科技(深圳)有限公司 A kind of flow control methods, system, server and storage medium
CN110297707A (en) * 2018-03-22 2019-10-01 香港乐蜜有限公司 A kind of method for message transmission and device
CN110351357A (en) * 2019-07-08 2019-10-18 中国平安人寿保险股份有限公司 Server current-limiting method, device, computer equipment and storage medium
CN110417671A (en) * 2019-07-31 2019-11-05 中国工商银行股份有限公司 The current-limiting method and server of data transmission
CN110768912A (en) * 2019-10-21 2020-02-07 中国民航信息网络股份有限公司 API gateway current limiting method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018224865A1 (en) * 2017-06-08 2018-12-13 Telefonaktiebolaget Lm Ericsson (Publ) Methods and network nodes for providing coordinated flowcontrol for a group of sockets in a network
CN110720199A (en) * 2017-06-08 2020-01-21 瑞典爱立信有限公司 Method and network node for providing coordinated flow control for socket groups in a network
CN110297707A (en) * 2018-03-22 2019-10-01 香港乐蜜有限公司 A kind of method for message transmission and device
CN110198275A (en) * 2018-03-28 2019-09-03 腾讯科技(深圳)有限公司 A kind of flow control methods, system, server and storage medium
CN110351357A (en) * 2019-07-08 2019-10-18 中国平安人寿保险股份有限公司 Server current-limiting method, device, computer equipment and storage medium
CN110417671A (en) * 2019-07-31 2019-11-05 中国工商银行股份有限公司 The current-limiting method and server of data transmission
CN110768912A (en) * 2019-10-21 2020-02-07 中国民航信息网络股份有限公司 API gateway current limiting method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
巴志超 ; 李纲 ; 毛进 ; 徐健 ; .微信群内部信息交流的网络结构、行为及其演化分析――基于会话分析视角.情报学报.2018,(第10期),第1009-1021页. *
马庆祥 ; 刘钊远 ; .基于Storm的实时报警服务的设计与实现.信息技术.2016,(第12期),第162-166页. *

Also Published As

Publication number Publication date
CN111352746A (en) 2020-06-30

Similar Documents

Publication Publication Date Title
CN108874640B (en) Cluster performance evaluation method and device
US5787262A (en) System and method for distributed conflict resolution between data objects replicated across a computer network
CN112131073B (en) Monitoring method and system of server
US5504897A (en) Method and apparatus for processing electronic mail in parallel
EP1397888B1 (en) Method and system for efficient distribution of network event data
US8370847B2 (en) Managing persistence in a messaging system
US8793362B2 (en) Communications enterprise server monitor
CN106230997B (en) Resource scheduling method and device
EP2656218B1 (en) Load shedding in a data stream management system
CN110535713B (en) Monitoring management system and monitoring management method
US20100011098A1 (en) Systems and methods for managing networks
CN111131082A (en) Charging facility data transmission dynamic control method and system
CN111538563A (en) Event analysis method and device for Kubernetes
CN111352746B (en) Message flow limiting method and storage medium
US8185912B1 (en) Rerouting messages to parallel queue instances
CN113419852B (en) Method, device, equipment and storage medium for responding request of micro service
CN117240903B (en) Internet of things offline message dynamic management configuration system
CN110990245A (en) Micro-service operation state judgment method and device based on call chain data
CN110825505B (en) Task scheduling method, device, computer equipment and storage medium
CN119961085A (en) A high reliability lossless data acquisition and processing system and method
CN118051817A (en) Data processing method, system, device, storage medium and electronic equipment
CN115379019B (en) Service scheduling method, device, equipment and storage medium
CN114116178B (en) Cluster frame task management method and related device
US7068604B2 (en) Managing memory resident queues to control resources of the systems using the queues
CN112995241B (en) Service scheduling method and device

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