A protection device congestion prevention method and system based on message queue absorption capacity evolution prediction

CN123020476APending Publication Date: 2026-10-30NANJING GUODIAN NANZI WEIMEIDE AUTOMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611041211.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-14
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

但是,该类方式多以队列当前长度或当前资源状态作为触发依据,在启动防护时队列往往已经处于积压状态,难以在队列尚未达到拥塞状态之前提前识别处理能力退化趋势

Benefits of technology

本发明提供一种基于消息队列吸收能力演化预测的保护装置防拥塞方法及系统,该方法首先获取保护装置中待监测消息队列在当前时间窗口的新增消息量、当前时间窗口起始时刻的队列长度、当前时间窗口结束时刻的队列长度以及队列最大容量,并根据队列长度的正向增长量与新增消息量确定当前时间窗口对应的队列吸收系数。由于队列吸收系数能够反映新增消息进入待监测消息队列后转化为队列积压的程度,因此,本发明不是仅在队列长度达到拥塞阈值后被动触发处理,而是能够从队列对新增消息冲击的吸收情况出发,提前表征待监测消息队列的处理能力变化。在此基础上,本发明进一步根据当前时间窗口和历史时间窗口对应的队列吸收系数确定吸收能力演化参数,并预测下一时间窗口对应的未来吸收能力,再结合当前队列长度、队列最大容量、未来吸收能力和吸收能力演化参数生成拥塞风险指数,进而确定风险等级并在队列长度尚未达到预设拥塞阈值时执行主动防护处理。由此,本发明能够在保护装置消息队列进入明显拥塞状态之前提前识别风险并采取防护措施,减少防护动作启动滞后的情况,同时通过对非关键消息进行延迟缓存、合并处理或限量丢弃,并在达到关键消息保护等级时为关键消息预留受保护队列空间,降低突发消息冲击下保护动作消息、跳闸消息、SOE消息等关键消息被普通消息挤占队列空间而产生延迟或丢失的风险。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123020476A_ABST
    Figure CN123020476A_ABST
Patent Text Reader

Abstract

The application discloses a protection device congestion prevention method and system based on message queue absorption capacity evolution prediction, and the method comprises the following steps: acquiring the queue running statistics and the maximum capacity of the message queue to be monitored in the protection device in a current time window; determining the queue absorption coefficient according to the positive growth of the start and end queue length in the current time window and the amount of new messages; determining the absorption capacity evolution parameter according to the queue absorption coefficient of the current and historical time windows, and predicting the future absorption capacity of the next time window; generating a congestion risk index based on the current queue length, the maximum capacity of the queue, the future absorption capacity and the absorption capacity evolution parameter, and determining the risk level accordingly; when the risk level belongs to the active protection level and the queue length does not reach the preset congestion threshold, performing the active protection processing matched with the risk level. The application can identify the risk in advance before the queue congestion, and reduce the risk of delayed or lost key messages.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of communication and message queue management technology of power system relay protection devices, and particularly relates to a method and system for preventing congestion in protection devices based on the evolution prediction of message queue absorption capacity. Background Technology

[0002] As key secondary equipment in the relay protection and control system of power systems, protection devices typically need to simultaneously process multiple types of messages, including protection action information, trip commands, SOE events, fault recordings, alarm information, analog quantity updates, digital quantity updates, log recordings, printing tasks, and background communication. To ensure data transmission between different functional modules, protection devices usually employ message queues, shared buffers, inter-process communication queues, or network transmission buffers to achieve message transmission and decoupling.

[0003] Under normal operating conditions, the protection device generates messages relatively steadily, and the message queue can complete enqueueing, dequeueing, and processing in a timely manner. However, in scenarios such as power grid faults, protection activation, tripping, waveform recording triggering, communication anomaly recovery, or concentrated refresh of the human-machine interface, multiple functional modules may generate a large number of messages in a short period of time, causing the message queue to grow rapidly. This can lead to message sending failures, accumulation of low-priority messages, delays in critical event messages, or even message loss.

[0004] Existing message queue congestion handling methods typically rely on queue length thresholds, fixed-priority scheduling, or comparisons between production and consumption rates. When the queue length reaches a preset threshold, delaying, dropping, or reducing resource allocation for low-priority services can alleviate congestion to some extent. However, these methods often use the current queue length or current resource status as triggering criteria, meaning the queue is often already in a backlog state when protection is initiated, making it difficult to identify processing capacity degradation trends before the queue reaches a congestion state.

[0005] Furthermore, relying solely on queue length or production / consumption rate makes it difficult to effectively distinguish between short-term message bursts and continuous processing capability degradation. When a large number of log, interface refresh, event upload, or waveform-related messages occur within a short period, traditional methods tend to process them only after the sudden surge has already occupied a large amount of queue space. This leads to critical messages such as protection actions, tripping, and SOE competing for queue space with ordinary messages, affecting the reliability of real-time transmission of critical messages.

[0006] Therefore, the existing message queue congestion handling methods of protection devices still have problems such as insufficient timely identification of congestion risks, delayed activation of protection actions, insufficient identification of the continuous decline in queue processing capacity, and the fact that critical messages are easily affected by space competition in ordinary message queues under the impact of sudden message events, thus posing a risk of delay or loss of critical messages. Summary of the Invention

[0007] The purpose of this invention is to provide a method and system for preventing congestion in protection devices based on the prediction of message queue absorption capacity evolution. This method can predict the congestion risk in advance based on the changes in the queue's absorption capacity for new message impacts before the message queue of the protection device reaches the congestion threshold, and actively perform protective processing to reduce the risk of critical messages being delayed or lost.

