Resource adjustment method and apparatus, and electronic device and storage medium

By monitoring the bandwidth occupancy of the virtual switch and dynamically adjusting network and computing resources, the network congestion and waste problems caused by resource adjustment in existing technologies are solved, achieving more efficient resource utilization and improving service quality.

WO2025213782A1PCT designated stage Publication Date: 2025-10-16CHINA TELECOM NETWORK SECURITY TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/134356
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-12
Filing Date
2024-11-25
Publication Date
2025-10-16

AI Technical Summary

Technical Problem

Existing resource adjustment methods cause network congestion or resource waste, cannot effectively respond to traffic changes, and affect system performance.

Method used

By monitoring the bandwidth utilization of the virtual switch, resource adjustment requests are sent to the load manager to perform resource expansion or reduction operations, and dynamically adjust network and computing resources.

Benefits of technology

Avoid network congestion and resource waste, improve overall service quality, and increase resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024134356_16102025_PF_FP_ABST
    Figure CN2024134356_16102025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of cloud computing. Disclosed are a resource adjustment method and apparatus, and an electronic device and a storage medium. The method comprises: on the basis of first traffic and second traffic which are sent by a virtual switch, determining a bandwidth occupancy rate of the virtual switch, wherein the first traffic and the second traffic are traffic sent by the virtual switch at different times; on the basis of the bandwidth occupancy rate, sending a resource adjustment request to a load manager; and in response to resource adjustment information which is sent by the load manager on the basis of the resource adjustment request, executing a resource adjustment operation, so as to avoid network congestion or resource waste.
Need to check novelty before this filing date? Find Prior Art

Description

Resource adjustment method and device, electronic device, and storage medium

[0001] Cross-reference to Related Applications

[0002] This application claims priority to the Chinese Patent Application No. 202410446036.6, filed on April 12, 2024, and entitled "A Resource Adjustment Method, Device, Electronic Device, and Storage Medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0003] The present application relates to the field of cloud computing technology, and in particular to a resource adjustment method, device, electronic device, and storage medium. BACKGROUND

[0004] With the popularity of containerization and cloud computing technology, more and more enterprises and units choose to deploy services to the cloud network and run their own services based on the resources provided by the cloud network.

[0005] In order to improve the utilization rate of resources and the availability of services, an elastic scaling container cloud technology is generally used for resource adjustment. For example, by collecting the load data of the current server, such as the load of the central processing unit (CPU) and the load of the memory, when the load data reaches a set threshold, the resource is scaled.

[0006] However, this resource adjustment method may cause network congestion or resource waste, thereby affecting the performance of the entire system. For example, in the case of continuous increase in traffic (e.g., too many messages), the load of the CPU and the memory may not be high, and the scaling operation may not be triggered. Or in the case of continuous decrease in traffic, the load of the CPU and the memory may not meet the requirements for scaling, and the scaling operation may not be triggered. SUMMARY

[0007] The present application provides a resource adjustment method, device, and storage medium to avoid network congestion or resource waste.

[0008] In a first aspect, a resource adjustment method is provided, comprising:

[0009] determining a bandwidth occupancy rate of a virtual switch according to a first traffic and a second traffic sent by the virtual switch, wherein the first traffic and the second traffic are traffics sent by the virtual switch at different times;

[0010] sending a resource adjustment request to a load manager based on the bandwidth occupancy rate;

[0011] perform a resource adjustment operation in response to resource adjustment information sent by the load manager based on the resource adjustment request.

[0012] In the embodiments of the present application, the bandwidth occupancy of the virtual switch can be determined according to the first traffic and the second traffic sent by the virtual switch, the bandwidth (network resource) of the virtual switch is monitored in real time, further, a resource adjustment request is sent to the load manager based on the bandwidth occupancy, and a resource adjustment operation is performed in response to resource adjustment information sent by the load manager based on the resource adjustment request, so that the network resource and the computing resource can be associated by the load manager, the adaptive adjustment of the computing resource is performed based on the bandwidth occupancy, thereby avoiding the congestion of the network or the waste of resources, and the overall service quality is improved.

[0013] In some embodiments, the bandwidth occupancy of the virtual switch is determined according to the first traffic and the second traffic sent by the virtual switch, including:

[0014] the network speed of the virtual switch is determined according to the byte number of the first traffic and the second traffic respectively and the receiving time of the first traffic and the second traffic respectively;

[0015] the bandwidth occupancy is determined according to the network speed and the bandwidth threshold of the virtual switch.

