Port resource adjustment method and device, equipment and storage medium

By dynamically adjusting the port resources of remote services, the problems of resource exhaustion and memory waste in nat resource management in cloud computing services are solved, efficient resource utilization and cost savings are achieved, and system performance and stability are improved.

CN119892757APending Publication Date: 2025-04-25CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411792100.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In cloud computing business, the nat resource management within the network element has problems such as resource exhaustion and memory waste, which leads to the failure of business configuration and affects the normal use of the business.

Method used

By creating remote services based on pre-acquisitioned configuration data, and obtaining the port resource usage of remote services at preset time intervals, dynamically adjusting port resources to achieve efficient resource utilization.

Benefits of technology

It realizes efficient resource utilization and significant cost savings, improves system flexibility and response speed, avoids resource waste and performance bottlenecks, and ensures stable operation of remote services under various load conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892757A_ABST
    Figure CN119892757A_ABST
Patent Text Reader

Abstract

The invention provides a port resource adjustment method and device, equipment and a storage medium. The port resource adjustment method comprises the steps of creating a far-end service according to pre-acquired configuration data; obtaining port resource use conditions of all the remote services according to a preset time interval; and dynamically adjusting the port resource corresponding to the remote service according to the port resource use condition, a preset adjustment threshold and a preset detection algorithm. Namely, according to the embodiment of the invention, the nat resources are dynamically increased or recovered according to the use condition of the port resources, so that the resource utilization rate is improved, the memory occupation is reduced and the cost expenditure is reduced on the premise of ensuring the normal operation of the service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of port technology, and in particular to a port resource adjustment method, apparatus, device and storage medium. Background Art

[0002] As cloud computing services continue to develop, they are becoming more diverse, including public services for the general public and privatized services customized for individual users. In various service scenarios, some network elements undertake NAT-related services.

[0003] Such as NAT gateway, VPCE gateway, VPC gateway, etc. The above gateways are all stateful gateways, which need to process the four-layer network stack, record the four-layer information, and create session records to control and ensure the normal operation of the business.

[0004] In the scenario where service traffic needs to pass through stateful network elements, NAT actions are performed inside the network element. In order to ensure the normal flow of outbound and inbound traffic, the network element will record relevant NAT information. At this time, NAT information is the key to ensuring service stability. How to provide stable and reliable NAT resources for service modules is particularly important. There is generally a resource management module inside the network element, which is mainly responsible for increasing and recycling NAT resources. In conventional designs, the NAT management module of the network element will pre-allocate resources according to the configuration. For example, if the number of configured resources is 1 million, 1 million resources will be applied for use by the service module. At this time, if the configuration amount increases, the number of resource applications will be a linear growth of n*1 million, and resource exhaustion will soon occur. In addition, it is very likely that the configuration will fail to be issued due to resource exhaustion. Finally, the newly added service configuration cannot be issued, affecting the normal use of the service. At the same time, pre-allocated resources will also occupy a large amount of memory, resulting in memory waste and increased deployment costs. Summary of the invention

[0005] Embodiments of the present application provide a port resource adjustment method, device, system, electronic device, and computer-readable storage medium.

[0006] In a first aspect, an embodiment of the present application provides a port resource adjustment method, the method comprising:

[0007] Create a remote service based on pre-obtained configuration data;

[0008] Obtaining the port resource usage of all the remote services at preset time intervals;

[0009] According to the usage of the port resources, a preset adjustment threshold and a preset detection algorithm dynamically adjust the port resources corresponding to the remote service.

[0010] Optionally, the creating a remote service according to the pre-acquired configuration data includes:

[0011] Get configuration data;

[0012] A remote service is created according to the configuration data.

[0013] Optionally, after the step of creating a remote service according to the configuration data, the method includes:

[0014] Apply for initial resources according to the remote service and the configuration data corresponding to the remote service, and initialize the resource quantity and resource usage.

[0015] Optionally, after the step of applying for initial resources according to the remote service and configuration data corresponding to the remote service, and initializing the resource quantity and resource usage, the method includes:

[0016] Receive business traffic;

[0017] Applying for session resources and creating a session based on the service traffic;