[0008] To achieve the above objectives, the present invention employs the following technical solution: In a first aspect, the present invention provides a congestion prevention method for a protection device based on message queue absorption capacity evolution prediction, comprising: The system acquires the queue operation statistics and maximum queue capacity of the message queue to be monitored in the protection device within the current time window; the queue operation statistics include the number of new messages in the current time window, the queue length at the start of the current time window, and the queue length at the end of the current time window. The queue absorption coefficient corresponding to the current time window is determined based on the positive growth of the queue length at the end of the current time window relative to the queue length at the beginning of the current time window, and the number of new messages added within the current time window. Based on the queue absorption coefficient corresponding to the current time window and the queue absorption coefficient corresponding to the historical time window, the absorption capacity evolution parameter is determined, and the future absorption capacity corresponding to the next time window is predicted based on the absorption capacity evolution parameter. A congestion risk index is generated based on the queue length at the end of the current time window, the maximum queue capacity, the future absorption capacity, and the evolution parameters of the absorption capacity. The risk level of the message queue to be monitored is determined based on the congestion risk index. If the risk level is at the active protection level and the queue length of the message queue to be monitored has not reached the preset congestion threshold at the end of the current time window, active protection processing matching the risk level is performed on the message queue to be monitored. The active protection processing includes at least one of delay caching, merging, or limited discarding of non-critical messages, and when the risk level reaches the critical message protection level, protected queue space is reserved for critical messages.

[0009] Optionally, the message queue to be monitored includes at least one of the following: human-machine interface receiving queue, master control communication queue, log queue, printing queue, network communication queue, and event uploading queue.

[0010] Optionally, the queue absorption coefficient corresponding to the current time window is determined based on the positive increase in queue length at the end of the current time window relative to the queue length at the beginning of the current time window, and the number of new messages added within the current time window, including: If the queue length at the end of the current time window is greater than the queue length at the beginning of the current time window, the difference between the queue length at the end of the current time window and the queue length at the beginning of the current time window is determined as the positive growth amount. If the queue length at the end of the current time window is less than or equal to the queue length at the beginning of the current time window, the positive growth amount is determined to be zero. The proportion of new messages that become queue backlog is determined based on the ratio between the positive growth rate and the number of new messages in the current time window. The difference between the ratio of new messages to queue backlog is determined as the queue absorption coefficient.

[0011] Optionally, if the message queue to be monitored includes multiple message queues, the queue absorption coefficient corresponding to each message queue in the current time window is determined, and the queue weight corresponding to each message queue is obtained. The overall absorption coefficient for the multiple message queues is determined based on the queue absorption coefficient and queue weight corresponding to each message queue. The comprehensive absorption coefficient is used as the queue absorption coefficient corresponding to the current time window to determine the evolution parameter of the absorption capacity.

[0012] Optionally, the absorption capacity evolution parameters include the degree of absorption capacity degradation and the degree of accelerated absorption capacity degradation; The degree of degradation of absorption capacity is determined based on the difference between the queue absorption coefficient corresponding to the previous time window and the queue absorption coefficient corresponding to the current time window; The degree of accelerated degradation of absorption capacity is determined based on the difference between the degree of degradation of absorption capacity in the current time window and the degree of degradation of absorption capacity in the previous time window.

[0013] Optionally, predicting the future absorption capacity corresponding to the next time window based on the absorption capacity evolution parameters includes: Obtain the queue absorption coefficient corresponding to the current time window, as well as the preset prediction weights corresponding to the degree of absorption capacity degradation and the degree of accelerated absorption capacity degradation, respectively; Based on the preset prediction weights corresponding to the degree of absorption capacity degradation and the degree of accelerated absorption capacity degradation, the degree of absorption capacity degradation and the degree of accelerated absorption capacity degradation are weighted to obtain the predicted impact of absorption capacity degradation. Based on the queue absorption coefficient corresponding to the current time window and the predicted impact of absorption capacity degradation, predict the future absorption capacity corresponding to the next time window. The greater the degree of absorption capacity degradation, and / or the greater the acceleration of absorption capacity degradation, the lower the future absorption capacity.

[0014] Optionally, the congestion risk index is calculated as follows: ; in, This represents the congestion risk index corresponding to the k-th time window, where the k-th time window is the current time window; The queue length at the end of the current time window; Indicates the maximum capacity of the queue; This indicates the future absorption capacity corresponding to the next time window; This indicates the degree of degradation in absorption capacity corresponding to the current time window; This indicates the sudden impact factor corresponding to the current time window; , , and All are preset risk weights; ; ; ; in, This indicates the percentage increase in new messages within the current time window; This represents the normalized value of the queue length corresponding to the current time window, indicating its positive growth. This represents the normalized count of consecutive low absorption coefficient windows corresponding to the current time window, and is updated when the queue absorption coefficient is lower than the preset low absorption coefficient threshold. , and These represent the corresponding component weights; This indicates the number of new messages added within the current time window; This indicates the number of new messages added within the previous time window; This indicates the queue length at the end of the previous time window, which is equivalent to the queue length at the start of the current time window.

[0015] When the congestion risk index is less than the first risk threshold, the risk level is determined to be a normal level. When the congestion risk index is not less than the first risk threshold and is less than the second risk threshold, the risk level is determined to be the first active protection level. When the congestion risk index is not less than the second risk threshold and is less than the third risk threshold, the risk level is determined to be the second active protection level. When the congestion risk index is not less than the third risk threshold, the risk level is determined to be the third active protection level. Wherein, the first risk threshold is less than the second risk threshold, and the second risk threshold is less than the third risk threshold.

[0016] Optionally, proactive protection measures matching the risk level are performed on the message queue to be monitored, including: When the risk level is the first active protection level, non-critical messages are written to a deferred cache queue. When the risk level is the second active protection level, non-critical messages of the same type and source that appear consecutively within a preset time range are merged. When the risk level is the third active protection level, a limited number of discardable low-priority messages are discarded, and protected queue space is reserved for critical messages. The third active protection level is the critical message protection level; The non-critical messages include at least one of log messages, print messages, interface refresh messages, and periodic telemetry messages; The key messages include at least one of the following: protection action message, trip message, SOE message, waveform recording start message, fault report message, and important alarm message; The provision of protected queue space for critical messages includes: allocating a critical message protection queue space in the message queue to be monitored for writing the critical messages, or limiting the number of non-critical messages written to the message queue to be monitored, so as to reserve the remaining queue space for writing the critical messages.