[0016] In some embodiments, the resource adjustment request is sent to the load manager based on the bandwidth occupancy, including:

[0017] if the bandwidth occupancy is greater than a first bandwidth occupancy threshold, a resource expansion request is sent to the load manager; wherein the resource expansion request is used to request to create a new virtual switch;

[0018] the resource adjustment operation is performed in response to the resource adjustment information sent by the load manager based on the resource adjustment request, including:

[0019] the resource expansion operation is performed in response to resource expansion information sent by the load manager based on the resource expansion request.

[0020] In some embodiments, the resource expansion operation is performed in response to the resource expansion information sent by the load manager based on the resource expansion request, including:

[0021] a first flow direction table and a second flow direction table are generated according to the resource expansion information; wherein the first flow direction table is used to indicate the flow direction of the new virtual switch on the computing cluster; and the second flow direction table is used to indicate the flow direction of the new virtual switch on the load balancing cluster;

[0022] send the first flow direction table to the computing cluster and send the second flow direction table to the load balancing cluster.

[0023] In some embodiments, the method further comprises:

[0024] if the bandwidth occupancy is less than a second bandwidth occupancy threshold and exceeds a time threshold, sending a resource scaling down request to the load manager; wherein the resource scaling down request is used to request removal of the virtual switch, and the second bandwidth occupancy threshold is less than the first bandwidth occupancy threshold;

[0025] the resource adjustment operation comprises:

[0026] the resource scaling down operation comprises:

[0027] In some embodiments, the resource scaling down operation comprises:

[0028] generating a first instruction and a second instruction according to the resource scaling down information; wherein the first instruction is used to instruct deletion of a flow direction table of the virtual switch on the load balancing cluster, and the second instruction is used to instruct deletion of a flow direction table of the virtual switch on the computing cluster;

[0029] sending the first instruction to the load balancing cluster and sending the second instruction to the computing cluster.

[0030] In some embodiments, the resource scaling up information at least comprises a computing node on which the new virtual switch is mounted, card information of the new virtual switch, and an IP address of the new virtual switch.

[0031] the resource scaling down information at least comprises a computing node on which the virtual switch is mounted, card information of the virtual switch, and an IP address of the virtual switch.

[0032] In a second aspect, an SDN controller is provided, comprising:

[0033] a determining module configured to determine a bandwidth occupancy of a virtual switch according to first traffic and second traffic sent by the virtual switch; wherein the first traffic and the second traffic are traffic sent by the virtual switch at different times;

[0034] a sending module configured to send a resource adjustment request to a load manager based on the bandwidth occupancy;

[0035] a resource adjustment module, configured to perform a resource adjustment operation in response to resource adjustment information sent by the load manager based on the resource adjustment request.

[0036] In a third aspect, an electronic device is provided, comprising:

[0037] a memory configured to store a computer program; and a processor configured to implement the method according to any one of the first aspect when executing the computer program stored in the memory.

[0038] In a fourth aspect, a computer-readable storage medium is provided, and the computer-readable storage medium stores a computer program. The computer program, when executed by a processor, implements the method according to any one of the first aspect.

[0039] The technical effects of each of the above-mentioned second to fourth aspects and each aspect that can be achieved are described above in relation to the first aspect or the various possible solutions in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0040] FIG. 1 is a schematic diagram of a resource adjustment architecture provided by an embodiment of the present application;

[0041] FIG. 2 is a flowchart of a resource adjustment method provided by an embodiment of the present application;

[0042] FIG. 3 is a schematic diagram of a structure of an SDN controller provided by an embodiment of the present application;

[0043] FIG. 4 is a schematic diagram of a structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0044] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings. The specific operation methods in the method embodiments can also be applied to the device embodiments or system embodiments. It should be noted that in the description of the present application, "multiple" is understood as "at least two". The "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone. A and B are connected, which means that A and B are directly connected and A and B are connected through C. In addition, in the description of the present application, "first", "second", etc. are used only for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can it be understood as indicating or implying order.

[0045] In order to better understand the embodiments of the present application, first, the technical terms involved in the embodiments of the present application will be described.

[0046] (1)Software Defined Network (SDN) is a new network innovation architecture, which is an implementation of network virtualization. SDN controller is responsible for traffic control to ensure the normal work of intelligent network in SDN. The SDN controller is based on southbound interface protocols such as OpenFlow, Netconf, etc., to achieve unified management of all network devices, thereby realizing fast deployment, resource integration, unified planning, and on-demand calling.