[0018] The service traffic is forwarded through the session.

[0019] Optionally, after the step of dynamically adjusting the port resources corresponding to the remote service according to the port resource usage, a preset adjustment threshold and a preset detection algorithm, the method includes:

[0020] When the service flow ends, the session ends;

[0021] Releasing the session resources to the corresponding remote service resource node;

[0022] Unused resources are recovered according to the port resource usage of all the remote services.

[0023] Optionally, the port resource usage includes resource usage, and dynamically adjusting the port resource corresponding to the remote service according to the port resource usage, a preset adjustment threshold, and a preset detection algorithm includes:

[0024] When the ratio between the resource usage and the total resource amount is greater than a preset adjustment threshold, dynamically increase the number of port resources;

[0025] When the ratio between the resource usage and the total resource amount is less than a preset adjustment threshold, the port resources are dynamically recovered.

[0026] Optionally, obtaining the port resource usage of all the remote services at a preset time interval includes:

[0027] The port resource usage of all the remote services is counted at preset time intervals to integrate the port resource usage.

[0028] In a second aspect, an embodiment of the present application provides a port resource adjustment device, the device comprising:

[0029] A creation module is used to create a remote service based on the pre-acquired configuration data;

[0030] An acquisition module, used for acquiring the port resource usage of all the remote services at preset time intervals;

[0031] The adjustment module is used to dynamically adjust the port resources corresponding to the remote service according to the usage of the port resources, a preset adjustment threshold and a preset detection algorithm.

[0032] Optionally, the creation module includes:

[0033] First, create a submodule for obtaining configuration data;

[0034] The second creation submodule is used to create a remote service according to the configuration data.

[0035] Optionally, the device comprises:

[0036] The initialization module is used to apply for initial resources according to the remote service and the configuration data corresponding to the remote service, and initialize the resource quantity and resource usage.

[0037] Optionally, the device comprises:

[0038] The first module is used to receive business traffic;

[0039] The second module is used to apply for session resources and create a session based on the service traffic;

[0040] The third module is used to forward the business traffic through the session.

[0041] Optionally, the device comprises:

[0042] A fourth module is used for terminating the session when the service flow ends;

[0043] A fifth module is used to release the session resources to a corresponding resource node of a remote service;

[0044] The sixth module is used to reclaim unused resources according to the port resource usage of all the remote services.

[0045] Optionally, the port resource usage includes resource usage, and the adjustment module includes:

[0046] A first adjustment submodule, configured to dynamically increase the number of port resources when the ratio between the resource usage and the total resource amount is greater than a preset adjustment threshold;

[0047] The second adjustment submodule is used to dynamically reclaim port resources when the ratio between the resource usage and the total resource amount is less than a preset adjustment threshold.

[0048] Optionally, the acquisition module includes:

[0049] The acquisition submodule is used to count the port resource usage of all the remote services at preset time intervals and integrate the port resource usage.

[0050] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor, wherein the processor is configured to execute the instructions to implement any of the port resource adjustment methods described above.

[0051] In a fourth aspect, an embodiment of the present application further provides a storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute any of the port resource adjustment methods described above.

[0052] In an embodiment of the present application, a remote service is created according to the configuration data acquired in advance; the port resource usage of all the remote services is acquired at a preset time interval; and the port resources corresponding to the remote service are dynamically adjusted according to the port resource usage, the preset adjustment threshold and the preset detection algorithm. That is, the embodiment of the present application creates a remote service through the configuration data acquired in advance, and acquires the port resource usage of all the remote services at a preset time interval, and then dynamically adjusts the resources corresponding to the remote service according to the port resource usage, the preset adjustment threshold and the preset detection algorithm, so as to achieve efficient resource utilization and significant cost savings. This dynamic resource management mechanism not only improves the flexibility and response speed of the system, but also effectively avoids resource waste and performance bottlenecks, ensures that the remote service can run stably under various load conditions, thereby improving the overall service quality and user experience, and then dynamically increases or recycles NAT resources according to the port resource usage, improves resource utilization and reduces memory usage, and reduces cost expenditure under the premise of ensuring the normal operation of the business.