[0017] Secondly, the present invention provides a congestion prevention system for a protection device based on message queue absorption capacity evolution prediction, comprising: The data acquisition module is used to acquire the queue operation statistics and maximum queue capacity of the message queue to be monitored in the protection device in the current time window; the queue operation statistics include the number of new messages in the current time window, the queue length at the start of the current time window, and the queue length at the end of the current time window. The absorption coefficient determination module is used to determine the queue absorption coefficient corresponding to the current time window based on the positive growth of the queue length at the end of the current time window relative to the queue length at the beginning of the current time window, and the number of new messages in the current time window. The absorption capacity determination module is used to determine the absorption capacity evolution parameters based on the queue absorption coefficient corresponding to the current time window and the queue absorption coefficient corresponding to the historical time window, and to predict the future absorption capacity corresponding to the next time window based on the absorption capacity evolution parameters. The risk index generation module is used to generate a congestion risk index based on the queue length at the end of the current time window, the maximum capacity of the queue, the future absorption capacity, and the evolution parameters of the absorption capacity. The risk level determination module is used to determine the risk level of the message queue to be monitored based on the congestion risk index. The proactive protection module is used to perform proactive protection processing on the message queue to be monitored that matches the risk level when the risk level is at the proactive protection level and the queue length of the message queue to be monitored at the end of the current time window has not reached the preset congestion threshold. The proactive protection processing includes at least one of delaying caching, merging processing, or limiting the discarding of non-critical messages, and reserving protected queue space for critical messages when the risk level reaches the critical message protection level.

[0018] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: This invention provides a congestion prevention method and system for protection devices based on message queue absorption capacity evolution prediction. The method first obtains the number of new messages in the message queue to be monitored within the protection device during the current time window, the queue length at the start of the current time window, the queue length at the end of the current time window, and the maximum queue capacity. Then, it determines the queue absorption coefficient corresponding to the current time window based on the positive growth of the queue length and the number of new messages. Since the queue absorption coefficient reflects the degree to which new messages become queue backlog after entering the message queue to be monitored, this invention does not passively trigger processing only after the queue length reaches the congestion threshold, but can characterize the changes in the processing capacity of the message queue to be monitored in advance based on the queue's absorption of new message impacts. Furthermore, this invention determines absorption capacity evolution parameters based on the queue absorption coefficients corresponding to the current time window and historical time windows, and predicts the future absorption capacity corresponding to the next time window. Then, it combines the current queue length, maximum queue capacity, future absorption capacity, and absorption capacity evolution parameters to generate a congestion risk index, thereby determining the risk level and performing proactive protection processing before the queue length reaches the preset congestion threshold. Therefore, the present invention can identify risks and take protective measures in advance before the message queue of the protection device enters a state of obvious congestion, reducing the situation of delayed start of protection actions. At the same time, by delaying, caching, merging or limiting the discarding of non-critical messages, and reserving protected queue space for critical messages when the protection level of critical messages is reached, the risk of delay or loss of critical messages such as protection action messages, trip messages, and SOE messages caused by ordinary messages crowding out the queue space under the impact of sudden messages is reduced. Attached Figure Description

[0019] Figure 1 This is a flowchart illustrating the congestion prevention method for a protection device based on message queue absorption capacity evolution prediction, as provided in an embodiment of the present invention. Detailed Implementation

[0020] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.

[0021] Example 1

[0022] like Figure 1 As shown in the figure, this invention provides a congestion prevention method for protection devices based on message queue absorption capacity evolution prediction, including: S1: Obtain the queue operation statistics and maximum queue capacity of the message queue to be monitored in the protection device during the current time window; the queue operation statistics include the number of new messages in the current time window, the queue length at the start of the current time window, and the queue length at the end of the current time window; S2: Determine the queue absorption coefficient corresponding to the current time window based on the positive growth of the queue length at the end of the current time window relative to the queue length at the beginning of the current time window, and the number of new messages added within the current time window. S3: Determine the absorption capacity evolution parameters based on the queue absorption coefficient corresponding to the current time window and the queue absorption coefficient corresponding to the historical time windows, and predict the future absorption capacity corresponding to the next time window based on the absorption capacity evolution parameters. S4: Generate a congestion risk index based on the queue length at the end of the current time window, the maximum queue capacity, the future absorption capacity, and the evolution parameters of the absorption capacity; S5: Determine the risk level of the message queue to be monitored based on the congestion risk index; S6: When the risk level is at the active protection level and the queue length of the message queue to be monitored has not reached the preset congestion threshold at the end of the current time window, active protection processing matching the risk level is performed on the message queue to be monitored; wherein, active protection processing includes at least one of delay caching, merging processing or limited discarding for non-critical messages, and when the risk level reaches the critical message protection level, protected queue space is reserved for critical messages.

[0023] This embodiment provides a congestion prevention method for protection devices based on message queue absorption capacity evolution prediction. This method can be applied to secondary equipment with protection and control functions, such as relay protection devices, plant auxiliary protection and control devices, and measurement and control devices. Protection devices typically include multiple functional modules, which can exchange messages through operating system message queues, POSIX message queues, shared memory queues, in-process loop queues, network transmit buffer queues, or multi-level buffer queues. The message queue to be monitored can include one or more of the following: human-machine interface receiving queue, master control communication queue, log queue, print queue, network communication queue, and event upload queue. Messages to be processed can include critical messages such as protection action messages, trip messages, SOE messages, waveform recording start messages, fault report messages, and important alarm messages, as well as non-critical messages such as log messages, print messages, interface refresh messages, and periodic telemetry messages.

[0024] In this embodiment, step S1, obtaining the queue operation statistics and maximum queue capacity of the message queue to be monitored in the protection device within the current time window, specifically includes: The monitoring message queue is continuously monitored according to a preset sampling period, and the operating time of the protection device is divided into multiple consecutive time windows. The length of the time window can be set according to the processing cycle of the protection device, message processing capability, and real-time requirements. For example, it can be set to 5ms, 10ms, or 20ms, or it can be configured to other lengths according to the specific equipment performance. The current time window is the k-th time window.

