High-concurrency communication service platform and method

By obtaining the operating status data of the connection to be serviced in the operating system kernel-level network protocol stack, evaluating resource consumption and introducing pressure and feudal result analysis mechanisms, dynamically adjusting the connection multiplexing upper limit, solving the problem of improper setting of the connection multiplexing upper limit in high concurrent communication services, and improving the system's resource utilization efficiency and stability.

CN120455524AActive Publication Date: 2025-08-08WUHAN YUNJI TIANCHENG INFORMATION TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510791184.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-08-08
Estimated Expiration
2045-06-13

AI Technical Summary

Technical Problem

In high concurrency communication service scenarios, unreasonable settings of the connection multiplexing upper limit may lead to system resources exhaustion, service response slows down or even crashes, and the existing system has failed to effectively solve this problem.

Method used

By obtaining the operating status data of the connection to be served in the operating system kernel-level network protocol stack, evaluating resource consumption, introducing pressure results and feudal death result analysis mechanisms, dynamically adjusting the upper limit of connection multiplexing, using a one-variable linear regression model to predict the change in connection frequency, and optimizing resource utilization in combination with Zero Window notification method.

Benefits of technology

It realizes intelligent control of the upper limit of connection multiplexing, improves the system's resource utilization efficiency and stability in high concurrency scenarios, reduces the connection failure rate and the system's false response probability, and enhances the system's compressive resistance and throughput capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455524A_ABST
    Figure CN120455524A_ABST
Patent Text Reader

Abstract

The invention discloses a high-concurrency communication service platform and method, relates to the technical field of network communication, and aims to determine to-be-served connection in a kernel-level network protocol stack of an operating system, obtain operation state data of the to-be-served connection, pre-process the operation state data to generate an operation data set, and send the to-be-served connection to the operating system according to the operation data set. Evaluating the resource consumption condition of each resource during each multiplexing of each to-be-served connection, obtaining the initial connection multiplexing upper limit of the corresponding to-be-served connection, carrying out feature extraction on the operation data set, judging the starting of a pressure result analysis mechanism and a false death result analysis mechanism so as to generate a pressure result and a false death result, and sending the pressure result and the false death result to the server. The pressure result is used for correcting the initial connection multiplexing upper limit of the corresponding to-be-served connection, and the false death result is used for correcting the initial connection multiplexing upper limit of the corresponding to-be-served connection again so as to be applied to an operating system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network communication technology, and in particular to a high-concurrency communication service platform and method. Background Art

[0002] With the continuous expansion of information infrastructure, network communication technology, as the core means of data interaction between computer systems and terminal devices, has been widely deployed in complex environments such as cloud platforms, Internet of Things systems, and edge computing nodes. In this technology system, high-concurrency communication services, as the key supporting capabilities for simultaneous access by multiple users and high-frequency data interaction, are responsible for task traffic scheduling and concurrent control of multi-channel data transmission. Especially at the protocol multiplexing level, the connection multiplexing mechanism is widely used in TCP long connection management to achieve efficient use of limited resources. Specifically in high-concurrency communication scenarios, the system often needs to reuse and schedule TCP connections while maintaining stable connection quality to reduce connection reconstruction costs and alleviate system load.

[0003] In response to the reuse behavior regulation problem in the above-mentioned high-concurrency communication service scenario, the current system often only considers the application of the connection reuse mechanism. This is because in high-concurrency communication services, connection reuse technology can effectively reduce resource overhead and improve system performance. However, if the connection reuse upper limit is set unreasonably, it may lead to system resource exhaustion, slow service response or even crash. The current system ignores setting a connection reuse upper limit on TCP connections. Summary of the Invention

[0004] In view of the deficiencies in the prior art, the present invention provides a high-concurrency communication service platform and method, which solves the problems in the above-mentioned background technology.

[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions: a high-concurrency communication service platform and method, comprising the following steps: Determine the connections to be serviced in the kernel-level network protocol stack of the operating system, obtain the running status data of the connections to be serviced, and generate a running data set after preprocessing; Based on the running data set, evaluate the resource consumption of each resource by each connection to be served during each reuse, and obtain the initial connection reuse limit of the corresponding connection to be served; Feature extraction is performed on the running data set to determine the activation of the stress result analysis mechanism and the suspended animation result analysis mechanism to generate stress results and suspended animation results. The stress result is used to correct the initial connection reuse upper limit of the corresponding connection to be served, and the suspended animation result is used to correct the initial connection reuse upper limit of the corresponding connection to be served again for application to the operating system.

[0006] Preferably, in the operating system kernel-level network protocol stack, according to the protocol and business communication behavior carried by each TCP connection, it is determined whether each TCP connection in the operating system kernel-level network protocol stack is included in the reuse pool, so as to establish a connection reuse mechanism for the corresponding TCP connection, and the total number of TCP connections included in the reuse pool is counted, and the TCP connections included in the reuse pool are marked as connections to be served; After the high-concurrency communication service is started, real-time statistics are collected on the running status of the service connection, including the CPU time, memory usage, bandwidth usage, waiting time distribution of the connection reuse queue, number of connection reuse successes and failures, connection reuse frequency, and connection health status of the corresponding service connection during each reuse. The connection health status includes the connection response timeout rate and heartbeat detection failure rate. The operating status data are preprocessed to remove duplicate values, outliers and normalize them. The operating status data are standardized using dimensionless processing technology to eliminate the dimensional differences between different parameters and generate an operating data set.

[0007] Preferably, based on the running data set, the resource consumption of each resource for each connection to be served during each reuse is evaluated to obtain the average resource consumption of different resource dimensions, including the average CPU time consumption, the average memory consumption, and the average bandwidth consumption, specifically: The average CPU time consumed by each connection to be served in each reuse is calculated based on the CPU time consumed by each connection to be served and the number of reuses. The average memory consumption of each connection to be served in each reuse is calculated by the memory usage and reuse times of each connection to be served in each reuse; The average bandwidth consumption of each connection to be served in each reuse is calculated by using the bandwidth occupied by each connection to be served in each reuse and the number of reuses; Based on the average resource consumption and consumption threshold of each connection to be served in different resource dimensions, analyze the theoretical connection reuse times of each connection to be served in different resource dimensions to obtain a resource reuse set, where the resource reuse set includes the theoretical maximum connection reuse times of each connection to be served in the CPU resource dimension, the theoretical maximum connection reuse times in the memory resource dimension, and the theoretical maximum connection reuse times in the bandwidth resource dimension; The minimum value of the theoretical maximum number of connection reuses is extracted from the resource reuse set as the initial connection reuse upper limit for the corresponding connection to be served.

[0008] Preferably, during the operation of the communication service, the operation status data of each connection to be served is continuously monitored, and the number of connection reuse failures and the average waiting time of the connection reuse queue are extracted; If the ratio of connection reuse failures to total connection requests exceeds the preset ratio threshold, and the average waiting time in the connection reuse queue exceeds the preset time threshold, it indicates that there is an abnormal risk in resource scheduling for the corresponding connection to be served in the current connection reuse state, triggering the pressure result analysis mechanism. Otherwise, the pressure result is 1; Start the pressure result analysis mechanism to analyze the resource scheduling tension of the corresponding connection to be served under the current connection reuse state, so as to calculate the connection reuse pressure index of the corresponding connection to be served, specifically: , where is the connection reuse pressure index of the corresponding connection to be served, The ratio of connection reuse failures to the total number of connection requests. is the ratio threshold, is the average waiting time of the connection multiplexing queue, is the time threshold.

[0009] Preferably, when the connection reuse pressure index of the corresponding connection to be served is greater than 1, it indicates that the initial connection reuse upper limit of the current corresponding connection to be served is insufficient. In this case, the initial connection reuse upper limit of the corresponding connection to be served will be corrected. Otherwise, no correction will be made. The specific steps for correction include: Extracting time series sampling values of connection reuse frequency within a historical period from historical data to obtain a sampling sequence; Based on the sampling sequence, the trend of connection reuse frequency changes in the historical period is analyzed to obtain the predictive control factor. Specifically, a univariate linear regression is performed on the sampling sequence to construct a univariate linear regression model. The specific expression of the univariate linear regression model is: , where is the number of connection reuses of the i-th connection to be served within the k-th time sampling point, is the slope of the change trend of the reuse frequency of the i-th connection to be served, is the kth time sampling point, is the regression intercept of the i-th connection to be served, k is the time sampling point number, and i is the number of the connection to be served; The slope of the reuse frequency change trend is used as a predictive control factor for correcting the initial connection reuse upper limit.

[0010] Preferably, the specific steps of correction further include: Based on the predictive control factor corrected by the initial connection reuse upper limit and the connection reuse pressure index of the corresponding connection to be served, the initial connection reuse upper limit of the corresponding connection to be served is corrected to obtain the new connection reuse upper limit, specifically: ,in, is the upper limit of new connection reuse for the i-th connection to be served, is the upper limit of the initial connection reuse for the i-th connection to be served, is the connection reuse pressure index of the i-th connection to be served.

[0011] Preferably, according to the real-time monitored connection health status, if the connection response timeout rate exceeds a preset timeout threshold, and the heartbeat detection failure rate exceeds a preset failure threshold, it indicates that the current corresponding connection to be served has a risk of suspended state, triggering a suspended state result analysis mechanism; otherwise, the suspended state result is 1; Start the suspended animation result analysis mechanism to analyze the risk level of the suspended animation state of the current corresponding connection to be served, so as to calculate the suspended animation risk index of the corresponding connection to be served, specifically: , where is the pseudo-death risk index of the corresponding connection to be served, is the connection response timeout rate, is the timeout threshold, is the heartbeat detection failure rate, is the failure threshold.

[0012] Preferably, when the false alarm risk index exceeds the maximum false alarm risk index in the historical period, the current corresponding connection to be served is determined to be an inactive connection, and a feedback instruction is sent to the other end through the Zero Window notification method; When the peer end receives the feedback instruction, it removes the corresponding waiting-for-service connection from the reuse pool and stops all data sent to the corresponding waiting-for-service connection to dynamically optimize resource utilization.

[0013] Preferably, when the pseudo-death risk index of the corresponding connection to be served is greater than 1 and does not exceed the maximum pseudo-death risk index of the historical period, it indicates that the number of connection reuse failures in the current corresponding connection to be served is at risk of being distorted by pseudo-death. At this time, the upper limit of the new connection reuse of the corresponding connection to be served will be revised again. Otherwise, no revision will be made. The specific steps of the revision include: The suspended animation risk index is normalized and compressed by a nonlinear normalized compression function to obtain a compressed suspended animation risk index; Calculate the corrected upper limit of connection reuse, specifically: ,in, The upper limit of connection reuse after correction, is the risk index of suspended animation after compression; The revised connection reuse upper limit is used as a further revision result of the new connection reuse upper limit in the corresponding connection to be serviced, and is applied to the operating system.

[0014] A high-concurrency communication service platform, including a collection module, an initialization module and a correction module; The acquisition module is used to determine the connections to be serviced in the kernel-level network protocol stack of the operating system, obtain the running status data of the connections to be serviced, and generate the running data set after preprocessing; The initial setting module is used to evaluate the resource consumption of each waiting service connection on each resource during each reuse based on the running data set, and obtain the initial connection reuse limit of the corresponding waiting service connection; The correction module is used to extract features from the running data set, determine the start of the stress result analysis mechanism and the fake death result analysis mechanism, and generate stress results and fake death results. The stress result is used to correct the initial connection reuse upper limit of the corresponding connection to be served, and the fake death result is used to correct the initial connection reuse upper limit of the corresponding connection to be served again for application to the operating system.

[0015] The present invention provides a high-concurrency communication service platform and method, which has the following beneficial effects: (1) By real-time collection and standardized processing of the CPU time consumption, memory usage, bandwidth usage and other operating status data of each TCP connection during the reuse process, an operating data set is formed to achieve resource consumption modeling and load quantification at the connection level. Furthermore, the method introduces a connection reuse pressure result analysis mechanism and a pseudo-death result analysis mechanism. During the service operation process, it dynamically determines whether the connection has resource scheduling tension or state drift anomaly, thereby achieving a phased correction of the connection reuse upper limit, avoiding problems such as connection queuing, resource waste or pseudo-death connection blocking caused by improper reuse upper limit setting. By introducing the historical reuse frequency change trend for predictive regulation, the reuse upper limit setting has adaptive capabilities. At the same time, the connection response timeout rate and heartbeat failure rate are used to construct a pseudo-death risk index to achieve the identification of potential pseudo-death connections and the upper limit suppression strategy, and the feedback is sent to the other end through the Zero Window method, eliminating inefficient connection channels at the system level and releasing scheduling resource space. Ultimately, this method can effectively improve the intelligence level and resource utilization efficiency of connection reuse scheduling in high-concurrency scenarios, reduce the connection failure rate and the probability of system false response, and improve the stability and throughput of the overall communication service.

[0016] (2) By continuously monitoring the dynamic operating status of each connection to be served during the operation of the communication service, a connection reuse pressure index is constructed, and based on the index, the load intensity and resource matching degree of the current connection reuse scheduling are judged, thereby realizing intelligent correction of the initial connection reuse upper limit. Compared with the traditional reuse mechanism that adopts a fixed reuse threshold or static experience configuration method, this method automatically activates the pressure result analysis mechanism when detecting that the number of connection reuse failures and the waiting time of the reuse queue exceed the preset threshold, objectively assessing whether the connection resource allocation is in a tense or unbalanced state, thereby avoiding abnormalities such as resource overload or connection blocking. By introducing a univariate linear regression modeling method, the connection reuse frequency in the historical period is trend analyzed. Based on the behavioral characteristics of the time series, the present invention can accurately extract the dynamic growth or decline trend of the connection reuse behavior. This trend not only reflects the growth rate of the connection reuse demand, but also can dynamically adapt to the reuse strategy adjustment under burst traffic, nonlinear growth or decline, and enhance the system's elastic response capability in high concurrency scenarios. Finally, by combining the reuse frequency trend control factor with the connection reuse pressure index, a comprehensive correction value for the initial reuse upper limit is formed, which realizes the intelligent improvement of connection reuse capacity under high-pressure resource scheduling conditions. It not only ensures the continuity of connection reuse services, but also avoids problems such as service delays, queue expansion and soaring failure rates caused by insufficient upper limits, thereby improving the throughput and stability of the overall system.

[0017] (3) By monitoring the health status of the connection in real time and building a pseudo-death risk assessment mechanism based on the connection behavior pattern, it can effectively identify potential pseudo-death connections and quantify the inactivation trend of the current connection, with high sensitivity and dynamic adaptability. When the pseudo-death risk index exceeds the historical maximum level, the system can immediately determine that the connection is an inactive connection and quickly send feedback instructions to the other end through the Zero Window notification method in the standard network mechanism. Without building an additional control protocol, cross-host connection termination coordination can be achieved. This method not only reduces development complexity and system overhead, but also achieves the unity of protocol compatibility and deployment flexibility. After the other end receives the Zero Window feedback, it immediately removes the corresponding inactive connection from the reuse pool it maintains and terminates data transmission for the connection, avoiding the waste of system resources on unresponsive connections, thereby realizing the recycling and redistribution of connection resources. This mechanism not only reduces the risk of resource suspension and blocking caused by pseudo-death of the connection, but also significantly improves the dynamic activity of the reuse pool, ensuring more efficient and accurate resource scheduling in high-concurrency scenarios, thereby enhancing the system's availability, load resistance and service continuity.

[0018] (4) The present invention introduces a nonlinear normalized compression function to suppress the connection state in the critical interval of pseudo-death risk (pseudo-death risk index greater than 1 but not exceeding the historical maximum value). It can dynamically reduce the connection reuse limit without immediately eliminating the connection, thereby effectively suppressing the distortion interference of potential pseudo-death risk on resource scheduling accuracy. This mechanism is particularly suitable for processing connections in the early stage of pseudo-death and with strong uncertainty in state drift, and can prevent minor anomalies from being misjudged as completely inactive and excessively eliminated. The present invention designs a flexible control path, that is, by applying nonlinear compression to the pseudo-death risk index, obtaining the compressed risk value, and using it as the reuse limit adjustment factor to generate a more precise control capability after the revised connection reuse limit, thereby achieving dynamic decreasing adjustment of reuse capacity. This mechanism not only retains the evaluation space of connection activity, but also corrects the high setting of the previous round of reuse limit. In addition, when the pseudo-death risk index exceeds the historical peak, the system can decisively determine that the connection is in a substantially inactive state and promptly eliminate it, reflecting the system's hierarchical response capability during the evolution of the connection state. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is a flow chart of a high-concurrency communication service method of the present invention; Figure 2 This is a high-concurrency communication service method logic of the present invention; Figure 3 A diagram showing a change trend of connection reuse frequency in a high-concurrency communication service method according to the present invention; Figure 4 This is a block diagram of a high-concurrency communication service platform of the present invention. DETAILED DESCRIPTION

[0020] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention. Example

[0021] See also Figures 1 to 3 The present invention provides a high-concurrency communication service method, comprising the following steps: Determine the connections to be serviced in the kernel-level network protocol stack of the operating system, obtain the running status data of the connections to be serviced, and generate a running data set after preprocessing; The network protocol stack in the operating system is a software module responsible for processing network communication protocols. It is mainly located in the kernel state of the operating system. It is responsible for processing from the bottom layer: receiving and sending messages; parsing of protocols such as IP, TCP, UDP, ARP, ICMP; port management and TCP state machine maintenance; establishing and closing connections (such as TCP three-way handshake and four-way handshake); route lookup and data packet forwarding.

[0022] Based on the running data set, evaluate the resource consumption of each resource by each connection to be served during each reuse, and obtain the initial connection reuse limit of the corresponding connection to be served; Feature extraction is performed on the running data set to determine the activation of the stress result analysis mechanism and the suspended animation result analysis mechanism to generate stress results and suspended animation results. The stress result is used to correct the initial connection reuse upper limit of the corresponding connection to be served, and the suspended animation result is used to correct the initial connection reuse upper limit of the corresponding connection to be served again for application to the operating system.

[0023] In this embodiment, by establishing a running status perception and reuse behavior regulation mechanism for the connections to be serviced in the kernel-level network protocol stack of the operating system, the system's connection scheduling efficiency and connection activity identification capabilities in high-concurrency scenarios can be effectively improved, thereby achieving accurate dynamic setting of the connection reuse upper limit and significant optimization of system resource utilization.

[0024] This method uses three logical links: operating status data drive, resource consumption assessment and risk perception analysis, so that connection reuse behavior no longer relies on fixed thresholds or static parameter settings, and truly realizes intelligent reuse control and dynamic response at the connection level.

[0025] By performing a fine-grained assessment of resource consumption, such as CPU time, memory usage, and bandwidth usage, for each connection to be served during each reuse process, a personalized reuse limit can be set for different connections based on the actual operating load, avoiding resource waste and bottleneck problems caused by a unified reuse threshold.

[0026] With the help of the pressure result analysis mechanism, the reuse failure rate and queuing delay are monitored in real time, and the connection reuse pressure index is constructed, and the reuse upper limit is dynamically adjusted. This can effectively avoid systemic anomalies such as connection blocking and task accumulation caused by tight scheduling resources during the reuse process.

[0027] Through the combined analysis of heartbeat detection failure rate and response timeout rate, we can identify connections that may be in a suspended state, build a suspended state risk index, and further modify the reuse strategy of the connection to prevent suspended connections from continuously occupying reuse pool resources and affecting the overall service quality.

[0028] Taking a large online e-commerce platform as an example, when the system faces millions of concurrent client accesses during a flash sale, if the traditional static connection upper limit model is adopted, the system needs to reserve a large amount of redundant resources to prevent congestion. After adopting the method described in the present invention, the high-concurrency communication module in the platform background can identify the reuse behavior and resource occupancy status of each TCP connection in real time, dynamically set the number of reuses that each connection can withstand, and the system determines whether to increase the connection capacity based on the pressure index; if some connections have a response lag or heartbeat interruption, a false death assessment is immediately performed and an interrupt command is sent to the other end to eliminate them, thereby ensuring that requests from active users are processed first, improving the overall business response speed and system pressure resistance. Example

[0029] Please refer to Figures 1 to 3 Specifically: in the operating system kernel-level network protocol stack, according to the protocol and business communication behavior carried by each TCP connection, determine whether each TCP connection in the operating system kernel-level network protocol stack is included in the reuse pool, establish a connection reuse mechanism for the corresponding TCP connection, and count the total number of TCP connections included in the reuse pool, and mark the TCP connections included in the reuse pool as connections to be served; The connection to be served is used to set the upper limit of connection reuse for subsequent corresponding TCP connections; Among them, the protocol carried by each TCP connection refers to the application layer protocol or business communication protocol carried by the TCP connection. TCP is a "transport layer protocol" and it itself does not know "what to transmit". What really defines "how to use this TCP channel" is the upper-layer protocol, such as HTTP, WebSocket, gRPC, FTP, MQTT, etc.

[0030] Business communication behavior refers to whether interactions are frequent. This can be determined through heartbeat behavior. Heartbeat behavior is a small "live detection packet" or "state synchronization packet" periodically sent by the client or server to maintain the active state of the connection or detect the liveness of the other party. It is used to determine whether there are subsequent interaction plans and whether the connection needs to be kept alive. A reuse pool refers to a set of established, unclosed, and reusable TCP connections in the system, which are uniformly managed and allocated by the connection scheduler to support the subsequent distribution of reuse requests. In other words, it is a resource pool whose members are active TCP connections that support the reuse protocol.

[0031] The connection reuse limit refers to the maximum number of logical sessions or request tasks allowed to be reused concurrently in the same TCP connection.

[0032] The connection multiplexing mechanism allows multiple data requests or responses to be completed within the same network connection channel, eliminating the need to re-establish a connection each time. This reduces system resource overhead and improves communication efficiency and response speed. However, it should be noted that while connection multiplexing improves performance, unlimited multiplexing can easily lead to problems, including: Long-term use of persistent connections may lead to memory leaks, packet disorder, and residual status. All requests are placed on one connection, and disconnection will interrupt all tasks; Excessive reuse prevents the load balancing algorithm from rescheduling requests; DDoS attackers can use the reuse mechanism to continuously occupy connection resources; Therefore, in the process of high-concurrency communication services, it is necessary to set a connection reuse limit for the corresponding TCP connection.

[0033] A TCP connection is a logical channel established between two terminals, such as a client and a server, for reliable data transmission. It is created by a three-way handshake and closed by a four-way handshake. Simply put, one party (client or server) has been disconnected or abnormally stuck, but the other party is unaware of it and continues to send data, resulting in response timeouts, data not being sent back, and processing suspension.

[0034] TCP connections can be used as carriers or base channels for connection multiplexing mechanisms. Connection multiplexing mechanisms multiplex multiple logical requests, tasks, or sessions on a single TCP connection.

[0035] After the high-concurrency communication service is started, real-time statistics are collected on the running status of the service connection, including the CPU time, memory usage, bandwidth usage, waiting time distribution of the connection reuse queue, number of connection reuse successes and failures, connection reuse frequency, and connection health status of the corresponding service connection during each reuse. The connection health status includes the connection response timeout rate and heartbeat detection failure rate. The operating status data are preprocessed to remove duplicate values, outliers and normalize them. The operating status data are standardized using dimensionless processing technology to eliminate the dimensional differences between different parameters and generate an operating data set.

[0036] For example, when a parameter has an instantaneous extremely high value and the fluctuation with the previous and next data exceeds 3 times the standard deviation of the normal range, it is judged as an outlier and eliminated, and the weighted average of the adjacent data is used to fill the gap. The weighting here is based on the proximity of the time series, and the closer the distance, the higher the weight.

[0037] The connection heartbeat detection periodically sends a probe packet to a single connection. If no response is received within the specified time, it is recorded as a heartbeat detection failure for the connection.

[0038] Normalization through min-max normalization maps features to the range of 0 to 1. After normalization, each feature contributes more evenly to the result, ensuring the normal operation of the algorithm. Based on the running data set, evaluate the resource consumption of each resource for each connection to be served during each reuse to obtain the average resource consumption of different resource dimensions, including average CPU time consumption, average memory usage consumption, and average bandwidth usage consumption. Specifically: The average CPU time consumed by each connection to be served in each reuse is calculated based on the CPU time consumed by each connection to be served and the number of reuses. The specific calculation method is: summing the CPU time consumed by each reuse according to the number of reuses, and averaging the summed results to obtain the average CPU time consumed by each reuse; The average memory consumption of each connection to be served in each reuse is calculated by the memory usage of each connection to be served in each reuse and the number of reuses. The specific calculation method is: summing the memory usage of each reuse according to the number of reuses, and averaging the summed results to obtain the average memory consumption of each reuse; The average bandwidth consumption of each connection to be served in each reuse is calculated based on the bandwidth occupied by each connection to be served and the number of reuses. The specific calculation method is: summing the bandwidth occupied by each reuse according to the number of reuses, and calculating the average value of the summed results to obtain the average bandwidth consumption of each reuse; Based on the average resource consumption and consumption threshold of each connection to be served in different resource dimensions, analyze the theoretical connection reuse times of each connection to be served in different resource dimensions to obtain a resource reuse set, where the resource reuse set includes the theoretical maximum connection reuse times of each connection to be served in the CPU resource dimension, the theoretical maximum connection reuse times in the memory resource dimension, and the theoretical maximum connection reuse times in the bandwidth resource dimension; The theoretical maximum number of connection reuses in different resource dimensions is obtained by calculating the ratio of the upper limit of the consumption threshold allowed by the system for the corresponding connection to the average resource consumption in the corresponding resource dimension. Specifically: The theoretical maximum number of connection reuses of the corresponding waiting service connection in the CPU resource dimension is calculated by the ratio between the upper limit of the total CPU consumption of the corresponding waiting service connection allowed by the system and its average CPU consumption; The theoretical maximum number of connection reuses in the memory resource dimension is calculated by the ratio between the total memory usage limit allowed by the system for the corresponding service connection and its average memory usage. The theoretical maximum number of connection reuses in terms of bandwidth resources is calculated by the ratio between the total bandwidth upper limit allowed by the system for the corresponding service connection and its average bandwidth usage. The minimum value of the theoretical maximum number of connection reuses is extracted from the resource reuse set as the initial connection reuse upper limit for the corresponding connection to be served.

[0039] In this embodiment, this method can perform multi-dimensional operational status awareness, resource consumption assessment, and dynamic reuse capacity modeling for multiple TCP connections based on the operating system kernel-level network protocol stack. By rationally constructing a reuse pool, this method effectively identifies connections with reuse value in high-concurrency scenarios and uniformly marks them as connections to be serviced, thereby improving the controllability and granularity of the system's connection scheduling.

[0040] By collecting key operational parameters of each connection being serviced during each reuse, such as CPU time, memory usage, bandwidth usage, connection reuse frequency, and connection health (including connection response timeout rate and heartbeat failure rate), the system resource pressure distribution of each reused connection can be effectively quantified. For example, if a connection consumes up to 400ms of CPU time per reuse, significantly higher than the 200ms average for other connections, this connection will show high CPU pressure in resource analysis. The collected status dataset is then preprocessed, including outlier removal, standard deviation limit determination, weighted smoothing padding, and dimensionless normalization, to ensure good temporal and feature consistency of the input data. For example, if a connection's instantaneous memory usage during peak hours reaches 1.2GB, far exceeding the 400MB average during stable periods, preprocessing can identify this as an outlier and remediate it using the 3σ method, thus preventing single-point anomalies from interfering with subsequent computational logic.

[0041] During the resource evaluation phase, the system calculates the average consumption value of a single connection by resource dimension, and combines it with the total resource threshold allowed by the system to deduce the maximum number of reuses that each connection can support under current resource conditions. For example, if a connection occupies an average of 80MB of memory in each reuse, and the maximum memory threshold allocated by the system for the connection is 800MB, then its theoretical maximum number of connection reuses in the memory dimension is 800 / 80=10 times. Finally, the minimum value is extracted from the reuse upper limit of each resource dimension as the initial connection reuse upper limit for the current connection, ensuring that the connection reuse behavior operates within the resource security boundary and preventing single-point connection anomalies from dragging down the overall system scheduling.

[0042] In short, this solution constitutes a stable, adaptive, and fine-grained closed loop for connection reuse parameter control. Its advantages are to avoid resource misjudgment under the traditional average experience value mode and support dynamic regulation at the connection level; enhance the scheduling robustness of the system in the face of sudden high concurrent traffic; reduce resource waste caused by pseudo-dead connections, improve reuse efficiency and communication service quality; and realize the whole process data-driven connection reuse upper limit control mechanism through quantitative indicators such as reuse frequency, waiting time and resource usage ratio. For example, in a live video system, a large number of clients establish TCP connections with servers to pull media streams. The method of the present invention can evaluate the reuse potential of each client connection in real time. If some connections show low resource occupancy and high stability in multiple reuses, the system can automatically increase its reuse upper limit; and for connections with large fluctuations in connection response and frequent heartbeat failures, their reuse frequency is promptly limited or they are removed from the reuse pool to ensure the rational allocation of overall bandwidth resources and prevent the problem of bandwidth "starvation". Example

[0043] Please refer to Figures 1 to 3 ,Specifically: during the operation of the communication service, the ,operational status data of each connection to be served is continuously monitored, and the ,number of connection reuse failures and the average waiting time of the ,connection reuse queue are extracted; If the ratio of connection reuse failures to total connection requests exceeds the preset ratio threshold, and the average waiting time in the connection reuse queue exceeds the preset time threshold, it indicates that there is an abnormal risk in resource scheduling for the corresponding connection to be served in the current connection reuse state, triggering the pressure result analysis mechanism. Otherwise, the pressure result is 1; The connection reuse queue is one of the core components of the connection reuse mechanism. It is mainly used to manage idle connections waiting for reuse and coordinate the release and reallocation of connections. Its essence is a data buffer structure, which functions similarly to the task queue in the thread pool, but the operation object is the established TCP connection instead of the thread.

[0044] The average waiting time in the connection reuse queue is a key indicator for measuring the efficiency of the connection reuse mechanism, reflecting the average time it takes for an idle connection to be queued and reused.

[0045] Start the pressure result analysis mechanism to analyze the resource scheduling tension of the corresponding connection to be served under the current connection reuse state, so as to calculate the connection reuse pressure index of the corresponding connection to be served, specifically: , where is the connection reuse pressure index of the corresponding connection to be served, The ratio of connection reuse failures to the total number of connection requests. is the ratio threshold, is the average waiting time of the connection multiplexing queue, is the time threshold, The calculated value is the proportion of the connection reuse failure rate exceeding the threshold, which reflects the degree of pressure increase caused by the increase in failure rate; This function calculates the percentage of the average waiting time in the connection reuse queue that exceeds the maximum allowed waiting time, reflecting the increased pressure caused by excessive waiting time.

[0046] A pressure result of 1 means that the connection reuse pressure index of the corresponding connection to be served is equal to 1.

[0047] The connection reuse pressure index is a dynamic quantitative indicator used to measure whether the system's resource scheduling is in a tight, high-load, or conflicting state under the current connection reuse state. It reflects the scheduling pressure and resource load distortion borne by the connection reuse mechanism. The characteristics involved in its calculation are dimensionless. When the connection reuse pressure index of the corresponding connection to be served is greater than 1, it means that the initial connection reuse upper limit of the current corresponding connection to be served is insufficient and the reuse scheduling is tight. At this time, the initial connection reuse upper limit of the corresponding connection to be served will be adjusted, otherwise no correction will be made; The specific steps for correction include: Extracting time series sampling values of connection reuse frequency within a historical period from historical data to obtain a sampling sequence; Based on the sampling sequence, the trend of connection reuse frequency changes in the historical period is analyzed to obtain the predictive control factor. Specifically, a univariate linear regression is performed on the sampling sequence to construct a univariate linear regression model. The specific expression of the univariate linear regression model is: , perform the least squares linear fitting on the univariate time series to obtain the slope of the change trend of the reuse frequency of the corresponding connection to be served; Where, is the number of connection reuses of the i-th connection to be served within the k-th time sampling point, is the slope of the change trend of the reuse frequency of the i-th connection to be served, is the kth time sampling point, is the regression intercept of the i-th connection to be served, k is the time sampling point number, and i is the number of the connection to be served; Among them, the regression intercept is used to assist in fitting the curve and is not directly used for decision-making. Here, it is not the "real number of reuses" in the physical sense, but the intercept of the straight line fitted by the least squares method on the y-axis. It only constitutes a part of the regression line.

[0048] Univariate linear regression is one of the most basic and common machine learning and statistical modeling methods. Its core purpose is to find the linear relationship between an independent variable x and a dependent variable y based on historical data, and to approximate the relationship with a straight line.

[0049] The slope of the reuse frequency change trend is used as a predictive control factor for correcting the initial connection reuse upper limit.

[0050] The purpose of analyzing the changing trend of connection reuse frequency in the historical period to derive the predictive control factor is to predict whether the system will enter a higher load state in the future.

[0051] Connection reuse frequency refers to the trend change in the number of reuses per unit time for each TCP connection over the past period of time. The slope of the reuse frequency change trend can reflect the possible future load trend of the current connection. Combined with the current reuse pressure index, it jointly determines the reuse upper limit adjustment strategy for the connection, achieving elastic regulation and trend adaptation capabilities at the connection granularity.

[0052] When the predictive control factor is greater than 0, it means that the connection reuse frequency is increasing and the reuse upper limit can be appropriately increased. When it is equal to 0, the reuse frequency is stable and the existing upper limit will be maintained. When it is less than 0, the usage frequency is decreasing and the reuse resources can be appropriately compressed.

[0053] No correction processing in this step means that when the pressure result output is 1, no correction of the reuse upper limit operation is performed; Specifically, the specific expression of the sampling sequence is , where n is the sliding window length, k is the time sampling point number, is the kth time sampling point, is the number of connection reuses of the i-th connection to be served at the k-th time sampling point, where i is the number of the connection to be served.

[0054] The specific steps for correction also include: Based on the predictive control factor corrected by the initial connection reuse upper limit and the connection reuse pressure index of the corresponding connection to be served, the initial connection reuse upper limit of the corresponding connection to be served is corrected to obtain the new connection reuse upper limit, specifically: ,in, is the upper limit of new connection reuse for the i-th connection to be served, is the upper limit of the initial connection reuse for the i-th connection to be served, is the connection reuse pressure index of the i-th connection to be served.

[0055] In this embodiment, the present invention introduces a connection reuse pressure analysis mechanism to address the frequent connection reuse failures and long queue wait times that prevent timely reuse policy adjustments in high-concurrency communication services. By combining dynamic monitoring with historical trend modeling, the system accurately perceives and responds to the reuse status of each connection to be served during operation, thereby ensuring overall system scheduling stability and service robustness under sudden loads.

[0056] In practice, the system continuously extracts operational status data for each connection to be serviced, including the number of connection reuse failures and the average wait time in the reuse queue. When both of these metrics exceed the system's pre-set warning thresholds (e.g., failure rate > 10% and wait time > 50ms), the connection is deemed to be at reuse scheduling risk, triggering the calculation of the connection reuse pressure index. This index reflects the resource scheduling pressure faced by the connection. If its value is greater than 1, it indicates that the connection's initial reuse limit is insufficient and requires correction.

[0057] To implement a more intelligent and proactive control strategy, the system further extracts historical data on the reuse frequency of this connection over a period of time, such as the number of reuses per minute: [12, 15, 17, 20, 25]. Using a univariate linear regression model, the system fits the trend of increasing reuse frequency over time, and a positive slope indicates a significant increase in the load on the connection.

[0058] At this time, the slope is used as a predictive control factor and introduced into the correction calculation of the reuse upper limit. The logical relationship is that the greater the pressure, the more insufficient the current setting, so the reuse upper limit needs to be raised. The higher the activity (that is, the slope), the more likely the subsequent interaction frequency will increase, and more reuse resources should be reserved. Combining the two, the new upper limit is predictively enhanced to adapt to load changes in advance.

[0059] For example, if the initial upper limit of a connection is 10, the pressure index is 1.2, and the historical slope is 0.25, then: the new connection reuse upper limit = 10*1.2*(1+0.25)=15; this indicates that the system will increase the original reuse upper limit from 10 to 15 to better cope with the upcoming reuse peak and reduce queuing delays and failure probabilities.

[0060] In summary, this solution, based on real-time pressure identification and historical trend modeling, achieves flexible regulation and predictive optimization of the connection reuse upper limit without interrupting services. Through this mechanism, it not only improves the agility of connection scheduling, but also effectively avoids resource waste and system performance degradation caused by reuse failures, providing scalable and adaptable service guarantee capabilities in high-concurrency environments. Example

[0061] Please refer to Figures 1 to 3 Specifically: According to the real-time monitored connection health status, if the connection response timeout rate exceeds the preset timeout threshold, and the heartbeat detection failure rate exceeds the preset failure threshold, it indicates that the current corresponding service connection has a risk of suspended state, triggering the suspended state result analysis mechanism, otherwise the suspended state result is 1; The suspended state refers to a situation in which one of the two communicating parties in a connection reuse scenario is no longer functioning properly, but the connection remains intact from the network perspective. This causes the other party to mistakenly believe that the connection is functioning properly, leading to state drift, data retention, and abnormal system responses. This state is typically manifested in the system as follows: The client continues to send data to a server that has been disconnected; The server has already crashed, is abnormally blocked, or the thread has failed but the connection resources have not been released; The connection still occupies a place in the reuse pool; The application layer does not see the disconnection notification, but instead finds exceptions such as response timeout, data not returned, and processing hangs.

[0062] It should be noted that the suspended state will seriously affect the upper limit control mechanism of connection reuse, and even directly cause the upper limit control to fail or be distorted. If a new task is scheduled to the suspended connection, the task cannot receive a timely response, resulting in the connection reuse waiting queue being lengthened and the queue being seriously blocked. The upper limit control logic may mistakenly judge that "the upper limit needs to be increased" due to "too many waiting timeouts", further worsening the situation; and the reuse of the suspended connection may cause a heartbeat detection failure. If the suspended connection is not taken into account, the reuse upper limit will be excessively increased, causing the upper limit control to fail or be distorted.

[0063] Start the suspended animation result analysis mechanism to analyze the risk level of the suspended animation state of the current corresponding connection to be served, so as to calculate the suspended animation risk index of the corresponding connection to be served, specifically: , where is the pseudo-death risk index of the corresponding connection to be served, is the connection response timeout rate, is the timeout threshold, is the heartbeat detection failure rate, is the failure threshold, The calculated percentage of timeouts exceeding the preset timeout threshold reflects the increased risk of system failure due to an increase in timeouts. A timeout may indicate that a request has not been responded to for an extended period of time, signaling a system problem. The greater the threshold, the greater the risk of system failure. This value calculates the proportion of heartbeat failure rates that exceed the failure rate threshold. The heartbeat mechanism is used to detect the survival status of connections or components between systems. An excessively high heartbeat failure rate suggests serious problems with internal system communications. This indicator reflects the increased risk of pseudo-death caused by an increase in heartbeat failures.

[0064] A false death result of 1 means that the false death risk index of the corresponding connection to be served is equal to 1.

[0065] When the false alarm risk index exceeds the maximum false alarm risk index in the historical period, the current corresponding connection to be served is determined to be an inactive connection, and a feedback instruction is sent to the other end through the Zero Window notification method; The suspended animation risk index assesses the risk level of the system in suspended animation so that appropriate measures can be taken to prevent the system from falling into suspended animation. The features involved in its calculation are dimensionless. Zero Window Notification (Zero Window) is a stateful mechanism in the TCP protocol whereby the receiver notifies the sender that "I cannot currently receive any more data." Essentially, the receiver sets the receive window size (Window Size) to 0 in the window field of the TCP message, telling the sender to suspend data transmission.

[0066] When the other end receives the feedback instruction, it removes the corresponding waiting-for-service connection from the reuse pool and stops all data sent to the corresponding waiting-for-service connection to dynamically optimize resource utilization and avoid connections that continue to occupy resources in the reuse pool but cannot respond to scheduling tasks from being removed in time.

[0067] The feedback instructions include I am currently unable to receive more data.

[0068] In this embodiment, the present invention realizes effective perception and dynamic release of resource occupancy anomalies caused by connection state drift or server inactivation in high-concurrency communication services by constructing a linkage mechanism for identifying and eliminating suspended state.

[0069] By real-time monitoring of the connection response timeout rate and heartbeat detection failure rate, the system can quickly capture abnormal states where the connection has no feedback for a long time or does not respond as expected. Once it exceeds the set threshold, it triggers the false alarm result analysis mechanism, calculates the false alarm risk index, and determines whether the connection has a high probability of inactivation.

[0070] For example, in actual operation, if a TCP connection fails to respond to the detection packet for 10 seconds and the historical response timeout rate is higher than 70%, far exceeding the 30% threshold set by the system, the system will immediately identify it as a candidate for a pseudo-death connection. If its corresponding pseudo-death risk index exceeds the historical maximum risk value (that is, the most dangerous connection state recorded by the system), the connection is deemed to be an inactive connection. At this time, the system sends a feedback instruction "I cannot currently receive more data" to the other end through the Zero Window notification mechanism, thereby guiding the other end to terminate all data transmission tasks of the connection. The logical process is specifically divided into the following steps: anomaly identification, real-time collection of the connection's response timeout rate and heartbeat failure rate. If both exceed the preset threshold at the same time, the pseudo-death risk calculation is triggered. The pseudo-death risk assessment obtains the pseudo-death risk index, which reflects the drift intensity of the connection under the two types of failure behaviors; historical comparison judgment: if the current pseudo-death risk index > the historical maximum risk value, it means that the connection state continues to deteriorate and enters the substantial inactivation stage; connection elimination: the system uses Zero The Window notification mechanism sends an interrupt instruction to the other end, which then removes the connection from the reuse pool, releasing its position in the connection table and scheduling resources.

[0071] Through the above mechanism, the present invention solves key problems in high-concurrency systems, such as the difficulty in releasing suspended connections in a timely manner, resources being occupied for a long time, and scheduling queue expansion. It achieves dynamic compression of system load and precise resource recovery, and enhances the adaptive control capability of the connection reuse strategy to abnormal states, thereby further improving the robustness and resource utilization efficiency of the overall communication service. Example

[0072] Please refer to Figures 1 to 3 Specifically: when the corresponding pending service connection's false death risk index is greater than 1 and does not exceed the maximum false death risk index in the historical period, it indicates that the number of connection reuse failures in the current corresponding pending service connection is at risk of being distorted by false connection. At this time, the new connection reuse limit of the corresponding pending service connection will be adjusted again. Otherwise, no correction will be made. Specifically, connection failures can distort the statistics of connection failures. This is manifested as follows: These connections are often repeatedly scheduled for reuse, but each time fail due to no response or timeout. The system counts these as "connection failures." However, these failures are not due to normal task reuse failures, but rather to the connection itself being unavailable. Essentially, these are connection failures rather than task reuse failures. Therefore, the reuse limit for these connections should be appropriately lowered to avoid resource waste and scheduling misjudgments. The specific steps for correction include: The suspended animation risk index is normalized and compressed by a nonlinear normalized compression function to obtain a compressed suspended animation risk index; The functional form of the nonlinear normalized compression function is: ,in, is the compressed parameter, and x is the parameter; the nonlinear normalized compression function is used to control the weight of its influence on the final decision result from being overly amplified, avoiding uncontrolled penalties or explosive compression in the calculation; Calculate the corrected upper limit of connection reuse, specifically: ,in, The upper limit of connection reuse after correction, is the risk index of suspended animation after compression; The reuse limit of each connection is suppressed by the pseudo-death risk index. That is, the higher the risk, the lower the reuse limit; the lower the risk, the reuse limit returns to its original value.

[0073] The revised connection reuse upper limit is used as a further revision result of the new connection reuse upper limit in the corresponding connection to be serviced, and is applied to the operating system.

[0074] The "no correction processing" in this step means that when the false death result output is 1, no correction of the reuse upper limit operation is performed; Of course, when the false death risk index exceeds the maximum false death risk index in the historical period, it also indicates that the number of connection reuse failures in the current corresponding connection to be served is at risk of being distorted by false death. However, at this time, we will no longer focus on the degree of distortion risk, but on whether the current connection to be served will be eliminated.

[0075] In this embodiment, the present invention introduces a distortion correction mechanism for the false death risk index. In the critical state where the false death risk index exceeds the normal threshold but has not yet reached the historical maximum value, it does not directly perform connection elimination processing, but instead performs inhibitory adjustment on the connection reuse upper limit in a more flexible and gradual manner, which has strong dynamic adaptability and risk mitigation capabilities.

[0076] This mechanism effectively prevents premature reclaim of connection resources due to misjudgments or transient anomalies, ensuring service continuity and stable resource allocation. Its logical steps are intertwined in a progressive manner. The trigger condition is: When a connection's pseudo-death risk index exceeds 1 but does not exceed the historical maximum risk threshold, indicating that the connection's behavior, while showing an abnormal trend, has not yet reached the deactivation threshold, the system determines it is in a distortion risk state, indicating that the connection may be experiencing performance distortion or scheduling misdirection caused by pseudo-death. Normalization and compression processing: A nonlinear normalization and compression function is introduced to form a control factor with a suppressive effect, eliminating errors caused by direct comparisons of risk indices between different connections due to different risk index distributions, ensuring stable and smooth control results. Reuse limit suppression and correction: The compressed index is applied as a scaling factor to the previously corrected reuse limit for new connections to calculate the current revised limit. This achieves gentle compression of the limit, avoiding direct zeroing or falsely killing connections, allowing connections to retain a certain active window and continue attempting recovery, thus balancing risk control and service fault tolerance.

[0077] Through this mechanism, on the one hand, without immediately removing the connection, its reuse participation can be gradually weakened to ensure the health of resource scheduling; on the other hand, an observation window is left for false positives or temporary anomalies, implementing a mild strategy of punishment without blocking, ultimately improving the system's adaptive control capabilities, connection stability and risk tolerance in complex and high-concurrency environments, while ensuring the fairness and high availability of resource allocation. Example

[0078] Please refer to Figure 4 ,Specifically: A high-concurrency communication service platform includes a collection module, an initial ,setting module and a correction module; The acquisition module is used to determine the connections to be serviced in the kernel-level network protocol stack of the operating system, obtain the running status data of the connections to be serviced, and generate the running data set after preprocessing; The initial setting module is used to evaluate the resource consumption of each waiting service connection on each resource during each reuse based on the running data set, and obtain the initial connection reuse limit of the corresponding waiting service connection; The correction module is used to extract features from the running data set, determine the start of the stress result analysis mechanism and the fake death result analysis mechanism, and generate stress results and fake death results. The stress result is used to correct the initial connection reuse upper limit of the corresponding connection to be served, and the fake death result is used to correct the initial connection reuse upper limit of the corresponding connection to be served again for application to the operating system.

[0079] The thresholds involved in the above embodiments can be obtained by calculation using historical data, and can be specifically determined using the mean ± standard deviation principle.

[0080] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A high-concurrency communication service method, characterized by: The following steps are included: Determine the connections to be serviced in the kernel-level network protocol stack of the operating system, obtain the running status data of the connections to be serviced, and generate a running data set after preprocessing; Based on the running data set, evaluate the resource consumption of each resource by each connection to be served during each reuse, and obtain the initial connection reuse limit of the corresponding connection to be served; Feature extraction is performed on the running data set to determine the activation of the stress result analysis mechanism and the suspended animation result analysis mechanism to generate stress results and suspended animation results. The stress result is used to correct the initial connection reuse upper limit of the corresponding connection to be served, and the suspended animation result is used to correct the initial connection reuse upper limit of the corresponding connection to be served again for application to the operating system.

2. A high-concurrency communication service method according to claim 1, characterized in that: In the operating system kernel-level network protocol stack, based on the protocol and business communication behavior carried by each TCP connection, determine whether each TCP connection in the operating system kernel-level network protocol stack should be included in the reuse pool, establish a connection reuse mechanism for the corresponding TCP connection, and count the total number of TCP connections included in the reuse pool, and mark the TCP connections included in the reuse pool as connections to be served; After the high-concurrency communication service is started, real-time statistics are collected on the running status of the service connection, including the CPU time, memory usage, bandwidth usage, waiting time distribution of the connection reuse queue, number of connection reuse successes and failures, connection reuse frequency, and connection health status of the corresponding service connection during each reuse. The connection health status includes the connection response timeout rate and heartbeat detection failure rate. The operating status data are preprocessed to remove duplicate values, outliers and normalize them. The operating status data are standardized using dimensionless processing technology to eliminate the dimensional differences between different parameters and generate an operating data set.

3. A high-concurrency communication service method according to claim 2, characterized in that: Based on the running data set, evaluate the resource consumption of each resource for each connection to be served during each reuse to obtain the average resource consumption of different resource dimensions, including average CPU time consumption, average memory usage consumption, and average bandwidth usage consumption. Specifically: The average CPU time consumed by each connection to be served in each reuse is calculated based on the CPU time consumed by each connection to be served and the number of reuses. The average memory consumption of each connection to be served in each reuse is calculated by the memory usage and reuse times of each connection to be served in each reuse; The average bandwidth consumption of each connection to be served in each reuse is calculated by using the bandwidth occupied by each connection to be served in each reuse and the number of reuses; Based on the average resource consumption and consumption threshold of each connection to be served in different resource dimensions, analyze the theoretical connection reuse times of each connection to be served in different resource dimensions to obtain a resource reuse set, where the resource reuse set includes the theoretical maximum connection reuse times of each connection to be served in the CPU resource dimension, the theoretical maximum connection reuse times in the memory resource dimension, and the theoretical maximum connection reuse times in the bandwidth resource dimension; The minimum value of the theoretical maximum number of connection reuses is extracted from the resource reuse set as the initial connection reuse upper limit for the corresponding connection to be served.

4. A high-concurrency communication service method according to claim 3, characterized in that: During the operation of the communication service, the operation status data of each connection to be served is continuously monitored, and the number of connection reuse failures and the average waiting time of the connection reuse queue are extracted; If the ratio of connection reuse failures to total connection requests exceeds the preset ratio threshold, and the average waiting time in the connection reuse queue exceeds the preset time threshold, it indicates that there is an abnormal risk in resource scheduling for the corresponding connection to be served in the current connection reuse state, triggering the pressure result analysis mechanism. Otherwise, the pressure result is 1; Start the pressure result analysis mechanism to analyze the resource scheduling tension of the corresponding connection to be served under the current connection reuse state, so as to calculate the connection reuse pressure index of the corresponding connection to be served, specifically: , where is the connection reuse pressure index of the corresponding connection to be served, The ratio of connection reuse failures to the total number of connection requests. is the ratio threshold, is the average waiting time of the connection multiplexing queue, is the time threshold.

5. A high-concurrency communication service method according to claim 4, characterized in that: When the connection reuse pressure index of the corresponding connection to be served is greater than 1, it indicates that the initial connection reuse upper limit of the corresponding connection to be served is insufficient. In this case, the initial connection reuse upper limit of the corresponding connection to be served will be adjusted. Otherwise, no adjustment will be made. The specific steps for correction include: Extracting time series sampling values of connection reuse frequency within a historical period from historical data to obtain a sampling sequence; Based on the sampling sequence, the trend of connection reuse frequency changes in the historical period is analyzed to obtain the predictive control factor. Specifically, a univariate linear regression is performed on the sampling sequence to construct a univariate linear regression model. The specific expression of the univariate linear regression model is: , where is the number of connection reuses of the i-th connection to be served within the k-th time sampling point, is the slope of the change trend of the reuse frequency of the i-th connection to be served, is the kth time sampling point, is the regression intercept of the i-th connection to be served, k is the time sampling point number, and i is the number of the connection to be served; The slope of the reuse frequency change trend is used as a predictive control factor for correcting the initial connection reuse upper limit.

6. A high-concurrency communication service method according to claim 5, characterized in that: The specific steps for correction also include: Based on the predictive control factor corrected by the initial connection reuse upper limit and the connection reuse pressure index of the corresponding connection to be served, the initial connection reuse upper limit of the corresponding connection to be served is corrected to obtain the new connection reuse upper limit, specifically: ,in, is the upper limit of new connection reuse for the i-th connection to be served, is the upper limit of the initial connection reuse for the i-th connection to be served, is the connection reuse pressure index of the i-th connection to be served.

7. A high-concurrency communication service method according to claim 6, characterized in that: According to the real-time monitored connection health status, if the connection response timeout rate exceeds the preset timeout threshold and the heartbeat detection failure rate exceeds the preset failure threshold, it indicates that the current corresponding service connection is at risk of suspended state, triggering the suspended state result analysis mechanism. Otherwise, the suspended state result is 1; Start the suspended animation result analysis mechanism to analyze the risk level of the suspended animation state of the current corresponding connection to be served, so as to calculate the suspended animation risk index of the corresponding connection to be served, specifically: , where is the pseudo-death risk index of the corresponding connection to be served, is the connection response timeout rate, is the timeout threshold, is the heartbeat detection failure rate, is the failure threshold.

8. A high-concurrency communication service method according to claim 7, characterized in that: When the false alarm risk index exceeds the maximum false alarm risk index in the historical period, the current corresponding connection to be served is determined to be an inactive connection, and a feedback instruction is sent to the other end through the Zero Window notification method; When the peer end receives the feedback instruction, it removes the corresponding waiting-for-service connection from the reuse pool and stops all data sent to the corresponding waiting-for-service connection to dynamically optimize resource utilization.

9. A high-concurrency communication service method according to claim 8, characterized in that: When the pseudo-death risk index of the corresponding pending service connection is greater than 1 and does not exceed the maximum pseudo-death risk index in the historical period, it indicates that the number of connection reuse failures in the current corresponding pending service connection is at risk of being distorted by pseudo-death. At this time, the upper limit of the new connection reuse of the corresponding pending service connection will be adjusted again. Otherwise, no correction will be made. The specific steps of the correction include: The suspended animation risk index is normalized and compressed by a nonlinear normalized compression function to obtain a compressed suspended animation risk index; Calculate the corrected upper limit of connection reuse, specifically: ,in, The upper limit of connection reuse after correction, is the risk index of suspended animation after compression; The revised connection reuse upper limit is used as a further revision result of the new connection reuse upper limit in the corresponding connection to be serviced, and is applied to the operating system.

10. A high-concurrency communication service platform, used to implement the high-concurrency communication service method according to any one of claims 1 to 9, characterized in that: Including acquisition module, initial setting module and correction module; The acquisition module is used to determine the connections to be serviced in the kernel-level network protocol stack of the operating system, obtain the running status data of the connections to be serviced, and generate the running data set after preprocessing; The initial setting module is used to evaluate the resource consumption of each waiting service connection on each resource during each reuse based on the running data set, and obtain the initial connection reuse limit of the corresponding waiting service connection; The correction module is used to extract features from the running data set, determine the start of the stress result analysis mechanism and the fake death result analysis mechanism, and generate stress results and fake death results. The stress result is used to correct the initial connection reuse upper limit of the corresponding connection to be served, and the fake death result is used to correct the initial connection reuse upper limit of the corresponding connection to be served again for application to the operating system.

Citation Information

Patent Citations

  • Application system concurrent access control method

    CN105162866A

  • Database connection control method and apparatus

    CN105956138A

  • High-concurrency data transmission method based on http2 protocol and related equipment

    CN111343252A

  • Request state keeping method and device based on HTTP long connection pool

    CN118301201A

  • High-availability intelligent micro-service governance system and method

    CN119363798A