[0053] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0055] Figure 1 It is a flow chart of the steps of a port resource adjustment method provided in an embodiment of the present application;

[0056] Figure 2 is a device block diagram of a port resource adjustment device provided in an embodiment of the present application;

[0057] Figure 3 is a structural diagram of an electronic device provided in an embodiment of the present application;

[0058] Figure 4 This is a schematic diagram of an exemplary overall architecture of port resource adjustment provided in an embodiment of the present application.

[0059] Figure 5 is a schematic diagram of an exemplary resource statistics module provided in an embodiment of the present application;

[0060] Figure 6 is a schematic diagram of an exemplary resource adjustment module provided in an embodiment of the present application;

[0061] Figure 7 This is an exemplary port resource adjustment diagram provided in an embodiment of the present application. DETAILED DESCRIPTION

[0062] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0063] It should be noted that in the embodiments of the present application, reference is made to Figure 4 The overall architecture includes Figure 5 The resource statistics module shown, Figure 6 The resource adjustment module and configuration management module are shown.

[0064] Among them, the configuration management module receives the configuration and creates the initial resources. Each RS only creates one initial resource. The resource statistics module counts the resource creation, usage and proportion of each RS. The resource adjustment module regularly checks whether the usage proportion of each RS exceeds the threshold. If it exceeds the threshold, new resources are added to the RS. If it is less than the threshold and the available resources are greater than the available amount of a single resource, the resources are recycled.

[0065] Therefore, first of all, the configuration management module is mainly responsible for configuration reception, creating the initial resource node in the RS dimension and recording the initial total resource amount and the initial resource availability. Each resource node is a combination of NAT IP, RSIP (remote server IP), and protocol. A resource node has 65535 available resources by default. When the configuration is deleted, when the number of node resource references is 0, the resource node is recycled.

[0066] Reference Figure 5 The resource statistics module is mainly responsible for counting the resource usage and resource creation of all RSs. When a network element creates a session, it will occupy a resource, and when a session is released, a resource will be reclaimed. Resources are divided by threads, and each thread records the resource usage of this thread. The resource statistics module summarizes and finally obtains the resource usage of this RS.

[0067] Reference Figure 6 ,The resource adjustment module is mainly responsible for checking the relationship between the total ,quantity of resources and the used quantity and the available quantity of ,RS.

[0068] Therefore, based on the above three modules, port resources can be adjusted. Figure 7 During this period, port resources are adjusted, etc. Please refer to the following description for details.

[0069] Figure 1 is a flow chart of the steps of a port resource adjustment method provided in an embodiment of the present application, such as Figure 1 As shown, the method may include:

[0070] Step 101, creating a remote service according to the pre-acquired configuration data;

[0071] Further, the creating a remote service according to the pre-acquired configuration data includes:

[0072] Get configuration data;

[0073] A remote service is created according to the configuration data.

[0074] It should be noted that in the embodiment of the present application, the configuration management module and the resource adjustment module can run in different threads when implementing corresponding functions, and utilize migration. And there is only a competition relationship when creating and deleting configurations, and the performance consumption is low.

[0075] It should be noted that in the embodiment of the present application, configuration data is received, RS is created according to the configuration data and initial resources are applied for, and the resource quantity and resource usage are initialized, wherein RS, i.e., remote server, is a remote service.

[0076] Further, after the step of creating a remote service according to the configuration data, the method includes:

[0077] Apply for initial resources according to the remote service and the configuration data corresponding to the remote service, and initialize the resource quantity and resource usage.

[0078] After receiving the configuration data, the system creates a remote service (RS) based on the configuration data and applies for initial resources, while initializing the number of resources and resource usage. This ensures that the remote service has sufficient resources to cope with the initial load when it starts, thereby ensuring the rapid startup and stable operation of the service, and laying the foundation for subsequent dynamic resource adjustments.

[0079] Further, after the step of applying for initial resources according to the remote service and the configuration data corresponding to the remote service, and initializing the resource quantity and resource usage, the method includes:

[0080] Receive business traffic;

[0081] Applying for session resources and creating a session based on the service traffic;

