Message wave crest smoothing method and device and readable storage medium
By discretely switching message messages, the problems of high hardware investment and maintenance costs and large resource waste in the existing technology are solved, and rapid peak cutting and valley filling and continuous stability of user Internet services are achieved.
Patent Information
- Application Number
- CN202411649956.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-18
AI Technical Summary
When processing message peaks in the prior art, hardware investment and maintenance costs are high, resources are wasted during off-peak periods, and input-output ratio is low.
By responsive to the message collection preamble, the message message exceeding the threshold value is obtained, and it is determined that it is a silent message message or an active message message. If it is a silent message message, increase its reporting time quota and evenly disperse it to the effective time discrete point; if it is an active message message, evenly disperse it to the effective time discrete point or the traffic available quota point according to its traffic available quota and effective time.
Rapid peaks and valleys are cut quickly, save hardware investment, suppress the occurrence of message storms, improve the efficiency of slowing down periodic Internet message shock peaks, and ensure the sustained and stable user Internet service.
Smart Images

Figure CN119629680A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a message peak smoothing method, device and readable storage medium. Background Art
[0002] In the current application scenarios, the message billing system carries a large number of message billing users. For example, Guangdong Unicom's message billing system currently carries more than 30 million message billing users. During peak business hours, the system's concurrent business volume can reach 30,000 transactions per second. With the continuous growth of message billing users, the peak business volume will have a relatively large impact on the downstream under the current system processing capacity. This impact causes message requests to be unable to be responded to in a timely manner, resulting in users' Internet access being unsmooth and poor experience.
[0003] In addition, with the increase in the number of mobile Internet users, the number of data Internet service messages has increased dramatically. It is extremely easy to stimulate periodic request messages at the same time during engineering cutover or sudden network outage. If there is no effective method to smooth the peak, a snowball message storm will form, causing mobile phone users to experience Internet access jams or flashes, etc., which poses a huge potential risk.
[0004] To solve this problem, the current method of hardware expansion is used to enhance system performance to cope with the impact of message storms. However, for the peak that increases more than ten times in an instant, this method requires huge hardware investment and maintenance costs, and it will cause a lot of hardware resources to be wasted when there is no message storm impact, and the input-output effect is not satisfactory. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a message peak smoothing method, device and readable storage medium in response to the above-mentioned shortcomings of the prior art, so as to solve the problems of high hardware investment and maintenance costs, large waste of resources in non-peak periods, and low input-output ratio in the existing method of smoothing message peaks by hardware expansion.
[0006] In a first aspect, the present invention provides a message peak smoothing method, the method comprising:
[0007] In response to the message packet amount of the message collection front-end exceeding the loadable threshold, acquiring the message packets exceeding the loadable threshold;
[0008] Determine whether the message message exceeding the loadable threshold is a silent message message or an active message message;
[0009] If the message message exceeding the carrying threshold is a silent message message, the reporting time quota of the silent message message is increased by a preset time slice unit, and the silent message message is evenly scattered to each effective time discrete point;
[0010] If the message packets exceeding the carrying threshold are active message packets, the active message packets are evenly dispersed to each effective time discrete point or flow available quota point according to the flow available quota and effective time of the active message packets.
[0011] Furthermore, in response to the message packet amount of the message collection front-end exceeding the loadable threshold, before acquiring the message packets exceeding the loadable threshold, the method further includes:
[0012] Monitor the periodic peak impact state caused by the overload of the message collection front-end processor, and initiate a request for querying the service node business information of the message collection front-end processor to obtain the message message volume of the message collection front-end processor.
[0013] Further, in response to the message packet amount of the message collection front-end exceeding the loadable threshold, obtaining the message packets exceeding the loadable threshold specifically includes:
[0014] If it is found that the message packet volume of the message collection front-end exceeds the loadable threshold for N consecutive times within a preset period, a diversion command is sent to the message collection front-end to obtain the message packets in the message collection front-end that exceed the loadable threshold, where N≥1.
[0015] Further, the reporting time quota of the silence message message is increased by a preset time slice unit, and the silence message message is evenly dispersed to each effective time discrete point, specifically including:
[0016] The time point exceeding the loadable threshold is taken as the effective time discrete point T0, and a time window is formed with T0 as the starting point, and the window length of the time window is W, where W≥1;
[0017] Increase the reporting time quota of each of the silence message packets exceeding the loadable threshold by T, where T is a time slice unit;
[0018] Cyclically distribute all the silence message messages exceeding the loadable threshold to other valid time discrete points in the time window except T0;
[0019] If a new overflow peak is formed in a certain valid time discrete point of the time window, the certain valid time discrete point is taken as the new T0, and a new time window is formed with the new T0 as the starting point and W as the window length, and the silent message messages exceeding the loadable threshold are continuously allocated, and so on, until all the silent message messages exceeding the loadable threshold are reduced below the loadable threshold line.
[0020] Further, the cyclically allocating all the silent message packets exceeding the loadable threshold to other valid time discrete points in the time window except T0 specifically includes:
[0021] For the i-th silent message message A among all the silent message messages exceeding the loadable threshold i , A i Discretize to valid time discrete points in the time window Among them, T i The calculation formula is as follows:
[0022]
[0023] In the formula, i ranges from 1 to M, and M is the total number of the silence message packets exceeding the carrying threshold.
[0024] Further, evenly dispersing the active message messages to each effective time discrete point or traffic available quota point according to the traffic available quota and effective time of the active message messages specifically includes:
[0025] When the active message message arrives at the corresponding valid time window before the available traffic quota is exhausted, the reporting time quota of the active message message is increased by a preset time slice unit according to the same processing strategy as the silent message message, and the active message message is evenly scattered to each valid time discrete point;
[0026] When the active message message does not arrive within the effective time window but the available traffic quota has been consumed, the reported traffic quota of the active message message is increased by a preset traffic quota unit, and the active message message is evenly dispersed to each available traffic quota point.
[0027] Further, the reporting traffic quota of the active message packet is increased by a preset traffic quota unit, and the active message packet is evenly distributed to each traffic available quota point, specifically including:
[0028] The available traffic quota point exceeding the carrying threshold is used as the available traffic quota point D0, and a traffic quota slice is formed with D0 as the starting point, and the traffic usage size of the traffic quota slice is V, where V≥1;
[0029] Increase the reported traffic quota of each active message packet exceeding the loadable threshold by D, where D is a traffic quota unit;
[0030] Allocate all the active message packets exceeding the loadable threshold cyclically to other available traffic quota points in the traffic quota slice except D0;
[0031] If a new overflow peak is formed in a certain traffic available quota point of the traffic quota slice, the certain traffic available quota point is used as the new D0, and a new traffic quota slice is formed with the new D0 as the starting point and V as the traffic usage size, and the active message packets exceeding the loadable threshold are continuously allocated, and so on, until all the active message packets exceeding the loadable threshold fall below the loadable threshold line.
[0032] Further, the cyclically allocating all the active message packets exceeding the loadable threshold to other available traffic quota points in the traffic quota slice except D0 specifically includes:
[0033] For the i-th active message E among all the active message messages exceeding the loadable threshold i , E i The traffic quota points D in the traffic quota slice are discretely divided into i Among them, D i The calculation formula is as follows:
[0034] D i =D0+(i mod V)*D
[0035] In the formula, i ranges from 1 to M, and M is the total number of active message packets exceeding the loadable threshold.
[0036] Furthermore, the method further comprises:
[0037] If it is monitored that no periodic peak impact occurs in the message collection front-end processor within a time window period, a traffic diversion release command is sent to the message collection front-end processor.
[0038] In a second aspect, the present invention provides a message peak smoothing device, the device comprising:
[0039] A message acquisition module, configured to acquire message packets exceeding the loadable threshold in response to the message amount of the message collection front-end exceeding the loadable threshold;
[0040] A message type determination module, connected to the message acquisition module, for determining whether the message message exceeding the loadable threshold is a silent message message or an active message message;
[0041] A first discrete module, connected to the message type judgment module, is used to increase the reporting time quota of the silent message message by a preset time slice unit if the message message exceeding the loadable threshold is a silent message message, and evenly disperse the silent message message to each effective time discrete point;
[0042] The second discrete module is connected to the first discrete module and is used to evenly disperse the active message message to each effective time discrete point or traffic available quota point according to the traffic available quota and effective time of the active message message if the message message exceeding the loadable threshold is an active message message.
[0043] In a third aspect, the present invention provides a message peak smoothing device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to implement the message peak smoothing method described in the first aspect.
[0044] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for smoothing message peaks described in the first aspect is implemented.
[0045] The present invention provides a method, device and readable storage medium for smoothing message peaks. First, in response to the message amount of the message collection front-end exceeding the loadable threshold, the message message exceeding the loadable threshold is obtained; then it is determined whether the message message exceeding the loadable threshold is a silent message message or an active message message; if the message message exceeding the loadable threshold is a silent message message, the reporting time quota of the silent message message is increased by a preset time slice unit, and the silent message message is evenly scattered to each effective time discrete point; if the message message exceeding the loadable threshold is an active message message, the active message message is evenly scattered to each effective time discrete point or traffic available quota point according to the traffic available quota and effective time of the active message message. The present invention performs discrete switching on the message message exceeding the loadable threshold to quickly cut the peak and fill the valley, which not only saves hardware investment, but also can suppress the generation of message storms, thereby improving the efficiency of smoothing the impact peak of periodic Internet message messages and ensuring the continuous stability of user Internet services. The invention solves the problems of high hardware investment and maintenance cost, large waste of resources in non-peak period and low input-output ratio in the existing method of smoothing message peak by hardware expansion. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 This is a flow chart of a message peak smoothing method according to Embodiment 1 of the present invention;
[0047] Figure 2 This is an overall system architecture diagram of a message peak smoothing method according to an embodiment of the present invention;
[0048] Figure 3 A logical function diagram of a message collection front-end processor according to an embodiment of the present invention;
[0049] Figure 4 A real-time tracking triggering flow chart of an embodiment of the present invention;
[0050] Figure 5 A schematic diagram of a dual discrete core algorithm for available traffic quota and effective time according to an embodiment of the present invention;
[0051] Figure 6 A schematic diagram of an effective time dimension discrete core algorithm according to an embodiment of the present invention;
[0052] Figure 7 A schematic diagram of a discrete core algorithm for available traffic quotas according to an embodiment of the present invention;
[0053] Figure 8 This is a schematic diagram of the structure of a message peak smoothing device according to Embodiment 2 of the present invention;
[0054] Fig. 9 This is a structural schematic diagram of a message peak smoothing device according to embodiment 3 of the present invention. DETAILED DESCRIPTION
[0055] In order to enable those skilled in the art to better understand the technical solution of the present invention, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0056] It should be understood that the specific embodiments and drawings described herein are only used to explain the present invention rather than to limit the present invention.
[0057] It can be understood that, in the absence of conflict, the various embodiments of the present invention and the various features in the embodiments can be combined with each other.
[0058] It can be understood that, for the convenience of description, the drawings of the present invention only show the parts related to the present invention, while the parts irrelevant to the present invention are not shown in the drawings.
[0059] It can be understood that each unit and module involved in the embodiments of the present invention may correspond to only one physical structure, or may be composed of multiple physical structures, or multiple units and modules may be integrated into one physical structure.
[0060] It can be understood that the terms "first", "second", etc. in the embodiments of the present invention are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.
[0061] It can be understood that, without conflict, the functions and steps marked in the flowcharts and block diagrams of the present invention may occur in an order different from that marked in the drawings.
[0062] It is understood that the flowcharts and block diagrams of the present invention illustrate the possible architectures, functions, and operations of the systems, devices, equipment, and methods according to the various embodiments of the present invention. Each box in the flowchart or block diagram may represent a unit, module, program segment, or code, which contains executable instructions for implementing the specified functions. Moreover, each box or combination of boxes in the block diagram and flowchart may be implemented by a hardware-based system that implements the specified functions, or may be implemented by a combination of hardware and computer instructions.
[0063] It can be understood that the units and modules involved in the embodiments of the present invention can be implemented by software or hardware. For example, the units and modules can be located in a processor.
[0064] Embodiment 1:
[0065] This embodiment provides a method for smoothing message peaks, such as Figure 1 As shown, the method includes:
[0066] Step S101: in response to the message packet amount of the message collection front-end exceeding the loadable threshold, acquiring message packets exceeding the loadable threshold.
[0067] It should be noted that the overall system architecture diagram of the message peak smoothing method provided in this embodiment is as follows Figure 2 As shown, it includes a message source, a message collection front-end, a message control node, a variable window dual discrete algorithm device and a production system, wherein the message source is the source of the upstream message generation, such as various core network elements GGSN, SACP, etc. The production system is the downstream system of the message billing system, which is used to perform production processing on the messages forwarded by the message billing, such as generating call records based on the messages, and performing production activities such as billing. The message collection front-end implements the session management of the messages according to the message messages, and realizes the usage quota calculation and life time slice calculation according to the session. The logical function diagram of the message collection front-end is shown in FIG. Figure 3 As shown, it is mainly composed of a message control buffer and a rectifier module. The message peak smoothing method is applied to a variable window double discrete algorithm device.
[0068] Optionally, in response to the message packet amount of the message collection front-end exceeding the loadable threshold, before acquiring the message packets exceeding the loadable threshold, the method further includes:
[0069] Monitor the periodic peak impact state caused by the overload of the message collection front-end processor, and initiate a request for querying the service node business information of the message collection front-end processor to obtain the message message volume of the message collection front-end processor.
[0070] In this embodiment, the variable window double discrete algorithm device includes a real-time tracking trigger and a variable window double discrete controller. The real-time tracking trigger can define the load threshold of the message collection front-end, monitor the periodic peak impact state caused by the overload of the message collection front-end, and initiate a request for querying the service node (referring to the access point of the message collection front-end) service information to the message collection front-end to obtain the message message volume of the message collection front-end, and the detected message collection front-end shared memory The information of the business volume of all nodes.
[0071] It should be noted that when a user surfs the Internet, a message message will be triggered.
[0072] Optionally, in response to the message packet amount of the message collection front-end exceeding a loadable threshold, acquiring the message packets exceeding the loadable threshold specifically includes:
[0073] If it is found that the message packet volume of the message collection front-end exceeds the loadable threshold for N consecutive times within a preset period, a diversion command is sent to the message collection front-end to obtain the message packets in the message collection front-end that exceed the loadable threshold, where N≥1.
[0074] In this embodiment, in order to prevent misjudgment and improve the hit rate of the smooth peak strategy, it can be set that the diversion command is sent only when the number of times exceeding the loadable threshold reaches a certain number (i.e., N times). Specifically, when the real-time tracking trigger queries that the message message volume of the message collection front-end exceeds the loadable threshold for N consecutive times, the corresponding message collection front-end is triggered to switch to the variable window dual discrete algorithm device (i.e., send a diversion command), and the real-time tracking controller switches the message messages (i.e., overflow messages) in the message collection front-end that exceed the loadable threshold to the variable window dual discrete controller.
[0075] Step S102: Determine whether the message message exceeding the loadable threshold is a silent message message or an active message message;
[0076] In this embodiment, the overflowed messages include two types: silent message messages and active message messages.
[0077] Step S103: If the message message exceeding the carrying threshold is a silent message message, the reporting time quota of the silent message message is increased by a preset time slice unit, and the silent message message is evenly dispersed to each effective time discrete point;
[0078] In this embodiment, the characteristic of silent message packets is that they are not the user's online behavior, but the system resides in the memory in order to keep the message packets online, and reports them regularly at fixed times, so as to ensure the effectiveness of such message packets and guarantee the continuity of user online access. Because of this, such silent traffic message packets are easily triggered by network interruptions and reported in a centralized manner, and are continuously reported at a certain point at a fixed periodic time, forming a message storm, which may cause the business system to crash in severe cases. Therefore, for silent message packets, the fixed time of such silent traffic message packets is changed into a variable discrete time, and such silent message packets are evenly scattered to each effective time discrete point, so that the peak of the message packet is quickly distributed to each effective time discrete point of the time window.
[0079] Optionally, the step of increasing the reporting time quota of the silence message message by a preset time slice unit and evenly dispersing the silence message message to each valid time discrete point specifically includes:
[0080] The time point exceeding the loadable threshold is taken as the effective time discrete point T0, and a time window is formed with T0 as the starting point, and the window length of the time window is W, where W≥1;
[0081] Increase the reporting time quota of each of the silence message packets exceeding the loadable threshold by T, where T is a time slice unit;
[0082] Cyclically distribute all the silence message messages exceeding the loadable threshold to other valid time discrete points in the time window except T0;
[0083] If a new overflow peak is formed in a certain valid time discrete point of the time window, the certain valid time discrete point is taken as the new T0, and a new time window is formed with the new T0 as the starting point and W as the window length, and the silent message messages exceeding the loadable threshold are continuously allocated, and so on, until all the silent message messages exceeding the loadable threshold are reduced below the loadable threshold line.
[0084] Specifically, the cyclically allocating all the silence message packets exceeding the loadable threshold to other valid time discrete points in the time window except T0 specifically includes:
[0085] For the i-th silent message message A among all the silent message messages exceeding the loadable thresholdi , A i Discretize to valid time discrete points in the time window Among them, T i The calculation formula is as follows:
[0086]
[0087] In the formula, i ranges from 1 to M, and M is the total number of the silence message packets exceeding the carrying threshold.
[0088] In this embodiment, in order to ensure cyclic allocation within the time window, a modulo operation is applied in the formula, assuming that the time window length W is 5 seconds and the time slice unit T is 1 second. 11 If processing is needed, A1 is discretized to the effective time discrete point T1, A2 is discretized to the effective time discrete point T2, ..., A5 is discretized to the effective time discrete point T5, and A6 is discretized to the effective time discrete point T1 (starting the cycle), A7 is discretized to the effective time discrete point T2 (continuing the cycle), ..., when a new overflow peak is formed in the effective time discrete point T5 (i.e., there is a silent message message exceeding the carrying threshold), the effective time discrete point T5 is used as the new T0, the new T0 is used as the starting point, and a new time window is formed with W as the window length, and the silent message message exceeding the carrying threshold, such as A 11 Discretize so that A1 to A 11 All are dispersed below the carrying threshold line.
[0089] Step S104: If the message packets exceeding the carrying threshold are active message packets, the active message packets are evenly distributed to each effective time discrete point or flow quota point according to the flow quota and effective time of the active message packets.
[0090] In this embodiment, the characteristic of active message packets is that they reflect the user's online behavior, that is, there is a behavior of consuming the available traffic quota. It is possible that a large number of concurrent messages will be generated and reported in a concentrated manner during the peak business period. Under the condition of fixed time window and fixed traffic quota, it is also easy to cause message storm phenomenon. For such message packets, a dual discrete method of overflow message traffic quota and effective time discrete window is adopted, and according to the rule of first exhaustion and first reporting of traffic quota and time discrete window, the active message packets are evenly scattered to each effective time discrete point or traffic quota point.
[0091] Optionally, evenly dispersing the active message packets to each effective time discrete point or traffic available quota point according to the traffic available quota and effective time of the active message packets specifically includes:
[0092] When the active message message arrives at the corresponding valid time window before the available traffic quota is exhausted, the reporting time quota of the active message message is increased by a preset time slice unit according to the same processing strategy as the silent message message, and the active message message is evenly scattered to each valid time discrete point;
[0093] When the active message message does not arrive within the effective time window but the available traffic quota has been consumed, the reported traffic quota of the active message message is increased by a preset traffic quota unit, and the active message message is evenly dispersed to each available traffic quota point.
[0094] In this embodiment, when the available traffic quota of active message packets has not been consumed but the time window has arrived, such message packets are evenly dispersed to various reporting time points according to the above-mentioned processing method of silent message packets, so that the peaks of the message packets are quickly distributed to various discrete points in the time window.
[0095] In this embodiment, when the active message packet does not arrive in the time window but the available traffic quota has been consumed, the traffic quota of such message packet is discretely distributed to each available traffic quota point of the traffic quota according to the discrete processing method of the available traffic quota.
[0096] Optionally, the increasing the reported traffic quota of the active message message by a preset traffic quota unit and evenly distributing the active message message to each traffic available quota point specifically includes:
[0097] The available traffic quota point exceeding the carrying threshold is used as the available traffic quota point D0, and a traffic quota slice is formed with D0 as the starting point, and the traffic usage size of the traffic quota slice is V, where V≥1;
[0098] Increase the reported traffic quota of each active message packet exceeding the loadable threshold by D, where D is a traffic quota unit;
[0099] Allocate all the active message packets exceeding the loadable threshold cyclically to other available traffic quota points in the traffic quota slice except D0;
[0100] If a new overflow peak is formed in a certain traffic available quota point of the traffic quota slice, the certain traffic available quota point is used as the new D0, and a new traffic quota slice is formed with the new D0 as the starting point and V as the traffic usage size, and the active message packets exceeding the loadable threshold are continuously allocated, and so on, until all the active message packets exceeding the loadable threshold fall below the loadable threshold line.
[0101] Specifically, the cyclic allocation of all active message packets exceeding the loadable threshold to other available traffic quota points in the traffic quota slice except D0 specifically includes:
[0102] For the i-th active message E among all the active message messages exceeding the loadable threshold i , E i The traffic quota points D in the traffic quota slice are discretely divided into i Among them, D i The calculation formula is as follows:
[0103] D i =D0+(i mod V)*D
[0104] In the formula, i ranges from 1 to M, and M is the total number of active message packets exceeding the loadable threshold.
[0105] In this embodiment, in order to ensure cyclic allocation within the traffic quota slice, a modulo operation is applied in the formula, assuming that the traffic usage size W is 5 traffic quota units and the traffic quota unit D is 1KB (or B, MB, etc.). Assume that there are 11 active message packets E1 to E2 that exceed the loadable threshold. 11 If processing is needed, E1 is discretized to the available traffic quota point D1, E2 is discretized to the available traffic quota point D2, ..., E5 is discretized to the available traffic quota point D5, and E6 is discretized to the available traffic quota point D1 (starting the cycle), and E7 is discretized to the available traffic quota point D2 (continuing the cycle), ..., when a new overflow peak is formed in the available traffic quota point D5 (that is, there are active message packets exceeding the carrying threshold), the available traffic quota point D5 is used as the new D0, the new D0 is used as the starting point, and V is the traffic usage size to form a new traffic quota slice, and the active message packets exceeding the carrying threshold, such as E 11 Discretize so that E1 to E 11 All are dispersed below the carrying threshold line.
[0106] Optionally, the method further comprises:
[0107] If it is monitored that no periodic peak impact occurs in the message collection front-end processor within a time window period, a traffic diversion release command is sent to the message collection front-end processor.
[0108] In this embodiment, if the tracking trigger detects that there is no periodic peak impact on the message collection front-end within a time window period, a discrete release signal (i.e., a diversion release command) will be sent to the message collection front-end. After the message collection front-end receives the signal, the message message of the secondary node will be switched back to the original normal authentication path, and the message message that needs to be peak shaving will no longer be sent to the variable window dual discrete controller, so as to avoid wasting resource calculations.
[0109] It should be noted that the message peak smoothing method provided in the embodiment of the present invention adopts a mechanism for automatic discrete balancing of overloaded traffic, and can discretely switch the real-time Internet access message source to a variable window double discrete algorithm device, thereby realizing real-time tracking control and peak shaving functions of periodic Internet access message peaks:
[0110] (1) Real-time tracking control:
[0111] By periodically collecting the real-time distribution message business volume (i.e. message message volume) of each Internet message message collection front-end machine, if the business volume exceeds the threshold for N consecutive times, the message collection front-end machine is notified to divert the message message to the variable window dual discrete controller for automatic discrete balancing processing, and it also has the function of restoring and diverting.
[0112] (2) Discrete peak clipping algorithm:
[0113] The time window and resource quota of Internet access request messages are discretized using a variable discrete window method, and a double discrete algorithm and strategy for unused traffic and used traffic is implemented.
[0114] In a specific embodiment, in order to improve the efficiency of smoothing the periodic Internet message shock wave peak, suppress the impact of Internet message storms on the production system, thereby affecting the perceived experience of Internet users, a message peak smoothing method based on a variable discrete window is provided. The overall system architecture corresponding to the method is as follows: Figure 2 As shown, the message source is the source of the upstream message, such as various core network elements GGSN, SACP, etc. The production system is the downstream system of the message billing system, which is used to perform production processing on the message forwarded by the message billing, such as generating a call record according to the message, and performing production activities such as billing.
[0115] In order to cope with the impact of peak-period business volume on the processing capacity of the current production system and avoid the inability to respond to billing requests in a timely manner, which leads to problems such as users' Internet access not being smooth and poor experience, the system provides an automatic monitoring function, provides discrete strategy services for peak-period business volume, performs business volume diversion operations, and re-reports to the production system. For this purpose, the present invention introduces a variable window double discrete algorithm device.
[0116] 1. Message collection front-end
[0117] The message collection front-end implements the session management of messages according to the message message, and realizes the calculation of usage quota and life time slice according to the session. The logical function diagram of the message collection front-end is as follows: Figure 3 As shown, it is mainly composed of a message control buffer and a rectifier module. The functions of each module are as follows:
[0118] (1) Message control buffer: Receives the original data stream of message messages through the access point, ensures that each message is cached and allocated quota and time slice, and calculates the consumption according to the countdown of the counter.
[0119] (2) Rectification module: obtains the message message from the message control buffer, checks the remaining quota and time quota, and completes the function of automatically triggering the sending to the external node (i.e., the downstream production system) on a first-come, first-served basis after the quota is consumed or the time slice is exhausted. That is, the message collection front-end determines whether to send based on the traffic quota or time slice, and the sending action is triggered when one of them is exhausted.
[0120] It should be noted that an Internet message is a session, which includes initial session, update session and termination session. The session usage quota and life time slice calculation are both for providing the front-end module with the corresponding quota or time usage. When the front-end module consumes the quota or the time is reached, it will report a new request. The purpose of this request is to apply for the next quota or time slice, and so on. The access point is the exposed external service point of the message collection front-end, and the external message source can access this access point.
[0121] Among them, quota allocation refers to the traffic consumption amount, that is, the amount reserved for downstream modules to consume. When the downstream traffic amount is consumed, a new round of traffic quota will be requested. Time slice allocation refers to the time reserved for downstream modules to consume. When the time is exhausted, the downstream module will request a new round of time slices.
[0122] 2. Real-time tracking triggers
[0123] The real-time tracking trigger can define the load threshold of the message collection front-end, monitor the periodic peak impact state caused by the overload of the message collection front-end, and initiate a query of the service node business information of the message collection front-end, detect the business volume information of all nodes in the shared memory of the message collection front-end, and after detecting the server node information, calculate according to the threshold rule. When the condition of exceeding the threshold is met, a corresponding warning is generated, and an instruction to switch to the variable window dual discrete algorithm device is triggered to the corresponding message collection front-end node (that is, a certain access point of the message collection front-end exceeds the threshold, and the next switching action is performed on the access point).
[0124] Among them, the real-time tracking trigger flow chart is as follows Figure 4 As shown, first load the configuration file and obtain the ocs (i.e., message collection front-end) node information, enter the While loop, and the program temporarily stops executing for N minutes. After that, determine whether it is a new cycle? If so, call can_proxy to query the offline rule table (the offline rule table stores whether the node is in offline state, diversion state, or default state. If it is in offline state, it will trigger the discrete strategy intervention to smooth the peak). If there is no rule, and it is greater than the threshold, the number of times the condition is met count+1, when the number of times the condition is met is greater than N, call oam_proxy to execute the diversion command, and reset the cycle identifier to a new cycle, and the number of times the condition is met is changed to 0. If it is not a new cycle and there is a diversion rule, determine whether it is less than N% of the threshold. If so, the number of times the condition is met count+1, and when the number of times the condition is met is greater than N, call oam_proxy to execute the de-diversion command.
[0125] It should be noted that the new cycle means that the previous diversion cycle has not ended, because all sessions are concurrent. The threshold is configurable, for example, the triggering of the smoothing strategy is a certain number of times exceeding the theoretical value that the system can bear. The limiting condition is also configurable. The smoothing strategy (i.e. sending the diversion command) can only be triggered when the number of times the threshold is met reaches a certain number. The threshold and limiting conditions are both to prevent misjudgment and improve the hit rate of the smooth peak strategy.
[0126] 3. Variable window dual discrete controller
[0127] This controller is the key logic module of the dual-discrete strategy processing device. When the message collection front-end is within the loadable threshold range, the message volume that the front-end can process normally exceeds this loadable threshold, the front-end will have an overflow message queue that cannot be processed. The real-time tracking controller will switch the messages of the overflow message collection front-end to the variable window dual-discrete controller.
[0128] In addition, this device defines the available quota for overflow message traffic and the discrete window size of the effective time (that is, the window of the available quota for traffic and the discrete window size of the effective time. When the window threshold is reached, a new window will be generated and the next round of calculation will be carried out again. All sessions in each window period have quota allocation and time slice allocation), and adopts a discrete uniformly distributed interval core algorithm (that is, a dual discrete core algorithm of available quota for traffic and effective time) function, which can effectively solve the periodic peak impact of activation message messages and silent message messages.
[0129] The schematic diagram of the dual discrete core algorithm of available traffic quota and effective time is as follows: Figure 5 As shown:
[0130] The specific calculation process is:
[0131] When the first peak exceeding the bearable threshold is detected and switched to the variable window dual-discrete controller, see the Z-0 axis in Figure 5 . For the message packet part exceeding the bearable threshold line CL, judge the available quota and valid time of the message packet. If the available quota remains basically unchanged, the subsequent valid time is allocated on the time sequence Time-X axis according to the time-discrete algorithm. If the available quota changes rapidly, the subsequent available quota is allocated on the traffic usage D-y axis according to the quota-discrete algorithm. Generally, a small amount of time will be consumed. Therefore, this type of message packet will be distributed within Δt < T, where Δt is the time for consuming an average traffic usage quota D, and T is the basic reporting time quota.
[0132] The overflowed packets include two types: silent message packets and active message packets. The following details the implementation methods of each dimension from a two-dimensional perspective:
[0133] (1) Processing method for silent message packets: Since the characteristic of this type of packet is not the user's Internet access behavior, but the system keeps the message packet online by staying resident in the memory and reporting regularly at fixed times to ensure the validity of such message packets and guarantee the continuity of the user's Internet access. Because of this, this type of silent traffic message packet is very likely to trigger centralized reporting due to network flashes and continuously report at a certain point according to the fixed cycle time, forming a packet storm. In severe cases, it can cause the business system to collapse. The principle of this controller is to cleverly change the fixed time of this type of silent traffic message packet into variable discrete time and evenly scatter such silent message packets to each valid time discrete point, so as to quickly distribute the peak of the message packet to each valid time discrete point of the time window.
[0134] The schematic diagram of the core algorithm for discrete time dimension is as shown in Figure 6 and the calculation process is as follows:
[0135] ① In the valid time discrete point T1, the real-time tracking trigger judges the current packet peak situation according to the bearable threshold line CL. When exceeding this bearable threshold line CL, an instruction signal is sent to the packet collection front-end machine to transfer the message packet to the variable window dual-discrete controller, and at the same time, a time window 1 is formed with the valid time discrete point T1.
[0136] ② If the message packet belongs to a silent message packet and the time window duration is set to W j (which can be flexibly set and adjusted according to business characteristics and traffic volume), then the overflowed packets A i , A i+1 , A i+2 …A j , A j+1 , Aj+2 Increase their reporting time quota by T, where T is a default time unit, usually an empirical value. i =T1+i*T, then the overflow message A can be i , A i+1 , A i+2 …A j Discrete to the corresponding Figure 6 T i 、T i+1 、T i+2 …T j Effective time discrete points.
[0137] ③When A j+1 The message is discrete to the last valid time discrete point T j+1 When, the subsequent T j+2 …T final The message is modulo-operated, then the above formula T i =T1+i*T can be rewritten as: T x =T1+(x mod W j )*T. After executing this step, as shown in A above j+2 Since the time window is exceeded, the modulo will fall into the effective time discrete point T i ’s concurrent message messages, thereby realizing the concurrent message messages that fall into the corresponding valid time discrete points in the time window in a cycle.
[0138] ④When a valid time discrete point T within the time window j+1 When the peak of concurrent message packets exceeds the loadable threshold line CL, the peak is the starting time point to form a new time window 2, and the duration is the same as W. j .
[0139] ⑤In T j+1 The part of the concurrent message packets that overflow the carrying threshold line CL will be executed again according to the above process to perform discrete allocation of the message packets in the new time window 2, such as Figure 6 Overflow message A j+1 , B k , B k+2 Discrete to the corresponding Figure 6 T j+2 、T k 、T k+1 …T j Effective time discrete points.
[0140] ⑥ At the effective time discrete point T k+1 The overflow peak is formed again, and the discretization continues in the above way, that is, the overflow message C m+1 Discrete to the corresponding Figure 6T m+1 In the time slice, the discrete calculation process is completed until the peaks of the concurrent messages are all discretized below the loadable threshold line CL.
[0141] (2) Active message processing method: This type of message is characterized by user Internet access behavior, that is, there is a behavior of consuming available traffic quota. It is possible that a large number of concurrent messages will be reported during the peak business period. Under the condition of fixed time window and fixed available traffic quota, it is also easy to cause message storm. For this type of message, the dual discrete method of overflow message traffic quota and effective time discrete window is adopted, and the rule of first exhaustion of traffic quota and time discrete window is followed to report first. Therefore, there are two situations:
[0142] a) When the active message packets have not been consumed in the available traffic quota but the time window has arrived, the silent message packets are processed in the same way as above, and such message packets are evenly dispersed to various reporting time points, so that the peaks of the message packets are quickly distributed to various discrete points in the time window.
[0143] It should be noted that in this case, although some active message packets are very active, there may still be traffic quotas that have not been exhausted, and the time window has reached the threshold. Even if the probability of this scenario may be low, in this case, it can be processed according to the method of silent message packets according to discrete time distribution to each discrete point. Since the response time is calculated based on the arrival of the request message, there will be no delay in the response.
[0144] b) When the active message packet does not arrive in the time window but the available traffic quota has been consumed, the traffic quota of such message packet is discretely distributed to each offline point of the traffic quota according to the discrete processing method of the available traffic quota.
[0145] It should be noted that this is another common situation for active messages, that is, the time window of most active messages has not reached the threshold, but the traffic quota has been exhausted. At this time, the time cannot be taken offline, but discrete calculation of the traffic quota must be adopted to smooth the peak.
[0146] The schematic diagram of the traffic available quota discrete core algorithm is as follows Figure 7 As shown, the calculation process is:
[0147] ① At the available quota point D1, the real-time tracking trigger determines the current message peak according to the loadable threshold line CL. When it exceeds this loadable threshold line CL, a command signal is sent to the message collection front-end to transfer the message to the variable window dual discrete controller, and at the same time, a traffic quota slice is formed with the D1 available quota point.
[0148] ② If the message is an active message, set the traffic quota slice to V j , then the overflow message E is converted into i 、E i+1 、E i+2 …E j 、E j+1 、E j+2 Increase their reported traffic quota by D, where D is a default traffic quota unit, usually an empirical value. i =D1+i*D, then the overflow message E can be i 、E i+1 、E i+2 …E j Discrete to the corresponding Figure 7 D i , D i+1 , D i+2 …D j The available traffic quota is in point.
[0149] ③When E j+1 The message is dispersed to the last traffic available quota point D j+1 When, the subsequent D j+2 …D final The message is modulo-operated, then the above formula D i =D1+i*D can be rewritten as: D x =D1+(x mod V j )*D. After executing this step, Figure 7 E j+2 Since the traffic quota is exceeded, the modulus will fall into D i The concurrent message message of the available traffic quota point is realized in the concurrent message message of the corresponding available traffic quota in the traffic quota slice.
[0150] ④When a certain flow within the time window duration is available quota point D j+1 When the peak of concurrent message packets exceeds the loadable threshold line CL, the peak is the starting point of the available traffic quota to form a new traffic quota slice 2, and the duration is the same as V. j .
[0151] ⑤ At traffic available quota point D j+1 The part of the concurrent message packets that overflows the carrying threshold line CL will be distributed again in the new traffic quota slice 2 according to the above process. Figure 7 , the overflow message E j+1 、F k 、F k+2 Discretize to the corresponding D j+2 , D k , Dk+1 …D m The available traffic quota is in point.
[0152] ⑥ At traffic available quota point D k+1 The overflow peak is formed again, and the discretization continues in the above way, that is, the overflow message C m+1 Discrete to the corresponding Figure 7 The available quota point T for traffic m+1 The discrete calculation process is completed until the peaks of concurrent messages are all discretely below the loadable threshold line CL.
[0153] ⑦ When the traffic of active message packets becomes inactive, that is, the quota has not been consumed but the discrete duration of the effective time is exhausted first, the discretization is performed according to the discrete duration of the effective time, that is, Δt is satisfied. x >T, then execute the silent message processing method.
[0154] From the above, we can see that the traffic quota method is similar to the time window method. It cleverly handles the silent and active message mechanisms in terms of timing and traffic usage (note that the traffic quota discrete method is not along the y-axis direction, but has a little timing consumption), effectively responding to and smoothing the periodic impact of various message messages.
[0155] (3) Discrete release strategy:
[0156] If there is no periodic peak impact within a time window period when the tracking trigger is implemented, a discrete release signal will be sent to the message collection front-end machine. After the message collection front-end machine receives the signal, it will switch the message message of the secondary node back to the original normal authentication path, and will no longer send the message message that needs to be peak-cut to the variable window dual discrete controller, so as to avoid wasting resource calculation.
[0157] The specific execution process is as follows:
[0158] ① Regular monitoring and call message collection front-end application;
[0159] ② Initiate a query to the message collection front-end server for service node business information;
[0160] ③ The detected message collects the business volume information of all nodes in the shared memory of the front-end machine. If the discrete release policy conditions are met, the message collection rule updated as business diversion in the front-end machine memory database is deleted, and the shared memory header information is updated;
[0161] ④ The message collection front-end senses that the de-diversion rules have changed, and de-diverts the business volume information to the discrete strategy service node in real time.
[0162] It should be noted that the present invention can improve the efficiency of smoothing the impact peak of periodic message messages by introducing a message peak smoothing method based on a variable discrete window, quickly and evenly discretize the periodic silent message messages and active message messages to other points, and eliminate the risk of periodic peaks developing into message storms. It also cleverly uses the available quota of traffic and the effective time discrete window, and adopts the uniformly distributed interval core double discrete algorithm to achieve rapid peak shaving of periodic message peaks. It has the following beneficial effects:
[0163] a) Suppressing the occurrence of message storms: Suppressing the snowballing message storm phenomenon and reducing the message impact on the business system.
[0164] b) Save hardware investment: Save the high capital investment in hardware resources generated by expanding capacity to cope with message impact.
[0165] The message peak smoothing method provided by the embodiment of the present invention first responds to the message message amount of the message collection front-end exceeding the loadable threshold, obtains the message message exceeding the loadable threshold; then determines whether the message message exceeding the loadable threshold is a silent message message or an active message message; if the message message exceeding the loadable threshold is a silent message message, the reporting time quota of the silent message message is increased by a preset time slice unit, and the silent message message is evenly scattered to each effective time discrete point; if the message message exceeding the loadable threshold is an active message message, the active message message is evenly scattered to each effective time discrete point or traffic available quota point according to the traffic available quota and effective time of the active message message. The present invention performs discrete switching on the message message exceeding the loadable threshold, quickly cuts the peak and fills the valley, not only saves hardware investment, but also can suppress the generation of message storms, thereby improving the efficiency of smoothing the impact peak of periodic Internet message messages and ensuring the continuous stability of user Internet services. The invention solves the problems of high hardware investment and maintenance cost, large waste of resources in non-peak period and low input-output ratio in the existing method of smoothing message peak by hardware expansion.
[0166] Embodiment 2:
[0167] like Figure 8 As shown, this embodiment provides a message peak smoothing device, which is used to execute the message peak smoothing method, including:
[0168] A message acquisition module 11, configured to acquire message packets exceeding the loadable threshold in response to the message amount of the message collection front-end exceeding the loadable threshold;
[0169] A message type determination module 12, connected to the message acquisition module 11, is used to determine whether the message message exceeding the loadable threshold is a silent message message or an active message message;
[0170] A first discrete module 13, connected to the message type judgment module 12, is used to increase the reporting time quota of the silent message message by a preset time slice unit if the message message exceeding the carrying threshold is a silent message message, and evenly disperse the silent message message to each effective time discrete point;
[0171] The second discrete module 14 is connected to the first discrete module 13, and is used to evenly disperse the active message message to each effective time discrete point or traffic available quota point according to the traffic available quota and effective time of the active message message if the message message exceeding the loadable threshold is an active message message.
[0172] Optionally, the device further comprises:
[0173] The peak monitoring module is used to monitor the periodic peak impact state caused by the overload of the message collection front-end processor, and initiate a request to query the service node business information of the message collection front-end processor to obtain the message message volume of the message collection front-end processor.
[0174] Optionally, the message acquisition module 11 is specifically used for:
[0175] If it is found that the message packet volume of the message collection front-end exceeds the loadable threshold for N consecutive times within a preset period, a diversion command is sent to the message collection front-end to obtain the message packets in the message collection front-end that exceed the loadable threshold, where N≥1.
[0176] Optionally, the first discrete module 13 includes:
[0177] A first forming unit is used to take the time point exceeding the loadable threshold as the effective time discrete point T0, and form a time window with T0 as the starting point, and the window length of the time window is W, where W≥1;
[0178] A first increasing unit, configured to increase the reporting time quota of each of the silence message packets exceeding the loadable threshold by T, where T is a time slice unit;
[0179] A first discrete unit is used to cyclically distribute all the silent message messages exceeding the loadable threshold to other valid time discrete points in the time window except T0;
[0180] The first iteration unit is used for, if a new overflow peak is formed in a certain valid time discrete point of the time window, taking the certain valid time discrete point as a new T0, forming a new time window with the new T0 as a starting point and W as the window length, and continuing to allocate the silent message messages exceeding the loadable threshold, and so on, until all the silent message messages exceeding the loadable threshold fall below the loadable threshold line.
[0181] Optionally, the first discrete unit is specifically used for:
[0182] For the i-th silent message message A among all the silent message messages exceeding the loadable threshold i , A i Discretize to valid time discrete points in the time window Among them, T i The calculation formula is as follows:
[0183]
[0184] In the formula, i ranges from 1 to M, and M is the total number of the silence message packets exceeding the carrying threshold.
[0185] Optionally, the second discrete module 14 includes:
[0186] A first processing unit is configured to, when the traffic available quota of the active message message is not exhausted but the corresponding valid time window arrives, increase the reporting time quota of the active message message by a preset time slice unit according to the same processing strategy as the silent message message, and evenly disperse the active message message to each valid time discrete point;
[0187] The second processing unit is used to increase the reported traffic quota of the active message message by a preset traffic quota unit and evenly disperse the active message message to each traffic available quota point when the active message message has not arrived in the effective time window but the available traffic quota has been consumed.
[0188] Optionally, the second processing unit includes:
[0189] The second forming unit is used to use the available traffic quota point exceeding the carrying threshold as the available traffic quota point D0, and form a traffic quota slice with D0 as the starting point, wherein the traffic usage size of the traffic quota slice is V, where V≥1;
[0190] A second increasing unit, configured to increase the reported traffic quota of each active message packet exceeding the loadable threshold by D, where D is a traffic quota unit;
[0191] The second discrete unit is used to cyclically distribute all the active message packets exceeding the loadable threshold to other available traffic quota points in the traffic quota slice except D0;
[0192] The second iteration unit is used for, if a new overflow peak is formed in a certain traffic available quota point of the traffic quota slice, then the certain traffic available quota point is used as a new D0, and a new traffic quota slice is formed with the new D0 as the starting point and V as the traffic usage size, and the active message packets exceeding the loadable threshold are continuously allocated, and so on, until all the active message packets exceeding the loadable threshold are reduced below the loadable threshold line.
[0193] Optionally, the second discrete unit is specifically used for:
[0194] For the i-th active message E among all the active message messages exceeding the loadable threshold i , E i The traffic quota points D in the traffic quota slice are discretely divided into i Among them, D i The calculation formula is as follows:
[0195] D i =D0+(i mod V)*D
[0196] In the formula, i ranges from 1 to M, and M is the total number of active message packets exceeding the loadable threshold.
[0197] Optionally, the device further comprises:
[0198] The traffic diversion release module is used to send a traffic diversion release command to the message collection front-end processor if it is detected that no periodic peak impact occurs in the message collection front-end processor within a time window period.
[0199] Embodiment 3:
[0200] refer to Fig. 9 This embodiment provides a message peak smoothing device, including a memory 21 and a processor 22, the memory 21 stores a computer program, and the processor 22 is configured to run the computer program to execute the message peak smoothing method in Example 1.
[0201] The memory 21 is connected to the processor 22. The memory 21 may be a flash memory, a read-only memory or other memory. The processor 22 may be a central processing unit or a single-chip microcomputer.
[0202] Embodiment 4:
[0203] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the message peak smoothing method in the above-mentioned embodiment 1 is implemented.
[0204] The computer-readable storage medium includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules or other data). Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable read only memory), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer.
[0205] In summary, the message peak smoothing method, device and readable storage medium provided by the embodiment of the present invention first respond to the message message amount of the message collection front-end exceeding the loadable threshold, and obtain the message message exceeding the loadable threshold; then determine whether the message message exceeding the loadable threshold is a silent message message or an active message message; if the message message exceeding the loadable threshold is a silent message message, the reporting time quota of the silent message message is increased by a preset time slice unit, and the silent message message is evenly scattered to each effective time discrete point; if the message message exceeding the loadable threshold is an active message message, the active message message is evenly scattered to each effective time discrete point or traffic available quota point according to the traffic available quota and effective time of the active message message. The present invention performs discrete switching on the message message exceeding the loadable threshold, quickly cuts the peak and fills the valley, which not only saves hardware investment, but also can suppress the generation of message storms, thereby improving the efficiency of smoothing the impact peak of periodic Internet message messages and ensuring the continuous stability of user Internet services. The invention solves the problems of high hardware investment and maintenance cost, large waste of resources in non-peak period and low input-output ratio in the existing method of smoothing message peak by hardware expansion.
[0206] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present invention, but the present invention is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.
Claims
1. A message peak smoothing method, characterized in that: The method comprises: In response to the message packet amount of the message collection front-end exceeding the loadable threshold, acquiring the message packets exceeding the loadable threshold; Determine whether the message message exceeding the loadable threshold is a silent message message or an active message message; If the message message exceeding the carrying threshold is a silent message message, the reporting time quota of the silent message message is increased by a preset time slice unit, and the silent message message is evenly scattered to each effective time discrete point; If the message packets exceeding the carrying threshold are active message packets, the active message packets are evenly dispersed to each effective time discrete point or flow available quota point according to the flow available quota and effective time of the active message packets.
2. The method according to claim 1, characterized in that In response to the message amount of the message collection front-end exceeding the loadable threshold, before acquiring the message exceeding the loadable threshold, the method further includes: Monitor the periodic peak impact state caused by the overload of the message collection front-end processor, and initiate a request for querying the service node business information of the message collection front-end processor to obtain the message message volume of the message collection front-end processor.
3. The method according to claim 2, characterized in that The step of acquiring the message packets exceeding the loadable threshold in response to the message packet amount of the message collection front-end processor specifically includes: If it is found that the message packet volume of the message collection front-end exceeds the loadable threshold for N consecutive times within a preset period, a diversion command is sent to the message collection front-end to obtain the message packets in the message collection front-end that exceed the loadable threshold, where N≥1.
4. The method according to claim 1, characterized in that: The step of increasing the reporting time quota of the silence message message by a preset time slice unit and evenly dispersing the silence message message to each valid time discrete point specifically includes: The time point exceeding the loadable threshold is taken as the effective time discrete point T0, and a time window is formed with T0 as the starting point, and the window length of the time window is W, where W≥1; Increase the reporting time quota of each of the silence message packets exceeding the loadable threshold by T, where T is a time slice unit; Cyclically distribute all the silence message messages exceeding the loadable threshold to other valid time discrete points in the time window except T0; If a new overflow peak is formed in a certain valid time discrete point of the time window, the certain valid time discrete point is taken as the new T0, and a new time window is formed with the new T0 as the starting point and W as the window length, and the silent message messages exceeding the loadable threshold are continuously allocated, and so on, until all the silent message messages exceeding the loadable threshold are reduced below the loadable threshold line.
5. The method according to claim 4, characterized in that The cyclically allocating all the silence message packets exceeding the loadable threshold to other valid time discrete points in the time window except T0 specifically includes: For the i-th silent message message A among all the silent message messages exceeding the loadable threshold i , A i Discretize to valid time discrete points in the time window Among them, T i The calculation formula is as follows: T i =T0+(imod W)*T In the formula, i ranges from 1 to M, and M is the total number of the silence message packets exceeding the carrying threshold.
6. The method according to claim 1, characterized in that The evenly dispersing the active message messages to each effective time discrete point or flow available quota point according to the flow available quota and effective time of the active message messages specifically includes: When the active message message arrives at the corresponding valid time window before the available traffic quota is exhausted, the reporting time quota of the active message message is increased by a preset time slice unit according to the same processing strategy as the silent message message, and the active message message is evenly scattered to each valid time discrete point; When the active message message does not arrive within the effective time window but the available traffic quota has been consumed, the reported traffic quota of the active message message is increased by a preset traffic quota unit, and the active message message is evenly dispersed to each available traffic quota point.
7. The method according to claim 6, characterized in that The reporting traffic quota of the active message packet is increased by a preset traffic quota unit, and the active message packet is evenly distributed to each traffic available quota point, specifically including: The available traffic quota point exceeding the carrying threshold is used as the available traffic quota point D0, and a traffic quota slice is formed with D0 as the starting point, and the traffic usage size of the traffic quota slice is V, where V≥1; Increase the reported traffic quota of each active message packet exceeding the loadable threshold by D, where D is a traffic quota unit; Allocate all the active message packets exceeding the loadable threshold cyclically to other available traffic quota points in the traffic quota slice except D0; If a new overflow peak is formed in a certain traffic available quota point of the traffic quota slice, the certain traffic available quota point is used as the new D0, and a new traffic quota slice is formed with the new D0 as the starting point and V as the traffic usage size, and the active message packets exceeding the loadable threshold are continuously allocated, and so on, until all the active message packets exceeding the loadable threshold fall below the loadable threshold line.
8. The method according to claim 7, characterized in that The cyclically allocating all active message packets exceeding the loadable threshold to other available traffic quota points in the traffic quota slice except D0 specifically includes: For the i-th active message E among all the active message messages exceeding the loadable threshold i , E i The traffic quota points D in the traffic quota slice are discretely divided into i Among them, D i The calculation formula is as follows: D i =D0+(towards V)*D In the formula, i ranges from 1 to M, and M is the total number of the active message packets exceeding the loadable threshold.
9. The method according to claim 3, characterized in that: The method further comprises: If it is monitored that no periodic peak impact occurs in the message collection front-end processor within a time window period, a traffic diversion release command is sent to the message collection front-end processor.
10. A message peak smoothing device, characterized in that: The device comprises: A message acquisition module, configured to acquire message packets exceeding the loadable threshold in response to the message amount of the message collection front-end exceeding the loadable threshold; A message type determination module, connected to the message acquisition module, for determining whether the message message exceeding the loadable threshold is a silent message message or an active message message; A first discrete module, connected to the message type judgment module, is used to increase the reporting time quota of the silent message message by a preset time slice unit if the message message exceeding the loadable threshold is a silent message message, and evenly disperse the silent message message to each effective time discrete point; The second discrete module is connected to the first discrete module and is used to evenly disperse the active message message to each effective time discrete point or traffic available quota point according to the traffic available quota and effective time of the active message message if the message message exceeding the loadable threshold is an active message message.
11. A message peak smoothing device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to implement the message peak smoothing method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the message peak smoothing method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Load balancing control method and system of message queues
CN102457906A
Base station uplink outburst relief method and apparatus
CN107484204A
Method, device and equipment for adjusting message sending time and storage medium
CN110011926A
Service overload control method for cache router in information center network
CN118175125A
Vehicle telematics messaging
WO2018091328A1