CN112612631A - Message queue accumulation detection method and related device - Google Patents

Message queue accumulation detection method and related device Download PDF

Info

Publication number
CN112612631A
CN112612631A CN202011604448.6A CN202011604448A CN112612631A CN 112612631 A CN112612631 A CN 112612631A CN 202011604448 A CN202011604448 A CN 202011604448A CN 112612631 A CN112612631 A CN 112612631A
Authority
CN
China
Prior art keywords
queue
consumption
time
message queue
target message
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.)
Granted
Application number
CN202011604448.6A
Other languages
Chinese (zh)
Other versions
CN112612631B (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.)
Hangzhou Tuya Information Technology Co Ltd
Original Assignee
Hangzhou Tuya Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Tuya Information Technology Co Ltd filed Critical Hangzhou Tuya Information Technology Co Ltd
Priority to CN202011604448.6A priority Critical patent/CN112612631B/en
Publication of CN112612631A publication Critical patent/CN112612631A/en
Application granted granted Critical
Publication of CN112612631B publication Critical patent/CN112612631B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application discloses a message queue accumulation detection method and a related device, which can detect the amount of queue data accumulated in a message queue, and further discover the accumulation of the amount of queue data in the message queue in time. The method in the embodiment of the application comprises the following steps: detecting the consumption amount of a consumer to the queue data amount in the target message queue in a consumption period; detecting the data volume of a time queue received by the target message queue at a plurality of times in the consumption period; judging whether the data volume of the time queue corresponding to one of the times is larger than the consumption volume or not; if the data volume of the time queue is larger than the consumption volume, determining that the target message queue has message accumulation at one time; and if the data volume of the time queue is not larger than the consumption volume, determining that no message accumulation exists in the target message queue at one time.

Description