[0082] The service traffic is forwarded through the session.

[0083] The adjustment of port resources is also to ensure that business traffic can be processed normally. Therefore, in the normal processing of business traffic, the preset rules are matched first, and then the corresponding processing instance is created and available resources are applied. Then, a session is created to maintain the traffic state to ensure that the traffic can be forwarded normally along the expected path, thereby achieving efficient and reliable traffic processing and data transmission.

[0084] Step 102, obtaining the port resource usage of all the remote services at a preset time interval;

[0085] Furthermore, obtaining the port resource usage of all the remote services at a preset time interval includes:

[0086] The port resource usage of all the remote services is counted at preset time intervals to integrate the port resource usage.

[0087] For details, please refer to Figure 7,It can be seen that the statistical thread will regularly count the resource usage of all RSs and integrate the statistical data, where regular means obtaining it according to the preset time interval.

[0088] The port resource usage of all remote services is regularly counted and integrated at preset time intervals to obtain comprehensive port resource usage information. This regular monitoring mechanism can grasp the resource consumption status of each remote service in real time, providing reliable data support for subsequent resource optimization and dynamic adjustment, thereby improving resource utilization efficiency and overall system performance.

[0089] Step 103: dynamically adjust the port resources corresponding to the remote service according to the usage of the port resources, a preset adjustment threshold and a preset detection algorithm.

[0090] Further, the port resource usage includes resource usage, and dynamically adjusting the port resource corresponding to the remote service according to the port resource usage, the preset adjustment threshold and the preset detection algorithm includes:

[0091] When the ratio between the resource usage and the total resource amount is greater than a preset adjustment threshold, dynamically increase the number of port resources;

[0092] When the ratio between the resource usage and the total resource amount is less than a preset adjustment threshold, the port resources are dynamically recovered.

[0093] It should be noted that, in the embodiment of the present application, the port resources corresponding to the remote service are dynamically adjusted according to the usage of the port resources, a preset adjustment threshold and a preset detection algorithm.

[0094] Specifically, the preset detection algorithm is based on the following definition, wherein the adjustment threshold is the preset adjustment threshold:

[0095] When resource usage%total resources>adjustment threshold, the number of resources is dynamically increased.

[0096] When resource usage%total resources<adjustment threshold and (total resources-available amount of a single resource)*adjustment threshold>resource usage, resources are dynamically reclaimed.

[0097] For example, for a single resource quantity of 65535, adjust the threshold to 70%

[0098] Add resource example:

[0099] Total rs1 resources: initial resources + new resources 1 = 131070

[0100] Resource usage: 100000

[0101] Current share: 100000% 131070 = 76%

[0102] It can be seen that the current usage ratio exceeds the threshold, so resources are dynamically increased.

[0103] Examples of recycled resources:

[0104] Total rs2 resources: initial resources + new resources = 196605

[0105] Resource usage: 30000

[0106] Current proportion: 30000% 196605 = 15% The resource proportion is less than the adjustment threshold

[0107] Total resources after adjustment: (196605-65535)*0.7=91749

[0108] It can be seen that the total amount of resources after adjustment exceeds the amount of recyclable resources used.

[0109] Further, after the step of dynamically adjusting the port resources corresponding to the remote service according to the port resource usage, the preset adjustment threshold and the preset detection algorithm, the method includes:

[0110] When the service flow ends, the session ends;

[0111] Releasing the session resources to the corresponding remote service resource node;

[0112] Unused resources are recovered according to the port resource usage of all the remote services.

[0113] It should be noted that in the embodiment of the present application, the session ends after the business traffic ends, and the applied resources are released to the corresponding RS resource node. The resource adjustment module recycles unused resources according to the resource usage in the RS resource chain, and finally reaches a balanced state.

[0114] Specifically, after the service traffic ends, the session is terminated and the session resources are released to the corresponding remote service resource node. Subsequently, unused resources are recycled based on the comprehensive statistics of remote service port resource usage. This process ensures the effective management and recycling of resources, avoids resource waste, improves overall resource utilization efficiency, and lays a solid foundation for the efficient processing of subsequent service traffic.

