A distributed system gateway cluster throttling method and system
By generating and fusing capacity confidence envelope records in a distributed system gateway cluster, the uncertainty of state information in flow limiting decisions in edge networks is solved, achieving more accurate and stable flow control and avoiding cluster over-generation and resource waste.
Patent Information
- Application Number
- CN202611296761.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-11-27
AI Technical Summary
Existing distributed system gateway cluster rate limiting technology suffers from traffic over-proliferation in edge networks due to uncertainty in state information. It lacks effective quantification and collaborative utilization, resulting in significant errors in rate limiting decisions.
By reading the basic object information and real-time operation data of edge network nodes, a local state observation set is generated, uncertainty features are extracted, local capacity confidence envelope records are calculated, and these records are exchanged and merged in the edge network to generate a cluster capacity confidence envelope record. Based on this record, a dynamic release threshold and request handling table are calculated, and release, queuing or rejection processing is performed to form a closed-loop update.
It improves the accuracy and stability of rate limiting control, reduces the risk of cluster over-generation caused by the superposition of local errors, and optimizes the protection of downstream services and resource utilization.
Smart Images

Figure CN123185141A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of distributed system traffic control technology, and in particular to a method and system for rate limiting of a distributed system gateway cluster. Background Technology
[0002] As distributed systems grow in scale, gateway clusters composed of multiple gateway nodes have become core components for providing unified access, handling traffic scheduling, and protecting downstream services from overload. Existing technologies mostly employ global rate limiting mechanisms such as fixed thresholds, sliding windows, or centralized quota allocation, which are effective in environments with stable networks and minimal business fluctuations.
[0003] However, in actual edge network deployments, gateway nodes distributed across different regions must rely on state synchronization and information exchange to maintain cluster collaboration. Constrained by physical or system environmental factors such as edge link jitter, state synchronization latency, node clock skew, and sampling window differences, the key operational data (such as request arrival rate, queue length, and error rate) acquired by each node at the same time often cannot be kept consistent. This means that the state information used by gateway nodes for rate limiting decisions inherently contains significant uncertainty.
[0004] Current rate limiting technologies generally lack the quantitative processing of uncertainty in state information and its collaborative utilization in cluster decision-making. They typically ignore this uncertainty, directly using the lag state with errors as a deterministic basis for decision-making, or simply passively adjusting the rate limiting threshold. This technical deficiency easily leads to multiple gateway nodes simultaneously allowing traffic based on the same direction of error, causing traffic over-exploitation at the cluster level. Therefore, a novel rate limiting method and system for distributed system gateway clusters is urgently needed. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of existing technologies by providing a distributed system gateway cluster rate limiting method and system, thereby resolving the technical problems mentioned in the background section.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] The first part of this invention provides a method for rate limiting in a distributed system gateway cluster, comprising the following steps:
[0008] S1. Read the basic object information and historical write-back results of nodes in the edge network, collect real-time running data of nodes and perform unified time window processing and confidence labeling to generate a local state observation set;
[0009] S2. Extract uncertainty features based on the local state observation set and the updated uncertainty parameter table, calculate the baseline release capability of this node, and generate local capacity confidence envelope records based on the uncertainty impact value.
[0010] S3. Exchange the local capacity confidence envelope records of each gateway node through the edge network, and perform control time slice alignment, anomaly filtering and weighted fusion on the exchange results to generate cluster capacity confidence envelope records;
[0011] S4. Generate a risk assessment table based on the cluster capacity confidence envelope record and the pending request load of this node, calculate the dynamic release threshold and generate a request handling table, execute release, queuing or rejection processing according to the request handling table, and generate an execution feedback record set.
[0012] S5. Generate a deviation attribution table based on the execution feedback record set, generate an updated uncertainty parameter table based on the deviation attribution table, and generate the initial envelope record for the next control cycle for node basic configuration and uncertainty quantification in the next control cycle.
[0013] S1 specifically includes: reading the basic object information of nodes in the edge network, the updated uncertainty parameter table, and the initial record of the envelope for the next control cycle; performing integrity and consistency verification; and merging the nodes according to their identifiers to generate a basic node configuration table; collecting request arrival rate, request queue length, number of requests in transit, downstream response latency, downstream error rate, state synchronization latency, edge link jitter value, and node clock offset value based on the basic node configuration table; deleting duplicate records, statistically inconsistent records, and records that failed the heartbeat check; and performing unified time window processing, window-crossing record deletion, and confidence labeling on the original observation record set to generate a local state observation set.
[0014] S2 specifically includes: based on the local state observation set and the updated uncertainty parameter table, extracting the request arrival rate fluctuation, request queue length change, in-transit request number fluctuation, downstream response delay drift, downstream error rate spike, state synchronization delay offset, edge link jitter change, and node clock offset change according to the control time slice, and generating an uncertainty feature table after normalization and deletion of invalid records; calculating the local node's baseline release capacity based on the uncertainty feature table, and generating a capacity boundary candidate sequence based on the uncertainty impact value; constructing a local capacity confidence envelope based on the capacity boundary candidate sequence, and generating a local capacity confidence envelope record.
[0015] S3 specifically includes: exchanging local capacity confidence envelope records of each gateway node through the edge network; performing node source verification, signature consistency verification, timestamp validity verification, and transmission delay verification on the received records; calculating the record validity score; generating an envelope exchange record set; performing control time slice alignment, deleting over-slice records, eliminating duplicate records, deleting low-scoring records, and downweighting abnormal envelopes on the envelope exchange record set; and performing weighted fusion on the conservative lower boundary and optimistic upper boundary of each node based on the effective envelope aggregation set to generate cluster capacity confidence envelope records.
[0016] S4 specifically includes: mapping the required release quota to the corresponding control time slice number based on the cluster capacity confidence envelope record and the pending request load of this node; calculating the envelope overlap risk value and generating a risk assessment table; calculating the dynamic release threshold based on the risk assessment table and the cluster uncertainty level; determining the request handling table according to the risk level, request priority and arrival time; and determining the maximum waiting time for queued requests; and executing release, queuing or rejection processing for pending requests based on the request handling table, recording the actual release time, actual response result, actual release load, downstream load change, request backlog change and execution deviation coefficient, and generating an execution feedback record set.
[0017] S5 specifically includes: based on the execution feedback record set, and combined with the dynamic release threshold, request handling table, cluster capacity confidence envelope record, and local capacity confidence envelope record, calculating the deviation attribution value, determining overestimation deviation, underestimation deviation, or boundary deviation, and generating a deviation attribution table; based on the deviation attribution table, summarizing the deviation attribution value, the number of deviation occurrences, and the cumulative duration of deviation by parameter category, calculating the parameter update amount, and generating an updated uncertainty parameter table; based on the updated uncertainty parameter table, cluster capacity confidence envelope record, and execution feedback record set, generating the initial envelope record for the next control cycle, and performing a write-back.
[0018] The second part of this invention provides a distributed system gateway cluster rate limiting system, including gateway nodes deployed in an edge network, and includes functions executed collaboratively by a multi-agent system:
[0019] The node basic configuration and status observation module is used to read node basic object information and historical write-back results;
[0020] The uncertainty feature extraction and local envelope generation module is used to extract uncertainty features based on the local state observation set and the updated uncertainty parameter table.
[0021] The cluster envelope collaborative fusion module is used to exchange local capacity confidence envelope records of each gateway node through the edge network;
[0022] The dynamic threshold handling module is used to generate a risk assessment table based on the cluster capacity confidence envelope record and the pending request load of the current node.
[0023] The deviation attribution and closed-loop update module is used to generate a deviation attribution table based on the execution feedback record set, and to generate an updated uncertainty parameter table based on the deviation attribution table.
[0024] The beneficial effects of this invention are as follows:
[0025] This invention generates a local state observation set by uniformly organizing the basic object information of nodes, real-time running data, and historical write-back results, and performs credibility labeling on the observation results. This enables the input data of each gateway node used for rate limiting decisions to have a unified data foundation and credibility foundation, which helps to reduce rate limiting errors caused by inconsistent sampling calibers, misaligned time windows, and the mixing of abnormal records.
[0026] This invention generates a local capacity confidence envelope record by extracting the request arrival rate fluctuation, request queue length change, in-transit request number fluctuation, downstream response delay drift, downstream error rate surge, state synchronization delay offset, edge link jitter change, and node clock offset change. This transforms the traditional rate limiting judgment based on single-point state values into rate limiting judgment based on capacity boundary range, which is beneficial to improving the adaptability of rate limiting control to state uncertainty.
[0027] This invention generates cluster capacity confidence envelope records by exchanging local capacity confidence envelope records in the edge network and performing control time slice alignment, anomaly filtering, and weighted fusion. This enables each gateway node to perform rate limiting decisions based on the overall allowable range of the cluster rather than the local state of a single node, which helps reduce the risk of cluster over-provisioning caused by the superposition of local errors among multiple gateway nodes.
[0028] This invention calculates the envelope overlap risk value based on the cluster capacity confidence envelope record and the pending request load of the local node, and further generates a dynamic release threshold and request handling table. This enables the gateway node to perform release, queuing or rejection processing according to the risk changes, which is beneficial to reduce capacity idleness caused by excessive conservative rate limiting while protecting the carrying capacity of downstream services.
[0029] This invention generates a deviation attribution table based on the execution feedback record set, generates an updated uncertainty parameter table, and generates the initial envelope record for the next control cycle, thereby forming a complete link from state observation, envelope generation, cluster fusion, dynamic processing to closed-loop update. This is beneficial for continuously correcting the rate limiting control deviation and improving the rate limiting accuracy and operational stability of the gateway cluster in complex network environments. Attached Figure Description
[0030] Figure 1This is a schematic diagram of a distributed system gateway cluster rate limiting method according to the present invention;
[0031] Figure 2 This is a schematic diagram of the basic node configuration table in this invention;
[0032] Figure 3 This is a schematic diagram of uncertainty parameter extraction and confidence quantile configuration in this invention;
[0033] Figure 4 This is a schematic diagram of the calculation results of the baseline release capability of this node in this invention;
[0034] Figure 5 This is a schematic diagram of the envelope exchange record set in this invention;
[0035] Figure 6 This is a schematic diagram of the request load and risk mapping results to be processed in this invention;
[0036] Figure 7 This is a schematic diagram of the deviation attribution calculation panel in this invention;
[0037] Figure 8 This is a schematic diagram of the structure of the updated uncertainty parameter table in this invention. Detailed Implementation
[0038] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0039] Example 1: As Figures 1-8 As shown in the figure, this embodiment provides a method for rate limiting of a distributed system gateway cluster, including the following steps:
[0040] S1. Read the basic object information and historical write-back results of nodes in the edge network, collect real-time running data of nodes and perform unified time window processing and confidence labeling to generate a local state observation set;
[0041] S2. Extract uncertainty features based on the local state observation set and the updated uncertainty parameter table, calculate the baseline release capability of this node, and generate a local capacity confidence envelope record based on the uncertainty impact value.
[0042] S3. Exchange the local capacity confidence envelope records of each gateway node through the edge network, and perform control time slice alignment, anomaly filtering and weighted fusion on the exchange results to generate cluster capacity confidence envelope records;
[0043] S4. Generate a risk assessment table based on the cluster capacity confidence envelope record and the pending request load of this node, calculate the dynamic release threshold and generate a request handling table, execute release, queuing or rejection processing according to the request handling table, and generate an execution feedback record set.
[0044] S5. Generate a deviation attribution table based on the execution feedback record set, generate an updated uncertainty parameter table based on the deviation attribution table, and generate the initial envelope record for the next control cycle for node basic configuration and uncertainty quantification in the next control cycle.
[0045] S1 specifically includes the following sub-steps:
[0046] S110. Read the basic object information and historical write-back results of nodes in the edge network, and generate a basic configuration table for nodes.
[0047] In practice, the local observation agent first reads the local node identifier, the edge network area identifier, the requested access port, the queue identifier, the queue capacity limit, the in-transit request statistics channel, the response delay sampling channel, the error rate sampling channel, the status synchronization link identifier, and the clock synchronization status. It also reads the updated uncertainty parameter table and the initial record of the envelope for the next control cycle written back by the S530.
[0048] Among the above fields, node identifier, request access port, queue identifier, queue capacity limit, in-transit request statistics channel, response latency sampling channel, error rate sampling channel, status synchronization link identifier, and clock synchronization status are defined as mandatory fields. If any mandatory field is missing, the corresponding configuration record will be deleted directly and will not proceed to subsequent processing.
[0049] Configuration records with node online status of offline, maintenance, or unknown are also deleted. For records that pass integrity verification, a consistency verification is then performed: if the node identifier and the requested access port binding are inconsistent, or if the status synchronization link identifier and the clock synchronization status correspond abnormally, the record is marked as invalid and deleted.
[0050] After verification, the sampling fluctuation parameters, transmission delay parameters, clock offset parameters, and boundary contraction parameters from the updated uncertainty parameter table are written into the same node record. Simultaneously, the initial conservative allowable lower boundary, initial optimistic allowable upper boundary, and initial uncertainty level from the next control cycle envelope initial record are written into the initial boundary field, serving as the reference boundary at the start of the current control cycle. Finally, the nodes are merged according to their identifiers to generate a node basic configuration table. This node basic configuration table serves as the sole input to S120.
[0051] If this is the system's first run or there are no historical write-back results in the cache, the cold start initialization logic is executed: all parameters in the updated uncertainty parameter table are set to preset initial default values, the initial conservative allowable lower boundary in the next control cycle envelope initial record is set to the static quota benchmark value of this node, and the initial uncertainty level is set to the highest level. As the observation data acquisition for the first control cycle is completed, the system will overwrite the above initial values based on the update results generated in step S5, thus entering the adaptive control loop.
[0052] S120. Collect real-time operating data based on the node basic configuration table and perform record filtering to generate a local raw observation record set.
[0053] In practice, the local observation agent collects data on request arrival rate, request queue length, number of requests in transit, downstream response latency, downstream error rate, state synchronization latency, edge link jitter value, and node clock offset value according to the sampling channels and sampling windows recorded in the node basic configuration table.
[0054] The requested arrival rate is calculated using the following formula:
[0055]
[0056] in, For the first The gateway node in the th Request arrival rate within a sampling window;
[0057] For the first The gateway node in the th The number of requests received within each sampling window; This is the duration of the sampling window. In this embodiment, One second is acceptable. When a node receives 240 requests within this window, the corresponding request arrival rate is 240 times per second.
[0058] Edge link jitter is calculated using the following formula:
[0059]
[0060] in, For the first The gateway node in the ... Edge link jitter values within a sampling window; This represents the number of valid synchronization messages within the sampling window. For the first The gateway node in the th Within the sampling window, the first The transmission delay of a valid synchronization message; For the first The gateway node in the th Within the sampling window, the first The transmission delay of a valid synchronization message.
[0061] After each observation is collected, it is bound to the node identifier, sampling time, sampling window number, and downstream service set identifier to form the original observation record. Records with the same timestamp, node identifier, and sampling window number are considered duplicate records, and only the one with the highest priority from the source channel is retained. Records with a difference of more than 5% in the statistical value of the number of requests within the same sampling window are considered to have inconsistent statistical calibers and are deleted. Records whose source channels fail the heartbeat verification are directly deleted. After filtering, a local original observation record set is generated as the input for S130.
[0062] S130. Perform unified time window processing and confidence labeling on the local original observation record set to generate the local state observation set.
[0063] In practice, the local observation agent uses the sampling window start time in the node basic configuration table as a unified benchmark to perform time window alignment on the local original observation record set. If a record is located at the boundary of two adjacent sampling windows, it is assigned to the latter sampling window; if the timestamp offset exceeds half the sampling window duration, it is determined to be an out-of-window record and deleted.
[0064] After completing the time window alignment, the corresponding fields of request arrival rate, request queue length, number of requests in transit, downstream response latency, downstream error rate, state synchronization latency, edge link jitter value and node clock offset value are supplemented for each record, and the observation confidence is calculated in combination with the updated uncertainty parameter table read by S110.
[0065] The confidence level of an observation is calculated using the following formula:
[0066]
[0067] in, For the first The gateway node in the th Observation reliability within a sampling window; For field completeness rate; State synchronization delay; The maximum allowable state synchronization delay; This is the node clock offset value; The maximum allowed node clock offset value; , , These are the weighting coefficients, and .
[0068] in, The value is taken from the clock offset parameter in the updated uncertainty parameter table. and The base value is dynamically adjusted by the transmission delay parameter in the updated uncertainty parameter table.
[0069] In one implementation, 0.4 is acceptable. 0.35 is acceptable. A value of 0.25 is acceptable. If... If the value is not lower than 0.85, it is marked as a high-confidence observation; if Observations below 0.85 and not below 0.60 are marked as medium confidence observations; if If the value is below 0.60, it is marked as a low-confidence observation.
[0070] Furthermore, the local observation agent generates a sampling fluctuation level based on the fluctuation amplitude within the window of the requested arrival rate, a transmission delay level based on the state synchronization delay and edge link jitter value, and a clock offset level based on the node clock offset value, and writes the levels and observation confidence into the corresponding records.
[0071] The final generated local state observation set includes at least node identifier, sampling window number, values of each observation field, observation confidence level, sampling fluctuation level, transmission delay level, and clock offset level; the local state observation set is directly called by the envelope generation agent in the next step S210 to extract uncertainty features and generate a local capacity confidence envelope.
[0072] S2 specifically includes the following sub-steps:
[0073] S210. Extract uncertainty features based on the local state observation set and the updated uncertainty parameter table, and generate an uncertainty feature table.
[0074] In practice, at each gateway node in the edge network, the envelope generation agent in the multi-agent system reads the local state observation set output by S130 and reads the updated uncertainty parameter table written into the node basic configuration table in S110.
[0075] To ensure that subsequent boundary calculations have a unified time reference, the envelope generation agent first reorganizes the local state observation set according to the control time slice. The control time slice refers to the smallest decision time unit used to generate the local node's baseline release capability and capacity boundary. Its length is consistent with the sampling window duration used in S130, or is an integer multiple of the sampling window duration.
[0076] in, This indicates the duration of the control time slice; when the control time slice length is the same as the sampling window length, When the control time slice length is an integer multiple of the sampling window duration, Determined as an integer multiple thereof.
[0077] Subsequently, the envelope generation agent extracts the following for each control time slice: request arrival rate fluctuation, request queue length change, number of requests in transit fluctuation, downstream response latency drift, downstream error rate spike, state synchronization latency offset, edge link jitter change, and node clock offset change.
[0078] Among them, the request arrival rate fluctuation is defined as the absolute value of the difference between the request arrival rate corresponding to the current control time slice and the request arrival rate corresponding to the previous control time slice; the change in request queue length, the fluctuation in the number of requests in transit, the downstream response delay drift, the state synchronization delay offset, the edge link jitter change, and the node clock offset change are all calculated using the same absolute difference between adjacent time slices; the downstream error rate spike is defined as the increment of the downstream error rate corresponding to the current control time slice relative to the downstream error rate corresponding to the previous control time slice. If the difference is negative, it is counted as 0.
[0079] To eliminate the differences in the dimensions of different observations, the envelope generation agent normalizes the above quantities based on the upper limits of each reference recorded in the updated uncertainty parameter table, and calculates the uncertainty impact value:
[0080]
[0081] in, For the first The gateway node in the th The impact value of uncertainty within a control time slice; To request the arrival rate fluctuation amount; To request the rate reference upper limit; To request the change in queue length; To request the upper limit of the queue length; This represents the fluctuation range of the number of requests in transit. This represents the maximum number of requests in transit. This represents the downstream response delay drift. Maximum allowable response time; This could lead to a sudden increase in downstream error rates. This is the upper limit of the error rate; This is the state synchronization delay offset; This is the upper limit for state synchronization delay; This represents the variation in jitter on the edge link. This is the upper limit for edge link jitter; This represents the change in node clock offset. This is the upper limit of the node clock offset; to These are the weighting coefficients, and , The value of is updated synchronously with the sampling fluctuation parameter in the updated uncertainty parameter table.
[0082] In one implementation, to The values can be 0.18, 0.14, 0.12, 0.16, 0.10, 0.10, 0.10, and 0.10 respectively. If any control time slice is missing data from the previous time slice, the field integrity rate is lower than 0.85, or the normalization result is greater than 1.2, then the record corresponding to that control time slice is marked as an invalid record and deleted.
[0083] After deletion and normalization, an uncertainty feature table is generated. The uncertainty feature table includes at least node identifier, control time slice number, normalized uncertainty features, uncertainty impact value and source timestamp, which serve as input for S220.
[0084] S220. Calculate the baseline release capacity of this node based on the uncertainty characteristic table, and generate a candidate sequence of capacity boundaries.
[0085] In practice, the envelope generation agent reads the uncertainty characteristic table and, combined with the request queue length, number of requests in transit, downstream error rate, and average downstream response latency within the current control time slice, calculates the baseline allowable capacity of this node. The baseline allowable capacity of this node refers to the upper bound of the number of additional requests allowed to be released within the current control time slice, without exceeding the constraints of queue acceptance capacity, in-transit processing capacity, and downstream processing capacity. Its calculation formula is:
[0086]
[0087] in, For the first The gateway node in the th The baseline release capability of this node within each control time slice; To request the upper limit of the queue length; This is the current request queue length. To control the duration of time slices; This represents the maximum number of requests in transit. This represents the number of requests currently in transit. This represents the current downstream error rate. This represents the current average response time downstream.
[0088] like or Then directly Recorded as 0; if If the delay is less than the preset minimum protection delay, then the minimum protection delay will be used instead. It participates in the calculation to prevent the release capability from being overestimated due to transiently low latency.
[0089] Subsequently, the envelope generation agent reads the uncertainty impact value of the corresponding control time slice and performs boundary contraction and boundary expansion on the local node's baseline release capability according to the uncertainty impact value, forming a capacity boundary candidate sequence. The capacity boundary candidate sequence includes at least the control time slice number, the local node's baseline release capability, the uncertainty impact value, candidate conservative boundary, candidate optimistic boundary, and confidence weight level. The capacity boundary candidate sequence serves as input to S230, where the uncertainty impact value is used in S230 to generate a conservative release lower boundary and an optimistic release upper boundary.
[0090] S230. Construct a local capacity confidence envelope based on the capacity boundary candidate sequence and generate a local capacity confidence envelope record.
[0091] In practice, the envelope generation agent calculates the local node baseline release capability and uncertainty impact value for each control time slice in the capacity boundary candidate sequence slice by slice, obtaining the conservative release lower boundary and the optimistic release upper boundary:
[0092]
[0093] in, For the first The gateway node in the th The conservative allowable lower bound within a control time slice; For the first The gateway node in the th The upper bound of the optimistic release within a control time slice; This serves as the baseline for the release capability of this node; This represents the impact of uncertainty. The upper boundary expansion coefficient is dynamically determined by the boundary contraction parameter in the updated uncertainty parameter table. Its value ranges from 0 to 1, and in one implementation, it can be 0.5.
[0094] After obtaining the upper and lower boundaries of each control time slice in the above manner, the envelope generation agent concatenates the conservative allowable lower boundary, the optimistic allowable upper boundary, and the confidence weight level in the order of the control time slices to form a local capacity confidence envelope.
[0095] Subsequently, the envelope generation proxy is based on the proportion of the envelope width. As a criterion for determining the level of uncertainty: when the proportion is not higher than 0.15, the corresponding control time slice is recorded as a low uncertainty time slice; when the proportion is higher than 0.15 but not higher than 0.35, it is recorded as a medium uncertainty time slice; when the proportion is higher than 0.35, it is recorded as a high uncertainty time slice; if... If it is, then it is directly recorded as a time slice with high uncertainty.
[0096] Finally, the uncertainty level of the time slice with the highest proportion within the current control period is used as the uncertainty level of the local capacity confidence envelope. The node identifier, edge network region identifier, effective time period, control time slice number sequence, conservative allowable lower boundary sequence, optimistic allowable upper boundary sequence, trust weight level sequence, and uncertainty level are all uniformly written into the local capacity confidence envelope record. This local capacity confidence envelope record is directly invoked by the collaborative decision agent in the next step S310 for envelope exchange between gateway nodes within the edge network and for generating the cluster capacity confidence envelope.
[0097] S3 specifically includes the following sub-steps:
[0098] S310. Exchange the local capacity confidence envelope records of each gateway node through the edge network, and perform validity quantification on the received records to generate an envelope exchange record set.
[0099] In specific implementation, at each gateway node in the edge network, the collaborative decision agent in the multi-agent system reads the local capacity confidence envelope record output by S230, sends the local capacity confidence envelope record to other gateway nodes in the same edge network area, and simultaneously receives the local capacity confidence envelope record returned by other gateway nodes.
[0100] In this embodiment, the local capacity confidence envelope record includes at least the node identifier, edge network region identifier, effective time period, control time slice number sequence, conservative allowable lower boundary sequence, optimistic allowable upper boundary sequence, confidence weight level sequence, uncertainty level, record generation timestamp, and signature digest value.
[0101] After receiving a record, the collaborative decision agent first performs node source verification to confirm whether the sending node identifier exists in the node basic configuration table stored in this node; then it performs signature consistency verification to confirm whether the signature digest value in the received record is consistent with the pre-registration digest rule of the sending node; subsequently, it performs timestamp validity verification to confirm whether the record generation timestamp falls within the allowable range of the current control cycle; and finally, it performs transmission delay verification to confirm whether the transmission delay from sending to receiving the record exceeds the allowable upper limit.
[0102] To avoid relying solely on manually set thresholds for subsequent screening, this embodiment further calculates a validity score for each received record:
[0103]
[0104] in, For the first The gateway node in the th Each control time slice corresponds to a record validity score for the local capacity confidence envelope record; This is a signature consistency indicator value, which is 1 when the signature digest values are consistent and 0 when they are inconsistent. This refers to the transmission delay of the record; The maximum allowable transmission delay; This is the clock offset value for the node corresponding to this record; The maximum allowed node clock offset value; The uncertainty coefficient corresponding to this record is a smaller value for a lower uncertainty level and a larger value for a higher uncertainty level. In one embodiment, the low, medium, and high uncertainty levels can be mapped to 0.2, 0.5, and 0.8, respectively. , , , These are the weighting coefficients, and .
[0105] For records with a signature consistency indicator value of 0, or records whose transmission delay exceeds the maximum allowed transmission delay, they are directly deleted and do not participate in the scoring; for the remaining records, the record validity score is retained and bound to the original record to generate an envelope exchange record set, which is used as input to S320.
[0106] S320. Perform control time slice alignment, anomaly filtering, and weight reduction on the envelope exchange record set to generate a valid envelope aggregation set.
[0107] In practice, the collaborative decision agent uses the start time of the current control cycle as a unified time reference to align each record in the envelope exchange record set with the control time slice. The purpose of control time slice alignment is to map the local capacity confidence envelope records uploaded by different gateway nodes at different actual arrival times to the same control time slice number, so as to avoid mistaking envelopes from different times for envelopes from the same time during subsequent cluster fusion.
[0108] The control time slice number is determined by the following formula:
[0109]
[0110] in, For the first The aligned control time slice number corresponding to the local capacity confidence envelope record sent by each gateway node; This is the timestamp used to generate the record; This is the start time of the current control cycle; To control the duration of time slices; This indicates the floor function.
[0111] After alignment, the collaborative decision agent then determines the deviation between the generation timestamp of the record and the center time of the aligned control time slice. If the deviation exceeds half the duration of the control time slice, the record is identified as a time slice overrun and deleted.
[0112] Subsequently, for multiple records corresponding to the same node and the same aligned control time slice number, only the record with the highest validity score is retained; records with validity scores below the preset lower limit are directly deleted; records with validity scores not lower than the preset lower limit but lower than the high credibility threshold are not deleted, but their credibility weight level is downgraded by one level.
[0113] Furthermore, if the edge link status corresponding to the received record is congested or the node's online status changes from online to maintenance, the record is marked as an abnormal envelope record, and a weight reduction process is performed by multiplying the record validity score by an abnormal shrinkage coefficient, wherein the abnormal shrinkage coefficient is less than 1.
[0114] After time slice alignment, duplicate record resolution, out-of-slice record deletion, low-scoring record deletion, and abnormal envelope weight reduction, a valid envelope aggregation set is generated. The valid envelope aggregation set includes at least the node identifier, the aligned control time slice number, the conservative allowable lower boundary, the optimistic allowable upper boundary, the corrected record validity score, and the corrected confidence weight level, which serve as the input to S330.
[0115] S330. Based on the effective envelope aggregation set, the envelopes of each node are weighted and fused to generate a cluster capacity confidence envelope record.
[0116] In practice, the collaborative decision agent reads all corresponding records within the effective envelope aggregation set for each aligned control time slice number, and performs weighted fusion on the conservative lower boundary and the optimistic upper boundary. The purpose of weighted fusion is to give higher weight to the node envelopes with higher record validity scores in the cluster envelope, while the node envelopes with lower record validity scores participate in the calculation only as weak references.
[0117] The conservative lower bound and the optimistic upper bound of the cluster are calculated using the following formula:
[0118]
[0119] in, For the first The lower limit of the conservative allowable range for clusters within a control time slice; For the first The upper limit of the optimistic allowable range for a cluster within a control time slice; This represents the number of valid gateway nodes participating in fusion within the current control time slice. For the first The gateway node in the th The validity score of the corrected record corresponding to each control time slice; For the first The gateway node in the th A conservative lower bound for the control time slice; For the first The gateway node in the th An optimistic release upper bound for each control time slice.
[0120] If the number of valid gateway nodes participating in the fusion within the current control time slice is less than the preset minimum number of nodes, the optimistic upper boundary of the cluster corresponding to the control time slice will be directly modified to the conservative lower boundary of the cluster, so that the control time slice enters the conservative fusion mode.
[0121] Subsequently, the collaborative decision-making agent determines the cluster uncertainty level for each control time slice based on the cluster's conservative lower bound, optimistic upper bound, effective node coverage, and the corrected trust weight level corresponding to the participating fusion records. When the proportion of records with low trust weight levels among the participating fusion records exceeds a preset proportion, the cluster uncertainty level for that control time slice is increased by at least one level. Then, the boundary sequences of each control time slice are concatenated in chronological order to form the cluster capacity confidence envelope.
[0122] The final generated cluster capacity confidence envelope record includes at least the cluster identifier, edge network region identifier, effective time period, control time slice number sequence, cluster conservative allowable lower boundary sequence, cluster optimistic allowable upper boundary sequence, effective node coverage sequence, and cluster uncertainty level sequence. The cluster capacity confidence envelope record is directly called by the collaborative decision agent in the next step S410 to calculate the envelope overlap risk value and dynamic allowable threshold.
[0123] S4 specifically includes the following sub-steps:
[0124] S410. Generate a risk assessment table based on the cluster capacity confidence envelope record and the pending request load of this node.
[0125] In practice, at each gateway node in the edge network, the collaborative decision agent in the multi-agent system reads the cluster capacity confidence envelope record output by S330 and simultaneously reads the pending request load that has entered the node but has not yet completed the admission decision. The pending request load includes at least the request identifier, arrival time, request priority, estimated processing time, downstream service set identifier, and required allowance.
[0126] The required allowance refers to the share of admission capacity that the request is expected to occupy within each control time slice covered by its expected processing time. To enable requests with different expected processing times to be compared with the cluster capacity confidence envelope record on the same time basis, the collaborative decision agent first maps each request to the control time slice it covers, and then distributes the required allowance according to the control time slice; if the expected processing time of a request covers two control time slices, the required allowance is allocated to the corresponding control time slice according to the proportion of the actual coverage time.
[0127] Subsequently, the load to be mapped is aggregated for each control time slice, and then compared with the conservative lower bound and optimistic upper bound of the cluster corresponding to the same control time slice to calculate the envelope overlap risk value:
[0128]
[0129] in, For the first The risk value of envelope overlap for each control time slice; To map to the The amount of load to be mapped in each control time slice; For the first The lower bound of the conservatively allowed cluster time slice is controlled; For the first The cluster can optimistically allow the upper bound of a control time slice.
[0130] To ensure that the calculation results can be directly used for subsequent threshold generation, when At that time, Recorded as 0; when At that time, Recorded as 1; when At that time, if Then Record it as 1, otherwise record it as 0.
[0131] After calculation, a risk assessment table is generated by merging request identifiers and control time slice numbers. The risk assessment table includes at least the request identifier, control time slice number, load to be mapped, envelope overlap risk value, and risk level. The risk level is divided into three levels—low risk, medium risk, and high risk—based on the envelope overlap risk value, and is used in S420 to determine the request processing priority and maximum queuing time, serving as input to S420.
[0132] S420. Generate dynamic release thresholds and request processing forms based on the risk assessment form.
[0133] In practice, the collaborative decision-making agent reads the risk assessment table and the cluster uncertainty level corresponding to each control time slice. The dynamic release threshold is based on the conservative lower boundary of the cluster for release in the corresponding control time slice, tightened based on the envelope overlap risk value, and with the cluster uncertainty level as the recovery constraint, calculated using the following formula:
[0134]
[0135] in, For the first The dynamic release threshold for each control time slice; For the first The lower bound of the conservatively allowed cluster time slice is controlled; For the first The cluster's optimistic upper limit can be allowed for each time slice; For the first The risk value of envelope overlap for each control time slice; To preset risk thresholds; This is the tightening factor; The coefficient of recovery.
[0136] To prevent overly rapid relaxation of entry requirements under high uncertainty conditions, the recovery coefficient will be adjusted when the cluster uncertainty level is high. Set to 0; when the cluster uncertainty level is medium, the recovery coefficient will be... Set to half of the preset value; when the cluster uncertainty level is low, the recovery coefficient... Use the default value.
[0137] Subsequently, the collaborative decision-making agent performs cumulative admission judgment on requests within the same control time slice in descending order of risk level, descending order of request priority within the same risk level, and ascending order of arrival time within the same request priority: if the sum of the current cumulative released load and the current request's required release amount is not higher than the dynamic release threshold, the request is recorded as released; if it is higher than the dynamic release threshold but not higher than the queuing capacity limit, the request is recorded as queued; if it is higher than both the dynamic release threshold and the queuing capacity limit, the request is recorded as rejected.
[0138] For requests recorded as queued, their maximum allowed waiting time is also recorded according to their risk level; the maximum waiting time for high-risk requests is shorter than that for medium-risk requests, and the maximum waiting time for medium-risk requests is shorter than that for low-risk requests; if an access space is not obtained after exceeding the corresponding maximum waiting time, it is recorded as a rejection. Finally, a request processing table is generated, which includes at least the request identifier, control time slice number, dynamic release threshold, processing action, processing reason, and sorting basis, as input to S430.
[0139] Tightening coefficient Its function is to reserve safety redundancy by actively lowering the admission threshold when the risk of cluster capacity overlap is high; recovery coefficient Its purpose is to gradually release suppressed processing capacity when the risk is low and the system's certainty is high. This is achieved by... By associating with the cluster's uncertainty level, a dynamic control strategy of "cautious recovery when the risk is high and accelerated recovery when the risk is low" is implemented, thereby achieving a technical balance between protecting downstream services and improving resource utilization.
[0140] S430. Perform the request processing according to the request processing table and generate an execution feedback record set.
[0141] In practice, the collaborative decision-making agent processes each request one by one according to the request handling table, performing release, queuing, or rejection. For release requests, the actual release time, actual response delay, actual response result, and actual quota are recorded; for queuing requests, the enqueue time, dequeue time, queuing duration, and whether a timeout occurred and the request was rejected are recorded; for rejection requests, the rejection time, rejection reason, and corresponding control time slice number are recorded.
[0142] At the same time, the local observation agent synchronously collects the actual release load, downstream load changes, and request backlog changes for each control time slice, and calculates the execution deviation coefficient:
[0143]
[0144] in, For the first The execution deviation coefficient of each control time slice; For the first Actual release load within each control time slice; For the first The dynamic release threshold for each control time slice; For the first The downstream load change within a control time slice; This represents the upper limit of downstream load variation. For the first Changes in request backlog within a control time slice; To request the upper limit of the backlog change; , , These are the weighting coefficients, and If the dynamic release threshold is... If the value is 0, then the first item will be counted as 1.
[0145] Finally, the request handling actions, actual response results, actual released load, downstream load changes, request backlog changes, and execution deviation coefficients are merged according to the request identifier and control time slice number to generate an execution feedback record set. This execution feedback record set is directly invoked by the envelope generation agent in the next step S510 to generate a deviation attribution table and an updated uncertainty parameter table.
[0146] S5 specifically includes the following sub-steps:
[0147] S510. Generate a deviation attribution table based on the execution feedback record set.
[0148] In practice, at each gateway node, the envelope generation agent in the multi-agent system reads the execution feedback record set output by S430, and simultaneously reads the actual effective dynamic release threshold, request handling table, cluster capacity confidence envelope record, and local capacity confidence envelope record for the current control cycle. The envelope generation agent first merges the execution feedback record set according to the control time slice number to obtain the actual release load, downstream load change, request backlog change, actual response result statistics, and execution deviation coefficient corresponding to each control time slice.
[0149] Subsequently, deviation attribution calculation is performed for each control time slice. The purpose of deviation attribution is to further classify the execution deviations occurring within the current control cycle into overestimation deviations, underestimation deviations, and boundary deviations, so as to enable targeted updates for different uncertainty parameters in subsequent operations. To this end, an envelope generation proxy calculates the deviation attribution value:
[0150]
[0151] in, For the first Deviation attribution value for each control time slice; For the first The execution deviation coefficient of each control time slice; For the first The downstream load variation of each control time slice; This represents the upper limit of downstream load variation. For the first Changes in the request backlog for each control time slice; To request the upper limit of the backlog change; , , These are the weighting coefficients, and .
[0152] In one implementation, , , The values can be 0.5, 0.3, and 0.2 respectively. If the deviation attribution value is higher than the first attribution threshold and the downstream load change is higher than the upper limit of the downstream load change, then the control time slice is determined to be mainly overestimating the deviation; if the deviation attribution value is lower than the first attribution threshold and the difference between the dynamic release threshold and the actual released load is higher than the preset allowable deviation value, while the downstream load change and the request backlog change are both within the safe range, then the control time slice is determined to be mainly underestimating the deviation; in other cases, the deviation is determined to be mainly boundary deviation.
[0153] Furthermore, the envelope generation agent maps overestimated deviations to boundary shrinkage parameters and transmission delay parameters, underestimated deviations to sampling fluctuation parameters and node switching correction parameters, and boundary deviations to clock offset parameters and boundary shrinkage parameters. It then writes the deviation category, deviation attribution value, corresponding parameter category, number of continuous control time slices, and source record identifier into a deviation attribution table. This deviation attribution table serves as input to S520.
[0154] S520. Generate an updated uncertainty parameter table based on the deviation attribution table.
[0155] In practice, the envelope generation agent reads the deviation attribution table, summarizes the deviation attribution value, the number of deviation occurrences, and the cumulative duration of deviation within the corresponding control time slice according to parameter category, and calculates the parameter update amount based on this. The parameter update amount is used to characterize the correction magnitude that a certain uncertain parameter should increase or decrease within the current control cycle relative to the previous control cycle, avoiding updates that rely solely on a single abnormal result. The parameter update amount is calculated using the following formula:
[0156]
[0157] in, For the first The parameter update amount of uncertain parameters in the current control cycle; For the first The average deviation attribution value corresponding to the class of deviation; For the first The number of times a type of deviation occurs within the current control cycle; This represents the upper limit on the number of times the deviation can occur. For the first The cumulative duration of the type of deviation within the current control cycle; This is the maximum cumulative duration. , , These are the weighting coefficients, and .
[0158] Specifically, the m-th type of uncertainty parameter includes: when m=1, it corresponds to the sampling fluctuation parameter, which is used to adjust the weight of the requested arrival rate fluctuation in step S210; when m=2, it corresponds to the transmission delay parameter, which is used to adjust the response weight of state synchronization delay and edge link jitter value; when m=3, it corresponds to the clock offset parameter, which is used to adjust the correction weight of node clock offset value; when m=4, it corresponds to the boundary contraction parameter, which is used to adjust the contraction amplitude of the envelope boundary in step S230.
[0159] In one implementation, , , The values can be 0.45, 0.30, and 0.25 respectively. If the... If the overestimation bias is dominant, the corresponding parameter is updated in a positive correction manner, that is, the parameter update amount is increased based on the parameter value of the previous control cycle; if the first... If the type of deviation is dominated by underestimation, the corresponding parameter is updated in a negative correction manner, that is, the parameter update amount is subtracted from the parameter value of the previous control cycle, but the result after subtraction must not be lower than the preset parameter lower limit; if the first... If the deviation category is dominated by boundary deviation, the corresponding parameter is updated using a half-amplitude correction method, that is, the parameter update amount is increased or decreased by half based on the parameter value of the previous control cycle. For deviation categories that have not reappeared for several consecutive control cycles, the corresponding parameter is not directly restored to the initial value, but rather smoothly decreases cycle by cycle according to a decreasing coefficient.
[0160] After the update is completed, an updated uncertainty parameter table is generated. The updated uncertainty parameter table includes at least the parameter name, the parameter value of the previous control cycle, the parameter update amount of the current control cycle, the updated parameter value, the corresponding deviation category, and the update timestamp, which are used as inputs for S530.
[0161] S530. Generate the initial record of the envelope for the next control cycle based on the updated uncertainty parameter table and perform a write-back.
[0162] In practice, the envelope generation agent reads the updated uncertainty parameter table and the cluster capacity confidence envelope records and execution feedback record sets corresponding to the last few control time slices of the current control cycle to generate the initial envelope record for the next control cycle. The initial conservative allowable lower boundary in the initial envelope record for the next control cycle is not a fixed constant, but is determined jointly based on the cluster conservative allowable lower boundary at the end of the current control cycle and the average execution deviation coefficient. The calculation formula is as follows:
[0163]
[0164] Where K is the total number of control time slices within the current control cycle. This serves as the initial conservative lower boundary for the next control cycle; The lower bound for conservative clearance of the cluster is set as the last control time slice of the current control cycle; This is the average execution deviation coefficient for the last few control time slices of the current control cycle; is the initial boundary contraction coefficient.
[0165] Based on the initial conservative lower boundary, and combined with the boundary contraction parameter in the updated uncertainty parameter table, an initial optimistic upper boundary is generated. If the average execution deviation coefficient is higher than the second attribution threshold, the initial uncertainty level of the next control cycle is increased by one level. If it is not higher than the second attribution threshold, it remains consistent with the end of the current control cycle.
[0166] The final initial record of the next control cycle envelope includes at least the node identifier, the start time of the next control cycle, the initial conservative allowable lower boundary, the initial optimistic allowable upper boundary, and the initial uncertainty level. The envelope generation agent then writes the updated uncertainty parameter table and the initial record of the next control cycle envelope back to the local node's storage area, and simultaneously writes them back to the collaborative cache area in the edge network.
[0167] The updated uncertainty parameter table is read as a historical write-back result in S110 of the next control cycle and as an uncertainty quantification basis in S210 of the next control cycle. The initial envelope record of the next control cycle is written into the initial boundary field of the node basic configuration table in S110 of the next control cycle, thereby completing the closed-loop update from execution feedback, deviation attribution, parameter update to the generation of the initial boundary of the next control cycle.
[0168] In this embodiment, the weighting coefficients involved in each step (such as...) , , and to The selection of parameters (e.g., transmission latency, link jitter) follows these technical principles: Higher weights are assigned to observation metrics significantly affected by the network environment (e.g., transmission latency, link jitter) to enhance the sensitivity of rate limiting decisions to network fluctuations; moderate weights are assigned to metrics heavily constrained by node hardware performance (e.g., clock skew) to maintain a baseline for system synchronization; and basic weights are assigned to historical statistics with high stability to ensure the smoothness of envelope generation. Through continuous iteration in step S5, each weight coefficient can be fine-tuned based on the actual execution deviation Bk, thereby causing the system to spontaneously converge towards reducing the execution deviation coefficient Ek.
[0169] Example 2: This example provides a distributed system gateway cluster rate limiting system, including gateway nodes deployed in an edge network, and includes functions executed collaboratively by a multi-agent system:
[0170] The node basic configuration and status observation module is used to read the basic object information and historical write-back results of the node, collect real-time running data of the node, perform record filtering, unified time window sorting and confidence labeling, and generate a local status observation set.
[0171] The uncertainty feature extraction and local envelope generation module is used to extract uncertainty features based on the local state observation set and the updated uncertainty parameter table, calculate the baseline release capability of this node, and generate a local capacity confidence envelope record.
[0172] The cluster envelope collaborative fusion module is used to exchange local capacity confidence envelope records of each gateway node through the edge network, perform control time slice alignment, anomaly filtering and weighted fusion, and generate cluster capacity confidence envelope records.
[0173] The dynamic threshold handling module is used to generate a risk assessment table based on the cluster capacity confidence envelope record and the pending request load of the current node, calculate the dynamic release threshold, generate a request handling table, and perform release, queuing or rejection processing, and generate an execution feedback record set.
[0174] The deviation attribution and closed-loop update module is used to generate a deviation attribution table based on the execution feedback record set, generate an updated uncertainty parameter table based on the deviation attribution table, and generate the initial envelope record for the next control cycle for node basic configuration and uncertainty quantification in the next control cycle.
[0175] All the above formulas are performed using dimensionless numerical calculations; the relevant formulas are based on empirical models that approximate the real situation, obtained through extensive data collection and software simulation fitting. The preset parameters and thresholds involved in the formulas can be conventionally set and adjusted by those skilled in the art according to the physical constraints of the actual application scenario.
[0176] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0177] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0178] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for rate limiting in a distributed system gateway cluster, characterized in that, Includes the following steps: S1. Read the basic object information and historical write-back results of nodes in the edge network, collect real-time running data of nodes and perform unified time window processing and confidence labeling to generate a local state observation set; S2. Extract uncertainty features based on the local state observation set and the updated uncertainty parameter table, calculate the baseline release capability of this node, and generate local capacity confidence envelope records based on the uncertainty impact value. S3. Exchange the local capacity confidence envelope records of each gateway node through the edge network, and perform control time slice alignment, anomaly filtering and weighted fusion on the exchange results to generate cluster capacity confidence envelope records; S4. Generate a risk assessment table based on the cluster capacity confidence envelope record and the pending request load of this node, calculate the dynamic release threshold and generate a request handling table, and perform release, queuing or rejection processing according to the request handling table, and generate an execution feedback record set.
2. The distributed system gateway cluster rate limiting method according to claim 1, characterized in that, Also includes: S5. Generate a deviation attribution table based on the execution feedback record set, generate an updated uncertainty parameter table based on the deviation attribution table, and generate the initial envelope record for the next control cycle for node basic configuration and uncertainty quantification in the next control cycle.
3. The distributed system gateway cluster rate limiting method according to claim 1, characterized in that, S1 specifically includes: Read the basic object information of nodes in the edge network, the updated uncertainty parameter table, and the initial record of the envelope for the next control cycle; perform integrity verification and consistency verification; and generate a basic configuration table of nodes by merging them according to node identifiers. Based on the node basic configuration table, the system collects request arrival rate, request queue length, number of requests in transit, downstream response latency, downstream error rate, status synchronization latency, edge link jitter value, and node clock offset value. Duplicate records, statistically inconsistent records, and records that fail the heartbeat check are deleted to generate the original observation record set.
4. The distributed system gateway cluster rate limiting method according to claim 3, characterized in that, Also includes: Perform unified time window processing, window overrun record deletion, and confidence labeling on the original observation record set to generate a local state observation set.
5. A method for rate limiting in a distributed system gateway cluster according to claim 1, characterized in that, S2 specifically includes: Based on the local state observation set and the updated uncertainty parameter table, the following parameters are extracted according to the control time slice: request arrival rate fluctuation, request queue length change, number of requests in transit fluctuation, downstream response delay drift, downstream error rate spike, state synchronization delay offset, edge link jitter change, and node clock offset change. After normalization and deletion of invalid records, an uncertainty feature table is generated. The baseline release capacity of this node is calculated based on the uncertainty characteristic table, and a candidate sequence of capacity boundaries is generated by combining the uncertainty impact value. Construct a local capacity confidence envelope based on the candidate sequence of capacity boundaries, and generate a local capacity confidence envelope record.
6. The distributed system gateway cluster rate limiting method according to claim 1, characterized in that, S3 specifically includes: The local capacity confidence envelope records of each gateway node are exchanged through the edge network. The received records are verified for node origin, signature consistency, timestamp validity and transmission delay. The record validity score is calculated and an envelope exchange record set is generated. Perform control time slice alignment, over-slice record deletion, duplicate record resolution, low-scoring record deletion, and abnormal envelope weight reduction processing on the envelope exchange record set to generate a valid envelope aggregation set; Based on the effective envelope aggregation set, a weighted fusion is performed on the conservative lower bound and optimistic upper bound of each node to generate a cluster capacity confidence envelope record.
7. A distributed system gateway cluster rate limiting method according to claim 1, characterized in that, S4 specifically includes: Based on the cluster capacity confidence envelope record and the pending request load of this node, the required release quota is mapped to the corresponding control time slice number, and the envelope overlap risk value is calculated and a risk assessment table is generated. Based on the risk assessment table and the cluster uncertainty level, the dynamic release threshold is calculated, the request processing table is determined according to the risk level, request priority and arrival time, and the maximum waiting time is determined for queued requests. Based on the request handling table, the requests to be processed are released, queued, or rejected. The actual release time, actual response result, actual released load, downstream load change, request backlog change, and execution deviation coefficient are recorded, and an execution feedback record set is generated.
8. A method for rate limiting in a distributed system gateway cluster according to claim 2, characterized in that, S5 specifically includes: Based on the execution feedback record set, and combined with the dynamic release threshold, request processing table, cluster capacity confidence envelope record and local capacity confidence envelope record, calculate the deviation attribution value, determine the overestimation deviation, underestimation deviation or boundary deviation, and generate a deviation attribution table. Based on the deviation attribution table, the deviation attribution values, the number of times the deviation occurred, and the cumulative duration of the deviation are summarized by parameter category. The parameter update amount is calculated, and the updated uncertainty parameter table is generated.
9. A method for rate limiting in a distributed system gateway cluster according to claim 8, characterized in that, Also includes: Based on the updated uncertainty parameter table, cluster capacity confidence envelope record, and execution feedback record set, generate the initial envelope record for the next control cycle and perform a write-back.
10. A distributed system gateway cluster rate limiting system, employing the distributed system gateway cluster rate limiting method according to any one of claims 1 to 9, characterized in that, This includes gateway nodes deployed in the edge network, and also includes actions executed collaboratively by a multi-agent system: The node basic configuration and status observation module is used to read node basic object information and historical write-back results; The uncertainty feature extraction and local envelope generation module is used to extract uncertainty features based on the local state observation set and the updated uncertainty parameter table. The cluster envelope collaborative fusion module is used to exchange local capacity confidence envelope records of each gateway node through the edge network; The dynamic threshold handling module is used to generate a risk assessment table based on the cluster capacity confidence envelope record and the pending request load of the current node. The deviation attribution and closed-loop update module is used to generate a deviation attribution table based on the execution feedback record set, and to generate an updated uncertainty parameter table based on the deviation attribution table.