Message queue accumulation detection method and related device
Technical Field
The embodiment of the application relates to the field of data processing, in particular to a message queue accumulation detection method and a related device.
Background
"message queue" refers to a container that holds messages during the transmission of messages between two computers. Message queues act as middlemans in relaying a message from its source computer to its destination computer, the primary purpose of a message queue being to provide routing and to ensure delivery of the message; i.e., if the target computer that was the recipient when the message was sent by the source computer is unavailable, etc., the message queue will hold the message until the message can be successfully delivered to the target computer.
If the messages in the message queue cannot be transmitted to the target computer in time, excessive queue data volume is accumulated in the message queue, and at the moment, the message queue is required to find that the message queue is accumulated in time so as to start a solution in time, so that the problem that whether the messages are accumulated in the message queue is determined to be urgently solved is solved.
Disclosure of Invention
The embodiment of the application provides a message queue accumulation detection method and a related device, which can detect the amount of queue data accumulated in a message queue, and further discover the accumulation of the amount of queue data in the message queue in time.
A first aspect of the present application provides a message queue accumulation detection method, including:
detecting the consumption amount of a consumer to the queue data amount in the target message queue in a consumption period;
detecting the data volume of a time queue received by the target message queue at a plurality of times in the consumption period;
judging whether the data volume of the time queue corresponding to one of the times is larger than the consumption volume or not;
if the data volume of the time queue is larger than the consumption volume, determining that the target message queue has message accumulation at one time;
and if the data volume of the time queue is not larger than the consumption volume, determining that no message accumulation exists in the target message queue at one time.
Optionally, after the detecting the consumption amount of the queue data amount in the target message queue by the consumer in one consumption cycle, the method further includes:
counting the total consumption of the consumer to the queue data volume in the target message queue in all consumption periods;
after the detecting an amount of time queue data that the target message queue receives at a number of times within the consumption period, the method further comprises:
and counting the data volume of the time queue of the target message queue currently received at a plurality of times in all consumption periods.
Optionally, the determining whether the data volume of the time queue corresponding to one of the times is greater than the consumption volume includes:
and judging whether the data volume of the time queue corresponding to one time is larger than the total consumption.
Optionally, after determining that there is a message pile in the target message queue at the one time, the method further includes:
and starting a preset alarm program.
A second aspect of the present application provides a message queue accumulation detection system, comprising;
the detection unit is used for detecting the consumption of a consumer to the queue data volume in the target message queue in a consumption cycle;
the detection unit is also used for detecting the data volume of the time queue received by the target message queue at a plurality of times in the consumption period;
the judging unit is used for judging whether the data volume of the time queue corresponding to one of the times is larger than the consumption volume;
a determining unit, configured to determine that there is message accumulation in the target message queue at the one time if the data amount of the time queue is greater than the consumption amount;
and the determining unit is further used for determining that no message accumulation exists in the target message queue at one moment if the data volume of the moment queue is not greater than the consumption volume.
Optionally, the system further comprises:
the counting unit is used for counting the total consumption of the data quantity of the queue in the target message queue by the consumer in all consumption periods;
and the counting unit is also used for counting the data volume of the time queue received by the target message queue at a plurality of times in all consumption periods.
Optionally, when the determining unit determines whether the time queue data amount corresponding to one of the times is greater than the consumption amount, the determining unit specifically includes:
and judging whether the data volume of the time queue corresponding to one time is larger than the total consumption.
Optionally, the system further comprises:
and the starting unit is used for starting a preset alarm program.
A third aspect of the present application provides a message queue accumulation detection apparatus, including:
the system comprises a processor, a memory, a bus and input and output equipment;
the processor is connected with the memory and the input and output equipment;
the bus is respectively connected with the processor, the memory and the input and output equipment;
the processor performs the method of any of the preceding first aspects.
A fourth aspect of the present application provides a computer storage medium having stored therein instructions that, when executed on a computer, cause the computer to perform the method of any of the preceding first aspects.
A fifth aspect of the present application provides a computer program product which, when executed on a computer, causes the computer to perform the method of any one of the preceding first aspects.
According to the technical scheme, the embodiment of the application has the following advantages:
the message queue accumulation detection method provided by the embodiment of the application detects the consumption amount of a consumer to the queue data volume in a target message queue in a consumption period, detects the time queue data volume received by the target message queue at a plurality of times in a corresponding consumption period, and then judges whether the time queue data volume corresponding to one time is larger than the consumption amount, if the time queue data volume is larger than the consumption amount, the target message queue can be determined to have message accumulation at the one time; if the amount of queue data at the time is not greater than the consumption amount, it may be determined that there is no message pile in the target message queue at the one time. Therefore, the message queue accumulation detection method can dynamically compare the queue data volume of each moment in the same consumption period with the consumption volume of the corresponding consumer, and further can timely find the accumulation of the queue data volume in the message queue.
Drawings
FIG. 1 is a flow chart illustrating an embodiment of a message queue pile-up detection method according to the present application;
FIG. 2 is a schematic flow chart illustrating another embodiment of a message queue accumulation detection method according to the present application;
FIG. 3 is a block diagram illustrating an embodiment of a message queue pile-up detection system according to the present application;
FIG. 4 is a schematic structural diagram of another embodiment of a message queue accumulation detection system according to the present application;
fig. 5 is a schematic structural diagram of an embodiment of a message queue accumulation detection device according to the present application.
Detailed Description
The embodiment of the application provides a message queue accumulation detection method and a related device, which can detect the amount of queue data accumulated in a message queue, and further discover the accumulation of the amount of queue data in the message queue in time.
It should be noted that, a consumer in the embodiment of the present application refers to an application program that processes a message stored in a message queue, and a consumer generally refers to one or more application programs that consume messages stored in a message queue, and the one or more application programs may respectively consume messages stored in the same message queue at the same time until the application programs respectively consume messages stored in the message queue completely. The queue data amount is the number of messages received and stored by the message queue at a certain time.
Referring to fig. 1, an embodiment of a message queue accumulation detection method according to the present application includes:
101. the consumption amount of the queue data in the target message queue by the consumer in one consumption period is detected.
According to the embodiment of the application, the consumption amount of the consumer to the queue data volume in the target message queue in one consumption period needs to be detected. Wherein the consumption cycle of the consumer is: as the time period for the application program of the consumer to update and report the consumption amount of the application program, it can be understood that the consumption periods corresponding to the respective application programs of the consumer may be different, and the consumption amounts of the respective application programs of the consumer to the queue data amount in the target message queue in the respective consumption periods may also be different. In the step, the consumption capacity of each application program as the consumer to the queue data volume in the target message queue can be known mainly by detecting the consumption of each consumer to the queue data volume in the target message queue in one consumption period.
102. And detecting the time queue data volume received by the target message queue at a plurality of times in the consumption period.
The embodiment of the application also needs to detect the time queue data volume received by the target message queue at a plurality of times in the consumption period corresponding to different consumers. Generally, the update speed of the queue data amount in the target message queue is shorter than the consumption update cycle of each consumer, so that the queue data amount may be received at several moments in time within the consumption cycle of one consumption update by each application program as a consumer. The time queue data size is: at a certain time within a consumption cycle of a certain consumer, the queue data amount after the queue data amount is updated by the target message queue, that is, in general, the queue data amount at the time of the latter time is greater than or equal to the queue data amount at the time of the former time.
103. Judging whether the data volume of the time queue corresponding to one of the times is larger than the consumption volume, if so, executing the step 104; if the time queue data size is not greater than the consumption size, go to step 105.
Determining the consumption amount of a queue data volume in a target message queue by a consumer in a consumption period in step 101, and after determining the time queue data volume received by the target message queue at a plurality of times in the same consumption period in step 102, this step may further determine whether the time queue data volume corresponding to one of the plurality of times in the consumption period is greater than the consumption amount of the consumer in the consumption period, and if the time queue data volume is greater than the consumption amount of the consumer in the consumption period, it indicates that the message received by the target message queue at the time in the consumption period cannot be processed by the consumer corresponding to the consumption period; if the data volume at the moment is not larger than the consumption volume of the consumer in the consumption period, the message received by the target message queue at the moment in the consumption period can be processed by the consumer in the corresponding consumption period.
104. It is determined that there is a pile of messages in the target message queue at one of the times.
When it is determined in step 103 that the data amount at the time is greater than the consumption amount of the consumer in the consumption period, it indicates that the message received by the target message queue at the time in the consumption period cannot be processed by the consumer corresponding to the consumption period, i.e. it is determined that there may be message accumulation in the target message queue at the time in the consumption period of the consumer.
105. It is determined that the target message queue does not have a message pile at one of the times.
When it is determined in step 103 that the data size at the time is not greater than the consumption size of the consumer in the consumption cycle, it indicates that the message received by the target message queue at the time in the consumption cycle can be processed by the consumer in the corresponding consumption cycle, i.e. it is determined that there is no message accumulation in the target message queue at the time.
The message queue accumulation detection method provided by the embodiment of the application detects the consumption amount of a consumer to the queue data volume in a target message queue in a consumption period, detects the time queue data volume received by the target message queue at a plurality of times in a corresponding consumption period, and then judges whether the time queue data volume corresponding to one time is larger than the consumption amount, if the time queue data volume is larger than the consumption amount, the target message queue can be determined to have message accumulation at the one time; if the amount of queue data at the time is not greater than the consumption amount, it may be determined that there is no message pile in the target message queue at the one time. Therefore, the message queue accumulation detection method can dynamically compare the queue data volume of each moment in the same consumption period with the consumption volume of the corresponding consumer, and further can timely find the accumulation of the queue data volume in the message queue.
Referring to fig. 2, another embodiment of the message queue accumulation detection method of the present application includes:
201. the consumption amount of the queue data in the target message queue by the consumer in one consumption period is detected.
The execution operation of this step is similar to the execution operation of step 101 in the embodiment of fig. 1, and is not described again here.
202. And counting the total consumption of the data amount of the queue in the target message queue currently consumed by the consumer in all consumption cycles.
In step 201, consumption of the queue data amount in the target message queue by different consumers in different consumption cycles can be detected and recorded, and further, this step can count the total consumption of the queue data amount in the target message queue by the consumer currently in all consumption cycles, for example, if it is time T6, as shown in table 1 below:
Time T1 T2 T3 T4 T5 T6
amount of queue data 100 200 300 400 500 600
Consumption of Consumer A 0 0 295 295 295 555
Consumption of Consumer B 80 160 240 320 400 480
TABLE 1
From table 1 above, it can be seen that the queue data amount in the target message queue increases by 100 every other update time; the consumption amount of the consumer a does not change at any of several times of the queue data amount update, for example, the times from T3 to T5 are 295, which indicates that one consumption period of the consumer a corresponds to about three times of the queue data amount update of the target message queue, that is, the consumption amounts of the consumer a at the times T4 and T5 in table 1 are not updated, but do not refer to that the consumer a does not process the messages of the target message queue at the times T4 and T5, except that the consumption period of the consumer a is longer than the period of the target message queue data amount update, and the consumption amount 295 of the consumer a updated at the time T3 refers to the consumption of the target message queue in the last consumption period, that is, the consumption amount 295 of the consumer a updated at the time T3 corresponds to the same consumption period of the target message queue at the times T1 and T2, and the like. That is, the total consumption 295 updated by consumer a at time T3 is the total consumption of the queue data size in the target message queue for all consumption cycles before time T3 (excluding time T3); similarly, the total consumption 555 updated by consumer A at time T6 is the total consumption of the queue data size in the target message queue for all consumption cycles prior to time T6 (excluding time T6).
From table 1, it can be seen that the consumption cycle of consumer B is substantially consistent with the queue data amount update cycle of the corresponding target message queue, and the consumption speed of the target message queue is balanced in each consumption cycle of consumer B. That is, the total consumption amount 160 updated by the consumer B at the time T2 is the total consumption amount of the queue data amount in the target message queue in all consumption cycles before the time T2 (excluding the time T2); similarly, the total consumption amount 240 updated by consumer B at time T3 is the total consumption amount of queue data in the target message queue for all consumption cycles before time T3 (excluding time T3), and so on.
203. And detecting the time queue data volume received by the target message queue at a plurality of times in the consumption period.
The execution operation of this step is similar to the execution operation of step 102 in the embodiment of fig. 1, and is not repeated here.
204. And counting the data volume of the time queue of the target message queue currently received at a plurality of times in all consumption periods.
The amount of time queue data that the target message queue receives at several times in different consumption cycles may be queued for step 203. For example, as shown in table 1 above, it can be seen from table 1 that the queue data amount in the target message queue increases by 100 every time, and if it is time T6, the time queue data amount of the target message queue is 600.
205. Judging whether the time queue data volume corresponding to one of the times is larger than the total consumption, if so, executing step 206; if the time queue data size is not greater than the total consumption, step 207 is performed.
Determining the total consumption amount of the queue data volume in the target message queue currently in all consumption cycles in step 202, after determining the time queue data volume of the target message queue currently received at a plurality of times in all consumption cycles in step 204, this step may further determine whether the time queue data volume corresponding to one of the times is greater than the total consumption amount, if the time queue data volume is greater than the total consumption amount, it indicates that the message received by the target message queue at the time cannot be consumed and processed by the corresponding consumer; and if the data volume of the time queue is not more than the total consumption volume, the message received by the target message queue at the time can be consumed and processed by the corresponding consumer.
206. It is determined that there is a pile of messages in the target message queue at one of the times.
When the time queue data amount is determined to be greater than the total consumption amount in step 205, this indicates that the message received by the target message queue at this time cannot be consumed and processed by the corresponding consumer, and there is a message pile in the target message queue at this time. For example, in table 1, the total consumption of consumer B at time T6 is 480, and the total consumption updated at time T6 is an update summary of the last consumption cycle, that is, the time queue data amount in the target message queue corresponding to time T5 is 500, where the time queue data amount in the target message queue 500 at time T5 is greater than the total consumption 480 of consumer B in the consumption cycle, this indicates that the message received by the target message queue at time T5 cannot be consumed and processed by consumer B, and the target message queue has message accumulation at time T5.
207. And starting a preset alarm program.
After determining that there is a message pile in the target message queue at one of the moments in step 206, a preset alarm program may be started, so that the person who manages the target message queue can know and handle the situation in time. Of course, a processing program for sending accumulation to the target message queue may also be preset, and the processing program is triggered to perform processing after the message accumulation occurs, which is not limited herein.
208. It is determined that the target message queue does not have a message pile at one of the times.
When it is determined in step 205 that the data amount of the time queue is not greater than the total consumption amount, this indicates that the message received by the target message queue at this time can be consumed and processed by the corresponding consumer, and there is no message accumulation in the target message queue at this time. (ii) a For example, in the above-mentioned consumer a at time T6 in table 1, the total consumption of the consumer a at time T6 is 555, and the total consumption of the update at time T6 is an update summary of the last consumption cycle, that is, the time queue data amount in the target message queue corresponding to 300 to 500 at times T3 to T5, and the time queue data amount in the target message queue corresponding to 300 to 500 at times T3 to T5 is smaller than the total consumption 555 of the consumer a at the consumption cycle, which indicates that the messages received by the target message queue at times T3 to T5 can be consumed and processed by the consumer a, and the target message queue has no message accumulation at times T3 to T5.
The message queue accumulation detection method provided by the embodiment of the application detects the total consumption amount of a consumer to the queue data amount in a target message queue in all current consumption cycles, detects the time queue data amount received by the target message queue at a plurality of times in all current consumption cycles, and then judges whether the time queue data amount corresponding to one time is larger than the total consumption amount, if the time queue data amount is larger than the total consumption amount, the target message queue can be determined to have message accumulation at the one time, and a preset alarm program can be started so as to perform corresponding preset processing; if the queue data amount at the time is not greater than the total consumption amount, it may be determined that the target message queue does not have a message pile at the one time. Therefore, the message queue accumulation detection method can dynamically compare the queue data volume of each moment in all consumption periods with the total consumption volume of the corresponding consumer, and further can timely find the accumulation of the queue data volume in the message queue.
With reference to fig. 3, the above describes an embodiment of the message queue accumulation detection method of the present application, and the following describes a message queue accumulation detection system of the present application, where an embodiment of the message queue accumulation detection system of the present application includes:
the detecting unit 301 is configured to detect a consumption amount of a consumer to queue data amount in a target message queue in a consumption cycle;
the detecting unit 301 is further configured to detect a time queue data amount received by the target message queue at a plurality of times in the consumption cycle;
a determining unit 302, configured to determine whether a time queue data amount corresponding to one of the times is greater than the consumption amount;
a determining unit 303, configured to determine that there is message accumulation in the target message queue at the one time if the data amount of the time queue is greater than the consumption amount;
the determining unit 303 is further configured to determine that there is no message pile in the target message queue at the one time if the data amount of the time queue is not greater than the consumption amount.
The operations performed by the message queue accumulation detection system in the embodiment of the present application are similar to the operations performed in the embodiment of fig. 1, and are not described again here.
The message queue accumulation detection method provided by the embodiment of the application detects the consumption amount of a consumer to the queue data volume in a target message queue in a consumption period, detects the time queue data volume received by the target message queue at a plurality of times in a corresponding consumption period, and then judges whether the time queue data volume corresponding to one time is larger than the consumption amount, if the time queue data volume is larger than the consumption amount, the target message queue can be determined to have message accumulation at the one time; if the amount of queue data at the time is not greater than the consumption amount, it may be determined that there is no message pile in the target message queue at the one time. Therefore, the message queue accumulation detection method can dynamically compare the queue data volume of each moment in the same consumption period with the consumption volume of the corresponding consumer, and further can timely find the accumulation of the queue data volume in the message queue.
Referring to fig. 4, another embodiment of the message queue accumulation detection system of the present application includes:
a detecting unit 401, configured to detect a consumption amount of a queue data amount in a target message queue by a consumer in a consumption cycle;
the detecting unit 401 is further configured to detect a time queue data amount received by the target message queue at a plurality of times in the consumption cycle;
a determining unit 402, configured to determine whether a time queue data amount corresponding to one of the times is greater than the consumption amount;
a determining unit 403, configured to determine that there is message accumulation in the target message queue at the one time if the data amount of the time queue is greater than the consumption amount;
the determining unit 403 is further configured to determine that there is no message pile in the target message queue at the one time if the data amount of the time queue is not greater than the consumption amount.
Optionally, the system further comprises:
a counting unit 404, configured to count a total consumption amount of the queue data amount in the target message queue currently in all consumption cycles by the consumer;
the counting unit 404 is further configured to count the data amount of the time queue currently received by the target message queue at a plurality of times in all consumption cycles.
Optionally, when determining whether the time queue data amount corresponding to one of the times is greater than the consumption amount, the determining unit 402 specifically includes:
and judging whether the data volume of the time queue corresponding to one time is larger than the total consumption.
Optionally, the system further comprises:
and the starting unit 405 is used for starting a preset alarm program.
The operations performed by the message queue accumulation detection system in the embodiment of the present application are similar to the operations performed in the embodiment in fig. 2, and are not described again here.
The message queue accumulation detection method provided by the embodiment of the application detects the total consumption amount of a consumer to the queue data amount in a target message queue in all current consumption cycles, detects the time queue data amount received by the target message queue at a plurality of times in all current consumption cycles, and then judges whether the time queue data amount corresponding to one time is larger than the total consumption amount, if the time queue data amount is larger than the total consumption amount, the target message queue can be determined to have message accumulation at the one time, and a preset alarm program can be started so as to perform corresponding preset processing; if the queue data amount at the time is not greater than the total consumption amount, it may be determined that the target message queue does not have a message pile at the one time. Therefore, the message queue accumulation detection method can dynamically compare the queue data volume of each moment in all consumption periods with the total consumption volume of the corresponding consumer, and further can timely find the accumulation of the queue data volume in the message queue. An embodiment of the message queue accumulation detection device of the present application is described below with reference to fig. 5, which includes:
the message queue accumulation detection apparatus 500 may include one or more Central Processing Units (CPUs) 501 and a memory 505, where one or more applications or data are stored in the memory 505. Memory 505 may be volatile storage or persistent storage, among others. The program stored in memory 505 may include one or more modules, each of which may include a series of instruction operations in a message queue pile detection device. Still further, the central processor 501 may be configured to communicate with the memory 505 to execute a series of instruction operations in the memory 505 on the message queue pile detection apparatus 500. The message queue accumulation detection apparatus 500 may also include one or more power supplies 502, one or more wired or wireless network interfaces 503, one or more input-output interfaces 504, and/or one or more operating systems, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. The central processing unit 501 may perform the operations in the embodiments of fig. 1 or fig. 2, which are not described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like.