[0025] Queue operation statistics include the number of new messages within the current time window, the queue length at the start of the current time window, and the queue length at the end of the current time window. Specifically, the number of new messages within the current time window represents the number of messages entering the monitored message queue within the current time window; the queue length at the start of the current time window represents the number of messages already existing in the monitored message queue at the start of the current time window; and the queue length at the end of the current time window represents the number of messages remaining in the monitored message queue at the end of the current time window. The maximum queue capacity represents the maximum number of messages the monitored message queue can hold, which can be determined by the protection device's software configuration, buffer capacity, or queue initialization parameters.

[0026] In an optional embodiment, queue operation statistics may further include the number of messages processed within the current time window. The number of messages processed can be used to supplement the recording of the queue operation status within the current time window, and can also serve as operational data for subsequent recovery processing or parameter updates. For example, when the number of new messages is large while the number of messages processed decreases significantly, it can help determine that the message queue processing capacity has declined; after the protection process ends, the number of messages processed can be used to analyze the queue recovery status during this active protection period.

[0027] In this embodiment, step S2 determines the queue absorption coefficient corresponding to the current time window based on the positive growth of the queue length at the end of the current time window relative to the queue length at the beginning of the current time window, and the number of new messages added within the current time window, including: If the queue length at the end of the current time window is greater than the queue length at the beginning of the current time window, the difference between the queue length at the end of the current time window and the queue length at the beginning of the current time window is determined as the positive growth amount. If the queue length at the end of the current time window is less than or equal to the queue length at the beginning of the current time window, the positive growth amount is determined to be zero. The proportion of new messages that become queue backlog is determined based on the ratio between the positive growth rate and the number of new messages in the current time window. The difference between the proportion of newly added messages and the proportion of queue backlog is determined as the queue absorption coefficient. Among them, if the number of new messages in the current time window is zero, the queue absorption coefficient corresponding to the previous time window is maintained, or the current time window is marked as a window with no new impact.

[0028] Specifically, the queue absorption coefficient is used to characterize the ability of the message queue under monitoring to absorb the impact of new messages. If new messages entering the queue within the current time window can be processed in a timely manner, the queue length at the end of the current time window will not be significantly higher than the queue length at the beginning of the current time window, indicating that the queue has a strong ability to absorb the impact of new messages. If a large number of new messages turn into queue backlog, the queue length at the end of the current time window will increase significantly compared to the beginning of the window, indicating that the queue's absorption capacity has decreased.

[0029] Specifically, the number of new messages within the k-th time window is The queue length at the start of the current time window, which is the same as the queue length at the end of the previous time window. The queue length at the end of the current time window is Then the positive growth of the queue length can be expressed as: ; Queue absorption coefficient ; Here, ε is a positive constant to prevent the denominator from being zero. In actual calculations, the queue absorption coefficient is limited to the range of 0 to 1. When the number of new messages in the current time window is zero, the queue absorption coefficient corresponding to the previous time window is maintained. Alternatively, the current time window can be marked as a window without new impact to avoid meaningless calculations when there are no new messages.

[0030] In this way, the queue absorption coefficient can directly reflect the degree to which the impact of new messages is absorbed by the queue processing capacity, without introducing negative growth interference due to the decrease or no change in queue length. At the same time, when the amount of new messages in the current time window is zero, maintaining the queue absorption coefficient corresponding to the previous time window or marking the current time window as a window without new impact can avoid calculation distortion when there are no new messages and improve the stability of the queue absorption coefficient calculation.

[0031] In an optional embodiment, when the message queue to be monitored includes multiple message queues, the queue absorption coefficient corresponding to each message queue in the current time window is determined, and the queue weight corresponding to each message queue is obtained. Then, based on the queue absorption coefficient and queue weight corresponding to each message queue, the comprehensive absorption coefficient corresponding to the multiple message queues is determined, and the comprehensive absorption coefficient is used as the queue absorption coefficient corresponding to the current time window to determine the absorption capacity evolution parameter.

[0032] For example, if the message queues to be monitored include the master communication queue and the log queue within the same functional domain, with the master communication queue having a weight of 0.7 and the log queue having a weight of 0.3, then the overall absorption coefficient can be obtained by weighting the absorption coefficients of the master communication queue and the log queue according to their respective weights. This method allows queues with higher business importance to have a greater impact on the overall absorption capacity.

[0033] In this embodiment, the absorption capacity evolution parameters in step S3 include the degree of absorption capacity degradation and the degree of accelerated absorption capacity degradation; The degree of absorption capacity degradation is used to characterize the extent to which the absorption capacity decreases in the current time window relative to the previous time window, while the degree of accelerated absorption capacity degradation is used to characterize whether the rate of decrease in absorption capacity further increases.

[0034] Specifically, the degree of absorption capacity degradation is determined based on the difference between the queue absorption coefficient corresponding to the previous time window and the queue absorption coefficient corresponding to the current time window.

[0035] The degree of absorption capacity degradation corresponding to the current time window, i.e., the k-th time window. It can be represented as: ; in, This represents the queue absorption coefficient corresponding to the previous time window; when A value greater than zero indicates that the queue's absorption capacity for the current time window has decreased compared to the previous time window; when... A value continuously greater than zero indicates a continuous degradation trend in the absorption capacity of the message queue under monitoring.

[0036] The degree of accelerated degradation of absorption capacity is determined based on the difference between the degree of degradation of absorption capacity in the current time window and the degree of degradation of absorption capacity in the previous time window.

[0037] The current time window, i.e., the degree of accelerated degradation of absorption capacity corresponding to the k-th time window. It can be represented as: ; in, This indicates the degree of absorption capacity degradation corresponding to the previous time window. When the value is greater than zero, it indicates that the absorption capacity is not only decreasing, but the rate of decrease is also increasing.