[0115] In addition, in the embodiment of the present application, a multi-threaded mode is adopted inside the network element, the control thread is responsible for service configuration processing, and the regular thread is responsible for counting resource usage and performing resource allocation. The service thread processes service traffic. The control thread receives service configuration and creates an initial resource node. After receiving traffic, the service thread performs service processing and applies for resources. The statistical thread regularly updates resource usage. The resource adjustment module checks resource usage. If resource usage exceeds the threshold, new resources are added. If it is checked that existing resources meet the recycling conditions, resources are recycled. Finally, a balance between resources and service requests is achieved.

[0116] In an embodiment of the present application, a remote service is created according to the configuration data acquired in advance; the port resource usage of all the remote services is acquired at a preset time interval; and the port resources corresponding to the remote service are dynamically adjusted according to the port resource usage, the preset adjustment threshold and the preset detection algorithm. That is, the embodiment of the present application creates a remote service through the configuration data acquired in advance, and acquires the port resource usage of all the remote services at a preset time interval, and then dynamically adjusts the resources corresponding to the remote service according to the port resource usage, the preset adjustment threshold and the preset detection algorithm, so as to achieve efficient resource utilization and significant cost savings. This dynamic resource management mechanism not only improves the flexibility and response speed of the system, but also effectively avoids resource waste and performance bottlenecks, ensures that the remote service can run stably under various load conditions, thereby improving the overall service quality and user experience, and then dynamically increases or recycles NAT resources according to the port resource usage, improves resource utilization and reduces memory usage, and reduces cost expenditure under the premise of ensuring the normal operation of the business.

[0117] Corresponding to the method provided in the above-mentioned embodiment of the port resource adjustment method of the present application, see Figure 2 The present application also provides a device block diagram of a port resource adjustment device. In this embodiment, the device includes:

[0118] A creation module 201, used to create a remote service according to the pre-acquired configuration data;

[0119] An acquisition module 202 is used to acquire the port resource usage of all the remote services at a preset time interval;

[0120] The adjustment module 203 is used to dynamically adjust the port resources corresponding to the remote service according to the usage of the port resources, a preset adjustment threshold and a preset detection algorithm.

[0121] Optionally, the creation module includes:

[0122] First, create a submodule for obtaining configuration data;

[0123] The second creation submodule is used to create a remote service according to the configuration data.

[0124] Optionally, the device comprises:

[0125] The initialization module is used to apply for initial resources according to the remote service and the configuration data corresponding to the remote service, and initialize the resource quantity and resource usage.

[0126] Optionally, the device comprises:

[0127] The first module is used to receive business traffic;

[0128] The second module is used to apply for session resources and create a session based on the service traffic;

[0129] The third module is used to forward the business traffic through the session.

[0130] Optionally, the device comprises:

[0131] A fourth module is used for terminating the session when the service flow ends;

[0132] A fifth module is used to release the session resources to a corresponding resource node of a remote service;

[0133] The sixth module is used to reclaim unused resources according to the port resource usage of all the remote services.

[0134] Optionally, the port resource usage includes resource usage, and the adjustment module includes:

[0135] A first adjustment submodule, configured to dynamically increase the number of port resources when the ratio between the resource usage and the total resource amount is greater than a preset adjustment threshold;

[0136] The second adjustment submodule is used to dynamically reclaim port resources when the ratio between the resource usage and the total resource amount is less than a preset adjustment threshold.

[0137] Optionally, the acquisition module includes:

[0138] The acquisition submodule is used to count the port resource usage of all the remote services at preset time intervals and integrate the port resource usage.

[0139] In summary, a port resource adjustment device provided in an embodiment of the present application creates a remote service according to pre-acquired configuration data; obtains the port resource usage of all the remote services at preset time intervals; and dynamically adjusts the port resources corresponding to the remote service according to the port resource usage, preset adjustment thresholds, and preset detection algorithms. That is, the embodiment of the present application creates a remote service through pre-acquired configuration data, obtains the port resource usage of all remote services at preset time intervals, and then dynamically adjusts the resources corresponding to the remote service according to the port resource usage, preset adjustment thresholds, and preset detection algorithms, which can achieve efficient resource utilization and significant cost savings. This dynamic resource management mechanism not only improves the flexibility and response speed of the system, but also effectively avoids resource waste and performance bottlenecks, ensuring that remote services can run stably under various load conditions, thereby improving the overall service quality and user experience, and then dynamically increasing or recovering NAT resources according to the port resource usage, improving resource utilization and reducing memory usage, and reducing cost expenditures under the premise of ensuring normal business operation.