Claims (10)

1. A message queue pile-up detection method, comprising:
detecting the consumption amount of a consumer to the queue data amount in the target message queue in a consumption period;
detecting the data volume of a time queue received by the target message queue at a plurality of times in the consumption period;
judging whether the data volume of the time queue corresponding to one of the times is larger than the consumption volume or not;
if the data volume of the time queue is larger than the consumption volume, determining that the target message queue has message accumulation at one time;
and if the data volume of the time queue is not larger than the consumption volume, determining that no message accumulation exists in the target message queue at one time.
2. The message queue pile detection method of claim 1, wherein after detecting the consumer's consumption of the amount of queue data in the target message queue within a consumption period, the method further comprises:
counting the total consumption of the consumer to the queue data volume in the target message queue in all consumption periods;
after the detecting an amount of time queue data that the target message queue receives at a number of times within the consumption period, the method further comprises:
and counting the data volume of the time queue of the target message queue currently received at a plurality of times in all consumption periods.
3. The message queue pile-up detection method according to claim 2, wherein the determining whether the time queue data amount corresponding to one of the times is greater than the consumption amount comprises:
and judging whether the data volume of the time queue corresponding to one time is larger than the total consumption.
4. The message queue stack detection method according to any one of claims 1 to 3, wherein after determining that there is a message stack in the target message queue at the one of the time instants, the method further comprises:
and starting a preset alarm program.
5. A message queue pile-up detection system, comprising:
the detection unit is used for detecting the consumption of a consumer to the queue data volume in the target message queue in a consumption cycle;
the detection unit is also used for detecting the data volume of the time queue received by the target message queue at a plurality of times in the consumption period;
the judging unit is used for judging whether the data volume of the time queue corresponding to one of the times is larger than the consumption volume;
a determining unit, configured to determine that there is message accumulation in the target message queue at the one time if the data amount of the time queue is greater than the consumption amount;
and the determining unit is further used for determining that no message accumulation exists in the target message queue at one moment if the data volume of the moment queue is not greater than the consumption volume.
6. The message queue pile-up detection system of claim 5, wherein the system further comprises:
the counting unit is used for counting the total consumption of the data quantity of the queue in the target message queue by the consumer in all consumption periods;
and the counting unit is also used for counting the data volume of the time queue received by the target message queue at a plurality of times in all consumption periods.
7. The message queue accumulation detection system according to claim 6, wherein the determining unit, when determining whether the queue data amount at a time corresponding to one of the times is greater than the consumption amount, is specifically configured to:
and judging whether the data volume of the time queue corresponding to one time is larger than the total consumption.
8. The message queue accumulation detection system as in any one of claims 5-7, further comprising:
and the starting unit is used for starting a preset alarm program.
9. A message queue pile-up detecting apparatus, comprising:
the system comprises a processor, a memory, a bus and input and output equipment;
the processor is connected with the memory and the input and output equipment;
the bus is respectively connected with the processor, the memory and the input and output equipment;
the processor performs the method of any one of claims 1 to 4.
10. A computer storage medium having stored therein instructions that, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 4.
CN202011604448.6A 2020-12-29 2020-12-29 Message queue accumulation detection method and related device Active CN112612631B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011604448.6A CN112612631B (en) 2020-12-29 2020-12-29 Message queue accumulation detection method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011604448.6A CN112612631B (en) 2020-12-29 2020-12-29 Message queue accumulation detection method and related device