[0038] In this embodiment, step S3, predicting the future absorption capacity corresponding to the next time window based on the absorption capacity evolution parameters, includes: Obtain the queue absorption coefficient corresponding to the current time window, as well as the preset prediction weights corresponding to the degree of absorption capacity degradation and the degree of accelerated absorption capacity degradation, respectively; Based on the preset prediction weights corresponding to the degree of absorption capacity degradation and the degree of accelerated absorption capacity degradation, the degree of absorption capacity degradation and the degree of accelerated absorption capacity degradation are weighted to obtain the predicted impact of absorption capacity degradation. Based on the queue absorption coefficient corresponding to the current time window and the predicted impact of absorption capacity degradation, predict the future absorption capacity corresponding to the next time window. The greater the degree of absorption capacity degradation, and / or the greater the acceleration of absorption capacity degradation, the lower the future absorption capacity.

[0039] Specifically, the future absorption capacity corresponding to the next time window can be expressed as: ; in, This indicates the future absorption capacity corresponding to the next time window; and These represent the preset prediction weights. and The data can be determined offline or adjusted online based on the historical operating data of the protection device, queue capacity, message type, and real-time requirements.

[0040] Based on the specific processing steps of step S3 above, it is possible not only to determine whether the absorption capacity of the message queue under monitoring has decreased, but also to further determine whether the decrease in absorption capacity is accelerating. This improves the ability to identify the continuous degradation trend of queue processing capacity and reduces misjudgments caused by relying solely on the current queue length or a single window state. In addition, based on the queue absorption coefficient corresponding to the current time window, and the preset prediction weights corresponding to the degree of absorption capacity degradation and the acceleration of absorption capacity degradation, the degree of absorption capacity degradation and the acceleration of absorption capacity degradation are weighted to obtain the predicted impact of absorption capacity degradation. Based on this predicted impact, the future absorption capacity corresponding to the next time window is predicted. Since a greater degree of absorption capacity degradation or a greater acceleration of absorption capacity degradation results in lower future absorption capacity, this prediction method can incorporate both the current rate and magnitude of absorption capacity degradation into future risk assessment, enabling the protection device to identify potential insufficient processing capacity in subsequent windows before the queue length reaches the congestion threshold.

[0041] In this embodiment, step S4 generates a congestion risk index based on the queue length at the end of the current time window, the maximum queue capacity, the future absorption capacity, and the absorption capacity evolution parameters. Specifically: The congestion risk index is calculated as follows: ; in, This represents the congestion risk index corresponding to the k-th time window, where the k-th time window is the current time window; The queue length at the end of the current time window; Indicates the maximum capacity of the queue; This indicates the future absorption capacity corresponding to the next time window; This indicates the degree of degradation in absorption capacity corresponding to the current time window; This indicates the sudden impact factor corresponding to the current time window; , , and All are preset risk weights; ; ; ; in, This indicates the percentage increase in new messages within the current time window; This represents the normalized value of the queue length corresponding to the current time window, indicating its positive growth. This represents the normalized count of consecutive low absorption coefficient windows corresponding to the current time window, and is updated when the queue absorption coefficient is lower than the preset low absorption coefficient threshold. , and These represent the corresponding component weights; This indicates the number of new messages added within the current time window; This indicates the number of new messages added within the previous time window; This indicates the queue length at the end of the previous time window, which is equivalent to the queue length at the start of the current time window.

[0042] In one implementation, when the queue absorption coefficient is lower than a preset low absorption coefficient threshold, the count of consecutive low absorption coefficient windows is incremented; when the queue absorption coefficient is not lower than the preset low absorption coefficient threshold, the count of consecutive low absorption coefficient windows is reset to zero. Then, the count of consecutive low absorption coefficient windows can be normalized to the range of 0 to 1 to obtain... In this way, the sudden impact factor can simultaneously reflect situations such as a sudden increase in the amount of new messages, a positive increase in queue backlog, and a persistent low absorption capacity.

[0043] This embodiment comprehensively reflects the current queue occupancy rate, the future absorption capacity corresponding to the next time window, the degree of absorption capacity degradation corresponding to the current time window, and the sudden impact factor through a congestion risk index. The sudden impact factor is further determined based on the sudden increase ratio of new messages, the normalized value of the positive growth of queue length, and the normalized value of the count of consecutive low absorption coefficient windows. In this way, the congestion risk index can not only reflect the proportion of space currently occupied by the monitored message queue, but also reflect risk factors such as sudden increases in messages, growth in queue backlog, and persistently low absorption capacity, making the risk assessment results more suitable for sudden message impact scenarios such as protection activation, tripping, waveform recording triggering, communication recovery, or centralized interface refresh.

[0044] In this embodiment, step S5 determines the risk level of the message queue to be monitored based on the congestion risk index, including: Set a first risk threshold, a second risk threshold, and a third risk threshold, where the first risk threshold is less than the second risk threshold, and the second risk threshold is less than the third risk threshold; Risk levels include normal level, first active protection level, second active protection level, and third active protection level; When the congestion risk index is less than the first risk threshold, the risk level is determined to be a normal level. When the congestion risk index is not less than the first risk threshold and is less than the second risk threshold, the risk level is determined to be the first active protection level. When the congestion risk index is not less than the second risk threshold and is less than the third risk threshold, the risk level is determined to be the second active protection level. When the congestion risk index is not less than the third risk threshold, the risk level is determined to be the third active protection level. The first, second, and third risk thresholds can be configured based on the protection device's queue capacity, message type, historical congestion records, real-time requirements of critical messages, and field operating parameters. For example, the first risk threshold can be set as a low active protection trigger threshold, allowing the system to enter light protection before the queue length reaches the preset congestion threshold; the second risk threshold can be set as a medium risk judgment threshold to trigger the merging of non-critical messages; and the third risk threshold can be set as a high risk judgment threshold to trigger limited discarding of low-priority messages and protection of critical messages.

[0045] This hierarchical approach avoids over- or under-processing caused by using the same protective action for all risk states. It allows the protection device to activate protection strategies of different strengths according to the degree of congestion risk, thereby balancing the continuity of ordinary message processing and the reliability of critical message transmission.