[0047] (2)Load Balance (LB) means balancing and distributing the load (work tasks) to multiple operation units for running, for example, FTP server, Web server, enterprise core application server and other main task servers, so as to cooperatively complete the work tasks.

[0048] (3)Virtual Private Cloud (VPC) is a dynamic configuration pool of public cloud computing resources, which needs to use encryption protocols, tunneling protocols and other security programs to transmit data between private enterprises and cloud service providers. A VPC basically changes the multi-tenant architecture of the provider into a single-tenant architecture.

[0049] (4)Open vSwitch (OVS) supports OpenFlow protocol and is a commonly used SDN forwarding plane implementation in the industry.

[0050] The following will make a brief introduction to the application scenarios to which the technical solutions of the embodiments of the present application can be applied. It should be noted that the application scenarios introduced below are only used to illustrate the embodiments of the present application and are not limiting. In the specific implementation, the technical solutions provided by the embodiments of the present application can be flexibly applied according to actual needs.

[0051] FIG. 1 is a schematic diagram of a resource adjustment architecture provided by the present application. As shown in FIG. 1, the architecture includes an SDN controller 100, a load manager 101, a computing service 102, a load balancing service 103, a computing cluster including N (N is an integer greater than 0) computing nodes, and a load balancing cluster including M (M is an integer greater than 0) load balancing network elements. The load manager 101 is connected with the SDN controller 100, the computing service 102, and the load balancing service 103, respectively. The SDN controller is connected with the computing cluster and the load balancing cluster, which will be introduced one by one as follows.

[0052] The N computing nodes each run a virtual switch that carries a backend service and provides network interworking services for the virtual switch and the load balancing cluster and other devices, for example, as shown in FIG. 1, the computing node 1 runs the virtual switch 1 and the virtual switch 2; the N computing nodes are controlled by the computing service 102.

[0053] The load balancing cluster provides load balancing services for each virtual switch and is controlled by the load balancing service 103.

[0054] After receiving the resource adjustment request sent by the SDN controller 100, the load manager 101 can obtain relevant resource adjustment information based on the computing service 102, the load balancing service 103, etc., and send the resource adjustment information to the SDN controller.

[0055] The SDN controller 100 is the control center of the entire network, can monitor the traffic of each virtual switch, determine the bandwidth occupancy of each virtual switch based on the traffic, send a resource adjustment request to the load manager 101, and perform a resource adjustment operation in response to the resource adjustment information sent by the load manager 101 based on the resource adjustment request, thereby adjusting the traffic direction of the network and realizing the expansion and contraction of network resources through the expansion and contraction of computing resources.

[0056] To further illustrate the technical solutions provided by the embodiments of the present application, the following will be described in detail in conjunction with the drawings and specific embodiments. Although the embodiments of the present application provide the method operation steps as described in the following embodiments or as shown in the drawings, more or fewer operation steps can be included in the method based on conventional or non-creative labor. The execution order of these steps is not limited to the execution order provided by the embodiments of the present application in the logical sense. The method can be executed in the order shown in the embodiments or drawings or in parallel during actual processing or device execution.

[0057] FIG. 2 is a flowchart of a resource adjustment method provided by the present application, which can be executed by an SDN controller (such as the SDN controller 100 shown in FIG. 1). As shown in FIG. 2, the flow includes the following steps:

[0058] 201: Determine the bandwidth occupancy of the virtual switch according to the first traffic and the second traffic sent by the virtual switch.

[0059] The first traffic and the second traffic are traffic sent by the virtual switch (such as the virtual switch 1 shown in FIG. 1) at different times.

[0060] In some embodiments, the SDN controller can receive the first traffic and the second traffic sent by the virtual switch in the following manner, taking the above virtual switch 1 as an example, specifically:

[0061] According to a set period (for example, every 5 seconds, or every two minutes), the SDN controller sends a traffic statistics message to the computing node 1, the traffic statistics message including the NIC information of the virtual switch 1 (for example, the IP address of the virtual switch 1, the port corresponding to the virtual switch 1 on the OVS, etc.); after the computing node 1 receives the traffic statistics message, the computing node 1 feeds back a traffic statistics response message to the SDN controller, the traffic statistics response message including the first traffic of the virtual switch 1; similarly, the second traffic of the virtual switch 1 is also acquired in the next period of time according to this manner.