Publications (2)

Publication Number Publication Date
CN112612631A true CN112612631A (en) 2021-04-06
CN112612631B CN112612631B (en) 2024-04-02

Family

ID=75249244

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011604448.6A Active CN112612631B (en) 2020-12-29 2020-12-29 Message queue accumulation detection method and related device

Country Status (1)

Country Link
CN (1) CN112612631B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113467969A (en) * 2021-06-22 2021-10-01 上海星融汽车科技有限公司 Method for processing message accumulation
CN115567477A (en) * 2022-09-19 2023-01-03 上海星起源新能源科技有限公司 Method, equipment and storage medium for processing message accumulation

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019205371A1 (en) * 2018-04-24 2019-10-31 平安科技(深圳)有限公司 Server, message allocation method, and storage medium
CN111124710A (en) * 2019-12-17 2020-05-08 联想(北京)有限公司 Data processing method and electronic equipment
CN111694677A (en) * 2020-05-08 2020-09-22 深圳木成林科技有限公司 Message queue management method, device, terminal and computer-readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019205371A1 (en) * 2018-04-24 2019-10-31 平安科技(深圳)有限公司 Server, message allocation method, and storage medium
CN111124710A (en) * 2019-12-17 2020-05-08 联想(北京)有限公司 Data processing method and electronic equipment
CN111694677A (en) * 2020-05-08 2020-09-22 深圳木成林科技有限公司 Message queue management method, device, terminal and computer-readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
PRASHANT PATIL, SANJAY THAKUR: "Patient waiting time prediction in hospital queuing system using improved random forest in big data", 《2019 ICICT》, 31 December 2019 (2019-12-31) *
杨厚俊, 徐熙君, 宋敏: ""重叠网络中一种实现组播交换的有效排队机制"", 《计算机仿真》, 31 December 2007 (2007-12-31) *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113467969A (en) * 2021-06-22 2021-10-01 上海星融汽车科技有限公司 Method for processing message accumulation
CN113467969B (en) * 2021-06-22 2024-01-23 上海星融汽车科技有限公司 Method for processing message accumulation
CN115567477A (en) * 2022-09-19 2023-01-03 上海星起源新能源科技有限公司 Method, equipment and storage medium for processing message accumulation
CN115567477B (en) * 2022-09-19 2024-05-31 上海星起源新能源科技有限公司 Method, equipment and storage medium for processing message accumulation