[0046] In this embodiment, the active protection levels in step S6 include a first active protection level, a second active protection level, and a third active protection level. The preset congestion threshold can be less than or equal to the maximum queue capacity, or it can be determined according to a certain proportion of the maximum queue capacity. Active protection processing is only performed when the risk level is at an active protection level and the current queue length has not yet reached the preset congestion threshold. This judgment condition demonstrates that the protection processing of this application occurs before the queue actually enters a congested state, rather than passively responding after the queue has reached the congestion threshold.

[0047] When the risk level is at the highest level of proactive protection, non-critical messages are written to a deferred cache queue. Non-critical messages include at least one of log messages, printed messages, interface refresh messages, and periodic telemetry messages. The deferred cache queue is a cache space independent of the main transmission path of critical messages, used to temporarily store messages with relatively low real-time requirements. By writing non-critical messages to the deferred cache queue, their immediate occupation of the main queue space of the message queue to be monitored can be reduced.

[0048] When the risk level is the second active protection level, non-critical messages of the same type and origin that occur consecutively within a preset time range are merged. For example, for interface refresh messages generated consecutively within a short period, only the latest refresh status is retained; for consecutively generated log messages of the same type, an aggregate summary is generated; for periodic telemetry messages, the latest value or key statistical results are retained. This process can reduce the queue load caused by repetitive or high-frequency non-critical messages.

[0049] When the risk level is Level 3 Active Protection, a limited number of low-priority messages that can be discarded are dropped, and protected queue space is reserved for critical messages. Critical messages can include at least one of the following: protection action messages, trip messages, SOE messages, waveform recording start messages, fault report messages, and important alarm messages. Reserved protected queue space for critical messages can be achieved by: allocating a critical message protection queue space within the message queue to be monitored; or limiting the number of non-critical messages written to the message queue to be monitored, thus reserving remaining queue space for writing critical messages. This process reduces the risk of critical messages competing for queue space with non-critical messages, even under sudden message surges such as post-fault protection actions, SOE events, and centralized transmission of waveform data. Therefore, this embodiment can implement differentiated protection measures for different risk levels, reducing the space occupied by non-critical message queues while improving the reliability of critical message transmission under sudden message impacts.

[0050] In an optional embodiment, after performing proactive protection processing matching the risk level on the message queue to be monitored, recovery and parameter update processing can also be performed. Specifically, if the queue absorption coefficient continues to rise in subsequent consecutive time windows, the degree of absorption capacity degradation is not greater than zero, and the congestion risk index is lower than a preset recovery threshold, then recovery processing is initiated. Recovery processing includes: releasing non-critical messages in the delayed cache, reducing the merging intensity of non-critical messages until the merging process is canceled, canceling the limited discarding processing of discardable low-priority messages, and restoring the normal enqueueing strategy of the message queue to be monitored.

[0051] Furthermore, the operational data generated during this proactive protection process is recorded. This operational data includes at least one of the following: absorption coefficient sequence, time window for triggering proactive protection, peak congestion risk index, risk level, and critical message preservation status. Based on this operational data, congestion control parameters are updated. These parameters include at least one of the following: preset risk weight, component weight, first risk threshold, second risk threshold, third risk threshold, preset recovery threshold, and time window length. This forms a closed-loop control process of monitoring, prediction, protection, recovery, and parameter updating.

[0052] Example 2

[0053] Based on Example 1, a congestion prevention method for protection devices based on message queue absorption capacity evolution prediction is introduced. The following three scenarios are used as examples to briefly illustrate the method of the present invention: (a) Single queue failure scenario In one embodiment, the maximum capacity of the message queue to be monitored in a certain protection device is =256 messages, with a time window length of ΔT = 10ms. Number of new messages added within the (k-1)th time window. =30 lines, queue length is determined by =50 items increased to =55 entries, then the queue absorption coefficient corresponding to the (k-1)th time window. Approximately 0.83. The number of new messages triggered by the fault in the k-th time window increased to [amount missing]. = 80 lines, the queue length increases from 55 to 100 lines, then the positive growth corresponding to the k-th time window is 45 lines, the queue absorption coefficient The value is approximately 0.44, indicating that a significant proportion of new messages are converted into queue backlog.

[0054] Furthermore, determine the degree of absorption capacity degradation corresponding to the current time window. =0.39. If the rate of accelerated decline in absorption capacity... Taking a value of 0.29, and pre-setting prediction weights α = 0.5 and β = 0.2, the future absorption capacity corresponding to the next time window is then calculated. Approximately 0.19. (Combined) , , , and sudden shock factors The calculated congestion risk index is approximately 0.554. Since the congestion risk index falls between the first risk threshold T1 = 0.4 and the second risk threshold T2 = 0.6, the risk level is determined to be the first active protection level. =100 messages, which has not yet reached the preset congestion threshold. The protection device writes non-critical messages such as log messages, print messages and interface refresh messages into the deferred cache queue in advance.

[0055] (ii) Multi-queue parallel scenario In another embodiment, a protection device simultaneously operates a master control communication queue and a log queue. The maximum capacity of the master control communication queue is... =256 entries, the maximum capacity of the log queue is =128 messages, with a time window length of ΔT = 10ms. The number of new messages added to the master communication queue within the k-th time window. = 40 lines, the queue length increases from 30 to 52 lines, then the queue absorption coefficient corresponding to the master communication queue is... Approximately 0.45; Number of new messages added to the log queue =20 records, the queue length increases from 10 to 14 records, then the queue absorption coefficient corresponding to the log queue is... It is approximately 0.80.

[0056] If the queue weight λ1 corresponding to the master communication queue is 0.7, and the queue weight λ2 corresponding to the log queue is 0.3, then the comprehensive absorption coefficient corresponding to multiple message queues is... The protection device uses the comprehensive absorption coefficient as the queue absorption coefficient corresponding to the k-th time window, which is then used to determine the evolution parameters of absorption capacity, predict future absorption capacity, and generate a congestion risk index. When the risk corresponding to the master control communication queue is high, non-critical log messages in the log queue are restricted first, or delayed caching and merging processing is performed on log messages to reserve processing space for critical messages in the master control communication queue.