[0062] In some embodiments, according to the first traffic and the second traffic sent by the virtual switch, the bandwidth occupancy of the virtual switch can be determined according to the byte number of the first traffic and the second traffic, and the receiving time of the first traffic and the second traffic; then, according to the network speed and the bandwidth threshold of the virtual switch, the bandwidth occupancy of the virtual switch is determined.

[0063] In some embodiments, the network speed satisfies the following expression: b' = (d2-d1) / (t2-t1); wherein d2 is the byte number of the second traffic, d1 is the byte number of the first traffic, t2 is the receiving time of the second traffic, and t1 is the receiving time of the first traffic.

[0064] In some embodiments, the bandwidth occupancy satisfies the following expression: v = (b-b') / b; wherein b is the bandwidth threshold of the virtual switch, and b' is the network speed of the virtual switch.

[0065] In the embodiments of the present application, the SDN controller can monitor the traffic trend of each virtual switch on the computing node in real time, which facilitates subsequent dynamic scaling of computing resources according to network resources (such as bandwidth occupancy).

[0066] 202: based on the bandwidth occupancy, sending a resource adjustment request to the load manager.

[0067] In some embodiments, based on the bandwidth occupancy, sending a resource adjustment request to the load manager (such as the load manager 101 shown in FIG. 1) can be: if the bandwidth occupancy is greater than a first bandwidth occupancy threshold (for example, 80%); if so, sending a resource expansion request to the load manager; wherein the resource expansion request is used to request to create a new virtual switch.

[0068] In some embodiments, when the load manager receives the resource expansion request, a virtual switch 3 (new virtual switch) running a backend service can be created using the same image in the virtual private cloud where the virtual switch (e.g., virtual switch 1) is located, and the virtual switch 3 can be mounted on the computing node 2. The resource expansion information related to the created virtual switch 3 can be sent to the SDN controller, so that the SDN controller performs corresponding resource expansion operation based on the resource expansion information.

[0069] In some embodiments, the resource expansion information can include the computing node on which the new virtual switch is mounted, the network card information of the new virtual switch, the IP address of the new virtual switch, and the like.

[0070] In some embodiments, based on the bandwidth occupancy, sending the resource adjustment request to the load manager can also be: if the bandwidth occupancy is less than a second bandwidth occupancy threshold (e.g., 30%) and exceeds a time threshold (e.g., 1 minute), sending a resource contraction request to the load manager; wherein the resource expansion request is used to request to remove the virtual switch, and the second bandwidth occupancy threshold is less than the first bandwidth occupancy threshold.

[0071] In some embodiments, when the load manager receives the resource contraction request, the network card information of the virtual switch (e.g., virtual switch 1) can be obtained as resource contraction information, and the resource contraction information about the virtual switch can be sent to the SDN controller.

[0072] In some embodiments, the resource contraction information at least includes the computing node on which the virtual switch is mounted, the network card information of the virtual switch, the IP address of the virtual switch, and the like.

[0073] In some other embodiments, when the SDN controller determines the bandwidth occupancy, the bandwidth occupancy can be directly sent to the load manager, so that the load manager determines whether resource expansion or resource contraction is needed based on the bandwidth occupancy.

[0074] 203: Perform resource adjustment operation in response to the resource adjustment information sent by the load manager based on the resource adjustment request.

[0075] In some embodiments, performing resource adjustment operation in response to the resource adjustment information sent by the load manager based on the resource adjustment request includes the following cases:

[0076] Embodiment 1, for the case that the resource expansion request is used to request to create a new virtual switch.

[0077] In response to the resource expansion information sent by the load manager based on the resource expansion request, performing a resource expansion operation can include: generating a first flow direction table and a second flow direction table according to the resource expansion information; wherein the first flow direction table is used to indicate the flow direction of the new virtual switch on the computing cluster; the second flow direction table is used to indicate the flow direction of the new virtual switch on the load balancing cluster; then, the first flow direction table is sent to the computing cluster, and the second flow direction table is sent to the load balancing cluster.

[0078] Further, in order to open up the network of the new virtual switch and the load balancing cluster on the computing cluster, the first flow direction table can include the flow direction table (flow direction example table 1) of the new virtual switch (virtual switch 3) on the computing node (computing node 2) where the new virtual switch is located, as shown in Table 1, which exemplarily shows the flow direction example table 1; and can also include the flow direction table (flow direction example table 2) of the new virtual switch on the computing node where the other virtual switch is located, as shown in Table 2, which exemplarily shows the flow direction example table 2.

[0079] Table 1: Flow direction example table 1

[0080] In the table 1, the virtual switch 1 (vm-1) and the virtual switch 2 (vm-2) are located on the computing node 1 as shown in FIG. 1, the ip address of the vm-1 is 192.168.1.2, and the ip address of the vm-2 is 192.168.1.3; the vm-1 and the vm-2 are located in the same VPC, and the vni value of the VPC is 5000; the virtual switch 3 (vm-3) is located on the computing node 2, the ip address of the vm-3 is 192.168.1.4, and the corresponding virtual network card is port-3; the ip address of the load balancing cluster in the VPC is 192.168.1.100, and when the destination address is 192.168.1.100, the message will pass through the load balancing cluster and then be forwarded to the vm-1 and the vm-2.

[0081] Table 2: Flow direction example table 2

[0082] In the table 2, the virtual machine network card corresponding to the vm-1 is port-1, and the virtual network card corresponding to the vm-2 is port-2.

[0083] Further, in order to open up the network of the new virtual switch and the load balancing cluster on the computing cluster, the first flow direction table can include the flow direction table (flow direction example table 1) of the new virtual switch (virtual switch 3) on the computing node (computing node 2) where the new virtual switch is located, as shown in Table 1, which exemplarily shows the flow direction example table 1; and can also include the flow direction table (flow direction example table 2) of the new virtual switch on the computing node where the other virtual switch is located, as shown in Table 2, which exemplarily shows the flow direction example table 2.

[0084] Table 3: Flow direction example table 3

[0085] In some embodiments, the first flow table is sent to the computing cluster, and the second flow table is sent to the load balancing cluster, and after the corresponding expansion operation is completed, the traffic of the new virtual switch can be periodically collected to determine the bandwidth occupation of the new virtual switch. If at a certain moment, the SDN controller detects that the bandwidth occupation rate of the new virtual switch is lower than a certain threshold, and exceeds a time threshold, the load manager can be called to perform a corresponding shrinkage operation at this time. If at a certain moment, the SDN controller detects that the bandwidth occupation rate of the new virtual switch exceeds a certain threshold, the load manager can be called to perform a corresponding expansion operation.

[0086] In the embodiments of the present application, in the case of resource expansion, a new virtual switch can be created by the load manager, and based on the resource expansion information obtained from the load manager, a first flow table on the computing cluster and a second flow table on the load balancing cluster are generated to make the network of the new virtual switch pass through the computing cluster and the load balancing cluster, thereby sharing the load pressure of other virtual switches, dynamically adjusting the number of backend services, and avoiding network congestion.

[0087] Embodiment 2, for the case of requesting to delete the virtual switch according to the above resource shrinkage request.

[0088] In response to the resource shrinkage information sent by the load manager based on the resource shrinkage request, the resource shrinkage operation can include: generating a first instruction and a second instruction according to the resource shrinkage information; wherein the first instruction is used to instruct to delete the flow table of the virtual switch on the load balancing cluster, and the second instruction is used to instruct to delete the flow table of the virtual switch on the computing cluster; sending the first instruction to the load balancing cluster, and sending the second instruction to the computing cluster.

[0089] For example, taking the virtual switch 1 shown in FIG. 1 as an example:

[0090] First, after receiving the resource shrinkage request, the load manager can call the computing service (such as the computing service 102 shown in FIG. 1) to delete the virtual switch 1 from the computing cluster, and record the information related to the virtual switch 1 (for example, the IP address of the virtual switch 1, the network card, the VPC where it is located, the computing node where it is located, etc.), and feed back these information to the SDN controller as resource shrinkage information.

[0091] Second, after receiving the resource shrinkage information, the SDN controller can generate a first instruction based on the information related to the load balancing cluster in the resource shrinkage information, and generate a second instruction based on the information related to the computing cluster.

[0092] Then, the first instruction is sent to the load balancing cluster to make the load balancing cluster delete the flow direction table related to the virtual switch 1, and the second instruction is sent to the computing cluster to make each computing node on the computing cluster delete the flow direction table related to the virtual switch 1.

[0093] In the embodiments of the present application, in the case of needing to perform resource scaling, unnecessary virtual switches can be deleted by the load manager to avoid waste of resources, and based on the resource scaling information obtained from the load manager, a first instruction for instructing the load balancing cluster and a second instruction for instructing the computing cluster are generated to make targeted deletion of unnecessary flow direction tables to avoid subsequent traffic from going to the wrong direction.

[0094] In the embodiments of the present application, the bandwidth occupancy rate of the virtual switch can be determined according to the first traffic and the second traffic sent by the virtual switch, the bandwidth (network resource) of the virtual switch is monitored in real time, further, based on the bandwidth occupancy rate, a resource adjustment request is sent to the load manager; in response to the resource adjustment information sent by the load manager based on the resource adjustment request, a resource adjustment operation is performed, so that the network resource and the computing resource can be associated by the load manager, the adaptive adjustment of the computing resource is performed based on the bandwidth occupancy rate, so as to avoid network congestion or waste of resources, and the overall service quality is improved.

[0095] Based on the same technical concept, the embodiments of the present application also provide an SDN controller, which can implement the resource adjustment method flow provided in the embodiments of the present application.

[0096] FIG. 3 is a structural schematic diagram of an SDN controller provided in the embodiments of the present application. The SDN controller includes a determination module 301, a sending module 302, and a resource adjustment module 303.

[0097] The determination module 301 is configured to determine the bandwidth occupancy rate of the virtual switch according to the first traffic and the second traffic sent by the virtual switch; wherein the first traffic and the second traffic are traffic sent by the virtual switch at different times.

[0098] The sending module 302 is configured to send a resource adjustment request to the load manager based on the bandwidth occupancy rate.

[0099] The resource adjustment module 303 is configured to perform a resource adjustment operation in response to resource adjustment information sent by the load manager based on the resource adjustment request.

[0100] In some embodiments, the determination module 301 is specifically configured to:

[0101] determine a network speed of the virtual switch according to a number of bytes of the first traffic and the second traffic respectively and a receiving time of the first traffic and the second traffic respectively;

[0102] determine the bandwidth occupancy according to the network speed and a bandwidth threshold of the virtual switch.

[0103] In some embodiments, the sending module 302 is specifically configured to:

[0104] if the bandwidth occupancy is greater than a first bandwidth occupancy threshold, send a resource expansion request to the load manager; wherein the resource expansion request is used to request to create a new virtual switch; and the resource adjustment module 303 is specifically configured to: perform a resource expansion operation in response to resource expansion information sent by the load manager based on the resource expansion request.

[0105] In some embodiments, the resource adjustment module 303 is specifically configured to:

[0106] generate a first flow direction table and a second flow direction table according to the resource expansion information; wherein the first flow direction table is used to indicate a traffic direction of the new virtual switch on a computing cluster; and the second flow direction table is used to indicate a traffic direction of the new virtual switch on a load balancing cluster;

[0107] send the first flow direction table to the computing cluster and send the second flow direction table to the load balancing cluster.

[0108] In some embodiments, the sending module 302 is further configured to: if the bandwidth occupancy is less than a second bandwidth occupancy threshold and exceeds a time threshold, send a resource contraction request to the load manager; wherein the resource expansion request is used to request to remove the virtual switch, and the second bandwidth occupancy threshold is less than the first bandwidth occupancy threshold; and the resource adjustment module 303 is specifically configured to: perform a resource contraction operation in response to resource contraction information sent by the load manager based on the resource contraction request.

[0109] In some embodiments, the resource adjustment module 303 is specifically configured to:

[0110] generate a first instruction and a second instruction according to the resource contraction information; wherein the first instruction is used to instruct to delete a flow direction table of the virtual switch on the load balancing cluster, and the second instruction is used to instruct to delete a flow direction table of the virtual switch on the computing cluster;

[0111] send the first instruction to the load balancing cluster and send the second instruction to the computing cluster.

[0112] It should be noted that the above device provided by the embodiments of the present application can realize all the method steps in the method embodiments and achieve the same technical effects, and the same parts and beneficial effects of the method embodiments in the embodiments will not be repeated in detail.

[0113] Based on the same technical concept, the embodiments of the present application also provide an electronic device, which can realize the functions of the foregoing SDN controller.

[0114] FIG. 4 is a structural schematic diagram of an electronic device provided by the embodiments of the present application.

[0115] The at least one processor 401 and the memory 402 connected with the at least one processor 401 are not limited in the embodiments of the present application in terms of the specific connection medium between the processor 401 and the memory 402, and in FIG. 4, the connection between the processor 401 and the memory 402 is taken as an example through the bus 400. The connection mode between other components is only schematically illustrated and is not limited. The bus 400 can be divided into an address bus, a data bus, a control bus, etc., and for the convenience of representation, only one thick line is used in FIG. 4, but it does not mean that there is only one bus or only one type of bus. Alternatively, the processor 401 can also be referred to as a controller, and the name is not limited.

[0116] In the embodiments of the present application, the memory 402 stores instructions executable by the at least one processor 401, and the at least one processor 401 can execute the data processing method discussed above by executing the instructions stored in the memory 402. The processor 401 can realize the functions of various modules in the device shown in FIG. 3.

[0117] The processor 401 is the control center of the device, can connect various parts of the entire control device through various interfaces and lines, and can monitor the entire device by running or executing the instructions stored in the memory 402 and calling the data stored in the memory 402, thereby realizing various functions and processing data of the device.

[0118] In the embodiments of the present application, the processor 401 can include one or more processing units, and the processor 401 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, application program, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 401. In some embodiments, the processor 401 and the memory 402 can be realized on the same chip, and in some embodiments, they can also be realized on independent chips respectively.

[0119] The processor 401 can be a general processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic component, a discrete hardware component, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general processor can be a microprocessor or any conventional processor. The steps of the resource adjustment method disclosed in the embodiments of the present application can be directly embodied by the hardware processor for execution, or executed by a combination of hardware and software modules in the processor.

[0120] The memory 402 is a non-volatile computer readable storage medium, which can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 402 can include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. The memory 402 is any other medium capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by a computer, but is not limited to this. The memory 402 in the embodiments of the present application can also be a circuit or any other device capable of realizing the storage function, used for storing program instructions and / or data.

[0121] By designing and programming the processor 401, the code corresponding to the resource adjustment method introduced in the foregoing embodiments can be fixed in the chip, so that the chip can execute the resource adjustment method of the embodiment shown in FIG. 2 at runtime. How to design and program the processor 401 is a technology known to those skilled in the art, which will not be described here.

[0122] It should be noted that the above electronic device provided by the embodiments of the present application can realize all method steps achieved by the above method embodiments, and can achieve the same technical effects. Here, the same parts and beneficial effects of the method embodiments in this embodiment will not be described in detail.

[0123] Based on the same technical concept, the embodiment of the present application provides a computer storage medium, which comprises computer program codes, and when the computer program codes run on a computer, the computer program codes make the computer execute the method for resource adjustment as any one of the foregoing. Since the principle of the computer storage medium for solving the problem is similar to the method for resource adjustment, the implementation of the computer storage medium can be referred to the implementation of the method, and the repeated parts will not be described herein.

[0124] In the implementation process, the computer storage medium can include a universal serial bus flash drive (USB), a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various storage media that can store program codes.

[0125] Based on the same technical concept, the embodiment of the present application also provides a computer program product, which comprises computer program codes, and when the computer program codes run on a computer, the computer program codes make the computer execute the method for resource adjustment as any one of the foregoing. Since the principle of the computer program product for solving the problem is similar to the method for resource adjustment, the implementation of the computer program product can be referred to the implementation of the method, and the repeated parts will not be described herein.

[0126] The computer program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0127] The method in the present application can be realized by software, hardware, firmware or any combination thereof, in whole or in part. When realized by software, it can be realized in the form of a computer program product in whole or in part. The computer program product comprises one or more computer programs or instructions. When the computer programs or instructions are loaded and executed on a computer, the processes or functions described in the present application are executed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment, a core network device, an OAM or other programmable apparatus.