[0140] Figure 3 This is a structural diagram of an electronic device M00 provided in an embodiment of the present application. In the figure, the electronic device M00 includes a processor M01 and a memory M02. The electronic device includes: a processor; a memory for storing instructions executable by the processor, wherein the processor is configured to execute the instructions to implement any of the port resource adjustment methods described above, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0141] In an embodiment of the present application, the memory M02 can be used to store software programs and various data. The memory M02 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory M02 may include a volatile memory or a non-volatile memory, or the memory x09 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory M02 in the embodiment of the present application includes but is not limited to these and any other suitable types of memories.

[0142] The processor M01 may include one or more processing units; optionally, the processor M01 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor M01.

[0143] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned port resource adjustment method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0144] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0145] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned port resource adjustment method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0146] It should be understood that the chip involved in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0147] An embodiment of the present application further provides a storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any of the port resource adjustment methods described above.

[0148] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned port resource adjustment method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0149] An embodiment of the present application further provides a vehicle, wherein the vehicle includes the port resource adjustment device as described above.

[0150] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0151] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0152] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A port resource adjustment method, characterized in that: The method comprises: Create a remote service based on pre-obtained configuration data; Obtaining the port resource usage of all the remote services at preset time intervals; According to the usage of the port resources, a preset adjustment threshold and a preset detection algorithm dynamically adjust the port resources corresponding to the remote service.

2. The method according to claim 1, characterized in that The step of creating a remote service according to the pre-acquired configuration data includes: Get configuration data; A remote service is created according to the configuration data.

3. The method according to claim 2, characterized in that After the step of creating a remote service according to the configuration data, the method comprises: Apply for initial resources according to the remote service and the configuration data corresponding to the remote service, and initialize the resource quantity and resource usage.

4. The method according to claim 3, characterized in that After the step of applying for initial resources according to the remote service and the configuration data corresponding to the remote service, and initializing the resource quantity and resource usage, the method includes: Receive business traffic; Applying for session resources and creating a session based on the service traffic; The service traffic is forwarded through the session.

5. The method according to claim 5, characterized in that: After the step of dynamically adjusting the port resources corresponding to the remote service according to the port resource usage, the preset adjustment threshold and the preset detection algorithm, the method includes: When the service flow ends, the session ends; Releasing the session resources to the corresponding remote service resource node; Unused resources are recovered according to the port resource usage of all the remote services.

6. The method according to claim 1, characterized in that The port resource usage includes resource usage, and dynamically adjusting the port resource corresponding to the remote service according to the port resource usage, the preset adjustment threshold and the preset detection algorithm includes: When the ratio between the resource usage and the total resource amount is greater than a preset adjustment threshold, dynamically increase the number of port resources; When the ratio between the resource usage and the total resource amount is less than a preset adjustment threshold, the port resources are dynamically recovered.

7. The method according to claim 1, characterized in that The obtaining of the port resource usage of all the remote services at a preset time interval includes: The port resource usage of all the remote services is counted at preset time intervals to integrate the port resource usage.

8. A port resource adjustment device, characterized in that: The device comprises: A creation module is used to create a remote service based on the pre-acquired configuration data; An acquisition module, used for acquiring the port resource usage of all the remote services at preset time intervals; The adjustment module is used to dynamically adjust the port resources corresponding to the remote service according to the usage of the port resources, a preset adjustment threshold and a preset detection algorithm.

9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instruction to implement the port resource adjustment method according to any one of claims 1 to 7.

10. A computer storage medium, a readable storage medium, for storing a program, characterized in that: When the program is executed by a processor, the port resource adjustment method as claimed in any one of claims 1 to 7 is implemented.