A network connection management method based on connection pool and related device
By dividing the hot connection pool and the cold connection pool in the network connection pool and dynamically adjusting resources, the problem of connection link closure in long connection management is solved, and the stability of network connection management is improved.
Patent Information
- Application Number
- CN202011091016.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-13
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2040-10-13
AI Technical Summary
In network services, the connection link may be closed during the long connection management process, resulting in connection failure and affecting the stability of network connection management.
Using a network connection management method based on connection pool, the connection pool is divided into a hot connection pool and a cold connection pool. The hot connection pool is used to manage active connections, and the cold connection pool is used to manage inactive connections. By dynamically adjusting resources, ensure that the connection is closed. orderly avoid unnecessary link closure.
It improves the stability of the network connection management process, avoids the situation where the connection link is closed, and ensures the intelligent management and stability of the connection resources.
Smart Images

Figure CN114422565B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a network connection management method based on a connection pool and related devices. Background Art
[0002] With the popularization and development of network technology and computers, proxy services have become a form of online application. Proxy service refers to the internal network sending a connection request to the Internet. It is necessary to develop a proxy service to send the HTTP originally transmitted directly to the web server to the proxy server. In the reverse proxy service in the cloud scenario, the reverse proxy server generally proxies different long connection requests from various terminals and various business scenarios.
[0003] Generally, the process of persistent connection management is to configure a connection pool to manage persistent connections. It is a first-in-first-out connection pool with a fixed maximum value. An idle persistent connection can enter this connection pool. When the number of connections in the connection pool reaches the maximum value, the first idle connection that enters will be squeezed out and closed, thereby ensuring the stability of the load of the connection pool.
[0004] However, during the connection selection process of the network service, the link currently required to be connected may be closed, resulting in connection failure, affecting the stability of the network connection management process. Summary of the invention
[0005] In view of this, the present application provides a network connection management method based on a connection pool, which can effectively improve the stability of the network connection management process.
[0006] The first aspect of the present application provides a network connection management method based on a connection pool, which can be applied to a system or program including a network connection management function in a terminal device, specifically comprising:
[0007] In response to a request of a target connection input into a target connection pool, obtaining usage information of the target connection, wherein the target connection pool includes a hot connection pool and a cold connection pool;
[0008] If the usage information meets the preset condition, the target connection is input into the hot connection pool to update the hot connection pool;
[0009] Resource adjustment information corresponding to the hot connection pool being updated is determined to adjust the connection resources included in the target connection pool, wherein the resource adjustment information is related to the connection resources included in the cold connection pool.
[0010] Optionally, in some possible implementations of the present application, in response to a request for a target connection to be input into a target connection pool, obtaining usage information of the target connection includes:
[0011] In response to a request for a target connection to be input into a target connection pool, obtaining a connection record of the target connection in the target connection pool;
[0012] Extract the number of reuses in the connection record:
[0013] Determine usage information of the target connection based on the number of multiplexing times.
[0014] Optionally, in some possible implementations of the present application, in response to a request for a target connection to be input into a target connection pool, obtaining usage information of the target connection includes:
[0015] In response to a request of a target connection input into a target connection pool, determining a domain name corresponding to the target connection to determine a target service;
[0016] Extracting a scenario connection parameter of the target service based on the connection indicator, where the scenario connection parameter is used to indicate usage information corresponding to the connection included in the target service;
[0017] Determine usage information of the target connection according to the scenario connection parameters.
[0018] Optionally, in some possible implementations of the present application, the extracting the scenario connection parameter of the target service based on the connection indicator includes:
[0019] Determine a service connection set corresponding to the target service based on the connection indicator;
[0020] Determine connection information of connections in the service connection set within a preset time period, wherein the connection information includes the number of connections and the connection behavior interval;
[0021] The scenario connection parameters of the target service are determined according to the connection information.
[0022] Optionally, in some possible implementations of the present application, determining the scenario connection parameter of the target service according to the connection information includes:
[0023] Determine weight information corresponding to the number of connections and the connection behavior interval;
[0024] Weighting is performed based on the weight information to determine the scenario connection parameter of the target service.
[0025] Optionally, in some possible implementations of the present application, determining the resource adjustment information corresponding to the update of the hot connection pool to adjust the connection resources included in the target connection pool includes:
[0026] Determine resource adjustment information corresponding to the hot connection pool when it is updated;
[0027] Obtaining a load value of the hot connection pool;
[0028] If the load value of the hot connection pool reaches a first preset value and the load value of the cold connection pool does not reach a second preset value, the idle resources in the cold connection pool are allocated to the hot connection pool based on the resource adjustment information to adjust the connection resources included in the target connection pool.
[0029] Optionally, in some possible implementations of the present application, the method further includes:
[0030] If the load value of the hot connection pool reaches the first preset value and the load value of the cold connection pool reaches the second preset value, closing the idle connections in the cold connection pool to generate the idle resources;
[0031] The idle resources are allocated to the hot connection pool based on the resource adjustment information, so as to adjust the connection resources included in the target connection pool.
[0032] Optionally, in some possible implementations of the present application, the method further includes:
[0033] If the usage information does not meet the preset condition, the target connection is input into the cold connection pool to update the cold connection pool.
[0034] Optionally, in some possible implementations of the present application, the method further includes:
[0035] Obtaining a load value of the cold connection pool;
[0036] If the load value reaches the second preset value, filtering out eliminated connections from the cold connection pool based on the connection duration;
[0037] The obsolete connection is deleted to update the cold connection pool.
[0038] Optionally, in some possible implementations of the present application, the method further includes:
[0039] Monitoring connection information of the target connection in the hot connection pool;
[0040] If the connection information indicates that the target connection is idle, the target connection is scheduled to the cold connection pool.
[0041] Optionally, in some possible implementations of the present application, the method further includes:
[0042] Determine a time stamp corresponding to when the target connection is input into the cold connection pool;
[0043] A closing order is configured for the target connection based on the timestamp.
[0044] Optionally, in some possible implementations of the present application, the target connection is a long connection, and the long connection is used to provide a reverse proxy service.
[0045] A second aspect of the present application provides a network connection management device, comprising: an acquisition unit, configured to acquire usage information of a target connection in response to a request of a target connection input into a target connection pool, wherein the target connection pool includes a hot connection pool and a cold connection pool;
[0046] An input unit, configured to input the target connection into the hot connection pool to update the hot connection pool if the usage information meets a preset condition;
[0047] The management unit is used to determine the resource adjustment information corresponding to the update of the hot connection pool to adjust the connection resources included in the target connection pool, wherein the resource adjustment information is related to the connection resources included in the cold connection pool.
[0048] Optionally, in some possible implementations of the present application, the acquisition unit is specifically configured to acquire a connection record of the target connection in the target connection pool in response to a request for the target connection to be input into the target connection pool;
[0049] The acquisition unit is specifically used to extract the number of multiplexing times in the connection record:
[0050] The acquisition unit is specifically configured to determine the usage information of the target connection based on the number of multiplexing times.
[0051] Optionally, in some possible implementations of the present application, the acquisition unit is specifically configured to determine a domain name corresponding to the target connection in response to a request of the target connection input into the target connection pool, so as to determine the target service;
[0052] The acquisition unit is specifically used to extract the scenario connection parameter of the target service based on the connection indicator, and the scenario connection parameter is used to indicate the usage information corresponding to the connection included in the target service;
[0053] The acquisition unit is specifically configured to determine the usage information of the target connection according to the scenario connection parameters.
[0054] Optionally, in some possible implementations of the present application, the acquisition unit is specifically configured to determine a service connection set corresponding to the target service based on the connection indicator;
[0055] The acquisition unit is specifically used to determine the connection information of the connections in the service connection set within a preset time period, wherein the connection information includes the number of connections and the connection behavior interval;
[0056] The acquisition unit is specifically configured to determine the scenario connection parameter of the target service according to the connection information.
[0057] Optionally, in some possible implementations of the present application, the acquisition unit is specifically used to determine weight information corresponding to the number of connections and the connection behavior interval;
[0058] The acquisition unit is specifically configured to perform weighting based on the weight information to determine the scenario connection parameter of the target service.
[0059] Optionally, in some possible implementations of the present application, the management unit is specifically used to determine the resource adjustment information corresponding to the update of the hot connection pool;
[0060] The management unit is specifically used to obtain the load value of the hot connection pool;
[0061] The management unit is specifically configured to allocate idle resources in the cold connection pool to the hot connection pool based on the resource adjustment information if the load value of the hot connection pool reaches a first preset value and the load value of the cold connection pool does not reach a second preset value, so as to adjust the connection resources included in the target connection pool.
[0062] Optionally, in some possible implementations of the present application, the management unit is specifically configured to close the idle connections in the cold connection pool to generate the idle resources if the load value of the hot connection pool reaches the first preset value and the load value of the cold connection pool reaches the second preset value;
[0063] The management unit is specifically configured to allocate the idle resources to the hot connection pool based on the resource adjustment information, so as to adjust the connection resources included in the target connection pool.
[0064] Optionally, in some possible implementations of the present application, the management unit is specifically configured to input the target connection into the cold connection pool to update the cold connection pool if the usage information does not meet the preset condition.
[0065] Optionally, in some possible implementations of the present application, the management unit is specifically used to obtain a load value of the cold connection pool;
[0066] The management unit is specifically configured to filter out eliminated connections from the cold connection pool based on connection duration if the load value reaches the second preset value;
[0067] The management unit is specifically used to delete the eliminated connection to update the cold connection pool.
[0068] Optionally, in some possible implementations of the present application, the management unit is specifically used to monitor the connection information of the target connection in the hot connection pool;
[0069] The management unit is specifically configured to schedule the target connection to the cold connection pool if the connection information indicates that the target connection is idle.
[0070] Optionally, in some possible implementations of the present application, the management unit is specifically used to determine a time identifier corresponding to when the target connection is input into the cold connection pool;
[0071] The management unit is specifically configured to configure a closing order for the target connection based on the time identifier.
[0072] The third aspect of the present application provides a computer device, including: a memory, a processor and a bus system; the memory is used to store program code; the processor is used to execute the network connection management method described in the first aspect or any one of the first aspects according to the instructions in the program code.
[0073] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enables the computer to execute the network connection management method described in the first aspect or any one of the first aspects.
[0074] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the network connection management method provided in the first aspect or various optional implementations of the first aspect.
[0075] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0076] The target connection usage information is obtained by responding to the request of the target connection inputting the target connection pool, wherein the target connection pool includes a hot connection pool and a cold connection pool; if the usage information meets the preset conditions, the target connection is input into the hot connection pool to update the hot connection pool; then the resource adjustment information corresponding to the hot connection pool being updated is determined to adjust the connection resources contained in the target connection pool, and the resource adjustment information is related to the connection resources contained in the cold connection pool. Thus, the intelligent management process of the connection resources in the target connection pool is realized, because the connection resources in the cold connection pool will be managed when the target connection is connected to the hot connection pool, and the connection resources in the cold connection pool are inactive connections, thereby ensuring the order of connection closure, avoiding the situation where the link that needs to be connected is closed, and improving the stability of the network connection management process. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0078] Figure 1 A diagram of the network architecture that runs the network connection management system;
[0079] Figure 2 A process architecture diagram of network connection management provided in an embodiment of the present application;
[0080] Figure 3 A flow chart of a network connection management method based on a connection pool provided in an embodiment of the present application;
[0081] Figure 4 A flow chart of a network connection management method based on a connection pool provided in an embodiment of the present application;
[0082] Figure 5 A flowchart of another network connection management method based on a connection pool provided in an embodiment of the present application;
[0083] Figure 6 A flowchart of another network connection management method based on a connection pool provided in an embodiment of the present application;
[0084] Figure 7 A schematic diagram of the structure of a network connection management device provided in an embodiment of the present application;
[0085] Figure 8 A schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0086] The embodiment of the present application provides a network connection management method based on a connection pool and a related device, which can be applied to a system or program containing a network connection management function in a terminal device, and obtains the usage information of the target connection by responding to a request of the target connection input into the target connection pool, wherein the target connection pool includes a hot connection pool and a cold connection pool; if the usage information meets the preset conditions, the target connection is input into the hot connection pool to update the hot connection pool; then the corresponding resource adjustment information when the hot connection pool is updated is determined to adjust the connection resources contained in the target connection pool, and the resource adjustment information is related to the connection resources contained in the cold connection pool. Thereby, an intelligent management process of connection resources in the target connection pool is realized, because the connection resources in the cold connection pool will be managed when the target connection is connected to the hot connection pool, and the connection resources in the cold connection pool are inactive connections, thereby ensuring the order of connection closure, avoiding the situation where the link that needs to be connected is closed, and improving the stability of the network connection management process.
[0087] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "corresponding to" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0088] First, some terms that may appear in the embodiments of the present application are explained.
[0089] Persistent connection: refers to a connection that the client does not close after the client and server request is completed, but instead reuses the previous connection to send and receive data the next time the client requests the server. Persistent connection reduces the connection time between the client and the server and improves the user experience.
[0090] TCP connection three-way handshake: The client and the server need to perform three connection communications to establish a connection, commonly known as the three-way handshake. Only after the three-way handshake is completed, the client and the server are considered to have established a connection and can they start communicating and sending data.
[0091] Cloud Acceleration Reverse Proxy Server: In the cloud server scenario, there is a proxy server that receives client requests and acts as a proxy to initiate requests to the target server. For example, the Wangka free traffic service will only be free traffic if the network link goes through the proxy, and the proxy will request the real server resources.
[0092] It should be understood that the network connection management method provided in the present application can be applied to a system or program including a network connection management function in a terminal device, such as an HTML5 kernel application. Specifically, the network connection management system can be run on a system such as Figure 1 In the network architecture shown, please refer to Figure 1 , which shows a schematic diagram of an implementation environment provided by an embodiment of the present application. The implementation environment may include: a terminal device 10, a reverse proxy server 20 and a target server 30.
[0093] The terminal device 10 can request services from the target server 30 through the network. The terminal device 10 can be a terminal such as a mobile phone, a tablet computer, a PC (Personal Computer), a desktop computer, or a server, which is not limited in the present embodiment.
[0094] Optionally, the terminal device 10 includes more than one.
[0095] The reverse proxy server 20 can communicate with the terminal device 10 and the target server 30 respectively through a wireless network, and transfer information between the terminal device 10 and the target server 30 to achieve communication between the terminal device 10 and the target server 30.
[0096] In the embodiment of the present application, the reverse proxy server 20 is also used to manage a connection pool, in which there are multiple connections. After receiving the request sent by the terminal device 10, the reverse proxy server 20 can select a connection in the connection pool to send the request to the target server 30.
[0097] The target server 30 can provide services to the terminal device 100 through the network. The target server 30 can be a terminal such as a mobile phone, a tablet computer, a PC, a desktop computer, etc., or a server, which is not limited in the embodiment of the present application.
[0098] Optionally, the target server 30 includes more than one.
[0099] One point that needs to be explained is that the terminal device 10 and the target server 30 are located in two different regions. That is to say, the terminal device 10 and the target server 30 are located in two different geographical locations, and there is a certain distance between the two different geographical locations. Optionally, the terminal device 10 and the target server 30 may be located in two different cities in a country, or in two different countries, which is not limited in the embodiments of the present application. When the terminal device 10 and the target server 30 are in two different regions, especially in two different countries, due to the long distance, if a short connection is used, it is easy to cause a problem of high request latency.
[0100] In addition, the server involved in the embodiments of the present application can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, but the embodiments of the present application are not limited to this.
[0101] Among them, cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data calculation, storage, processing and sharing.
[0102] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the background system for logical processing. Data of different levels will be processed separately, and all kinds of industry data need strong system backing support, which involves the application of proxy services.
[0103] With the popularization and development of network technology and computers, proxy services have become a form of online application. Proxy service refers to the internal network sending a connection request to the Internet. It is necessary to develop a proxy service to send the HTTP originally transmitted directly to the web server to the proxy server. In the reverse proxy service in the cloud scenario, the reverse proxy server generally proxies different long connection requests from various terminals and various business scenarios.
[0104] Generally, the process of persistent connection management is to configure a connection pool to manage persistent connections. It is a first-in-first-out connection pool with a fixed maximum value. An idle persistent connection can enter this connection pool. When the number of connections in the connection pool reaches the maximum value, the first idle connection that enters will be squeezed out and closed, thereby ensuring the stability of the load of the connection pool.
[0105] However, during the connection selection process of the network service, the link currently required to be connected may be closed, resulting in connection failure, affecting the stability of the network connection management process.
[0106] In order to solve the above problems, this application proposes a network connection management method based on connection pool, which is applied to Figure 2 In the process framework of network connection management shown in Figure 2 As shown, a process architecture diagram of network connection management provided by an embodiment of the present application is provided, in which the target connection pool in the reverse proxy server is divided into a hot connection pool and a cold connection pool to manage network connections, wherein the hot connection pool is used to manage active connection resources, and the cold connection pool is used for inactive connection resources (such as connection resources that have not been connected for a long time); and the connection resources between the hot connection pool and the cold connection pool can be switched dynamically, for example, when the connection resources in the hot connection pool are inactive, they are moved into the cold connection pool, or when the connection resources in the cold connection pool are active, they are moved into the hot connection pool; in addition, the closing of the connection can only be executed through the cold connection pool, thereby ensuring the order of the connection closing. It can be understood that the connection resources in this embodiment are long connection resources, that is, orderly network connection management is required to ensure the normal operation of the business corresponding to the long connection.
[0107] In one possible scenario, when the cloud server (reverse proxy server) is started, it will configure the number of long connections supported by the cloud server according to its own connection resources. The server maintains a maximum of the number of long connections configured by the terminal. If it exceeds the number, it will close the excess connection resources to avoid system overwhelm. Two connection pools are initialized during startup initialization. The total number of long connections that can be cached by these two pools is fixed; during initialization, the number of cold connection pools and hot connection pools is allocated in a ratio of 3 to 1, because generally active long connections account for a minority.
[0108] Specifically, the allocation ratio of the number of cold connection pools and hot connection pools can be set according to the ratio of the number of accesses to the target connection pool to the number of active connections within a period of time. The specific allocation ratio depends on the actual scenario and is not limited here.
[0109] In addition, when a new connection is connected, its activity can be intelligently predicted based on usage information to determine whether to input the hot connection pool or the cold connection pool, thereby achieving hierarchical management of connection access and ensuring the order of connection closure by setting the closing authority of the cold connection pool.
[0110] It can be understood that the method provided by the present application can be written as a program to serve as a processing logic in a hardware system, or as a network connection management device, which implements the above processing logic in an integrated or external manner. As an implementation method, the network connection management device obtains the usage information of the target connection by responding to the request of the target connection input into the target connection pool, wherein the target connection pool includes a hot connection pool and a cold connection pool; if the usage information meets the preset conditions, the target connection is input into the hot connection pool to update the hot connection pool; then the corresponding resource adjustment information when the hot connection pool is updated is determined to adjust the connection resources contained in the target connection pool, and the resource adjustment information is related to the connection resources contained in the cold connection pool. Thus, the intelligent management process of the connection resources in the target connection pool is realized. Since the connection resources in the cold connection pool are managed when the target connection is connected to the hot connection pool, and the connection resources in the cold connection pool are inactive connections, the order of connection closure is guaranteed, and the situation that the link that needs to be connected is closed is avoided, and the stability of the network connection management process is improved.
[0111] In combination with the above process architecture, the network connection management method in this application will be introduced below. Please refer to Figure 3 , Figure 3 A flowchart of a network connection management method based on a connection pool provided in an embodiment of the present application. The management method can be executed by a reverse proxy server. The embodiment of the present application at least includes the following steps:
[0112] 301. In response to a request for a target connection to be input into a target connection pool, usage information of the target connection is obtained.
[0113] In this embodiment, the target connection pool includes a hot connection pool and a cold connection pool; for the specific division process, refer to Figure 2 The description in is not repeated here.
[0114] It can be understood that the timing of dividing the hot connection pool and the cold connection pool can be during the initialization process of the reverse proxy server; it can also be an immediate division in response to the user's settings during the operation of the reverse proxy server. At this time, the connection resources already included in the original connection pool corresponding to the reverse proxy server are judged based on the network connection management method of the present application, and entered into the corresponding hot connection pool or cold connection pool.
[0115] Specifically, the target connection may be a connection that has been connected to the target connection pool. At this time, the usage information of the target connection can be determined through its corresponding connection record. Specifically, first respond to the request of the target connection to enter the target connection pool, obtain the connection record of the target connection in the target connection pool; then extract the number of reuses in the connection record: and then determine the usage information of the target connection based on the number of reuses. Among them, the number of reuses in the connection record is the number of times the target connection accesses the target connection pool. The count of the number of times can be one of the hot connection pool or the cold connection pool, such as the number of times entering the hot connection pool; the count of the number of times can also be set based on the sum of the accesses to the hot connection pool and the cold connection pool, so as to comprehensively reflect the access situation of the target connection.
[0116] In one possible scenario, the target connection of the present application is a long connection, that is, the client and the reverse proxy server need to maintain information exchange; and in the process of establishing a long connection, a three-way handshake of the target TCP connection is required to be implemented. At this time, if the situation of accessing the target connection pool is involved, it can be ignored, that is, the access situation after the connection is successful shall prevail, thereby ensuring the accuracy of the data.
[0117] It should be noted that since the long connection process is a dynamic request process, the determination of usage information can also be dynamically updated, that is, the occurrence of service requests is monitored in real time for each connection in the target connection pool, thereby updating its usage information. When the usage information reaches the input standard of the hot connection pool, the hot connection pool is input, otherwise, it is input into the cold connection pool.
[0118] 302. If the usage information meets the preset condition, the target connection is input into the hot connection pool to update the hot connection pool;
[0119] In this embodiment, the preset condition is used to indicate whether the usage information of the target connection meets the input standard of the hot connection pool; for example, the preset condition can be set to the target connection pool access times being greater than 50. If the usage information of the target connection indicates that the target connection has accessed the target connection pool more than 50 times, the input standard of the hot connection pool is met and the hot connection pool is input.
[0120] It is understandable that, in order to ensure the management efficiency of the hot connection pool, a capacity upper limit can be set for the hot connection pool, that is, the upper limit of the number of connection resources contained in the hot connection pool (the first preset value). In this scenario, when the target connection is input into the hot connection pool, the load capacity of the hot connection pool does not reach the upper limit, then the target connection is directly input into the hot connection pool and the corresponding business connection is performed. When the target connection is input into the hot connection pool, the load capacity of the hot connection pool reaches the upper limit. Since the total load capacity of the target connection pool is a fixed value, it is necessary to allocate resources from the cold connection pool, for example, close a connection resource in the cold connection pool and convert it into a connection resource of the hot connection pool for the target connection input. It can be seen that the network access management of the hot connection pool and the cold connection pool in this application is a dynamic management process, that is, adaptive capacity allocation is performed based on the actual activity of the input connection, that is, the order of closing the long network connection is guaranteed, and the stability of the connection access is also guaranteed.
[0121] Optionally, when the usage information does not meet the preset conditions, the target connection can be input into the cold connection pool to update the cold connection pool. The target connection input into the cold connection pool can also establish a corresponding business connection, but the probability of being closed is higher than that of the connection in the hot connection pool, or it is earlier in the closing sequence, which does not affect the normal long connection service process.
[0122] It is understandable that due to the capacity limitation of the target connection pool, there is also a load limitation for the cold connection pool, that is, when the target connection is input into the cold connection pool, the load value of the cold connection pool is obtained; if the load value reaches the second preset value (the upper limit of the cold connection pool capacity), the eliminated connection is screened out from the cold connection pool based on the connection duration; the eliminated connection is deleted to update the cold connection pool. Among them, the screening of the eliminated connection can be the connection that has not been used for the longest time, or it can be to maintain a closing order table in the screening cold connection pool, and set the closing order table based on the order in which the connection is input into the cold connection pool, that is, the connection that is first input into the cold connection pool is the front in the closing order table, and once the connection is used, it is automatically adjusted to the end in the closing order table, so as to perform dynamic management in the closing order table and dynamic setting of the eliminated connection, thereby avoiding the situation where the eliminated connection is the connection that is about to be used, and improving the stability of network connection management.
[0123] 303. Determine resource adjustment information corresponding to the hot connection pool being updated, so as to adjust connection resources included in the target connection pool.
[0124] In this embodiment, the resource adjustment information is related to the connection resources contained in the cold connection pool. The resource adjustment information is the connection resources required by the hot connection pool. For example, if the hot connection pool has sufficient connection resources, the resource adjustment information indicates that no cold connection pool regulation is required; if the hot connection pool has insufficient connection resources, the resource adjustment information indicates that the cold connection pool needs to regulate the connection resources and the corresponding access connection parameters, so as to obtain access to the connection resources from the cold connection pool regulation, thereby realizing the connection resource regulation process without the need for further feedback from the cold connection pool, thereby improving the resource regulation efficiency.
[0125] It can be understood that the connection resources contained in the target connection pool are adjusted, that is, when the load capacity in the target connection pool reaches the upper limit, inactive connections are closed and new connections are added on the basis of the target connection pool load capacity remaining unchanged; or new connections are added when the load capacity in the target connection pool is not full.
[0126] Specifically, the process of adjusting the connection resources contained in the target connection pool involves the scheduling of the connection resources of the hot connection pool and the cold connection pool, and the occurrence of this scheduling is related to the load conditions of the hot connection pool and the cold connection pool. That is, first determine the resource adjustment information corresponding to the update of the hot connection pool; then obtain the load value of the hot connection pool; when the load value of the hot connection pool reaches the first preset value and the load value of the cold connection pool does not reach the second preset value, allocate the idle resources in the cold connection pool to the hot connection pool based on the resource adjustment information to adjust the connection resources contained in the target connection pool. That is, when the hot connection pool reaches the load limit and the cold connection pool does not reach the load limit, directly allocate the unallocated connection resources (idle resources) in the cold connection pool to the hot connection pool, thereby ensuring the connection service in the hot connection pool.
[0127] In another possible scenario, if the load value of the hot connection pool reaches the first preset value and the load value of the cold connection pool reaches the second preset value, the idle connections in the cold connection pool are closed to generate idle resources; the idle resources are allocated to the hot connection pool based on the resource adjustment information to adjust the connection resources included in the target connection pool. That is, when the hot connection pool reaches the load limit and the cold connection pool also reaches the load limit, the connection resources in the cold connection pool that have not been connected for a long time are closed, and then the connection interface is allocated to the hot connection pool to ensure the connection service in the hot connection pool.
[0128] Through the dynamic scheduling of the hot connection pool and the cold connection pool, the smooth execution of the access connection can be guaranteed, and the possible execution connection will not be closed.
[0129] Furthermore, considering the time consumption of the dynamic scheduling process, in order to improve the efficiency of the network connection management process, real-time connection checking can be performed, that is, monitoring the connection information of the target connection in the hot connection pool; if the connection information indicates that the target connection is idle, the target connection is scheduled to the cold connection pool. In this way, the space of the hot connection pool is intelligently freed up, saving the time consumption caused by dynamic scheduling.
[0130] It is understandable that when the target identifier is input into the cold connection pool, the time identifier corresponding to the target connection input into the cold connection pool can also be determined, and the closing order is configured for the target connection based on the time identifier. This is to ensure the accuracy of the closing order in the cold connection pool.
[0131] In one possible scenario, the connection access process can refer to Figure 4 The judgment process shown is Figure 4 A flow chart of a network connection management method based on a connection pool provided in an embodiment of the present application. That is, for a new connection, first obtain its usage information, and the usage information is updated in real time, that is, it can be a cumulative value; then determine whether the usage information meets the hot connection standard, if it does, enter the hot connection pool, and determine the upper limit of the hot connection pool capacity, if the hot connection pool capacity does not reach the upper limit, complete the access and provide corresponding business services, if the hot connection pool capacity reaches the upper limit, then achieve the purpose of accessing the target connection pool by reducing the capacity of the cold connection pool.
[0132] In addition, for the case where the hot connection standard is not met, the cold connection pool is entered and the upper limit of the cold connection pool capacity is determined. If the cold connection pool capacity does not reach the upper limit, the access is completed and the corresponding business services are provided. If the cold connection pool capacity reaches the upper limit, the idle connections (old connections) in the cold connection pool are closed to achieve the purpose of accessing the target connection pool.
[0133] In summary, the setting of the entry criteria for the hot connection pool may include: 1. For the connection of the cold connection pool, it can enter the hot connection pool after being used multiple times and becoming hot; 2. If the new connection is inferred to be a possible active connection, it can directly enter the hot pool. Correspondingly, the exit criteria for the hot connection pool may include: 1. Exit from the hot connection pool after the connection times out and becomes cold; 2. Determine that the cold connection pool is entered after exiting based on usage information; 3. The connection will be closed only after entering the cold connection pool and being determined to be an obsolete connection.
[0134] In addition, the setting of the entry standard of the cold connection pool may include: 1. For the first idle connection request, enter the cold connection pool; 2. If the cold connection pool is full, the new connection will close the oldest idle connection in the cold connection pool; 3. When the cold connection pool has sufficient capacity, the long connection will exit if it times out; when the cold connection pool is insufficient, the new connection will close the oldest long connection. This ensures the dynamic balance of the target connection pool capacity.
[0135] In combination with the above embodiments, it can be known that the use information of the target connection is obtained by responding to the request of the target connection input into the target connection pool, wherein the target connection pool includes a hot connection pool and a cold connection pool; if the use information meets the preset conditions, the target connection is input into the hot connection pool to update the hot connection pool; then the resource adjustment information corresponding to the hot connection pool when it is updated is determined to adjust the connection resources included in the target connection pool, and the resource adjustment information is related to the connection resources included in the cold connection pool. Thus, the intelligent management process of the connection resources in the target connection pool is realized, because the connection resources in the cold connection pool will be managed when the target connection is connected to the hot connection pool, and the connection resources in the cold connection pool are inactive connections, thereby ensuring the order of connection closure, avoiding the situation where the link that needs to be connected is closed, and improving the stability of the network connection management process.
[0136] The above embodiment introduces the network connection management process based on the usage information of the connection. In some scenarios, the acquisition of usage information is also related to the business scenario corresponding to the connection. The following describes this scenario. Figure 5 , Figure 5 A flowchart of another network connection management method based on a connection pool provided in an embodiment of the present application can be executed by a reverse proxy server. The embodiment of the present application at least includes the following steps:
[0137] 501. Obtain a target service corresponding to a target connection.
[0138] In this embodiment, the target business corresponding to the target connection can be obtained through domain name resolution, that is, each target business corresponds to an associated domain name, and the corresponding target connection can be obtained based on the domain name. During the execution of the target business, the corresponding target connection is generally in a service connection state, so the usage information of the corresponding target connection can be reflected through the statistics of the hot connection data (scenario connection parameters) of the target business; in addition, for the connection newly input into the target connection pool, since its current usage information may not meet the standards of the hot connection pool, but its corresponding business is an active business, other connections in the business are in an active state, so from the perspective of the business corresponding to the connection, it is possible to avoid misjudgment of the connection newly input into the target connection pool, and avoid entering the cold connection pool and closing it.
[0139] Specifically, first, in response to the request of the target connection input into the target connection pool, the domain name corresponding to the target connection is determined to determine the target business; then, the scenario connection parameters of the target business are extracted based on the connection indicators; and then, the usage information of the target connection is determined according to the scenario connection parameters. Thus, the usage information corresponding to the target connection is obtained from the dimension of the business scenario to make a judgment on the connection pool access.
[0140] 502. Determine scenario connection parameters of the target service.
[0141] In this embodiment, the scenario connection parameters can be determined based on the connection information, that is, firstly, the service connection set corresponding to the target service is determined based on the connection index; then, the connection information of the connections in the service connection set within a preset time period is determined; and then, the scenario connection parameters of the target service are determined according to the connection information. The connection information includes the number of connections and the connection behavior interval, that is, the total number of connections to the target connection pool among all connections corresponding to the target service, and the average time interval between adjacent connection behaviors.
[0142] Optionally, since the number of connections and the connection behavior interval use different dimensions to describe the connection scenario of the target service, they can be weighted and unified to facilitate the judgment of hot connection. That is, first determine the weight information corresponding to the number of connections and the connection behavior interval; then weight based on the weight information to determine the scenario connection parameters of the target service. For example, set the scenario connection parameters = number of connections * 0.8 + connection behavior interval * 0.2.
[0143] It is understandable that the specific weight setting can be adjusted based on the description accuracy of the connection scenario of the target service, which is not limited here.
[0144] 503. Determine the target connection input into the hot connection pool based on the scenario connection parameters.
[0145] In this embodiment, after determining the target service of the target connection, it is possible to determine whether to input the target connection into the hot connection pool. Specifically, if the weighted value of the scenario connection parameter in step 502 is greater than the hot connection threshold, the target connection is input into the hot connection pool.
[0146] It is understandable that the cold connection pool scheduling process after entering the hot connection pool is the same as Figure 3 Steps 302 and 303 of the illustrated embodiment are similar, and related features may be referred to and will not be described in detail here.
[0147] In one possible scenario, since the scene connection parameters of the target business are determined based on multiple connections, in the process of determining whether each connection is input into the target connection pool, the scene connection parameters of the target business can also be updated based on the usage information of the connection. For example, after connection 1 in the target business is connected to the target connection pool, the scene connection parameters corresponding to the target business are recorded with the number of connections increased by one.
[0148] Specifically, the process of updating the scene connection parameters of the target service is as follows: Figure 6 As shown, Figure 6 A flow chart of another network connection management method based on a connection pool provided in an embodiment of the present application. The figure shows that when a connection is input, on the one hand, the scene connection information can be determined according to the target business, and then the hot connection standard can be judged, especially for a connection newly added to the target connection pool, other connections of the corresponding target business may have established connections in the target connection pool, so that the use probability of the connection newly added to the target connection pool can be reflected.
[0149] In addition, for other connections in the target business, the scene connection information will be updated based on the real-time connection status. The specific update items include the number of connections and the connection interval, and a weighted calculation of the two can be performed to obtain the scene connection information, thereby realizing a dynamic scene connection information determination process and ensuring the accuracy of the scene connection information and usage information.
[0150] This embodiment uses a two-level connection pool to ensure that hot long connections will not be washed away by cold connections. At the same time, by counting the historical connection usage of each business scenario, the popularity of each scenario is scored (scenario connection information), so that new connections of the business scenario can enter the hot connection pool well to avoid the probability of being closed.
[0151] In order to better implement the above solution of the embodiment of the present application, the following also provides related devices for implementing the above solution. Figure 7 , Figure 7 A schematic diagram of the structure of a network connection management device provided in an embodiment of the present application, the network connection management device 700 includes:
[0152] An acquisition unit 701 is used to acquire usage information of a target connection in response to a request of a target connection input into a target connection pool, wherein the target connection pool includes a hot connection pool and a cold connection pool;
[0153] An input unit 702 is configured to input the target connection into the hot connection pool to update the hot connection pool if the usage information meets a preset condition;
[0154] The management unit 703 is used to determine the resource adjustment information corresponding to the update of the hot connection pool to adjust the connection resources included in the target connection pool, and the resource adjustment information is related to the connection resources included in the cold connection pool.
[0155] Optionally, in some possible implementations of the present application, the acquisition unit 701 is specifically configured to acquire a connection record of the target connection in the target connection pool in response to a request for the target connection to be input into the target connection pool;
[0156] The acquisition unit 701 is specifically used to extract the number of multiplexing times in the connection record:
[0157] The acquisition unit 701 is specifically configured to determine the usage information of the target connection based on the number of multiplexing times.
[0158] Optionally, in some possible implementations of the present application, the acquisition unit 701 is specifically configured to determine a domain name corresponding to the target connection in response to a request of a target connection input into a target connection pool, so as to determine a target service;
[0159] The acquisition unit 701 is specifically configured to extract a scenario connection parameter of the target service based on the connection indicator, where the scenario connection parameter is used to indicate usage information corresponding to a connection included in the target service;
[0160] The acquisition unit 701 is specifically configured to determine the usage information of the target connection according to the scenario connection parameter.
[0161] Optionally, in some possible implementations of the present application, the acquisition unit 701 is specifically configured to determine a service connection set corresponding to the target service based on the connection indicator;
[0162] The acquisition unit 701 is specifically configured to determine connection information of the connections in the service connection set within a preset time period, wherein the connection information includes the number of connections and the connection behavior interval;
[0163] The acquisition unit 701 is specifically configured to determine the scenario connection parameter of the target service according to the connection information.
[0164] Optionally, in some possible implementations of the present application, the acquisition unit 701 is specifically used to determine weight information corresponding to the number of connections and the connection behavior interval;
[0165] The acquisition unit 701 is specifically configured to perform weighting based on the weight information to determine the scenario connection parameter of the target service.
[0166] Optionally, in some possible implementations of the present application, the management unit 703 is specifically used to determine the resource adjustment information corresponding to the update of the hot connection pool;
[0167] The management unit 703 is specifically used to obtain the load value of the hot connection pool;
[0168] The management unit 703 is specifically configured to allocate idle resources in the cold connection pool to the hot connection pool based on the resource adjustment information if the load value of the hot connection pool reaches a first preset value and the load value of the cold connection pool does not reach a second preset value, so as to adjust the connection resources included in the target connection pool.
[0169] Optionally, in some possible implementations of the present application, the management unit 703 is specifically configured to close the idle connections in the cold connection pool to generate the idle resources if the load value of the hot connection pool reaches the first preset value and the load value of the cold connection pool reaches the second preset value;
[0170] The management unit 703 is specifically configured to allocate the idle resources to the hot connection pool based on the resource adjustment information, so as to adjust the connection resources included in the target connection pool.
[0171] Optionally, in some possible implementations of the present application, the management unit 703 is specifically configured to input the target connection into the cold connection pool to update the cold connection pool if the usage information does not meet the preset condition.
[0172] Optionally, in some possible implementations of the present application, the management unit 703 is specifically used to obtain the load value of the cold connection pool;
[0173] The management unit 703 is specifically configured to filter out eliminated connections from the cold connection pool based on connection duration if the load value reaches the second preset value;
[0174] The management unit 703 is specifically configured to delete the eliminated connection to update the cold connection pool.
[0175] Optionally, in some possible implementations of the present application, the management unit 703 is specifically used to monitor the connection information of the target connection in the hot connection pool;
[0176] The management unit 703 is specifically configured to schedule the target connection to the cold connection pool if the connection information indicates that the target connection is idle.
[0177] Optionally, in some possible implementations of the present application, the management unit 703 is specifically configured to determine a time identifier corresponding to when the target connection is input into the cold connection pool;
[0178] The management unit 703 is specifically configured to configure a closing order for the target connection based on the time identifier.
[0179] The target connection usage information is obtained by responding to the request of the target connection inputting the target connection pool, wherein the target connection pool includes a hot connection pool and a cold connection pool; if the usage information meets the preset conditions, the target connection is input into the hot connection pool to update the hot connection pool; then the resource adjustment information corresponding to the hot connection pool being updated is determined to adjust the connection resources contained in the target connection pool, and the resource adjustment information is related to the connection resources contained in the cold connection pool. Thus, the intelligent management process of the connection resources in the target connection pool is realized, because the connection resources in the cold connection pool will be managed when the target connection is connected to the hot connection pool, and the connection resources in the cold connection pool are inactive connections, thereby ensuring the order of connection closure, avoiding the situation where the link that needs to be connected is closed, and improving the stability of the network connection management process.
[0180] The present application also provides a server. Figure 8 , Figure 8 800 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 822 (for example, one or more processors) and memory 832, and one or more storage media 830 (for example, one or more mass storage devices) storing application programs 842 or data 844. Among them, the memory 832 and the storage medium 830 may be short-term storage or permanent storage. The program stored in the storage medium 830 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 822 may be configured to communicate with the storage medium 830 to execute a series of instruction operations in the storage medium 830 on the server 800.
[0181] The server 800 may also include one or more power supplies 826, one or more wired or wireless network interfaces 850, one or more input and output interfaces 858, and / or one or more operating systems 841, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0182] The steps performed by the management device in the above embodiment can be based on the Figure 8 The server structure shown.
[0183] The present application also provides a computer-readable storage medium in which a network connection management instruction is stored. When the computer-readable storage medium is run on a computer, the computer executes the above-mentioned Figures 2 to 6 The illustrated embodiment describes the steps performed by the network connection management device in the method.
[0184] The present application also provides a computer program product including network connection management instructions, which, when executed on a computer, enables the computer to execute the above-mentioned Figures 2 to 6 The illustrated embodiment describes the steps performed by the network connection management device in the method.
[0185] The present application also provides a network connection management system, which may include: Figure 7 The network connection management device in the described embodiments, or Figure 8 The server described.
[0186] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0187] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0188] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0189] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0190] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a network connection management device, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0191] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A network connection management method based on a connection pool, characterized in that: include: In response to a request of a target connection input into a target connection pool, obtaining usage information of the target connection, wherein the target connection pool includes a hot connection pool and a cold connection pool; If the usage information meets the preset condition, the target connection is input into the hot connection pool to update the hot connection pool; Determining resource adjustment information corresponding to the update of the hot connection pool to adjust the connection resources included in the target connection pool, wherein the resource adjustment information is related to the connection resources included in the cold connection pool; The determining of the resource adjustment information corresponding to the updating of the hot connection pool to adjust the connection resources included in the target connection pool includes: Determine resource adjustment information corresponding to the hot connection pool when it is updated; Obtaining a load value of the hot connection pool; If the load value of the hot connection pool reaches a first preset value and the load value of the cold connection pool does not reach a second preset value, the idle resources in the cold connection pool are allocated to the hot connection pool based on the resource adjustment information to adjust the connection resources included in the target connection pool.
2. The method according to claim 1, characterized in that The step of obtaining usage information of the target connection in response to a request for inputting the target connection into the target connection pool includes: In response to a request for a target connection to be input into a target connection pool, obtaining a connection record of the target connection in the target connection pool; Extract the number of reuses in the connection record: Determine usage information of the target connection based on the number of multiplexing times.
3. The method according to claim 1, characterized in that The step of obtaining usage information of the target connection in response to a request for inputting the target connection into the target connection pool includes: In response to a request of a target connection input into a target connection pool, determining a domain name corresponding to the target connection to determine a target service; Extracting a scenario connection parameter of the target service based on the connection indicator, where the scenario connection parameter is used to indicate usage information corresponding to the connection included in the target service; Determine usage information of the target connection according to the scenario connection parameters.
4. The method according to claim 3, characterized in that The extracting the scenario connection parameter of the target service based on the connection indicator includes: Determine a service connection set corresponding to the target service based on the connection indicator; Determine connection information of connections in the service connection set within a preset time period, wherein the connection information includes the number of connections and the connection behavior interval; The scenario connection parameters of the target service are determined according to the connection information.
5. The method according to claim 4, characterized in that The determining the scenario connection parameter of the target service according to the connection information includes: Determine weight information corresponding to the number of connections and the connection behavior interval; Weighting is performed based on the weight information to determine the scenario connection parameter of the target service.
6. The method according to claim 1, characterized in that The method further comprises: If the load value of the hot connection pool reaches the first preset value and the load value of the cold connection pool reaches the second preset value, closing the idle connections in the cold connection pool to generate the idle resources; The idle resources are allocated to the hot connection pool based on the resource adjustment information, so as to adjust the connection resources included in the target connection pool.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: If the usage information does not meet the preset condition, the target connection is input into the cold connection pool to update the cold connection pool.
8. The method according to claim 7, characterized in that The method further comprises: Obtaining a load value of the cold connection pool; If the load value reaches the second preset value, filtering out eliminated connections from the cold connection pool based on the connection duration; The obsolete connection is deleted to update the cold connection pool.
9. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Monitoring connection information of the target connection in the hot connection pool; If the connection information indicates that the target connection is idle, the target connection is scheduled to the cold connection pool.
10. The method according to claim 9, characterized in that The method further comprises: Determine a time stamp corresponding to when the target connection is input into the cold connection pool; A closing order is configured for the target connection based on the timestamp.
11. The method according to claim 1, characterized in that: The target connection is a long connection, and the long connection is used to provide a reverse proxy service.
12. A network connection management device, characterized in that: include: an acquisition unit, configured to acquire usage information of the target connection in response to a request of the target connection input into the target connection pool, wherein the target connection pool includes a hot connection pool and a cold connection pool; An input unit, configured to input the target connection into the hot connection pool to update the hot connection pool if the usage information meets a preset condition; A management unit, configured to determine resource adjustment information corresponding to an update of the hot connection pool, so as to adjust the connection resources included in the target connection pool, wherein the resource adjustment information is related to the connection resources included in the cold connection pool; The management unit is specifically used to determine the resource adjustment information corresponding to the update of the hot connection pool; Obtaining a load value of the hot connection pool; If the load value of the hot connection pool reaches a first preset value and the load value of the cold connection pool does not reach a second preset value, the idle resources in the cold connection pool are allocated to the hot connection pool based on the resource adjustment information to adjust the connection resources included in the target connection pool.
13. A computer device, characterized in that: The computer device comprises a processor and a memory: The memory is used to store program codes; the processor is used to execute the network connection management method according to any one of claims 1 to 11 according to instructions in the program codes.
14. A computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on a computer, the computer is enabled to execute the network connection management method according to any one of claims 1 to 11.