[0128] The computer program or instructions can be stored in or transferred from one computer-readable medium to another, such as from a website, a computer, a server or a data center to another website, computer, server or data center by a wired or wireless medium. The computer-readable medium can be any available medium or data storage device that can be accessed by a computer, or a data storage device such as a server, data center, etc. that integrates one or more available media. The medium can be a magnetic medium, e.g., a floppy diskette, a hard disk drive, a magnetic tape; an optical medium, e.g., a compact disk read-only memory (CD-ROM), a DVD; a semiconductor medium, e.g., a solid-state drive (SSD). The computer-readable medium can be a volatile or non-volatile medium, or can include both volatile and non-volatile media.

[0129] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. In addition, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0130] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus generate the device that implements the functions specified in one or more flows in the flowcharts and / or one or more blocks in the block diagrams.

[0131] These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more flows in the flowcharts and / or one or more blocks in the block diagrams.

[0132] These computer program instructions can also be loaded into a computer or other programmable data processing devices, so that a series of operational steps are performed on the computer or other programmable devices to generate computer-implemented processes, so that the instructions executed on the computer or other programmable devices provide steps for implementing the functions specified in one or more flows in the flowchart and / or one or more blocks in the block diagram.

[0133] Obviously, various modifications and changes can be made to the present application by those skilled in the art without departing from the spirit and scope of the application. Accordingly, it is intended that the present application embrace all such modifications and changes as fall within the scope of the claims and their equivalents.