Also Published As

Publication number Publication date
CN112612631B (en) 2024-04-02

Similar Documents

Publication Publication Date Title
US10348809B2 (en) Naming of distributed business transactions
CN109246229B (en) Method and device for distributing resource acquisition request
CN106095572B (en) distributed scheduling system and method for big data processing
CN109450987B (en) Number generation method, device and system and storage medium
CN112612631B (en) Message queue accumulation detection method and related device
US8806507B1 (en) Dynamic provisioning of message groups
CN111008075A (en) Load balancing system, method, device, equipment and medium
CN111190745A (en) Data processing method and device and computer readable storage medium
CN109343972B (en) Task processing method and terminal equipment
CN113259428A (en) Data access request processing method and device, computer equipment and medium
CN104980472A (en) Network traffic control method and device
CN109766172A (en) A kind of asynchronous task scheduling method and device
CN109597800B (en) Log distribution method and device
CN104935612A (en) Data processing method and server
CN106991070B (en) Real-time computing method and device
CN106020984B (en) Method and device for creating process in electronic equipment
CN114448989B (en) Method, device, electronic equipment, storage medium and product for adjusting message distribution
US6615215B1 (en) Method for graduated load sensitive task dispatching in computing system
CN111080126B (en) Task allocation method and device
CN103823712A (en) Data flow processing method and device for multi-CPU virtual machine system
CN111314397A (en) Message processing method and device based on Swoole framework and Yaf framework
CN107315637B (en) Load balancing method and device of signal processing module
CN112380011A (en) Dynamic adjustment method and device for service capacity
CN113055493B (en) Data packet processing method, device, system, scheduling device and storage medium
CN110046040B (en) Distributed task processing method and system and storage medium

Legal Events

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