Hybrid resource network port management method and port management system
By calculating the port fragmentation index and integrating port segments in a hybrid cloud architecture, the problem of ineffective port resource utilization is solved, achieving efficient port utilization and improved network performance.
Patent Information
- Application Number
- CN202511677134.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2045-11-17
AI Technical Summary
In a hybrid cloud architecture, port resources cannot be effectively utilized, resulting in the inability to successfully allocate new connections, high resource management overhead, and low network performance.
By determining the number and length of available continuous port segments in the logical port pool of mixed resources, calculating the port fragmentation index, judging whether the integration conditions are met, and integrating the port segments to be integrated in the logical port pool, centralized port management is achieved.
It improves port utilization efficiency, avoids new connection rejection, enhances network performance, and reduces resource management overhead.
Smart Images

Figure CN121125649B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, specifically to a hybrid resource network port management method and port management system. Background Technology
[0002] With the rapid development of cloud computing, edge computing, and the Internet of Things (IoT), modern internet application environments are becoming increasingly complex. In a hybrid cloud architecture, application deployment may simultaneously involve public clouds, private clouds, and edge nodes. For example, different modules may be distributed across a public cloud VPC network, the intranet of an enterprise's own data center, and edge computing nodes. Port management across multiple network domains further complicates configuration and maintenance.
[0003] The current popularity of microservice architectures allows application service instances to automatically scale up or down based on load, which means port allocation needs to be highly dynamic. Traditional methods of hard-coding or manually allocating static port numbers can easily lead to fragmented and discontinuous allocation of port resources when responding to such frequent changes. For example, in random or on-demand port allocation, unused ports may be interspersed among used ports. This results in a large number of available ports, but ineffective utilization of these ports, causing new connections to fail to be allocated ports successfully. Furthermore, it increases resource management overhead and degrades network performance. Summary of the Invention
[0004] In view of the above-mentioned defects or deficiencies in the prior art, this application aims to provide a hybrid resource network port management method and port management system to solve the problems of ineffective utilization of port resources, failure to successfully allocate ports, high resource management overhead and low network performance in the related technologies.
[0005] This application provides a hybrid resource network port management method, the method comprising:
[0006] In the logical port pool of mixed resources, determine the number of available contiguous port segments, the length of each available contiguous port segment, and the total number of available ports;
[0007] Based on the number of available continuous port segments, the length of each available continuous port segment, the total number of available ports, and the continuous port segment constraint length of the logical port pool, a port fragmentation index is determined, which reflects the degree of dispersion of available ports in the mixed resources.
[0008] Based on the port fragmentation index, determine whether the hybrid resources meet the preset integration conditions;
[0009] If so, determine the port segment to be integrated in the logical port pool, migrate the services in the port segment to be integrated to the available continuous port segment, merge the available ports in the port segment to be integrated, and write the merged continuous port range into the logical port pool.
[0010] Optionally, the port fragmentation index is determined based on the number of available contiguous port segments, the length of each available contiguous port segment, the total number of available ports, and the contiguous port segment constraint length of the logical port pool, including:
[0011] Determine the service connection type of each port in the logical port pool, and classify all ports according to the service connection type of each port;
[0012] For each port category, the fragmentation index corresponding to the port category is determined based on the number of available contiguous port segments, the length of each available contiguous port segment, the total number of available ports, and the constraint length of the contiguous port segments.
[0013] The fragmentation indices corresponding to each port category are merged according to the preset classification weights to obtain the port fragmentation index.
[0014] Optionally, after determining the port fragmentation index based on the number of available contiguous port segments, the length of each available contiguous port segment, the total number of available ports, and the contiguous port segment constraint length of the logical port pool, the method further includes:
[0015] Obtain the historical fragmentation index determined within each historical detection period;
[0016] The historical fragmentation index of each historical detection period and the port fragmentation index are merged according to the preset period weight to obtain the final port fragmentation index.
[0017] Optionally, determining whether the hybrid resources meet preset integration conditions based on the port fragmentation index includes:
[0018] The port consolidation threshold of the logical port pool is determined based on the consecutive port segment constraint length of the logical port pool;
[0019] The port utilization rate of the logical port pool is determined based on the number of ports in the logical port pool and the total number of available ports.
[0020] The distribution density of the continuous segments in the logical port pool is determined based on the number of available continuous port segments and the length of each available continuous port segment.
[0021] If the port fragmentation index is greater than the port integration threshold, and the port utilization rate is greater than the preset utilization rate threshold, and the continuous segment distribution density is greater than the preset distribution density threshold, then the mixed resource is determined to meet the preset integration conditions.
[0022] The length of the continuous port segment constraint is determined based on the disabled port segment constraint, the reserved port segment constraint, and the port allocation policy constraint of the logical port pool.
[0023] Optionally, determining the port segments to be integrated from the logical port pool includes:
[0024] The logical port pool is split into two current local port pools, and the port fragmentation index of each current local port pool is determined.
[0025] The current local port pool with a high port fragmentation index is further split to obtain two new current local port pools, and the port fragmentation index of each current local port pool is determined.
[0026] Return to the step of continuing to split the current local port pool with a high port fragmentation index until the length of the current local port pool reaches the preset length threshold.
[0027] In the current local port pool with a high port fragmentation index, the available continuous port segment with a length less than the continuous port segment constraint length is determined as the first port segment, and the available continuous port segment with a length equal to the continuous port segment constraint length is determined as the second port segment.
[0028] If there are multiple first port segments, then the adjacent port segments of the first port segments are determined as port segments to be integrated. If there are multiple second port segments, and the second port segments are not adjacent, then the adjacent port segments of the second port segments are determined as port segments to be integrated.
[0029] Optionally, the port fragmentation index is determined based on the number of available continuous port segments, the length of each available continuous port segment, the total number of available ports, and the continuous port segment constraint length of the logical port pool, satisfying the following formula:
[0030] ;
[0031] In the formula, Port fragmentation index, This represents the number of available consecutive port segments. Let i be the length of the i-th available continuous port segment. This represents the total number of available ports. This represents the constraint length for continuous port segments.
[0032] Optionally, the method further includes:
[0033] Obtain the network operation parameters of each used port in the logical port pool, and determine the port health of the used port based on the network operation parameters;
[0034] In response to the detection of a decrease in the port health of the used port, or the port health being lower than a preset health threshold, other idle ports are activated, and a portion of the traffic from the used port is allocated to the other idle ports.
[0035] Optionally, the method further includes:
[0036] Retrieve historical port usage data for each service;
[0037] For each service, the historical port usage data is input into a pre-trained time series prediction model to obtain the predicted number of ports for the service within a set future time period.
[0038] For each service, the historical port usage data is input into a pre-trained clustering model to obtain the port usage type corresponding to the service;
[0039] Based on the predicted number of ports and the port usage type, a corresponding port is allocated for the service in the logical port pool.
[0040] Optionally, the method further includes:
[0041] In response to receiving a port request for the logical port pool, and the port specified in the port request is occupied, the specified port is mapped to another idle port, and data is transmitted for the service corresponding to the port request through the other idle port;
[0042] In response to receiving a port request for the logical port pool, and the logical port pool does not have any available ports, the port specified in the port request is virtualized into multiple logical sub-ports, and data is transmitted for the service corresponding to the port request through the logical sub-ports.
[0043] This application embodiment also provides a hybrid resource network port management system, the system including a dynamic adjustment engine; the dynamic adjustment engine is used for:
[0044] In the logical port pool of mixed resources, determine the number of available contiguous port segments, the length of each available contiguous port segment, and the total number of available ports;
[0045] Based on the number of available continuous port segments, the length of each available continuous port segment, the total number of available ports, and the continuous port segment constraint length of the logical port pool, a port fragmentation index is determined, which reflects the degree of dispersion of available ports in the mixed resources.
[0046] Based on the port fragmentation index, determine whether the hybrid resources meet the preset integration conditions;
[0047] If so, determine the port segment to be integrated in the logical port pool, migrate the services in the port segment to be integrated to the available continuous port segment, merge the available ports in the port segment to be integrated, and write the merged continuous port range into the logical port pool.
[0048] In summary, this application proposes a hybrid resource network port management method. This method determines the number of available contiguous port segments, the length of each available contiguous port segment, and the total number of available ports in the logical port pool of hybrid resources. Then, based on the number of available contiguous port segments, the length of each available contiguous port segment, the total number of available ports, and the contiguous port segment constraint length in the logical port pool, it measures the dispersion of available ports in the hybrid resources to obtain a port fragmentation index. Based on the port fragmentation index, it determines whether the hybrid resources meet preset integration conditions. If so, it identifies port segments to be integrated in the logical port pool, migrates the services within the port segments to be integrated to available contiguous port segments, and integrates the available services within those segments. Port merging involves writing the merged contiguous port ranges into a logical port pool to achieve port consolidation. This method can assess the dispersion of available ports in mixed resources using information such as the number and length of available contiguous port segments. This allows for the clearing of idle ports through service migration when ports in mixed resources are distributed in a scattered and discontinuous manner, centralizing the scattered ports and facilitating their efficient utilization. This avoids new connection rejections due to port fragmentation and prevents scattered ports from failing to meet the demands of large ports, thereby improving network performance. Furthermore, it facilitates centralized management of port ranges, reduces resource management overhead, and minimizes port conflicts. Attached Figure Description
[0049] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0050] Figure 1 This is a flowchart of a hybrid resource network port management method provided in an embodiment of this application;
[0051] Figure 2 This is a schematic diagram of a hybrid resource network port management system provided in an embodiment of this application;
[0052] Figure 3 This is a resource abstraction process of a unified port management framework provided in the embodiments of this application;
[0053] Figure 4 This is a flowchart illustrating the processing of a gateway module provided in an embodiment of this application. Detailed Implementation
[0054] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0055] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0056] As mentioned in the background section, this application proposes a hybrid resource network port management method to address the problems in the prior art. Figure 1 This is a flowchart illustrating a hybrid resource network port management method provided in an embodiment of this application. See also... Figure 1 The hybrid resource network port management method specifically includes:
[0057] S110. In the logical port pool of mixed resources, determine the number of available continuous port segments, the length of each available continuous port segment, and the total number of available ports.
[0058] Hybrid resources can refer to port resources in a hybrid environment, specifically consisting of port resources provided by different platforms, such as port resources provided by Kubernetes container orchestration system, OpenStack virtualization platform, physical machine management platform, etc.
[0059] The logical port pool can be used to maintain the status (idle, used, reserved, etc.) and related metadata (resource, purpose tag, security level, etc.) of all ports provided by each platform. The logical port pool can be globally unified.
[0060] In this embodiment, a unified port management framework covering various resources such as virtual machines, containers, and physical servers can be established. This unified port management framework may include resource adapters, which are platform-specific adapter plugins. These resource adapters can interface with Kubernetes container orchestration systems, OpenStack virtualization platforms, physical machine management platforms, and so on. The resource adapters can uniformly collect port usage information from each platform and execute port allocation instructions from the port management system.
[0061] This unified port management framework can also introduce a resource abstraction layer. This layer maps the actual network ports of different resource types to a unified logical port pool, enabling centralized management and scheduling of port resources. This resource abstraction allows the system to dynamically allocate ports across heterogeneous environments and avoid conflicts. For example, in an enterprise environment running both traditional physical servers and Docker containers, this framework ensures that all service instances use globally unique ports, avoiding port number conflicts on different platforms and reducing the complexity of manually allocating ports across different systems for operations personnel. This unified port management framework provides a foundation for intelligent port allocation, adjustment, and integration, significantly improving the efficiency and reliability of port management.
[0062] Furthermore, the constructed logical port pool enables state synchronization of ports across heterogeneous environments, allowing operations personnel to view and schedule port resources from a global perspective. Just as virtual memory abstracts physical memory, the logical port pool abstracts the ports of various underlying heterogeneous platforms, avoiding conflicts caused by platform differences. Through this logical abstraction, operations personnel can manage port resources across the entire hybrid environment as if managing a single platform, significantly reducing complexity.
[0063] In this embodiment of the application, the available ports in the logical port pool, i.e., unused ports, can be identified based on the status of each port in the logical port pool; then, the available continuous port segment in the logical port pool can be identified based on all available ports. The available continuous port segment can be composed of multiple consecutive available ports, or the available continuous port segment can be composed of a single available port.
[0064] Furthermore, based on the identified available continuous port segments, the number of available continuous port segments, the length of each available continuous port segment, and the total number of available ports can be determined. The length of an available continuous port segment can be understood as the number of ports contained within that segment; the total number of available ports is the total number of available ports in the logical port pool.
[0065] S120. Determine the port fragmentation index based on the number of available continuous port segments, the length of each available continuous port segment, the total number of available ports, and the continuous port segment constraint length of the logical port pool.
[0066] Specifically, the constraint length of the continuous port segment of the logical port pool can be obtained. This constraint length can refer to the maximum length of the available continuous port segment that can be formed under the constraints of the logical port pool. For example, the constraints of the logical port pool can include disabled port segment constraints, reserved port segment constraints, and port allocation policy constraints.
[0067] In this embodiment, the port fragmentation index can be calculated based on the number of available contiguous port segments, the length of each available contiguous port segment, the total number of available ports, and the contiguous port segment constraint length of the logical port pool. The port fragmentation index reflects the degree of dispersion of available ports in the mixed resources.
[0068] For example, for each available continuous port segment, the degree of dispersion caused by that available continuous port segment can be measured by the difference between the constraint length of the continuous port segment and the length of the available continuous port segment, as well as the proportion of the length of the available continuous port segment to the total number of available ports; then, based on the number of available continuous port segments and the degree of dispersion caused by each available continuous port segment, the degree of dispersion of the entire logical port pool can be determined, and the port fragmentation index can be obtained.
[0069] In some implementations, the port fragmentation index is determined based on the number of available contiguous port segments, the length of each available contiguous port segment, the total number of available ports, and the contiguous port segment constraint length of the logical port pool, satisfying the following formula:
[0070] ;
[0071] In the formula, Port fragmentation index, This represents the number of available consecutive port segments. Let i be the length of the i-th available continuous port segment. This represents the total number of available ports. The maximum length of any available continuous port segment shall not exceed this constraint length. , This represents the maximum length among all available contiguous port segments.
[0072] In the above formula, the molecule adopts The purpose is: This can be understood as a second-order measure of the "concentration" of the logical port pool. The squared weight assigns a superlinear weight to long, continuous port segments and a relatively smaller weight to short, continuous port segments, making it more sensitive to distinguishing identical segments. The different degrees of dispersion.
[0073] Specifically, for long, continuous port segments (i.e., available continuous port segments with greater lengths), the sum of squares operation amplifies its contribution to the formula, while for short, continuous port segments (i.e., available continuous port segments with smaller lengths), the sum of squares operation reduces its contribution. This allows for a more sensitive distinction between cases where the number of available continuous port segments is the same, but their dispersion differs. This is because the square is a convex function; with a fixed sum, the higher the concentration (the more long continuous segments and the fewer short continuous segments), the larger the sum of squares.
[0074] For example, suppose If there are two available contiguous port segments with lengths of 10 and 10 respectively, then If there are two available contiguous port segments with lengths of 19 and 1 respectively, then The total number of available ports is the same in both cases, but the second case has lower dispersion (i.e., higher concentration) and a significantly larger sum of squares.
[0075] For example, suppose N=20, if there are 20 available consecutive port segments, each with a length of 1, then This is much smaller than the case where there are long continuous segments.
[0076] Furthermore, in the above formula, the denominator adopts... The purpose is to: through It can achieve constrained normalization, ensuring that the port fragmentation index ranges from [0,1] and remains comparable under different constraint strategies. The derivation process is as follows:
[0077] For any ,exist That is, the length of any available contiguous port segment does not exceed the maximum length among all available contiguous port segments. Therefore... For all Summing yields:
[0078] ;
[0079] according to We can obtain:
[0080] ;
[0081] therefore, ,thereby .
[0082] In the above formula, the denominator uses Compared to adopting It can enable the implementation of stricter constraints (such as the presence of numerous disabled domains or domain boundaries) to achieve the desired results. Less than This allows normalization to reflect the reduction in the compactibility upper limit brought about by the constraint strategy, thus enabling horizontal comparison of PFI under different constraint strategies.
[0083] It should be noted that if the constraint policy allows all available ports to be combined into a single continuous segment, then And it can be achieved ,but , This means that the ports in the logical port pool are ideally compact. If a port is highly discretized into several fragments of length 1, i.e. ,but ,when When it is large, A value close to 1 indicates that the ports in the logical port pool are highly fragmented, i.e., highly discrete.
[0084] When the constraint policy leads to Even with optimal optimization, it may not be possible to achieve the desired result. At this point, the upper limit that molecules can reach is not... Instead, it is affected by The limitation, intuitively, is to divide the port into as many lengths as possible (denoted as ). A segment of size M and a remainder segment (the remainder is denoted as M). The sum of squares is at most approximately Therefore, the minimum achievable PFI is approximately:
[0085] ;
[0086] The above reasoning reflects the boundary brought about by the constraint policy. The closer the policy constraints are, the higher the PFI lower limit corresponding to the "most compact" state in theory.
[0087] In conclusion, The concentration of ports is characterized by amplifying long continuous segments by square. By defining the upper bound of the longest continuous segment that can be formed under the current constraint policy, bounded normalization and cross-environment comparability are achieved. A larger PFI indicates more severe fragmentation, while a smaller PFI indicates more compact ports. Through the above calculation method, the port dispersion in the logical port pool can be accurately measured, and the impact of the constraint policy on compactness can also be incorporated into the indicator.
[0088] In this embodiment of the application, considering the connection fluctuations caused by short connection services, long-term fragmentation can be masked. In the process of calculating the fragmentation index, the fragmentation index can also be calculated separately according to the service connection type, and then merged according to the weight.
[0089] In one specific implementation, the port fragmentation index is determined based on the number of available contiguous port segments, the length of each available contiguous port segment, the total number of available ports, and the contiguous port segment constraint length of the logical port pool, including the following steps:
[0090] Step 11: Determine the service connection type of each port in the logical port pool, and classify all ports according to their service connection types;
[0091] Step 12: For each port category, determine the fragmentation index corresponding to the port category based on the number of available contiguous port segments, the length of each available contiguous port segment, the total number of available ports, and the constraint length of the contiguous port segments.
[0092] Step 13: Merge the fragmentation indices corresponding to each port category according to the preset classification weights to obtain the port fragmentation index.
[0093] The service connection type can refer to the type of service connection port, such as long-lived connection service or short-lived connection service. Specifically, in step 11, all ports can be classified according to their service connection types.
[0094] Furthermore, in step 12, for each port category, the fragmentation index corresponding to that port category can be calculated based on the number of available continuous port segments, the length of each available continuous port segment, the total number of available ports, and the constraint length of the continuous port segments. The calculation process can be referred to the previous description.
[0095] Furthermore, in step 13, the fragmentation indices corresponding to each port category can be merged, i.e., weighted, according to the preset classification weight of each port category, to obtain the port fragmentation index.
[0096] In this regard, considering that short-connection services use ports for a short period of time and the ports they occupy can be released quickly, causing frequent fluctuations in PFI, and that such fluctuations in PFI caused by short-connection services cannot fully and accurately reflect the dispersion of ports in the logical port pool, a lower preset classification weight can be assigned to short-connection services and a higher preset classification weight to long-connection services. That is, the preset classification weight of short-connection services is less than that of long-connection services, so as to reduce the impact of fluctuations in short-connection services on PFI and thus ensure the accuracy of the assessment of the concentration of the logical port pool.
[0097] In this embodiment of the application, considering the possibility of frequent PFI fluctuations due to port reassignment or other reasons, a time smoothing method can be used to combine the PFI at multiple times to determine the final PFI in order to further improve the accuracy of PFI.
[0098] In some implementations, after determining the port fragmentation index based on the number of available contiguous port segments, the length of each available contiguous port segment, the total number of available ports, and the contiguous port segment constraint length of the logical port pool, the method further includes:
[0099] Obtain the historical fragmentation index determined within each historical detection period; merge the historical fragmentation index and port fragmentation index of each historical detection period according to the preset period weight to obtain the final port fragmentation index.
[0100] Specifically, the port fragmentation index determined in each historical testing period prior to the current testing period can be used as the historical fragmentation index. Then, based on the preset period weight of each historical testing period and the preset period weight of the current testing period, the historical fragmentation index in each historical testing period and the port fragmentation index in the current testing period are combined, i.e., weighted calculation, to obtain the final port fragmentation index.
[0101] For example, a preset number of historical fragmentation indices (e.g., 5-10) can be taken from multiple historical detection periods. Then, using an exponential moving average, higher preset period weights are assigned to historical detection periods closer to the current detection period, and lower preset period weights are assigned to historical detection periods further away from the current detection period. Furthermore, the preset period weights can decrease exponentially as the time interval increases. Finally, the historical fragmentation indices and the port fragmentation indices are weighted according to the preset period weights.
[0102] The above implementation method can calculate the final port fragmentation index by taking a weighted average of multiple detection cycles, which can avoid the impact of instantaneous fluctuations and thus further ensure the accuracy and reliability of the assessment of port concentration in the logical port pool.
[0103] In this embodiment of the application, in order to further improve the accuracy of PFI, abnormal port changes caused by test traffic, attack scanning, network jitter, etc. can be identified and eliminated before determining the port fragmentation index to prevent outliers from interfering with the evaluation results.
[0104] S130. Determine whether the mixed resources meet the preset integration conditions based on the port fragmentation index.
[0105] After obtaining the port fragmentation index, it can be used to determine whether the mixed resources meet the preset consolidation conditions. These preset consolidation conditions can be pre-set conditions that trigger port consolidation. For example, a preset consolidation condition could be that the port fragmentation index is greater than a preset fragmentation index threshold.
[0106] In this embodiment, different fragmentation levels can be pre-defined according to the PFI value, and a corresponding consolidation strategy can be determined for each fragmentation level. For example, a PFI of no more than 0.3 indicates a low fragmentation level, meaning that port resources are concentrated and port consolidation is not required; a PFI greater than 0.3 but no more than 0.6 indicates a medium fragmentation level, meaning that port resources are relatively scattered and port consolidation can be performed under set conditions. For example, the set conditions could be that the system load is lower than a set load threshold, or that the number of connections accessing the system is less than a set connection threshold, or that a set time point has been reached.
[0107] In addition, to prevent frequent port consolidation triggered when the port fragmentation index approaches a critical value, a hysteresis threshold mechanism can be set. Specifically, separate thresholds can be set for entering and exiting port consolidation, such as 0.6 for entering and 0.55 for exiting, to avoid frequent port consolidation triggering near the critical value.
[0108] In this embodiment of the application, in order to ensure the rationality of port consolidation, in addition to determining whether port consolidation is triggered based on PFI, other indicators such as port utilization and port distribution density can also be combined.
[0109] In one specific implementation, determining whether the hybrid resources meet the preset integration conditions based on the port fragmentation index includes the following steps:
[0110] Step 21: Determine the port consolidation threshold of the logical port pool based on the constraint length of the continuous port segment of the logical port pool;
[0111] Step 22: Determine the port utilization rate of the logical port pool based on the number of ports in the logical port pool and the total number of available ports;
[0112] Step 23: Determine the distribution density of continuous segments in the logical port pool based on the number of available continuous port segments and the length of each available continuous port segment;
[0113] Step 24: If the port fragmentation index is greater than the port integration threshold, and the port utilization rate is greater than the preset utilization rate threshold, and the continuous segment distribution density is greater than the preset distribution density threshold, then the mixed resources are determined to meet the preset integration conditions.
[0114] Specifically, in step 21, a port consolidation threshold can be calculated based on the length of the continuous port segment constraint. This port consolidation threshold can be the minimum fragmentation index that triggers port consolidation. The length of the continuous port segment constraint can be determined based on the constraint policy of the logical port pool. The constraint policy can include disabling port segment constraints, reserving port segment constraints, and port allocation policy constraints.
[0115] In step 22, the proportion of the total number of available ports to the total number of ports in the logical port pool can be calculated to obtain the port utilization rate. In step 23, the continuous segment distribution density can be calculated based on the number of available continuous port segments and the length of each available continuous port segment. This continuous segment distribution density can be understood as the probability density of available continuous port segments in the logical port pool.
[0116] Furthermore, in step 24, if it is determined that the port fragmentation index is greater than the port integration threshold, it indicates that the port dispersion in the logical port pool is high. If it is determined that the port utilization rate is greater than the preset utilization rate threshold, it indicates that the proportion of ports occupied in the logical port pool is high. If it is determined that the continuous segment distribution density is greater than the preset distribution density threshold, it indicates that there are many available continuous port segments in the logical port pool. When the above three conditions are met at the same time, it can be determined that the mixed resources meet the preset integration conditions.
[0117] Through steps 21-24 above, when the port fragmentation index is greater than the port consolidation threshold, the port utilization rate is greater than the preset utilization rate threshold, and the continuous segment distribution density is greater than the preset distribution density threshold, it can be determined that the mixed resources meet the preset consolidation conditions. Compared with triggering port consolidation only through the port consolidation threshold, port consolidation can be triggered when the port fragmentation index is high, the number of occupied ports is large, and the distribution of available continuous port segments is large. It does not need to be consolidated when the number of occupied ports is small or the distribution of available continuous port segments is small, thereby reducing the number of port consolidation times and avoiding frequent consolidation from affecting the running services.
[0118] It should be noted that when the constraint policy changes, the constraint length of the continuous port segment can be recalculated based on the new constraint policy, and the port integration threshold of the logical port pool can be re-determined based on the constraint length of the continuous port segment, so as to ensure the consistency between the constraint policy and port integration.
[0119] S140. If so, determine the port segment to be integrated in the logical port pool, migrate the services in the port segment to be integrated to the available continuous port segment, merge the available ports in the port segment to be integrated, and write the merged continuous port range into the logical port pool.
[0120] Specifically, after determining that the mixed resources meet the preset integration conditions, a port segment to be integrated can be identified in the logical port pool. This port segment to be integrated can be a port segment that requires service migration. For example, multiple used ports adjacent to available continuous port segments can be selected as the port segment to be integrated.
[0121] For example, if there are two available consecutive port segments, 10011~10020 and 10081~10090, in order to integrate the two available consecutive port segments into one, 10021~10030 can be identified as the port segment to be integrated. Services in 10021~10030 can be migrated to the available consecutive port segment 10081~10090, making 10021~10030 idle. Thus, 10021~10030 and 10011~10020 can form a larger consecutive port segment, namely 10011~10030.
[0122] In this embodiment of the application, in order to improve the integration efficiency, the logical port pool can be continuously divided to locate the area where the available continuous port segments are relatively dense, so as to prioritize port integration in the area.
[0123] In one specific implementation, determining the port segments to be integrated from the logical port pool includes the following steps:
[0124] Step 31: Split the logical port pool into two current local port pools and determine the port fragmentation index of each current local port pool;
[0125] Step 32: Further split the current local port pool with high port fragmentation index to obtain two new current local port pools, and determine the port fragmentation index of each current local port pool.
[0126] Step 33: Return to the previous step and continue splitting the current local port pool with a high port fragmentation index until the length of the current local port pool reaches the preset length threshold.
[0127] Step 34: In the current local port pool with a high port fragmentation index, the available continuous port segments with a length less than the continuous port segment constraint length are identified as the first port segment, and the available continuous port segments with a length equal to the continuous port segment constraint length are identified as the second port segment.
[0128] Step 35: If there are multiple first port segments, then the adjacent port segments of the first port segments are determined as the port segments to be integrated. If there are multiple second port segments, and the second port segments are not adjacent, then the adjacent port segments of the second port segments are determined as the port segments to be integrated.
[0129] In step 31, the logical port pool can be split into two current local port pools with the same number of ports, and then the port fragmentation index of each current local port pool can be calculated.
[0130] Furthermore, in step 32, the current local port pool with a high port fragmentation index can be determined from the two current local port pools, and then the current local port pool with a high port fragmentation index can be further split to obtain two new current local port pools, and the port fragmentation index can be calculated.
[0131] Furthermore, in step 33, step 32 can be returned to continue splitting the current local port pool with a high port fragmentation index. This process is repeated until the length of the current local port pool reaches a preset length threshold in order to locate the area where available continuous port segments are relatively dense.
[0132] Furthermore, in step 34, after the length of the current local port pool reaches the preset length threshold, the current local port pool with the high port fragmentation index can be identified from the two latest current local port pools, and it can be regarded as a region with relatively dense available continuous port segments. Then, in the current local port pool, available continuous port segments with a length less than the continuous port segment constraint length are identified, that is, available continuous port segments with incomplete continuous ports are identified as the first port segment, and available continuous port segments with a length equal to the continuous port segment constraint length are identified, that is, available continuous port segments with complete continuous ports are identified as the second port segment.
[0133] Furthermore, in step 35, if there are multiple first port segments, it means that there are multiple available continuous port segments that are not full. At this time, the adjacent port segments of the first port segment can be identified as port segments to be integrated, so as to migrate the service of the adjacent port segment to other first port segments, thereby releasing the adjacent port segment and increasing the length of available continuous port segments.
[0134] Furthermore, if there are multiple second port segments and each second port segment is not adjacent, it means that there are multiple available consecutive port segments that are completely vacant and not adjacent to each other. In this case, the adjacent port segments of the second port segment can be identified as port segments to be integrated, so as to migrate the service of the adjacent port segment to other second port segments, thereby releasing the adjacent port segment and increasing the length of available consecutive port segments.
[0135] Through steps 31-35 above, areas with relatively dense available continuous port segments can be quickly located, and port consolidation can be carried out in a targeted manner in these areas. Compared with consolidating all discrete available ports in the logical port pool, this can greatly improve consolidation efficiency. Furthermore, even when multiple available continuous port segments do not reach the continuous port segment constraint length, or when multiple available continuous port segments reach the continuous port segment constraint length but are not adjacent, adjacent port segments can be selected for consolidation. This enables the rapid reorganization of scattered idle ports, allowing the logical port pool to provide a larger continuous port range for other services in the future.
[0136] Specifically, after identifying the port segments to be integrated, the services (i.e., business) of each port within the port segment to be integrated can be migrated to an available continuous port segment. For example, they can be migrated to another available continuous port segment that is furthest away from the available continuous port segment to be merged.
[0137] In this embodiment of the application, during the service migration process, a port hot migration method can be used to gradually and smoothly migrate the service connections on the port segment to be integrated to other idle ports. During the migration process, the service connections are not interrupted and the user is unaware of the process.
[0138] The hot migration process can be as follows: bind the service of the source port to the target port, and migrate the active connection state of the source port (such as TCP sequence number and session context) to the target port; then, through a load balancer or network rules, gradually redirect traffic destined for the source port to the target port; once the target port has fully taken over the traffic, the source port is released. The load balancer can dynamically adjust the traffic weights of the source and target ports to gradually migrate traffic from the source port to the target port.
[0139] After the service migration is completed, the released available ports can be merged, and the merged contiguous port range can be written into the logical port pool to form a larger contiguous port range with the original available contiguous port range for future port allocation.
[0140] In this embodiment, in addition to fragmenting port consolidation, idle or underutilized ports can be reclaimed and integrated for later reallocation to services with higher demand. For example, during periods of low traffic at night, idle or underutilized ports can be prioritized for reclamation so they can be reallocated before peak hours the following day. This approach significantly improves port scheduling efficiency and effectively reduces the risk of allocation failures due to fragmented port resources.
[0141] Furthermore, this application embodiment can also achieve horizontal port scaling. When it is detected that the port resources of a certain service group are about to be exhausted, the system can automatically trigger a horizontal scaling strategy to improve resource utilization and ensure the needs of high-priority services. For example, while ensuring the normal operation of high-priority services, idle ports can be reclaimed from lower-priority service groups and redistributed to service groups with urgent needs according to preset priority rules.
[0142] For example, if a video streaming service group suddenly needs more ports to accommodate a surge in user connections, the system can temporarily reclaim idle port resources from another lower-priority background task service group, quickly alleviating the port shortage in the former. This horizontal scaling mechanism ensures that high-priority core services still have sufficient ports available in case of emergencies, thereby avoiding service interruptions and maximizing the utilization of port resources throughout the system.
[0143] Furthermore, this application embodiment also supports cross-domain collaboration. Under mixed resources, the system can flexibly schedule port resources in different regions through cross-domain collaboration strategies. For example, the system's gateway component can act as a coordinator. When port resources are scarce in an availability zone or private cloud environment, it can temporarily allocate idle port resources from another region and achieve seamless use of cross-region ports through the gateway's logical mapping. Services are unaware of this process and continue to operate as if using local ports.
[0144] For example, if an application in a private data center runs out of ports, the system can automatically allocate ports from the public cloud's spare port pool for that application, and the gateway will redirect user traffic to the new port. Cross-domain collaboration ensures that when resource bottlenecks occur in a single region, the entire system can still effectively utilize the surplus port resources in other regions, thereby improving the resilience and reliability of services in cross-regional deployment scenarios.
[0145] The hybrid resource network port management method provided in this application determines the number of available continuous port segments, the length of each available continuous port segment, and the total number of available ports in the logical port pool of hybrid resources. Then, based on the number of available continuous port segments, the length of each available continuous port segment, the total number of available ports, and the constraint length of continuous port segments in the logical port pool, it measures the dispersion of available ports in the hybrid resources to obtain a port fragmentation index. Based on the port fragmentation index, it determines whether the hybrid resources meet preset integration conditions. If so, it identifies port segments to be integrated in the logical port pool, migrates the services within the port segments to be integrated to available continuous port segments, and merges the available ports therein. Furthermore, the merged continuous port range is written into the logical port pool to achieve port integration. This method can evaluate the dispersion of available ports in mixed resources by using information such as the number and length of available continuous port segments. Thus, when ports in mixed resources are distributed in a scattered and discontinuous manner, idle ports can be organized through service migration, and scattered ports can be centralized to facilitate efficient port utilization. This can avoid new connection rejection due to port fragmentation and prevent scattered ports from failing to meet the needs of large ports, thereby improving network performance. In addition, it can also facilitate centralized management of port ranges, reduce resource management overhead, and minimize port conflicts.
[0146] In addition to port management, this application embodiment can also perform port health assessment and adjust the allocation strategy of abnormal ports in a timely manner to improve service quality.
[0147] In some implementations, the method provided in this application further includes the following steps:
[0148] Step 41: Obtain the network operation parameters of each used port in the logical port pool, and determine the port health of the used ports based on the network operation parameters;
[0149] Step 42: In response to the detection of a decrease in the port health of a used port, or a port health lower than a preset health threshold, other idle ports are started, and some of the traffic of the used port is allocated to other idle ports.
[0150] The network operating parameters can include packet loss rate, average latency, and error rate. In step 41, the port health of the used ports can be determined using the network operating parameters. For example, the port health can be determined based on the difference between each parameter in the network operating parameters and its corresponding threshold; alternatively, the network operating parameters can be input into a pre-trained health assessment model to obtain the port health.
[0151] Furthermore, in step 42, if the port health of a used port is detected to have decreased, or if the port health is lower than a preset health threshold, it indicates that the latency of the used port may be significantly increased. In this case, other idle ports can be activated, and some traffic from the used port can be allocated to those idle ports. Additionally, the services associated with the used port can be migrated to resources with better network conditions.
[0152] Through steps 41-42 above, end-to-end detection and dynamic optimization can be achieved, network performance bottlenecks can be identified and alleviated in a timely manner, and all services can be ensured to run in the best condition at all times, providing users with a stable and efficient experience.
[0153] In this embodiment of the application, to ensure service quality, Quality of Service (QoS) measures can also be set to ensure that the performance indicators of critical services meet the standards at the port level. For example, a gateway module can apply corresponding QoS policies to each port, such as reserving a minimum bandwidth for traffic on a specific port or setting an upper limit on the total number of connections on certain ports.
[0154] By implementing Quality of Service (QoS) policies, critical service ports can be guaranteed stable bandwidth and responsiveness when competing for network resources, preventing service quality from being affected by overloaded traffic from other sources. For example, a video conferencing application port can be configured with high priority and guaranteed bandwidth to ensure smooth audio and video transmission during the meeting; similarly, the number of concurrent connections from a single IP address can be limited on public API ports to prevent malicious calls from causing service congestion. Through fine-grained QoS management at the port level, operations personnel can customize network resource allocation policies for different types of services, thereby meeting the requirements of Service Level Agreements (SLAs).
[0155] In this embodiment of the application, to ensure the rationality of port allocation, deep learning algorithms can be used in conjunction with time-series analysis of network traffic to intelligently predict future port demands and formulate allocation plans in advance. For example, based on historical service deployment data, network traffic patterns, and business types (for example, high-concurrency web services typically require a large number of temporary ports for short-term connections, while Internet of Things (IoT) services often require stable ports for long-term connections), the future number and type of ports required by each business group (a set of services divided by application or service type) can be predicted.
[0156] Furthermore, based on prediction results, corresponding port segments can be dynamically allocated from the logical port pool and pre-assigned to relevant business groups. This ensures that critical applications have the necessary port resources before peak traffic arrives. For example, for e-commerce websites experiencing a surge in traffic at midday, the system can reserve sufficient short-connection ports for its web service group in advance. Similarly, for IoT (Internet of Things) device gateway services requiring long connections, a port range for continuous connections can be pre-allocated. This proactive pre-allocation mechanism reduces the risk of service delays or interruptions caused by port resource scarcity, ensuring stable operation of services even during traffic surges.
[0157] In some implementations, the method provided in this application further includes the following steps:
[0158] Step 51: Obtain historical port usage data for each service;
[0159] Step 52: For each service, input the historical port usage data into the pre-trained time series prediction model to obtain the predicted number of ports for the service within a set future time period.
[0160] Step 53: For each service, input the historical port usage data into the pre-trained clustering model to obtain the port usage type corresponding to the service;
[0161] Step 54: Based on the predicted number of ports and the port usage type, allocate the corresponding ports for the service in the logical port pool.
[0162] Historical port usage data can include port utilization rate, business access volume growth curves, and periodic peak and trough characteristics of traffic. In step 51, historical port usage data for each service can be obtained. After obtaining the historical port usage data, the data can be cleaned and analyzed to extract key characteristics affecting port demand, such as the surge in traffic to an online marketplace's web service during holidays.
[0163] Furthermore, in step 52, for the first service, historical port usage data can be input into a pre-trained time series prediction model to learn the service scale change trend, thereby predicting the number of ports needed in a future set time period, i.e., predicting the number of ports.
[0164] For example, a time series forecasting model could be a Long Short-Term Memory (LSTM) network model, which can predict the number of ports needed in the future using historical port usage data.
[0165] Furthermore, in step 53, for the first service, historical port usage data can be input into a pre-trained clustering model to classify the port usage patterns of different services, thereby obtaining the corresponding port usage type for the service, such as bursty or stable. The clustering model can be a K-Means model, capable of classifying the port usage patterns of each service based on historical port usage data.
[0166] For example, clustering models can reveal that some backend management services have consistently stable traffic, while frontend web services experience large fluctuations in traffic. Therefore, the two types of services use different port types.
[0167] Furthermore, in step 54, corresponding ports can be allocated to services based on the predicted number of ports and port usage types. For example, differentiated port pool planning can be pre-defined for different port usage types, allocating fixed ports or port segments to services with long connection cycles and stable operation.
[0168] For example, a dedicated section for the classic port 3306 can be reserved for the MySQL database service, or 3306 can be directly specified to reduce changes and improve compatibility. It should be noted that these ports are permanently bound to the service and will not be changed unless a long-term trend change is anticipated.
[0169] Through steps 51-54 above, predictive allocation of port demand can be achieved, thereby improving resource utilization and ensuring that sufficient port resources are provided at the right time. This can avoid congestion caused by insufficient ports, prevent long-term idle and wasteful ports, improve port utilization, and at the same time, greatly reduce the workload of maintenance personnel in manually adjusting ports.
[0170] In this application embodiment, in order to deal with possible conflicts during port usage, various port conflict scenarios can be identified and flexible strategies can be adopted to resolve them, ensuring stable service operation without interference.
[0171] For example, a rule-based and real-time monitoring-based conflict detection mechanism can be pre-built to promptly identify anomalies in port usage. For instance, when two services attempt to bind to the same port, or a user attempts to use a port beyond their authorized scope, the system immediately identifies the conflict. This mechanism covers common scenarios including port duplication detection and cross-user port out-of-bounds usage detection, providing a foundation for subsequent conflict handling. Through automated detection, operations personnel can identify potential port conflict risks without manual troubleshooting, significantly improving reliability and security in multi-user environments.
[0172] For detected port conflicts, the system can select the optimal solution based on the built-in adaptive policy library and the type of conflict, achieving zero-manual intervention in handling port conflicts. This minimizes service interruptions and manual configuration adjustments caused by port conflicts, ensuring stable service operation without interference, especially for large-scale distributed systems and cloud environments.
[0173] The policy library can include port migration and virtual port mapping. Port migration refers to the system automatically and smoothly migrating a service to an idle port when a conflict occurs, updating relevant configurations accordingly to quickly resolve the conflict without affecting external services. Virtual port mapping decouples logical ports from physical ports at the gateway layer, allowing multiple instances to securely share the same logical port number while using different physical ports without interference.
[0174] For example, in a multi-user cloud platform, if two users choose the same port number to run their respective applications, the system can enable port drifting for one of the users, automatically switching their application to the new port. At the same time, the virtual port mapping of the gateway ensures that the client can still access the application through the original port number (by being forwarded to the actual new port by the gateway module).
[0175] In some implementations, the method provided in this application further includes:
[0176] In response to receiving a port request for the logical port pool, and the port specified in the port request is occupied, the specified port is mapped to another free port, and data is transmitted for the service corresponding to the port request through the other free port;
[0177] In response to receiving a port request for a logical port pool, and if no available port exists in the logical port pool, the port specified in the port request is virtualized into multiple logical sub-ports, and data is transmitted for the service corresponding to the port request through the logical sub-ports.
[0178] Specifically, if a port request is received and the port specified in the port request is occupied, the specified port can be mapped to another free port through remapping. For example, a virtual port number corresponding to the specified port can be generated to map the specified port to the free port corresponding to the virtual port number, ensuring that the port request can still be routed correctly, and then data can be transmitted to the service corresponding to the port request through other free ports.
[0179] Furthermore, if a port request is received and there are no available ports in the logical port pool, a virtual port extension strategy can be used to virtualize the specified port into multiple logical sub-ports. For example, physical port 8080 can be virtualized into 100 logical sub-ports (8080:1, 8080:2, ..., 8080:100) to support more services without increasing the number of physical ports, and then transmit data for the services corresponding to the port request through the logical sub-ports.
[0180] The above implementation methods ensure that service remains available even in the event of port contention and conflicts. In addition to the strategies described above, a policy orchestration engine can also be provided. Developers or operations personnel can invoke the policy orchestration engine, use scripting languages such as Groovy to write custom conflict handling logic, and load it into the policy library.
[0181] To mitigate the risks of trial and error, the system also provides a strategy effectiveness simulation testing environment, allowing for the verification of new strategies in a sandbox. This includes simulating scenarios where multiple services simultaneously request the same port, observing whether custom strategies execute as expected. Through an open strategy library, it offers both out-of-the-box solutions and allows users room for independent optimization, ensuring that port conflicts can be automatically and efficiently resolved in various complex scenarios.
[0182] In this embodiment, considering network security during port usage, a dynamic security isolation mechanism can be provided through linkage with firewalls and access control systems. Specifically, the system can automatically generate fine-grained firewall rules tailored to the needs of each business group, ensuring minimal port access and strict access control.
[0183] For example, for business groups marked as API services, the system will by default only open the HTTPS (443) port and close other irrelevant ports; for database service groups, only the specific ports required for database access will be opened. This method of automatically generating rules based on business type significantly reduces the risk of human configuration errors and improves the level of security isolation in multi-service coexistence environments.
[0184] Furthermore, when port assignments change, the system can immediately synchronize the changes to the gateway and related firewall and security group configurations. In other words, once a new port is put into use or an existing port is released, the corresponding access control lists and security group rules will be automatically updated to ensure that the new port can be accessed correctly, while ports that are no longer in use will be immediately closed to avoid exposing risks.
[0185] For example, if an application switches from port 8080 to 8090 due to port migration, the system will update its firewall policy in real time, closing external access to port 8080 and opening port 8090, thus seamlessly synchronizing security policies with port changes. This automatic synchronization mechanism ensures that changes to port management policies do not create security vulnerabilities, and users do not need to worry about the impact of frequent port adjustments on security protection, greatly improving the system's security and reliability.
[0186] In this embodiment, considering the impact of network topology on performance in large-scale distributed systems, a topology-aware optimization strategy can be introduced for port allocation. When making port allocation decisions, the system can comprehensively consider the physical network structure to reduce communication latency and improve throughput. Specifically, this may include:
[0187] Localized port allocation: Based on the network topology, ports for related services are preferentially allocated to servers that are physically closer. The system tends to select ports on servers located on the same switch or within the same rack for frequently communicating service modules to reduce data hops and latency in the network. This localized port allocation strategy can significantly reduce communication latency and improve overall service response speed when two services need to interact frequently, making it particularly suitable for latency-sensitive applications (such as high-frequency trading and real-time gaming).
[0188] Proximity Priority and Intelligent Traffic Scheduling: For services deployed across regions, the system can prioritize allocating port resources to regions geographically close to users or data sources. Then, a global gateway is used to implement cross-regional traffic scheduling, automatically directing user requests to the nearest port for processing. In other words, users will be served by the geographically nearest data center, significantly reducing network latency and optimizing user experience.
[0189] For example, a service provider deploys service nodes in different regions. When a user in region A makes a request, the system prioritizes allocating a service port for the request from the port resource pool in region A and then directs the traffic to the data center in region A for processing via a global gateway. Compared to having the request from a user in region A access a node in region B, this proximity-based allocation and scheduling strategy can minimize latency.
[0190] This application embodiment fully utilizes the geographical advantages of the network environment through topology-aware port optimization, providing performance guarantees for cross-regional service deployment and improving service quality.
[0191] For the same purpose, embodiments of this application also provide a hybrid resource network port management system, which includes a dynamic adjustment engine; the dynamic adjustment engine is used for:
[0192] In the logical port pool of mixed resources, determine the number of available contiguous port segments, the length of each available contiguous port segment, and the total number of available ports;
[0193] Based on the number of available continuous port segments, the length of each available continuous port segment, the total number of available ports, and the continuous port segment constraint length of the logical port pool, a port fragmentation index is determined, which reflects the degree of dispersion of available ports in the mixed resources.
[0194] Based on the port fragmentation index, determine whether the hybrid resources meet the preset integration conditions;
[0195] If so, determine the port segment to be integrated in the logical port pool, migrate the services in the port segment to be integrated to the available continuous port segment, merge the available ports in the port segment to be integrated, and write the merged continuous port range into the logical port pool.
[0196] Based on the above embodiments, optionally, the dynamically adjusted engine is also used for:
[0197] Determine the service connection type of each port in the logical port pool, and classify all ports according to the service connection type of each port;
[0198] For each port category, the fragmentation index corresponding to the port category is determined based on the number of available contiguous port segments, the length of each available contiguous port segment, the total number of available ports, and the constraint length of the contiguous port segments.
[0199] The fragmentation indices corresponding to each port category are merged according to the preset classification weights to obtain the port fragmentation index.
[0200] Based on the above embodiments, optionally, the dynamically adjusted engine is also used for:
[0201] Obtain the historical fragmentation index determined within each historical detection period;
[0202] The historical fragmentation index of each historical detection period and the port fragmentation index are merged according to the preset period weight to obtain the final port fragmentation index.
[0203] Based on the above embodiments, optionally, the dynamically adjusted engine is also used for:
[0204] The port consolidation threshold of the logical port pool is determined based on the consecutive port segment constraint length of the logical port pool;
[0205] The port utilization rate of the logical port pool is determined based on the number of ports in the logical port pool and the total number of available ports.
[0206] The distribution density of the continuous segments in the logical port pool is determined based on the number of available continuous port segments and the length of each available continuous port segment.
[0207] If the port fragmentation index is greater than the port integration threshold, and the port utilization rate is greater than the preset utilization rate threshold, and the continuous segment distribution density is greater than the preset distribution density threshold, then the mixed resource is determined to meet the preset integration conditions.
[0208] The length of the continuous port segment constraint is determined based on the disabled port segment constraint, the reserved port segment constraint, and the port allocation policy constraint of the logical port pool.
[0209] Based on the above embodiments, optionally, the dynamically adjusted engine is also used for:
[0210] The logical port pool is split into two current local port pools, and the port fragmentation index of each current local port pool is determined.
[0211] The current local port pool with a high port fragmentation index is further split to obtain two new current local port pools, and the port fragmentation index of each current local port pool is determined.
[0212] Return to the step of continuing to split the current local port pool with a high port fragmentation index until the length of the current local port pool reaches the preset length threshold.
[0213] In the current local port pool with a high port fragmentation index, the available continuous port segment with a length less than the continuous port segment constraint length is determined as the first port segment, and the available continuous port segment with a length equal to the continuous port segment constraint length is determined as the second port segment.
[0214] If there are multiple first port segments, then the adjacent port segments of the first port segments are determined as port segments to be integrated. If there are multiple second port segments, and the second port segments are not adjacent, then the adjacent port segments of the second port segments are determined as port segments to be integrated.
[0215] Based on the above implementation methods, optionally, the dynamically adjusted engine is also used to determine the port fragmentation index according to the following formula:
[0216] ;
[0217] In the formula, Port fragmentation index, This represents the number of available consecutive port segments. Let i be the length of the i-th available continuous port segment. This represents the total number of available ports. This represents the constraint length for continuous port segments.
[0218] Based on the above embodiments, optionally, the hybrid resource network port management system further includes a quality of service (QoS) assurance module, which is used for:
[0219] Obtain the network operation parameters of each used port in the logical port pool, and determine the port health of the used port based on the network operation parameters;
[0220] In response to the detection of a decrease in the port health of the used port, or the port health being lower than a preset health threshold, other idle ports are activated, and a portion of the traffic from the used port is allocated to the other idle ports.
[0221] Based on the above embodiments, optionally, the hybrid resource network port management system further includes a port pre-allocation module, which is used for:
[0222] Retrieve historical port usage data for each service;
[0223] For each service, the historical port usage data is input into a pre-trained time series prediction model to obtain the predicted number of ports for the service within a set future time period.
[0224] For each service, the historical port usage data is input into a pre-trained clustering model to obtain the port usage type corresponding to the service;
[0225] Based on the predicted number of ports and the port usage type, a corresponding port is allocated for the service in the logical port pool.
[0226] Optionally, based on the above embodiments, the hybrid resource network port management system further includes a conflict resolution engine, which is used for:
[0227] In response to receiving a port request for the logical port pool, and the port specified in the port request is occupied, the specified port is mapped to another idle port, and data is transmitted for the service corresponding to the port request through the other idle port;
[0228] In response to receiving a port request for the logical port pool, and the logical port pool does not have any available ports, the port specified in the port request is virtualized into multiple logical sub-ports, and data is transmitted for the service corresponding to the port request through the logical sub-ports.
[0229] The hybrid resource network port management system provided in this application embodiment can execute the steps in the hybrid resource network port management method provided in this application method embodiment, and has the execution steps and beneficial effects, which will not be repeated here.
[0230] Figure 2 This is a schematic diagram of a hybrid resource network port management system provided in an embodiment of this application, as shown below. Figure 2 As shown, the hybrid resource network port management system includes a resource abstraction layer (located in the unified port management framework), a port pre-allocation module, a conflict resolution engine, an isolation and dynamic firewall module, a dynamic adjustment engine, a quality of service assurance module, a gateway module, a port optimization module, and an open API interface module.
[0231] First, the system boots up at the starting node and begins executing port management tasks. Then, it enters the resource abstraction layer within the unified port management framework. This resource abstraction layer maps ports to a unified logical port pool and provides a unified port management view.
[0232] Figure 3 This application provides a resource abstraction process for a unified port management framework, such as... Figure 3 As shown, firstly, the resource adapter can load multiple platform adapters and simultaneously collect port usage data from each platform; it then sends port configuration / allocation commands to each platform. Next, the resource abstraction layer can perform logical abstraction of resource ports, abstracting port numbers, network protocols, and naming conventions from different platforms into a unified logical format. Then, it can aggregate port information from all platforms, uniformly record port status, and save metadata (resource ownership, usage tags, security levels, etc.) to build a logical port pool model. Finally, the port management and control module can output logical port pool information to upstream modules (such as the port pre-allocation module and conflict resolution engine) and support real-time policy invocation.
[0233] Furthermore, the logical port pool model can also be used for status display, providing visualization methods such as icons, graphs, and alarms. Additionally, the logical port pool model can provide real-time feedback on the status of each port to the resource adapter.
[0234] refer to Figure 2 After resource abstraction is complete, the system can proceed to either the port pre-allocation module or the conflict resolution engine. The port pre-allocation module collects historical port usage data (historical service data, traffic patterns, network topology, etc.), uses deep learning algorithms to predict port demand, and reserves necessary ports based on traffic peaks. For details, please refer to the previous descriptions regarding the prediction of port quantity and type. The conflict resolution engine performs conflict detection and adaptive conflict resolution. For details, please refer to the previous descriptions regarding remapping or virtual port expansion.
[0235] refer to Figure 2 After the port pre-allocation module, the system enters the dynamic adjustment engine. The dynamic adjustment engine includes horizontal scaling, vertical optimization, and cross-domain collaboration to optimize port usage in real time during runtime, ensuring business continuity. Horizontal scaling refers to reclaiming idle ports from lower-priority service groups and reallocating them to service groups with urgent needs, according to preset priority rules, while ensuring the normal operation of high-priority services. Vertical optimization can be found in the previous description of port integration. Cross-domain collaboration refers to the flexible scheduling of port resources across different regions.
[0236] Specifically, the dynamic adjustment engine can continuously monitor port usage and traffic load in short cycles. For example, it can scan the current active connection count, bandwidth usage, response latency, and other metrics of each port every few seconds to tens of seconds. Once abnormal patterns are detected in certain ports (such as a sudden increase in the number of connections or long periods of inactivity), port adjustments can be made, such as releasing abnormal ports.
[0237] Furthermore, the dynamic adjustment engine introduces a "port fragmentation index" to quantify the efficiency of current port allocation. Considering that after multiple additions and deletions to port allocation, numerous small port gaps (fragments) may appear, making it difficult for new services to find continuous port segments or efficiently utilize remaining ports when requesting ports, the system can calculate the fragmentation index based on port usage density and continuity. The value ranges from 0 to 1, with higher values indicating more fragmented and less compact port utilization.
[0238] The dynamic adjustment engine formulates adaptive port adjustment measures based on real-time monitoring data and port fragmentation index. When the port fragmentation index exceeds the threshold, a port consolidation process can be triggered. The consolidation process uses "port hot migration" technology (the system gradually switches the communication of certain services to new ports to free up contiguous port space without interrupting business operations).
[0239] For example, if a service currently occupies ports scattered across two segments, 10000–10010 and 10050–10060, with most of them idle, the system can seamlessly migrate and consolidate its active connections to the 10000–10020 segment, freeing up the 10050–10060 segment for other services. The entire adjustment process is seamless for the business; existing connections remain connected, and new connections are redirected to the adjusted ports, achieving a smooth online adjustment. Through a dynamic adjustment engine, port distribution can be continuously optimized during operation, ensuring resource supply during peak periods and reclaiming and reorganizing fragmented resources during off-peak periods for efficient future use, thus enabling the business to operate stably for extended periods.
[0240] refer to Figure 2 After the engine is dynamically adjusted, it can enter the gateway module. The gateway module is used to uniformly manage traffic and enforce policies at the network access layer, achieving dual protection of security and performance. It includes a traffic proxy layer, a policy enforcement layer, and a security linkage module.
[0241] The traffic proxy layer operates at layers 4 and 7 of network transport, transparently proxying and forwarding incoming traffic. It supports proxying multiple protocols, including traditional TCP / UDP and QUIC. Through the traffic proxy layer, the ports actually used by the backend services can be hidden from the outside world, with the gateway module uniformly receiving and forwarding client requests.
[0242] For example, an application may actually run on internal port 50000, while the gateway can listen on standard ports 80 / 443 to provide services to the outside world. In this way, the internal port layout can be flexibly adjusted without affecting external access.
[0243] The policy enforcement layer can obtain policy configurations in real time and automatically generate and apply access control lists and quality optimization policies based on the port's metadata tags. For example, ports marked as "internal services" will be automatically added to the firewall whitelist, allowing only internal network access; and higher QoS guarantees will be applied to high-priority business ports. The policy enforcement layer ensures that the security rules and traffic management policies for each port take effect immediately on the gateway. Once the port's purpose or security level changes, the gateway will dynamically adjust the corresponding rules without manual intervention.
[0244] Especially in terms of service quality optimization, the policy enforcement layer can formulate diverse QoS (Quality of Service) policies for different scenarios to ensure that all types of services receive the necessary performance guarantees. For example, for low-latency sensitive real-time communication ports (such as video conferencing, online games, or high-frequency trading), the gateway module can assign them higher queue priority to ensure that relevant data packets are forwarded quickly, minimizing transmission latency and jitter. As another example, for high-bandwidth, non-real-time file transfer ports, the policy enforcement layer can shape and rate-limit their traffic to meet basic transmission requirements while preventing them from instantly saturating the link bandwidth, thereby avoiding impacting the network performance of other critical services.
[0245] Meanwhile, the policy enforcement layer also fully considers quality assurance issues in multi-user and open service scenarios. For example, in a multi-user environment, the gateway module can achieve fair competition of traffic on different user ports by allocating bandwidth quotas according to users or using a weighted scheduling algorithm, ensuring that high traffic from any user does not crowd out network resources of other users, thus maintaining overall performance balance.
[0246] Furthermore, for ports providing public services such as APIs, the gateway module can implement connection limits or request rate limits for each IP address to prevent a single user (or malicious traffic) from exhausting port resources and affecting the response of normal users. When a port is detected to be continuously under high load, the gateway module can also work with other modules to initiate dynamic traffic distribution strategies. For example, it can temporarily open additional backup port instances and redirect some new request traffic to these instances to alleviate the pressure on the original port and maintain stable service quality. Through these quality optimization strategies, the gateway module can flexibly adjust traffic distribution and control based on real-time network conditions, ensuring that critical services maintain stable and efficient operation even under high concurrency or abnormal traffic conditions.
[0247] The security linkage module can be deeply integrated with intrusion detection or prevention systems to achieve coordinated response to security incidents. When an intrusion detection system detects abnormal traffic on a port (such as port scanning or suspicious payloads), the security linkage module can immediately notify other modules to isolate or remap the traffic on that port, blocking potential attacks. Simultaneously, the gateway module can also handle TLS (Transport Layer Security) or SSL (Secure Sockets Layer) termination, centrally managing certificates and inspecting traffic content after decryption, protecting backend services from security risks associated with encrypted traffic. In practical applications, the gateway module essentially forms a unified "firewall + traffic scheduling" defense between port management and the external network, improving both security and access efficiency.
[0248] For example, Figure 4 This is a process diagram of a gateway module provided in an embodiment of this application, as shown below. Figure 4 As shown, after receiving a request, the traffic proxy layer can be used to transparently proxy client traffic, supporting protocols (TCP, UDP, or QUIC, etc.) to mask the real backend port structure, and serving as a unified access point for external services. The policy enforcement layer can dynamically generate control access policies (ACL, QoS, access range, etc.) based on metadata tags, taking effect in real time without manual intervention, and marking ports with tags such as "internal service" and "high-priority business". The security linkage module can integrate intrusion detection / prevention systems; detect abnormal traffic (such as port scanning, DDoS, etc.); support dynamic isolation, TLS termination, and certificate verification; and can interface with the port management and control module for isolation or remapping.
[0249] refer to Figure 2 After passing through the port pre-assignment module, the system can proceed to the conflict resolution engine. Following the conflict resolution engine, it can then access either the isolation and dynamic firewall module or the quality of service (QoS) assurance module. The isolation and dynamic firewall module can dynamically generate firewall rules and synchronize them in real time; the specific process can be found in the previous description. The QoS assurance module can perform QoS control and port health assessment; the specific process can also be found in the previous description.
[0250] refer to Figure 2 After passing through the Quality of Service (QoS) assurance module, you can enter the port optimization module. The port optimization module can perform localized port allocation, using a strategy of prioritizing neighboring areas and intelligent traffic scheduling to allocate ports. For details, please refer to the previous description.
[0251] refer to Figure 2 After passing through the gateway module, you can enter the open API interface module. The open API interface module provides RESTful API interfaces and provides SDK (Software Development Kit) support.
[0252] The open API module facilitates integration with third-party systems and automated control, enabling port management capabilities to be seamlessly integrated into existing operations and maintenance systems. Specifically, the open API module provides a standard REST API interface, allowing external systems to query and control the port management platform.
[0253] For example, the operations and maintenance platform can use APIs to obtain a list of currently available ports, request the reservation of a batch of ports for new application deployment, or call interfaces to adjust certain policy parameters. In addition, the open API module can also provide a policy customization interface, allowing operations and maintenance personnel to upload new port allocation policies or conflict handling rules via API, triggering the system to adopt the new policy, and querying the policy execution effect via API. An open API module for monitoring can also be provided, supporting the push of real-time data to third-party monitoring or alarm systems to achieve cross-platform data linkage.
[0254] Furthermore, to reduce integration complexity, the open API module provides a corresponding developer toolkit (SDK) that supports mainstream programming languages such as Java, Python, and Go. Developers can use their familiar languages to invoke port management functions; for example, they can call the SDK in DevOps pipeline scripts to automatically request the necessary ports and release port resources after deployment in the test environment. The open API module allows the entire system to be embedded as a module into various cloud management platforms, container orchestration systems, or continuous integration or continuous deployment processes, greatly expanding its application scope.
[0255] remove Figure 2 In addition to the modules shown, the system also provides a full-link monitoring system to ensure the visualization and controllability of port management in actual operation, and to collect and analyze data at every stage of port usage, specifically including:
[0256] Distributed probe deployment: Lightweight probe processes are deployed on key nodes (such as gateways and hosts hosting important service instances) to collect end-to-end performance metrics in real time. These include: request processing latency through the gateway, response time of each port, connection establishment success rate, packet loss rate, etc. The data from these probes can be aggregated to a central monitoring platform to provide data support for evaluating the effectiveness of port management.
[0257] Anomaly Detection Model: The monitoring system not only displays data but also uses machine learning models to detect and issue alerts for anomalies. By employing unsupervised learning algorithms such as Isolation Forest to build an anomaly behavior model, when a port's metrics deviate from the normal range (e.g., a port with normally low traffic suddenly experiences sustained high load, or its response time is significantly higher than the baseline), the model will identify it as an anomaly and issue an alert. Combined with this anomaly detection mechanism, the operations team can promptly detect and handle anomalies caused by port abuse, attacks, or configuration errors.
[0258] Visualization: The monitoring system integrates visualization tools such as Grafana, providing real-time monitoring dashboards and historical data reports. Users can intuitively view the current port allocation graph, traffic trends for each service port, and any abnormal alerts. For example, the large screen can display the port utilization rate curve over a period of time, allowing for rapid identification of the cause if a critical port experiences a performance bottleneck. End-to-end monitoring ensures that port management is no longer a black box operation, but rather transparent and observable, providing a basis for further optimization and decision-making.
[0259] The hybrid resource network port management system provided in this application embodiment has at least the following technical effects:
[0260] 1. Unified port management across heterogeneous environments, reducing operational complexity: It breaks down barriers between different platforms, incorporating ports of various resources such as physical machines, virtual machines, containers, and serverless functions into a unified pool for management. Operations personnel no longer need to configure port plans separately for each platform, reducing human error and communication costs, saving significant manpower, and lowering the risk of business interruptions due to port conflicts;
[0261] 2. Intelligent Prediction Improves Port Utilization: Leveraging machine learning prediction models, the system can anticipate changes in business demand and dynamically adjust port allocation. Actual testing showed that introducing AI prediction improved port resource utilization by over 40%, meaning users can support more business load with fewer ports, reducing hardware and IP resource costs. Simultaneously, optimized port allocation reduces performance bottlenecks caused by insufficient ports during peak periods, improving the user experience.
[0262] 3. Dynamic Adjustment Ensures Business Continuity: Through dynamic adjustment of the engine and port hot migration technology, port reconfiguration and reorganization can be completed without downtime. Even in the event of sudden traffic surges or temporary changes in demand, the system can respond in real time, avoiding service interruptions caused by manual intervention;
[0263] 4. Deep Integration of Security Policies and Port Management: The built-in gateway module enables security policies to be synchronized with port management. When a port changes, corresponding access control and security detection automatically adjust, eliminating the need for security personnel to repeatedly modify firewall or intrusion detection rules. This integration significantly improves security response speed and coverage, reducing vulnerability windows. For example, when abnormal traffic is detected, the system can immediately remap the port and isolate the threat, ensuring service security.
[0264] 5. Automated Conflict Resolution in Complex Scenarios: The system can still automatically coordinate resources even in complex scenarios with multiple users and multiple services competing for ports. Compared to manual intervention, automated strategies can quickly handle conflicts. For example, it can use NAT (Network Address Translation) technology to alleviate port shortages, allowing multiple users to share one or a few addresses to access the external network simultaneously.
[0265] 6. Open APIs for Easy Integration: Thanks to comprehensive API and SDK support, users can integrate these systems without abandoning their existing operations and monitoring platforms. For example, the system can be integrated into existing IT service management processes or DevOps toolchains as an automation component. This integration enhances the system's usability and applicability.
[0266] 7. End-to-end monitoring ensures visualized service quality: The monitoring system makes port management more intuitive. Operations and maintenance personnel can monitor port usage and service performance in real time, and can immediately locate and handle any anomalies, helping users discover potential bottlenecks.
[0267] It should be noted that the terminology used in this application is for the purpose of describing specific embodiments only and is not intended to limit the scope of this application. As indicated in this specification, unless the context clearly indicates otherwise, words such as "a," "an," "an," and / or "the" do not specifically refer to the singular and may include the plural. The terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, or apparatus that includes a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, or apparatus. Without further limitations, an element defined by the phrase "comprising an..." does not exclude the presence of other identical elements in the process, method, or apparatus that includes said element.
[0268] It should also be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on this application. Unless otherwise expressly specified and limited, the terms "installed," "connected," "linked," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication between two elements. For those skilled in the art, the specific meaning of the above terms in this application can be understood according to the specific circumstances.
[0269] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. The above descriptions are only preferred embodiments of this application. It should be noted that due to the limitations of written expression, while there are objectively infinite specific structures, those skilled in the art can make several improvements, modifications, or changes without departing from the principles of this application, and can also combine the above technical features in an appropriate manner. These improvements, modifications, changes, or combinations, or the direct application of the inventive concept and technical solution to other situations without modification, should all be considered within the scope of protection of this application.
Claims
1. A hybrid resource network port management method, characterized in that, The method includes: In the logical port pool of mixed resources, determine the number of available contiguous port segments, the length of each available contiguous port segment, and the total number of available ports; Based on the number of available continuous port segments, the length of each available continuous port segment, the total number of available ports, and the continuous port segment constraint length of the logical port pool, a port fragmentation index is determined, which reflects the degree of dispersion of available ports in the mixed resources. Based on the port fragmentation index, determine whether the hybrid resources meet the preset integration conditions; If so, determine the port segment to be integrated in the logical port pool, migrate the services in the port segment to be integrated to the available continuous port segment, merge the available ports in the port segment to be integrated, and write the merged continuous port range into the logical port pool. The port fragmentation index is determined based on the number of available continuous port segments, the length of each available continuous port segment, the total number of available ports, and the continuous port segment constraint length of the logical port pool, satisfying the following formula: ; In the formula, Port fragmentation index, This represents the number of available contiguous port segments. Let be the length of the i-th available continuous port segment. This represents the total number of available ports. This represents the constraint length for continuous port segments.
2. The method according to claim 1, characterized in that, The port fragmentation index is determined based on the number of available contiguous port segments, the length of each available contiguous port segment, the total number of available ports, and the contiguous port segment constraint length of the logical port pool, including: Determine the service connection type of each port in the logical port pool, and classify all ports according to the service connection type of each port; For each port category, the fragmentation index corresponding to the port category is determined based on the number of available contiguous port segments, the length of each available contiguous port segment, the total number of available ports, and the constraint length of the contiguous port segments. The fragmentation indices corresponding to each port category are merged according to the preset classification weights to obtain the port fragmentation index.
3. The method according to claim 1, characterized in that, After determining the port fragmentation index based on the number of available contiguous port segments, the length of each available contiguous port segment, the total number of available ports, and the contiguous port segment constraint length of the logical port pool, the following steps are also included: Obtain the historical fragmentation index determined within each historical detection period; The historical fragmentation index of each historical detection period and the port fragmentation index are merged according to the preset period weight to obtain the final port fragmentation index.
4. The method according to claim 1, characterized in that, Determining whether the hybrid resources meet preset integration conditions based on the port fragmentation index includes: The port consolidation threshold of the logical port pool is determined based on the consecutive port segment constraint length of the logical port pool; The port utilization rate of the logical port pool is determined based on the number of ports in the logical port pool and the total number of available ports. The distribution density of the continuous segments in the logical port pool is determined based on the number of available continuous port segments and the length of each available continuous port segment. If the port fragmentation index is greater than the port integration threshold, and the port utilization rate is greater than the preset utilization rate threshold, and the continuous segment distribution density is greater than the preset distribution density threshold, then the mixed resource is determined to meet the preset integration conditions. The length of the continuous port segment constraint is determined based on the disabled port segment constraint, the reserved port segment constraint, and the port allocation policy constraint of the logical port pool.
5. The method according to claim 1, characterized in that, Determining the port segments to be integrated from the logical port pool includes: The logical port pool is split into two current local port pools, and the port fragmentation index of each current local port pool is determined. The current local port pool with a high port fragmentation index is further split to obtain two new current local port pools, and the port fragmentation index of each current local port pool is determined. Return to the step of continuing to split the current local port pool with a high port fragmentation index until the length of the current local port pool reaches the preset length threshold. In the current local port pool with a high port fragmentation index, the available continuous port segment with a length less than the continuous port segment constraint length is determined as the first port segment, and the available continuous port segment with a length equal to the continuous port segment constraint length is determined as the second port segment. If there are multiple first port segments, then the adjacent port segments of the first port segments are determined as port segments to be integrated. If there are multiple second port segments, and the second port segments are not adjacent, then the adjacent port segments of the second port segments are determined as port segments to be integrated.
6. The method according to claim 1, characterized in that, The method further includes: Obtain the network operation parameters of each used port in the logical port pool, and determine the port health of the used port based on the network operation parameters; In response to the detection of a decrease in the port health of the used port, or the port health being lower than a preset health threshold, other idle ports are activated, and a portion of the traffic from the used port is allocated to the other idle ports.
7. The method according to claim 1, characterized in that, The method further includes: Retrieve historical port usage data for each service; For each service, the historical port usage data is input into a pre-trained time series prediction model to obtain the predicted number of ports for the service within a set future time period. For each service, the historical port usage data is input into a pre-trained clustering model to obtain the port usage type corresponding to the service; Based on the predicted number of ports and the port usage type, a corresponding port is allocated for the service in the logical port pool.
8. The method according to claim 1, characterized in that, The method further includes: In response to receiving a port request for the logical port pool, and the port specified in the port request is occupied, the specified port is mapped to another idle port, and data is transmitted for the service corresponding to the port request through the other idle port; In response to receiving a port request for the logical port pool, and the logical port pool does not have any available ports, the port specified in the port request is virtualized into multiple logical sub-ports, and data is transmitted for the service corresponding to the port request through the logical sub-ports.
9. A hybrid resource network port management system, characterized in that, The system includes a dynamic adjustment engine; the dynamic adjustment engine is used for: In the logical port pool of mixed resources, determine the number of available contiguous port segments, the length of each available contiguous port segment, and the total number of available ports; Based on the number of available continuous port segments, the length of each available continuous port segment, the total number of available ports, and the continuous port segment constraint length of the logical port pool, a port fragmentation index is determined, which reflects the degree of dispersion of available ports in the mixed resources. Based on the port fragmentation index, determine whether the hybrid resources meet the preset integration conditions; If so, determine the port segment to be integrated in the logical port pool, migrate the services in the port segment to be integrated to the available continuous port segment, merge the available ports in the port segment to be integrated, and write the merged continuous port range into the logical port pool. The port fragmentation index is determined based on the number of available continuous port segments, the length of each available continuous port segment, the total number of available ports, and the continuous port segment constraint length of the logical port pool, satisfying the following formula: ; In the formula, Port fragmentation index, This represents the number of available contiguous port segments. Let be the length of the i-th available continuous port segment. This represents the total number of available ports. This represents the constraint length for continuous port segments.
Citation Information
Patent Citations
Allocating method for NAT
CN108833611A
Method and apparatus for a flexible access rate common-memory packet switch
US6118792A