Claims

1. A resource adjustment method, applied to a software-defined network (SDN) controller, characterized in that: include: Determining a bandwidth occupancy rate of the virtual switch according to a first flow and a second flow sent by the virtual switch; wherein the first flow and the second flow are flows sent by the virtual switch at different times; Based on the bandwidth occupancy rate, sending a resource adjustment request to a load manager; In response to the resource adjustment information sent by the load manager based on the resource adjustment request, a resource adjustment operation is performed.

2. The method according to claim 1, wherein The determining the bandwidth occupancy of the virtual switch according to the first traffic and the second traffic sent by the virtual switch includes: determining a network speed of the virtual switch according to the number of bytes of the first flow and the second flow, and the receiving time of the first flow and the second flow; The bandwidth occupancy rate is determined according to the network speed and a bandwidth threshold of the virtual switch.

3. The method according to claim 1, wherein The sending a resource adjustment request to the load manager based on the bandwidth occupancy rate includes: If the bandwidth occupancy rate is greater than a first bandwidth occupancy threshold, sending a resource expansion request to the load manager; wherein the resource expansion request is used to request the creation of a new virtual switch; The performing a resource adjustment operation in response to the resource adjustment information sent by the load manager based on the resource adjustment request includes: The resource expansion operation is performed in response to the resource expansion information sent by the load manager based on the resource expansion request.

4. The method according to claim 3, wherein The performing a resource expansion operation in response to the resource expansion information sent by the load manager based on the resource expansion request includes: Generate a first flow table and a second flow table based on the resource expansion information; wherein the first flow table is used to indicate the traffic direction of the new virtual switch on the computing cluster; and the second flow table is used to indicate the traffic direction of the new virtual switch on the load balancing cluster; The first flow table is sent to the computing cluster, and the second flow table is sent to the load balancing cluster.

5. The method according to claim 3, wherein The method further comprises: If the bandwidth occupancy rate is less than a second bandwidth occupancy threshold and exceeds a time threshold, a resource scaling request is sent to the load manager; wherein the resource scaling request is used to request removal of the virtual switch, and the second bandwidth occupancy threshold is less than the first bandwidth occupancy threshold; The performing a resource adjustment operation in response to the resource adjustment information sent by the load manager based on the resource adjustment request includes: The load manager performs a resource scaling operation in response to the resource scaling information sent based on the resource scaling request.

6. The method according to claim 5, wherein The performing a resource scaling operation in response to the resource scaling information sent by the load manager based on the resource scaling request includes: Generate a first instruction and a second instruction according to the resource scaling information; wherein the first instruction is used to instruct to delete the flow table of the virtual switch on the load balancing cluster, and the second instruction is used to instruct to delete the flow table of the virtual switch on the computing cluster; The first instruction is sent to the load balancing cluster, and the second instruction is sent to the computing cluster.

7. The method according to any one of claims 1 to 6, wherein: The resource expansion information includes at least the computing node carried by the new virtual switch, the network card information of the new virtual switch, and the IP address of the new virtual switch; The resource shrinkage information includes at least the computing node carried by the virtual switch, the network card information of the virtual switch, and the IP address of the virtual switch.

8. A software-defined network (SDN) controller, characterized in that: include: a determination module, configured to determine a bandwidth occupancy rate of the virtual switch based on a first flow and a second flow sent by the virtual switch; wherein the first flow and the second flow are flows sent by the virtual switch at different times; A sending module, configured to send a resource adjustment request to a load manager based on the bandwidth occupancy rate; The resource adjustment module is configured to perform a resource adjustment operation in response to resource adjustment information sent by the load manager based on the resource adjustment request.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the method steps of any one of claims 1 to 7 when executing the computer program stored in the memory.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Software defined data center and scheduling and traffic-monitoring method for service cluster therein

    CN108293009A

  • Streaming media service scheduling method, device and system

    CN111093099A

  • Resource pool redundancy rate adjusting method and device, medium and equipment

    CN111400023A

  • Resource adjustment method and device, electronic equipment and storage medium

    CN118301164A

  • Virtual Data Center Allocation with Bandwidth Guarantees

    US20110296052A1