[0057] (III) Recovery and Parameter Update Scenarios In another embodiment, continuing from the previous one: in a single-queue failure scenario, after the active protection process is initiated, the protection device continues to monitor the queue's operational status within subsequent time windows. The number of new messages added within the (k+1)th time window... = 50 lines, the queue length increases from 100 to 110 lines, then the queue absorption coefficient The absorption capacity is approximately 0.80, indicating a rebound in absorption capacity relative to the k-th time window. The amount of new messages added within the (k+2)-th time window... =35, the queue length decreases from 110 to 108, then the queue absorption coefficient =1.00 indicates that newly added messages were not converted into queue backlog.

[0058] Furthermore, if the congestion risk index corresponding to the (k+2)th time window is approximately 0.152, which is lower than the preset recovery threshold Trec = 0.3, and the absorption capacity has degraded to a certain extent... If the value is not greater than zero, the protection device initiates recovery processing. Recovery processing includes releasing delayed cached log and print messages, reducing and canceling non-critical message merging processing, canceling the limited discarding of low-priority messages that can be discarded, and restoring the normal queuing policy for the monitored message queue. Simultaneously, the protection device records the absorption coefficient sequence corresponding to this proactive protection processing, the time window that triggered the proactive protection processing, the peak congestion risk index, and the critical message preservation status. Based on the above operational data, it updates the preset risk weights w1, w2, w3, w4, component weights γ1, γ2, γ3, risk thresholds T1, T2, T3, and time window length ΔT.

[0059] Example 3

[0060] This embodiment provides a congestion prevention system for protection devices based on message queue absorption capacity evolution prediction, used to implement the congestion prevention method for protection devices based on message queue absorption capacity evolution prediction in Embodiment 1, including: The data acquisition module is used to acquire the queue operation statistics and maximum queue capacity of the message queue to be monitored in the protection device in the current time window; the queue operation statistics include the number of new messages in the current time window, the queue length at the start of the current time window, and the queue length at the end of the current time window. The absorption coefficient determination module is used to determine the queue absorption coefficient corresponding to the current time window based on the positive growth of the queue length at the end of the current time window relative to the queue length at the beginning of the current time window, and the number of new messages in the current time window. The absorption capacity determination module is used to determine the absorption capacity evolution parameters based on the queue absorption coefficient corresponding to the current time window and the queue absorption coefficient corresponding to the historical time window, and to predict the future absorption capacity corresponding to the next time window based on the absorption capacity evolution parameters. The risk index generation module is used to generate a congestion risk index based on the queue length at the end of the current time window, the maximum capacity of the queue, the future absorption capacity, and the evolution parameters of the absorption capacity. The risk level determination module is used to determine the risk level of the message queue to be monitored based on the congestion risk index. The proactive protection module is used to perform proactive protection processing on the message queue to be monitored that matches the risk level when the risk level is at the proactive protection level and the queue length of the message queue to be monitored at the end of the current time window has not reached the preset congestion threshold. The proactive protection processing includes at least one of delaying caching, merging processing, or limiting the discarding of non-critical messages, and reserving protected queue space for critical messages when the risk level reaches the critical message protection level.

[0061] The specific functions of each module described above are explained in the relevant content of the method in Embodiment 1, and will not be repeated here.

[0062] Example 4

[0063] This embodiment provides a computer-readable storage medium storing a computer program. When the computer program is executed, it implements the anti-congestion method of the protection device based on message queue absorption capacity evolution prediction as described in Embodiment 1.

[0064] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0065] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0066] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0067] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. A congestion prevention method for protection devices based on message queue absorption capacity evolution prediction, characterized in that, include: Obtain the queue operation statistics and maximum queue capacity of the message queue to be monitored in the protection device within the current time window; The queue operation statistics include the number of new messages in the current time window, the queue length at the start of the current time window, and the queue length at the end of the current time window; The queue absorption coefficient corresponding to the current time window is determined based on the positive growth of the queue length at the end of the current time window relative to the queue length at the beginning of the current time window, and the number of new messages added within the current time window. Based on the queue absorption coefficient corresponding to the current time window and the queue absorption coefficient corresponding to the historical time window, the absorption capacity evolution parameter is determined, and the future absorption capacity corresponding to the next time window is predicted based on the absorption capacity evolution parameter. A congestion risk index is generated based on the queue length at the end of the current time window, the maximum queue capacity, the future absorption capacity, and the evolution parameters of the absorption capacity. The risk level of the message queue to be monitored is determined based on the congestion risk index. If the risk level is at the active protection level and the queue length of the message queue to be monitored has not reached the preset congestion threshold at the end of the current time window, active protection processing matching the risk level is performed on the message queue to be monitored. The active protection processing includes at least one of delay caching, merging, or limited discarding of non-critical messages, and when the risk level reaches the critical message protection level, protected queue space is reserved for critical messages.

2. The congestion prevention method for protection devices based on message queue absorption capacity evolution prediction according to claim 1, characterized in that, The message queue to be monitored includes at least one of the following: human-machine interface receiving queue, master control communication queue, log queue, printing queue, network communication queue, and event uploading queue.

3. The congestion prevention method for protection devices based on message queue absorption capacity evolution prediction according to claim 1, characterized in that, Based on the positive increase in queue length at the end of the current time window relative to the queue length at the beginning of the current time window, and the number of new messages added within the current time window, the queue absorption coefficient corresponding to the current time window is determined, including: If the queue length at the end of the current time window is greater than the queue length at the beginning of the current time window, the difference between the queue length at the end of the current time window and the queue length at the beginning of the current time window is determined as the positive growth amount. If the queue length at the end of the current time window is less than or equal to the queue length at the beginning of the current time window, the positive growth amount is determined to be zero. The proportion of new messages that become queue backlog is determined based on the ratio between the positive growth rate and the number of new messages in the current time window. The difference between the ratio of new messages to queue backlog is determined as the queue absorption coefficient.

4. The congestion prevention method for protection devices based on message queue absorption capacity evolution prediction according to claim 1, characterized in that, When the message queue to be monitored includes multiple message queues, the queue absorption coefficient of each message queue in the current time window is determined, and the queue weight of each message queue is obtained. The overall absorption coefficient for the multiple message queues is determined based on the queue absorption coefficient and queue weight corresponding to each message queue. The comprehensive absorption coefficient is used as the queue absorption coefficient corresponding to the current time window to determine the evolution parameter of the absorption capacity.

5. The congestion prevention method for protection devices based on message queue absorption capacity evolution prediction according to any one of claims 1 to 4, characterized in that, The absorption capacity evolution parameters include the degree of absorption capacity degradation and the degree of accelerated absorption capacity degradation; The degree of degradation of absorption capacity is determined based on the difference between the queue absorption coefficient corresponding to the previous time window and the queue absorption coefficient corresponding to the current time window; The degree of accelerated degradation of absorption capacity is determined based on the difference between the degree of degradation of absorption capacity in the current time window and the degree of degradation of absorption capacity in the previous time window.

6. The congestion prevention method for protection devices based on message queue absorption capacity evolution prediction according to claim 5, characterized in that, Predicting the future absorption capacity corresponding to the next time window based on the absorption capacity evolution parameters includes: Obtain the queue absorption coefficient corresponding to the current time window, as well as the preset prediction weights corresponding to the degree of absorption capacity degradation and the degree of accelerated absorption capacity degradation, respectively; Based on the preset prediction weights corresponding to the degree of absorption capacity degradation and the degree of accelerated absorption capacity degradation, the degree of absorption capacity degradation and the degree of accelerated absorption capacity degradation are weighted to obtain the predicted impact of absorption capacity degradation. Based on the queue absorption coefficient corresponding to the current time window and the predicted impact of absorption capacity degradation, predict the future absorption capacity corresponding to the next time window. The greater the degree of absorption capacity degradation, and / or the greater the acceleration of absorption capacity degradation, the lower the future absorption capacity.

7. The congestion prevention method for protection devices based on message queue absorption capacity evolution prediction according to claim 6, characterized in that, The congestion risk index is calculated as follows: ; in, This represents the congestion risk index corresponding to the k-th time window, where the k-th time window is the current time window; The queue length at the end of the current time window; Indicates the maximum capacity of the queue; This indicates the future absorption capacity corresponding to the next time window; This indicates the degree of degradation in absorption capacity corresponding to the current time window; This indicates the sudden impact factor corresponding to the current time window; , , and All are preset risk weights; ; ; ; in, This indicates the percentage increase in new messages within the current time window; This represents the normalized value of the queue length corresponding to the current time window, indicating its positive growth. This represents the normalized count of consecutive low absorption coefficient windows corresponding to the current time window, and is updated when the queue absorption coefficient is lower than the preset low absorption coefficient threshold. , and These represent the corresponding component weights; This indicates the number of new messages added within the current time window; This indicates the number of new messages added within the previous time window; This indicates the queue length at the end of the previous time window, which is equivalent to the queue length at the start of the current time window.

8. The congestion prevention method for protection devices based on message queue absorption capacity evolution prediction according to claim 7, characterized in that, The risk level of the message queue to be monitored is determined based on the congestion risk index, including: When the congestion risk index is less than the first risk threshold, the risk level is determined to be a normal level. When the congestion risk index is not less than the first risk threshold and is less than the second risk threshold, the risk level is determined to be the first active protection level. When the congestion risk index is not less than the second risk threshold and is less than the third risk threshold, the risk level is determined to be the second active protection level. When the congestion risk index is not less than the third risk threshold, the risk level is determined to be the third active protection level. Wherein, the first risk threshold is less than the second risk threshold, and the second risk threshold is less than the third risk threshold.

9. The congestion prevention method for protection devices based on message queue absorption capacity evolution prediction according to claim 8, characterized in that, Perform proactive protection processing on the monitored message queue that matches the risk level, including: When the risk level is the first active protection level, non-critical messages are written to a deferred cache queue. When the risk level is the second active protection level, non-critical messages of the same type and source that appear consecutively within a preset time range are merged. When the risk level is the third active protection level, a limited number of discardable low-priority messages are discarded, and protected queue space is reserved for critical messages. The third active protection level is the critical message protection level; The non-critical messages include at least one of log messages, print messages, interface refresh messages, and periodic telemetry messages; The key messages include at least one of the following: protection action message, trip message, SOE message, waveform recording start message, fault report message, and important alarm message; The provision of protected queue space for critical messages includes: allocating a critical message protection queue space in the message queue to be monitored for writing the critical messages, or limiting the number of non-critical messages written to the message queue to be monitored, so as to reserve the remaining queue space for writing the critical messages.

10. A congestion prevention system for a protection device based on message queue absorption capacity evolution prediction, characterized in that, include: The data acquisition module is used to acquire the queue operation statistics and maximum queue capacity of the message queue to be monitored in the protection device during the current time window; The queue operation statistics include the number of new messages in the current time window, the queue length at the start of the current time window, and the queue length at the end of the current time window; The absorption coefficient determination module is used to determine the queue absorption coefficient corresponding to the current time window based on the positive growth of the queue length at the end of the current time window relative to the queue length at the beginning of the current time window, and the number of new messages in the current time window. The absorption capacity determination module is used to determine the absorption capacity evolution parameters based on the queue absorption coefficient corresponding to the current time window and the queue absorption coefficient corresponding to the historical time window, and to predict the future absorption capacity corresponding to the next time window based on the absorption capacity evolution parameters. The risk index generation module is used to generate a congestion risk index based on the queue length at the end of the current time window, the maximum capacity of the queue, the future absorption capacity, and the evolution parameters of the absorption capacity. The risk level determination module is used to determine the risk level of the message queue to be monitored based on the congestion risk index. The proactive protection module is used to perform proactive protection processing on the message queue to be monitored that matches the risk level when the risk level is at the proactive protection level and the queue length of the message queue to be monitored at the end of the current time window has not reached the preset congestion threshold. The proactive protection processing includes at least one of delaying caching, merging processing, or limiting the discarding of non-critical messages, and reserving protected queue space for critical messages when the risk level reaches the critical message protection level.