CN112291340B - Service distribution method, controller and virtual network element - Google Patents

Service distribution method, controller and virtual network element Download PDF

Info

Publication number
CN112291340B
CN112291340B CN202011172197.9A CN202011172197A CN112291340B CN 112291340 B CN112291340 B CN 112291340B CN 202011172197 A CN202011172197 A CN 202011172197A CN 112291340 B CN112291340 B CN 112291340B
Authority
CN
China
Prior art keywords
service
network element
virtual network
candidate
services
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011172197.9A
Other languages
Chinese (zh)
Other versions
CN112291340A (en
Inventor
郑威
黄华桥
曾伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Greenet Information Service Co Ltd
Original Assignee
Wuhan Greenet Information Service Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Greenet Information Service Co Ltd filed Critical Wuhan Greenet Information Service Co Ltd
Priority to CN202011172197.9A priority Critical patent/CN112291340B/en
Publication of CN112291340A publication Critical patent/CN112291340A/en
Application granted granted Critical
Publication of CN112291340B publication Critical patent/CN112291340B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1014Server selection for load balancing based on the content of a request

Abstract

The embodiment of the invention provides a service distribution method, a controller and a virtual network element. The service distribution method comprises the following steps: receiving a registration request sent by a target virtual network element, wherein the registration request carries a network element identifier of the target virtual network element, and the network element identifier carries a type of the target virtual network element; determining a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services according to the type; in the first candidate services, each available first candidate service is used as a second candidate service to obtain a plurality of second candidate services; determining a plurality of target services in the second candidate services according to a preset load balancing algorithm; and sending the service resource of each target service to the target virtual network element. The service allocation method provided by the embodiment of the invention can allocate appropriate network service to the target virtual network element, and improves the service processing efficiency and accuracy.

Description

Service distribution method, controller and virtual network element
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a service allocation method, a controller, and a virtual network element.
Background
In the context of the construction of the fifth-Generation mobile communication (5th-Generation, 5G) network, various edge cloud systems that meet the user's needs nearby are in endless numbers in order to fully utilize their advantages to obtain better user experience. The cloud gateway is an important device in an edge cloud system, and includes a controller and a plurality of virtual Network elements (VNFs), where a virtual Network element is a Network element Virtualized by a virtualization technology to implement some specific functions, and the controller is configured to manage the virtual Network element, for example, to allocate a Network service to the virtual Network element.
Because the types and the number of the network services and the virtual network elements are numerous, some network services can bear various types of virtual network elements, some network services can only bear one type of virtual network element, some network services can bear a plurality of virtual network elements, some network services can only bear one virtual network element, and the situation of wrong distribution often occurs when the controller distributes the network services to the virtual network elements at present, so that the processing efficiency of the edge cloud service is low and the accuracy is low.
Disclosure of Invention
Therefore, it is necessary to provide a service allocation method, a controller and a virtual network element to solve the technical problems of low processing efficiency and low accuracy of edge cloud services in the prior art.
In a first aspect, an embodiment of the present invention provides a service allocation method, including:
receiving a registration request sent by a target virtual network element, wherein the registration request carries a network element identifier of the target virtual network element, and the network element identifier carries a type of the target virtual network element;
determining a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services according to the type;
in the first candidate services, each available first candidate service is used as a second candidate service to obtain a plurality of second candidate services;
determining a plurality of target services in the second candidate services according to a preset load balancing algorithm;
and sending the service resource of each target service to the target virtual network element.
Further, determining, according to the type, a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services, including:
calling a preset service bearing capacity table, wherein the service bearing capacity table is stored with service identification corresponding to each network service and the type and the number of virtual network elements capable of bearing the service identification in a correlated manner;
sequentially taking each network service as a first service to be analyzed, and judging whether the type of a virtual network element which can be borne by the first service to be analyzed is consistent with the type of the target virtual network element;
and if so, determining the first service to be analyzed as the first candidate service corresponding to the target virtual network element.
Further, in the plurality of first candidate services, taking each available first candidate service as a second candidate service to obtain a plurality of second candidate services, including:
calling the service bearing capacity table and a preset distributed service table, wherein the distributed service table is stored with a service identifier corresponding to each network service and a network element identifier of a loaded virtual network element in a correlated manner;
sequentially taking each first candidate service as a second service to be analyzed, and comparing the number of virtual network elements which can be borne by the second service to be analyzed with the number of borne virtual network elements;
and if the number of the virtual network elements which can be borne by the second service to be analyzed is greater than the number of the borne virtual network elements, determining the second service to be analyzed as the second candidate service.
Further, comparing the number of the virtual network elements that can be carried by the second service to be analyzed with the number of the virtual network elements that have already been carried, the method further includes:
and acquiring the number of the virtual network elements loaded by the second service to be analyzed according to the network element identification of the virtual network element loaded by the second service to be analyzed.
Further, according to a preset load balancing algorithm, determining a plurality of target services in the plurality of second candidate services, and then:
and storing the network element identification of the target virtual network element in the allocated service table, and associating the network element identification with the service identification of each target service.
In a second aspect, an embodiment of the present invention provides a service allocation method, including:
a registration request sent to a controller, wherein the registration request carries a network element identifier of a target virtual network element, and the network element identifier carries a type of the target virtual network element, so that the controller determines a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services according to the type, in the plurality of first candidate services, each available first candidate service is used as a second candidate service to obtain a plurality of second candidate services, and determines a plurality of target services in the plurality of second candidate services according to a preset load balancing algorithm;
and receiving the service resources of each target service sent by the controller.
In a third aspect, an embodiment of the present invention provides a controller, including:
a registration request receiving module, configured to receive a registration request sent by a target virtual network element, where the registration request carries a network element identifier of the target virtual network element, and the network element identifier carries a type of the target virtual network element;
a first candidate service determining module, configured to determine, according to the type, a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services;
a second candidate service determining module, configured to use each available first candidate service as a second candidate service among the plurality of first candidate services to obtain a plurality of second candidate services;
the target service determining module is used for determining a plurality of target services in the second candidate services according to a preset load balancing algorithm;
and the service resource sending module is used for sending the service resource of each target service to the target virtual network element.
In a fourth aspect, an embodiment of the present invention provides a virtual network element, including:
a registration request sending module, configured to send a registration request to a controller, where the registration request carries a network element identifier of a target virtual network element, and the network element identifier carries a type of the target virtual network element, so that the controller determines, according to the type, a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services, and in the plurality of first candidate services, uses each available first candidate service as a second candidate service to obtain a plurality of second candidate services, and determines, according to a preset load balancing algorithm, a plurality of target services in the plurality of second candidate services;
and the service resource receiving module is used for receiving the service resource of each target service sent by the controller.
In a fifth aspect, an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the service allocation method as provided in the first aspect or the second aspect when executing the program.
In a sixth aspect, an embodiment of the present invention provides a non-transitory computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the service allocation method as provided in the first or second aspect.
According to the service allocation method provided by the embodiment of the invention, the registration request sent by the target virtual network element carries the type of the target virtual network element, so that the controller can determine a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services according to the type of the target virtual network element, then determine a plurality of available first candidate services in the plurality of first candidate services to obtain a plurality of second candidate services, then determine a plurality of better target services in the plurality of second candidate services based on a preset load balancing algorithm, and finally send the service resource of each target service to the target virtual network element, thereby completing the allocation of the network services.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a cloud gateway according to an embodiment of the present invention;
FIG. 2 is a flow chart of a service allocation method according to an embodiment of the present invention;
FIG. 3 is a flow chart of a service allocation method according to another embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a controller according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a virtual network element according to an embodiment of the present invention;
fig. 6 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The service distribution method provided by the embodiment of the invention is applied to an edge cloud system, the edge cloud system comprises a cloud gateway, fig. 1 is a schematic structural diagram of the cloud gateway provided by the embodiment of the invention, and as shown in fig. 1, the cloud gateway comprises a controller and a plurality of virtual network elements. The virtual network element is installed in hardware entity equipment (not shown in fig. 1) such as a filtering server or a deep packet inspection server, and is used for implementing functions such as network traffic analysis or forwarding. In order to facilitate iteration and expansion, the controller adopts a micro-service architecture and mainly provides the following three types of network services:
1. virtual network element registration and allocation service: the method includes the steps of providing a hypertext Transfer Protocol (HTTP) interface for a virtual network element to call for registration, and allocating a network service to the virtual network element, specifically, sending a service resource of the network service to the virtual network element, where the service resource is an Internet Protocol (IP) address and a port of the network service, and the allocated network service includes a connection service and an acquisition service.
2. Connection service: the configuration is issued to the virtual network element in a Google Remote Procedure Call (GRPC) mode, and a connection request of the virtual network element is received.
3. Collecting service: and receiving a message sent by the virtual network element through a User Datagram Protocol (UDP) and forwarding the message to a card message queue.
Fig. 2 is a flowchart of a service allocation method according to an embodiment of the present invention, where the service allocation method is applied to a cloud gateway, and an execution subject of the service allocation method is a controller in the cloud gateway. As shown in fig. 2, the service allocation method includes:
step 201, receiving a registration request sent by a target virtual network element, where the registration request carries a network element identifier of the target virtual network element, and the network element identifier carries a type of the target virtual network element.
Specifically, a virtual network element that needs to be accessed into the cloud gateway is called a target virtual network element, and in order to complete access, the target virtual network element needs to register with the controller, where one implementation is that the target virtual network element sends a registration request to the controller. The registration request carries a network element identifier of the target virtual network element, and the network element identifier carries a type of the target virtual network element.
The network element identifier may be generated when the virtual network element is created, and is used to uniquely represent the virtual network element, and the network element identifiers of different virtual network elements are different from each other. The network element identification comprises a first sub-identification and a second sub-identification.
Table 1 is a definition table of the first sub-identifier, and as shown in table 1, the first sub-identifier includes 8 bytes, which are sequentially called byte 1, byte 2, byte 3, byte 4, byte 5, byte 6, byte 7, and byte 8 from high to low.
Table 1 definition table of first sub-id
Figure BDA0002747634640000061
Wherein, byte 1 and byte 2 are used to indicate the number of the machine room in which the hardware entity device for installing the virtual network element is located, for example, a hexadecimal number FA00 is used to indicate the number of a certain machine room, and then byte 1 and byte 2 of the first sub-identifier of the virtual network element in all the hardware entity devices in the machine room are both set to be FA 00.
Byte 3, byte 4, byte 5, and byte 6 may be customized according to actual requirements, which is not specifically limited in the embodiment of the present invention.
Byte 7 is used to indicate the type of the virtual network element, and it should be noted that the type of the virtual network element may be divided according to its function, for example, the type of the virtual network element includes a virtual switch, a virtual client device, and the like, where the virtual switch also includes a virtual access switch, a virtual service switch, and the like. As a specific example, if the access virtual access switch is represented by a hexadecimal number 0x01, byte 7 of the first sub-id of all virtual network elements of the type virtual access switch is set to 0x 01; using hexadecimal number 0x02 to represent the virtual service switch, byte 7 of the first sub-identifier of all virtual network elements of which the type is the virtual service switch is set to be 0x 02; using the hexadecimal number 0x11 to represent the virtual client device, byte 7 of the first sub-identity of all virtual network elements of type virtual client device is set to 0x 11.
Byte 8 is used to represent the number of the virtual network element, and when the virtual network element in any hardware entity device is numbered, the value of byte 8 is sequentially incremented, for example, if only 16 virtual network elements exist in a certain hardware entity device and the types of the virtual network elements are all virtual client devices, 16 integers from 0x01 to 0x10 are used to represent the number of 16 virtual network elements respectively.
The second sub-identifier is a hexadecimal number corresponding to the management internet protocol address of the hardware entity device for installing the virtual network element, the management internet protocol addresses of all the virtual network elements in the same hardware entity device are the same, and the management internet protocol addresses of the virtual network elements in different hardware entity devices are different from each other.
The network element identifier may be obtained by splicing the first sub-identifier and the second sub-identifier, for example, the first sub-identifier is spliced at the front and the second sub-identifier is spliced at the back. As a specific example, if the first sub-identifier of a certain virtual network element is 11667788FFFF6601 hexadecimal number and the second sub-identifier is C0a80114 hexadecimal number, the network element is identified as 11667788FFFF6601C0a80114 hexadecimal number.
It should be noted that, the registration request may also carry a management internet protocol address and a port of the hardware entity device that installs the target virtual network element, in addition to the network element identifier of the target virtual network element.
If the controller receives the registration request sent by the target virtual network element, the controller can analyze the registration request, obtain the network element identifier of the target virtual network element carried in the registration request, and further obtain the type of the target virtual network element carried in the network element identifier.
Step 202, according to the type, determining a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services.
Specifically, a number of network services, such as a connection service and an acquisition service, are built into the controller. When the controller receives a registration request sent by a target virtual network element, network services need to be allocated to the target virtual network element.
The types and the number of the virtual network elements that can be carried by different network services may be the same or different, and in general, some network services can carry multiple types of virtual network elements, some network services can only carry one type of virtual network element, some network services can carry multiple virtual network elements, and some network services can only carry one virtual network element.
In the embodiment of the invention, the cloud gateway is preset with the corresponding relation between the network service and the type of the virtual network element, if the controller receives a registration request sent by a target virtual network element, the registration request can be analyzed to obtain the network element identifier of the target virtual network element carried in the registration request, further obtain the type of the target virtual network element carried in the network element identifier, and then determine a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services based on the corresponding relation between the network service and the type of the virtual network element.
Step 203, in the plurality of first candidate services, each available first candidate service is taken as a second candidate service, and a plurality of second candidate services are obtained.
Specifically, because a plurality of other virtual network elements exist in the cloud gateway besides the target virtual network element, the virtual network elements may be using a plurality of network services in the controller, and in order to ensure that the network service allocated to the target virtual network element is effective, the controller needs to determine available first candidate services among a plurality of first candidate services corresponding to the target virtual network element, and call each available first candidate service as a second candidate service, thereby obtaining a plurality of second candidate services.
And step 204, determining a plurality of target services in the second candidate services according to a load balancing algorithm.
In particular, load balancing refers to the spreading of requests or data across several operating units for execution to collectively complete a work task with the goal of optimizing resource usage, maximizing throughput, and minimizing response time by scheduling clusters. Through a load balancing algorithm, a plurality of better target services can be determined from a plurality of second candidate services corresponding to the target virtual network element to be allocated to the virtual network element. The load balancing algorithm may be a polling method, a random method, a source address hashing method, a weighted polling method, a weighted random method, a minimum concatenation method, or the like.
It should be noted that the plurality of target services include at least one connection service, or at least one collection service, or at least one connection service and at least one collection service.
Step 205, sending the service resource of each target service to the target virtual network element.
Specifically, the service resource of the target service refers to a management internet protocol address and a port of the target service, and the controller sends the management internet protocol address and the port of the target service to the target virtual network element, so that the allocation of the network service is completed.
According to the service allocation method provided by the embodiment of the invention, the registration request sent by the target virtual network element carries the type of the target virtual network element, so that the controller can determine a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services according to the type of the target virtual network element, then determine a plurality of available first candidate services in the plurality of first candidate services to obtain a plurality of second candidate services, then determine a plurality of better target services in the plurality of second candidate services based on a preset load balancing algorithm, and finally send the service resource of each target service to the target virtual network element, thereby completing the allocation of the network services.
Further, the detailed description of the step 202 in the embodiment of the present invention is that, determining, according to the type, a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services, which includes:
step 2021, a preset service carrying capability table is called, wherein a service identifier corresponding to each network service, and a type and a number of virtual network elements that can be carried are stored in the service carrying capability table in an associated manner.
Specifically, each network service is built in the controller, and after the network service is built, the network service needs to be registered, for example, the carrying capacity of the network service is stored in the service carrying capacity table, and after the network service is registered, subsequent distribution can be performed. It should be noted that the service bearer capability table is stored in the database, in which the service identifier corresponding to each network service, the type and number of the virtual network elements that can be borne are stored in association.
It should be noted that the service carrying capacity table specifically includes a connection service carrying capacity sub-table and a collection service carrying capacity sub-table, where the connection service carrying capacity sub-table corresponds to the connection service, and a service identifier corresponding to each connection service, and a type and a number of virtual network elements that can be carried are stored in association with the connection service; the collection service bearing capacity sub-table corresponds to collection services, wherein service identification corresponding to each collection service, and types and number of virtual network elements capable of bearing are stored in an associated manner.
If a certain network service is a connection service, after the network service is registered, the bearing capacity of the network service is stored in a connection service bearing capacity sub-table, and if a certain network service is an acquisition service, after the network service is registered, the bearing capacity of the network service is stored in an acquisition service bearing capacity sub-table.
Step 2022, sequentially using each of the network services as a first service to be analyzed, and determining whether the type of the virtual network element that can be carried by the first service to be analyzed is consistent with the type of the target virtual network element.
Specifically, each network service is sequentially used as a first service to be analyzed, the type of the virtual network element that can be carried by the first service to be analyzed is obtained by querying the service carrying capacity table, the type is compared with the type of the target virtual network element, and whether the two types are consistent or not is judged.
Step 2023, if the service to be analyzed is consistent with the target virtual network element, determining the first service to be analyzed as the first candidate service corresponding to the target virtual network element.
Specifically, if the type of the virtual network element that can be carried by the first service to be analyzed is consistent with the type of the target virtual network element, it is indicated that the first service to be analyzed can carry the target virtual network element, and the first service to be analyzed is referred to as a first candidate service corresponding to the target virtual network element, so that a plurality of first candidate services corresponding to the target virtual network element can be determined.
Further, the above step 203 is described in detail in the embodiment of the present invention, that is, in a plurality of first candidate services, taking each available first candidate service as a second candidate service to obtain a plurality of second candidate services, where the method includes:
step 2031, invoking the service bearing capacity table and a preset allocated service table, wherein the allocated service table stores service identifiers corresponding to each network service and network element identifiers of the loaded virtual network elements in association.
Specifically, the service carrying capability table has been described in detail in the foregoing embodiments, and is not described herein again. The allocated service table is stored in a database, wherein service identifiers corresponding to each network service and network element identifiers of the loaded virtual network elements are stored in an associated manner.
Step 2032, sequentially using each of the first candidate services as a second service to be analyzed, and comparing the number of virtual network elements that can be borne by the second service to be analyzed with the number of virtual network elements that have been borne.
It should be noted that the number of the virtual network elements that can be carried by the second service to be analyzed is obtained by querying the service carrying capability table, and the number of the virtual network elements that are carried by the second service to be analyzed is obtained by querying the allocated service table, where the number of the virtual network elements that are carried by the second service to be analyzed is specifically obtained by counting the number of the network element identifiers of the virtual network elements that are carried by the second service to be analyzed in the allocated service table.
Step 2033, if the number of the virtual network elements that can be carried by the second service to be analyzed is greater than the number of the carried virtual network elements, determining the second service to be analyzed as the second candidate service.
Specifically, if the number of the virtual network elements that can be carried by the second service to be analyzed is greater than the number of the carried virtual network elements, it is indicated that the second service to be analyzed is available and can be used by the target virtual network element, and the second service to be analyzed is referred to as a second candidate service, so that a plurality of second candidate services can be determined.
Further, before comparing the number of virtual network elements that can be carried by the second service to be analyzed with the number of virtual network elements that have already been carried in step 2032, the method for allocating a service further includes: and acquiring the number of the virtual network elements loaded by the second service to be analyzed according to the network element identification of the virtual network element loaded by the second service to be analyzed.
Specifically, the number of the virtual network elements that have been carried by the second service to be analyzed is obtained by counting the number of the network element identifiers of the virtual network elements that have been carried by the second service to be analyzed in the allocated service table.
Further, after determining a plurality of target services among a plurality of second candidate services in step 204, that is, according to a preset load balancing algorithm, the service allocation method further includes: and storing the network element identification of the target virtual network element in the allocated service table, and associating the network element identification with the service identification of each target service.
Specifically, after determining a plurality of target services allocated to the target virtual network element, the controller stores the network element identifier of the target virtual network element in the allocated service table, and associates the network element identifier of the target virtual network element with the service identifier of each target service in the allocated service table, so as to update the allocated service table and ensure the accuracy of subsequent service allocation.
As a preferred embodiment, the embodiment of the present invention describes a complete flow of a service allocation method:
first, the following data tables are defined in the database, and it should be noted that all services described in the following data tables are web services.
Service table: for storing service information such as service identification of the service, type of service, management internet protocol address of the service, port of the service and description information.
Virtual network element table: for storing virtual network element information, such as network element identification of the virtual network element, management internet protocol address of the virtual network element, port of the virtual network element, type and description information of the virtual network element.
Virtual network element type table: for storing virtual network element type information, such as the type of the virtual network element, the name and description information of the virtual network element.
Service carrying capacity table: the bearer capability information used for storing the service, such as the service identification of the service, the type of virtual network elements that can be carried by the service, the number of virtual network elements that can be carried by the service, and description information.
It should be noted that the service includes a connection service and/or an acquisition service, and correspondingly, the service carrying capacity table includes a connection service carrying capacity sub-table and/or an acquisition service carrying capacity sub-table, where the connection service carrying capacity sub-table is used to store carrying capacity information of the connection service, such as a service identifier of the connection service, a type of a virtual network element that can be carried by the connection service, and a number and description information of the virtual network elements that can be carried by the connection service; the collection service bearing capacity sub-table is used for storing bearing capacity information of the collection service, such as a service identifier of the collection service, a type of a virtual network element that can be borne by the collection service, and a number and description information of the virtual network element that can be borne by the collection service.
Allocated services table: for storing allocated service information, such as a service identification of the service and a network element identification of a virtual network element that the service has carried. It should be noted that, since the service includes a connection service and/or an acquisition service, the service identifier in the allocated service table specifically includes a service identifier of the connection service and/or a service identifier of the acquisition service.
When a new connection service or an acquisition service is added to the controller, the newly added service needs to be registered, that is, the load capacity information of the service is stored in the service load capacity table, specifically, if the newly added service is a connection service, the load capacity information of the connection service is stored in the connection service load capacity sub-table, and if the newly added service is an acquisition service, the load capacity information of the acquisition service is stored in the acquisition service load capacity sub-table. Optionally, the service information may also be stored in a service table.
If the target virtual network element needs to be accessed into the cloud gateway, the target virtual network element sends a registration request to the controller in order to complete the access, wherein the registration request carries a network element identifier of the target virtual network element, a management internet protocol address and a port.
The controller receives a registration request sent by a target virtual network element, analyzes the registration request, obtains a network element identifier of the target virtual network element carried in the registration request, and further obtains the type of the target virtual network element carried in the network element identifier. It should be noted that the controller may further store the parsing result in the virtual network element table and the virtual network element type table.
The controller calls the service bearing capacity table, namely the connection service bearing capacity sub-table and/or the collection service bearing capacity sub-table, and inquires, so that a plurality of first candidate connection services corresponding to the target virtual network element are determined from a plurality of connection services according to the type of the target virtual network element, and/or a plurality of first candidate collection services corresponding to the target virtual network element are determined from a plurality of collection services.
The controller invokes the allocated service table and performs a lookup to determine a number of second candidate connectivity services available among the number of first candidate connectivity services and/or a number of second candidate acquisition services available among the number of first candidate acquisition services.
The controller determines a plurality of better target connection services among the plurality of available second candidate connection services and/or determines a plurality of better target acquisition services among the plurality of available second candidate acquisition services according to a load balancing algorithm.
The controller calls the service table and inquires the service table to determine the management internet protocol address and the port of each target connection service and/or each target acquisition service, and the management internet protocol address and the port are used as service resources and sent to the target virtual network element.
Fig. 3 is a flowchart of a service allocation method according to another embodiment of the present invention, where the service allocation method is applied to a cloud gateway, and an execution subject of the service allocation method is a target virtual network element in the cloud gateway, and the target virtual network element is a virtual network element that needs to be accessed to the cloud gateway. As shown in fig. 3, the service allocation method includes:
step 301, sending a registration request to a controller, where the registration request carries a network element identifier of a target virtual network element, and the network element identifier carries a type of the target virtual network element, so that the controller determines, according to the type, a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services, and in the plurality of first candidate services, uses each available first candidate service as a second candidate service to obtain a plurality of second candidate services, and determines, according to a preset load balancing algorithm, a plurality of target services in the plurality of second candidate services.
Specifically, the target virtual network element needs to register with the controller in order to complete access, and one implementation manner is that the target virtual network element sends a registration request to the controller. The registration request carries a network element identifier of the target virtual network element, and the network element identifier carries a type of the target virtual network element. Since the network element identifier has been described in detail in the foregoing embodiment, details are not described here.
If the controller receives a registration request sent by a target virtual network element, the registration request can be analyzed to obtain the type of the target virtual network element, then a plurality of first candidate services corresponding to the target virtual network element are determined in a plurality of network services according to the corresponding relation between the network services preset in the cloud gateway and the type of the virtual network element, a plurality of available second candidate services are determined in the plurality of first candidate services, and finally a plurality of better target services are determined in the plurality of second candidate services according to a load balancing algorithm. In the above embodiment, a process of determining, by the controller, a plurality of target services corresponding to the target virtual network element according to the registration request of the target virtual network element has been described in detail, and therefore, details are not described here again.
Step 302, receiving the service resource of each target service sent by the controller.
Specifically, after determining a plurality of target services corresponding to the target virtual network element, the controller sends a service resource of each target service to the target virtual network element, and the target virtual network element receives the service resource of each target service sent by the controller, where the service resource of the target service refers to a management internet protocol address and a port of the target service.
According to the service allocation method provided by the embodiment of the invention, the registration request sent by the target virtual network element carries the type of the target virtual network element, so that the controller can determine a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services according to the type of the target virtual network element, then determine a plurality of available first candidate services in the plurality of first candidate services to obtain a plurality of second candidate services, then determine a plurality of better target services in the plurality of second candidate services based on a preset load balancing algorithm, and finally send the service resource of each target service to the target virtual network element, thereby completing the allocation of the network services.
Fig. 4 is a schematic structural diagram of a controller according to an embodiment of the present invention, and as shown in fig. 4, the controller includes: a registration request receiving module 401, configured to receive a registration request sent by a target virtual network element, where the registration request carries a network element identifier of the target virtual network element, and the network element identifier carries a type of the target virtual network element; a first candidate service determining module 402, configured to determine, according to the type, a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services; a second candidate service determining module 403, configured to use each available first candidate service as a second candidate service in the plurality of first candidate services to obtain a plurality of second candidate services; a target service determining module 404, configured to determine, according to a preset load balancing algorithm, a plurality of target services among the plurality of second candidate services; a service resource sending module 405, configured to send the service resource of each target service to the target virtual network element.
It should be noted that, the controller provided in the embodiment of the present invention is configured to execute the steps of the controller-side service allocation method, and details are not described here again. According to the embodiment of the invention, the register request sent by the target virtual network element carries the type of the target virtual network element, so that the controller can determine a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services according to the type of the target virtual network element, then determine a plurality of available first candidate services in the plurality of first candidate services to obtain a plurality of second candidate services, then determine a plurality of better target services in the plurality of second candidate services based on a preset load balancing algorithm, and finally send the service resource of each target service to the target virtual network element, thereby completing the distribution of the network services.
Fig. 5 is a schematic structural diagram of a virtual network element according to an embodiment of the present invention, and as shown in fig. 5, the virtual network element includes: a registration request sending module 501, configured to send a registration request to a controller, where the registration request carries a network element identifier of a target virtual network element, and the network element identifier carries a type of the target virtual network element, so that the controller determines, according to the type, a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services, and in the plurality of first candidate services, uses each available first candidate service as a second candidate service to obtain a plurality of second candidate services, and determines, according to a preset load balancing algorithm, a plurality of target services in the plurality of second candidate services; a service resource receiving module 502, configured to receive the service resource of each target service sent by the controller.
It should be noted that, the controller provided in the embodiment of the present invention is configured to execute the steps of the foregoing virtual network element side service allocation method, and details are not described here again. According to the embodiment of the invention, the register request sent by the target virtual network element carries the type of the target virtual network element, so that the controller can determine a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services according to the type of the target virtual network element, then determine a plurality of available first candidate services in the plurality of first candidate services to obtain a plurality of second candidate services, then determine a plurality of better target services in the plurality of second candidate services based on a preset load balancing algorithm, and finally send the service resource of each target service to the target virtual network element, thereby completing the distribution of the network services.
Fig. 6 is a schematic entity structure diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 6, the electronic device may include: a processor (processor)601, a communication Interface (Communications Interface)602, a memory (memory)603 and a communication bus 604, wherein the processor 601, the communication Interface 602 and the memory 603 complete communication with each other through the communication bus 604. The processor 601 may call a computer program stored on the memory 603 and executable on the processor 601 to perform the methods provided by the above embodiments, including for example: receiving a registration request sent by a target virtual network element, wherein the registration request carries a network element identifier of the target virtual network element, and the network element identifier carries a type of the target virtual network element; determining a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services according to the type; in the first candidate services, each available first candidate service is used as a second candidate service to obtain a plurality of second candidate services; determining a plurality of target services in the second candidate services according to a preset load balancing algorithm; and sending the service resource of each target service to the target virtual network element. Or, a registration request is sent to a controller, where the registration request carries a network element identifier of a target virtual network element, and the network element identifier carries a type of the target virtual network element, so that the controller determines, according to the type, a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services, and in the plurality of first candidate services, each available first candidate service is used as a second candidate service to obtain a plurality of second candidate services, and determines a plurality of target services in the plurality of second candidate services according to a preset load balancing algorithm; and receiving the service resources of each target service sent by the controller.
In addition, the logic instructions in the memory 603 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or make a contribution to the prior art, or may be implemented in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Embodiments of the present invention further provide a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented to perform the transmission method provided in the foregoing embodiments when executed by a processor, and the method includes: receiving a registration request sent by a target virtual network element, wherein the registration request carries a network element identifier of the target virtual network element, and the network element identifier carries a type of the target virtual network element; determining a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services according to the type; in the plurality of first candidate services, each available first candidate service is used as a second candidate service to obtain a plurality of second candidate services; determining a plurality of target services in the second candidate services according to a preset load balancing algorithm; and sending the service resource of each target service to the target virtual network element. Or, a registration request is sent to a controller, where the registration request carries a network element identifier of a target virtual network element, and the network element identifier carries a type of the target virtual network element, so that the controller determines, according to the type, a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services, and in the plurality of first candidate services, each available first candidate service is used as a second candidate service to obtain a plurality of second candidate services, and determines a plurality of target services in the plurality of second candidate services according to a preset load balancing algorithm; and receiving the service resources of each target service sent by the controller.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for service allocation, comprising:
receiving a registration request sent by a target virtual network element, wherein the registration request carries a network element identifier of the target virtual network element, and the network element identifier carries a type of the target virtual network element;
determining a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services according to the type;
in the first candidate services, each available first candidate service is used as a second candidate service to obtain a plurality of second candidate services;
determining a plurality of target services in the second candidate services according to a preset load balancing algorithm;
and sending the service resource of each target service to the target virtual network element.
2. The service allocation method according to claim 1, wherein determining, according to the type, a plurality of first candidate services corresponding to the target virtual network element among a plurality of preset network services comprises:
calling a preset service carrying capacity table, wherein the service carrying capacity table is stored with service identification corresponding to each network service and the type and the number of virtual network elements capable of being carried in a related manner;
sequentially taking each network service as a first service to be analyzed, and judging whether the type of a virtual network element which can be borne by the first service to be analyzed is consistent with the type of the target virtual network element;
and if so, determining the first service to be analyzed as the first candidate service corresponding to the target virtual network element.
3. The method of claim 2, wherein the step of obtaining a plurality of second candidate services by using each available first candidate service as a second candidate service in the plurality of first candidate services comprises:
calling the service bearing capacity table and a preset distributed service table, wherein the distributed service table is stored with a service identifier corresponding to each network service and a network element identifier of a loaded virtual network element in a correlated manner;
sequentially taking each first candidate service as a second service to be analyzed, and comparing the number of virtual network elements which can be borne by the second service to be analyzed with the number of borne virtual network elements;
and if the number of the virtual network elements which can be borne by the second service to be analyzed is greater than the number of the borne virtual network elements, determining the second service to be analyzed as the second candidate service.
4. The service allocation method according to claim 3, wherein the size of the number of virtual network elements that can be carried by the second service to be analyzed is compared with the number of virtual network elements that have been carried, and the method further comprises:
and acquiring the number of the virtual network elements loaded by the second service to be analyzed according to the network element identification of the virtual network element loaded by the second service to be analyzed.
5. The method of claim 3, wherein a plurality of target services are determined among the plurality of second candidate services according to a predetermined load balancing algorithm, and then further comprising:
and storing the network element identification of the target virtual network element in the allocated service table, and associating the network element identification with the service identification of each target service.
6. A method for service allocation, comprising:
a registration request sent to a controller, wherein the registration request carries a network element identifier of a target virtual network element, and the network element identifier carries a type of the target virtual network element, so that the controller determines a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services according to the type, in the plurality of first candidate services, each available first candidate service is used as a second candidate service to obtain a plurality of second candidate services, and determines a plurality of target services in the plurality of second candidate services according to a preset load balancing algorithm;
and receiving the service resources of each target service sent by the controller.
7. A controller, comprising:
a registration request receiving module, configured to receive a registration request sent by a target virtual network element, where the registration request carries a network element identifier of the target virtual network element, and the network element identifier carries a type of the target virtual network element;
a first candidate service determining module, configured to determine, according to the type, a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services;
a second candidate service determining module, configured to use each available first candidate service as a second candidate service among the plurality of first candidate services to obtain a plurality of second candidate services;
the target service determining module is used for determining a plurality of target services in the second candidate services according to a preset load balancing algorithm;
and the service resource sending module is used for sending the service resource of each target service to the target virtual network element.
8. A virtual network element, comprising:
a registration request sending module, configured to send a registration request to a controller, where the registration request carries a network element identifier of a target virtual network element, and the network element identifier carries a type of the target virtual network element, so that the controller determines, according to the type, a plurality of first candidate services corresponding to the target virtual network element in a plurality of preset network services, and in the plurality of first candidate services, uses each available first candidate service as a second candidate service to obtain a plurality of second candidate services, and determines, according to a preset load balancing algorithm, a plurality of target services in the plurality of second candidate services;
and the service resource receiving module is used for receiving the service resource of each target service sent by the controller.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the service distribution method according to any of claims 1 to 6 are implemented when the processor executes the program.
10. A non-transitory computer readable storage medium, having stored thereon a computer program, wherein the computer program, when being executed by a processor, is adapted to carry out the steps of the service distribution method according to any one of claims 1 to 6.
CN202011172197.9A 2020-10-28 2020-10-28 Service distribution method, controller and virtual network element Active CN112291340B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011172197.9A CN112291340B (en) 2020-10-28 2020-10-28 Service distribution method, controller and virtual network element

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011172197.9A CN112291340B (en) 2020-10-28 2020-10-28 Service distribution method, controller and virtual network element

Publications (2)

Publication Number Publication Date
CN112291340A CN112291340A (en) 2021-01-29
CN112291340B true CN112291340B (en) 2022-06-03

Family

ID=74373674

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011172197.9A Active CN112291340B (en) 2020-10-28 2020-10-28 Service distribution method, controller and virtual network element

Country Status (1)

Country Link
CN (1) CN112291340B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101877655A (en) * 2009-04-30 2010-11-03 华为技术有限公司 Network management system, network management server and method
CN101931931A (en) * 2009-06-25 2010-12-29 华为技术有限公司 Information process method, system and mobility management network element
CN108509535A (en) * 2018-03-15 2018-09-07 烽火通信科技股份有限公司 Resource ID based on section manages system and method
CN109120556A (en) * 2018-08-21 2019-01-01 广州市品高软件股份有限公司 A kind of method and system of cloud host access object storage server
CN110855481A (en) * 2019-11-04 2020-02-28 中盈优创资讯科技有限公司 Data acquisition system and method
CN111082860A (en) * 2018-10-18 2020-04-28 中兴通讯股份有限公司 Testing method, server, system and storage medium of optical distribution node
CN111371585A (en) * 2018-12-26 2020-07-03 北京奇虎科技有限公司 Configuration method and device for CDN node

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140297805A1 (en) * 2013-03-29 2014-10-02 Alcatel-Lucent India Limited Method and apparatus for assigning priority levels to streams by a network element in a communications network

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101877655A (en) * 2009-04-30 2010-11-03 华为技术有限公司 Network management system, network management server and method
CN101931931A (en) * 2009-06-25 2010-12-29 华为技术有限公司 Information process method, system and mobility management network element
CN108509535A (en) * 2018-03-15 2018-09-07 烽火通信科技股份有限公司 Resource ID based on section manages system and method
CN109120556A (en) * 2018-08-21 2019-01-01 广州市品高软件股份有限公司 A kind of method and system of cloud host access object storage server
CN111082860A (en) * 2018-10-18 2020-04-28 中兴通讯股份有限公司 Testing method, server, system and storage medium of optical distribution node
CN111371585A (en) * 2018-12-26 2020-07-03 北京奇虎科技有限公司 Configuration method and device for CDN node
CN110855481A (en) * 2019-11-04 2020-02-28 中盈优创资讯科技有限公司 Data acquisition system and method

Also Published As

Publication number Publication date
CN112291340A (en) 2021-01-29

Similar Documents

Publication Publication Date Title
US10187459B2 (en) Distributed load balancing system, health check method, and service node
CN108776934B (en) Distributed data calculation method and device, computer equipment and readable storage medium
US20160330080A1 (en) Method of discovering network topology
US8825750B2 (en) Application server management system, application server management method, management apparatus, application server and computer program
US20210320845A1 (en) Network function nf management method and nf management device
EP3823389A1 (en) User plane resource management method, user plane network element, and control plane network element
CN111245634B (en) Virtualization management method and device
US10348683B2 (en) Network packet filtering via media access control (MAC) address learning
US20180242177A1 (en) Monitoring management method and apparatus
CN110198267B (en) Traffic scheduling method, system and server
WO2022116849A1 (en) Service allocation method, apparatus, electronic device, and storage medium
CN111615128A (en) Multi-access edge computing method, platform and system
CN109582439B (en) DCN deployment method, device, equipment and computer readable storage medium
CN106209680B (en) Information processing apparatus and information processing method
CN113254165B (en) Load flow distribution method and device for virtual machine and container, and computer equipment
CN112291340B (en) Service distribution method, controller and virtual network element
CN116436968A (en) Service grid communication method, system, device and storage medium
CN116112572A (en) Service processing method, device, network equipment and storage medium
CN113904871B (en) Access method of network slice, PCF entity, terminal and communication system
EP2930883B1 (en) Method for the implementation of network functions virtualization of a telecommunications network providing communication services to subscribers, telecommunications network, program and computer program product
CN108173689B (en) Output system of load balancing data
JP6763895B2 (en) Communication system and communication method
CN110677496A (en) Middleware service scheduling method and device and readable storage medium
CN111698174A (en) Dynamic flow distribution method, device, equipment and storage medium
CN111490894B (en) Supply and installation monitoring system and method for virtual machine network card

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant